Skip to content

Instantly share code, notes, and snippets.

@edsu
Last active April 14, 2022 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edsu/9e8eb6665caea8e3d5554051e8b3ffd4 to your computer and use it in GitHub Desktop.
Save edsu/9e8eb6665caea8e3d5554051e8b3ffd4 to your computer and use it in GitHub Desktop.
Debugging PyWB and Wayback

I'm trying to figure out why this JavaScript file rendered through PyWB seems to throw a Uncaught SyntaxError: missing formal parameter in Firefox and a Uncaught SyntaxError: Unexpected token 'function' (at pywb.js:15:5628639) in Chrome whereas it works fine when rendered through Archive-It Wayback.

curl http://localhost:8080/sul/20220225003837js_/https://prod.smassets.net/assets/anweb/anweb-shared-page-summary-bundle-min.58b903b5.js > pywb.js

curl https://wayback.archive-it.org/18713/20220225003837js_/https://prod.smassets.net/assets/anweb/anweb-shared-page-summary-bundle-min.58b903b5.js > wayback.js

You can open wayback.html and pywb.html in your browser and look at the developer console to see the error in the case of pywb.html.

<script src="pywb.js"></script>
This file has been truncated, but you can view the full file.
var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; };
if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } }
{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opener = _____WB$wombat$assign$function_____("opener");
let arguments;
{!function(){var e,t,n={};e="undefined"!=typeof window?window:n,t=function(r){function e(e,t,n,r){e.hasOwnProperty(t)||(e[t]=r.apply(null,n))}var t={};return e(t,"Core/Globals.js",[],function(){var e,n,t=void 0!==r?r:"undefined"!=typeof window?window:{};return(n=e||(e={})).SVG_NS="http://www.w3.org/2000/svg",n.product="Highcharts",n.version="9.3.2",n.win=t,n.doc=n.win.document,n.svg=n.doc&&n.doc.createElementNS&&!!n.doc.createElementNS(n.SVG_NS,"svg").createSVGRect,n.userAgent=n.win.navigator&&n.win.navigator.userAgent||"",n.isChrome=-1!==n.userAgent.indexOf("Chrome"),n.isFirefox=-1!==n.userAgent.indexOf("Firefox"),n.isMS=/(edge|msie|trident)/i.test(n.userAgent)&&!n.win.opera,n.isSafari=!n.isChrome&&-1!==n.userAgent.indexOf("Safari"),n.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(n.userAgent),n.isWebKit=-1!==n.userAgent.indexOf("AppleWebKit"),n.deg2rad=2*Math.PI/360,n.hasBidiBug=n.isFirefox&&4>parseInt(n.userAgent.split("Firefox/")[1],10),n.hasTouch=!!n.win.TouchEvent,n.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],n.noop=function(){},n.supportsPassiveEvents=function(){var e=!1;if(!n.isMS){var t=Object.defineProperty({},"passive",{get:function(){e=!0}});n.win.addEventListener&&n.win.removeEventListener&&(n.win.addEventListener("testPassive",n.noop,t),n.win.removeEventListener("testPassive",n.noop,t))}return e}(),n.charts=[],n.dateFormats={},n.seriesTypes={},n.symbolSizes={},n.chartCount=0,e}),e(t,"Core/Utilities.js",[t["Core/Globals.js"]],function(l){function u(e,t,n,r){var i=t?"Highcharts error":"Highcharts warning";32===e&&(e=i+": Deprecated member");var o=y(e),a=o?i+" #"+e+": www.highcharts.com/errors/"+e+"/":e.toString();if(void 0!==r){var s="";o&&(a+="?"),p(r,function(e,t){s+="\n - "+t+": "+e,o&&(a+=encodeURI(t)+"="+encodeURI(e))}),a+=s}E(l,"displayError",{chart:n,code:e,message:a,params:r},function(){if(t)throw Error(a);h.console&&-1===u.messages.indexOf(a)&&console.warn(a)}),u.messages.push(a)}function f(e,t){return parseInt(e,t||10)}function i(e){return"string"==typeof e}function n(e){return"[object Array]"===(e=Object.prototype.toString.call(e))||"[object Array Iterator]"===e}function a(e,t){return!(!e||"object"!=typeof e||t&&n(e))}function m(e){return a(e)&&"number"==typeof e.nodeType}function g(e){var t=e&&e.constructor;return!(!a(e,!0)||m(e)||!t||!t.name||"Object"===t.name)}function y(e){return"number"==typeof e&&!isNaN(e)&&1/0>e&&-1/0<e}function o(e){return null!=e}function t(n,e,t){var r;return i(e)?o(t)?n.setAttribute(e,t):n&&n.getAttribute&&((r=n.getAttribute(e))||"class"!==e||(r=n.getAttribute(e+"Name"))):p(e,function(e,t){o(e)?n.setAttribute(t,e):n.removeAttribute(t)}),r}function s(e,t){var n;for(n in e||(e={}),t)e[n]=t[n];return e}function c(){for(var e=arguments,t=e.length,n=0;n<t;n++){var r=e[n];if(null!=r)return r}}function b(e,t){l.isMS&&!l.svg&&t&&void 0!==t.opacity&&(t.filter="alpha(opacity="+100*t.opacity+")"),s(e.style,t)}function v(e,t){return 1e14<e?e:parseFloat(e.toPrecision(t||14))}function p(e,t,n){for(var r in e)Object.hasOwnProperty.call(e,r)&&t.call(n||e[r],e[r],r,e)}function w(i,t,n){function o(e,t){var n=i.removeEventListener||l.removeEventListenerPolyfill;n&&n.call(i,e,t,!1)}function e(n){var r;if(i.nodeName){if(t){var e={};e[t]=!0}else e=n;p(e,function(e,t){if(n[t])for(r=n[t].length;r--;)o(t,n[t][r].fn)})}}var r="function"==typeof i&&i.prototype||i;if(Object.hasOwnProperty.call(r,"hcEvents")){var a=r.hcEvents;t?(r=a[t]||[],n?(a[t]=r.filter(function(e){return n!==e.fn}),o(t,n)):(e(a),a[t]=[])):(e(a),delete r.hcEvents)}}function E(t,e,n,r){if(n=n||{},d.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==l)){var i=d.createEvent("Events");i.initEvent(e,!0,!0),n=s(i,n),t.dispatchEvent?t.dispatchEvent(n):t.fireEvent(e,n)}else if(t.hcEvents){n.target||s(n,{preventDefault:function(){n.defaultPrevented=!0},target:t,type:e}),i=[];for(var o=t,a=!1;o.hcEvents;)Object.hasOwnProperty.call(o,"hcEvents")&&o.hcEvents[e]&&(i.length&&(a=!0),i.unshift.apply(i,o.hcEvents[e])),o=Object.getPrototypeOf(o);a&&i.sort(function(e,t){return e.order-t.order}),i.forEach(function(e){!1===e.fn.call(t,n)&&n.preventDefault()})}r&&!n.defaultPrevented&&r.call(t,n)}var r=l.charts,d=l.doc,h=l.win;(u||(u={})).messages=[],Math.easeInOutSine=function(e){return-.5*(Math.cos(Math.PI*e)-1)};var e=Array.prototype.find?function(e,t){return e.find(t)}:function(e,t){var n,r=e.length;for(n=0;n<r;n++)if(t(e[n],n))return e[n]};p({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(n,r){l[r]=function(e){var t;return u(32,!1,void 0,((t={})["Highcharts."+r]="use Array."+n,t)),Array.prototype[n].apply(e,[].slice.call(arguments,1))}});var S,T,x,_=(T=Math.random().toString(36).substring(2,9)+"-",x=0,function(){return"highcharts-"+(S?"":T)+x++});return h.jQuery&&(h.jQuery.fn.highcharts=function(){var e=[].slice.call(arguments);if(this[0])return e[0]?(new l[i(e[0])?e.shift():"Chart"](this[0],e[0],e[1]),_____WB$wombat$check$this$function_____(this)):r[t(this[0],"data-highcharts-chart")]}),e={addEvent:function(e,t,n,r){void 0===r&&(r={});var i="function"==typeof e&&e.prototype||e;Object.hasOwnProperty.call(i,"hcEvents")||(i.hcEvents={}),i=i.hcEvents,l.Point&&e instanceof l.Point&&e.series&&e.series.chart&&(e.series.chart.runTrackerClick=!0);var o=e.addEventListener||l.addEventListenerPolyfill;return o&&o.call(e,t,n,!!l.supportsPassiveEvents&&{passive:void 0===r.passive?-1!==t.indexOf("touch"):r.passive,capture:!1}),i[t]||(i[t]=[]),i[t].push({fn:n,order:"number"==typeof r.order?r.order:1/0}),i[t].sort(function(e,t){return e.order-t.order}),function(){w(e,t,n)}},arrayMax:function(e){for(var t=e.length,n=e[0];t--;)e[t]>n&&(n=e[t]);return n},arrayMin:function(e){for(var t=e.length,n=e[0];t--;)e[t]<n&&(n=e[t]);return n},attr:t,clamp:function(e,t,n){return e>t?e<n?e:n:t},cleanRecursively:function n(r,i){var o={};return p(r,function(e,t){a(r[t],!0)&&!r.nodeType&&i[t]?(e=n(r[t],i[t]),Object.keys(e).length&&(o[t]=e)):(a(r[t])||r[t]!==i[t])&&(o[t]=r[t])}),o},clearTimeout:function(e){o(e)&&clearTimeout(e)},correctFloat:v,createElement:function(e,t,n,r,i){return e=d.createElement(e),t&&s(e,t),i&&b(e,{padding:"0",border:"none",margin:"0"}),n&&b(e,n),r&&r.appendChild(e),e},css:b,defined:o,destroyObjectProperties:function(n,r){p(n,function(e,t){e&&e!==r&&e.destroy&&e.destroy(),delete n[t]})},discardElement:function(e){e&&e.parentElement&&e.parentElement.removeChild(e)},erase:function(e,t){for(var n=e.length;n--;)if(e[n]===t){e.splice(n,1);break}},error:u,extend:s,extendClass:function(e,t){var n=function(){};return s(n.prototype=new e,t),n},find:e,fireEvent:E,getMagnitude:function(e){return Math.pow(10,Math.floor(Math.log(e)/Math.LN10))},getNestedProperty:function(e,t){for(e=e.split(".");e.length&&o(t);){var n=e.shift();if(void 0===n||"__proto__"===n)return;if(!o(t=t[n])||"function"==typeof t||"number"==typeof t.nodeType||t===h)return}return t},getStyle:function e(t,n,r){var i=l.getStyle||e;if("width"===n)return n=Math.min(t.offsetWidth,t.scrollWidth),(r=t.getBoundingClientRect&&t.getBoundingClientRect().width)<n&&r>=n-1&&(n=Math.floor(r)),Math.max(0,n-(i(t,"padding-left",!0)||0)-(i(t,"padding-right",!0)||0));if("height"===n)return Math.max(0,Math.min(t.offsetHeight,t.scrollHeight)-(i(t,"padding-top",!0)||0)-(i(t,"padding-bottom",!0)||0));if(h.getComputedStyle||u(27,!0),t=h.getComputedStyle(t,void 0)){var o=t.getPropertyValue(n);c(r,"opacity"!==n)&&(o=f(o))}return o},inArray:function(e,t,n){return u(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"}),t.indexOf(e,n)},isArray:n,isClass:g,isDOMElement:m,isFunction:function(e){return"function"==typeof e},isNumber:y,isObject:a,isString:i,keys:function(e){return u(32,!1,void 0,{"Highcharts.keys":"use Object.keys"}),Object.keys(e)},merge:function(){var e,t=arguments,n={},i=function(n,r){return"object"!=typeof n&&(n={}),p(r,function(e,t){"__proto__"!==t&&"constructor"!==t&&(!a(e,!0)||g(e)||m(e)?n[t]=r[t]:n[t]=i(n[t]||{},e))}),n};!0===t[0]&&(n=t[1],t=Array.prototype.slice.call(t,2));var r=t.length;for(e=0;e<r;e++)n=i(n,t[e]);return n},normalizeTickInterval:function(e,t,n,r,i){var o=e,a=e/(n=c(n,1));for(t||(t=i?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===r&&(1===n?t=t.filter(function(e){return 0==e%1}):.1>=n&&(t=[1/n]))),r=0;r<t.length&&(o=t[r],!(i&&o*n>=e||!i&&a<=(t[r]+(t[r+1]||t[r]))/2));r++);return v(o*n,-Math.round(Math.log(.001)/Math.LN10))},objectEach:p,offset:function(e){var t=d.documentElement;return{top:(e=e.parentElement||e.parentNode?e.getBoundingClientRect():{top:0,left:0,width:0,height:0}).top+(h.pageYOffset||t.scrollTop)-(t.clientTop||0),left:e.left+(h.pageXOffset||t.scrollLeft)-(t.clientLeft||0),width:e.width,height:e.height}},pad:function(e,t,n){return Array((t||2)+1-String(e).replace("-","").length).join(n||"0")+e},pick:c,pInt:f,relativeLength:function(e,t,n){return/%$/.test(e)?t*parseFloat(e)/100+(n||0):parseFloat(e)},removeEvent:w,splat:function(e){return n(e)?e:[e]},stableSort:function(e,n){var r,t,i=e.length;for(t=0;t<i;t++)e[t].safeI=t;for(e.sort(function(e,t){return 0===(r=n(e,t))?e.safeI-t.safeI:r}),t=0;t<i;t++)delete e[t].safeI},syncTimeout:function(e,t,n){return 0<t?setTimeout(e,t,n):(e.call(0,n),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},uniqueKey:_,useSerialIds:function(e){return S=c(e,S)},wrap:function(e,t,r){var i=e[t];e[t]=function(){var e=Array.prototype.slice.call(arguments),t=arguments,n=_____WB$wombat$check$this$function_____(this);return n.proceed=function(){i.apply(n,arguments.length?arguments:t)},e.unshift(i),e=r.apply(this,e),n.proceed=null,e}}},e}),e(t,"Core/Chart/ChartDefaults.js",[],function(){return{panning:{enabled:!1,type:"x"},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}},zoomBySingleTouch:!1,width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}}),e(t,"Core/Color/Color.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(n,e){var i=e.isNumber,a=e.merge,r=e.pInt;return e=function(){function o(e){this.rgba=[NaN,NaN,NaN,NaN],this.input=e;var t=n.Color;return t&&t!==o?new t(e):this instanceof o?void this.init(e):new o(e)}return o.parse=function(e){return e?new o(e):o.None},o.prototype.init=function(e){var t;if("object"==typeof e&&void 0!==e.stops)this.stops=e.stops.map(function(e){return new o(e[1])});else if("string"==typeof e){if(this.input=e=o.names[e.toLowerCase()]||e,"#"===e.charAt(0)){var n=e.length,r=parseInt(e.substr(1),16);7===n?t=[(16711680&r)>>16,(65280&r)>>8,255&r,1]:4===n&&(t=[(3840&r)>>4|(3840&r)>>8,(240&r)>>4|240&r,(15&r)<<4|15&r,1])}if(!t)for(r=o.parsers.length;r--&&!t;){var i=o.parsers[r];(n=i.regex.exec(e))&&(t=i.parse(n))}}t&&(this.rgba=t)},o.prototype.get=function(n){var e=this.input,t=this.rgba;if("object"==typeof e&&void 0!==this.stops){var r=a(e);return r.stops=[].slice.call(r.stops),this.stops.forEach(function(e,t){r.stops[t]=[r.stops[t][0],e.get(n)]}),r}return t&&i(t[0])?"rgb"===n||!n&&1===t[3]?"rgb("+t[0]+","+t[1]+","+t[2]+")":"a"===n?""+t[3]:"rgba("+t.join(",")+")":e},o.prototype.brighten=function(t){var e=this.rgba;if(this.stops)this.stops.forEach(function(e){e.brighten(t)});else if(i(t)&&0!==t)for(var n=0;3>n;n++)e[n]+=r(255*t),0>e[n]&&(e[n]=0),255<e[n]&&(e[n]=255);return _____WB$wombat$check$this$function_____(this)},o.prototype.setOpacity=function(e){return this.rgba[3]=e,_____WB$wombat$check$this$function_____(this)},o.prototype.tweenTo=function(e,t){var n=this.rgba,r=e.rgba;return i(n[0])&&i(r[0])?((e=1!==r[3]||1!==n[3])?"rgba(":"rgb(")+Math.round(r[0]+(n[0]-r[0])*(1-t))+","+Math.round(r[1]+(n[1]-r[1])*(1-t))+","+Math.round(r[2]+(n[2]-r[2])*(1-t))+(e?","+(r[3]+(n[3]-r[3])*(1-t)):"")+")":e.input||"none"},o.names={white:"#ffffff",black:"#000000"},o.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(e){return[r(e[1]),r(e[2]),r(e[3]),parseFloat(e[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(e){return[r(e[1]),r(e[2]),r(e[3]),1]}}],o.None=new o(""),o}()}),e(t,"Core/Color/Palettes.js",[],function(){return{colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ")}}),e(t,"Core/Time.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(h,e){var i=h.win,f=e.defined,o=e.error,m=e.extend,t=e.isObject,n=e.merge,v=e.objectEach,g=e.pad,y=e.pick,r=e.splat,b=e.timeUnits,a=h.isSafari&&i.Intl&&i.Intl.DateTimeFormat.prototype.formatRange,u=h.isSafari&&i.Intl&&!i.Intl.DateTimeFormat.prototype.formatRange;return e=function(){function e(e){this.options={},this.variableTimezone=this.useUTC=!1,this.Date=i.Date,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.update(e)}return e.prototype.get=function(e,t){if(this.variableTimezone||this.timezoneOffset){var n=t.getTime(),r=n-this.getTimezoneOffset(t);return t.setTime(r),e=t["getUTC"+e](),t.setTime(n),e}return this.useUTC?t["getUTC"+e]():t["get"+e]()},e.prototype.set=function(e,t,n){if(this.variableTimezone||this.timezoneOffset){if("Milliseconds"===e||"Seconds"===e||"Minutes"===e&&0==this.getTimezoneOffset(t)%36e5)return t["setUTC"+e](n);var r=this.getTimezoneOffset(t);return r=t.getTime()-r,t.setTime(r),t["setUTC"+e](n),e=this.getTimezoneOffset(t),r=t.getTime()+e,t.setTime(r)}return this.useUTC||a&&"FullYear"===e?t["setUTC"+e](n):t["set"+e](n)},e.prototype.update=function(e){var t=y(e&&e.useUTC,!0);this.options=e=n(!0,this.options||{},e),this.Date=e.Date||i.Date||Date,this.timezoneOffset=(this.useUTC=t)&&e.timezoneOffset,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.variableTimezone=t&&!(!e.getTimezoneOffset&&!e.timezone)},e.prototype.makeTime=function(e,t,n,r,i,o){if(this.useUTC){var a=this.Date.UTC.apply(0,arguments),s=this.getTimezoneOffset(a);a+=s;var l=this.getTimezoneOffset(a);s!==l?a+=l-s:s-36e5!==this.getTimezoneOffset(a-36e5)||u||(a-=36e5)}else a=new this.Date(e,t,y(n,1),y(r,0),y(i,0),y(o,0)).getTime();return a},e.prototype.timezoneOffsetFunction=function(){var e=_____WB$wombat$check$this$function_____(this),t=this.options,n=t.getTimezoneOffset,r=t.moment||i.moment;if(!this.useUTC)return function(e){return 6e4*new Date(e.toString()).getTimezoneOffset()};if(t.timezone){if(r)return function(e){return 6e4*-r.tz(e,t.timezone).utcOffset()};o(25)}return this.useUTC&&n?function(e){return 6e4*n(e.valueOf())}:function(){return 6e4*(e.timezoneOffset||0)}},e.prototype.dateFormat=function(n,r,c){if(!f(r)||isNaN(r))return h.defaultOptions.lang&&h.defaultOptions.lang.invalidDate||"";n=y(n,"%Y-%m-%d %H:%M:%S");var p=_____WB$wombat$check$this$function_____(this),e=new this.Date(r),t=this.get("Hours",e),i=this.get("Day",e),o=this.get("Date",e),a=this.get("Month",e),s=this.get("FullYear",e),l=h.defaultOptions.lang,u=l&&l.weekdays,d=l&&l.shortWeekdays;return e=m({a:d?d[i]:u[i].substr(0,3),A:u[i],d:g(o),e:g(o,2," "),w:i,b:l.shortMonths[a],B:l.months[a],m:g(a+1),o:a+1,y:s.toString().substr(2,2),Y:s,H:g(t),k:t,I:g(t%12||12),l:t%12||12,M:g(this.get("Minutes",e)),p:12>t?"AM":"PM",P:12>t?"am":"pm",S:g(e.getSeconds()),L:g(Math.floor(r%1e3),3)},h.dateFormats),v(e,function(e,t){for(;-1!==n.indexOf("%"+t);)n=n.replace("%"+t,"function"==typeof e?e.call(p,r):e)}),c?n.substr(0,1).toUpperCase()+n.substr(1):n},e.prototype.resolveDTLFormat=function(e){return t(e,!0)?e:{main:(e=r(e))[0],from:e[1],to:e[2]}},e.prototype.getTimeTicks=function(e,t,n,r){var c,i=_____WB$wombat$check$this$function_____(this),o=[],p={},a=new i.Date(t),s=e.unitRange,l=e.count||1;if(r=y(r,1),f(t)){if(i.set("Milliseconds",a,s>=b.second?0:l*Math.floor(i.get("Milliseconds",a)/l)),s>=b.second&&i.set("Seconds",a,s>=b.minute?0:l*Math.floor(i.get("Seconds",a)/l)),s>=b.minute&&i.set("Minutes",a,s>=b.hour?0:l*Math.floor(i.get("Minutes",a)/l)),s>=b.hour&&i.set("Hours",a,s>=b.day?0:l*Math.floor(i.get("Hours",a)/l)),s>=b.day&&i.set("Date",a,s>=b.month?1:Math.max(1,l*Math.floor(i.get("Date",a)/l))),s>=b.month){i.set("Month",a,s>=b.year?0:l*Math.floor(i.get("Month",a)/l));var u=i.get("FullYear",a)}s>=b.year&&i.set("FullYear",a,u-u%l),s===b.week&&(u=i.get("Day",a),i.set("Date",a,i.get("Date",a)-u+r+(u<r?-7:0))),u=i.get("FullYear",a),r=i.get("Month",a);var d=i.get("Date",a),h=i.get("Hours",a);for(t=a.getTime(),!i.variableTimezone&&i.useUTC||!f(n)||(c=n-t>4*b.month||i.getTimezoneOffset(t)!==i.getTimezoneOffset(n)),t=a.getTime(),a=1;t<n;)o.push(t),t=s===b.year?i.makeTime(u+a*l,0):s===b.month?i.makeTime(u,r+a*l):!c||s!==b.day&&s!==b.week?c&&s===b.hour&&1<l?i.makeTime(u,r,d,h+a*l):t+s*l:i.makeTime(u,r,d+a*l*(s===b.day?1:7)),a++;o.push(t),s<=b.hour&&1e4>o.length&&o.forEach(function(e){0==e%18e5&&"000000000"===i.dateFormat("%H%M%S%L",e)&&(p[e]="day")})}return o.info=m(e,{higherRanks:p,totalRange:s*l}),o},e.prototype.getDateFormat=function(e,t,n,r){var i=this.dateFormat("%m-%d %H:%M:%S.%L",t),o={millisecond:15,second:12,minute:9,hour:6,day:3},a="millisecond";for(s in b){if(e===b.week&&+this.dateFormat("%w",t)===n&&"00:00:00.000"===i.substr(6)){var s="week";break}if(b[s]>e){s=a;break}if(o[s]&&i.substr(o[s])!=="01-01 00:00:00.000".substr(o[s]))break;"week"!==s&&(a=s)}if(s)var l=this.resolveDTLFormat(r[s]).main;return l},e}(),e}),e(t,"Core/DefaultOptions.js",[t["Core/Chart/ChartDefaults.js"],t["Core/Color/Color.js"],t["Core/Globals.js"],t["Core/Color/Palettes.js"],t["Core/Time.js"],t["Core/Utilities.js"]],function(e,t,n,r,i,o){t=t.parse;var a=o.merge,s={colors:r.colors,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:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},chart:e,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,className:"highcharts-no-tooltip",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:n.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:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:!1,snap:n.isTouchDevice?25:10,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:t("#f7f7f7").setOpacity(.85).get(),borderWidth:1,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"12px",whiteSpace:"nowrap"},useHTML:!1},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"}};s.chart.styledMode=!1;var l=new i(a(s.global,s.time));return e={defaultOptions:s,defaultTime:l,getOptions:function(){return s},setOptions:function(e){return a(!0,s,e),(e.time||e.global)&&(n.time?n.time.update(a(s.global,s.time,e.global,e.time)):n.time=l),s}}}),e(t,"Core/Animation/Fx.js",[t["Core/Color/Color.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,t,n){var r=e.parse,u=t.win,d=n.isNumber,c=n.objectEach;return function(){function l(e,t,n){this.pos=NaN,this.options=t,this.elem=e,this.prop=n}return l.prototype.dSetter=function(){var e=this.paths,t=e&&e[0];e=e&&e[1];var n=this.now||0,r=[];if(1!==n&&t&&e)if(t.length===e.length&&1>n)for(var i=0;i<e.length;i++){for(var c=t[i],o=e[i],a=[],s=0;s<o.length;s++){var l=c[s],u=o[s];d(l)&&d(u)&&("A"!==o[0]||4!==s&&5!==s)?a[s]=l+n*(u-l):a[s]=u}r.push(a)}else r=e;else r=this.toD||[];this.elem.attr("d",r,void 0,!0)},l.prototype.update=function(){var e=this.elem,t=this.prop,n=this.now,r=this.options.step;this[t+"Setter"]?this[t+"Setter"]():e.attr?e.element&&e.attr(t,n,null,!0):e.style[t]=n+this.unit,r&&r.call(e,n,_____WB$wombat$check$this$function_____(this))},l.prototype.run=function(e,t,n){var r=_____WB$wombat$check$this$function_____(this),i=r.options,o=function(e){return!o.stopped&&r.step(e)},a=u.requestAnimationFrame||function(e){setTimeout(e,13)},s=function(){for(var e=0;e<l.timers.length;e++)l.timers[e]()||l.timers.splice(e--,1);l.timers.length&&a(s)};e!==t||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=e,this.end=t,this.unit=n,this.now=this.start,this.pos=0,o.elem=this.elem,o.prop=this.prop,o()&&1===l.timers.push(o)&&a(s)):(delete i.curAnim[this.prop],i.complete&&0===Object.keys(i.curAnim).length&&i.complete.call(this.elem))},l.prototype.step=function(e){var t=+new Date,n=this.options,r=this.elem,i=n.complete,o=n.duration,a=n.curAnim;if(r.attr&&!r.element)e=!1;else if(e||t>=o+this.startTime){this.now=this.end,this.pos=1,this.update();var s=a[this.prop]=!0;c(a,function(e){!0!==e&&(s=!1)}),s&&i&&i.call(r),e=!1}else this.pos=n.easing((t-this.startTime)/o),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0;return e},l.prototype.initPath=function(e,t,n){function r(e,t){for(;e.length<u;){var n=e[0],r=t[u-e.length];r&&"M"===n[0]&&(e[0]="C"===r[0]?["C",n[1],n[2],n[1],n[2],n[1],n[2]]:["L",n[1],n[2]]),e.unshift(n),a&&(n=e.pop(),e.push(e[e.length-1],n))}}function c(e,t){for(;e.length<u;)if("C"===(t=e[Math.floor(e.length/s)-1].slice())[0]&&(t[1]=t[5],t[2]=t[6]),a){var n=e[Math.floor(e.length/s)].slice();e.splice(e.length/2,0,t,n)}else e.push(t)}var i=e.startX,o=e.endX;n=n.slice();var a=e.isArea,s=a?2:1;if(!(t=t&&t.slice()))return[n,n];if(i&&o&&o.length){for(e=0;e<i.length;e++){if(i[e]===o[0]){var l=e;break}if(i[0]===o[o.length-i.length+e]){l=e;var p=!0;break}if(i[i.length-1]===o[o.length-i.length+e]){l=i.length-e;break}}void 0===l&&(t=[])}if(t.length&&d(l)){var u=n.length+l*s;p?(r(t,n),c(n,t)):(r(n,t),c(t,n))}return[t,n]},l.prototype.fillSetter=function(){l.prototype.strokeSetter.apply(this,arguments)},l.prototype.strokeSetter=function(){this.elem.attr(this.prop,r(this.start).tweenTo(r(this.end),this.pos),void 0,!0)},l.timers=[],l}()}),e(t,"Core/Animation/AnimationUtilities.js",[t["Core/Animation/Fx.js"],t["Core/Utilities.js"]],function(u,e){function a(e){return h(e)?f({duration:500,defer:0},e):{duration:e?500:0,defer:0}}function c(e,t){for(var n=u.timers.length;n--;)u.timers[n].elem!==e||t&&t!==u.timers[n].prop||(u.timers[n].stopped=!0)}var s=e.defined,p=e.getStyle,d=e.isArray,t=e.isNumber,h=e.isObject,f=e.merge,m=e.objectEach,n=e.pick;return{animate:function(n,r,i){var o,a,s,l="";if(!h(i)){var e=arguments;i={duration:e[2],easing:e[3],complete:e[4]}}t(i.duration)||(i.duration=400),i.easing="function"==typeof i.easing?i.easing:Math[i.easing]||Math.easeInOutSine,i.curAnim=f(r),m(r,function(e,t){c(n,t),s=new u(n,i,t),a=void 0,"d"===t&&d(r.d)?(s.paths=s.initPath(n,n.pathArray,r.d),s.toD=r.d,o=0,a=1):n.attr?o=n.attr(t):(o=parseFloat(p(n,t))||0,"opacity"!==t&&(l="px")),a||(a=e),"string"==typeof a&&a.match("px")&&(a=a.replace(/px/g,"")),s.run(o,a,l)})},animObject:a,getDeferredAnimation:function(e,t,n){var r=a(t),i=0,o=0;return(n?[n]:e.series).forEach(function(e){e=a(e.options.animation),i=t&&s(t.defer)?r.defer:Math.max(i,e.duration+e.defer),o=Math.min(r.duration,e.duration)}),e.renderer.forExport&&(i=0),{defer:Math.max(0,i-o),duration:Math.min(i,o)}},setAnimation:function(e,t){t.renderer.globalAnimation=n(e,t.options.chart.animation,!0)},stop:c}}),e(t,"Core/Renderer/HTML/AST.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(u,e){var c=u.SVG_NS,p=e.attr,o=e.createElement,d=e.error,t=e.isFunction,a=e.isString,h=e.objectEach,f=e.splat,r=(e=u.win.trustedTypes)&&t(e.createPolicy)&&e.createPolicy("highcharts",{createHTML:function(e){return e}}),n=r?r.createHTML(""):"";try{var i=!!(new DOMParser).parseFromString(n,"text/html")}catch(u){i=!1}return t=function(){function l(e){this.nodes="string"==typeof e?this.parseMarkup(e):e}return l.filterUserAttributes=function(r){return h(r,function(t,e){var n=!0;-1===l.allowedAttributes.indexOf(e)&&(n=!1),-1!==["background","dynsrc","href","lowsrc","src"].indexOf(e)&&(n=a(t)&&l.allowedReferences.some(function(e){return 0===t.indexOf(e)})),n||(d("Highcharts warning: Invalid attribute '"+e+"' in config"),delete r[e])}),r},l.setElementHTML=function(e,t){e.innerHTML=l.emptyHTML,t&&new l(t).addToDOM(e)},l.prototype.addToDOM=function(e){return function o(e,a){var s;return f(e).forEach(function(e){var t=e.tagName,n=e.textContent?u.doc.createTextNode(e.textContent):void 0;if(t)if("#text"===t)var r=n;else if(-1!==l.allowedTags.indexOf(t)){t=u.doc.createElementNS("svg"===t?c:a.namespaceURI||c,t);var i=e.attributes||{};h(e,function(e,t){"tagName"!==t&&"attributes"!==t&&"children"!==t&&"textContent"!==t&&(i[t]=e)}),p(t,l.filterUserAttributes(i)),n&&t.appendChild(n),o(e.children||[],t),r=t}else d("Highcharts warning: Invalid tagName "+t+" in config");r&&a.appendChild(r),s=r}),s}(this.nodes,e)},l.prototype.parseMarkup=function(e){var t=[];if(e=e.trim(),i)e=(new DOMParser).parseFromString(r?r.createHTML(e):e,"text/html");else{var n=o("div");n.innerHTML=e,e={body:n}}var a=function(e,t){var n=e.nodeName.toLowerCase(),r={tagName:n};if("#text"===n&&(r.textContent=e.textContent||""),n=e.attributes){var i={};[].forEach.call(n,function(e){i[e.name]=e.value}),r.attributes=i}if(e.childNodes.length){var o=[];[].forEach.call(e.childNodes,function(e){a(e,o)}),o.length&&(r.children=o)}t.push(r)};return[].forEach.call(e.body.childNodes,function(e){return a(e,t)}),t},l.allowedAttributes="aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align textAnchor textLength title type valign width x x1 x2 y y1 y2 zIndex".split(" "),l.allowedReferences="https:// http:// mailto: / ../ ./ #".split(" "),l.allowedTags="a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" "),l.emptyHTML=n,l}()}),e(t,"Core/FormatUtilities.js",[t["Core/DefaultOptions.js"],t["Core/Utilities.js"]],function(e,t){function h(e,t,n,r){e=+e||0,t=+t;var i=f.lang,o=(e.toString().split(".")[1]||"").split("e")[0].length,a=e.toString().split("e"),s=t;if(-1===t)t=Math.min(o,20);else if(c(t)){if(t&&a[1]&&0>a[1]){var l=t+ +a[1];0<=l?(a[0]=(+a[0]).toExponential(l).split("e")[0],t=l):(a[0]=a[0].split(".")[0]||0,e=20>t?(a[0]*Math.pow(10,a[1])).toFixed(t):0,a[1]=0)}}else t=2;l=(Math.abs(a[1]?a[0]:e)+Math.pow(10,-Math.max(t,o)-1)).toFixed(t);var u=3<(o=String(d(l))).length?o.length%3:0;return n=p(n,i.decimalPoint),r=p(r,i.thousandsSep),e=(0>e?"-":"")+(u?o.substr(0,u)+r:""),e=0>+a[1]&&!s?"0":e+o.substr(u).replace(/(\d{3})(?=\d)/g,"$1"+r),t&&(e+=n+l.slice(-t)),a[1]&&0!=+e&&(e+="e"+a[1]),e}var f=e.defaultOptions,m=e.defaultTime,g=t.getNestedProperty,c=t.isNumber,p=t.pick,d=t.pInt;return{dateFormat:function(e,t,n){return m.dateFormat(e,t,n)},format:function(e,t,n){var r="{",i=!1,o=/f$/,c=/\.([0-9])/,a=f.lang,p=n&&n.time||m;n=n&&n.numberFormatter||h;for(var s=[];e;){var l=e.indexOf(r);if(-1===l)break;var u=e.slice(0,l);if(i){if(u=u.split(":"),r=g(u.shift()||"",t),u.length&&"number"==typeof r)if(u=u.join(":"),o.test(u)){var d=parseInt((u.match(c)||["","-1"])[1],10);null!==r&&(r=n(r,d,a.decimalPoint,-1<u.indexOf(",")?a.thousandsSep:""))}else r=p.dateFormat(u,r);s.push(r)}else s.push(u);e=e.slice(l+1),r=(i=!i)?"}":"{"}return s.push(e),s.join("")},numberFormat:h}}),e(t,"Core/Renderer/RendererUtilities.js",[t["Core/Utilities.js"]],function(e){var t,d=e.clamp,h=e.pick,f=e.stableSort;return(t||(t={})).distribute=function c(e,n,r){var i,o=e,t=o.reducedLen||n,a=function(e,t){return(t.rank||0)-(e.rank||0)},s=function(e,t){return e.target-t.target},l=!0,p=[],u=0;for(i=e.length;i--;)u+=e[i].size;if(u>t){for(f(e,a),u=i=0;u<=t;)u+=e[i].size,i++;p=e.splice(i-1,e.length)}for(f(e,s),e=e.map(function(e){return{size:e.size,targets:[e.target],align:h(e.align,.5)}});l;){for(i=e.length;i--;)t=e[i],a=(Math.min.apply(0,t.targets)+Math.max.apply(0,t.targets))/2,t.pos=d(a-t.size*t.align,0,n-t.size);for(i=e.length,l=!1;i--;)0<i&&e[i-1].pos+e[i-1].size>e[i].pos&&(e[i-1].size+=e[i].size,e[i-1].targets=e[i-1].targets.concat(e[i].targets),e[i-1].align=.5,e[i-1].pos+e[i-1].size>n&&(e[i-1].pos=n-e[i-1].size),e.splice(i,1),l=!0)}return o.push.apply(o,p),i=0,e.some(function(e){var t=0;return(e.targets||[]).some(function(){return o[i].pos=e.pos+t,void 0!==r&&Math.abs(o[i].pos-o[i].target)>r?(o.slice(0,i+1).forEach(function(e){return delete e.pos}),o.reducedLen=(o.reducedLen||n)-.1*n,o.reducedLen>.1*n&&c(o,n,r),!0):(t+=o[i].size,i++,!1)})}),f(o,s),o},t}),e(t,"Core/Renderer/SVG/SVGElement.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/Renderer/HTML/AST.js"],t["Core/Color/Color.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,p,v,o,t){var l=e.animate,u=e.animObject,d=e.stop,g=o.deg2rad,a=o.doc,w=o.noop,E=o.svg,s=o.SVG_NS,S=o.win,r=t.addEvent,f=t.attr,n=t.createElement,T=t.css,y=t.defined,x=t.erase,_=t.extend,C=t.fireEvent,A=t.isArray,k=t.isFunction,M=t.isNumber,O=t.isString,D=t.merge,b=t.objectEach,m=t.pick,c=t.pInt,L=t.syncTimeout,I=t.uniqueKey;return e=function(){function h(){this.element=void 0,this.onEvents={},this.opacity=1,this.renderer=void 0,this.SVG_NS=s,this.symbolCustomAttribs="x y width height r start end innerR anchorX anchorY rounded".split(" ")}return h.prototype._defaultGetter=function(e){return e=m(this[e+"Value"],_____WB$wombat$check$this$function_____(this)[e],this.element?this.element.getAttribute(e):null,0),/^[\-0-9\.]+$/.test(e)&&(e=parseFloat(e)),e},h.prototype._defaultSetter=function(e,t,n){n.setAttribute(t,e)},h.prototype.add=function(e){var t=this.renderer,n=this.element;if(e&&(this.parentGroup=e),this.parentInverted=e&&e.inverted,void 0!==this.textStr&&"text"===this.element.nodeName&&t.buildText(this),this.added=!0,!e||e.handleZ||this.zIndex)var r=this.zIndexSetter();return r||(e?e.element:t.box).appendChild(n),this.onAdd&&this.onAdd(),_____WB$wombat$check$this$function_____(this)},h.prototype.addClass=function(e,t){var n=t?"":this.attr("class")||"";return(e=(e||"").split(/ /g).reduce(function(e,t){return-1===n.indexOf(t)&&e.push(t),e},n?[n]:[]).join(" "))!==n&&this.attr("class",e),_____WB$wombat$check$this$function_____(this)},h.prototype.afterSetters=function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},h.prototype.align=function(e,t,n){var r,i,o,a={},s=this.renderer,l=s.alignedObjects;e?(this.alignOptions=e,this.alignByTranslate=t,(!n||O(n))&&(this.alignTo=r=n||"renderer",x(l,_____WB$wombat$check$this$function_____(this)),l.push(this),n=void 0)):(e=this.alignOptions,t=this.alignByTranslate,r=this.alignTo),n=m(n,s[r],"scrollablePlotBox"===r?s.plotBox:void 0,s),r=e.align;var u=e.verticalAlign;return s=(n.x||0)+(e.x||0),l=(n.y||0)+(e.y||0),"right"===r?i=1:"center"===r&&(i=2),i&&(s+=(n.width-(e.width||0))/i),a[t?"translateX":"x"]=Math.round(s),"bottom"===u?o=1:"middle"===u&&(o=2),o&&(l+=(n.height-(e.height||0))/o),a[t?"translateY":"y"]=Math.round(l),_____WB$wombat$check$this$function_____(this)[this.placed?"animate":"attr"](a),this.placed=!0,this.alignAttr=a,_____WB$wombat$check$this$function_____(this)},h.prototype.alignSetter=function(e){var t={left:"start",center:"middle",right:"end"};t[e]&&(this.alignValue=e,this.element.setAttribute("text-anchor",t[e]))},h.prototype.animate=function(e,t,n){var r=_____WB$wombat$check$this$function_____(this),i=u(m(t,this.renderer.globalAnimation,!0));return t=i.defer,m(a.hidden,a.msHidden,a.webkitHidden,!1)&&(i.duration=0),0!==i.duration?(n&&(i.complete=n),L(function(){r.element&&l(r,e,i)},t)):(this.attr(e,void 0,n),b(e,function(e,t){i.step&&i.step.call(this,e,{prop:t,pos:1,elem:this})},_____WB$wombat$check$this$function_____(this))),_____WB$wombat$check$this$function_____(this)},h.prototype.applyTextOutline=function(e){var n=this.element;-1!==e.indexOf("contrast")&&(e=e.replace(/contrast/g,this.renderer.getContrast(n.style.fill)));var t=e.split(" ");if(e=t[t.length-1],(t=t[0])&&"none"!==t&&o.svg){this.fakeTS=!0,this.ySetter=this.xSetter,t=t.replace(/(^[\d\.]+)(.*?)$/g,function(e,t,n){return 2*Number(t)+n}),this.removeTextOutline();var r=a.createElementNS(s,"tspan");f(r,{class:"highcharts-text-outline",fill:e,stroke:e,"stroke-width":t,"stroke-linejoin":"round"}),[].forEach.call(n.childNodes,function(e){var t=e.cloneNode(!0);t.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach(function(e){return t.removeAttribute(e)}),r.appendChild(t)});var i=a.createElementNS(s,"tspan");i.textContent="\u200b",["x","y"].forEach(function(e){var t=n.getAttribute(e);t&&i.setAttribute(e,t)}),r.appendChild(i),n.insertBefore(r,n.firstChild)}},h.prototype.attr=function(n,e,t,r){var i,o,a,s=this.element,l=this.symbolCustomAttribs,u=_____WB$wombat$check$this$function_____(this);if("string"==typeof n&&void 0!==e){var c=n;(n={})[c]=e}return"string"==typeof n?u=(this[n+"Getter"]||this._defaultGetter).call(this,n,s):(b(n,function(e,t){o=!1,r||d(this,t),this.symbolName&&-1!==l.indexOf(t)&&(i||(this.symbolAttr(n),i=!0),o=!0),!this.rotation||"x"!==t&&"y"!==t||(this.doTransform=!0),o||((a=_____WB$wombat$check$this$function_____(this)[t+"Setter"]||this._defaultSetter).call(this,e,t,s),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(t)&&this.updateShadows(t,e,a))},_____WB$wombat$check$this$function_____(this)),this.afterSetters()),t&&t.call(this),u},h.prototype.clip=function(e){return this.attr("clip-path",e?"url("+this.renderer.url+"#"+e.id+")":"none")},h.prototype.crisp=function(e,t){t=t||e.strokeWidth||0;var n=Math.round(t)%2/2;return e.x=Math.floor(e.x||this.x||0)+n,e.y=Math.floor(e.y||this.y||0)+n,e.width=Math.floor((e.width||this.width||0)-2*n),e.height=Math.floor((e.height||this.height||0)-2*n),y(e.strokeWidth)&&(e.strokeWidth=t),e},h.prototype.complexColor=function(e,p,n){var r,i,o,a,s,l,d,h,f,m,g,u=this.renderer,c=[];C(this.renderer,"complexColor",{args:arguments},function(){if(e.radialGradient?i="radialGradient":e.linearGradient&&(i="linearGradient"),i){if(o=e[i],s=u.gradients,l=e.stops,f=n.radialReference,A(o)&&(e[i]=o={x1:o[0],y1:o[1],x2:o[2],y2:o[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===i&&f&&!y(o.gradientUnits)&&(a=o,o=D(o,u.getRadialAttr(f,a),{gradientUnits:"userSpaceOnUse"})),b(o,function(e,t){"id"!==t&&c.push(t,e)}),b(l,function(e){c.push(e)}),c=c.join(","),s[c])m=s[c].attr("id");else{o.id=m=I();var t=s[c]=u.createElement(i).attr(o).add(u.defs);t.radAttr=a,t.stops=[],l.forEach(function(e){0===e[1].indexOf("rgba")?(r=v.parse(e[1]),d=r.get("rgb"),h=r.get("a")):(d=e[1],h=1),e=u.createElement("stop").attr({offset:e[0],"stop-color":d,"stop-opacity":h}).add(t),t.stops.push(e)})}g="url("+u.url+"#"+m+")",n.setAttribute(p,g),n.gradient=c,e.toString=function(){return g}}})},h.prototype.css=function(e){var n=this.styles,r={},t=this.element,i=["textOutline","textOverflow","width"],o="",a=!n;if(e&&e.color&&(e.fill=e.color),n&&b(e,function(e,t){n&&n[t]!==e&&(r[t]=e,a=!0)}),a){if(n&&(e=_(n,r)),e)if(null===e.width||"auto"===e.width)delete this.textWidth;else if("text"===t.nodeName.toLowerCase()&&e.width)var s=this.textWidth=c(e.width);if(this.styles=e,s&&!E&&this.renderer.forExport&&delete e.width,t.namespaceURI===this.SVG_NS){var l=function(e,t){return"-"+t.toLowerCase()};b(e,function(e,t){-1===i.indexOf(t)&&(o+=t.replace(/([A-Z])/g,l)+":"+e+";")}),o&&f(t,"style",o)}else T(t,e);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),e&&e.textOutline&&this.applyTextOutline(e.textOutline))}return _____WB$wombat$check$this$function_____(this)},h.prototype.dashstyleSetter=function(e){var t=_____WB$wombat$check$this$function_____(this)["stroke-width"];if("inherit"===t&&(t=1),e=e&&e.toLowerCase()){var n=e.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(",");for(e=n.length;e--;)n[e]=""+c(n[e])*m(t,NaN);e=n.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",e)}},h.prototype.destroy=function(){var n=_____WB$wombat$check$this$function_____(this),e=n.element||{},t=n.renderer,r=e.ownerSVGElement,i=t.isSVG&&"SPAN"===e.nodeName&&n.parentGroup||void 0;if(e.onclick=e.onmouseout=e.onmouseover=e.onmousemove=e.point=null,d(n),n.clipPath&&r){var o=n.clipPath;[].forEach.call(r.querySelectorAll("[clip-path],[CLIP-PATH]"),function(e){-1<e.getAttribute("clip-path").indexOf(o.element.id)&&e.removeAttribute("clip-path")}),n.clipPath=o.destroy()}if(n.stops){for(r=0;r<n.stops.length;r++)n.stops[r].destroy();n.stops.length=0,n.stops=void 0}for(n.safeRemoveChild(e),t.styledMode||n.destroyShadows();i&&i.div&&0===i.div.childNodes.length;)e=i.parentGroup,n.safeRemoveChild(i.div),delete i.div,i=e;n.alignTo&&x(t.alignedObjects,n),b(n,function(e,t){n[t]&&n[t].parentGroup===n&&n[t].destroy&&n[t].destroy(),delete n[t]})},h.prototype.destroyShadows=function(){(this.shadows||[]).forEach(function(e){this.safeRemoveChild(e)},_____WB$wombat$check$this$function_____(this)),this.shadows=void 0},h.prototype.destroyTextPath=function(e,t){var n=e.getElementsByTagName("text")[0];if(n){if(n.removeAttribute("dx"),n.removeAttribute("dy"),t.element.setAttribute("id",""),this.textPathWrapper&&n.getElementsByTagName("textPath").length){for(e=this.textPathWrapper.element.childNodes;e.length;)n.appendChild(e[0]);n.removeChild(this.textPathWrapper.element)}}else(e.getAttribute("dx")||e.getAttribute("dy"))&&(e.removeAttribute("dx"),e.removeAttribute("dy"));this.textPathWrapper&&(this.textPathWrapper=this.textPathWrapper.destroy())},h.prototype.dSetter=function(e,t,n){A(e)&&("string"==typeof e[0]&&(e=this.renderer.pathToSegments(e)),this.pathArray=e,e=e.reduce(function(e,t,n){return t&&t.join?(n?e+" ":"")+t.join(" "):(t||"").toString()},"")),/(NaN| {2}|^$)/.test(e)&&(e="M 0 0"),_____WB$wombat$check$this$function_____(this)[t]!==e&&(n.setAttribute(t,e),_____WB$wombat$check$this$function_____(this)[t]=e)},h.prototype.fadeOut=function(e){var t=_____WB$wombat$check$this$function_____(this);t.animate({opacity:0},{duration:m(e,150),complete:function(){t.attr({y:-9999}).hide()}})},h.prototype.fillSetter=function(e,t,n){"string"==typeof e?n.setAttribute(t,e):e&&this.complexColor(e,t,n)},h.prototype.getBBox=function(e,t){var n=this.renderer,r=this.element,i=this.styles,c=this.textStr,o=n.cache,p=n.cacheKeys,a=r.namespaceURI===this.SVG_NS;t=m(t,this.rotation,0);var s,d=n.styledMode?r&&h.prototype.getStyle.call(r,"font-size"):i&&i.fontSize;if(y(c)){var l=c.toString();-1===l.indexOf("<")&&(l=l.replace(/[0-9]/g,"0")),l+=["",t,d,this.textWidth,i&&i.textOverflow,i&&i.fontWeight].join()}if(l&&!e&&(s=o[l]),!s){if(a||n.forExport){try{var u=this.fakeTS&&function(e){var t=r.querySelector(".highcharts-text-outline");t&&T(t,{display:e})};k(u)&&u("none"),s=r.getBBox?_({},r.getBBox()):{width:r.offsetWidth,height:r.offsetHeight},k(u)&&u("")}catch(e){}(!s||0>s.width)&&(s={width:0,height:0})}else s=this.htmlGetBBox();if(n.isSVG&&(e=s.width,n=s.height,a&&(s.height=n={"11px,17":14,"13px,20":16}[(d||"")+","+Math.round(n)]||n),t&&(a=t*g,s.width=Math.abs(n*Math.sin(a))+Math.abs(e*Math.cos(a)),s.height=Math.abs(n*Math.cos(a))+Math.abs(e*Math.sin(a)))),l&&(""===c||0<s.height)){for(;250<p.length;)delete o[p.shift()];o[l]||p.push(l),o[l]=s}}return s},h.prototype.getStyle=function(e){return S.getComputedStyle(this.element||_____WB$wombat$check$this$function_____(this),"").getPropertyValue(e)},h.prototype.hasClass=function(e){return-1!==(""+this.attr("class")).split(" ").indexOf(e)},h.prototype.hide=function(e){return e?this.attr({y:-9999}):this.attr({visibility:"hidden"}),_____WB$wombat$check$this$function_____(this)},h.prototype.htmlGetBBox=function(){return{height:0,width:0,x:0,y:0}},h.prototype.init=function(e,t){this.element="span"===t?n(t):a.createElementNS(this.SVG_NS,t),this.renderer=e,C(this,"afterInit")},h.prototype.invert=function(e){return this.inverted=e,this.updateTransform(),_____WB$wombat$check$this$function_____(this)},h.prototype.on=function(e,t){var n=this.onEvents;return n[e]&&n[e](),n[e]=r(this.element,e,t),_____WB$wombat$check$this$function_____(this)},h.prototype.opacitySetter=function(e,t,n){this.opacity=e=Number(Number(e).toFixed(3)),n.setAttribute(t,e)},h.prototype.removeClass=function(e){return this.attr("class",(""+this.attr("class")).replace(O(e)?new RegExp("(^| )"+e+"( |$)"):e," ").replace(/ +/g," ").trim())},h.prototype.removeTextOutline=function(){var e=this.element.querySelector("tspan.highcharts-text-outline");e&&this.safeRemoveChild(e)},h.prototype.safeRemoveChild=function(e){var t=e.parentNode;t&&t.removeChild(e)},h.prototype.setRadialReference=function(e){var t=this.element.gradient&&this.renderer.gradients[this.element.gradient];return this.element.radialReference=e,t&&t.radAttr&&t.animate(this.renderer.getRadialAttr(e,t.radAttr)),_____WB$wombat$check$this$function_____(this)},h.prototype.setTextPath=function(e,t){var n=this.element,r=this.text?this.text.element:n,c={textAnchor:"text-anchor"},i=!1,o=this.textPathWrapper,a=!o;t=D(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},t);var s=p.filterUserAttributes(t.attributes);if(e&&t&&t.enabled){o&&null===o.element.parentNode?(a=!0,o=o.destroy()):o&&this.removeTextOutline.call(o.parentGroup),this.options&&this.options.padding&&(s.dx=-this.options.padding),o||(this.textPathWrapper=o=this.renderer.createElement("textPath"),i=!0);var l=o.element;if((t=e.element.getAttribute("id"))||e.element.setAttribute("id",t=I()),a)for(r.setAttribute("y",0),M(s.dx)&&r.setAttribute("x",-s.dx),e=[].slice.call(r.childNodes),a=0;a<e.length;a++){var u=e[a];u.nodeType!==S.Node.TEXT_NODE&&"tspan"!==u.nodeName||l.appendChild(u)}i&&o&&o.add({element:r}),l.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+t),y(s.dy)&&(l.parentNode.setAttribute("dy",s.dy),delete s.dy),y(s.dx)&&(l.parentNode.setAttribute("dx",s.dx),delete s.dx),b(s,function(e,t){l.setAttribute(c[t]||t,e)}),n.removeAttribute("transform"),this.removeTextOutline.call(o),this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0}),this.applyTextOutline=this.updateTransform=w}else o&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(n,e),this.updateTransform(),this.options&&this.options.rotation&&this.applyTextOutline(this.options.style.textOutline));return _____WB$wombat$check$this$function_____(this)},h.prototype.shadow=function(e,t,c){var n,r=[],i=this.element,o=this.oldShadowOptions,a={color:"#000000",offsetX:this.parentInverted?-1:1,offsetY:this.parentInverted?-1:1,opacity:.15,width:3},s=!1;if(!0===e?n=a:"object"==typeof e&&(n=_(a,e)),n&&(n&&o&&b(n,function(e,t){e!==o[t]&&(s=!0)}),s&&this.destroyShadows(),this.oldShadowOptions=n),n){if(!this.shadows){var p=n.opacity/n.width,d=this.parentInverted?"translate("+n.offsetY+", "+n.offsetX+")":"translate("+n.offsetX+", "+n.offsetY+")";for(a=1;a<=n.width;a++){var l=i.cloneNode(!1),u=2*n.width+1-2*a;f(l,{stroke:e.color||"#000000","stroke-opacity":p*a,"stroke-width":u,transform:d,fill:"none"}),l.setAttribute("class",(l.getAttribute("class")||"")+" highcharts-shadow"),c&&(f(l,"height",Math.max(f(l,"height")-u,0)),l.cutHeight=u),t?t.element.appendChild(l):i.parentNode&&i.parentNode.insertBefore(l,i),r.push(l)}this.shadows=r}}else this.destroyShadows();return _____WB$wombat$check$this$function_____(this)},h.prototype.show=function(e){return this.attr({visibility:e?"inherit":"visible"})},h.prototype.strokeSetter=function(e,t,n){this[t]=e,this.stroke&&_____WB$wombat$check$this$function_____(this)["stroke-width"]?(h.prototype.fillSetter.call(this,this.stroke,"stroke",n),n.setAttribute("stroke-width",_____WB$wombat$check$this$function_____(this)["stroke-width"]),this.hasStroke=!0):"stroke-width"===t&&0===e&&this.hasStroke?(n.removeAttribute("stroke"),this.hasStroke=!1):this.renderer.styledMode&&_____WB$wombat$check$this$function_____(this)["stroke-width"]&&(n.setAttribute("stroke-width",_____WB$wombat$check$this$function_____(this)["stroke-width"]),this.hasStroke=!0)},h.prototype.strokeWidth=function(){if(!this.renderer.styledMode)return _____WB$wombat$check$this$function_____(this)["stroke-width"]||0;var e=this.getStyle("stroke-width"),t=0;if(e.indexOf("px")===e.length-2)t=c(e);else if(""!==e){var n=a.createElementNS(s,"rect");f(n,{width:e,"stroke-width":0}),this.element.parentNode.appendChild(n),t=n.getBBox().width,n.parentNode.removeChild(n)}return t},h.prototype.symbolAttr=function(t){var n=_____WB$wombat$check$this$function_____(this);"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(e){n[e]=m(t[e],n[e])}),n.attr({d:n.renderer.symbols[n.symbolName](n.x,n.y,n.width,n.height,n)})},h.prototype.textSetter=function(e){e!==this.textStr&&(delete this.textPxLength,this.textStr=e,this.added&&this.renderer.buildText(this))},h.prototype.titleSetter=function(e){var t=this.element,n=t.getElementsByTagName("title")[0]||a.createElementNS(this.SVG_NS,"title");t.insertBefore?t.insertBefore(n,t.firstChild):t.appendChild(n),n.textContent=String(m(e,"")).replace(/<[^>]*>/g,"").replace(/&lt;/g,"<").replace(/&gt;/g,">")},h.prototype.toFront=function(){var e=this.element;return e.parentNode.appendChild(e),_____WB$wombat$check$this$function_____(this)},h.prototype.translate=function(e,t){return this.attr({translateX:e,translateY:t})},h.prototype.updateShadows=function(e,t,n){var r=this.shadows;if(r)for(var i=r.length;i--;)n.call(r[i],"height"===e?Math.max(t-(r[i].cutHeight||0),0):"d"===e?this.d:t,e,r[i])},h.prototype.updateTransform=function(){var e=this.scaleX,t=this.scaleY,n=this.inverted,r=this.rotation,i=this.matrix,o=this.element,a=this.translateX||0,s=this.translateY||0;n&&(a+=this.width,s+=this.height),a=["translate("+a+","+s+")"],y(i)&&a.push("matrix("+i.join(",")+")"),n?a.push("rotate(90) scale(-1,1)"):r&&a.push("rotate("+r+" "+m(this.rotationOriginX,o.getAttribute("x"),0)+" "+m(this.rotationOriginY,o.getAttribute("y")||0)+")"),(y(e)||y(t))&&a.push("scale("+m(e,1)+" "+m(t,1)+")"),a.length&&o.setAttribute("transform",a.join(" "))},h.prototype.visibilitySetter=function(e,t,n){"inherit"===e?n.removeAttribute(t):this[t]!==e&&n.setAttribute(t,e),_____WB$wombat$check$this$function_____(this)[t]=e},h.prototype.xGetter=function(e){return"circle"===this.element.nodeName&&("x"===e?e="cx":"y"===e&&(e="cy")),this._defaultGetter(e)},h.prototype.zIndexSetter=function(e,t){var n=this.renderer,r=this.parentGroup,i=(r||n).element||n.box,o=this.element;n=i===n.box;var a,s=!1,l=this.added;if(y(e)?(o.setAttribute("data-z-index",e),e=+e,_____WB$wombat$check$this$function_____(this)[t]===e&&(l=!1)):y(this[t])&&o.removeAttribute("data-z-index"),_____WB$wombat$check$this$function_____(this)[t]=e,l){for((e=this.zIndex)&&r&&(r.handleZ=!0),a=(t=i.childNodes).length-1;0<=a&&!s;a--){l=(r=t[a]).getAttribute("data-z-index");var u=!y(l);r!==o&&(0>e&&u&&!n&&!a?(i.insertBefore(o,t[a]),s=!0):(c(l)<=e||u&&(!y(e)||0<=e))&&(i.insertBefore(o,t[a+1]||null),s=!0))}s||(i.insertBefore(o,t[n?3:0]||null),s=!0)}return s},h}(),e.prototype["stroke-widthSetter"]=e.prototype.strokeSetter,e.prototype.yGetter=e.prototype.xGetter,e.prototype.matrixSetter=e.prototype.rotationOriginXSetter=e.prototype.rotationOriginYSetter=e.prototype.rotationSetter=e.prototype.scaleXSetter=e.prototype.scaleYSetter=e.prototype.translateXSetter=e.prototype.translateYSetter=e.prototype.verticalAlignSetter=function(e,t){this[t]=e,this.doTransform=!0},e}),e(t,"Core/Renderer/RendererRegistry.js",[t["Core/Globals.js"]],function(r){var e,i,o;return(i=e||(e={})).rendererTypes={},i.getRendererType=function(e){return void 0===e&&(e=o),i.rendererTypes[e]||i.rendererTypes[o]},i.registerRendererType=function(e,t,n){i.rendererTypes[e]=t,o&&!n||(o=e,r.Renderer=t)},e}),e(t,"Core/Renderer/SVG/SVGLabel.js",[t["Core/Renderer/SVG/SVGElement.js"],t["Core/Utilities.js"]],function(r,e){var i,t=_____WB$wombat$check$this$function_____(this)&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=e.defined,a=e.extend,s=e.isNumber,l=e.merge,u=e.pick,n=e.removeEvent;return function(d){function h(e,t,n,r,i,o,a,c,p,s){var l,u=d.call(this)||_____WB$wombat$check$this$function_____(this);return u.paddingLeftSetter=u.paddingSetter,u.paddingRightSetter=u.paddingSetter,u.init(e,"g"),u.textStr=t,u.x=n,u.y=r,u.anchorX=o,u.anchorY=a,u.baseline=p,u.className=s,u.addClass("button"===s?"highcharts-no-tooltip":"highcharts-label"),s&&u.addClass("highcharts-"+s),u.text=e.text(void 0,0,0,c).attr({zIndex:1}),"string"==typeof i&&((l=/^url\((.*?)\)$/.test(i))||u.renderer.symbols[i])&&(u.symbolKey=i),u.bBox=h.emptyBBox,u.padding=3,u.baselineOffset=0,u.needsBox=e.styledMode||l,u.deferredAttr={},u.alignFactor=0,u}return t(h,d),h.prototype.alignSetter=function(e){(e={left:0,center:.5,right:1}[e])!==this.alignFactor&&(this.alignFactor=e,this.bBox&&s(this.xSetting)&&this.attr({x:this.xSetting}))},h.prototype.anchorXSetter=function(e,t){this.anchorX=e,this.boxAttr(t,Math.round(e)-this.getCrispAdjust()-this.xSetting)},h.prototype.anchorYSetter=function(e,t){this.anchorY=e,this.boxAttr(t,e-this.ySetting)},h.prototype.boxAttr=function(e,t){this.box?this.box.attr(e,t):this.deferredAttr[e]=t},h.prototype.css=function(t){if(t){var n={};t=l(t),h.textProps.forEach(function(e){void 0!==t[e]&&(n[e]=t[e],delete t[e])}),this.text.css(n);var e="width"in n;"fontSize"in n||"fontWeight"in n?this.updateTextPadding():e&&this.updateBoxSize()}return r.prototype.css.call(this,t)},h.prototype.destroy=function(){n(this.element,"mouseenter"),n(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),r.prototype.destroy.call(this)},h.prototype.fillSetter=function(e,t){e&&(this.needsBox=!0),this.fill=e,this.boxAttr(t,e)},h.prototype.getBBox=function(){this.textStr&&0===this.bBox.width&&0===this.bBox.height&&this.updateBoxSize();var e=this.padding,t=u(this.paddingLeft,e);return{width:this.width,height:this.height,x:this.bBox.x-t,y:this.bBox.y-e}},h.prototype.getCrispAdjust=function(){return this.renderer.styledMode&&this.box?this.box.strokeWidth()%2/2:(this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2},h.prototype.heightSetter=function(e){this.heightSetting=e},h.prototype.onAdd=function(){var e=this.textStr;this.text.add(this),this.attr({text:o(e)?e:"",x:this.x,y:this.y}),this.box&&o(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})},h.prototype.paddingSetter=function(e,t){s(e)?e!==_____WB$wombat$check$this$function_____(this)[t]&&(this[t]=e,this.updateTextPadding()):this[t]=void 0},h.prototype.rSetter=function(e,t){this.boxAttr(t,e)},h.prototype.shadow=function(e){return e&&!this.renderer.styledMode&&(this.updateBoxSize(),this.box&&this.box.shadow(e)),_____WB$wombat$check$this$function_____(this)},h.prototype.strokeSetter=function(e,t){this.stroke=e,this.boxAttr(t,e)},h.prototype["stroke-widthSetter"]=function(e,t){e&&(this.needsBox=!0),_____WB$wombat$check$this$function_____(this)["stroke-width"]=e,this.boxAttr(t,e)},h.prototype["text-alignSetter"]=function(e){this.textAlign=e},h.prototype.textSetter=function(e){void 0!==e&&this.text.attr({text:e}),this.updateTextPadding()},h.prototype.updateBoxSize=function(){var e=this.text.element.style,t={},n=this.padding,r=this.bBox=s(this.widthSetting)&&s(this.heightSetting)&&!this.textAlign||!o(this.text.textStr)?h.emptyBBox:this.text.getBBox();this.width=this.getPaddedWidth(),this.height=(this.heightSetting||r.height||0)+2*n,e=this.renderer.fontMetrics(e&&e.fontSize,this.text),this.baselineOffset=n+Math.min((this.text.firstLineMetrics||e).b,r.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-e.h)/2),this.needsBox&&(this.box||((n=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect()).addClass(("button"===this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),n.add(this)),n=this.getCrispAdjust(),t.x=n,t.y=(this.baseline?-this.baselineOffset:0)+n,t.width=Math.round(this.width),t.height=Math.round(this.height),this.box.attr(a(t,this.deferredAttr)),this.deferredAttr={})},h.prototype.updateTextPadding=function(){var e=this.text;this.updateBoxSize();var t=this.baseline?0:this.baselineOffset,n=u(this.paddingLeft,this.padding);o(this.widthSetting)&&this.bBox&&("center"===this.textAlign||"right"===this.textAlign)&&(n+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width)),n===e.x&&t===e.y||(e.attr("x",n),e.hasBoxWidthChanged&&(this.bBox=e.getBBox(!0)),void 0!==t&&e.attr("y",t)),e.x=n,e.y=t},h.prototype.widthSetter=function(e){this.widthSetting=s(e)?e:void 0},h.prototype.getPaddedWidth=function(){var e=this.padding,t=u(this.paddingLeft,e);return e=u(this.paddingRight,e),(this.widthSetting||this.bBox.width||0)+t+e},h.prototype.xSetter=function(e){this.x=e,this.alignFactor&&(e-=this.alignFactor*this.getPaddedWidth(),_____WB$wombat$check$this$function_____(this)["forceAnimate:x"]=!0),this.xSetting=Math.round(e),this.attr("translateX",this.xSetting)},h.prototype.ySetter=function(e){this.ySetting=this.y=Math.round(e),this.attr("translateY",this.ySetting)},h.emptyBBox={width:0,height:0,x:0,y:0},h.textProps="color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "),h}(r)}),e(t,"Core/Renderer/SVG/Symbols.js",[t["Core/Utilities.js"]],function(e){function i(e,t,n,r,i){var o=[];if(i){var a=i.start||0,s=m(i.r,n);n=m(i.r,r||n);var l=(i.end||0)-.001;r=i.innerR;var c=m(i.open,.001>Math.abs((i.end||0)-a-2*Math.PI)),p=Math.cos(a),d=Math.sin(a),u=Math.cos(l),h=Math.sin(l);a=m(i.longArc,.001>l-a-Math.PI?0:1),o.push(["M",e+s*p,t+n*d],["A",s,n,0,a,m(i.clockwise,1),e+s*u,t+n*h]),f(r)&&o.push(c?["M",e+r*u,t+r*h]:["L",e+r*u,t+r*h],["A",r,r,0,a,f(i.clockwise)?1-i.clockwise:0,e+r*p,t+r*d]),c||o.push(["Z"])}return o}function t(e,t,n,r,i){return i&&i.r?u(e,t,n,r,i):[["M",e,t],["L",e+n,t],["L",e+n,t+r],["L",e,t+r],["Z"]]}function u(e,t,n,r,i){return[["M",e+(i=i&&i.r||0),t],["L",e+n-i,t],["C",e+n,t,e+n,t,e+n,t+i],["L",e+n,t+r-i],["C",e+n,t+r,e+n,t+r,e+n-i,t+r],["L",e+i,t+r],["C",e,t+r,e,t+r,e,t+r-i],["L",e,t+i],["C",e,t,e,t,e+i,t]]}var f=e.defined,c=e.isNumber,m=e.pick;return{arc:i,callout:function(e,t,n,r,i){var o=Math.min(i&&i.r||0,n,r),a=o+6,s=i&&i.anchorX;i=i&&i.anchorY||0;var l=u(e,t,n,r,{r:o});return c(s)?(e+s>=n?i>t+a&&i<t+r-a?l.splice(3,1,["L",e+n,i-6],["L",e+n+6,i],["L",e+n,i+6],["L",e+n,t+r-o]):l.splice(3,1,["L",e+n,r/2],["L",s,i],["L",e+n,r/2],["L",e+n,t+r-o]):0>=e+s?i>t+a&&i<t+r-a?l.splice(7,1,["L",e,i+6],["L",e-6,i],["L",e,i-6],["L",e,t+o]):l.splice(7,1,["L",e,r/2],["L",s,i],["L",e,r/2],["L",e,t+o]):i&&i>r&&s>e+a&&s<e+n-a?l.splice(5,1,["L",s+6,t+r],["L",s,t+r+6],["L",s-6,t+r],["L",e+o,t+r]):i&&0>i&&s>e+a&&s<e+n-a&&l.splice(1,1,["L",s-6,t],["L",s,t-6],["L",s+6,t],["L",n-o,t]),l):l},circle:function(e,t,n,r){return i(e+n/2,t+r/2,n/2,r/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(e,t,n,r){return[["M",e+n/2,t],["L",e+n,t+r/2],["L",e+n/2,t+r],["L",e,t+r/2],["Z"]]},rect:t,roundedRect:u,square:t,triangle:function(e,t,n,r){return[["M",e+n/2,t],["L",e+n,t+r],["L",e,t+r],["Z"]]},"triangle-down":function(e,t,n,r){return[["M",e,t],["L",e+n,t],["L",e+n/2,t+r],["Z"]]}}}),e(t,"Core/Renderer/SVG/TextBuilder.js",[t["Core/Renderer/HTML/AST.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(s,e,t){var d=e.doc,h=e.SVG_NS,r=e.win,f=t.attr,u=t.isString,i=t.objectEach,l=t.pick;return function(){function e(e){var t=e.styles;this.renderer=e.renderer,this.svgElement=e,this.width=e.textWidth,this.textLineHeight=t&&t.lineHeight,this.textOutline=t&&t.textOutline,this.ellipsis=!(!t||"ellipsis"!==t.textOverflow),this.noWrap=!(!t||"nowrap"!==t.whiteSpace),this.fontSize=t&&t.fontSize}return e.prototype.buildSVG=function(){var e=this.svgElement,t=e.element,n=e.renderer,r=l(e.textStr,"").toString(),i=-1!==r.indexOf("<"),o=t.childNodes;n=this.width&&!e.added&&n.box;var a=[r,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,this.fontSize,this.width].join();if(a!==e.textCache){for(e.textCache=a,delete e.actualWidth,a=o.length;a--;)t.removeChild(o[a]);i||this.ellipsis||this.width||-1!==r.indexOf(" ")&&(!this.noWrap||/<br.*?>/g.test(r))?""!==r&&(n&&n.appendChild(t),r=new s(r),this.modifyTree(r.nodes),r.addToDOM(e.element),this.modifyDOM(),this.ellipsis&&-1!==(t.textContent||"").indexOf("\u2026")&&e.attr("title",this.unescapeEntities(e.textStr||"",["&lt;","&gt;"])),n&&n.removeChild(t)):t.appendChild(d.createTextNode(this.unescapeEntities(r))),u(this.textOutline)&&e.applyTextOutline&&e.applyTextOutline(this.textOutline)}},e.prototype.modifyDOM=function(){var e,l=_____WB$wombat$check$this$function_____(this),u=this.svgElement,c=f(u.element,"x");for(u.firstLineMetrics=void 0;(e=u.element.firstChild)&&/^[\s\u200B]*$/.test(e.textContent||" ");)u.element.removeChild(e);[].forEach.call(u.element.querySelectorAll("tspan.highcharts-br"),function(e,t){e.nextSibling&&e.previousSibling&&(0===t&&1===e.previousSibling.nodeType&&(u.firstLineMetrics=u.renderer.fontMetrics(void 0,e.previousSibling)),f(e,{dy:l.getLineHeight(e.nextSibling),x:c}))});var p=this.width||0;if(p){var n=function(t){[].slice.call(t.childNodes).forEach(function(e){e.nodeType===r.Node.TEXT_NODE?function(t,n){var e=t.textContent||"",r=e.replace(/([^\^])-/g,"$1- ").split(" "),i=!l.noWrap&&(1<r.length||1<u.element.childNodes.length),o=l.getLineHeight(n),a=0,s=u.actualWidth;if(l.ellipsis)e&&l.truncate(t,e,void 0,0,Math.max(0,p-parseInt(l.fontSize||12,10)),function(e,t){return e.substring(0,t)+"\u2026"});else if(i){for(e=[],i=[];n.firstChild&&n.firstChild!==t;)i.push(n.firstChild),n.removeChild(n.firstChild);for(;r.length;)r.length&&!l.noWrap&&0<a&&(e.push(t.textContent||""),t.textContent=r.join(" ").replace(/- /g,"-")),l.truncate(t,void 0,r,0===a&&s||0,p,function(e,t){return r.slice(0,t).join(" ").replace(/- /g,"-")}),s=u.actualWidth,a++;i.forEach(function(e){n.insertBefore(e,t)}),e.forEach(function(e){n.insertBefore(d.createTextNode(e),t),(e=d.createElementNS(h,"tspan")).textContent="\u200b",f(e,{dy:o,x:c}),n.insertBefore(e,t)})}}(e,t):(-1!==e.className.baseVal.indexOf("highcharts-br")&&(u.actualWidth=0),n(e))})};n(u.element)}},e.prototype.getLineHeight=function(e){var t;return e=e.nodeType===r.Node.TEXT_NODE?e.parentElement:e,this.renderer.styledMode||(t=e&&/(px|em)$/.test(e.style.fontSize)?e.style.fontSize:this.fontSize||this.renderer.style.fontSize||12),this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(t,e||this.svgElement.element).h},e.prototype.modifyTree=function(a){var s=_____WB$wombat$check$this$function_____(this),l=function(e,t){var n=e.attributes;n=void 0===n?{}:n;var r=e.children,i=e.tagName,o=s.renderer.styledMode;"b"===i||"strong"===i?o?n.class="highcharts-strong":n.style="font-weight:bold;"+(n.style||""):"i"!==i&&"em"!==i||(o?n.class="highcharts-emphasized":n.style="font-style:italic;"+(n.style||"")),u(n.style)&&(n.style=n.style.replace(/(;| |^)color([ :])/,"$1fill$2")),"br"===i?(n.class="highcharts-br",e.textContent="\u200b",(t=a[t+1])&&t.textContent&&(t.textContent=t.textContent.replace(/^ +/gm,""))):"a"===i&&r&&r.some(function(e){return"#text"===e.tagName})&&(e.children=[{children:r,tagName:"tspan"}]),"#text"!==i&&"a"!==i&&(e.tagName="tspan"),e.attributes=n,r&&r.filter(function(e){return"#text"!==e.tagName}).forEach(l)};a.forEach(l)},e.prototype.truncate=function(r,i,o,c,p,d){var e,a=this.svgElement,h=a.renderer,f=a.rotation,s=[],t=o?1:0,n=(i||o||"").length,l=n,m=function(e,t){t=t||e;var n=r.parentNode;if(n&&void 0===s[t])if(n.getSubStringLength)try{s[t]=c+n.getSubStringLength(0,o?t+1:t)}catch(e){}else h.getSpanWidth&&(r.textContent=d(i||o,e),s[t]=c+h.getSpanWidth(a,r));return s[t]};a.rotation=0;var u=m(r.textContent.length);if(c+u>p){for(;t<=n;)l=Math.ceil((t+n)/2),o&&(e=d(o,l)),u=m(l,e&&e.length-1),t===n?t=n+1:u>p?n=l-1:t=l;0===n?r.textContent="":i&&n===i.length-1||(r.textContent=e||d(i||o,l))}o&&o.splice(0,l),a.actualWidth=u,a.rotation=f},e.prototype.unescapeEntities=function(n,r){return i(this.renderer.escapes,function(e,t){r&&-1!==r.indexOf(e)||(n=n.toString().replace(new RegExp(e,"g"),t))}),n},e}()}),e(t,"Core/Renderer/SVG/SVGRenderer.js",[t["Core/Renderer/HTML/AST.js"],t["Core/Color/Color.js"],t["Core/Globals.js"],t["Core/Renderer/RendererRegistry.js"],t["Core/Renderer/SVG/SVGElement.js"],t["Core/Renderer/SVG/SVGLabel.js"],t["Core/Renderer/SVG/Symbols.js"],t["Core/Renderer/SVG/TextBuilder.js"],t["Core/Utilities.js"]],function(b,n,e,r,i,c,o,a,t){var l,S=e.charts,p=e.deg2rad,g=e.doc,d=e.isFirefox,T=e.isMS,h=e.isWebKit,f=e.noop,m=e.SVG_NS,y=e.symbolSizes,x=e.win,_=t.addEvent,C=t.attr,A=t.createElement,k=t.css,v=t.defined,M=t.destroyObjectProperties,w=t.extend,O=t.isArray,u=t.isNumber,s=t.isObject,D=t.isString,E=t.merge,L=t.pick,I=t.pInt,N=t.uniqueKey;return e=function(){function e(e,t,n,r,i,o,a){this.width=this.url=this.style=this.isSVG=this.imgCount=this.height=this.gradients=this.globalAnimation=this.defs=this.chartIndex=this.cacheKeys=this.cache=this.boxWrapper=this.box=this.alignedObjects=void 0,this.init(e,t,n,r,i,o,a)}return e.prototype.init=function(e,t,n,r,i,o,a){var s,l=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),u=l.element;a||l.css(this.getStyle(r)),e.appendChild(u),C(e,"dir","ltr"),-1===e.innerHTML.indexOf("xmlns")&&C(u,"xmlns",this.SVG_NS),this.isSVG=!0,this.box=u,this.boxWrapper=l,this.alignedObjects=[],this.url=this.getReferenceURL(),this.createElement("desc").add().element.appendChild(g.createTextNode("Created with Highcharts 9.3.2")),this.defs=this.createElement("defs").add(),this.allowHTML=o,this.forExport=i,this.styledMode=a,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(t,n,!1),d&&e.getBoundingClientRect&&((t=function(){k(e,{left:0,top:0}),s=e.getBoundingClientRect(),k(e,{left:Math.ceil(s.left)-s.left+"px",top:Math.ceil(s.top)-s.top+"px"})})(),this.unSubPixelFix=_(x,"resize",t))},e.prototype.definition=function(e){return new b([e]).addToDOM(this.defs.element)},e.prototype.getReferenceURL=function(){if((d||h)&&g.getElementsByTagName("base").length){if(!v(l)){var e=N();e=new b([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:e},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":"url(#"+e+")",fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(g.body),k(e,{position:"fixed",top:0,left:0,zIndex:9e5});var t=g.elementFromPoint(6,6);l="hitme"===(t&&t.id),g.body.removeChild(e)}if(l)return x.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20")}return""},e.prototype.getStyle=function(e){return this.style=w({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},e)},e.prototype.setStyle=function(e){this.boxWrapper.css(this.getStyle(e))},e.prototype.isHidden=function(){return!this.boxWrapper.getBBox().width},e.prototype.destroy=function(){var e=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),M(this.gradients||{}),this.gradients=null,e&&(this.defs=e.destroy()),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null},e.prototype.createElement=function(e){var t=new this.Element;return t.init(this,e),t},e.prototype.getRadialAttr=function(e,t){return{cx:e[0]-e[2]/2+(t.cx||0)*e[2],cy:e[1]-e[2]/2+(t.cy||0)*e[2],r:(t.r||0)*e[2]}},e.prototype.buildText=function(e){new a(e).buildSVG()},e.prototype.getContrast=function(e){return(e=n.parse(e).rgba)[0]*=1,e[1]*=1.2,e[2]*=.5,459<e[0]+e[1]+e[2]?"#000000":"#FFFFFF"},e.prototype.button=function(e,c,p,d,t,n,r,i,h,f){var o=this.label(e,c,p,h,void 0,void 0,f,void 0,"button"),a=this.styledMode,s=0,l=t?E(t):{};if(e=l&&l.style||{},l=b.filterUserAttributes(l),o.attr(E({padding:8,r:2},l)),!a){var u=(l=E({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},{style:e},l)).style;delete l.style;var m=(n=E(l,{fill:"#e6e6e6"},b.filterUserAttributes(n||{}))).style;delete n.style;var g=(r=E(l,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},b.filterUserAttributes(r||{}))).style;delete r.style;var y=(i=E(l,{style:{color:"#cccccc"}},b.filterUserAttributes(i||{}))).style;delete i.style}return _(o.element,T?"mouseover":"mouseenter",function(){3!==s&&o.setState(1)}),_(o.element,T?"mouseout":"mouseleave",function(){3!==s&&o.setState(s)}),o.setState=function(e){1!==e&&(o.state=s=e),o.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][e||0]),a||o.attr([l,n,r,i][e||0]).css([u,m,g,y][e||0])},a||o.attr(l).css(w({cursor:"default"},u)),o.on("touchstart",function(e){return e.stopPropagation()}).on("click",function(e){3!==s&&d.call(o,e)})},e.prototype.crispLine=function(e,t,n){void 0===n&&(n="round");var r=e[0],i=e[1];return v(r[1])&&r[1]===i[1]&&(r[1]=i[1]=Math[n](r[1])-t%2/2),v(r[2])&&r[2]===i[2]&&(r[2]=i[2]=Math[n](r[2])+t%2/2),e},e.prototype.path=function(e){var t=this.styledMode?{}:{fill:"none"};return O(e)?t.d=e:s(e)&&w(t,e),this.createElement("path").attr(t)},e.prototype.circle=function(e,t,n){return e=s(e)?e:void 0===e?{}:{x:e,y:t,r:n},(t=this.createElement("circle")).xSetter=t.ySetter=function(e,t,n){n.setAttribute("c"+t,e)},t.attr(e)},e.prototype.arc=function(e,t,n,r,i,o){return s(e)?(t=(r=e).y,n=r.r,e=r.x):r={innerR:r,start:i,end:o},(e=this.symbol("arc",e,t,n,n,r)).r=n,e},e.prototype.rect=function(e,t,n,r,i,o){i=s(e)?e.r:i;var a=this.createElement("rect");return e=s(e)?e:void 0===e?{}:{x:e,y:t,width:Math.max(n,0),height:Math.max(r,0)},this.styledMode||(void 0!==o&&(e["stroke-width"]=o,e=a.crisp(e)),e.fill="none"),i&&(e.r=i),a.rSetter=function(e,t,n){a.r=e,C(n,{rx:e,ry:e})},a.rGetter=function(){return a.r||0},a.attr(e)},e.prototype.setSize=function(e,t,n){this.width=e,this.height=t,this.boxWrapper.animate({width:e,height:t},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:L(n,!0)?void 0:0}),this.alignElements()},e.prototype.g=function(e){var t=this.createElement("g");return e?t.attr({class:"highcharts-"+e}):t},e.prototype.image=function(t,e,n,r,i,o){var a={preserveAspectRatio:"none"},s=function(e,t){e.setAttributeNS?e.setAttributeNS("http://www.w3.org/1999/xlink","href",t):e.setAttribute("hc-svg-href",t)};u(e)&&(a.x=e),u(n)&&(a.y=n),u(r)&&(a.width=r),u(i)&&(a.height=i);var l=this.createElement("image").attr(a);return e=function(e){s(l.element,t),o.call(l,e)},o?(s(l.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),n=new x.Image,_(n,"load",e),n.src=t,n.complete&&e({})):s(l.element,t),l},e.prototype.symbol=function(e,t,n,r,c,i){var p,o=_____WB$wombat$check$this$function_____(this),d=/^url\((.*?)\)$/,h=d.test(e),a=!h&&(this.symbols[e]?e:"circle"),f=a&&this.symbols[a];if(f){"number"==typeof t&&(p=f.call(this.symbols,Math.round(t||0),Math.round(n||0),r||0,c||0,i));var s=this.path(p);o.styledMode||s.attr("fill","none"),w(s,{symbolName:a||void 0,x:t,y:n,width:r,height:c}),i&&w(s,i)}else if(h){var l=e.match(d)[1],u=s=this.image(l);u.imgwidth=L(y[l]&&y[l].width,i&&i.width),u.imgheight=L(y[l]&&y[l].height,i&&i.height);var m=function(e){return e.attr({width:e.width,height:e.height})};["width","height"].forEach(function(e){u[e+"Setter"]=function(e,t){var n=_____WB$wombat$check$this$function_____(this)["img"+t];this[t]=e,v(n)&&(i&&"within"===i.backgroundSize&&this.width&&this.height&&(n=Math.round(n*Math.min(this.width/this.imgwidth,this.height/this.imgheight))),this.element&&this.element.setAttribute(t,n),this.alignByTranslate||(e=((this[t]||0)-n)/2,this.attr("width"===t?{translateX:e}:{translateY:e})))}}),v(t)&&u.attr({x:t,y:n}),u.isImg=!0,v(u.imgwidth)&&v(u.imgheight)?m(u):(u.attr({width:0,height:0}),A("img",{onload:function(){var e=S[o.chartIndex];0===this.width&&(k(this,{position:"absolute",top:"-999em"}),g.body.appendChild(this)),y[l]={width:this.width,height:this.height},u.imgwidth=this.width,u.imgheight=this.height,u.element&&m(u),this.parentNode&&this.parentNode.removeChild(this),o.imgCount--,o.imgCount||!e||e.hasLoaded||e.onload()},src:l}),this.imgCount++)}return s},e.prototype.clipRect=function(e,t,n,r){var i=N()+"-",o=this.createElement("clipPath").attr({id:i}).add(this.defs);return(e=this.rect(e,t,n,r,0).add(o)).id=i,e.clipPath=o,e.count=0,e},e.prototype.text=function(e,t,n,r){var i={};return!r||!this.allowHTML&&this.forExport?(i.x=Math.round(t||0),n&&(i.y=Math.round(n)),v(e)&&(i.text=e),e=this.createElement("text").attr(i),(!r||this.forExport&&!this.allowHTML)&&(e.xSetter=function(e,t,n){for(var r,i=n.getElementsByTagName("tspan"),o=n.getAttribute(t),a=0;a<i.length;a++)(r=i[a]).getAttribute(t)===o&&r.setAttribute(t,e);n.setAttribute(t,e)}),e):this.html(e,t,n)},e.prototype.fontMetrics=function(e,t){return e=!this.styledMode&&/px/.test(e)||!x.getComputedStyle?e||t&&t.style&&t.style.fontSize||this.style&&this.style.fontSize:t&&i.prototype.getStyle.call(t,"font-size"),{h:t=24>(e=/px/.test(e)?I(e):12)?e+3:Math.round(1.2*e),b:Math.round(.8*t),f:e}},e.prototype.rotCorr=function(e,t,n){var r=e;return t&&n&&(r=Math.max(r*Math.cos(t*p),4)),{x:-e/3*Math.sin(t*p),y:r}},e.prototype.pathToSegments=function(e){for(var t=[],n=[],r={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2},i=0;i<e.length;i++)D(n[0])&&u(e[i])&&n.length===r[n[0].toUpperCase()]&&e.splice(i,0,n[0].replace("M","L").replace("m","l")),"string"==typeof e[i]&&(n.length&&t.push(n.slice(0)),n.length=0),n.push(e[i]);return t.push(n.slice(0)),t},e.prototype.label=function(e,t,n,r,i,o,a,s,l){return new c(this,e,t,n,r,i,o,a,s,l)},e.prototype.alignElements=function(){this.alignedObjects.forEach(function(e){return e.align()})},e}(),w(e.prototype,{Element:i,SVG_NS:m,escapes:{"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},symbols:o,draw:f}),r.registerRendererType("svg",e,!0),e}),e(t,"Core/Renderer/HTML/HTMLElement.js",[t["Core/Globals.js"],t["Core/Renderer/SVG/SVGElement.js"],t["Core/Utilities.js"]],function(e,t,n){var r,i=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=e.isFirefox,a=e.isMS,l=e.isWebKit,s=e.win,f=n.css,m=n.defined,u=n.extend,c=n.pick,g=n.pInt;return function(e){function r(){return null!==e&&e.apply(this,arguments)||_____WB$wombat$check$this$function_____(this)}return i(r,e),r.compose=function(e){if(-1===r.composedClasses.indexOf(e)){r.composedClasses.push(e);var t=r.prototype,n=e.prototype;n.getSpanCorrection=t.getSpanCorrection,n.htmlCss=t.htmlCss,n.htmlGetBBox=t.htmlGetBBox,n.htmlUpdateTransform=t.htmlUpdateTransform,n.setSpanRotation=t.setSpanRotation}return e},r.prototype.getSpanCorrection=function(e,t,n){this.xCorr=-e*n,this.yCorr=-t},r.prototype.htmlCss=function(e){var t="SPAN"===this.element.tagName&&e&&"width"in e,n=c(t&&e.width,void 0);if(t){delete e.width,this.textWidth=n;var r=!0}return e&&"ellipsis"===e.textOverflow&&(e.whiteSpace="nowrap",e.overflow="hidden"),this.styles=u(this.styles,e),f(this.element,e),r&&this.htmlUpdateTransform(),_____WB$wombat$check$this$function_____(this)},r.prototype.htmlGetBBox=function(){var e=this.element;return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}},r.prototype.htmlUpdateTransform=function(){if(this.added){var t=this.renderer,n=this.element,r=this.translateX||0,i=this.translateY||0,c=this.x||0,p=this.y||0,e=this.textAlign||"left",d={left:0,center:.5,right:1}[e],o=this.styles;if(o=o&&o.whiteSpace,f(n,{marginLeft:r,marginTop:i}),!t.styledMode&&this.shadows&&this.shadows.forEach(function(e){f(e,{marginLeft:r+1,marginTop:i+1})}),this.inverted&&[].forEach.call(n.childNodes,function(e){t.invertChild(e,n)}),"SPAN"===n.tagName){var a=this.rotation,s=this.textWidth&&g(this.textWidth),h=[a,e,n.innerHTML,this.textWidth,this.textAlign].join(),l=void 0;if(l=!1,s!==this.oldTextWidth){if(this.textPxLength)var u=this.textPxLength;else f(n,{width:"",whiteSpace:o||"nowrap"}),u=n.offsetWidth;(s>this.oldTextWidth||u>s)&&(/[ \-]/.test(n.textContent||n.innerText)||"ellipsis"===n.style.textOverflow)&&(f(n,{width:u>s||a?s+"px":"auto",display:"block",whiteSpace:o||"normal"}),this.oldTextWidth=s,l=!0)}this.hasBoxWidthChanged=l,h!==this.cTT&&(l=t.fontMetrics(n.style.fontSize,n).b,!m(a)||a===(this.oldRotation||0)&&e===this.oldAlign||this.setSpanRotation(a,d,l),this.getSpanCorrection(!m(a)&&this.textPxLength||n.offsetWidth,l,d,a,e)),f(n,{left:c+(this.xCorr||0)+"px",top:p+(this.yCorr||0)+"px"}),this.cTT=h,this.oldRotation=a,this.oldAlign=e}}else this.alignOnAdd=!0},r.prototype.setSpanRotation=function(e,t,n){var r={},i=a&&!/Edge/.test(s.navigator.userAgent)?"-ms-transform":l?"-webkit-transform":o?"MozTransform":s.opera?"-o-transform":void 0;i&&(r[i]=r.transform="rotate("+e+"deg)",r[i+(o?"Origin":"-origin")]=r.transformOrigin=100*t+"% "+n+"px",f(this.element,r))},r.composedClasses=[],r}(t)}),e(t,"Core/Renderer/HTML/HTMLRenderer.js",[t["Core/Renderer/HTML/AST.js"],t["Core/Renderer/SVG/SVGElement.js"],t["Core/Renderer/SVG/SVGRenderer.js"],t["Core/Utilities.js"]],function(a,s,e,t){var r,n=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=t.attr,d=t.createElement,h=t.extend,l=t.pick;return function(e){function t(){return null!==e&&e.apply(this,arguments)||_____WB$wombat$check$this$function_____(this)}return n(t,e),t.compose=function(e){return-1===t.composedClasses.indexOf(e)&&(t.composedClasses.push(e),e.prototype.html=t.prototype.html),e},t.prototype.html=function(e,t,n){var u=this.createElement("span"),r=u.element,i=u.renderer,o=i.isSVG,c=function(o,a){["opacity","visibility"].forEach(function(i){o[i+"Setter"]=function(e,t,n){var r=o.div?o.div.style:a;s.prototype[i+"Setter"].call(this,e,t,n),r&&(r[t]=e)}}),o.addedSetters=!0};return u.textSetter=function(e){e!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,a.setElementHTML(this.element,l(e,"")),this.textStr=e,u.doTransform=!0)},o&&c(u,u.element.style),u.xSetter=u.ySetter=u.alignSetter=u.rotationSetter=function(e,t){"align"===t?u.alignValue=u.textAlign=e:u[t]=e,u.doTransform=!0},u.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)},u.attr({text:e,x:Math.round(t),y:Math.round(n)}).css({position:"absolute"}),i.styledMode||u.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),r.style.whiteSpace="nowrap",u.css=u.htmlCss,o&&(u.add=function(e){var a=i.box.parentNode,s=[];if(this.parentGroup=e){var l=e.div;if(!l){for(;e;)s.push(e),e=e.parentGroup;s.reverse().forEach(function(n){function e(e,t){n[t]=e,"translateX"===t?o.left=e+"px":o.top=e+"px",n.doTransform=!0}var t,r=p(n.element,"class"),i=n.styles||{},o=(l=n.div=n.div||d("div",r?{className:r}:void 0,{position:"absolute",left:(n.translateX||0)+"px",top:(n.translateY||0)+"px",display:n.display,opacity:n.opacity,cursor:i.cursor,pointerEvents:i.pointerEvents,visibility:n.visibility},l||a)).style;h(n,{classSetter:(t=l,function(e){this.element.setAttribute("class",e),t.className=e}),on:function(){return s[0].div&&u.on.apply({element:s[0].div,onEvents:n.onEvents},arguments),n},translateXSetter:e,translateYSetter:e}),n.addedSetters||c(n)})}}else l=a;return l.appendChild(r),u.added=!0,u.alignOnAdd&&u.htmlUpdateTransform(),u}),u},t.composedClasses=[],t}(e)}),e(t,"Core/Axis/AxisDefaults.js",[],function(){var e,t;return(t=e||(e={})).defaultXAxisOptions={alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,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,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotation:void 0,autoRotationLimit:80,distance:void 0,enabled:!0,indentation:10,overflow:"justify",padding:5,reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,x:0,zIndex:7,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minPadding:.01,offset:void 0,opposite:!1,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",rotation:0,useHTML:!1,x:0,y:0,style:{color:"#666666"}},type:"linear",uniqueNames:!0,visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#ccd6eb"},t.defaultYAxisOptions={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){return(0,this.axis.chart.numberFormatter)(this.total,-1)},style:{color:"#000000",fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},t.defaultLeftAxisOptions={labels:{x:-15},title:{rotation:270}},t.defaultRightAxisOptions={labels:{x:15},title:{rotation:90}},t.defaultBottomAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},t.defaultTopAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},e}),e(t,"Core/Foundation.js",[t["Core/Utilities.js"]],function(e){var t,r=e.addEvent,i=e.isFunction,o=e.objectEach,a=e.removeEvent;return(t||(t={})).registerEventOptions=function(n,e){n.eventOptions=n.eventOptions||{},o(e.events,function(e,t){n.eventOptions[t]!==e&&(n.eventOptions[t]&&(a(n,t,n.eventOptions[t]),delete n.eventOptions[t]),i(e)&&(n.eventOptions[t]=e,r(n,t,e)))})},t}),e(t,"Core/Axis/Tick.js",[t["Core/FormatUtilities.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(w,e,t){var g=e.deg2rad,s=t.clamp,E=t.correctFloat,S=t.defined,n=t.destroyObjectProperties,C=t.extend,T=t.fireEvent,x=t.isNumber,o=t.merge,l=t.objectEach,_=t.pick;return e=function(){function e(e,t,n,r,i){this.isNewLabel=this.isNew=!0,this.axis=e,this.pos=t,this.type=n||"",this.parameters=i||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,T(this,"init"),n||r||this.addLabel()}return e.prototype.addLabel=function(){var e=_____WB$wombat$check$this$function_____(this),t=e.axis,n=t.options,c=t.chart,r=t.categories,p=t.logarithmic,d=t.names,i=e.pos,o=_(e.options&&e.options.labels,n.labels),a=t.tickPositions,h=i===a[0],f=i===a[a.length-1],m=(!o.step||1===o.step)&&1===t.tickInterval;a=a.info;var s,l=e.label;if(r=this.parameters.category||(r?_(r[i],d[i],i):i),p&&x(r)&&(r=E(p.lin2log(r))),t.dateTime)if(a)var g=c.time.resolveDTLFormat(n.dateTimeLabelFormats[!n.grid&&a.higherRanks[i]||a.unitName]),y=g.main;else x(r)&&(y=t.dateTime.getXDateFormat(r,n.dateTimeLabelFormats||{}));e.isFirst=h,e.isLast=f;var u={axis:t,chart:c,dateTimeLabelFormat:y,isFirst:h,isLast:f,pos:i,tick:e,tickPositionInfo:a,value:r};T(this,"labelFormat",u);var b=function(e){return o.formatter?o.formatter.call(e,e):o.format?(e.text=t.defaultLabelFormatter.call(e),w.format(o.format,e,c)):t.defaultLabelFormatter.call(e,e)};n=b.call(u,u);var v=g&&g.list;e.shortenLabel=v?function(){for(s=0;s<v.length;s++)if(C(u,{dateTimeLabelFormat:v[s]}),l.attr({text:b.call(u,u)}),l.getBBox().width<t.getSlotWidth(e)-2*o.padding)return;l.attr({text:""})}:void 0,m&&t._addedPlotLB&&e.moveLabel(n,o),S(l)||e.movedLabel?l&&l.textStr!==n&&!m&&(!l.textWidth||o.style.width||l.styles.width||l.css({width:null}),l.attr({text:n}),l.textPxLength=l.getBBox().width):(e.label=l=e.createLabel({x:0,y:0},n,o),e.rotation=0)},e.prototype.createLabel=function(e,t,n){var r=this.axis,i=r.chart;return(e=S(t)&&n.enabled?i.renderer.text(t,e.x,e.y,n.useHTML).add(r.labelGroup):null)&&(i.styledMode||e.css(o(n.style)),e.textPxLength=e.getBBox().width),e},e.prototype.destroy=function(){n(this,this.axis)},e.prototype.getPosition=function(e,t,n,r){var i=this.axis,o=i.chart,a=r&&o.oldChartHeight||o.chartHeight;return(e={x:e?E(i.translate(t+n,null,null,r)+i.transB):i.left+i.offset+(i.opposite?(r&&o.oldChartWidth||o.chartWidth)-i.right-i.left:0),y:e?a-i.bottom+i.offset-(i.opposite?i.height:0):E(a-i.translate(t+n,null,null,r)-i.transB)}).y=s(e.y,-1e5,1e5),T(this,"afterGetPosition",{pos:e}),e},e.prototype.getLabelPosition=function(e,t,n,r,c,i,p,d){var o=this.axis,h=o.transA,f=o.isLinked&&o.linkedParent?o.linkedParent.reversed:o.reversed,a=o.staggerLines,s=o.tickRotCorr||{x:0,y:0},m=r||o.reserveSpaceDefault?0:-o.labelOffset*("center"===o.labelAlign?.5:1),l={},u=c.y;return S(u)||(u=0===o.side?n.rotation?-8:-n.getBBox().height:2===o.side?s.y+8:Math.cos(n.rotation*g)*(s.y-n.getBBox(!1,0).height/2)),e=e+c.x+m+s.x-(i&&r?i*h*(f?-1:1):0),t=t+u-(i&&!r?i*h*(f?1:-1):0),a&&(n=p/(d||1)%a,o.opposite&&(n=a-n-1),t+=o.labelOffset/a*n),l.x=e,l.y=Math.round(t),T(this,"afterGetLabelPosition",{pos:l,tickmarkOffset:i,index:p}),l},e.prototype.getLabelSize=function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},e.prototype.getMarkPath=function(e,t,n,r,i,o){return o.crispLine([["M",e,t],["L",e+(i?0:-n),t+(i?n:0)]],r)},e.prototype.handleOverflow=function(e){var t=this.axis,c=t.options.labels,n=e.x,p=t.chart.chartWidth,r=t.chart.spacing,d=_(t.labelLeft,Math.min(t.pos,r[3]));r=_(t.labelRight,Math.max(t.isRadial?0:t.pos+t.len,p-r[1]));var i,h=this.label,o=this.rotation,a={left:0,center:.5,right:1}[t.labelAlign||h.attr("align")],s=h.getBBox().width,l=t.getSlotWidth(this),f={},u=l,m=1;o||"justify"!==c.overflow?0>o&&n-a*s<d?i=Math.round(n/Math.cos(o*g)-d):0<o&&n+a*s>r&&(i=Math.round((p-n)/Math.cos(o*g))):(p=n+(1-a)*s,n-a*s<d?u=e.x+u*(1-a)-d:p>r&&(u=r-e.x+u*a,m=-1),(u=Math.min(l,u))<l&&"center"===t.labelAlign&&(e.x+=m*(l-u-a*(l-Math.min(s,u)))),(s>u||t.autoRotation&&(h.styles||{}).width)&&(i=u)),i&&(this.shortenLabel?this.shortenLabel():(f.width=Math.floor(i)+"px",(c.style||{}).textOverflow||(f.textOverflow="ellipsis"),h.css(f)))},e.prototype.moveLabel=function(t,e){var n=_____WB$wombat$check$this$function_____(this),r=n.label,i=n.axis,o=i.reversed,a=!1;if(r&&r.textStr===t?(n.movedLabel=r,a=!0,delete n.label):l(i.ticks,function(e){a||e.isNew||e===n||!e.label||e.label.textStr!==t||(n.movedLabel=e.label,a=!0,e.labelPos=n.movedLabel.xy,delete e.label)}),!a&&(n.labelPos||r)){var s=n.labelPos||r.xy;r=i.horiz?o?0:i.width+i.left:s.x,i=i.horiz?s.y:o?i.width+i.left:0,n.movedLabel=n.createLabel({x:r,y:i},t,e),n.movedLabel&&n.movedLabel.attr({opacity:0})}},e.prototype.render=function(e,t,n){var r=this.axis,i=r.horiz,o=this.pos,a=_(this.tickmarkOffset,r.tickmarkOffset);a=(o=this.getPosition(i,o,a,t)).x;var s=o.y;r=i&&a===r.pos+r.len||!i&&s===r.pos?-1:1,i=_(n,this.label&&this.label.newOpacity,1),n=_(n,1),this.isActive=!0,this.renderGridLine(t,n,r),this.renderMark(o,n,r),this.renderLabel(o,t,i,e),this.isNew=!1,T(this,"afterRender")},e.prototype.renderGridLine=function(e,t,n){var r=this.axis,i=r.options,o={},c=this.pos,a=this.type,p=_(this.tickmarkOffset,r.tickmarkOffset),d=r.chart.renderer,s=this.gridLine,l=i.gridLineWidth,u=i.gridLineColor,h=i.gridLineDashStyle;"minor"===this.type&&(l=i.minorGridLineWidth,u=i.minorGridLineColor,h=i.minorGridLineDashStyle),s||(r.chart.styledMode||(o.stroke=u,o["stroke-width"]=l||0,o.dashstyle=h),a||(o.zIndex=1),e&&(t=0),this.gridLine=s=d.path().attr(o).addClass("highcharts-"+(a?a+"-":"")+"grid-line").add(r.gridGroup)),s&&(n=r.getPlotLinePath({value:c+p,lineWidth:s.strokeWidth()*n,force:"pass",old:e}))&&s[e||this.isNew?"attr":"animate"]({d:n,opacity:t})},e.prototype.renderMark=function(e,t,n){var r=this.axis,i=r.options,o=r.chart.renderer,a=this.type,s=r.tickSize(a?a+"Tick":"tick"),l=e.x;e=e.y;var c=_(i["minor"!==a?"tickWidth":"minorTickWidth"],!a&&r.isXAxis?1:0);i=i["minor"!==a?"tickColor":"minorTickColor"];var u=this.mark,p=!u;s&&(r.opposite&&(s[0]=-s[0]),u||(this.mark=u=o.path().addClass("highcharts-"+(a?a+"-":"")+"tick").add(r.axisGroup),r.chart.styledMode||u.attr({stroke:i,"stroke-width":c})),u[p?"attr":"animate"]({d:this.getMarkPath(l,e,s[0],u.strokeWidth()*n,r.horiz,o),opacity:t}))},e.prototype.renderLabel=function(e,c,t,n){var r=this.axis,i=r.horiz,o=r.options,a=this.label,s=o.labels,l=s.step;r=_(this.tickmarkOffset,r.tickmarkOffset);var p=e.x;e=e.y;var u=!0;a&&x(p)&&(a.xy=e=this.getLabelPosition(p,e,a,i,s,r,n,l),this.isFirst&&!this.isLast&&!o.showFirstLabel||this.isLast&&!this.isFirst&&!o.showLastLabel?u=!1:!i||s.step||s.rotation||c||0===t||this.handleOverflow(e),l&&n%l&&(u=!1),u&&x(e.y)?(e.opacity=t,a[this.isNewLabel?"attr":"animate"](e),this.isNewLabel=!1):(a.attr("y",-9999),this.isNewLabel=!0))},e.prototype.replaceMovedLabel=function(){var e=this.label,t=this.axis,n=t.reversed;if(e&&!this.isNew){var r=t.horiz?n?t.left:t.width+t.left:e.xy.x;n=t.horiz?e.xy.y:n?t.width+t.top:t.top,e.animate({x:r,y:n,opacity:0},void 0,e.destroy),delete this.label}t.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel},e}()}),e(t,"Core/Axis/Axis.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/Axis/AxisDefaults.js"],t["Core/Color/Color.js"],t["Core/DefaultOptions.js"],t["Core/Foundation.js"],t["Core/Globals.js"],t["Core/Axis/Tick.js"],t["Core/Utilities.js"]],function(n,t,l,r,i,E,v,e){var S=n.animObject,c=r.defaultOptions,a=i.registerEventOptions,h=E.deg2rad,d=e.arrayMax,f=e.arrayMin,T=e.clamp,b=e.correctFloat,x=e.defined,o=e.destroyObjectProperties,u=e.erase,k=e.error,p=e.extend,_=e.fireEvent,M=e.getMagnitude,m=e.isArray,w=e.isNumber,g=e.isString,s=e.merge,O=e.normalizeTickInterval,C=e.objectEach,A=e.pick,y=e.relativeLength,D=e.removeEvent,L=e.splat,I=e.syncTimeout;return n=function(){function e(e,t){this.zoomEnabled=this.width=this.visible=this.userOptions=this.translationSlope=this.transB=this.transA=_____WB$wombat$check$this$function_____(this).top=this.ticks=this.tickRotCorr=this.tickPositions=this.tickmarkOffset=this.tickInterval=this.tickAmount=this.side=this.series=this.right=this.positiveValuesOnly=this.pos=this.pointRangePadding=this.pointRange=this.plotLinesAndBandsGroups=this.plotLinesAndBands=this.paddedTicks=this.overlap=this.options=this.offset=this.names=this.minPixelPadding=this.minorTicks=this.minorTickInterval=this.min=this.maxLabelLength=this.max=this.len=this.left=this.labelFormatter=this.labelEdge=this.isLinked=this.height=this.hasVisibleSeries=this.hasNames=this.eventOptions=this.coll=this.closestPointRange=this.chart=this.categories=this.bottom=this.alternateBands=void 0,this.init(e,t)}return e.prototype.init=function(e,t){var n=t.isX;this.chart=e,this.horiz=e.inverted&&!this.isZAxis?!n:n,this.isXAxis=n,this.coll=this.coll||(n?"xAxis":"yAxis"),_(this,"init",{userOptions:t}),this.opposite=A(t.opposite,this.opposite),this.side=A(t.side,this.side,this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(t);var r=this.options,i=r.labels,o=r.type;this.userOptions=t,this.minPixelPadding=0,this.reversed=A(r.reversed,this.reversed),this.visible=r.visible,this.zoomEnabled=r.zoomEnabled,this.hasNames="category"===o||!0===r.categories,this.categories=r.categories||this.hasNames,this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=x(r.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=r.minRange||r.maxZoom,this.range=r.range,this.offset=r.offset||0,this.min=this.max=null,t=A(r.crosshair,L(e.options.tooltip.crosshairs)[n?0:1]),this.crosshair=!0===t?{}:t,-1===e.axes.indexOf(this)&&(n?e.axes.splice(e.xAxis.length,0,_____WB$wombat$check$this$function_____(this)):e.axes.push(this),e[this.coll].push(this)),this.series=this.series||[],e.inverted&&!this.isZAxis&&n&&void 0===this.reversed&&(this.reversed=!0),this.labelRotation=w(i.rotation)?i.rotation:void 0,a(this,r),_(this,"afterInit")},e.prototype.setOptions=function(e){this.options=s(t.defaultXAxisOptions,"yAxis"===this.coll&&t.defaultYAxisOptions,[t.defaultTopAxisOptions,t.defaultRightAxisOptions,t.defaultBottomAxisOptions,t.defaultLeftAxisOptions][this.side],s(c[this.coll],e)),_(this,"afterSetOptions",{userOptions:e})},e.prototype.defaultLabelFormatter=function(e){var t=this.axis;e=this.chart.numberFormatter;var n=w(this.value)?this.value:NaN,r=t.chart.time,i=this.dateTimeLabelFormat,o=c.lang,a=o.numericSymbols;o=o.numericSymbolMagnitude||1e3;var s=t.logarithmic?Math.abs(n):t.tickInterval,l=a&&a.length;if(t.categories)var u=""+this.value;else if(i)u=r.dateFormat(i,n);else if(l&&1e3<=s)for(;l--&&void 0===u;)s>=(t=Math.pow(o,l+1))&&0==10*n%t&&null!==a[l]&&0!==n&&(u=e(n/t,-1)+a[l]);return void 0===u&&(u=1e4<=Math.abs(n)?e(n,-1):e(n,-1,void 0,"")),u},e.prototype.getSeriesExtremes=function(){var o,a=_____WB$wombat$check$this$function_____(this),s=a.chart;_(this,"getSeriesExtremes",null,function(){a.hasVisibleSeries=!1,a.dataMin=a.dataMax=a.threshold=null,a.softThreshold=!a.isXAxis,a.stacking&&a.stacking.buildStacks(),a.series.forEach(function(e){if(e.visible||!s.options.chart.ignoreHiddenSeries){var t=e.options,n=t.threshold;if(a.hasVisibleSeries=!0,a.positiveValuesOnly&&0>=n&&(n=null),a.isXAxis){if((t=e.xData).length){t=a.logarithmic?t.filter(a.validatePositiveValue):t;var r=(o=e.getXExtremes(t)).min,i=o.max;w(r)||r instanceof Date||(t=t.filter(w),r=(o=e.getXExtremes(t)).min,i=o.max),t.length&&(a.dataMin=Math.min(A(a.dataMin,r),r),a.dataMax=Math.max(A(a.dataMax,i),i))}}else e=e.applyExtremes(),w(e.dataMin)&&(r=e.dataMin,a.dataMin=Math.min(A(a.dataMin,r),r)),w(e.dataMax)&&(i=e.dataMax,a.dataMax=Math.max(A(a.dataMax,i),i)),x(n)&&(a.threshold=n),(!t.softThreshold||a.positiveValuesOnly)&&(a.softThreshold=!1)}})}),_(this,"afterGetSeriesExtremes")},e.prototype.translate=function(e,t,c,n,r,i){var o=this.linkedParent||_____WB$wombat$check$this$function_____(this),a=n&&o.old?o.old.min:o.min,s=o.minPixelPadding;r=(o.isOrdinal||o.brokenAxis&&o.brokenAxis.hasBreaks||o.logarithmic&&r)&&o.lin2val;var l=1,u=0;return(n=n&&o.old?o.old.transA:o.transA)||(n=o.transA),c&&(l*=-1,u=o.len),o.reversed&&(u-=(l*=-1)*(o.sector||o.len)),t?(e=(e*l+u-s)/n+a,r&&(e=o.lin2val(e))):(r&&(e=o.val2lin(e)),e=w(a)?l*(e-a)*n+u+l*s+(w(i)?n*i:0):void 0),e},e.prototype.toPixels=function(e,t){return this.translate(e,!1,!this.horiz,null,!0)+(t?0:this.pos)},e.prototype.toValue=function(e,t){return this.translate(e-(t?0:this.pos),!0,!this.horiz,null,!0)},e.prototype.getPlotLinePath=function(e){function c(e,t,n){return("pass"!==u&&e<t||e>n)&&(u?e=T(e,t,n):p=!0),e}var t,n,r,i,p,o=_____WB$wombat$check$this$function_____(this),a=o.chart,d=o.left,h=o.top,s=e.old,f=e.value,m=e.lineWidth,g=s&&a.oldChartHeight||a.chartHeight,y=s&&a.oldChartWidth||a.chartWidth,b=o.transB,l=e.translatedValue,u=e.force;return e={value:f,lineWidth:m,old:s,force:u,acrossPanes:e.acrossPanes,translatedValue:l},_(this,"getPlotLinePath",e,function(e){l=A(l,o.translate(f,null,null,s)),l=T(l,-1e5,1e5),t=r=Math.round(l+b),n=i=Math.round(g-l-b),w(l)?o.horiz?(n=h,i=g-o.bottom,t=r=c(t,d,d+o.width)):(t=d,r=y-o.right,n=i=c(n,h,h+o.height)):(p=!0,u=!1),e.path=p&&!u?null:a.renderer.crispLine([["M",t,n],["L",r,i]],m||1)}),e.path},e.prototype.getLinearTickPositions=function(e,t,n){var r=b(Math.floor(t/e)*e);n=b(Math.ceil(n/e)*e);var i,o=[];if(b(r+e)===r&&(i=20),this.single)return[t];for(t=r;t<=n&&(o.push(t),(t=b(t+e,i))!==a);)var a=t;return o},e.prototype.getMinorTickInterval=function(){var e=this.options;return!0===e.minorTicks?A(e.minorTickInterval,"auto"):!1===e.minorTicks?null:e.minorTickInterval},e.prototype.getMinorTickPositions=function(){var e=this.options,t=this.tickPositions,r=this.minorTickInterval,n=this.pointRangePadding||0,i=this.min-n,o=(n=this.max+n)-i,a=[];if(o&&o/r<this.len/3){var s=this.logarithmic;if(s)this.paddedTicks.forEach(function(e,t,n){t&&a.push.apply(a,s.getLogTickPositions(r,n[t-1],n[t],!0))});else if(this.dateTime&&"auto"===this.getMinorTickInterval())a=a.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(r),i,n,e.startOfWeek));else for(e=i+(t[0]-i)%r;e<=n&&e!==a[0];e+=r)a.push(e)}return 0!==a.length&&this.trimTicks(a),a},e.prototype.adjustForMinRange=function(){var t,n,r,c,e=this.options,i=this.logarithmic,o=this.min,a=this.max,s=0;if(this.isXAxis&&void 0===this.minRange&&!i&&(x(e.min)||x(e.max)||x(e.floor)||x(e.ceiling)?this.minRange=null:(this.series.forEach(function(e){if(r=e.xData,c=e.xIncrement?1:r.length-1,1<r.length)for(t=c;0<t;t--)n=r[t]-r[t-1],(!s||n<s)&&(s=n)}),this.minRange=Math.min(5*s,this.dataMax-this.dataMin))),a-o<this.minRange){var p=this.dataMax-this.dataMin>=this.minRange,l=this.minRange,u=(l-a+o)/2;u=[o-u,A(e.min,o-u)],p&&(u[2]=this.logarithmic?this.logarithmic.log2lin(this.dataMin):this.dataMin),a=[(o=d(u))+l,A(e.max,o+l)],p&&(a[2]=i?i.log2lin(this.dataMax):this.dataMax),(a=f(a))-o<l&&(u[0]=a-l,u[1]=A(e.min,a-l),o=d(u))}this.min=o,this.max=a},e.prototype.getClosest=function(){var r;return this.categories?r=1:this.series.forEach(function(e){var t=e.closestPointRange,n=e.visible||!e.chart.options.chart.ignoreHiddenSeries;!e.noSharedTooltip&&x(t)&&n&&(r=x(r)?Math.min(r,t):t)}),r},e.prototype.nameToX=function(e){var t=m(this.categories),n=t?this.categories:this.names,r=e.options.x;if(e.series.requireSorting=!1,x(r)||(r=this.options.uniqueNames?t?n.indexOf(e.name):A(n.keys[e.name],-1):e.series.autoIncrement()),-1===r){if(!t)var i=n.length}else i=r;return void 0!==i&&(this.names[i]=e.name,this.names.keys[e.name]=i),i},e.prototype.updateNames=function(){var i=_____WB$wombat$check$this$function_____(this),t=this.names;0<t.length&&(Object.keys(t.keys).forEach(function(e){delete t.keys[e]}),t.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(function(r){r.xIncrement=null,r.points&&!r.isDirtyData||(i.max=Math.max(i.max,r.xData.length-1),r.processData(),r.generatePoints()),r.data.forEach(function(e,t){if(e&&e.options&&void 0!==e.name){var n=i.nameToX(e);void 0!==n&&n!==e.x&&(e.x=n,r.xData[t]=n)}})}))},e.prototype.setAxisTranslation=function(){var r=_____WB$wombat$check$this$function_____(this),e=r.max-r.min,t=r.linkedParent,i=!!r.categories,o=r.isXAxis,a=r.axisPointRange||0,s=0,l=0,n=r.transA;if(o||i||a){var u=r.getClosest();t?(s=t.minPointOffset,l=t.pointRangePadding):r.series.forEach(function(e){var t=i?1:o?A(e.options.pointRange,u,0):r.axisPointRange||0,n=e.options.pointPlacement;a=Math.max(a,t),r.single&&!i||(e=e.is("xrange")?!o:o,s=Math.max(s,e&&g(n)?0:t/2),l=Math.max(l,e&&"on"===n?0:t))}),t=r.ordinal&&r.ordinal.slope&&u?r.ordinal.slope/u:1,r.minPointOffset=s*=t,r.pointRangePadding=l*=t,r.pointRange=Math.min(a,r.single&&i?1:e),o&&(r.closestPointRange=u)}r.translationSlope=r.transA=n=r.staticScale||r.len/(e+l||1),r.transB=r.horiz?r.left:r.bottom,r.minPixelPadding=n*s,_(this,"afterSetAxisTranslation")},e.prototype.minFromRange=function(){return this.max-this.range},e.prototype.setTickInterval=function(e){var t=this.chart,n=this.logarithmic,r=this.options,c=this.isXAxis,i=this.isLinked,p=r.tickPixelInterval,d=this.categories,h=this.softThreshold,f=r.maxPadding,m=r.minPadding,o=w(r.tickInterval)&&0<=r.tickInterval?r.tickInterval:void 0,a=w(this.threshold)?this.threshold:null;this.dateTime||d||i||this.getTickAmount();var s=A(this.userMin,r.min),l=A(this.userMax,r.max);if(i){this.linkedParent=t[this.coll][r.linkedTo];var u=this.linkedParent.getExtremes();this.min=A(u.min,u.dataMin),this.max=A(u.max,u.dataMax),r.type!==this.linkedParent.options.type&&k(11,1,t)}else{if(h&&x(a))if(this.dataMin>=a)u=a,m=0;else if(this.dataMax<=a){var g=a;f=0}this.min=A(s,u,this.dataMin),this.max=A(l,g,this.dataMax)}if(n&&(this.positiveValuesOnly&&!e&&0>=Math.min(this.min,A(this.dataMin,this.min))&&k(10,1,t),this.min=b(n.log2lin(this.min),16),this.max=b(n.log2lin(this.max),16)),this.range&&x(this.max)&&(this.userMin=this.min=s=Math.max(this.dataMin,this.minFromRange()),this.userMax=l=this.max,this.range=null),_(this,"foundExtremes"),this.beforePadding&&this.beforePadding(),this.adjustForMinRange(),!(d||this.axisPointRange||this.stacking&&this.stacking.usePercentage||i)&&x(this.min)&&x(this.max)&&(t=this.max-this.min)&&(!x(s)&&m&&(this.min-=t*m),!x(l)&&f&&(this.max+=t*f)),w(this.userMin)||(w(r.softMin)&&r.softMin<this.min&&(this.min=s=r.softMin),w(r.floor)&&(this.min=Math.max(this.min,r.floor))),w(this.userMax)||(w(r.softMax)&&r.softMax>this.max&&(this.max=l=r.softMax),w(r.ceiling)&&(this.max=Math.min(this.max,r.ceiling))),h&&x(this.dataMin)&&(a=a||0,!x(s)&&this.min<a&&this.dataMin>=a?this.min=this.options.minRange?Math.min(a,this.max-this.minRange):a:!x(l)&&this.max>a&&this.dataMax<=a&&(this.max=this.options.minRange?Math.max(a,this.min+this.minRange):a)),w(this.min)&&w(this.max)&&!this.chart.polar&&this.min>this.max&&(x(this.options.min)?this.max=this.min:x(this.options.max)&&(this.min=this.max)),this.tickInterval=this.min===this.max||void 0===this.min||void 0===this.max?1:i&&this.linkedParent&&!o&&p===this.linkedParent.options.tickPixelInterval?o=this.linkedParent.tickInterval:A(o,this.tickAmount?(this.max-this.min)/Math.max(this.tickAmount-1,1):void 0,d?1:(this.max-this.min)*p/Math.max(this.len,p)),c&&!e){var y=this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max);this.series.forEach(function(e){e.forceCrop=e.forceCropping&&e.forceCropping(),e.processData(y)}),_(this,"postProcessData",{hasExtemesChanged:y})}this.setAxisTranslation(),_(this,"initialAxisTranslation"),this.pointRange&&!o&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval)),e=A(r.minTickInterval,this.dateTime&&!this.series.some(function(e){return e.noSharedTooltip})?this.closestPointRange:0),!o&&this.tickInterval<e&&(this.tickInterval=e),this.dateTime||this.logarithmic||o||(this.tickInterval=O(this.tickInterval,void 0,M(this.tickInterval),A(r.allowDecimals,.5>this.tickInterval||void 0!==this.tickAmount),!!this.tickAmount)),this.tickAmount||(this.tickInterval=this.unsquish()),this.setTickPositions()},e.prototype.setTickPositions=function(){var e=this.options,t=e.tickPositions,n=this.getMinorTickInterval(),r=this.hasVerticalPanning(),i="colorAxis"===this.coll,o=(i||!r)&&e.startOnTick;r=(i||!r)&&e.endOnTick,i=e.tickPositioner,this.tickmarkOffset=this.categories&&"between"===e.tickmarkPlacement&&1===this.tickInterval?.5:0,this.minorTickInterval="auto"===n&&this.tickInterval?this.tickInterval/5:n,this.single=this.min===this.max&&x(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==e.allowDecimals),this.tickPositions=n=t&&t.slice(),!n&&(this.ordinal&&this.ordinal.positions||!((this.max-this.min)/this.tickInterval>Math.max(2*this.len,200))?n=this.dateTime?this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,e.units),this.min,this.max,e.startOfWeek,this.ordinal&&this.ordinal.positions,this.closestPointRange,!0):this.logarithmic?this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max):(n=[this.min,this.max],k(19,!1,this.chart)),n.length>this.len&&(n=[n[0],n.pop()])[0]===n[1]&&(n.length=1),this.tickPositions=n,i&&(i=i.apply(this,[this.min,this.max])))&&(this.tickPositions=n=i),this.paddedTicks=n.slice(0),this.trimTicks(n,o,r),this.isLinked||(this.single&&2>n.length&&!this.categories&&!this.series.some(function(e){return e.is("heatmap")&&"between"===e.options.pointPlacement})&&(this.min-=.5,this.max+=.5),t||i||this.adjustTickAmount()),_(this,"afterSetTickPositions")},e.prototype.trimTicks=function(e,t,n){var r=e[0],i=e[e.length-1],o=!this.isOrdinal&&this.minPointOffset||0;if(_(this,"trimTicks"),!this.isLinked){if(t&&-1/0!==r)this.min=r;else for(;this.min-o>e[0];)e.shift();if(n)this.max=i;else for(;this.max+o<e[e.length-1];)e.pop();0===e.length&&x(r)&&!this.options.tickPositions&&e.push((i+r)/2)}},e.prototype.alignToOthers=function(){var n,r={},e=this.options;return!1!==this.chart.options.chart.alignTicks&&e.alignTicks&&!1!==e.startOnTick&&!1!==e.endOnTick&&!this.logarithmic&&this.chart[this.coll].forEach(function(e){var t=e.options;t=[e.horiz?t.left:t.top,t.width,t.height,t.pane].join(),e.series.length&&(r[t]?n=!0:r[t]=1)}),n},e.prototype.getTickAmount=function(){var e=this.options,t=e.tickPixelInterval,n=e.tickAmount;!x(e.tickInterval)&&!n&&this.len<t&&!this.isRadial&&!this.logarithmic&&e.startOnTick&&e.endOnTick&&(n=2),!n&&this.alignToOthers()&&(n=Math.ceil(this.len/t)+1),4>n&&(this.finalTickAmt=n,n=5),this.tickAmount=n},e.prototype.adjustTickAmount=function(){var e=this.options,t=this.tickInterval,n=this.tickPositions,r=this.tickAmount,i=this.finalTickAmt,o=n&&n.length,a=A(this.threshold,this.softThreshold?0:null);if(this.hasData()&&w(this.min)&&w(this.max)){if(o<r){for(;n.length<r;)n.length%2||this.min===a?n.push(b(n[n.length-1]+t)):n.unshift(b(n[0]-t));this.transA*=(o-1)/(r-1),this.min=e.startOnTick?n[0]:Math.min(this.min,n[0]),this.max=e.endOnTick?n[n.length-1]:Math.max(this.max,n[n.length-1])}else o>r&&(this.tickInterval*=2,this.setTickPositions());if(x(i)){for(t=e=n.length;t--;)(3===i&&1==t%2||2>=i&&0<t&&t<e-1)&&n.splice(t,1);this.finalTickAmt=void 0}}},e.prototype.setScale=function(){var t=!1,n=!1;this.series.forEach(function(e){t=t||e.isDirtyData||e.isDirty,n=n||e.xAxis&&e.xAxis.isDirty||!1}),this.setAxisSize();var e=this.len!==(this.old&&this.old.len);e||t||n||this.isLinked||this.forceRedraw||this.userMin!==(this.old&&this.old.userMin)||this.userMax!==(this.old&&this.old.userMax)||this.alignToOthers()?(this.stacking&&this.stacking.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.isDirty||(this.isDirty=e||this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max))):this.stacking&&this.stacking.cleanStacks(),t&&this.panningState&&(this.panningState.isDirty=!0),_(this,"afterSetScale")},e.prototype.setExtremes=function(e,t,n,r,i){var o=_____WB$wombat$check$this$function_____(this),a=o.chart;n=A(n,!0),o.series.forEach(function(e){delete e.kdTree}),i=p(i,{min:e,max:t}),_(o,"setExtremes",i,function(){o.userMin=e,o.userMax=t,o.eventArgs=i,n&&a.redraw(r)})},e.prototype.zoom=function(e,t){var r=_____WB$wombat$check$this$function_____(this),i=this.dataMin,o=this.dataMax,n=this.options,a=Math.min(i,A(n.min,i)),s=Math.max(o,A(n.max,o));return _(this,"zoom",e={newMin:e,newMax:t},function(e){var t=e.newMin,n=e.newMax;t===r.min&&n===r.max||(r.allowZoomOutside||(x(i)&&(t<a&&(t=a),t>s&&(t=s)),x(o)&&(n<a&&(n=a),n>s&&(n=s))),r.displayBtn=void 0!==t||void 0!==n,r.setExtremes(t,n,!1,void 0,{trigger:"zoom"})),e.zoomed=!0}),e.zoomed},e.prototype.setAxisSize=function(){var e=this.chart,t=this.options,n=t.offsets||[0,0,0,0],r=this.horiz,i=this.width=Math.round(y(A(t.width,e.plotWidth-n[3]+n[1]),e.plotWidth)),o=this.height=Math.round(y(A(t.height,e.plotHeight-n[0]+n[2]),e.plotHeight)),a=_____WB$wombat$check$this$function_____(this).top=Math.round(y(A(t.top,e.plotTop+n[0]),e.plotHeight,e.plotTop));t=this.left=Math.round(y(A(t.left,e.plotLeft+n[3]),e.plotWidth,e.plotLeft)),this.bottom=e.chartHeight-o-a,this.right=e.chartWidth-i-t,this.len=Math.max(r?i:o,0),this.pos=r?t:a},e.prototype.getExtremes=function(){var e=this.logarithmic;return{min:e?b(e.lin2log(this.min)):this.min,max:e?b(e.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},e.prototype.getThreshold=function(e){var t=this.logarithmic,n=t?t.lin2log(this.min):this.min;return t=t?t.lin2log(this.max):this.max,null===e||-1/0===e?e=n:1/0===e?e=t:n>e?e=n:t<e&&(e=t),this.translate(e,0,1,0,1)},e.prototype.autoLabelAlign=function(e){var t=(A(e,0)-90*this.side+720)%360;return _(this,"autoLabelAlign",e={align:"center"},function(e){15<t&&165>t?e.align="right":195<t&&345>t&&(e.align="left")}),e.align},e.prototype.tickSize=function(e){var t=this.options,n=A(t["tick"===e?"tickWidth":"minorTickWidth"],"tick"===e&&this.isXAxis&&!this.categories?1:0),r=t["tick"===e?"tickLength":"minorTickLength"];if(n&&r){"inside"===t[e+"Position"]&&(r=-r);var i=[r,n]}return _(this,"afterTickSize",e={tickSize:i}),e.tickSize},e.prototype.labelMetrics=function(){var e=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style.fontSize,this.ticks[e]&&this.ticks[e].label)},e.prototype.unsquish=function(){var n,r,e=this.options.labels,c=this.horiz,i=this.tickInterval,o=this.len/(((this.categories?1:0)+this.max-this.min)/i),a=e.rotation,s=this.labelMetrics(),l=Math.max(this.max-this.min,0),p=function(e){var t=e/(o||1);return(t=1<t?Math.ceil(t):1)*i>l&&1/0!==e&&1/0!==o&&l&&(t=Math.ceil(l/i)),b(t*i)},u=i,d=Number.MAX_VALUE;if(c){if(!e.staggerLines&&!e.step)if(w(a))var t=[a];else o<e.autoRotationLimit&&(t=e.autoRotation);t&&t.forEach(function(e){if(e===a||e&&-90<=e&&90>=e){var t=(r=p(Math.abs(s.h/Math.sin(h*e))))+Math.abs(e/360);t<d&&(d=t,n=e,u=r)}})}else e.step||(u=p(s.h));return this.autoRotation=t,this.labelRotation=A(n,w(a)?a:0),u},e.prototype.getSlotWidth=function(e){var t=this.chart,n=this.horiz,r=this.options.labels,i=Math.max(this.tickPositions.length-(this.categories?0:1),1),o=t.margin[3];if(e&&w(e.slotWidth))return e.slotWidth;if(n&&2>r.step)return r.rotation?0:(this.staggerLines||1)*this.len/i;if(!n){if(void 0!==(e=r.style.width))return parseInt(String(e),10);if(o)return o-t.spacing[3]}return.33*t.chartWidth},e.prototype.renderUnsquish=function(){var e=this.chart,c=e.renderer,t=this.tickPositions,p=this.ticks,n=this.options.labels,d=n.style,h=this.horiz,r=this.getSlotWidth(),i=Math.max(1,Math.round(r-2*n.padding)),o={},a=this.labelMetrics(),f=d.textOverflow,s=0;if(g(n.rotation)||(o.rotation=n.rotation||0),t.forEach(function(e){(e=p[e]).movedLabel&&e.replaceMovedLabel(),e&&e.label&&e.label.textPxLength>s&&(s=e.label.textPxLength)}),this.maxLabelLength=s,this.autoRotation)s>i&&s>a.h?o.rotation=this.labelRotation:this.labelRotation=0;else if(r){var l=i;if(!f){var m="clip";for(i=t.length;!h&&i--;){var u=t[i];(u=p[u].label)&&(u.styles&&"ellipsis"===u.styles.textOverflow?u.css({textOverflow:"clip"}):u.textPxLength>r&&u.css({width:r+"px"}),u.getBBox().height>this.len/t.length-(a.h-a.f)&&(u.specificTextOverflow="ellipsis"))}}}o.rotation&&(l=s>.5*e.chartHeight?.33*e.chartHeight:s,f||(m="ellipsis")),(this.labelAlign=n.align||this.autoLabelAlign(this.labelRotation))&&(o.align=this.labelAlign),t.forEach(function(e){var t=(e=p[e])&&e.label,n=d.width,r={};t&&(t.attr(o),e.shortenLabel?e.shortenLabel():l&&!n&&"nowrap"!==d.whiteSpace&&(l<t.textPxLength||"SPAN"===t.element.tagName)?(r.width=l+"px",f||(r.textOverflow=t.specificTextOverflow||m),t.css(r)):t.styles&&t.styles.width&&!r.width&&!n&&t.css({width:null}),delete t.specificTextOverflow,e.rotation=o.rotation)},_____WB$wombat$check$this$function_____(this)),this.tickRotCorr=c.rotCorr(a.b,this.labelRotation||0,0!==this.side)},e.prototype.hasData=function(){return this.series.some(function(e){return e.hasData()})||this.options.showEmpty&&x(this.min)&&x(this.max)},e.prototype.addTitle=function(e){var t,n=this.chart.renderer,r=this.horiz,i=this.opposite,o=this.options.title,a=this.chart.styledMode;this.axisTitle||((t=o.textAlign)||(t=(r?{low:"left",middle:"center",high:"right"}:{low:i?"right":"left",middle:"center",high:i?"left":"right"})[o.align]),this.axisTitle=n.text(o.text||"",0,0,o.useHTML).attr({zIndex:7,rotation:o.rotation,align:t}).addClass("highcharts-axis-title"),a||this.axisTitle.css(s(o.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0),a||o.style.width||this.isRadial||this.axisTitle.css({width:this.len+"px"}),this.axisTitle[e?"show":"hide"](e)},e.prototype.generateTick=function(e){var t=this.ticks;t[e]?t[e].addLabel():t[e]=new v(this,e)},e.prototype.getOffset=function(){var c=_____WB$wombat$check$this$function_____(this),t=_____WB$wombat$check$this$function_____(this),e=t.chart,n=t.horiz,r=t.options,i=t.side,p=t.ticks,o=t.tickPositions,d=t.coll,h=t.axisParent,f=e.renderer,m=e.inverted&&!t.isZAxis?[1,0,3,2][i]:i,a=t.hasData(),s=r.title,l=r.labels,g=e.axisOffset;e=e.clipOffset;var y,b=[-1,1,1,-1][i],v=r.className,w=0,E=0,u=0;if(t.showAxis=y=a||r.showEmpty,t.staggerLines=t.horiz&&l.staggerLines||void 0,!t.axisGroup){var S=function(e,t,n){return f.g(e).attr({zIndex:n}).addClass("highcharts-"+d.toLowerCase()+t+" "+(c.isRadial?"highcharts-radial-axis"+t+" ":"")+(v||"")).add(h)};t.gridGroup=S("grid","-grid",r.gridZIndex),t.axisGroup=S("axis","",r.zIndex),t.labelGroup=S("axis-labels","-labels",l.zIndex)}if(a||t.isLinked?(o.forEach(function(e){t.generateTick(e)}),t.renderUnsquish(),t.reserveSpaceDefault=0===i||2===i||{1:"left",3:"right"}[i]===t.labelAlign,A(l.reserveSpace,"center"===t.labelAlign||null,t.reserveSpaceDefault)&&o.forEach(function(e){u=Math.max(p[e].getLabelSize(),u)}),t.staggerLines&&(u*=t.staggerLines),t.labelOffset=u*(t.opposite?-1:1)):C(p,function(e,t){e.destroy(),delete p[t]}),s&&s.text&&!1!==s.enabled&&(t.addTitle(y),y&&!1!==s.reserveSpace)){t.titleOffset=w=t.axisTitle.getBBox()[n?"height":"width"];var T=s.offset;E=x(T)?0:A(s.margin,n?5:10)}t.renderLine(),t.offset=b*A(r.offset,g[i]?g[i]+(r.margin||0):0),t.tickRotCorr=t.tickRotCorr||{x:0,y:0},s=0===i?-t.labelMetrics().h:2===i?t.tickRotCorr.y:0,a=Math.abs(u)+E,u&&(a=a-s+b*(n?A(l.y,t.tickRotCorr.y+8*b):l.x)),t.axisTitleMargin=A(T,a),t.getMaxLabelDimensions&&(t.maxLabelDimensions=t.getMaxLabelDimensions(p,o)),"colorAxis"!==d&&(n=this.tickSize("tick"),g[i]=Math.max(g[i],(t.axisTitleMargin||0)+w+b*t.offset,a,o&&o.length&&n?n[0]+b*t.offset:0),r=!t.axisLine||r.offset?0:2*Math.floor(t.axisLine.strokeWidth()/2),e[m]=Math.max(e[m],r)),_(this,"afterGetOffset")},e.prototype.getLinePath=function(e){var t=this.chart,n=this.opposite,r=this.offset,i=this.horiz,o=this.left+(n?this.width:0)+r;return r=t.chartHeight-this.bottom-(n?this.height:0)+r,n&&(e*=-1),t.renderer.crispLine([["M",i?this.left:o,i?r:_____WB$wombat$check$this$function_____(this).top],["L",i?t.chartWidth-this.right:o,i?r:t.chartHeight-this.bottom]],e)},e.prototype.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}))},e.prototype.getTitlePosition=function(){var e=this.horiz,t=this.left,n=_____WB$wombat$check$this$function_____(this).top,r=this.len,i=this.options.title,o=e?t:n,a=this.opposite,s=this.offset,l=i.x,c=i.y,u=this.axisTitle,p=this.chart.renderer.fontMetrics(i.style.fontSize,u);return u=Math.max(u.getBBox(null,0).height-p.h-1,0),r={low:o+(e?0:r),middle:o+r/2,high:o+(e?r:0)}[i.align],t=(e?n+this.height:t)+(e?1:-1)*(a?-1:1)*this.axisTitleMargin+[-u,u,p.f,-u][this.side],e={x:e?r+l:t+(a?this.width:0)+s+l,y:e?t+c-(a?this.height:0)+s:r+c},_(this,"afterGetTitlePosition",{titlePosition:e}),e},e.prototype.renderMinorTick=function(e,t){var n=this.minorTicks;n[e]||(n[e]=new v(this,e,"minor")),t&&n[e].isNew&&n[e].render(null,!0),n[e].render(null,!1,1)},e.prototype.renderTick=function(e,t,n){var r=this.ticks;(!this.isLinked||e>=this.min&&e<=this.max||this.grid&&this.grid.isColumn)&&(r[e]||(r[e]=new v(this,e)),n&&r[e].isNew&&r[e].render(t,!0,-1),r[e].render(t))},e.prototype.render=function(){var c,n,r=_____WB$wombat$check$this$function_____(this),p=r.chart,i=r.logarithmic,e=r.options,d=r.isLinked,o=r.tickPositions,t=r.axisTitle,a=r.ticks,h=r.minorTicks,s=r.alternateBands,f=e.stackLabels,m=e.alternateGridColor,l=r.tickmarkOffset,u=r.axisLine,g=r.showAxis,y=S(p.renderer.globalAnimation);if(r.labelEdge.length=0,r.overlap=!1,[a,h,s].forEach(function(e){C(e,function(e){e.isActive=!1})}),r.hasData()||d){var b=r.chart.hasRendered&&r.old&&w(r.old.min);r.minorTickInterval&&!r.categories&&r.getMinorTickPositions().forEach(function(e){r.renderMinorTick(e,b)}),o.length&&(o.forEach(function(e,t){r.renderTick(e,t,b)}),l&&(0===r.min||r.single)&&(a[-1]||(a[-1]=new v(r,-1,null,!0)),a[-1].render(-1))),m&&o.forEach(function(e,t){n=void 0!==o[t+1]?o[t+1]+l:r.max-l,0==t%2&&e<r.max&&n<=r.max+(p.polar?-l:l)&&(s[e]||(s[e]=new E.PlotLineOrBand(r)),c=e+l,s[e].options={from:i?i.lin2log(c):c,to:i?i.lin2log(n):n,color:m,className:"highcharts-alternate-grid"},s[e].render(),s[e].isActive=!0)}),r._addedPlotLB||(r._addedPlotLB=!0,(e.plotLines||[]).concat(e.plotBands||[]).forEach(function(e){r.addPlotBandOrLine(e)}))}[a,h,s].forEach(function(t){var n=[],e=y.duration;C(t,function(e,t){e.isActive||(e.render(t,!1,0),e.isActive=!1,n.push(t))}),I(function(){for(var e=n.length;e--;)t[n[e]]&&!t[n[e]].isActive&&(t[n[e]].destroy(),delete t[n[e]])},t!==s&&p.hasRendered&&e?e:0)}),u&&(u[u.isPlaced?"animate":"attr"]({d:this.getLinePath(u.strokeWidth())}),u.isPlaced=!0,u[g?"show":"hide"](g)),t&&g&&(e=r.getTitlePosition(),w(e.y)?(t[t.isNew?"attr":"animate"](e),t.isNew=!1):(t.attr("y",-9999),t.isNew=!0)),f&&f.enabled&&r.stacking&&r.stacking.renderStackTotals(),r.old={len:r.len,max:r.max,min:r.min,transA:r.transA,userMax:r.userMax,userMin:r.userMin},r.isDirty=!1,_(this,"afterRender")},e.prototype.redraw=function(){this.visible&&(this.render(),this.plotLinesAndBands.forEach(function(e){e.render()})),this.series.forEach(function(e){e.isDirty=!0})},e.prototype.getKeepProps=function(){return this.keepProps||e.keepProps},e.prototype.destroy=function(e){var n=_____WB$wombat$check$this$function_____(this),t=n.plotLinesAndBands,r=this.eventOptions;if(_(this,"destroy",{keepEvents:e}),e||D(n),[n.ticks,n.minorTicks,n.alternateBands].forEach(function(e){o(e)}),t)for(e=t.length;e--;)t[e].destroy();for(var i in"axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(e){n[e]&&(n[e]=n[e].destroy())}),n.plotLinesAndBandsGroups)n.plotLinesAndBandsGroups[i]=n.plotLinesAndBandsGroups[i].destroy();C(n,function(e,t){-1===n.getKeepProps().indexOf(t)&&delete n[t]}),this.eventOptions=r},e.prototype.drawCrosshair=function(e,t){var n,r=this.crosshair,i=A(r&&r.snap,!0),o=this.chart,a=this.cross;if(_(this,"drawCrosshair",{e:e,point:t}),e||(e=this.cross&&this.cross.e),r&&!1!==(x(t)||!i)){if(i?x(t)&&(n=A("colorAxis"!==this.coll?t.crosshairPos:null,this.isXAxis?t.plotX:this.len-t.plotY)):n=e&&(this.horiz?e.chartX-this.pos:this.len-e.chartY+this.pos),x(n)){var s={value:t&&(this.isXAxis?t.x:A(t.stackY,t.y)),translatedValue:n};o.polar&&p(s,{isCrosshair:!0,chartX:e&&e.chartX,chartY:e&&e.chartY,point:t}),s=this.getPlotLinePath(s)||null}if(!x(s))return void this.hideCrosshair();i=this.categories&&!this.isRadial,a||(this.cross=a=o.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(i?"category ":"thin ")+(r.className||"")).attr({zIndex:A(r.zIndex,2)}).add(),o.styledMode||(a.attr({stroke:r.color||(i?l.parse("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":A(r.width,1)}).css({"pointer-events":"none"}),r.dashStyle&&a.attr({dashstyle:r.dashStyle}))),a.show().attr({d:s}),i&&!r.width&&a.attr({"stroke-width":this.transA}),this.cross.e=e}else this.hideCrosshair();_(this,"afterDrawCrosshair",{e:e,point:t})},e.prototype.hideCrosshair=function(){this.cross&&this.cross.hide(),_(this,"afterHideCrosshair")},e.prototype.hasVerticalPanning=function(){var e=this.chart.options.chart.panning;return!!(e&&e.enabled&&/y/.test(e.type))},e.prototype.validatePositiveValue=function(e){return w(e)&&0<e},e.prototype.update=function(e,t){var n=this.chart;e=s(this.userOptions,e),this.destroy(!0),this.init(n,e),n.isDirtyBox=!0,A(t,!0)&&n.redraw()},e.prototype.remove=function(e){for(var t=this.chart,n=this.coll,r=this.series,i=r.length;i--;)r[i]&&r[i].remove(!1);u(t.axes,_____WB$wombat$check$this$function_____(this)),u(t[n],_____WB$wombat$check$this$function_____(this)),t[n].forEach(function(e,t){e.options.index=e.userOptions.index=t}),this.destroy(),t.isDirtyBox=!0,A(e,!0)&&t.redraw()},e.prototype.setTitle=function(e,t){this.update({title:e},t)},e.prototype.setCategories=function(e,t){this.update({categories:e},t)},e.defaultOptions=t.defaultXAxisOptions,e.keepProps="extKey hcEvents names series userMax userMin".split(" "),e}()}),e(t,"Core/Axis/DateTimeAxis.js",[t["Core/Utilities.js"]],function(e){var t,o=e.addEvent,a=e.getMagnitude,s=e.normalizeTickInterval,l=e.timeUnits;return function(e){function t(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)}function n(e){"datetime"!==e.userOptions.type?this.dateTime=void 0:this.dateTime||(this.dateTime=new i(this))}var r=[];e.compose=function(e){return-1===r.indexOf(e)&&(r.push(e),e.keepProps.push("dateTime"),e.prototype.getTimeTicks=t,o(e,"init",n)),e};var i=function(){function e(e){this.axis=e}return e.prototype.normalizeTimeTickInterval=function(e,t){var n=t||[["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]];t=n[n.length-1];var r,i=l[t[0]],o=t[1];for(r=0;r<n.length&&(t=n[r],i=l[t[0]],o=t[1],!(n[r+1]&&e<=(i*o[o.length-1]+l[n[r+1][0]])/2));r++);return i===l.year&&e<5*i&&(o=[1,2,5]),{unitRange:i,count:e=s(e/i,o,"year"===t[0]?Math.max(a(e/i),1):1),unitName:t[0]}},e.prototype.getXDateFormat=function(e,t){var n=this.axis;return n.closestPointRange?n.chart.time.getDateFormat(n.closestPointRange,e,n.options.startOfWeek,t)||t.year:t.day},e}();e.Additions=i}(t||(t={})),t}),e(t,"Core/Axis/LogarithmicAxis.js",[t["Core/Utilities.js"]],function(e){var t,o=e.addEvent,h=e.getMagnitude,f=e.normalizeTickInterval,m=e.pick;return function(e){function t(e){var t=this.logarithmic;"logarithmic"!==e.userOptions.type?this.logarithmic=void 0:t||(this.logarithmic=new i(this))}function n(){var t=this.logarithmic;t&&(this.lin2val=function(e){return t.lin2log(e)},this.val2lin=function(e){return t.log2lin(e)})}var r=[];e.compose=function(e){return-1===r.indexOf(e)&&(r.push(e),e.keepProps.push("logarithmic"),o(e,"init",t),o(e,"afterInit",n)),e};var i=function(){function e(e){this.axis=e}return e.prototype.getLogTickPositions=function(e,t,n,r){var i=this.axis,o=i.len,a=i.options,s=[];if(r||(this.minorAutoInterval=void 0),.5<=e)e=Math.round(e),s=i.getLinearTickPositions(e,t,n);else if(.08<=e){var l,u=Math.floor(t),c=a=void 0;for(o=.3<e?[1,2,4]:.15<e?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];u<n+1&&!c;u++){var p=o.length;for(l=0;l<p&&!c;l++){var d=this.log2lin(this.lin2log(u)*o[l]);d>t&&(!r||a<=n)&&void 0!==a&&s.push(a),a>n&&(c=!0),a=d}}}else t=this.lin2log(t),n=this.lin2log(n),e=r?i.getMinorTickInterval():a.tickInterval,e=m("auto"===e?null:e,this.minorAutoInterval,a.tickPixelInterval/(r?5:1)*(n-t)/((r?o/i.tickPositions.length:o)||1)),e=f(e,void 0,h(e)),s=i.getLinearTickPositions(e,t,n).map(this.log2lin),r||(this.minorAutoInterval=e/5);return r||(i.tickInterval=e),s},e.prototype.lin2log=function(e){return Math.pow(10,e)},e.prototype.log2lin=function(e){return Math.log(e)/Math.LN10},e}();e.Additions=i}(t||(t={})),t}),e(t,"Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js",[t["Core/Utilities.js"]],function(e){var t,o=e.erase,i=e.extend,p=e.isNumber;return function(e){var a,n=[];e.compose=function(e,t){return a||(a=e),-1===n.indexOf(t)&&(n.push(t),i(t.prototype,r.prototype)),t};var r=function(){function e(){}return e.prototype.getPlotBandPath=function(e,t,n){void 0===n&&(n=this.options);var r=this.getPlotLinePath({value:t,force:!0,acrossPanes:n.acrossPanes}),i=[],o=this.horiz;if(t=!p(this.min)||!p(this.max)||e<this.min&&t<this.min||e>this.max&&t>this.max,e=this.getPlotLinePath({value:e,force:!0,acrossPanes:n.acrossPanes}),n=1,e&&r){if(t){var c=e.toString()===r.toString();n=0}for(t=0;t<e.length;t+=2){var a=e[t],s=e[t+1],l=r[t],u=r[t+1];"M"!==a[0]&&"L"!==a[0]||"M"!==s[0]&&"L"!==s[0]||"M"!==l[0]&&"L"!==l[0]||"M"!==u[0]&&"L"!==u[0]||(o&&l[1]===a[1]?(l[1]+=n,u[1]+=n):o||l[2]!==a[2]||(l[2]+=n,u[2]+=n),i.push(["M",a[1],a[2]],["L",s[1],s[2]],["L",u[1],u[2]],["L",l[1],l[2]],["Z"])),i.isFlat=c}}return i},e.prototype.addPlotBand=function(e){return this.addPlotBandOrLine(e,"plotBands")},e.prototype.addPlotLine=function(e){return this.addPlotBandOrLine(e,"plotLines")},e.prototype.addPlotBandOrLine=function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=this.userOptions,i=new a(this,e);if(this.visible&&(i=i.render()),i){if(this._addedPlotLB||(this._addedPlotLB=!0,(r.plotLines||[]).concat(r.plotBands||[]).forEach(function(e){n.addPlotBandOrLine(e)})),t){var o=r[t]||[];o.push(e),r[t]=o}this.plotLinesAndBands.push(i)}return i},e.prototype.removePlotBandOrLine=function(t){var e=this.plotLinesAndBands,n=this.options,r=this.userOptions;if(e){for(var i=e.length;i--;)e[i].id===t&&e[i].destroy();[n.plotLines||[],r.plotLines||[],n.plotBands||[],r.plotBands||[]].forEach(function(e){for(i=e.length;i--;)(e[i]||{}).id===t&&o(e,e[i])})}},e.prototype.removePlotBand=function(e){this.removePlotBandOrLine(e)},e.prototype.removePlotLine=function(e){this.removePlotBandOrLine(e)},e}()}(t||(t={})),t}),e(t,"Core/Axis/PlotLineOrBand/PlotLineOrBand.js",[t["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"],t["Core/Utilities.js"]],function(n,e){var s=e.arrayMax,l=e.arrayMin,E=e.defined,r=e.destroyObjectProperties,i=e.erase,S=e.fireEvent,T=e.merge,_=e.objectEach,x=e.pick;return e=function(){function t(e,t){this.axis=e,t&&(this.options=t,this.id=t.id)}return t.compose=function(e){return n.compose(t,e)},t.prototype.render=function(){S(this,"render");var n=_____WB$wombat$check$this$function_____(this),e=n.axis,t=e.horiz,r=e.logarithmic,i=n.options,c=i.color,p=x(i.zIndex,0),d=i.events,h={},f=e.chart.renderer,o=i.label,m=n.label,g=i.to,y=i.from,b=i.value,a=n.svgElem,s=[],l=E(y)&&E(g);s=E(b);var v=!a,u={class:"highcharts-plot-"+(l?"band ":"line ")+(i.className||"")},w=l?"bands":"lines";if(r&&(y=r.log2lin(y),g=r.log2lin(g),b=r.log2lin(b)),e.chart.styledMode||(s?(u.stroke=c||"#999999",u["stroke-width"]=x(i.width,1),i.dashStyle&&(u.dashstyle=i.dashStyle)):l&&(u.fill=c||"#e6ebf5",i.borderWidth&&(u.stroke=i.borderColor,u["stroke-width"]=i.borderWidth))),h.zIndex=p,w+="-"+p,(r=e.plotLinesAndBandsGroups[w])||(e.plotLinesAndBandsGroups[w]=r=f.g("plot-"+w).attr(h).add()),v&&(n.svgElem=a=f.path().attr(u).add(r)),s)s=e.getPlotLinePath({value:b,lineWidth:a.strokeWidth(),acrossPanes:i.acrossPanes});else{if(!l)return;s=e.getPlotBandPath(y,g,i)}return!n.eventsAdded&&d&&(_(d,function(e,t){a.on(t,function(e){d[t].apply(n,[e])})}),n.eventsAdded=!0),(v||!a.d)&&s&&s.length?a.attr({d:s}):a&&(s?(a.show(!0),a.animate({d:s})):a.d&&(a.hide(),m&&(n.label=m=m.destroy()))),o&&(E(o.text)||E(o.formatter))&&s&&s.length&&0<e.width&&0<e.height&&!s.isFlat?(o=T({align:t&&l&&"center",x:t?!l&&4:10,verticalAlign:!t&&l&&"middle",y:t?l?16:10:l?6:-4,rotation:t&&!l&&90},o),this.renderLabel(o,s,l,p)):m&&m.hide(),n},t.prototype.renderLabel=function(e,t,n,r){var i=this.axis,o=i.chart.renderer,a=this.label;a||(this.label=a=o.text(this.getLabelText(e),0,0,e.useHTML).attr({align:e.textAlign||e.align,rotation:e.rotation,class:"highcharts-plot-"+(n?"band":"line")+"-label "+(e.className||""),zIndex:r}).add(),i.chart.styledMode||a.css(T({textOverflow:"ellipsis"},e.style))),r=t.xBounds||[t[0][1],t[1][1],n?t[2][1]:t[0][1]],t=t.yBounds||[t[0][2],t[1][2],n?t[2][2]:t[0][2]],n=l(r),o=l(t),a.align(e,!1,{x:n,y:o,width:s(r)-n,height:s(t)-o}),a.alignValue&&"left"!==a.alignValue||a.css({width:(90===a.rotation?i.height-(a.alignAttr.y-i.top):i.width-(a.alignAttr.x-i.left))+"px"}),a.show(!0)},t.prototype.getLabelText=function(e){return E(e.formatter)?e.formatter.call(this):e.text},t.prototype.destroy=function(){i(this.axis.plotLinesAndBands,_____WB$wombat$check$this$function_____(this)),delete this.axis,r(this)},t}()}),e(t,"Core/Tooltip.js",[t["Core/FormatUtilities.js"],t["Core/Globals.js"],t["Core/Renderer/RendererUtilities.js"],t["Core/Renderer/RendererRegistry.js"],t["Core/Utilities.js"]],function(e,m,t,w,g){var l=e.format,O=m.doc,N=t.distribute,y=g.addEvent,D=g.clamp,b=g.css,E=g.defined,n=g.discardElement,L=g.extend,S=g.fireEvent,T=g.isArray,u=g.isNumber,j=g.isString,r=g.merge,I=g.pick,v=g.splat,i=g.syncTimeout;return e=function(){function e(e,t){this.allowShared=!0,this.container=void 0,this.crosshairs=[],this.distance=0,this.isHidden=!0,this.isSticky=!1,this.now={},this.options={},this.outside=!1,this.chart=e,this.init(e,t)}return e.prototype.applyFilter=function(){var e=this.chart;e.renderer.definition({tagName:"filter",attributes:{id:"drop-shadow-"+e.index,opacity:.5},children:[{tagName:"feGaussianBlur",attributes:{in:"SourceAlpha",stdDeviation:1}},{tagName:"feOffset",attributes:{dx:1,dy:1}},{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",attributes:{type:"linear",slope:.3}}]},{tagName:"feMerge",children:[{tagName:"feMergeNode"},{tagName:"feMergeNode",attributes:{in:"SourceGraphic"}}]}]})},e.prototype.bodyFormatter=function(e){return e.map(function(e){var t=e.series.tooltipOptions;return(t[(e.point.formatPrefix||"point")+"Formatter"]||e.point.tooltipFormatter).call(e.point,t[(e.point.formatPrefix||"point")+"Format"]||"")})},e.prototype.cleanSplit=function(n){this.chart.series.forEach(function(e){var t=e&&e.tt;t&&(!t.isActive||n?e.tt=t.destroy():t.isActive=!1)})},e.prototype.defaultFormatter=function(e){var t=this.points||v(this),n=[e.tooltipFooterHeaderFormatter(t[0])];return(n=n.concat(e.bodyFormatter(t))).push(e.tooltipFooterHeaderFormatter(t[0],!0)),n},e.prototype.destroy=function(){this.label&&(this.label=this.label.destroy()),this.split&&this.tt&&(this.cleanSplit(!0),this.tt=this.tt.destroy()),this.renderer&&(this.renderer=this.renderer.destroy(),n(this.container)),g.clearTimeout(this.hideTimer),g.clearTimeout(this.tooltipTimeout)},e.prototype.getAnchor=function(e,t){var n,r,i=this.chart,o=i.pointer,a=i.inverted,s=i.plotTop,c=i.plotLeft,l=0,u=0;return e=v(e),this.followPointer&&t?(void 0===t.chartX&&(t=o.normalize(t)),o=[t.chartX-c,t.chartY-s]):e[0].tooltipPos?o=e[0].tooltipPos:(e.forEach(function(e){n=e.series.yAxis,r=e.series.xAxis,l+=e.plotX||0,u+=e.plotLow?(e.plotLow+(e.plotHigh||0))/2:e.plotY||0,r&&n&&(a?(l+=s+i.plotHeight-r.len-r.pos,u+=c+i.plotWidth-n.len-n.pos):(l+=r.pos-c,u+=n.pos-s))}),l/=e.length,u/=e.length,o=[a?i.plotWidth-u:l,a?i.plotHeight-l:u],this.shared&&1<e.length&&t&&(a?o[0]=t.chartX-c:o[1]=t.chartY-s)),o.map(Math.round)},e.prototype.getLabel=function(){var t,n=_____WB$wombat$check$this$function_____(this),e=this.chart.styledMode,r=this.options,i=this.split&&this.allowShared,o="tooltip"+(E(r.className)?" "+r.className:""),a=r.style.pointerEvents||(!this.followPointer&&r.stickOnContact?"auto":"none"),c=function(){n.inContact=!0},p=function(e){var t=n.chart.hoverSeries;n.inContact=n.shouldStickOnContact()&&n.chart.pointer.inClass(e.relatedTarget,"highcharts-tooltip"),!n.inContact&&t&&t.onMouseOut&&t.onMouseOut()},s=this.chart.renderer;if(n.label){var l=!n.label.hasClass("highcharts-label");(i&&!l||!i&&l)&&n.destroy()}if(!this.label){if(this.outside){l=this.chart.options.chart.style;var d=w.getRendererType();this.container=t=m.doc.createElement("div"),t.className="highcharts-tooltip-container",b(t,{position:"absolute",top:"1px",pointerEvents:a,zIndex:Math.max(this.options.style.zIndex||0,(l&&l.zIndex||0)+3)}),y(t,"mouseenter",c),y(t,"mouseleave",p),m.doc.body.appendChild(t),this.renderer=s=new d(t,0,0,l,void 0,void 0,s.styledMode)}if(i?this.label=s.g(o):(this.label=s.label("",0,0,r.shape,void 0,void 0,r.useHTML,void 0,o).attr({padding:r.padding,r:r.borderRadius}),e||this.label.attr({fill:r.backgroundColor,"stroke-width":r.borderWidth}).css(r.style).css({pointerEvents:a}).shadow(r.shadow)),e&&r.shadow&&(this.applyFilter(),this.label.attr({filter:"url(#drop-shadow-"+this.chart.index+")"})),n.outside&&!n.split){var u=this.label,h=u.xSetter,f=u.ySetter;u.xSetter=function(e){h.call(u,n.distance),t.style.left=e+"px"},u.ySetter=function(e){f.call(u,n.distance),t.style.top=e+"px"}}this.label.on("mouseenter",c).on("mouseleave",p).attr({zIndex:8}).add()}return this.label},e.prototype.getPosition=function(n,r,i){var a,o=this.chart,d=this.distance,h={},f=o.inverted&&i.h||0,m=this.outside,s=m?O.documentElement.clientWidth-2*d:o.chartWidth,l=m?Math.max(O.body.scrollHeight,O.documentElement.scrollHeight,O.body.offsetHeight,O.documentElement.offsetHeight,O.documentElement.clientHeight):o.chartHeight,g=o.pointer.getChartPosition(),e=function(e){var t="x"===e;return[e,t?s:l,t?n:r].concat(m?[t?n*g.scaleX:r*g.scaleY,t?g.left-d+(i.plotX+o.plotLeft)*g.scaleX:g.top-d+(i.plotY+o.plotTop)*g.scaleY,0,t?s:l]:[t?n:r,t?i.plotX+o.plotLeft:i.plotY+o.plotTop,t?o.plotLeft:o.plotTop,t?o.plotLeft+o.plotWidth:o.plotTop+o.plotHeight])},u=e("y"),c=e("x");e=!!i.negative,!o.polar&&o.hoverSeries&&o.hoverSeries.yAxis&&o.hoverSeries.yAxis.reversed&&(e=!e);var y=!this.followPointer&&I(i.ttBelow,!o.inverted===e),t=function(e,t,n,r,i,c,p){var o=m?"y"===e?d*g.scaleY:d*g.scaleX:d,a=(n-r)/2,s=r<i-d,l=i+d+r<t,u=i-o-n+a;if(i=i+o-a,y&&l)h[e]=i;else if(!y&&s)h[e]=u;else if(s)h[e]=Math.min(p-r,0>u-f?u:u-f);else{if(!l)return!1;h[e]=Math.max(c,i+f+n>t?i:i+f)}},p=function(e,t,n,r,i){var o;return i<d||i>t-d?o=!1:h[e]=i<n/2?1:i>t-r/2?t-r-2:i-n/2,o},b=function(e){var t=u;u=c,c=t,a=e},v=function(){!1!==t.apply(0,u)?!1!==p.apply(0,c)||a||(b(!0),v()):a?h.x=h.y=0:(b(!0),v())};return(o.inverted||1<this.len)&&b(),v(),h},e.prototype.hide=function(e){var t=_____WB$wombat$check$this$function_____(this);g.clearTimeout(this.hideTimer),e=I(e,this.options.hideDelay),this.isHidden||(this.hideTimer=i(function(){t.getLabel().fadeOut(e?void 0:e),t.isHidden=!0},e))},e.prototype.init=function(e,t){this.chart=e,this.options=t,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.split=t.split&&!e.inverted&&!e.polar,this.shared=t.shared||this.split,this.outside=I(t.outside,!(!e.scrollablePixelsX&&!e.scrollablePixelsY))},e.prototype.shouldStickOnContact=function(){return!(this.followPointer||!this.options.stickOnContact)},e.prototype.isStickyOnContact=function(){return!(!this.shouldStickOnContact()||!this.inContact)},e.prototype.move=function(e,t,n,r){var i=_____WB$wombat$check$this$function_____(this),o=i.now,a=!1!==i.options.animation&&!i.isHidden&&(1<Math.abs(e-o.x)||1<Math.abs(t-o.y)),s=i.followPointer||1<i.len;L(o,{x:a?(2*o.x+e)/3:e,y:a?(o.y+t)/2:t,anchorX:s?void 0:a?(2*o.anchorX+n)/3:n,anchorY:s?void 0:a?(o.anchorY+r)/2:r}),i.getLabel().attr(o),i.drawTracker(),a&&(g.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){i&&i.move(e,t,n,r)},32))},e.prototype.refresh=function(e,t){var n=this.chart,r=this.options,i=v(e),o=i[0],a=[],s=r.formatter||this.defaultFormatter,l=this.shared,c=n.styledMode,u={};if(r.enabled){g.clearTimeout(this.hideTimer),this.allowShared=!(!T(e)&&e.series&&e.series.noSharedTooltip),this.followPointer=!this.split&&o.series.tooltipOptions.followPointer;var p=(e=this.getAnchor(e,t))[0],d=e[1];if(l&&this.allowShared?(n.pointer.applyInactiveState(i),i.forEach(function(e){e.setState("hover"),a.push(e.getLabelConfig())}),(u={x:o.category,y:o.y}).points=a):u=o.getLabelConfig(),this.len=a.length,s=s.call(u,_____WB$wombat$check$this$function_____(this)),l=o.series,this.distance=I(l.tooltipOptions.distance,16),!1===s)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(s,i);else{var h=p,f=d;if(t&&n.pointer.isDirectTouch&&(h=t.chartX-n.plotLeft,f=t.chartY-n.plotTop),!n.polar&&!1!==l.options.clip&&!i.some(function(e){return e.series.shouldShowTooltip(h,f)}))return void this.hide();t=this.getLabel(),r.style.width&&!c||t.css({width:this.chart.spacingBox.width+"px"}),t.attr({text:s&&s.join?s.join(""):s}),t.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+I(o.colorIndex,l.colorIndex)),c||t.attr({stroke:r.borderColor||o.color||l.color||"#666666"}),this.updatePosition({plotX:p,plotY:d,negative:o.negative,ttBelow:o.ttBelow,h:e[2]||0})}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1}S(this,"refresh")}},e.prototype.renderSplit=function(e,g){function y(e,t,n,r,i){return void 0===i&&(i=!0),n?(t=_?0:k,e=D(e-r/2,m.left,m.right-r-(d.outside?a:0))):(t-=C,e=D(e=i?e-r-h:e+h,i?e:m.left,m.right)),{x:e,y:t}}var d=_____WB$wombat$check$this$function_____(this),t=d.chart,n=d.chart,o=n.chartWidth,s=n.chartHeight,b=n.plotHeight,v=n.plotLeft,w=n.plotTop,l=n.pointer,r=n.scrollablePixelsY;r=void 0===r?0:r;var u=n.scrollablePixelsX,i=n.scrollingContainer,c=(i=void 0===i?{scrollLeft:0,scrollTop:0}:i).scrollLeft;i=i.scrollTop;var E=n.styledMode,h=d.distance,f=d.options,S=d.options.positioner,m=d.outside&&"number"!=typeof u?O.documentElement.getBoundingClientRect():{left:c,right:c+o,top:i,bottom:i+s},T=d.getLabel(),x=this.renderer||t.renderer,_=!(!t.xAxis[0]||!t.xAxis[0].opposite),a=(t=l.getChartPosition()).left;t=t.top;var C=w+i,A=0,k=b-r;j(e)&&(e=[!1,e]),e=e.slice(0,g.length+1).reduce(function(e,t,n){if(!1!==t&&""!==t){var r=(n=g[n-1]||{isHeader:!0,plotX:g[0].plotX,plotY:b,series:{}}).isHeader,i=r?d:n.series;t=t.toString();var o=i.tt,a=n.isHeader,s=n.series,l="highcharts-color-"+I(n.colorIndex,s.colorIndex,"none");if(o||(o={padding:f.padding,r:f.borderRadius},E||(o.fill=f.backgroundColor,o["stroke-width"]=f.borderWidth),o=x.label("",0,0,f[a?"headerShape":"shape"],void 0,void 0,f.useHTML).addClass((a?"highcharts-tooltip-header ":"")+"highcharts-tooltip-box "+l).attr(o).add(T)),o.isActive=!0,o.attr({text:t}),E||o.css(f.style).shadow(f.shadow).attr({stroke:f.borderColor||n.color||s.color||"#333333"}),t=(a=(i=i.tt=o).getBBox()).width+i.strokeWidth(),r&&(A=a.height,k+=A,_&&(C-=A)),s=void 0===(s=n.plotX)?0:s,l=void 0===(l=n.plotY)?0:l,o=n.series,n.isHeader){s=v+s;var u=w+b/2}else{var c=o.xAxis,p=o.yAxis;s=c.pos+D(s,-h,c.len+h),o.shouldShowTooltip(0,p.pos-w+l,{ignoreX:!0})&&(u=p.pos+l)}s=D(s,m.left-h,m.right+h),"number"==typeof u?(a=a.height+1,l=S?S.call(d,t,a,n):y(s,u,r,t),e.push({align:S?0:void 0,anchorX:s,anchorY:u,boxWidth:t,point:n,rank:I(l.rank,r?1:0),size:a,target:l.y,tt:i,x:l.x})):i.isActive=!1}return e},[]),!S&&e.some(function(e){var t=(d.outside?a:0)+e.anchorX;return t<m.left&&t+e.boxWidth<m.right||t<a-m.left+e.boxWidth&&m.right-t>t})&&(e=e.map(function(e){var t=y(e.anchorX,e.anchorY,e.point.isHeader,e.boxWidth,!1);return L(e,{target:t.y,x:t.x})})),d.cleanSplit(),N(e,k);var p=a,M=a;e.forEach(function(e){var t=e.x,n=e.boxWidth;(e=e.isHeader)||(d.outside&&a+t<p&&(p=a+t),!e&&d.outside&&p+n>M&&(M=a+t))}),e.forEach(function(e){var t=e.x,n=e.anchorX,r=e.pos,i=e.point.isHeader;if(r={visibility:void 0===r?"hidden":"inherit",x:t,y:r+C,anchorX:n,anchorY:e.anchorY},d.outside&&t<n){var o=a-p;0<o&&(i||(r.x=t+o,r.anchorX=n+o),i&&(r.x=(M-p)/2,r.anchorX=n+o))}e.tt.attr(r)}),e=d.container,r=d.renderer,d.outside&&e&&r&&(n=T.getBBox(),r.setSize(n.width+n.x,n.height+n.y,!1),e.style.left=p+"px",e.style.top=t+"px")},e.prototype.drawTracker=function(){if(this.followPointer||!this.options.stickOnContact)this.tracker&&this.tracker.destroy();else{var e=this.chart,t=this.label,n=this.shared?e.hoverPoints:e.hoverPoint;if(t&&n){var r={x:0,y:0,width:0,height:0};n=this.getAnchor(n);var i=t.getBBox();n[0]+=e.plotLeft-t.translateX,n[1]+=e.plotTop-t.translateY,r.x=Math.min(0,n[0]),r.y=Math.min(0,n[1]),r.width=0>n[0]?Math.max(Math.abs(n[0]),i.width-n[0]):Math.max(Math.abs(n[0]),i.width),r.height=0>n[1]?Math.max(Math.abs(n[1]),i.height-Math.abs(n[1])):Math.max(Math.abs(n[1]),i.height),this.tracker?this.tracker.attr(r):(this.tracker=t.renderer.rect(r).addClass("highcharts-tracker").add(t),e.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}}},e.prototype.styledModeFormat=function(e){return e.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex}"')},e.prototype.tooltipFooterHeaderFormatter=function(t,e){var n=t.series,r=n.tooltipOptions,i=n.xAxis,o=i&&i.dateTime;i={isFooter:e,labelConfig:t};var a=r.xDateFormat,s=r[e?"footerFormat":"headerFormat"];return S(this,"headerFormatter",i,function(e){o&&!a&&u(t.key)&&(a=o.getXDateFormat(t.key,r.dateTimeLabelFormats)),o&&a&&(t.point&&t.point.tooltipDateKeys||["key"]).forEach(function(e){s=s.replace("{point."+e+"}","{point."+e+":"+a+"}")}),n.chart.styledMode&&(s=this.styledModeFormat(s)),e.text=l(s,{point:t,series:n},this.chart)}),i.text},e.prototype.update=function(e){this.destroy(),r(!0,this.chart.options.tooltip.userOptions,e),this.init(this.chart,r(!0,this.options,e))},e.prototype.updatePosition=function(e){var t=this.chart,n=this.options,r=t.pointer,i=this.getLabel();r=r.getChartPosition();var o=(n.positioner||this.getPosition).call(this,i.width,i.height,e),a=e.plotX+t.plotLeft;e=e.plotY+t.plotTop,this.outside&&(n=n.borderWidth+2*this.distance,this.renderer.setSize(i.width+n,i.height+n,!1),1===r.scaleX&&1===r.scaleY||(b(this.container,{transform:"scale("+r.scaleX+", "+r.scaleY+")"}),a*=r.scaleX,e*=r.scaleY),a+=r.left-o.x,e+=r.top-o.y),this.move(Math.round(o.x),Math.round(o.y||0),a,e)},e}()}),e(t,"Core/Series/Point.js",[t["Core/Renderer/HTML/AST.js"],t["Core/Animation/AnimationUtilities.js"],t["Core/DefaultOptions.js"],t["Core/FormatUtilities.js"],t["Core/Utilities.js"]],function(y,e,t,n,r){var s=e.animObject,S=t.defaultOptions,a=n.format,i=r.addEvent,o=r.defined,u=r.erase,b=r.extend,v=r.fireEvent,c=r.getNestedProperty,d=r.isArray,h=r.isFunction,w=r.isNumber,p=r.isObject,f=r.merge,m=r.objectEach,E=r.pick,g=r.syncTimeout,T=r.removeEvent,x=r.uniqueKey;return e=function(){function l(){this.colorIndex=this.category=void 0,this.formatPrefix="point",this.id=void 0,this.isNull=!1,this.percentage=this.options=this.name=void 0,this.selected=!1,this.total=this.series=void 0,this.visible=!0,this.x=void 0}return l.prototype.animateBeforeDestroy=function(){var t=_____WB$wombat$check$this$function_____(this),n={x:t.startXPos,opacity:0},e=t.getGraphicalProps();e.singular.forEach(function(e){t[e]=t[e].animate("dataLabel"===e?{x:t[e].startXPos,y:t[e].startYPos,opacity:0}:n)}),e.plural.forEach(function(e){t[e].forEach(function(e){e.element&&e.animate(b({x:t.startXPos},e.startYPos?{x:e.startXPos,y:e.startYPos}:{}))})})},l.prototype.applyOptions=function(e,t){var n=this.series,r=n.options.pointValKey||n.pointValKey;return e=l.prototype.optionsToObject.call(this,e),b(this,e),this.options=this.options?b(this.options,e):e,e.group&&delete this.group,e.dataLabels&&delete this.dataLabels,r&&(this.y=l.prototype.getNestedProperty.call(this,r)),this.formatPrefix=(this.isNull=E(this.isValid&&!this.isValid(),null===this.x||!w(this.y)))?"null":"point",this.selected&&(this.state="select"),"name"in this&&void 0===t&&n.xAxis&&n.xAxis.hasNames&&(this.x=n.xAxis.nameToX(this)),void 0===this.x&&n?this.x=void 0===t?n.autoIncrement():t:w(e.x)&&n.options.relativeXValue&&(this.x=n.autoIncrement(e.x)),_____WB$wombat$check$this$function_____(this)},l.prototype.destroy=function(){function e(){for(i in(t.graphic||t.dataLabel||t.dataLabels)&&(T(t),t.destroyElements()),t)t[i]=null}var t=_____WB$wombat$check$this$function_____(this),n=t.series,r=n.chart;n=n.options.dataSorting;var i,o=r.hoverPoints,a=s(t.series.chart.renderer.globalAnimation);t.legendItem&&r.legend.destroyItem(t),o&&(t.setState(),u(o,t),o.length||(r.hoverPoints=null)),t===r.hoverPoint&&t.onMouseOut(),n&&n.enabled?(this.animateBeforeDestroy(),g(e,a.duration)):e(),r.pointCount--},l.prototype.destroyElements=function(e){var t=_____WB$wombat$check$this$function_____(this);(e=t.getGraphicalProps(e)).singular.forEach(function(e){t[e]=t[e].destroy()}),e.plural.forEach(function(e){t[e].forEach(function(e){e.element&&e.destroy()}),delete t[e]})},l.prototype.firePointEvent=function(e,t,n){var r=_____WB$wombat$check$this$function_____(this),i=this.series.options;(i.point.events[e]||r.options&&r.options.events&&r.options.events[e])&&r.importEvents(),"click"===e&&i.allowPointSelect&&(n=function(e){r.select&&r.select(null,e.ctrlKey||e.metaKey||e.shiftKey)}),v(r,e,t,n)},l.prototype.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",""):"")},l.prototype.getGraphicalProps=function(n){var e,r=_____WB$wombat$check$this$function_____(this),t=[],i={singular:[],plural:[]};for((n=n||{graphic:1,dataLabel:1}).graphic&&t.push("graphic","upperGraphic","shadowGroup"),n.dataLabel&&t.push("dataLabel","dataLabelUpper","connector"),e=t.length;e--;){var o=t[e];r[o]&&i.singular.push(o)}return["dataLabel","connector"].forEach(function(e){var t=e+"s";n[e]&&r[t]&&i.plural.push(t)}),i},l.prototype.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}},l.prototype.getNestedProperty=function(e){if(e)return 0===e.indexOf("custom.")?c(e,this.options):this[e]},l.prototype.getZone=function(){var e=this.series,t=e.zones;e=e.zoneAxis||"y";var n,r=0;for(n=t[r];this[e]>=n.value;)n=t[++r];return this.nonZonedColor||(this.nonZonedColor=this.color),this.color=n&&n.color&&!this.options.color?n.color:this.nonZonedColor,n},l.prototype.hasNewShapeType=function(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType},l.prototype.init=function(e,t,n){return this.series=e,this.applyOptions(t,n),this.id=o(this.id)?this.id:x(),this.resolveColor(),e.chart.pointCount++,v(this,"afterInit"),_____WB$wombat$check$this$function_____(this)},l.prototype.optionsToObject=function(e){var t=this.series,n=t.options.keys,r=n||t.pointArrayMap||["y"],i=r.length,o={},a=0,s=0;if(w(e)||null===e)o[r[0]]=e;else if(d(e))for(!n&&e.length>i&&("string"==(t=typeof e[0])?o.name=e[0]:"number"===t&&(o.x=e[0]),a++);s<i;)n&&void 0===e[a]||(0<r[s].indexOf(".")?l.prototype.setNestedProperty(o,e[a],r[s]):o[r[s]]=e[a]),a++,s++;else"object"==typeof e&&(o=e,e.dataLabels&&(t._hasPointLabels=!0),e.marker&&(t._hasPointMarkers=!0));return o},l.prototype.resolveColor=function(){var e=this.series,t=e.chart.styledMode,n=e.chart.options.chart.colorCount;if(delete this.nonZonedColor,e.options.colorByPoint){if(!t){var r=(n=e.options.colors||e.chart.options.colors)[e.colorCounter];n=n.length}t=e.colorCounter,e.colorCounter++,e.colorCounter===n&&(e.colorCounter=0)}else t||(r=e.color),t=e.colorIndex;this.colorIndex=E(this.options.colorIndex,t),this.color=E(this.options.color,r)},l.prototype.setNestedProperty=function(e,i,t){return t.split(".").reduce(function(e,t,n,r){return e[t]=r.length-1===n?i:p(e[t],!0)?e[t]:{},e[t]},e),e},l.prototype.tooltipFormatter=function(t){var e=this.series,n=e.tooltipOptions,r=E(n.valueDecimals,""),i=n.valuePrefix||"",o=n.valueSuffix||"";return e.chart.styledMode&&(t=e.chart.tooltip.styledModeFormat(t)),(e.pointArrayMap||["y"]).forEach(function(e){e="{point."+e,(i||o)&&(t=t.replace(RegExp(e+"}","g"),i+e+"}"+o)),t=t.replace(RegExp(e+"}","g"),e+":,."+r+"f}")}),a(t,{point:this,series:this.series},e.chart)},l.prototype.update=function(t,n,r,c){function e(){o.applyOptions(t);var e=s&&o.hasDummyGraphic;e=null===o.y?!e:e,s&&e&&(o.graphic=s.destroy(),delete o.hasDummyGraphic),p(t,!0)&&(s&&s.element&&t&&t.marker&&void 0!==t.marker.symbol&&(o.graphic=s.destroy()),t&&t.dataLabels&&o.dataLabel&&(o.dataLabel=o.dataLabel.destroy()),o.connector&&(o.connector=o.connector.destroy())),i=o.index,a.updateParallelArrays(o,i),u.data[i]=p(u.data[i],!0)||p(t,!0)?o.options:E(t,u.data[i]),a.isDirty=a.isDirtyData=!0,!a.fixedBox&&a.hasCartesianSeries&&(l.isDirtyBox=!0),"point"===u.legendType&&(l.isDirtyLegend=!0),n&&l.redraw(r)}var i,o=_____WB$wombat$check$this$function_____(this),a=o.series,s=o.graphic,l=a.chart,u=a.options;n=E(n,!0),!1===c?e():o.firePointEvent("update",{options:t},e)},l.prototype.remove=function(e,t){this.series.removePoint(this.series.data.indexOf(this),e,t)},l.prototype.select=function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=n.series,i=r.chart;this.selectedStaging=e=E(e,!n.selected),n.firePointEvent(e?"select":"unselect",{accumulate:t},function(){n.selected=n.options.selected=e,r.options.data[r.data.indexOf(n)]=n.options,n.setState(e&&"select"),t||i.getSelectedPoints().forEach(function(e){var t=e.series;e.selected&&e!==n&&(e.selected=e.options.selected=!1,t.options.data[t.data.indexOf(e)]=e.options,e.setState(i.hoverPoints&&t.options.inactiveOtherPoints?"inactive":""),e.firePointEvent("unselect"))})}),delete this.selectedStaging},l.prototype.onMouseOver=function(e){var t=this.series.chart,n=t.pointer;e=e?n.normalize(e):n.getChartCoordinatesFromPoint(this,t.inverted),n.runPointActions(e,_____WB$wombat$check$this$function_____(this))},l.prototype.onMouseOut=function(){var e=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(e.hoverPoints||[]).forEach(function(e){e.setState()}),e.hoverPoints=e.hoverPoint=null},l.prototype.importEvents=function(){if(!this.hasImportedEvents){var n=_____WB$wombat$check$this$function_____(this),e=f(n.series.options.point,n.options).events;n.events=e,m(e,function(e,t){h(e)&&i(n,t,e)}),this.hasImportedEvents=!0}},l.prototype.setState=function(e,c){var t,n=this.series,r=this.state,i=n.options.states[e||"normal"]||{},o=S.plotOptions[n.type].marker&&n.options.marker,p=o&&!1===o.enabled,a=o&&o.states&&o.states[e||"normal"]||{},d=!1===a.enabled,h=this.marker||{},s=n.chart,f=o&&n.markerAttribs,l=n.halo,u=n.stateMarkerGraphic;if(!((e=e||"")===this.state&&!c||this.selected&&"select"!==e||!1===i.enabled||e&&(d||p&&!1===a.enabled)||e&&h.states&&h.states[e]&&!1===h.states[e].enabled)){if(this.state=e,f&&(t=n.markerAttribs(this,e)),this.graphic&&!this.hasDummyGraphic){if(r&&this.graphic.removeClass("highcharts-point-"+r),e&&this.graphic.addClass("highcharts-point-"+e),!s.styledMode){var m=n.pointAttribs(this,e),g=E(s.options.chart.animation,i.animation);n.options.inactiveOtherPoints&&w(m.opacity)&&((this.dataLabels||[]).forEach(function(e){e&&e.animate({opacity:m.opacity},g)}),this.connector&&this.connector.animate({opacity:m.opacity},g)),this.graphic.animate(m,g)}t&&this.graphic.animate(t,E(s.options.chart.animation,a.animation,o.animation)),u&&u.hide()}else e&&a&&(r=h.symbol||n.symbol,u&&u.currentSymbol!==r&&(u=u.destroy()),t&&(u?u[c?"animate":"attr"]({x:t.x,y:t.y}):r&&(n.stateMarkerGraphic=u=s.renderer.symbol(r,t.x,t.y,t.width,t.height).add(n.markerGroup),u.currentSymbol=r)),!s.styledMode&&u&&"inactive"!==this.state&&u.attr(n.pointAttribs(this,e))),u&&(u[e&&this.isInside?"show":"hide"](),u.element.point=_____WB$wombat$check$this$function_____(this),u.addClass(this.getClassName(),!0));i=i.halo,t=(u=this.graphic||u)&&u.visibility||"inherit",i&&i.size&&u&&"hidden"!==t&&!this.isCluster?(l||(n.halo=l=s.renderer.path().add(u.parentGroup)),l.show()[c?"animate":"attr"]({d:this.haloPath(i.size)}),l.attr({class:"highcharts-halo highcharts-color-"+E(this.colorIndex,n.colorIndex)+(this.className?" "+this.className:""),visibility:t,zIndex:-1}),l.point=_____WB$wombat$check$this$function_____(this),s.styledMode||l.attr(b({fill:this.color||n.color,"fill-opacity":i.opacity},y.filterUserAttributes(i.attributes||{})))):l&&l.point&&l.point.haloPath&&l.animate({d:l.point.haloPath(0)},null,l.hide),v(this,"afterSetState",{state:e})}},l.prototype.haloPath=function(e){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-e,this.plotY-e,2*e,2*e)},l}()}),e(t,"Core/Pointer.js",[t["Core/Color/Color.js"],t["Core/Globals.js"],t["Core/Tooltip.js"],t["Core/Utilities.js"]],function(e,i,n,t){var b=e.parse,u=i.charts,g=i.noop,c=t.addEvent,r=t.attr,v=t.css,w=t.defined,h=t.extend,p=t.find,f=t.fireEvent,m=t.isNumber,y=t.isObject,o=t.objectEach,a=t.offset,d=t.pick,E=t.splat;return e=function(){function l(e,t){this.lastValidTouch={},this.pinchDown=[],this.runChartClick=!1,this.eventsToUnbind=[],this.chart=e,this.hasDragged=!1,this.options=t,this.init(e,t)}return l.prototype.applyInactiveState=function(e){var t,n=[];(e||[]).forEach(function(e){t=e.series,n.push(t),t.linkedParent&&n.push(t.linkedParent),t.linkedSeries&&(n=n.concat(t.linkedSeries)),t.navigatorSeries&&n.push(t.navigatorSeries)}),this.chart.series.forEach(function(e){-1===n.indexOf(e)?e.setState("inactive",!0):e.options.inactiveOtherPoints&&e.setAllPointsToState("inactive")})},l.prototype.destroy=function(){var n=_____WB$wombat$check$this$function_____(this);this.eventsToUnbind.forEach(function(e){return e()}),this.eventsToUnbind=[],i.chartCount||(l.unbindDocumentMouseUp&&(l.unbindDocumentMouseUp=l.unbindDocumentMouseUp()),l.unbindDocumentTouchEnd&&(l.unbindDocumentTouchEnd=l.unbindDocumentTouchEnd())),clearInterval(n.tooltipTimeout),o(n,function(e,t){n[t]=void 0})},l.prototype.drag=function(e){var t=this.chart,n=t.options.chart,r=this.zoomHor,c=this.zoomVert,i=t.plotLeft,o=t.plotTop,p=t.plotWidth,d=t.plotHeight,a=this.mouseDownX||0,h=this.mouseDownY||0,f=y(n.panning)?n.panning&&n.panning.enabled:n.panning,m=n.panKey&&e[n.panKey+"Key"],s=e.chartX,l=e.chartY,u=this.selectionMarker;if((!u||!u.touch)&&(s<i?s=i:s>i+p&&(s=i+p),l<o?l=o:l>o+d&&(l=o+d),this.hasDragged=Math.sqrt(Math.pow(a-s,2)+Math.pow(h-l,2)),10<this.hasDragged)){var g=t.isInsidePlot(a-i,h-o,{visiblePlotOnly:!0});!t.hasCartesianSeries&&!t.mapView||!this.zoomX&&!this.zoomY||!g||m||u||(this.selectionMarker=u=t.renderer.rect(i,o,r?1:p,c?1:d,0).attr({class:"highcharts-selection-marker",zIndex:7}).add(),t.styledMode||u.attr({fill:n.selectionMarkerFill||b("#335cad").setOpacity(.25).get()})),u&&r&&(r=s-a,u.attr({width:Math.abs(r),x:(0<r?0:r)+a})),u&&c&&(r=l-h,u.attr({height:Math.abs(r),y:(0<r?0:r)+h})),g&&!u&&f&&t.pan(e,n.panning)}},l.prototype.dragStart=function(e){var t=this.chart;t.mouseIsDown=e.type,t.cancelClick=!1,t.mouseDownX=this.mouseDownX=e.chartX,t.mouseDownY=this.mouseDownY=e.chartY},l.prototype.drop=function(i){var d=_____WB$wombat$check$this$function_____(this),t=this.chart,o=this.hasPinched;if(this.selectionMarker){var e=this.selectionMarker,a=e.attr?e.attr("x"):e.x,s=e.attr?e.attr("y"):e.y,l=e.attr?e.attr("width"):e.width,u=e.attr?e.attr("height"):e.height,c={originalEvent:i,xAxis:[],yAxis:[],x:a,y:s,width:l,height:u},p=!!t.mapView;(this.hasDragged||o)&&(t.axes.forEach(function(e){if(e.zoomEnabled&&w(e.min)&&(o||d[{xAxis:"zoomX",yAxis:"zoomY"}[e.coll]])&&m(a)&&m(s)){var t=e.horiz,n="touchend"===i.type?e.minPixelPadding:0,r=e.toValue((t?a:s)+n);t=e.toValue((t?a+l:s+u)-n),c[e.coll].push({axis:e,min:Math.min(r,t),max:Math.max(r,t)}),p=!0}}),p&&f(t,"selection",c,function(e){t.zoom(h(e,o?{animation:!1}:null))})),m(t.index)&&(this.selectionMarker=this.selectionMarker.destroy()),o&&this.scaleGroups()}t&&m(t.index)&&(v(t.container,{cursor:t._cursor}),t.cancelClick=10<this.hasDragged,t.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},l.prototype.findNearestKDPoint=function(e,i,o){var a,t=this.chart,n=t.hoverPoint;return t=t.tooltip,n&&t&&t.isStickyOnContact()?n:(e.forEach(function(e){var t=!(e.noSharedTooltip&&i)&&0>e.options.findNearestPointBy.indexOf("y");if(e=e.searchPoint(o,t),(t=y(e,!0)&&e.series)&&!(t=!y(a,!0))){t=a.distX-e.distX;var n=a.dist-e.dist,r=(e.series.group&&e.series.group.zIndex)-(a.series.group&&a.series.group.zIndex);t=0<(0!==t&&i?t:0!==n?n:0!==r?r:a.series.index>e.series.index?-1:1)}t&&(a=e)}),a)},l.prototype.getChartCoordinatesFromPoint=function(e,t){var n=e.series,r=n.xAxis;n=n.yAxis;var i=e.shapeArgs;if(r&&n){var o=d(e.clientX,e.plotX),a=e.plotY||0;return e.isNode&&i&&m(i.x)&&m(i.y)&&(o=i.x,a=i.y),t?{chartX:n.len+n.pos-a,chartY:r.len+r.pos-o}:{chartX:o+r.pos,chartY:a+n.pos}}if(i&&i.x&&i.y)return{chartX:i.x,chartY:i.y}},l.prototype.getChartPosition=function(){if(this.chartPosition)return this.chartPosition;var e=this.chart.container,t=a(e);this.chartPosition={left:t.left,top:t.top,scaleX:1,scaleY:1};var n=e.offsetWidth;return e=e.offsetHeight,2<n&&2<e&&(this.chartPosition.scaleX=t.width/n,this.chartPosition.scaleY=t.height/e),this.chartPosition},l.prototype.getCoordinates=function(t){var n={xAxis:[],yAxis:[]};return this.chart.axes.forEach(function(e){n[e.isXAxis?"xAxis":"yAxis"].push({axis:e,value:e.toValue(t[e.horiz?"chartX":"chartY"])})}),n},l.prototype.getHoverData=function(e,t,n,r,i,o){var a=[];r=!(!r||!e);var s={chartX:o?o.chartX:void 0,chartY:o?o.chartY:void 0,shared:i};f(this,"beforeGetHoverData",s);var l=t&&!t.stickyTracking?[t]:n.filter(function(e){return s.filter?s.filter(e):e.visible&&!(!i&&e.directTouch)&&d(e.options.enableMouseTracking,!0)&&e.stickyTracking}),u=r||!o?e:this.findNearestKDPoint(l,i,o);return t=u&&u.series,u&&(i&&!t.noSharedTooltip?(l=n.filter(function(e){return s.filter?s.filter(e):e.visible&&!(!i&&e.directTouch)&&d(e.options.enableMouseTracking,!0)&&!e.noSharedTooltip})).forEach(function(e){var t=p(e.points,function(e){return e.x===u.x&&!e.isNull});y(t)&&(e.chart.isBoosting&&(t=e.getPoint(t)),a.push(t))}):a.push(u)),f(this,"afterGetHoverData",s={hoverPoint:u}),{hoverPoint:s.hoverPoint,hoverSeries:t,hoverPoints:a}},l.prototype.getPointFromEvent=function(e){e=e.target;for(var t;e&&!t;)t=e.point,e=e.parentNode;return t},l.prototype.onTrackerMouseOut=function(e){e=e.relatedTarget||e.toElement;var t=this.chart.hoverSeries;this.isDirectTouch=!1,!t||!e||t.stickyTracking||this.inClass(e,"highcharts-tooltip")||this.inClass(e,"highcharts-series-"+t.index)&&this.inClass(e,"highcharts-tracker")||t.onMouseOut()},l.prototype.inClass=function(e,t){for(var n;e;){if(n=r(e,"class")){if(-1!==n.indexOf(t))return!0;if(-1!==n.indexOf("highcharts-container"))return!1}e=e.parentNode}},l.prototype.init=function(e,t){this.options=t,this.chart=e,this.runChartClick=!(!t.chart.events||!t.chart.events.click),this.pinchDown=[],this.lastValidTouch={},n&&(e.tooltip=new n(e,t.tooltip),this.followTouchMove=d(t.tooltip.followTouchMove,!0)),this.setDOMEvents()},l.prototype.normalize=function(e,t){var n=e.touches,r=n?n.length?n.item(0):d(n.changedTouches,e.changedTouches)[0]:e;return t||(t=this.getChartPosition()),n=r.pageX-t.left,r=r.pageY-t.top,n/=t.scaleX,r/=t.scaleY,h(e,{chartX:Math.round(n),chartY:Math.round(r)})},l.prototype.onContainerClick=function(e){var t=this.chart,n=t.hoverPoint;e=this.normalize(e);var r=t.plotLeft,i=t.plotTop;t.cancelClick||(n&&this.inClass(e.target,"highcharts-tracker")?(f(n.series,"click",h(e,{point:n})),t.hoverPoint&&n.firePointEvent("click",e)):(h(e,this.getCoordinates(e)),t.isInsidePlot(e.chartX-r,e.chartY-i,{visiblePlotOnly:!0})&&f(t,"click",e)))},l.prototype.onContainerMouseDown=function(e){var t=1==(1&(e.buttons||e.button));e=this.normalize(e),i.isFirefox&&0!==e.button&&this.onContainerMouseMove(e),(void 0===e.button||t)&&(this.zoomOption(e),t&&e.preventDefault&&e.preventDefault(),this.dragStart(e))},l.prototype.onContainerMouseLeave=function(e){var t=u[d(l.hoverChartIndex,-1)],n=this.chart.tooltip;n&&n.shouldStickOnContact()&&this.inClass(e.relatedTarget,"highcharts-tooltip-container")||(e=this.normalize(e),t&&(e.relatedTarget||e.toElement)&&(t.pointer.reset(),t.pointer.chartPosition=void 0),n&&!n.isHidden&&this.reset())},l.prototype.onContainerMouseEnter=function(e){delete this.chartPosition},l.prototype.onContainerMouseMove=function(e){var t=this.chart;e=this.normalize(e),this.setHoverChartIndex(),e.preventDefault||(e.returnValue=!1),("mousedown"===t.mouseIsDown||this.touchSelect(e))&&this.drag(e),t.openMenu||!this.inClass(e.target,"highcharts-tracker")&&!t.isInsidePlot(e.chartX-t.plotLeft,e.chartY-t.plotTop,{visiblePlotOnly:!0})||(this.inClass(e.target,"highcharts-no-tooltip")?this.reset(!1,0):this.runPointActions(e))},l.prototype.onDocumentTouchEnd=function(e){var t=u[d(l.hoverChartIndex,-1)];t&&t.pointer.drop(e)},l.prototype.onContainerTouchMove=function(e){this.touchSelect(e)?this.onContainerMouseMove(e):this.touch(e)},l.prototype.onContainerTouchStart=function(e){this.touchSelect(e)?this.onContainerMouseDown(e):(this.zoomOption(e),this.touch(e,!0))},l.prototype.onDocumentMouseMove=function(e){var t=this.chart,n=this.chartPosition;e=this.normalize(e,n);var r=t.tooltip;!n||r&&r.isStickyOnContact()||t.isInsidePlot(e.chartX-t.plotLeft,e.chartY-t.plotTop,{visiblePlotOnly:!0})||this.inClass(e.target,"highcharts-tracker")||this.reset()},l.prototype.onDocumentMouseUp=function(e){var t=u[d(l.hoverChartIndex,-1)];t&&t.pointer.drop(e)},l.prototype.pinch=function(e){var t=_____WB$wombat$check$this$function_____(this),a=t.chart,n=t.pinchDown,r=e.touches||[],i=r.length,o=t.lastValidTouch,s=t.hasZoom,l={},c=1===i&&(t.inClass(e.target,"highcharts-tracker")&&a.runTrackerClick||t.runChartClick),p={},u=t.selectionMarker;1<i?t.initiated=!0:1===i&&this.followTouchMove&&(t.initiated=!1),s&&t.initiated&&!c&&!1!==e.cancelable&&e.preventDefault(),[].map.call(r,function(e){return t.normalize(e)}),"touchstart"===e.type?([].forEach.call(r,function(e,t){n[t]={chartX:e.chartX,chartY:e.chartY}}),o.x=[n[0].chartX,n[1]&&n[1].chartX],o.y=[n[0].chartY,n[1]&&n[1].chartY],a.axes.forEach(function(e){if(e.zoomEnabled){var t=a.bounds[e.horiz?"h":"v"],n=e.minPixelPadding,r=e.toPixels(Math.min(d(e.options.min,e.dataMin),e.dataMin)),i=e.toPixels(Math.max(d(e.options.max,e.dataMax),e.dataMax)),o=Math.max(r,i);t.min=Math.min(e.pos,Math.min(r,i)-n),t.max=Math.max(e.pos+e.len,o+n)}}),t.res=!0):t.followTouchMove&&1===i?this.runPointActions(t.normalize(e)):n.length&&(f(a,"touchpan",{originalEvent:e},function(){u||(t.selectionMarker=u=h({destroy:g,touch:!0},a.plotBox)),t.pinchTranslate(n,r,l,u,p,o),t.hasPinched=s,t.scaleGroups(l,p)}),t.res&&(t.res=!1,this.reset(!1,0)))},l.prototype.pinchTranslate=function(e,t,n,r,i,o){this.zoomHor&&this.pinchTranslateDirection(!0,e,t,n,r,i,o),this.zoomVert&&this.pinchTranslateDirection(!1,e,t,n,r,i,o)},l.prototype.pinchTranslateDirection=function(e,t,n,c,p,r,d,h){var i=this.chart,o=e?"x":"y",f=e?"X":"Y",m="chart"+f,g=e?"width":"height",y=i["plot"+(e?"Left":"Top")],b=i.inverted,v=i.bounds[e?"h":"v"],w=1===t.length,E=t[0][m],S=!w&&t[1][m];t=function(){"number"==typeof u&&20<Math.abs(E-S)&&(s=h||Math.abs(l-u)/Math.abs(E-S)),T=(y-l)/s+E,a=i["plot"+(e?"Width":"Height")]/s};var a,T,s=h||1,l=n[0][m],u=!w&&n[1][m];if(t(),(n=T)<v.min){n=v.min;var x=!0}else n+a>v.max&&(n=v.max-a,x=!0);x?(l-=.8*(l-d[o][0]),"number"==typeof u&&(u-=.8*(u-d[o][1])),t()):d[o]=[l,u],b||(r[o]=T-y,r[g]=a),r=b?1/s:s,p[g]=a,p[o]=n,c[b?e?"scaleY":"scaleX":"scale"+f]=s,c["translate"+f]=r*y+(l-r*E)},l.prototype.reset=function(t,e){var n=this.chart,r=n.hoverSeries,i=n.hoverPoint,o=n.hoverPoints,a=n.tooltip,s=a&&a.shared?o:i;t&&s&&E(s).forEach(function(e){e.series.isCartesian&&void 0===e.plotX&&(t=!1)}),t?a&&s&&E(s).length&&(a.refresh(s),a.shared&&o?o.forEach(function(e){e.setState(e.state,!0),e.series.isCartesian&&(e.series.xAxis.crosshair&&e.series.xAxis.drawCrosshair(null,e),e.series.yAxis.crosshair&&e.series.yAxis.drawCrosshair(null,e))}):i&&(i.setState(i.state,!0),n.axes.forEach(function(e){e.crosshair&&i.series[e.coll]===e&&e.drawCrosshair(null,i)}))):(i&&i.onMouseOut(),o&&o.forEach(function(e){e.setState()}),r&&r.onMouseOut(),a&&a.hide(e),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),n.axes.forEach(function(e){e.hideCrosshair()}),this.hoverX=n.hoverPoints=n.hoverPoint=null)},l.prototype.runPointActions=function(r,e){var i=this.chart,t=i.tooltip&&i.tooltip.options.enabled?i.tooltip:void 0,n=!!t&&t.shared,o=e||i.hoverPoint,a=o&&o.series||i.hoverSeries;o=(e=this.getHoverData(o,a,i.series,(!r||"touchmove"!==r.type)&&(!!e||a&&a.directTouch&&this.isDirectTouch),n,r)).hoverPoint,a=e.hoverSeries;var s=e.hoverPoints;if(e=a&&a.tooltipOptions.followPointer&&!a.tooltipOptions.split,n=n&&a&&!a.noSharedTooltip,o&&(o!==i.hoverPoint||t&&t.isHidden)){if((i.hoverPoints||[]).forEach(function(e){-1===s.indexOf(e)&&e.setState()}),i.hoverSeries!==a&&a.onMouseOver(),this.applyInactiveState(s),(s||[]).forEach(function(e){e.setState("hover")}),i.hoverPoint&&i.hoverPoint.firePointEvent("mouseOut"),!o.series)return;i.hoverPoints=s,i.hoverPoint=o,o.firePointEvent("mouseOver"),t&&t.refresh(n?s:o,r)}else e&&t&&!t.isHidden&&(o=t.getAnchor([{}],r),i.isInsidePlot(o[0],o[1],{visiblePlotOnly:!0})&&t.updatePosition({plotX:o[0],plotY:o[1]}));this.unDocMouseMove||(this.unDocMouseMove=c(i.container.ownerDocument,"mousemove",function(e){var t=u[l.hoverChartIndex];t&&t.pointer.onDocumentMouseMove(e)}),this.eventsToUnbind.push(this.unDocMouseMove)),i.axes.forEach(function(t){var e,n=d((t.crosshair||{}).snap,!0);n&&((e=i.hoverPoint)&&e.series[t.coll]===t||(e=p(s,function(e){return e.series[t.coll]===t}))),e||!n?t.drawCrosshair(r,e):t.hideCrosshair()})},l.prototype.scaleGroups=function(n,r){var i=this.chart;i.series.forEach(function(e){var t=n||e.getPlotBox();e.group&&(e.xAxis&&e.xAxis.zoomEnabled||i.mapView)&&(e.group.attr(t),e.markerGroup&&(e.markerGroup.attr(t),e.markerGroup.clip(r?i.clipRect:null)),e.dataLabelsGroup&&e.dataLabelsGroup.attr(t))}),i.clipRect.attr(r||i.clipBox)},l.prototype.setDOMEvents=function(){var e=_____WB$wombat$check$this$function_____(this),t=this.chart.container,n=t.ownerDocument;t.onmousedown=this.onContainerMouseDown.bind(this),t.onmousemove=this.onContainerMouseMove.bind(this),t.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(c(t,"mouseenter",this.onContainerMouseEnter.bind(this))),this.eventsToUnbind.push(c(t,"mouseleave",this.onContainerMouseLeave.bind(this))),l.unbindDocumentMouseUp||(l.unbindDocumentMouseUp=c(n,"mouseup",this.onDocumentMouseUp.bind(this)));for(var r=this.chart.renderTo.parentElement;r&&"BODY"!==r.tagName;)this.eventsToUnbind.push(c(r,"scroll",function(){delete e.chartPosition})),r=r.parentElement;i.hasTouch&&(this.eventsToUnbind.push(c(t,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1})),this.eventsToUnbind.push(c(t,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),l.unbindDocumentTouchEnd||(l.unbindDocumentTouchEnd=c(n,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})))},l.prototype.setHoverChartIndex=function(){var e=this.chart,t=i.charts[d(l.hoverChartIndex,-1)];t&&t!==e&&t.pointer.onContainerMouseLeave({relatedTarget:!0}),t&&t.mouseIsDown||(l.hoverChartIndex=e.index)},l.prototype.touch=function(e,t){var n=this.chart;if(this.setHoverChartIndex(),1===e.touches.length)if(e=this.normalize(e),n.isInsidePlot(e.chartX-n.plotLeft,e.chartY-n.plotTop,{visiblePlotOnly:!0})&&!n.openMenu){if(t&&this.runPointActions(e),"touchmove"===e.type)var r=!!(t=this.pinchDown)[0]&&4<=Math.sqrt(Math.pow(t[0].chartX-e.chartX,2)+Math.pow(t[0].chartY-e.chartY,2));d(r,!0)&&this.pinch(e)}else t&&this.reset();else 2===e.touches.length&&this.pinch(e)},l.prototype.touchSelect=function(e){return!(!this.chart.options.chart.zoomBySingleTouch||!e.touches||1!==e.touches.length)},l.prototype.zoomOption=function(e){var t=this.chart,n=t.options.chart;t=t.inverted;var r=n.zoomType||"";/touch/.test(e.type)&&(r=d(n.pinchType,r)),this.zoomX=e=/x/.test(r),this.zoomY=n=/y/.test(r),this.zoomHor=e&&!t||n&&t,this.zoomVert=n&&!t||e&&t,this.hasZoom=e||n},l}()}),e(t,"Core/MSPointer.js",[t["Core/Globals.js"],t["Core/Pointer.js"],t["Core/Utilities.js"]],function(t,o,e){function a(){var t=[];return t.item=function(e){return _____WB$wombat$check$this$function_____(this)[e]},n(u,function(e){t.push({pageX:e.pageX,pageY:e.pageY,target:e.target})}),t}function r(e,t,n,r){var i=p[o.hoverChartIndex||NaN];"touch"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_TOUCH||!i||(i=i.pointer,r(e),i[t]({type:n,target:e.currentTarget,preventDefault:h,touches:a()}))}var i,s=_____WB$wombat$check$this$function_____(this)&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=t.charts,d=t.doc,h=t.noop,l=t.win,f=e.addEvent,m=e.css,n=e.objectEach,g=e.removeEvent,u={},c=!!l.PointerEvent;return function(n){function e(){return null!==n&&n.apply(this,arguments)||_____WB$wombat$check$this$function_____(this)}return s(e,n),e.isRequired=function(){return!(t.hasTouch||!l.PointerEvent&&!l.MSPointerEvent)},e.prototype.batchMSEvents=function(e){e(this.chart.container,c?"pointerdown":"MSPointerDown",this.onContainerPointerDown),e(this.chart.container,c?"pointermove":"MSPointerMove",this.onContainerPointerMove),e(d,c?"pointerup":"MSPointerUp",this.onDocumentPointerUp)},e.prototype.destroy=function(){this.batchMSEvents(g),n.prototype.destroy.call(this)},e.prototype.init=function(e,t){n.prototype.init.call(this,e,t),this.hasZoom&&m(e.container,{"-ms-touch-action":"none","touch-action":"none"})},e.prototype.onContainerPointerDown=function(e){r(e,"onContainerTouchStart","touchstart",function(e){u[e.pointerId]={pageX:e.pageX,pageY:e.pageY,target:e.currentTarget}})},e.prototype.onContainerPointerMove=function(e){r(e,"onContainerTouchMove","touchmove",function(e){u[e.pointerId]={pageX:e.pageX,pageY:e.pageY},u[e.pointerId].target||(u[e.pointerId].target=e.currentTarget)})},e.prototype.onDocumentPointerUp=function(e){r(e,"onDocumentTouchEnd","touchend",function(e){delete u[e.pointerId]})},e.prototype.setDOMEvents=function(){n.prototype.setDOMEvents.call(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(f)},e}(o)}),e(t,"Core/Legend/Legend.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/FormatUtilities.js"],t["Core/Globals.js"],t["Core/Series/Point.js"],t["Core/Renderer/RendererUtilities.js"],t["Core/Utilities.js"]],function(e,o,t,u,n,r){var d=e.animObject,h=e.setAnimation,a=o.format;e=t.isFirefox;var s=t.marginNames;t=t.win;var c=n.distribute,i=r.addEvent,f=r.createElement,m=r.css,l=r.defined,g=r.discardElement,b=r.find,p=r.fireEvent,v=r.isNumber,y=r.merge,w=r.pick,E=r.relativeLength,S=r.stableSort,T=r.syncTimeout;return n=r.wrap,r=function(){function e(e,t){this.allItems=[],this.contentGroup=this.box=void 0,this.display=!1,this.group=void 0,this.offsetWidth=this.maxLegendWidth=this.maxItemWidth=this.legendWidth=this.legendHeight=this.lastLineHeight=this.lastItemY=this.itemY=this.itemX=this.itemMarginTop=this.itemMarginBottom=this.itemHeight=this.initialItemY=0,this.options={},this.padding=0,this.pages=[],this.proximate=!1,this.scrollGroup=void 0,this.widthOption=this.totalItemWidth=this.titleHeight=this.symbolWidth=this.symbolHeight=0,this.chart=e,this.init(e,t)}return e.prototype.init=function(e,t){this.chart=e,this.setOptions(t),t.enabled&&(this.render(),i(this.chart,"endResize",function(){this.legend.positionCheckboxes()}),this.proximate?this.unchartrender=i(this.chart,"render",function(){this.legend.proximatePositions(),this.legend.positionItems()}):this.unchartrender&&this.unchartrender())},e.prototype.setOptions=function(e){var t=w(e.padding,8);this.options=e,this.chart.styledMode||(this.itemStyle=e.itemStyle,this.itemHiddenStyle=y(this.itemStyle,e.itemHiddenStyle)),this.itemMarginTop=e.itemMarginTop||0,this.itemMarginBottom=e.itemMarginBottom||0,this.padding=t,this.initialItemY=t-5,this.symbolWidth=w(e.symbolWidth,16),this.pages=[],this.proximate="proximate"===e.layout&&!this.chart.inverted,this.baseline=void 0},e.prototype.update=function(e,t){var n=this.chart;this.setOptions(y(!0,this.options,e)),this.destroy(),n.isDirtyLegend=n.isDirtyBox=!0,w(t,!0)&&n.redraw(),p(this,"afterUpdate")},e.prototype.colorizeItem=function(e,t){if(e.legendGroup[t?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){var n=this.options,r=e.legendItem,i=e.legendLine,o=e.legendSymbol,a=this.itemHiddenStyle.color;n=t?n.itemStyle.color:a;var s=t&&e.color||a,l=e.options&&e.options.marker,u={fill:s};r&&r.css({fill:n,color:n}),i&&i.attr({stroke:s}),o&&(l&&o.isMarker&&(u=e.pointAttribs(),t||(u.stroke=u.fill=a)),o.attr(u))}p(this,"afterColorizeItem",{item:e,visible:t})},e.prototype.positionItems=function(){this.allItems.forEach(this.positionItem,_____WB$wombat$check$this$function_____(this)),this.chart.isResizing||this.positionCheckboxes()},e.prototype.positionItem=function(e){var t=_____WB$wombat$check$this$function_____(this),n=this.options,r=n.symbolPadding,i=!n.rtl,o=e._legendItemPos;n=o[0],o=o[1];var a=e.checkbox,s=e.legendGroup;s&&s.element&&(r={translateX:i?n:this.legendWidth-n-2*r-4,translateY:o},i=function(){p(t,"afterPositionItem",{item:e})},l(s.translateY)?s.animate(r,void 0,i):(s.attr(r),i())),a&&(a.x=n,a.y=o)},e.prototype.destroyItem=function(t){var e=t.checkbox;["legendItem","legendLine","legendSymbol","legendGroup"].forEach(function(e){t[e]&&(t[e]=t[e].destroy())}),e&&g(t.checkbox)},e.prototype.destroy=function(){function t(e){this[e]&&(this[e]=_____WB$wombat$check$this$function_____(this)[e].destroy())}this.getAllItems().forEach(function(e){["legendItem","legendGroup"].forEach(t,e)}),"clipRect up down pager nav box title group".split(" ").forEach(t,_____WB$wombat$check$this$function_____(this)),this.display=null},e.prototype.positionCheckboxes=function(){var r=this.group&&this.group.alignAttr,i=this.clipHeight||this.legendHeight,o=this.titleHeight;if(r){var a=r.translateY;this.allItems.forEach(function(e){var t=e.checkbox;if(t){var n=a+o+t.y+(this.scrollOffset||0)+3;m(t,{left:r.translateX+e.checkboxOffset+t.x-20+"px",top:n+"px",display:this.proximate||n>a-6&&n<a+i-6?"":"none"})}},_____WB$wombat$check$this$function_____(this))}},e.prototype.renderTitle=function(){var e=this.options,t=this.padding,n=e.title,r=0;n.text&&(this.title||(this.title=this.chart.renderer.label(n.text,t-3,t-4,null,null,null,e.useHTML,null,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(n.style),this.title.add(this.group)),n.width||this.title.css({width:this.maxLegendWidth+"px"}),r=(e=this.title.getBBox()).height,this.offsetWidth=e.width,this.contentGroup.attr({translateY:r})),this.titleHeight=r},e.prototype.setText=function(e){var t=this.options;e.legendItem.attr({text:t.labelFormat?a(t.labelFormat,e,this.chart):t.labelFormatter.call(e)})},e.prototype.renderItem=function(e){var t=this.chart,n=t.renderer,r=this.options,c=this.symbolWidth,i=r.symbolPadding||0,o=this.itemStyle,p=this.itemHiddenStyle,d="horizontal"===r.layout?w(r.itemDistance,20):0,a=!r.rtl,h=!e.series,s=!h&&e.series.drawLegendSymbol?e.series:e,l=s.options,f=this.createCheckboxForItem&&l&&l.showCheckbox,m=r.useHTML,g=e.options.className,u=e.legendItem;l=c+i+d+(f?20:0),u||(e.legendGroup=n.g("legend-item").addClass("highcharts-"+s.type+"-series highcharts-color-"+e.colorIndex+(g?" "+g:"")+(h?" highcharts-series-"+e.index:"")).attr({zIndex:1}).add(this.scrollGroup),e.legendItem=u=n.text("",a?c+i:-i,this.baseline||0,m),t.styledMode||u.css(y(e.visible?o:p)),u.attr({align:a?"left":"right",zIndex:2}).add(e.legendGroup),this.baseline||(this.fontMetrics=n.fontMetrics(t.styledMode?12:o.fontSize,u),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,u.attr("y",this.baseline),this.symbolHeight=r.symbolHeight||this.fontMetrics.f,r.squareSymbol&&(this.symbolWidth=w(r.symbolWidth,Math.max(this.symbolHeight,16)),l=this.symbolWidth+i+d+(f?20:0),a&&u.attr("x",this.symbolWidth+i))),s.drawLegendSymbol(this,e),this.setItemEvents&&this.setItemEvents(e,u,m)),f&&!e.checkbox&&this.createCheckboxForItem&&this.createCheckboxForItem(e),this.colorizeItem(e,e.visible),!t.styledMode&&o.width||u.css({width:(r.itemWidth||this.widthOption||t.spacingBox.width)-l+"px"}),this.setText(e),t=u.getBBox(),n=this.fontMetrics&&this.fontMetrics.h||0,e.itemWidth=e.checkboxOffset=r.itemWidth||e.legendItemWidth||t.width+l,this.maxItemWidth=Math.max(this.maxItemWidth,e.itemWidth),this.totalItemWidth+=e.itemWidth,this.itemHeight=e.itemHeight=Math.round(e.legendItemHeight||(t.height>1.5*n?t.height:n))},e.prototype.layoutItem=function(e){var t=this.options,n=this.padding,r="horizontal"===t.layout,i=e.itemHeight,o=this.itemMarginBottom,a=this.itemMarginTop,s=r?w(t.itemDistance,20):0,l=this.maxLegendWidth;t=t.alignColumns&&this.totalItemWidth>l?this.maxItemWidth:e.itemWidth,r&&this.itemX-n+t>l&&(this.itemX=n,this.lastLineHeight&&(this.itemY+=a+this.lastLineHeight+o),this.lastLineHeight=0),this.lastItemY=a+this.itemY+o,this.lastLineHeight=Math.max(i,this.lastLineHeight),e._legendItemPos=[this.itemX,this.itemY],r?this.itemX+=t:(this.itemY+=a+i+o,this.lastLineHeight=i),this.offsetWidth=this.widthOption||Math.max((r?this.itemX-n-(e.checkbox?0:s):t)+n,this.offsetWidth)},e.prototype.getAllItems=function(){var n=[];return this.chart.series.forEach(function(e){var t=e&&e.options;e&&w(t.showInLegend,!l(t.linkedTo)&&void 0,!0)&&(n=n.concat(e.legendItems||("point"===t.legendType?e.data:e)))}),p(this,"afterGetAllItems",{allItems:n}),n},e.prototype.getAlignment=function(){var e=this.options;return this.proximate?e.align.charAt(0)+"tv":e.floating?"":e.align.charAt(0)+e.verticalAlign.charAt(0)+e.layout.charAt(0)},e.prototype.adjustMargins=function(n,r){var i=this.chart,o=this.options,a=this.getAlignment();a&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(e,t){e.test(a)&&!l(n[t])&&(i[s[t]]=Math.max(i[s[t]],i.legend[(t+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][t]*o[t%2?"x":"y"]+w(o.margin,12)+r[t]+(i.titleOffset[t]||0)))})},e.prototype.proximatePositions=function(){var i=this.chart,o=[],a="left"===this.options.align;this.allItems.forEach(function(e){var t,n=a;if(e.yAxis){e.xAxis.options.reversed&&(n=!n),e.points&&(t=b(n?e.points:e.points.slice(0).reverse(),function(e){return v(e.plotY)})),n=this.itemMarginTop+e.legendItem.getBBox().height+this.itemMarginBottom;var r=e.yAxis.top-i.plotTop;e.visible?(t=t?t.plotY:e.yAxis.height,t+=r-.3*n):t=r+e.yAxis.height,o.push({target:t,size:n,item:e})}},_____WB$wombat$check$this$function_____(this)),c(o,i.plotHeight).forEach(function(e){e.item._legendItemPos&&(e.item._legendItemPos[1]=i.plotTop-i.spacing[0]+e.pos)})},e.prototype.render=function(){var e=this.chart,t=e.renderer,n=this.options,r=this.padding,i=this.getAllItems(),o=this.group,a=this.box;this.itemX=r,this.itemY=this.initialItemY,this.lastItemY=this.offsetWidth=0,this.widthOption=E(n.width,e.spacingBox.width-r);var s=e.spacingBox.width-2*r-n.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(s/=2),this.maxLegendWidth=this.widthOption||s,o||(this.group=o=t.g("legend").addClass(n.className||"").attr({zIndex:7}).add(),this.contentGroup=t.g().attr({zIndex:1}).add(o),this.scrollGroup=t.g().add(this.contentGroup)),this.renderTitle(),S(i,function(e,t){return(e.options&&e.options.legendIndex||0)-(t.options&&t.options.legendIndex||0)}),n.reversed&&i.reverse(),this.allItems=i,this.display=s=!!i.length,this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0,i.forEach(this.renderItem,_____WB$wombat$check$this$function_____(this)),i.forEach(this.layoutItem,_____WB$wombat$check$this$function_____(this)),i=(this.widthOption||this.offsetWidth)+r;var l=this.lastItemY+this.lastLineHeight+this.titleHeight;l=this.handleOverflow(l),l+=r,a||(this.box=a=t.rect().addClass("highcharts-legend-box").attr({r:n.borderRadius}).add(o),a.isNew=!0),e.styledMode||a.attr({stroke:n.borderColor,"stroke-width":n.borderWidth||0,fill:n.backgroundColor||"none"}).shadow(n.shadow),0<i&&0<l&&(a[a.isNew?"attr":"animate"](a.crisp.call({},{x:0,y:0,width:i,height:l},a.strokeWidth())),a.isNew=!1),a[s?"show":"hide"](),e.styledMode&&"none"===o.getStyle("display")&&(i=l=0),this.legendWidth=i,this.legendHeight=l,s&&this.align(),this.proximate||this.positionItems(),p(this,"afterRender")},e.prototype.align=function(e){void 0===e&&(e=this.chart.spacingBox);var t=this.chart,n=this.options,r=e.y;/(lth|ct|rth)/.test(this.getAlignment())&&0<t.titleOffset[0]?r+=t.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&0<t.titleOffset[2]&&(r-=t.titleOffset[2]),r!==e.y&&(e=y(e,{y:r})),this.group.align(y(n,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?"top":n.verticalAlign}),!0,e)},e.prototype.handleOverflow=function(e){var o,c,t=_____WB$wombat$check$this$function_____(this),p=this.chart,n=p.renderer,r=this.options,i=r.y,d="top"===r.verticalAlign,h=this.padding,f=r.maxHeight,m=r.navigation,g=w(m.animation,!0),a=m.arrowSize||12,s=this.pages,y=this.allItems,b=function(e){"number"==typeof e?u.attr({height:e}):u&&(t.clipRect=u.destroy(),t.contentGroup.clip()),t.contentGroup.div&&(t.contentGroup.div.style.clip=e?"rect("+h+"px,9999px,"+(h+e)+"px,0)":"auto")},v=function(e){return t[e]=n.circle(0,0,1.3*a).translate(a/2,a/2).add(l),p.styledMode||t[e].attr("fill","rgba(0,0,0,0.0001)"),t[e]};i=p.spacingBox.height+(d?-i:i)-h;var l=this.nav,u=this.clipRect;return"horizontal"!==r.layout||"middle"===r.verticalAlign||r.floating||(i/=2),f&&(i=Math.min(i,f)),s.length=0,e&&0<i&&e>i&&!1!==m.enabled?(this.clipHeight=o=Math.max(i-20-this.titleHeight-h,0),this.currentPage=w(this.currentPage,1),this.fullHeight=e,y.forEach(function(e,t){var n=e._legendItemPos[1],r=Math.round(e.legendItem.getBBox().height),i=s.length;(!i||n-s[i-1]>o&&(c||n)!==s[i-1])&&(s.push(c||n),i++),e.pageIx=i-1,c&&(y[t-1].pageIx=i-1),t===y.length-1&&n+r-s[i-1]>o&&r<=o&&(s.push(n),e.pageIx=i),n!==c&&(c=n)}),u||(u=t.clipRect=n.clipRect(0,h,9999,0),t.contentGroup.clip(u)),b(o),l||(this.nav=l=n.g().attr({zIndex:1}).add(this.group),this.up=n.symbol("triangle",0,0,a,a).add(l),v("upTracker").on("click",function(){t.scroll(-1,g)}),this.pager=n.text("",15,10).addClass("highcharts-legend-navigation"),p.styledMode||this.pager.css(m.style),this.pager.add(l),this.down=n.symbol("triangle-down",0,0,a,a).add(l),v("downTracker").on("click",function(){t.scroll(1,g)})),t.scroll(0),e=i):l&&(b(),this.nav=l.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),e},e.prototype.scroll=function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=this.chart,i=this.pages,o=i.length,a=this.clipHeight,s=this.options.navigation,l=this.pager,c=this.padding,u=this.currentPage+e;u>o&&(u=o),0<u&&(void 0!==t&&h(t,r),this.nav.attr({translateX:c,translateY:a+this.padding+7+this.titleHeight,visibility:"visible"}),[this.up,this.upTracker].forEach(function(e){e.attr({class:1===u?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),l.attr({text:u+"/"+o}),[this.down,this.downTracker].forEach(function(e){e.attr({x:18+this.pager.getBBox().width,class:u===o?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},_____WB$wombat$check$this$function_____(this)),r.styledMode||(this.up.attr({fill:1===u?s.inactiveColor:s.activeColor}),this.upTracker.css({cursor:1===u?"default":"pointer"}),this.down.attr({fill:u===o?s.inactiveColor:s.activeColor}),this.downTracker.css({cursor:u===o?"default":"pointer"})),this.scrollOffset=-i[u-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=u,this.positionCheckboxes(),e=d(w(t,r.renderer.globalAnimation,!0)),T(function(){p(n,"afterScroll",{currentPage:u})},e.duration))},e.prototype.setItemEvents=function(n,t,e){var r=_____WB$wombat$check$this$function_____(this),i=r.chart.renderer.boxWrapper,o=n instanceof u,a="highcharts-legend-"+(o?"point":"series")+"-active",s=r.chart.styledMode,l=function(t){r.allItems.forEach(function(e){n!==e&&[e].concat(e.linkedSeries||[]).forEach(function(e){e.setState(t,!o)})})};(e?[t,n.legendSymbol]:[n.legendGroup]).forEach(function(e){e&&e.on("mouseover",function(){n.visible&&l("inactive"),n.setState("hover"),n.visible&&i.addClass(a),s||t.css(r.options.itemHoverStyle)}).on("mouseout",function(){r.chart.styledMode||t.css(y(n.visible?r.itemStyle:r.itemHiddenStyle)),l(""),i.removeClass(a),n.setState()}).on("click",function(e){var t=function(){n.setVisible&&n.setVisible(),l(n.visible?"inactive":"")};i.removeClass(a),e={browserEvent:e},n.firePointEvent?n.firePointEvent("legendItemClick",e,t):p(n,"legendItemClick",e,t)})})},e.prototype.createCheckboxForItem=function(t){t.checkbox=f("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){p(t.series||t,"checkboxClick",{checked:e.target.checked,item:t},function(){t.select()})})},e}(),(/Trident\/7\.0/.test(t.navigator&&t.navigator.userAgent)||e)&&n(r.prototype,"positionItem",function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=function(){t._legendItemPos&&e.call(n,t)};r(),n.bubbleLegend||setTimeout(r)}),r}),e(t,"Core/Series/SeriesRegistry.js",[t["Core/Globals.js"],t["Core/DefaultOptions.js"],t["Core/Series/Point.js"],t["Core/Utilities.js"]],function(e,t,l,n){var r,u=t.defaultOptions,i=n.error,c=n.extendClass,p=n.merge;return function(a){function s(e,t){var n=u.plotOptions||{},r=t.defaultOptions;t.prototype.pointClass||(t.prototype.pointClass=l),t.prototype.type=e,r&&(n[e]=r),a.seriesTypes[e]=t}a.seriesTypes=e.seriesTypes,a.getSeries=function(e,t){void 0===t&&(t={});var n=e.options.chart;n=t.type||n.type||n.defaultSeriesType||"";var r=a.seriesTypes[n];return a||i(17,!0,e,{missingModuleFor:n}),"function"==typeof(n=new r).init&&n.init(e,t),n},a.registerSeriesType=s,a.seriesType=function(e,t,n,r,i){var o=u.plotOptions||{};return t=t||"",o[e]=p(o[t],n),s(e,c(a.seriesTypes[t]||function(){},r)),a.seriesTypes[e].prototype.type=e,i&&(a.seriesTypes[e].prototype.pointClass=c(l,i)),a.seriesTypes[e]}}(r||(r={})),r}),e(t,"Core/Chart/Chart.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/Axis/Axis.js"],t["Core/FormatUtilities.js"],t["Core/Foundation.js"],t["Core/Globals.js"],t["Core/Legend/Legend.js"],t["Core/MSPointer.js"],t["Core/DefaultOptions.js"],t["Core/Pointer.js"],t["Core/Renderer/RendererRegistry.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/SVGRenderer.js"],t["Core/Time.js"],t["Core/Utilities.js"],t["Core/Renderer/HTML/AST.js"]],function(e,i,t,n,a,p,o,r,f,m,g,b,v,s,w){var E=e.animate,T=e.animObject,x=e.setAnimation,_=t.numberFormat,C=n.registerEventOptions,l=a.charts,u=a.doc,A=a.marginNames,k=a.svg,M=a.win,O=r.defaultOptions,D=r.defaultTime,L=g.seriesTypes,I=s.addEvent,N=s.attr,j=s.cleanRecursively,F=s.createElement,c=s.css,d=s.defined,R=s.discardElement,P=s.erase,B=s.error,z=s.extend,V=s.find,S=s.fireEvent,H=s.getStyle,U=s.isArray,q=s.isNumber,W=s.isObject,G=s.isString,h=s.merge,Y=s.objectEach,y=s.pick,K=s.pInt,X=s.relativeLength,Q=s.removeEvent,Z=s.splat,J=s.syncTimeout,$=s.uniqueKey;return e=function(){function r(e,t,n){this.series=this.renderTo=this.renderer=this.pointer=this.pointCount=this.plotWidth=this.plotTop=this.plotLeft=this.plotHeight=this.plotBox=this.options=this.numberFormatter=this.margin=this.legend=this.labelCollectors=this.isResizing=this.index=this.eventOptions=this.container=this.colorCounter=this.clipBox=this.chartWidth=this.chartHeight=this.bounds=this.axisOffset=this.axes=void 0,this.sharedClips={},this.yAxis=this.xAxis=this.userOptions=this.titleOffset=this.time=this.symbolCounter=this.spacingBox=this.spacing=void 0,this.getArgs(e,t,n)}return r.chart=function(e,t,n){return new r(e,t,n)},r.prototype.getArgs=function(e,t,n){G(e)||e.nodeName?(this.renderTo=e,this.init(t,n)):this.init(e,t)},r.prototype.init=function(n,r){var i=n.plotOptions||{};S(this,"init",{args:arguments},function(){var e=h(O,n),t=e.chart;Y(e.plotOptions,function(e,t){W(e)&&(e.tooltip=i[t]&&h(i[t].tooltip)||void 0)}),e.tooltip.userOptions=n.chart&&n.chart.forExport&&n.tooltip.userOptions||n.tooltip,this.userOptions=n,this.margin=[],this.spacing=[],this.bounds={h:{},v:{}},this.labelCollectors=[],this.callback=r,this.isResizing=0,this.options=e,this.axes=[],this.series=[],this.time=n.time&&Object.keys(n.time).length?new v(n.time):a.time,this.numberFormatter=t.numberFormatter||_,this.styledMode=t.styledMode,this.hasCartesianSeries=t.showAxes,this.index=l.length,l.push(this),a.chartCount++,C(this,t),this.xAxis=[],this.yAxis=[],this.pointCount=this.colorCounter=this.symbolCounter=0,S(this,"afterInit"),this.firstRender()})},r.prototype.initSeries=function(e){var t=this.options.chart;t=e.type||t.type||t.defaultSeriesType;var n=L[t];return n||B(17,!0,_____WB$wombat$check$this$function_____(this),{missingModuleFor:t}),"function"==typeof(t=new n).init&&t.init(this,e),t},r.prototype.setSeriesData=function(){this.getSeriesOrderByLinks().forEach(function(e){e.points||e.data||!e.enabledDataSorting||e.setData(e.options.data,!1)})},r.prototype.getSeriesOrderByLinks=function(){return this.series.concat().sort(function(e,t){return e.linkedSeries.length||t.linkedSeries.length?t.linkedSeries.length-e.linkedSeries.length:0})},r.prototype.orderSeries=function(e){var t=this.series;e=e||0;for(var n=t.length;e<n;++e)t[e]&&(t[e].index=e,t[e].name=t[e].getName())},r.prototype.isInsidePlot=function(e,t,n){void 0===n&&(n={});var r=this.inverted,i=this.plotBox,o=this.plotLeft,a=this.plotTop,s=this.scrollablePlotBox,c=0,l=0;n.visiblePlotOnly&&this.scrollingContainer&&(c=(l=this.scrollingContainer).scrollLeft,l=l.scrollTop);var u=n.series;if(i=n.visiblePlotOnly&&s||i,e={x:s=n.inverted?t:e,y:t=n.inverted?e:t,isInsidePlot:!0},!n.ignoreX){var p=u&&(r?u.yAxis:u.xAxis)||{pos:o,len:1/0};(s=n.paneCoordinates?p.pos+s:o+s)>=Math.max(c+o,p.pos)&&s<=Math.min(c+o+i.width,p.pos+p.len)||(e.isInsidePlot=!1)}return!n.ignoreY&&e.isInsidePlot&&(r=u&&(r?u.xAxis:u.yAxis)||{pos:a,len:1/0},(n=n.paneCoordinates?r.pos+t:a+t)>=Math.max(l+a,r.pos)&&n<=Math.min(l+a+i.height,r.pos+r.len)||(e.isInsidePlot=!1)),S(this,"afterIsInsidePlot",e),e.isInsidePlot},r.prototype.redraw=function(e){S(this,"beforeRedraw");var t=this.hasCartesianSeries?this.axes:this.colorAxis||[],n=this.series,r=this.pointer,i=this.legend,o=this.userOptions.legend,a=this.renderer,c=a.isHidden(),p=[],s=this.isDirtyBox,l=this.isDirtyLegend;for(this.setResponsive&&this.setResponsive(!1),x(!!this.hasRendered&&e,_____WB$wombat$check$this$function_____(this)),c&&this.temporaryDisplay(),this.layOutTitles(),e=n.length;e--;){var u=n[e];if(u.options.stacking||u.options.centerInCategory){var d=!0;if(u.isDirty){var h=!0;break}}}if(h)for(e=n.length;e--;)(u=n[e]).options.stacking&&(u.isDirty=!0);n.forEach(function(e){e.isDirty&&("point"===e.options.legendType?("function"==typeof e.updateTotals&&e.updateTotals(),l=!0):o&&(o.labelFormatter||o.labelFormat)&&(l=!0)),e.isDirtyData&&S(e,"updatedData")}),l&&i&&i.options.enabled&&(i.render(),this.isDirtyLegend=!1),d&&this.getStacks(),t.forEach(function(e){e.updateNames(),e.setScale()}),this.getMargins(),t.forEach(function(e){e.isDirty&&(s=!0)}),t.forEach(function(e){var t=e.min+","+e.max;e.extKey!==t&&(e.extKey=t,p.push(function(){S(e,"afterSetExtremes",z(e.eventArgs,e.getExtremes())),delete e.eventArgs})),(s||d)&&e.redraw()}),s&&this.drawChartBox(),S(this,"predraw"),n.forEach(function(e){(s||e.isDirty)&&e.visible&&e.redraw(),e.isDirtyData=!1}),r&&r.reset(!0),a.draw(),S(this,"redraw"),S(this,"render"),c&&this.temporaryDisplay(!0),p.forEach(function(e){e.call()})},r.prototype.get=function(t){function e(e){return e.id===t||e.options&&e.options.id===t}for(var n=this.series,r=V(this.axes,e)||V(this.series,e),i=0;!r&&i<n.length;i++)r=V(n[i].points||[],e);return r},r.prototype.getAxes=function(){var t=_____WB$wombat$check$this$function_____(this),e=this.options,n=e.xAxis=Z(e.xAxis||{});e=e.yAxis=Z(e.yAxis||{}),S(this,"getAxes"),n.forEach(function(e,t){e.index=t,e.isX=!0}),e.forEach(function(e,t){e.index=t}),n.concat(e).forEach(function(e){new i(t,e)}),S(this,"afterGetAxes")},r.prototype.getSelectedPoints=function(){return this.series.reduce(function(t,e){return e.getPointsCollection().forEach(function(e){y(e.selectedStaging,e.selected)&&t.push(e)}),t},[])},r.prototype.getSelectedSeries=function(){return this.series.filter(function(e){return e.selected})},r.prototype.setTitle=function(e,t,n){this.applyDescription("title",e),this.applyDescription("subtitle",t),this.applyDescription("caption",void 0),this.layOutTitles(n)},r.prototype.applyDescription=function(t,e){var n=_____WB$wombat$check$this$function_____(this),r="title"===t?{color:"#333333",fontSize:this.options.isStock?"16px":"18px"}:{color:"#666666"};r=this.options[t]=h(!this.styledMode&&{style:r},this.options[t],e);var i=_____WB$wombat$check$this$function_____(this)[t];i&&e&&(this[t]=i=i.destroy()),r&&!i&&((i=this.renderer.text(r.text,0,0,r.useHTML).attr({align:r.align,class:"highcharts-"+t,zIndex:r.zIndex||4}).add()).update=function(e){n[{title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"}[t]](e)},this.styledMode||i.css(r.style),_____WB$wombat$check$this$function_____(this)[t]=i)},r.prototype.layOutTitles=function(e){var a=[0,0,0],s=this.renderer,l=this.spacingBox;["title","subtitle","caption"].forEach(function(e){var t,n=_____WB$wombat$check$this$function_____(this)[e],r=this.options[e],i=r.verticalAlign||"top";if(e="title"===e?"top"===i?-3:0:"top"===i?a[0]+2:0,n){this.styledMode||(t=r.style&&r.style.fontSize),t=s.fontMetrics(t,n).b,n.css({width:(r.width||l.width+(r.widthAdjust||0))+"px"});var o=Math.round(n.getBBox(r.useHTML).height);n.align(z({y:"bottom"===i?t:e+t,height:o},r),!1,"spacingBox"),r.floating||("top"===i?a[0]=Math.ceil(a[0]+o):"bottom"===i&&(a[2]=Math.ceil(a[2]+o)))}},_____WB$wombat$check$this$function_____(this)),a[0]&&"top"===(this.options.title.verticalAlign||"top")&&(a[0]+=this.options.title.margin),a[2]&&"bottom"===this.options.caption.verticalAlign&&(a[2]+=this.options.caption.margin);var t=!this.titleOffset||this.titleOffset.join(",")!==a.join(",");this.titleOffset=a,S(this,"afterLayOutTitles"),!this.isDirtyBox&&t&&(this.isDirtyBox=this.isDirtyLegend=t,this.hasRendered&&y(e,!0)&&this.isDirtyBox&&this.redraw())},r.prototype.getChartSize=function(){var e=this.options.chart,t=e.width;e=e.height;var n=this.renderTo;d(t)||(this.containerWidth=H(n,"width")),d(e)||(this.containerHeight=H(n,"height")),this.chartWidth=Math.max(0,t||this.containerWidth||600),this.chartHeight=Math.max(0,X(e,this.chartWidth)||(1<this.containerHeight?this.containerHeight:400))},r.prototype.temporaryDisplay=function(e){var t=this.renderTo;if(e)for(;t&&t.style;)t.hcOrigStyle&&(c(t,t.hcOrigStyle),delete t.hcOrigStyle),t.hcOrigDetached&&(u.body.removeChild(t),t.hcOrigDetached=!1),t=t.parentNode;else for(;t&&t.style&&(u.body.contains(t)||t.parentNode||(t.hcOrigDetached=!0,u.body.appendChild(t)),("none"===H(t,"display",!1)||t.hcOricDetached)&&(t.hcOrigStyle={display:t.style.display,height:t.style.height,overflow:t.style.overflow},e={display:"block",overflow:"hidden"},t!==this.renderTo&&(e.height=0),c(t,e),t.offsetWidth||t.style.setProperty("display","block","important")),(t=t.parentNode)!==u.body););},r.prototype.setClassName=function(e){this.container.className="highcharts-container "+(e||"")},r.prototype.getContainer=function(){var e,t=this.options,n=t.chart,r=$(),i=this.renderTo;i||(this.renderTo=i=n.renderTo),G(i)&&(this.renderTo=i=u.getElementById(i)),i||B(13,!0,_____WB$wombat$check$this$function_____(this));var o=K(N(i,"data-highcharts-chart"));q(o)&&l[o]&&l[o].hasRendered&&l[o].destroy(),N(i,"data-highcharts-chart",this.index),i.innerHTML=w.emptyHTML,n.skipClone||i.offsetWidth||this.temporaryDisplay(),this.getChartSize(),o=this.chartWidth;var a=this.chartHeight;if(c(i,{overflow:"hidden"}),this.styledMode||(e=z({position:"relative",overflow:"hidden",width:o+"px",height:a+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none"},n.style||{})),this.container=r=F("div",{id:r},e,i),this._cursor=r.style.cursor,this.renderer=new(n.renderer||!k?m.getRendererType(n.renderer):b)(r,o,a,void 0,n.forExport,t.exporting&&t.exporting.allowHTML,this.styledMode),x(void 0,_____WB$wombat$check$this$function_____(this)),this.setClassName(n.className),this.styledMode)for(var s in t.defs)this.renderer.definition(t.defs[s]);else this.renderer.setStyle(n.style);this.renderer.chartIndex=this.index,S(this,"afterGetContainer")},r.prototype.getMargins=function(e){var t=this.spacing,n=this.margin,r=this.titleOffset;this.resetMargins(),r[0]&&!d(n[0])&&(this.plotTop=Math.max(this.plotTop,r[0]+t[0])),r[2]&&!d(n[2])&&(this.marginBottom=Math.max(this.marginBottom,r[2]+t[2])),this.legend&&this.legend.display&&this.legend.adjustMargins(n,t),S(this,"getMargins"),e||this.getAxisMargins()},r.prototype.getAxisMargins=function(){var n=_____WB$wombat$check$this$function_____(this),r=n.axisOffset=[0,0,0,0],e=n.colorAxis,i=n.margin,t=function(e){e.forEach(function(e){e.visible&&e.getOffset()})};n.hasCartesianSeries?t(n.axes):e&&e.length&&t(e),A.forEach(function(e,t){d(i[t])||(n[e]+=r[t])}),n.setChartSize()},r.prototype.reflow=function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.options.chart,r=t.renderTo,i=d(n.width)&&d(n.height),o=n.width||H(r,"width");n=n.height||H(r,"height"),r=e?e.target:M,delete t.pointer.chartPosition,i||t.isPrinting||!o||!n||r!==M&&r!==u||(o===t.containerWidth&&n===t.containerHeight||(s.clearTimeout(t.reflowTimeout),t.reflowTimeout=J(function(){t.container&&t.setSize(void 0,void 0,!1)},e?100:0)),t.containerWidth=o,t.containerHeight=n)},r.prototype.setReflow=function(e){var t=_____WB$wombat$check$this$function_____(this);!1===e||this.unbindReflow?!1===e&&this.unbindReflow&&(this.unbindReflow=this.unbindReflow()):(this.unbindReflow=I(M,"resize",function(e){t.options&&t.reflow(e)}),I(this,"destroy",this.unbindReflow))},r.prototype.setSize=function(e,t,n){var r=_____WB$wombat$check$this$function_____(this),i=r.renderer;r.isResizing+=1,x(n,r),n=i.globalAnimation,r.oldChartHeight=r.chartHeight,r.oldChartWidth=r.chartWidth,void 0!==e&&(r.options.chart.width=e),void 0!==t&&(r.options.chart.height=t),r.getChartSize(),r.styledMode||(n?E:c)(r.container,{width:r.chartWidth+"px",height:r.chartHeight+"px"},n),r.setChartSize(!0),i.setSize(r.chartWidth,r.chartHeight,n),r.axes.forEach(function(e){e.isDirty=!0,e.setScale()}),r.isDirtyLegend=!0,r.isDirtyBox=!0,r.layOutTitles(),r.getMargins(),r.redraw(n),r.oldChartHeight=null,S(r,"resize"),J(function(){r&&S(r,"endResize",null,function(){--r.isResizing})},T(n).duration)},r.prototype.setChartSize=function(c){var e,t,n,r,i=this.inverted,o=this.renderer,a=this.chartWidth,s=this.chartHeight,p=this.options.chart,l=this.spacing,u=this.clipOffset;this.plotLeft=e=Math.round(this.plotLeft),this.plotTop=t=Math.round(this.plotTop),this.plotWidth=n=Math.max(0,Math.round(a-e-this.marginRight)),this.plotHeight=r=Math.max(0,Math.round(s-t-this.marginBottom)),this.plotSizeX=i?r:n,this.plotSizeY=i?n:r,this.plotBorderWidth=p.plotBorderWidth||0,this.spacingBox=o.spacingBox={x:l[3],y:l[0],width:a-l[3]-l[1],height:s-l[0]-l[2]},this.plotBox=o.plotBox={x:e,y:t,width:n,height:r},i=2*Math.floor(this.plotBorderWidth/2),a=Math.ceil(Math.max(i,u[3])/2),s=Math.ceil(Math.max(i,u[0])/2),this.clipBox={x:a,y:s,width:Math.floor(this.plotSizeX-Math.max(i,u[1])/2-a),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(i,u[2])/2-s))},c||(this.axes.forEach(function(e){e.setAxisSize(),e.setAxisTranslation()}),o.alignElements()),S(this,"afterSetChartSize",{skipAxes:c})},r.prototype.resetMargins=function(){S(this,"resetMargins");var i=_____WB$wombat$check$this$function_____(this),o=i.options.chart;["margin","spacing"].forEach(function(n){var e=o[n],r=W(e)?e:[e,e,e,e];["Top","Right","Bottom","Left"].forEach(function(e,t){i[n][t]=y(o[n+e],r[t])})}),A.forEach(function(e,t){i[e]=y(i.margin[t],i.spacing[t])}),i.axisOffset=[0,0,0,0],i.clipOffset=[0,0,0,0]},r.prototype.drawChartBox=function(){var e,t=this.options.chart,n=this.renderer,c=this.chartWidth,p=this.chartHeight,d=this.styledMode,r=this.plotBGImage,i=t.backgroundColor,h=t.plotBackgroundColor,o=t.plotBackgroundImage,f=this.plotLeft,m=this.plotTop,g=this.plotWidth,y=this.plotHeight,b=this.plotBox,v=this.clipRect,w=this.clipBox,a=this.chartBackground,E=this.plotBackground,s=this.plotBorder,l="animate";if(a||(this.chartBackground=a=n.rect().addClass("highcharts-background").add(),l="attr"),d)var u=e=a.strokeWidth();else e=(u=t.borderWidth||0)+(t.shadow?8:0),i={fill:i||"none"},(u||a["stroke-width"])&&(i.stroke=t.borderColor,i["stroke-width"]=u),a.attr(i).shadow(t.shadow);a[l]({x:e/2,y:e/2,width:c-e-u%2,height:p-e-u%2,r:t.borderRadius}),l="animate",E||(l="attr",this.plotBackground=E=n.rect().addClass("highcharts-plot-background").add()),E[l](b),d||(E.attr({fill:h||"none"}).shadow(t.plotShadow),o&&(r?(o!==r.attr("href")&&r.attr("href",o),r.animate(b)):this.plotBGImage=n.image(o,f,m,g,y).add())),v?v.animate({width:w.width,height:w.height}):this.clipRect=n.clipRect(w),l="animate",s||(l="attr",this.plotBorder=s=n.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),d||s.attr({stroke:t.plotBorderColor,"stroke-width":t.plotBorderWidth||0,fill:"none"}),s[l](s.crisp({x:f,y:m,width:g,height:y},-s.strokeWidth())),this.isDirtyBox=!1,S(this,"afterDrawChartBox")},r.prototype.propFromSeries=function(){var t,n,r,i=_____WB$wombat$check$this$function_____(this),o=i.options.chart,a=i.options.series;["inverted","angular","polar"].forEach(function(e){for(n=L[o.type||o.defaultSeriesType],r=o[e]||n&&n.prototype[e],t=a&&a.length;!r&&t--;)(n=L[a[t].type])&&n.prototype[e]&&(r=!0);i[e]=r})},r.prototype.linkSeries=function(){var n=_____WB$wombat$check$this$function_____(this),e=n.series;e.forEach(function(e){e.linkedSeries.length=0}),e.forEach(function(e){var t=e.options.linkedTo;G(t)&&(t=":previous"===t?n.series[e.index-1]:n.get(t))&&t.linkedParent!==e&&(t.linkedSeries.push(e),e.linkedParent=t,t.enabledDataSorting&&e.setDataSortingOptions(),e.visible=y(e.options.visible,t.options.visible,e.visible))}),S(this,"afterLinkSeries")},r.prototype.renderSeries=function(){this.series.forEach(function(e){e.translate(),e.render()})},r.prototype.renderLabels=function(){var i=_____WB$wombat$check$this$function_____(this),o=i.options.labels;o.items&&o.items.forEach(function(e){var t=z(o.style,e.style),n=K(t.left)+i.plotLeft,r=K(t.top)+i.plotTop+12;delete t.left,delete t.top,i.renderer.text(e.html,n,r).attr({zIndex:2}).css(t).add()})},r.prototype.render=function(){var e=this.axes,t=this.colorAxis,n=this.renderer,r=this.options,i=function(e){e.forEach(function(e){e.visible&&e.render()})},o=0;this.setTitle(),this.legend=new p(this,r.legend),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize(),r=this.plotWidth,e.some(function(e){if(e.horiz&&e.visible&&e.options.labels.enabled&&e.series.length)return o=21,!0});var a=this.plotHeight=Math.max(this.plotHeight-o,0);e.forEach(function(e){e.setScale()}),this.getAxisMargins();var s=1.1<r/this.plotWidth,l=1.05<a/this.plotHeight;(s||l)&&(e.forEach(function(e){(e.horiz&&s||!e.horiz&&l)&&e.setTickInterval(!0)}),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries?i(e):t&&t.length&&i(t),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},r.prototype.addCredits=function(e){var t=_____WB$wombat$check$this$function_____(this),n=h(!0,this.options.credits,e);n.enabled&&!this.credits&&(this.credits=this.renderer.text(n.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){n.href&&(M.location.href=n.href)}).attr({align:n.position.align,zIndex:8}),t.styledMode||this.credits.css(n.style),this.credits.add().align(n.position),this.credits.update=function(e){t.credits=t.credits.destroy(),t.addCredits(e)})},r.prototype.destroy=function(){var e,n=_____WB$wombat$check$this$function_____(this),t=n.axes,r=n.series,i=n.container,o=i&&i.parentNode;for(S(n,"destroy"),n.renderer.forExport?P(l,n):l[n.index]=void 0,a.chartCount--,n.renderTo.removeAttribute("data-highcharts-chart"),Q(n),e=t.length;e--;)t[e]=t[e].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),e=r.length;e--;)r[e]=r[e].destroy();"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(e){var t=n[e];t&&t.destroy&&(n[e]=t.destroy())}),i&&(i.innerHTML=w.emptyHTML,Q(i),o&&R(i)),Y(n,function(e,t){delete n[t]})},r.prototype.firstRender=function(){var t=_____WB$wombat$check$this$function_____(this),e=t.options;t.isReadyToRender&&!t.isReadyToRender()||(t.getContainer(),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes(),(U(e.series)?e.series:[]).forEach(function(e){t.initSeries(e)}),t.linkSeries(),t.setSeriesData(),S(t,"beforeRender"),f&&(o.isRequired()?t.pointer=new o(t,e):t.pointer=new f(t,e)),t.render(),t.pointer.getChartPosition(),t.renderer.imgCount||t.hasLoaded||t.onload(),t.temporaryDisplay(!0))},r.prototype.onload=function(){this.callbacks.concat([this.callback]).forEach(function(e){e&&void 0!==this.index&&e.apply(this,[this])},_____WB$wombat$check$this$function_____(this)),S(this,"load"),S(this,"render"),d(this.index)&&this.setReflow(this.options.chart.reflow),this.hasLoaded=!0},r.prototype.addSeries=function(e,t,n){var r,i=_____WB$wombat$check$this$function_____(this);return e&&(t=y(t,!0),S(i,"addSeries",{options:e},function(){r=i.initSeries(e),i.isDirtyLegend=!0,i.linkSeries(),r.enabledDataSorting&&r.setData(e.data,!1),S(i,"afterAddSeries",{series:r}),t&&i.redraw(n)})),r},r.prototype.addAxis=function(e,t,n,r){return this.createAxis(t?"xAxis":"yAxis",{axis:e,redraw:n,animation:r})},r.prototype.addColorAxis=function(e,t,n){return this.createAxis("colorAxis",{axis:e,redraw:t,animation:n})},r.prototype.createAxis=function(e,t){return e=new i(this,h(t.axis,{index:this[e].length,isX:"xAxis"===e})),y(t.redraw,!0)&&this.redraw(t.animation),e},r.prototype.showLoading=function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.options,r=n.loading,i=function(){o&&c(o,{left:t.plotLeft+"px",top:t.plotTop+"px",width:t.plotWidth+"px",height:t.plotHeight+"px"})},o=t.loadingDiv,a=t.loadingSpan;o||(t.loadingDiv=o=F("div",{className:"highcharts-loading highcharts-loading-hidden"},null,t.container)),a||(t.loadingSpan=a=F("span",{className:"highcharts-loading-inner"},null,o),I(t,"redraw",i)),o.className="highcharts-loading",w.setElementHTML(a,y(e,n.lang.loading,"")),t.styledMode||(c(o,z(r.style,{zIndex:10})),c(a,r.labelStyle),t.loadingShown||(c(o,{opacity:0,display:""}),E(o,{opacity:r.style.opacity||.5},{duration:r.showDuration||0}))),t.loadingShown=!0,i()},r.prototype.hideLoading=function(){var e=this.options,t=this.loadingDiv;t&&(t.className="highcharts-loading highcharts-loading-hidden",this.styledMode||E(t,{opacity:0},{duration:e.loading.hideDuration||100,complete:function(){c(t,{display:"none"})}})),this.loadingShown=!1},r.prototype.update=function(n,e,a,t){var r,i,s=_____WB$wombat$check$this$function_____(this),o={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},c=n.isResponsiveOptions,p=[];S(s,"update",{options:n}),c||s.setResponsive(!1,!0),n=j(n,s.options),s.userOptions=h(s.userOptions,n);var l=n.chart;if(l){if(h(!0,s.options.chart,l),"className"in l&&s.setClassName(l.className),"reflow"in l&&s.setReflow(l.reflow),"inverted"in l||"polar"in l||"type"in l){s.propFromSeries();var u=!0}"alignTicks"in l&&(u=!0),"events"in l&&C(this,l),Y(l,function(e,t){-1!==s.propsRequireUpdateSeries.indexOf("chart."+t)&&(r=!0),-1!==s.propsRequireDirtyBox.indexOf(t)&&(s.isDirtyBox=!0),-1!==s.propsRequireReflow.indexOf(t)&&(c?s.isDirtyBox=!0:i=!0)}),!s.styledMode&&l.style&&s.renderer.setStyle(s.options.chart.style||{})}!s.styledMode&&n.colors&&(this.options.colors=n.colors),n.time&&(this.time===D&&(this.time=new v(n.time)),h(!0,s.options.time,n.time)),Y(n,function(e,t){s[t]&&"function"==typeof s[t].update?s[t].update(e,!1):"function"==typeof s[o[t]]?s[o[t]](e):"colors"!==t&&-1===s.collectionsWithUpdate.indexOf(t)&&h(!0,s.options[t],n[t]),"chart"!==t&&-1!==s.propsRequireUpdateSeries.indexOf(t)&&(r=!0)}),this.collectionsWithUpdate.forEach(function(i){if(n[i]){var o=[];s[i].forEach(function(e,t){e.options.isInternal||o.push(y(e.options.index,t))}),Z(n[i]).forEach(function(e,t){var n,r=d(e.id);r&&(n=s.get(e.id)),!n&&s[i]&&(n=s[i][o?o[t]:t])&&r&&d(n.options.id)&&(n=void 0),n&&n.coll===i&&(n.update(e,!1),a&&(n.touched=!0)),!n&&a&&s.collectionsWithInit[i]&&(s.collectionsWithInit[i][0].apply(s,[e].concat(s.collectionsWithInit[i][1]||[]).concat([!1])).touched=!0)}),a&&s[i].forEach(function(e){e.touched||e.options.isInternal?delete e.touched:p.push(e)})}}),p.forEach(function(e){e.chart&&e.remove&&e.remove(!1)}),u&&s.axes.forEach(function(e){e.update({},!1)}),r&&s.getSeriesOrderByLinks().forEach(function(e){e.chart&&e.update({},!1)},_____WB$wombat$check$this$function_____(this)),u=l&&l.width,l=l&&(G(l.height)?X(l.height,u||s.chartWidth):l.height),i||q(u)&&u!==s.chartWidth||q(l)&&l!==s.chartHeight?s.setSize(u,l,t):y(e,!0)&&s.redraw(t),S(s,"afterUpdate",{options:n,redraw:e,animation:t})},r.prototype.setSubtitle=function(e,t){this.applyDescription("subtitle",e),this.layOutTitles(t)},r.prototype.setCaption=function(e,t){this.applyDescription("caption",e),this.layOutTitles(t)},r.prototype.showResetZoom=function(){function e(){t.zoomOut()}var t=_____WB$wombat$check$this$function_____(this),n=O.lang,r=t.options.chart.resetZoomButton,i=r.theme,o=i.states,a="chart"===r.relativeTo||"spacingBox"===r.relativeTo?null:"scrollablePlotBox";S(this,"beforeShowResetZoom",null,function(){t.resetZoomButton=t.renderer.button(n.resetZoom,null,null,e,i,o&&o.hover).attr({align:r.position.align,title:n.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(r.position,!1,a)}),S(this,"afterShowResetZoom")},r.prototype.zoomOut=function(){S(this,"selection",{resetSelection:!0},this.zoom)},r.prototype.zoom=function(e){var a,s=_____WB$wombat$check$this$function_____(this),l=s.pointer,u=s.inverted?l.mouseDownX:l.mouseDownY,c=!1;!e||e.resetSelection?(s.axes.forEach(function(e){a=e.zoom()}),l.initiated=!1):e.xAxis.concat(e.yAxis).forEach(function(e){var t=e.axis,n=s.inverted?t.left:t.top,r=s.inverted?n+t.width:n+t.height,i=t.isXAxis,o=!1;(!i&&u>=n&&u<=r||i||!d(u))&&(o=!0),l[i?"zoomX":"zoomY"]&&o&&(a=t.zoom(e.min,e.max),t.displayBtn&&(c=!0))});var t=s.resetZoomButton;c&&!t?s.showResetZoom():!c&&W(t)&&(s.resetZoomButton=t.destroy()),a&&s.redraw(y(s.options.chart.animation,e&&e.animation,100>s.pointCount))},r.prototype.pan=function(d,e){var h=_____WB$wombat$check$this$function_____(this),t=h.hoverPoints;e="object"==typeof e?e:{enabled:e,type:"x"};var n=h.options.chart,f=h.options.mapNavigation&&h.options.mapNavigation.enabled;n&&n.panning&&(n.panning=e);var m,g=e.type;S(this,"pan",{originalEvent:d},function(){t&&t.forEach(function(e){e.setState()});var e=h.xAxis;"xy"===g?e=e.concat(h.yAxis):"y"===g&&(e=h.yAxis);var p={};e.forEach(function(e){if(e.options.panningEnabled&&!e.options.isInternal){var t=e.horiz,n=d[t?"chartX":"chartY"],r=h[t=t?"mouseDownX":"mouseDownY"],i=e.minPointOffset||0,o=e.reversed&&!h.inverted||!e.reversed&&h.inverted?-1:1,a=e.getExtremes(),s=e.toValue(r-n,!0)+i*o,l=e.toValue(r+e.len-n,!0)-(i*o||e.isXAxis&&e.pointRangePadding||0),c=l<s;o=e.hasVerticalPanning(),r=c?l:s,s=c?s:l;var u=e.panningState;!o||e.isXAxis||u&&!u.isDirty||e.series.forEach(function(e){var t=e.getProcessedData(!0);t=e.getExtremes(t.yData,!0),u||(u={startMin:Number.MAX_VALUE,startMax:-Number.MAX_VALUE}),q(t.dataMin)&&q(t.dataMax)&&(u.startMin=Math.min(y(e.options.threshold,1/0),t.dataMin,u.startMin),u.startMax=Math.max(y(e.options.threshold,-1/0),t.dataMax,u.startMax))}),o=Math.min(y(u&&u.startMin,a.dataMin),i?a.min:e.toValue(e.toPixels(a.min)-e.minPixelPadding)),l=Math.max(y(u&&u.startMax,a.dataMax),i?a.max:e.toValue(e.toPixels(a.max)+e.minPixelPadding)),e.panningState=u,e.isOrdinal||(0<(i=o-r)&&(s+=i,r=o),0<(i=s-l)&&(s=l,r-=i),e.series.length&&r!==a.min&&s!==a.max&&r>=o&&s<=l&&(e.setExtremes(r,s,!1,!1,{trigger:"pan"}),h.resetZoomButton||f||r===o||s===l||!g.match("y")||(h.showResetZoom(),e.displayBtn=!1),m=!0),p[t]=n)}}),Y(p,function(e,t){h[t]=e}),m&&h.redraw(!1),c(h.container,{cursor:"move"})})},r}(),z(e.prototype,{callbacks:[],collectionsWithInit:{xAxis:[e.prototype.addAxis,[!0]],yAxis:[e.prototype.addAxis,[!1]],series:[e.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],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(" ")}),e}),e(t,"Core/Legend/LegendSymbol.js",[t["Core/Utilities.js"]],function(e){var t,n,u=e.merge,c=e.pick;return(n=t||(t={})).drawLineMarker=function(e){var t=this.options,n=e.symbolWidth,r=e.symbolHeight,i=r/2,o=this.chart.renderer,a=this.legendGroup;e=e.baseline-Math.round(.3*e.fontMetrics.b);var s={},l=t.marker;this.chart.styledMode||(s={"stroke-width":t.lineWidth||0},t.dashStyle&&(s.dashstyle=t.dashStyle)),this.legendLine=o.path([["M",0,e],["L",n,e]]).addClass("highcharts-graph").attr(s).add(a),l&&!1!==l.enabled&&n&&(t=Math.min(c(l.radius,i),i),0===this.symbol.indexOf("url")&&(l=u(l,{width:r,height:r}),t=0),this.legendSymbol=n=o.symbol(this.symbol,n/2-t,e-t,2*t,2*t,l).addClass("highcharts-point").add(a),n.isMarker=!0)},n.drawRectangle=function(e,t){var n=e.symbolHeight,r=e.options.squareSymbol;t.legendSymbol=this.chart.renderer.rect(r?(e.symbolWidth-n)/2:0,e.baseline-n+1,r?n:e.symbolWidth,n,c(e.options.symbolRadius,n/2)).addClass("highcharts-point").attr({zIndex:3}).add(t.legendGroup)},t}),e(t,"Core/Series/SeriesDefaults.js",[],function(){return{lineWidth:2,allowPointSelect:!1,crisp:!0,showCheckbox:!1,animation:{duration:1e3},events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,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:{animation:{},align:"center",defer:!0,formatter:function(){var e=this.series.chart.numberFormatter;return"number"!=typeof this.y?"":e(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"}}),e(t,"Core/Series/Series.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/DefaultOptions.js"],t["Core/Foundation.js"],t["Core/Globals.js"],t["Core/Legend/LegendSymbol.js"],t["Core/Series/Point.js"],t["Core/Series/SeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/SVGElement.js"],t["Core/Utilities.js"]],function(e,t,n,r,i,c,o,a,p,l){var d=e.animObject,h=e.setAnimation,u=t.defaultOptions,s=n.registerEventOptions,f=r.hasTouch,y=r.svg,b=r.win,m=a.seriesTypes,v=l.addEvent,w=l.arrayMax,E=l.arrayMin,_=l.clamp,S=l.cleanRecursively,O=l.correctFloat,C=l.defined,T=l.erase,x=l.error,g=l.extend,D=l.find,A=l.fireEvent,L=l.getNestedProperty,I=l.isArray,k=l.isNumber,N=l.isString,j=l.merge,F=l.objectEach,M=l.pick,R=l.removeEvent,P=l.splat,B=l.syncTimeout;return e=function(){function e(){this.zones=this.yAxis=this.xAxis=this.userOptions=this.tooltipOptions=this.processedYData=this.processedXData=this.points=this.options=this.linkedSeries=this.index=this.eventsToUnbind=this.eventOptions=this.data=this.chart=this._i=void 0}return e.prototype.init=function(e,t){A(this,"init",{options:t});var n=_____WB$wombat$check$this$function_____(this),r=e.series;this.eventsToUnbind=[],n.chart=e,n.options=n.setOptions(t),t=n.options,n.linkedSeries=[],n.bindAxes(),g(n,{name:t.name,state:"",visible:!1!==t.visible,selected:!0===t.selected}),s(this,t);var i,o=t.events;(o&&o.click||t.point&&t.point.events&&t.point.events.click||t.allowPointSelect)&&(e.runTrackerClick=!0),n.getColor(),n.getSymbol(),n.parallelArrays.forEach(function(e){n[e+"Data"]||(n[e+"Data"]=[])}),n.isCartesian&&(e.hasCartesianSeries=!0),r.length&&(i=r[r.length-1]),n._i=M(i&&i._i,-1)+1,n.opacity=n.options.opacity,e.orderSeries(this.insert(r)),t.dataSorting&&t.dataSorting.enabled?n.setDataSortingOptions():n.points||n.data||n.setData(t.data,!1),A(this,"afterInit")},e.prototype.is=function(e){return m[e]&&_____WB$wombat$check$this$function_____(this) instanceof m[e]},e.prototype.insert=function(e){var t,n=this.options.index;if(k(n)){for(t=e.length;t--;)if(n>=M(e[t].options.index,e[t]._i)){e.splice(t+1,0,_____WB$wombat$check$this$function_____(this));break}-1===t&&e.unshift(this),t+=1}else e.push(this);return M(t,e.length-1)},e.prototype.bindAxes=function(){var r,i=_____WB$wombat$check$this$function_____(this),o=i.options,e=i.chart;A(this,"bindAxes",null,function(){(i.axisTypes||[]).forEach(function(t){var n=0;e[t].forEach(function(e){r=e.options,(o[t]===n&&!r.isInternal||void 0!==o[t]&&o[t]===r.id||void 0===o[t]&&0===r.index)&&(i.insert(e.series),i[t]=e,e.isDirty=!0),r.isInternal||n++}),i[t]||i.optionalAxis===t||x(18,!0,e)})}),A(this,"afterBindAxes")},e.prototype.updateParallelArrays=function(n,r){var i=n.series,t=arguments,e=k(r)?function(e){var t="y"===e&&i.toYData?i.toYData(n):n[e];i[e+"Data"][r]=t}:function(e){Array.prototype[r].apply(i[e+"Data"],Array.prototype.slice.call(t,2))};i.parallelArrays.forEach(e)},e.prototype.hasData=function(){return this.visible&&void 0!==this.dataMax&&void 0!==this.dataMin||this.visible&&this.yData&&0<this.yData.length},e.prototype.autoIncrement=function(e){var t,n=this.options,r=n.pointIntervalUnit,i=n.relativeXValue,o=this.chart.time,a=this.xIncrement;return a=M(a,n.pointStart,0),this.pointInterval=t=M(this.pointInterval,n.pointInterval,1),i&&k(e)&&(t*=e),r&&(n=new o.Date(a),"day"===r?o.set("Date",n,o.get("Date",n)+t):"month"===r?o.set("Month",n,o.get("Month",n)+t):"year"===r&&o.set("FullYear",n,o.get("FullYear",n)+t),t=n.getTime()-a),i&&k(e)?a+t:(this.xIncrement=a+t,a)},e.prototype.setDataSortingOptions=function(){var e=this.options;g(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1}),C(e.pointRange)||(e.pointRange=1)},e.prototype.setOptions=function(e){var t=this.chart,n=t.options,r=n.plotOptions,i=t.userOptions||{};e=j(e),t=t.styledMode;var o={plotOptions:r,userOptions:e};A(this,"setOptions",o);var a=o.plotOptions[this.type],s=i.plotOptions||{};return this.userOptions=o.userOptions,i=j(a,r.series,i.plotOptions&&i.plotOptions[this.type],e),this.tooltipOptions=j(u.tooltip,u.plotOptions.series&&u.plotOptions.series.tooltip,u.plotOptions[this.type].tooltip,n.tooltip.userOptions,r.series&&r.series.tooltip,r[this.type].tooltip,e.tooltip),this.stickyTracking=M(e.stickyTracking,s[this.type]&&s[this.type].stickyTracking,s.series&&s.series.stickyTracking,!(!this.tooltipOptions.shared||this.noSharedTooltip)||i.stickyTracking),null===a.marker&&delete i.marker,this.zoneAxis=i.zoneAxis,r=this.zones=(i.zones||[]).slice(),!i.negativeColor&&!i.negativeFillColor||i.zones||(n={value:i[this.zoneAxis+"Threshold"]||i.threshold||0,className:"highcharts-negative"},t||(n.color=i.negativeColor,n.fillColor=i.negativeFillColor),r.push(n)),r.length&&C(r[r.length-1].value)&&r.push(t?{}:{color:this.color,fillColor:this.fillColor}),A(this,"afterSetOptions",{options:i}),i},e.prototype.getName=function(){return M(this.options.name,"Series "+(this.index+1))},e.prototype.getCyclic=function(e,t,n){var r=this.chart,i=this.userOptions,o=e+"Index",a=e+"Counter",s=n?n.length:M(r.options.chart[e+"Count"],r[e+"Count"]);if(!t){var l=M(i[o],i["_"+o]);C(l)||(r.series.length||(r[a]=0),i["_"+o]=l=r[a]%s,r[a]+=1),n&&(t=n[l])}void 0!==l&&(this[o]=l),_____WB$wombat$check$this$function_____(this)[e]=t},e.prototype.getColor=function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||u.plotOptions[this.type].color,this.chart.options.colors)},e.prototype.getPointsCollection=function(){return(this.hasGroupedData?this.points:this.data)||[]},e.prototype.getSymbol=function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},e.prototype.findPointIndex=function(t,e){var n,r,i=t.id,o=t.x,a=this.points,s=this.options.dataSorting;if(i)(s=this.chart.get(i))instanceof c&&(n=s);else if((this.linkedParent||this.enabledDataSorting||this.options.relativeXValue)&&(n=function(e){return!e.touched&&e.index===t.index},s&&s.matchByName?n=function(e){return!e.touched&&e.name===t.name}:this.options.relativeXValue&&(n=function(e){return!e.touched&&e.options.x===t.x}),!(n=D(a,n))))return;if(n){var l=n&&n.index;void 0!==l&&(r=!0)}return void 0===l&&k(o)&&(l=this.xData.indexOf(o,e)),-1!==l&&void 0!==l&&this.cropped&&(l=l>=this.cropStart?l-this.cropStart:l),!r&&k(l)&&a[l]&&a[l].touched&&(l=void 0),l},e.prototype.updateData=function(e,r){var i,t,o,a=this.options,s=a.dataSorting,l=this.points,u=[],p=this.requireSorting,c=e.length===l.length,n=!0;if(this.xIncrement=null,e.forEach(function(e,t){var n=C(e)&&this.pointClass.prototype.optionsToObject.call({series:this},e)||{},r=n.x;n.id||k(r)?(-1===(n=this.findPointIndex(n,o))||void 0===n?u.push(e):l[n]&&e!==a.data[n]?(l[n].update(e,!1,null,!1),l[n].touched=!0,p&&(o=n+1)):l[n]&&(l[n].touched=!0),(!c||t!==n||s&&s.enabled||this.hasDerivedData)&&(i=!0)):u.push(e)},_____WB$wombat$check$this$function_____(this)),i)for(e=l.length;e--;)(t=l[e])&&!t.touched&&t.remove&&t.remove(!1,r);else!c||s&&s.enabled?n=!1:(e.forEach(function(e,t){e!==l[t].y&&l[t].update&&l[t].update(e,!1,null,!1)}),u.length=0);return l.forEach(function(e){e&&(e.touched=!1)}),!!n&&(u.forEach(function(e){this.addPoint(e,!1,null,null,!1)},_____WB$wombat$check$this$function_____(this)),null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=w(this.xData),this.autoIncrement()),!0)},e.prototype.setData=function(e,c,t,n){var r=_____WB$wombat$check$this$function_____(this),i=r.points,p=i&&i.length||0,d=r.options,h=r.chart,f=d.dataSorting,m=r.xAxis,g=d.turboThreshold,o=this.xData,a=this.yData,s=r.pointArrayMap;s=s&&s.length;var y,b=d.keys,v=0,l=1,w=null,u=(e=e||[]).length;if(c=M(c,!0),f&&f.enabled&&(e=this.sortData(e)),!1!==n&&u&&p&&!r.cropped&&!r.hasGroupedData&&r.visible&&!r.isSeriesBoosting&&(y=this.updateData(e,t)),!y){if(r.xIncrement=null,r.colorCounter=0,this.parallelArrays.forEach(function(e){r[e+"Data"].length=0}),g&&u>g)if(w=r.getFirstValidPoint(e),k(w))for(t=0;t<u;t++)o[t]=this.autoIncrement(),a[t]=e[t];else if(I(w))if(s)if(w.length===s)for(t=0;t<u;t++)o[t]=this.autoIncrement(),a[t]=e[t];else for(t=0;t<u;t++)n=e[t],o[t]=n[0],a[t]=n.slice(1,s+1);else if(b&&(v=0<=(v=b.indexOf("x"))?v:0,l=0<=(l=b.indexOf("y"))?l:1),1===w.length&&(l=0),v===l)for(t=0;t<u;t++)o[t]=this.autoIncrement(),a[t]=e[t][l];else for(t=0;t<u;t++)n=e[t],o[t]=n[v],a[t]=n[l];else x(12,!1,h);else for(t=0;t<u;t++)void 0!==e[t]&&(n={series:r},r.pointClass.prototype.applyOptions.apply(n,[e[t]]),r.updateParallelArrays(n,t));for(a&&N(a[0])&&x(14,!0,h),r.data=[],r.options.data=r.userOptions.data=e,t=p;t--;)i[t]&&i[t].destroy&&i[t].destroy();m&&(m.minRange=m.userMinRange),r.isDirty=h.isDirtyBox=!0,r.isDirtyData=!!i,t=!1}"point"===d.legendType&&(this.processData(),this.generatePoints()),c&&h.redraw(t)},e.prototype.sortData=function(i){var n=_____WB$wombat$check$this$function_____(this),r=n.options.dataSorting.sortKey||"y",o=function(e,t){return C(t)&&e.pointClass.prototype.optionsToObject.call({series:e},t)||{}};return i.forEach(function(e,t){i[t]=o(n,e),i[t].index=t},_____WB$wombat$check$this$function_____(this)),i.concat().sort(function(e,t){return e=L(r,e),(t=L(r,t))<e?-1:t>e?1:0}).forEach(function(e,t){e.x=t},_____WB$wombat$check$this$function_____(this)),n.linkedSeries&&n.linkedSeries.forEach(function(n){var e=n.options,r=e.data;e.dataSorting&&e.dataSorting.enabled||!r||(r.forEach(function(e,t){r[t]=o(n,e),i[t]&&(r[t].x=i[t].x,r[t].index=t)}),n.setData(r,!1))}),i},e.prototype.getProcessedData=function(e){var t=this.xAxis,n=this.options,r=n.cropThreshold,c=e||this.getExtremesFromAll||n.getExtremesFromAll,p=this.isCartesian;e=t&&t.val2lin,n=!(!t||!t.logarithmic);var d=0,i=this.xData,o=this.yData,h=this.requireSorting,a=!1,s=i.length;if(t){var l=(a=t.getExtremes()).min,f=a.max;a=t.categories&&!t.names.length}if(p&&this.sorted&&!c&&(!r||s>r||this.forceCrop))if(i[s-1]<l||i[0]>f)i=[],o=[];else if(this.yData&&(i[0]<l||i[s-1]>f)){var u=this.cropData(this.xData,this.yData,l,f);i=u.xData,o=u.yData,d=u.start,u=!0}for(r=i.length||1;--r;)if(0<(t=n?e(i[r])-e(i[r-1]):i[r]-i[r-1])&&(void 0===m||t<m))var m=t;else 0>t&&h&&!a&&(x(15,!1,this.chart),h=!1);return{xData:i,yData:o,cropped:u,cropStart:d,closestPointRange:m}},e.prototype.processData=function(e){var t=this.xAxis;if(this.isCartesian&&!this.isDirty&&!t.isDirty&&!this.yAxis.isDirty&&!e)return!1;e=this.getProcessedData(),this.cropped=e.cropped,this.cropStart=e.cropStart,this.processedXData=e.xData,this.processedYData=e.yData,this.closestPointRange=this.basePointRange=e.closestPointRange,A(this,"afterProcessData")},e.prototype.cropData=function(e,t,n,r,i){var o,a=e.length,s=0,l=a;for(i=M(i,this.cropShoulder),o=0;o<a;o++)if(e[o]>=n){s=Math.max(0,o-i);break}for(n=o;n<a;n++)if(e[n]>r){l=n+i;break}return{xData:e.slice(s,l),yData:t.slice(s,l),start:s,end:l}},e.prototype.generatePoints=function(){var e=this.options,t=e.data,n=this.processedXData,c=this.processedYData,p=this.pointClass,r=n.length,i=this.cropStart||0,o=this.hasGroupedData,d=e.keys,h=[];e=e.dataGrouping&&e.dataGrouping.groupAll?i:0;var f,a,s=this.data;if(!s&&!o){var l=[];l.length=t.length,s=this.data=l}for(d&&o&&(this.options.keys=!1),a=0;a<r;a++){if(l=i+a,o){var u=(new p).init(this,[n[a]].concat(P(c[a])));u.dataGroup=this.groupMap[e+a],u.dataGroup.options&&(u.options=u.dataGroup.options,g(u,u.dataGroup.options),delete u.dataLabels)}else(u=s[l])||void 0===t[l]||(s[l]=u=(new p).init(this,t[l],n[a]));u&&(u.index=o?e+a:l,h[a]=u)}if(this.options.keys=d,s&&(r!==(f=s.length)||o))for(a=0;a<f;a++)a!==i||o||(a+=r),s[a]&&(s[a].destroyElements(),s[a].plotX=void 0);this.data=s,this.points=h,A(this,"afterGeneratePoints")},e.prototype.getXExtremes=function(e){return{min:E(e),max:w(e)}},e.prototype.getExtremes=function(e,c){var t=this.xAxis,n=this.yAxis,r=this.processedXData||this.xData,i=[],o=this.requireSorting?this.cropShoulder:0;n=!!n&&n.positiveValuesOnly;var a,p=0,d=0,h=0,f=(e=e||this.stackedYData||this.processedYData||[]).length;if(t){var s=t.getExtremes();p=s.min,d=s.max}for(a=0;a<f;a++){var l=r[a];s=e[a];var u=(k(s)||I(s))&&(s.length||0<s||!n);if(l=c||this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!t||(r[a+o]||l)>=p&&(r[a-o]||l)<=d,u&&l)if(u=s.length)for(;u--;)k(s[u])&&(i[h++]=s[u]);else i[h++]=s}return e={activeYData:i,dataMin:E(i),dataMax:w(i)},A(this,"afterGetExtremes",{dataExtremes:e}),e},e.prototype.applyExtremes=function(){var e=this.getExtremes();return this.dataMin=e.dataMin,this.dataMax=e.dataMax,e},e.prototype.getFirstValidPoint=function(e){for(var t=e.length,n=0,r=null;null===r&&n<t;)r=e[n],n++;return r},e.prototype.translate=function(){this.processedXData||this.processData(),this.generatePoints();var e,t,c=this.options,p=c.stacking,n=this.xAxis,d=n.categories,h=this.enabledDataSorting,r=this.yAxis,f=this.points,m=f.length,g=this.pointPlacementToXValue(),y=!!g,i=c.threshold,b=c.startFromThreshold?i:0,v=this.zoneAxis||"y",w=Number.MAX_VALUE;for(e=0;e<m;e++){var o=f[e],a=o.x,s=void 0,E=void 0,l=o.y,u=o.low,S=p&&r.stacking&&r.stacking.stacks[(this.negStacks&&l<(b?0:i)?"-":"")+this.stackKey];if((r.positiveValuesOnly&&!r.validatePositiveValue(l)||n.positiveValuesOnly&&!n.validatePositiveValue(a))&&(o.isNull=!0),o.plotX=t=O(_(n.translate(a,0,0,0,1,g,"flags"===this.type),-1e5,1e5)),p&&this.visible&&S&&S[a]){var T=this.getStackIndicator(T,a,this.index);o.isNull||(E=(s=S[a]).points[T.key])}if(I(E)&&(u=E[0],l=E[1],u===b&&T.key===S[a].base&&(u=M(k(i)&&i,r.min)),r.positiveValuesOnly&&0>=u&&(u=null),o.total=o.stackTotal=s.total,o.percentage=s.total&&o.y/s.total*100,o.stackY=l,this.irregularWidths||s.setOffset(this.pointXOffset||0,this.barW||0)),o.yBottom=C(u)?_(r.translate(u,0,1,0,1),-1e5,1e5):null,this.dataModify&&(l=this.dataModify.modifyValue(l,e)),o.plotY=void 0,k(l)&&void 0!==(s=r.translate(l,!1,!0,!1,!0))&&(o.plotY=_(s,-1e5,1e5)),o.isInside=this.isPointInside(o),o.clientX=y?O(n.translate(a,0,0,0,1,g)):t,o.negative=o[v]<(c[v+"Threshold"]||i||0),o.category=d&&void 0!==d[o.x]?d[o.x]:o.x,!o.isNull&&!1!==o.visible){void 0!==x&&(w=Math.min(w,Math.abs(t-x)));var x=t}o.zone=this.zones.length?o.getZone():void 0,!o.graphic&&this.group&&h&&(o.isNew=!0)}this.closestPointRangePx=w,A(this,"afterTranslate")},e.prototype.getValidPoints=function(e,t,n){var r=this.chart;return(e||this.points||[]).filter(function(e){return!(t&&!r.isInsidePlot(e.plotX,e.plotY,{inverted:r.inverted}))&&!1!==e.visible&&(n||!e.isNull)})},e.prototype.getClipBox=function(){var e=this.chart,t=this.xAxis,n=this.yAxis,r=j(e.clipBox);return t&&t.len!==e.plotSizeX&&(r.width=t.len),n&&n.len!==e.plotSizeY&&(r.height=n.len),r},e.prototype.getSharedClipKey=function(){return this.sharedClipKey=(this.options.xAxis||0)+","+(this.options.yAxis||0)},e.prototype.setClip=function(){var e=this.chart,t=this.group,n=this.markerGroup,r=e.sharedClips;e=e.renderer;var i=this.getClipBox(),o=this.getSharedClipKey(),a=r[o];a?a.animate(i):r[o]=a=e.clipRect(i),t&&t.clip(!1===this.options.clip?void 0:a),n&&n.clip()},e.prototype.animate=function(e){var t=this.chart,n=this.group,r=this.markerGroup,i=t.inverted,o=d(this.options.animation),a=[this.getSharedClipKey(),o.duration,o.easing,o.defer].join(),s=t.sharedClips[a],l=t.sharedClips[a+"m"];if(e&&n)o=this.getClipBox(),s?s.attr("height",o.height):(o.width=0,i&&(o.x=t.plotHeight),s=t.renderer.clipRect(o),t.sharedClips[a]=s,l=t.renderer.clipRect({x:i?(t.plotSizeX||0)+99:-99,y:i?-t.plotLeft:-t.plotTop,width:99,height:i?t.chartWidth:t.chartHeight}),t.sharedClips[a+"m"]=l),n.clip(s),r&&r.clip(l);else if(s&&!s.hasClass("highcharts-animating")){t=this.getClipBox();var u=o.step;r&&r.element.childNodes.length&&(o.step=function(e,t){u&&u.apply(t,arguments),l&&l.element&&l.attr(t.prop,"width"===t.prop?e+99:e)}),s.addClass("highcharts-animating").animate(t,o)}},e.prototype.afterAnimate=function(){var r=_____WB$wombat$check$this$function_____(this);this.setClip(),F(this.chart.sharedClips,function(e,t,n){e&&!r.chart.container.querySelector('[clip-path="url(#'+e.id+')"]')&&(e.destroy(),delete n[t])}),this.finishedAnimating=!0,A(this,"afterAnimate")},e.prototype.drawPoints=function(){var e,t,c=this.points,n=this.chart,r=this.options.marker,p=_____WB$wombat$check$this$function_____(this)[this.specialGroup]||this.markerGroup,i=this.xAxis,d=M(r.enabled,!(i&&!i.isRadial)||null,this.closestPointRangePx>=r.enabledThreshold*r.radius);if(!1!==r.enabled||this._hasPointMarkers)for(e=0;e<c.length;e++){var o=c[e],a=(t=o.graphic)?"animate":"attr",s=o.marker||{},h=!!o.marker;if((d&&void 0===s.enabled||s.enabled)&&!o.isNull&&!1!==o.visible){var f=M(s.symbol,this.symbol,"rect"),l=this.markerAttribs(o,o.selected&&"select");this.enabledDataSorting&&(o.startXPos=i.reversed?-(l.width||0):i.width);var u=!1!==o.isInside;t?t[u?"show":"hide"](u).animate(l):u&&(0<(l.width||0)||o.hasImage)&&(o.graphic=t=n.renderer.symbol(f,l.x,l.y,l.width,l.height,h?s:r).add(p),this.enabledDataSorting&&n.hasRendered&&(t.attr({x:o.startXPos}),a="animate")),t&&"animate"===a&&t[u?"show":"hide"](u).animate(l),t&&!n.styledMode&&t[a](this.pointAttribs(o,o.selected&&"select")),t&&t.addClass(o.getClassName(),!0)}else t&&(o.graphic=t.destroy())}},e.prototype.markerAttribs=function(e,t){var n=this.options,r=n.marker,i=e.marker||{},o=i.symbol||r.symbol,a=M(i.radius,r.radius);return t&&(r=r.states[t],t=i.states&&i.states[t],a=M(t&&t.radius,r&&r.radius,a+(r&&r.radiusPlus||0))),e.hasImage=o&&0===o.indexOf("url"),e.hasImage&&(a=0),e={x:n.crisp?Math.floor(e.plotX-a):e.plotX-a,y:e.plotY-a},a&&(e.width=e.height=2*a),e},e.prototype.pointAttribs=function(e,t){var n=this.options.marker,r=e&&e.options,i=r&&r.marker||{},o=r&&r.color,a=e&&e.color,s=e&&e.zone&&e.zone.color,l=this.color;return e=M(i.lineWidth,n.lineWidth),r=1,l=o||s||a||l,o=i.fillColor||n.fillColor||l,a=i.lineColor||n.lineColor||l,t=t||"normal",n=n.states[t]||{},t=i.states&&i.states[t]||{},e=M(t.lineWidth,n.lineWidth,e+M(t.lineWidthPlus,n.lineWidthPlus,0)),o=t.fillColor||n.fillColor||o,{stroke:a=t.lineColor||n.lineColor||a,"stroke-width":e,fill:o,opacity:r=M(t.opacity,n.opacity,r)}},e.prototype.destroy=function(n){var e,t,r,i=_____WB$wombat$check$this$function_____(this),o=i.chart,a=/AppleWebKit\/533/.test(b.navigator.userAgent),s=i.data||[];for(A(i,"destroy"),this.removeEvents(n),(i.axisTypes||[]).forEach(function(e){(r=i[e])&&r.series&&(T(r.series,i),r.isDirty=r.forceRedraw=!0)}),i.legendItem&&i.chart.legend.destroyItem(i),e=s.length;e--;)(t=s[e])&&t.destroy&&t.destroy();i.clips&&i.clips.forEach(function(e){return e.destroy()}),l.clearTimeout(i.animationTimeout),F(i,function(e,t){e instanceof p&&!e.survive&&e[a&&"group"===t?"hide":"destroy"]()}),o.hoverSeries===i&&(o.hoverSeries=void 0),T(o.series,i),o.orderSeries(),F(i,function(e,t){n&&"hcEvents"===t||delete i[t]})},e.prototype.applyZones=function(){var n,r,i,d,o,a,h,f,m=_____WB$wombat$check$this$function_____(this),s=this.chart,g=s.renderer,e=this.zones,l=this.clips||[],u=this.graph,c=this.area,y=Math.max(s.chartWidth,s.chartHeight),p=_____WB$wombat$check$this$function_____(this)[(this.zoneAxis||"y")+"Axis"],b=s.inverted,v=!1;if(e.length&&(u||c)&&p&&void 0!==p.min){var w=p.reversed,E=p.horiz;u&&!this.showLine&&u.hide(),c&&c.hide();var S=p.getExtremes();e.forEach(function(e,t){n=w?E?s.plotWidth:0:E?0:p.toPixels(S.min)||0,n=_(M(r,n),0,y),r=_(Math.round(p.toPixels(M(e.value,S.max),!0)||0),0,y),v&&(n=r=p.toPixels(S.max)),d=Math.abs(n-r),o=Math.min(n,r),a=Math.max(n,r),p.isXAxis?(i={x:b?a:o,y:0,width:d,height:y},E||(i.x=s.plotHeight-i.x)):(i={x:0,y:b?a:o,width:y,height:d},E&&(i.y=s.plotWidth-i.y)),b&&g.isVML&&(i=p.isXAxis?{x:0,y:w?o:a,height:i.width,width:s.chartWidth}:{x:i.y-s.plotLeft-s.spacingBox.x,y:0,width:i.height,height:s.chartHeight}),l[t]?l[t].animate(i):l[t]=g.clipRect(i),h=m["zone-area-"+t],f=m["zone-graph-"+t],u&&f&&f.clip(l[t]),c&&h&&h.clip(l[t]),v=e.value>S.max,m.resetZones&&0===r&&(r=void 0)}),this.clips=l}else m.visible&&(u&&u.show(!0),c&&c.show(!0))},e.prototype.invertGroups=function(t){function e(){["group","markerGroup"].forEach(function(e){n[e]&&(r.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(!n.isRadialSeries&&t))})}var n=_____WB$wombat$check$this$function_____(this),r=n.chart;n.xAxis&&(n.eventsToUnbind.push(v(r,"resize",e)),e(),n.invertGroups=e)},e.prototype.plotGroup=function(e,t,n,r,i){var o=_____WB$wombat$check$this$function_____(this)[e],a=!o;return n={visibility:n,zIndex:r||.1},void 0===this.opacity||this.chart.styledMode||"inactive"===this.state||(n.opacity=this.opacity),a&&(this[e]=o=this.chart.renderer.g().add(i)),o.addClass("highcharts-"+t+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(C(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(o.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),o.attr(n)[a?"attr":"animate"](this.getPlotBox()),o},e.prototype.getPlotBox=function(){var e=this.chart,t=this.xAxis,n=this.yAxis;return e.inverted&&(t=n,n=this.xAxis),{translateX:t?t.left:e.plotLeft,translateY:n?n.top:e.plotTop,scaleX:1,scaleY:1}},e.prototype.removeEvents=function(e){e||R(this),this.eventsToUnbind.length&&(this.eventsToUnbind.forEach(function(e){e()}),this.eventsToUnbind.length=0)},e.prototype.render=function(){var e=_____WB$wombat$check$this$function_____(this),t=e.chart,n=e.options,r=d(n.animation),i=e.visible?"inherit":"hidden",o=n.zIndex,a=e.hasRendered,s=t.seriesGroup,l=t.inverted;t=!e.finishedAnimating&&t.renderer.isSVG?r.duration:0,A(this,"render");var u=e.plotGroup("group","series",i,o,s);e.markerGroup=e.plotGroup("markerGroup","markers",i,o,s),!1!==n.clip&&e.setClip(),e.animate&&t&&e.animate(!0),u.inverted=!!M(e.invertible,e.isCartesian)&&l,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(l),e.animate&&t&&e.animate(),a||(t&&r.defer&&(t+=r.defer),e.animationTimeout=B(function(){e.afterAnimate()},t||0)),e.isDirty=!1,e.hasRendered=!0,A(e,"afterRender")},e.prototype.redraw=function(){var e=this.chart,t=this.isDirty||this.isDirtyData,n=this.group,r=this.xAxis,i=this.yAxis;n&&(e.inverted&&n.attr({width:e.plotWidth,height:e.plotHeight}),n.animate({translateX:M(r&&r.left,e.plotLeft),translateY:M(i&&i.top,e.plotTop)})),this.translate(),this.render(),t&&delete this.kdTree},e.prototype.searchPoint=function(e,t){var n=this.xAxis,r=this.yAxis,i=this.chart.inverted;return this.searchKDTree({clientX:i?n.len-e.chartY+n.pos:e.chartX-n.pos,plotY:i?r.len-e.chartX+r.pos:e.chartY-r.pos},t,e)},e.prototype.buildKDTree=function(e){function o(e,t,n){var r=e&&e.length;if(r){var i=a.kdAxisArray[t%n];return e.sort(function(e,t){return e[i]-t[i]}),{point:e[r=Math.floor(r/2)],left:o(e.slice(0,r),t+1,n),right:o(e.slice(r+1),t+1,n)}}}this.buildingKdTree=!0;var a=_____WB$wombat$check$this$function_____(this),t=-1<a.options.findNearestPointBy.indexOf("y")?2:1;delete a.kdTree,B(function(){a.kdTree=o(a.getValidPoints(null,!a.directTouch),t,t),a.buildingKdTree=!1},a.options.kdNow||e&&"touchstart"===e.type?0:1)},e.prototype.searchKDTree=function(e,t,n){var c=_____WB$wombat$check$this$function_____(this),p=this.kdAxisArray[0],d=this.kdAxisArray[1],h=t?"distX":"dist";if(t=-1<c.options.findNearestPointBy.indexOf("y")?2:1,this.kdTree||this.buildingKdTree||this.buildKDTree(n),this.kdTree)return function e(t,n,r,i){var o=n.point,a=c.kdAxisArray[r%i],s=o,l=C(t[p])&&C(o[p])?Math.pow(t[p]-o[p],2):null,u=C(t[d])&&C(o[d])?Math.pow(t[d]-o[d],2):null;return u=(l||0)+(u||0),o.dist=C(u)?Math.sqrt(u):Number.MAX_VALUE,o.distX=C(l)?Math.sqrt(l):Number.MAX_VALUE,l=0>(a=t[a]-o[a])?"right":"left",n[u=0>a?"left":"right"]&&(s=(u=e(t,n[u],r+1,i))[h]<s[h]?u:o),n[l]&&Math.sqrt(a*a)<s[h]&&(s=(t=e(t,n[l],r+1,i))[h]<s[h]?t:s),s}(e,this.kdTree,t,t)},e.prototype.pointPlacementToXValue=function(){var e=this.options,t=e.pointRange,n=this.xAxis;return"between"===(e=e.pointPlacement)&&(e=n.reversed?-.5:.5),k(e)?e*(t||n.pointRange):0},e.prototype.isPointInside=function(e){var t=this.chart,n=this.xAxis,r=this.yAxis;return void 0!==e.plotY&&void 0!==e.plotX&&0<=e.plotY&&e.plotY<=(r?r.len:t.plotHeight)&&0<=e.plotX&&e.plotX<=(n?n.len:t.plotWidth)},e.prototype.drawTracker=function(){var t=_____WB$wombat$check$this$function_____(this),n=t.options,e=n.trackByArea,r=[].concat(e?t.areaPath:t.graphPath),i=t.chart,o=i.pointer,a=i.renderer,c=i.options.tooltip.snap,s=t.tracker,l=function(e){i.hoverSeries!==t&&t.onMouseOver()},u="rgba(192,192,192,"+(y?1e-4:.002)+")";s?s.attr({d:r}):t.graph&&(t.tracker=a.path(r).attr({visibility:t.visible?"visible":"hidden",zIndex:2}).addClass(e?"highcharts-tracker-area":"highcharts-tracker-line").add(t.group),i.styledMode||t.tracker.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:u,fill:e?u:"none","stroke-width":t.graph.strokeWidth()+(e?0:2*c)}),[t.tracker,t.markerGroup,t.dataLabelsGroup].forEach(function(e){e&&(e.addClass("highcharts-tracker").on("mouseover",l).on("mouseout",function(e){o.onTrackerMouseOut(e)}),n.cursor&&!i.styledMode&&e.css({cursor:n.cursor}),f)&&e.on("touchstart",l)})),A(this,"afterDrawTracker")},e.prototype.addPoint=function(e,t,c,p,d){var n=this.options,r=this.data,h=this.chart,i=this.xAxis;i=i&&i.hasNames&&i.names;var o,f=n.data,a=this.xData;t=M(t,!0);var s={series:this};this.pointClass.prototype.applyOptions.apply(s,[e]);var l=s.x,u=a.length;if(this.requireSorting&&l<a[u-1])for(o=!0;u&&a[u-1]>l;)u--;this.updateParallelArrays(s,"splice",u,0,0),this.updateParallelArrays(s,u),i&&s.name&&(i[l]=s.name),f.splice(u,0,e),o&&(this.data.splice(u,0,null),this.processData()),"point"===n.legendType&&this.generatePoints(),c&&(r[0]&&r[0].remove?r[0].remove(!1):(r.shift(),this.updateParallelArrays(s,"shift"),f.shift())),!1!==d&&A(this,"addPoint",{point:s}),this.isDirtyData=this.isDirty=!0,t&&h.redraw(p)},e.prototype.removePoint=function(e,t,n){var r=_____WB$wombat$check$this$function_____(this),i=r.data,o=i[e],a=r.points,s=r.chart,l=function(){a&&a.length===i.length&&a.splice(e,1),i.splice(e,1),r.options.data.splice(e,1),r.updateParallelArrays(o||{series:r},"splice",e,1),o&&o.destroy(),r.isDirty=!0,r.isDirtyData=!0,t&&s.redraw()};h(n,s),t=M(t,!0),o?o.firePointEvent("remove",null,l):l()},e.prototype.remove=function(e,t,n,r){function i(){o.destroy(r),a.isDirtyLegend=a.isDirtyBox=!0,a.linkSeries(),M(e,!0)&&a.redraw(t)}var o=_____WB$wombat$check$this$function_____(this),a=o.chart;!1!==n?A(o,"remove",null,i):i()},e.prototype.update=function(e,c){e=S(e,this.userOptions),A(this,"update",{options:e});var p,t=_____WB$wombat$check$this$function_____(this),n=t.chart,r=t.userOptions,d=t.initialType||t.type,i=n.options.plotOptions,o=m[d].prototype,h=t.finishedAnimating&&{animation:!1},a={},s=["eventOptions","navigatorSeries","baseSeries"],l=e.type||r.type||n.options.chart.type,u=!(this.hasDerivedData||l&&l!==this.type||void 0!==e.pointStart||void 0!==e.pointInterval||void 0!==e.relativeXValue||t.hasOptionChanged("dataGrouping")||t.hasOptionChanged("pointStart")||t.hasOptionChanged("pointInterval")||t.hasOptionChanged("pointIntervalUnit")||t.hasOptionChanged("keys"));if(l=l||d,u&&(s.push("data","isDirtyData","points","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","_hasPointLabels","clips","nodes","layout","mapMap","mapData","minY","maxY","minX","maxX"),!1!==e.visible&&s.push("area","graph"),t.parallelArrays.forEach(function(e){s.push(e+"Data")}),e.data&&(e.dataSorting&&g(t.options.dataSorting,e.dataSorting),this.setData(e.data,!1))),e=j(r,h,{index:void 0===r.index?t.index:r.index,pointStart:M(i&&i.series&&i.series.pointStart,r.pointStart,t.xData[0])},!u&&{data:t.options.data},e),u&&e.data&&(e.data=t.options.data),(s=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(s)).forEach(function(e){s[e]=t[e],delete t[e]}),i=!1,m[l]){if(i=l!==t.type,t.remove(!1,!1,!1,!0),i)if(Object.setPrototypeOf)Object.setPrototypeOf(t,m[l].prototype);else{for(p in h=Object.hasOwnProperty.call(t,"hcEvents")&&t.hcEvents,o)t[p]=void 0;g(t,m[l].prototype),h?t.hcEvents=h:delete t.hcEvents}}else x(17,!0,n,{missingModuleFor:l});if(s.forEach(function(e){t[e]=s[e]}),t.init(n,e),u&&this.points){var f=t.options;!1===f.visible?(a.graphic=1,a.dataLabel=1):t._hasPointLabels||(e=f.marker,o=f.dataLabels,!e||!1!==e.enabled&&(r.marker&&r.marker.symbol)===e.symbol||(a.graphic=1),o&&!1===o.enabled&&(a.dataLabel=1)),this.points.forEach(function(e){e&&e.series&&(e.resolveColor(),Object.keys(a).length&&e.destroyElements(a),!1===f.showInLegend&&e.legendItem&&n.legend.destroyItem(e))},_____WB$wombat$check$this$function_____(this))}t.initialType=d,n.linkSeries(),i&&t.linkedSeries.length&&(t.isDirtyData=!0),A(this,"afterUpdate"),M(c,!0)&&n.redraw(!!u&&void 0)},e.prototype.setName=function(e){this.name=this.options.name=this.userOptions.name=e,this.chart.isDirtyLegend=!0},e.prototype.hasOptionChanged=function(e){var t=this.options[e],n=this.chart.options.plotOptions,r=this.userOptions[e];return r?t!==r:t!==M(n&&n[this.type]&&n[this.type][e],n&&n.series&&n.series[e],t)},e.prototype.onMouseOver=function(){var e=this.chart,t=e.hoverSeries;e.pointer.setHoverChartIndex(),t&&t!==_____WB$wombat$check$this$function_____(this)&&t.onMouseOut(),this.options.events.mouseOver&&A(this,"mouseOver"),this.setState("hover"),e.hoverSeries=_____WB$wombat$check$this$function_____(this)},e.prototype.onMouseOut=function(){var e=this.options,t=this.chart,n=t.tooltip,r=t.hoverPoint;t.hoverSeries=null,r&&r.onMouseOut(),_____WB$wombat$check$this$function_____(this)&&e.events.mouseOut&&A(this,"mouseOut"),!n||this.stickyTracking||n.shared&&!this.noSharedTooltip||n.hide(),t.series.forEach(function(e){e.setState("",!0)})},e.prototype.setState=function(t,c){var n=_____WB$wombat$check$this$function_____(this),e=n.options,r=n.graph,i=e.inactiveOtherPoints,o=e.states,a=M(o[t||"normal"]&&o[t||"normal"].animation,n.chart.options.chart.animation),s=e.lineWidth,l=0,u=e.opacity;if(t=t||"",n.state!==t&&([n.group,n.markerGroup,n.dataLabelsGroup].forEach(function(e){e&&(n.state&&e.removeClass("highcharts-series-"+n.state),t&&e.addClass("highcharts-series-"+t))}),n.state=t,!n.chart.styledMode)){if(o[t]&&!1===o[t].enabled)return;if(t&&(s=o[t].lineWidth||s+(o[t].lineWidthPlus||0),u=M(o[t].opacity,u)),r&&!r.dashstyle)for(e={"stroke-width":s},r.animate(e,a);n["zone-graph-"+l];)n["zone-graph-"+l].animate(e,a),l+=1;i||[n.group,n.markerGroup,n.dataLabelsGroup,n.labelBySeries].forEach(function(e){e&&e.animate({opacity:u},a)})}c&&i&&n.points&&n.setAllPointsToState(t||void 0)},e.prototype.setAllPointsToState=function(t){this.points.forEach(function(e){e.setState&&e.setState(t)})},e.prototype.setVisible=function(t,e){var n=_____WB$wombat$check$this$function_____(this),r=n.chart,i=n.legendItem,o=r.options.chart.ignoreHiddenSeries,a=n.visible,s=(n.visible=t=n.options.visible=n.userOptions.visible=void 0===t?!a:t)?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(function(e){n[e]&&n[e][s]()}),r.hoverSeries!==n&&(r.hoverPoint&&r.hoverPoint.series)!==n||n.onMouseOut(),i&&r.legend.colorizeItem(n,t),n.isDirty=!0,n.options.stacking&&r.series.forEach(function(e){e.options.stacking&&e.visible&&(e.isDirty=!0)}),n.linkedSeries.forEach(function(e){e.setVisible(t,!1)}),o&&(r.isDirtyBox=!0),A(n,s),!1!==e&&r.redraw()},e.prototype.show=function(){this.setVisible(!0)},e.prototype.hide=function(){this.setVisible(!1)},e.prototype.select=function(e){this.selected=e=this.options.selected=void 0===e?!this.selected:e,this.checkbox&&(this.checkbox.checked=e),A(this,e?"select":"unselect")},e.prototype.shouldShowTooltip=function(e,t,n){return void 0===n&&(n={}),n.series=_____WB$wombat$check$this$function_____(this),n.visiblePlotOnly=!0,this.chart.isInsidePlot(e,t,n)},e.defaultOptions=o,e}(),g(e.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,cropShoulder:1,directTouch:!1,drawLegendSymbol:i.drawLineMarker,isCartesian:!0,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:c,requireSorting:!0,sorted:!0}),a.series=e,e}),e(t,"Extensions/ScrollablePlotArea.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/Axis/Axis.js"],t["Core/Chart/Chart.js"],t["Core/Series/Series.js"],t["Core/Renderer/RendererRegistry.js"],t["Core/Utilities.js"]],function(e,o,t,n,a,r){var s=e.stop,l=r.addEvent,u=r.createElement,c=r.merge,p=r.pick;l(t,"afterSetChartSize",function(e){var t=this.options.chart.scrollablePlotArea,n=t&&t.minWidth;if(t=t&&t.minHeight,!this.renderer.forExport){if(n){if(this.scrollablePixelsX=n=Math.max(0,n-this.chartWidth)){this.scrollablePlotBox=this.renderer.scrollablePlotBox=c(this.plotBox),this.plotBox.width=this.plotWidth+=n,this.inverted?this.clipBox.height+=n:this.clipBox.width+=n;var i={1:{name:"right",value:n}}}}else t&&(this.scrollablePixelsY=n=Math.max(0,t-this.chartHeight))&&(this.scrollablePlotBox=this.renderer.scrollablePlotBox=c(this.plotBox),this.plotBox.height=this.plotHeight+=n,this.inverted?this.clipBox.width+=n:this.clipBox.height+=n,i={2:{name:"bottom",value:n}});i&&!e.skipAxes&&this.axes.forEach(function(r){i[r.side]?r.getPlotLinePath=function(){var e=i[r.side].name,t=_____WB$wombat$check$this$function_____(this)[e];this[e]=t-i[r.side].value;var n=o.prototype.getPlotLinePath.apply(this,arguments);return _____WB$wombat$check$this$function_____(this)[e]=t,n}:(r.setAxisSize(),r.setAxisTranslation())})}}),l(t,"render",function(){this.scrollablePixelsX||this.scrollablePixelsY?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()}),t.prototype.setUpScrolling=function(){var e=_____WB$wombat$check$this$function_____(this),t={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};this.scrollablePixelsX&&(t.overflowX="auto"),this.scrollablePixelsY&&(t.overflowY="auto"),this.scrollingParent=u("div",{className:"highcharts-scrolling-parent"},{position:"relative"},this.renderTo),this.scrollingContainer=u("div",{className:"highcharts-scrolling"},t,this.scrollingParent),l(this.scrollingContainer,"scroll",function(){e.pointer&&delete e.pointer.chartPosition}),this.innerContainer=u("div",{className:"highcharts-inner-container"},null,this.scrollingContainer),this.innerContainer.appendChild(this.container),this.setUpScrolling=null},t.prototype.moveFixedElements=function(){var e,t=this.container,n=this.fixedRenderer,r=".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" ");this.scrollablePixelsX&&!this.inverted?e=".highcharts-yaxis":this.scrollablePixelsX&&this.inverted||this.scrollablePixelsY&&!this.inverted?e=".highcharts-xaxis":this.scrollablePixelsY&&this.inverted&&(e=".highcharts-yaxis"),e&&r.push(e+":not(.highcharts-radial-axis)",e+"-labels:not(.highcharts-radial-axis-labels)"),r.forEach(function(e){[].forEach.call(t.querySelectorAll(e),function(e){(e.namespaceURI===n.SVG_NS?n.box:n.box.parentNode).appendChild(e),e.style.pointerEvents="auto"})})},t.prototype.applyFixed=function(){var e=!this.fixedDiv,t=this.options.chart,n=t.scrollablePlotArea,r=a.getRendererType();e?(this.fixedDiv=u("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(t.style&&t.style.zIndex||0)+2,top:0},null,!0),this.scrollingContainer&&this.scrollingContainer.parentNode.insertBefore(this.fixedDiv,this.scrollingContainer),this.renderTo.style.overflow="visible",this.fixedRenderer=t=new r(this.fixedDiv,this.chartWidth,this.chartHeight,this.options.chart.style),this.scrollableMask=t.path().attr({fill:this.options.chart.backgroundColor||"#fff","fill-opacity":p(n.opacity,.85),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),l(this,"afterShowResetZoom",this.moveFixedElements),l(this,"afterDrilldown",this.moveFixedElements),l(this,"afterLayOutTitles",this.moveFixedElements)):this.fixedRenderer.setSize(this.chartWidth,this.chartHeight),(this.scrollableDirty||e)&&(this.scrollableDirty=!1,this.moveFixedElements()),t=this.chartWidth+(this.scrollablePixelsX||0),r=this.chartHeight+(this.scrollablePixelsY||0),s(this.container),this.container.style.width=t+"px",this.container.style.height=r+"px",this.renderer.boxWrapper.attr({width:t,height:r,viewBox:[0,0,t,r].join(" ")}),this.chartBackground.attr({width:t,height:r}),this.scrollingContainer.style.height=this.chartHeight+"px",e&&(n.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixelsX*n.scrollPositionX),n.scrollPositionY&&(this.scrollingContainer.scrollTop=this.scrollablePixelsY*n.scrollPositionY)),r=this.axisOffset,e=this.plotTop-r[0]-1,n=this.plotLeft-r[3]-1,t=this.plotTop+this.plotHeight+r[2]+1,r=this.plotLeft+this.plotWidth+r[1]+1;var i=this.plotLeft+this.plotWidth-(this.scrollablePixelsX||0),o=this.plotTop+this.plotHeight-(this.scrollablePixelsY||0);e=this.scrollablePixelsX?[["M",0,e],["L",this.plotLeft-1,e],["L",this.plotLeft-1,t],["L",0,t],["Z"],["M",i,e],["L",this.chartWidth,e],["L",this.chartWidth,t],["L",i,t],["Z"]]:this.scrollablePixelsY?[["M",n,0],["L",n,this.plotTop-1],["L",r,this.plotTop-1],["L",r,0],["Z"],["M",n,o],["L",n,this.chartHeight],["L",r,this.chartHeight],["L",r,o],["Z"]]:[["M",0,0]],"adjustHeight"!==this.redrawTrigger&&this.scrollableMask.attr({d:e})},l(o,"afterInit",function(){this.chart.scrollableDirty=!0}),l(n,"show",function(){this.chart.scrollableDirty=!0})}),e(t,"Core/Axis/StackingAxis.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/Axis/Axis.js"],t["Core/Utilities.js"]],function(e,r,t){var n,o=e.getDeferredAnimation,a=t.addEvent,s=t.destroyObjectProperties,l=t.fireEvent,u=t.isNumber,c=t.objectEach;return function(e){function t(){var e=this.stacking;if(e){var n=e.stacks;c(n,function(e,t){s(e),n[t]=null}),e&&e.stackTotalGroup&&e.stackTotalGroup.destroy()}}function n(){this.stacking||(this.stacking=new i(this))}var r=[];e.compose=function(e){return-1===r.indexOf(e)&&(r.push(e),a(e,"init",n),a(e,"destroy",t)),e};var i=function(){function e(e){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=e}return e.prototype.buildStacks=function(){var e,t=this.axis,n=t.series,r=t.options.reversedStacks,i=n.length;if(!t.isXAxis){for(this.usePercentage=!1,e=i;e--;){var o=n[r?e:i-e-1];o.setStackedPoints(),o.setGroupedPoints()}for(e=0;e<i;e++)n[e].modifyStacks();l(t,"afterBuildStacks")}},e.prototype.cleanStacks=function(){if(!this.axis.isXAxis){if(this.oldStacks)var e=this.stacks=this.oldStacks;c(e,function(e){c(e,function(e){e.cumulative=e.total})})}},e.prototype.resetStacks=function(){var r=_____WB$wombat$check$this$function_____(this),e=r.stacks;r.axis.isXAxis||c(e,function(n){c(n,function(e,t){u(e.touched)&&e.touched<r.stacksTouched?(e.destroy(),delete n[t]):(e.total=null,e.cumulative=null)})})},e.prototype.renderStackTotals=function(){var e=this.axis,t=e.chart,n=t.renderer,r=this.stacks;e=o(t,e.options.stackLabels&&e.options.stackLabels.animation||!1);var i=this.stackTotalGroup=this.stackTotalGroup||n.g("stack-labels").attr({visibility:"visible",zIndex:6,opacity:0}).add();i.translate(t.plotLeft,t.plotTop),c(r,function(e){c(e,function(e){e.render(i)})}),i.animate({opacity:1},e)},e}();e.Additions=i}(n||(n={})),n}),e(t,"Extensions/Stacking.js",[t["Core/Axis/Axis.js"],t["Core/Chart/Chart.js"],t["Core/FormatUtilities.js"],t["Core/Globals.js"],t["Core/Series/Series.js"],t["Core/Axis/StackingAxis.js"],t["Core/Utilities.js"]],function(e,i,o,t,l,a,n){var s=o.format,E=n.correctFloat,S=n.defined,c=n.destroyObjectProperties,_=n.isArray,u=n.isNumber,r=n.objectEach,T=n.pick,x=function(){function e(e,t,n,r,i){var o=e.chart.inverted;this.axis=e,this.isNegative=n,this.options=t=t||{},this.x=r,this.total=null,this.points={},this.hasValidPoints=!1,this.stack=i,this.rightCliff=this.leftCliff=0,this.alignOptions={align:t.align||(o?n?"left":"right":"center"),verticalAlign:t.verticalAlign||(o?"middle":n?"bottom":"top"),y:t.y,x:t.x},this.textAlign=t.textAlign||(o?n?"right":"left":"center")}return e.prototype.destroy=function(){c(this,this.axis)},e.prototype.render=function(e){var t=this.axis.chart,n=this.options,r=n.format;r=r?s(r,_____WB$wombat$check$this$function_____(this),t):n.formatter.call(this),this.label?this.label.attr({text:r,visibility:"hidden"}):(this.label=t.renderer.label(r,null,null,n.shape,null,null,n.useHTML,!1,"stack-labels"),r={r:n.borderRadius||0,text:r,rotation:n.rotation,padding:T(n.padding,5),visibility:"hidden"},t.styledMode||(r.fill=n.backgroundColor,r.stroke=n.borderColor,r["stroke-width"]=n.borderWidth,this.label.css(n.style)),this.label.attr(r),this.label.added||this.label.add(e)),this.label.labelrank=t.plotSizeY},e.prototype.setOffset=function(e,t,n,r,i){var o=this.axis,a=o.chart;r=o.translate(o.stacking.usePercentage?100:r||this.total,0,0,0,1),n=o.translate(n||0),n=S(r)&&Math.abs(r-n),e=T(i,a.xAxis[0].translate(this.x))+e,o=S(r)&&this.getStackBox(a,_____WB$wombat$check$this$function_____(this),e,r,t,n,o),t=this.label,n=this.isNegative,e="justify"===T(this.options.overflow,"justify");var s=this.textAlign;t&&o&&(i=t.getBBox(),r=t.padding,s="left"===s?a.inverted?-r:r:"right"===s?i.width:a.inverted&&"center"===s?i.width/2:a.inverted?n?i.width+r:-r:i.width/2,n=a.inverted?i.height/2:n?-r:i.height,this.alignOptions.x=T(this.options.x,0),this.alignOptions.y=T(this.options.y,0),o.x-=s,o.y-=n,t.align(this.alignOptions,null,o),a.isInsidePlot(t.alignAttr.x+s-this.alignOptions.x,t.alignAttr.y+n-this.alignOptions.y)?t.show():(t.alignAttr.y=-9999,e=!1),e&&l.prototype.justifyDataLabel.call(this.axis,t,this.alignOptions,t.alignAttr,i,o),t.attr({x:t.alignAttr.x,y:t.alignAttr.y}),T(!e&&this.options.crop,!0)&&((a=u(t.x)&&u(t.y)&&a.isInsidePlot(t.x-r+t.width,t.y)&&a.isInsidePlot(t.x+r,t.y))||t.hide()))},e.prototype.getStackBox=function(e,t,n,r,i,o,a){var s=t.axis.reversed,l=e.inverted,u=a.height+a.pos-(l?e.plotLeft:e.plotTop);return t=t.isNegative&&!s||!t.isNegative&&s,{x:l?t?r-a.right:r-o+a.pos-e.plotLeft:n+e.xAxis[0].transB-e.plotLeft,y:l?a.height-n-i:t?u-r-o:u-r,width:l?o:i,height:l?i:o}},e}();return i.prototype.getStacks=function(){var n=_____WB$wombat$check$this$function_____(this),r=n.inverted;n.yAxis.forEach(function(e){e.stacking&&e.stacking.stacks&&e.hasVisibleSeries&&(e.stacking.oldStacks=e.stacking.stacks)}),n.series.forEach(function(e){var t=e.xAxis&&e.xAxis.options||{};!e.options.stacking||!0!==e.visible&&!1!==n.options.chart.ignoreHiddenSeries||(e.stackKey=[e.type,T(e.options.stack,""),r?t.top:t.left,r?t.height:t.width].join())})},a.compose(e),l.prototype.setGroupedPoints=function(){var n=this.yAxis.stacking;this.options.centerInCategory&&(this.is("column")||this.is("columnrange"))&&!this.options.stacking&&1<this.chart.series.length?l.prototype.setStackedPoints.call(this,"group"):n&&r(n.stacks,function(e,t){"group"===t.slice(-5)&&(r(e,function(e){return e.destroy()}),delete n.stacks[t])})},l.prototype.setStackedPoints=function(e){var t=e||this.options.stacking;if(t&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var c=this.processedXData,p=this.processedYData,d=[],h=p.length,n=this.options,f=n.threshold,m=T(n.startFromThreshold&&f,0);n=n.stack;var r,i,g="-"+(e=e?this.type+","+t:this.stackKey),y=this.negStacks,o=this.yAxis,a=o.stacking.stacks,b=o.stacking.oldStacks;for(o.stacking.stacksTouched+=1,i=0;i<h;i++){var s=c[i],l=p[i],v=this.getStackIndicator(v,s,this.index),w=v.key,u=(r=y&&l<(m?0:f))?g:e;a[u]||(a[u]={}),a[u][s]||(b[u]&&b[u][s]?(a[u][s]=b[u][s],a[u][s].total=null):a[u][s]=new x(o,o.options.stackLabels,r,s,n)),u=a[u][s],null!==l?(u.points[w]=u.points[this.index]=[T(u.cumulative,m)],S(u.cumulative)||(u.base=w),u.touched=o.stacking.stacksTouched,0<v.index&&!1===this.singleStacks&&(u.points[w][0]=u.points[this.index+","+s+",0"][0])):u.points[w]=u.points[this.index]=null,"percent"===t?(r=r?e:g,y&&a[r]&&a[r][s]?(r=a[r][s],u.total=r.total=Math.max(r.total,u.total)+Math.abs(l)||0):u.total=E(u.total+(Math.abs(l)||0))):"group"===t?(_(l)&&(l=l[0]),null!==l&&(u.total=(u.total||0)+1)):u.total=E(u.total+(l||0)),u.cumulative="group"===t?(u.total||1)-1:T(u.cumulative,m)+(l||0),null!==l&&(u.points[w].push(u.cumulative),d[i]=u.cumulative,u.hasValidPoints=!0)}"percent"===t&&(o.stacking.usePercentage=!0),"group"!==t&&(this.stackedYData=d),o.stacking.oldStacks={}}},l.prototype.modifyStacks=function(){var i,o=_____WB$wombat$check$this$function_____(this),e=o.stackKey,a=o.yAxis.stacking.stacks,s=o.processedXData,l=o.options.stacking;o[l+"Stacker"]&&[e,"-"+e].forEach(function(e){for(var t,n,r=s.length;r--;)t=s[r],i=o.getStackIndicator(i,t,o.index,e),(n=(t=a[e]&&a[e][t])&&t.points[i.key])&&o[l+"Stacker"](n,t,r)})},l.prototype.percentStacker=function(e,t,n){t=t.total?100/t.total:0,e[0]=E(e[0]*t),e[1]=E(e[1]*t),this.stackedYData[n]=e[1]},l.prototype.getStackIndicator=function(e,t,n,r){return!S(e)||e.x!==t||r&&e.key!==r?e={x:t,index:0,key:r}:e.index++,e.key=[n,t,e.index].join(),e},t.StackItem=x,t.StackItem}),e(t,"Series/Line/LineSeries.js",[t["Core/Series/Series.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(n,e,t){var r,i=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),f=t.defined,o=t.merge;return t=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.data=void 0,e.options=void 0,e.points=void 0,e}return i(e,t),e.prototype.drawGraph=function(){var o=_____WB$wombat$check$this$function_____(this),a=this.options,s=(this.gappedPath||this.getGraphPath).call(this),l=this.chart.styledMode,e=[["graph","highcharts-graph"]];l||e[0].push(a.lineColor||this.color||"#cccccc",a.dashStyle),(e=o.getZonesGraphs(e)).forEach(function(e,t){var n=e[0],r=o[n],i=r?"animate":"attr";r?(r.endX=o.preventGraphAnimation?null:s.xMap,r.animate({d:s})):s.length&&(o[n]=r=o.chart.renderer.path(s).addClass(e[1]).attr({zIndex:1}).add(o.group)),r&&!l&&(n={stroke:e[2],"stroke-width":a.lineWidth,fill:o.fillGraph&&o.color||"none"},e[3]?n.dashstyle=e[3]:"square"!==a.linecap&&(n["stroke-linecap"]=n["stroke-linejoin"]="round"),r[i](n).shadow(2>t&&a.shadow)),r&&(r.startX=s.xMap,r.isArea=s.isArea)})},e.prototype.getGraphPath=function(o,a,s){var l,u=_____WB$wombat$check$this$function_____(this),c=u.options,p=[],d=[],h=c.step,e=(o=o||u.points).reversed;return e&&o.reverse(),(h={right:1,center:2}[h]||h&&3)&&e&&(h=4-h),(o=this.getValidPoints(o,!1,!(c.connectNulls&&!a&&!s))).forEach(function(e,t){var n=e.plotX,r=e.plotY,i=o[t-1];(e.leftCliff||i&&i.rightCliff)&&!s&&(l=!0),e.isNull&&!f(a)&&0<t?l=!c.connectNulls:e.isNull&&!a?l=!0:(0===t||l?t=[["M",e.plotX,e.plotY]]:u.getPointSpline?t=[u.getPointSpline(o,e,t)]:h?(t=1===h?[["L",i.plotX,r]]:2===h?[["L",(i.plotX+n)/2,i.plotY],["L",(i.plotX+n)/2,r]]:[["L",n,i.plotY]]).push(["L",n,r]):t=[["L",n,r]],d.push(e.x),h&&(d.push(e.x),2===h&&d.push(e.x)),p.push.apply(p,t),l=!1)}),p.xMap=d,u.graphPath=p},e.prototype.getZonesGraphs=function(n){return this.zones.forEach(function(e,t){t=["zone-graph-"+t,"highcharts-graph highcharts-zone-graph-"+t+" "+(e.className||"")],this.chart.styledMode||t.push(e.color||this.color,e.dashStyle||this.options.dashStyle),n.push(t)},_____WB$wombat$check$this$function_____(this)),n},e.defaultOptions=o(n.defaultOptions,{}),e}(n),e.registerSeriesType("line",t),t}),e(t,"Series/Area/AreaSeries.js",[t["Core/Color/Color.js"],t["Core/Legend/LegendSymbol.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,n,r){var i,o=_____WB$wombat$check$this$function_____(this)&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=e.parse,a=n.seriesTypes.line;e=r.extend;var s=r.merge,u=r.objectEach,v=r.pick;return r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.data=void 0,e.options=void 0,e.points=void 0,e}return o(e,t),e.prototype.drawGraph=function(){this.areaPath=[],t.prototype.drawGraph.apply(this);var o=_____WB$wombat$check$this$function_____(this),a=this.areaPath,s=this.options,n=[["area","highcharts-area",this.color,s.fillColor]];this.zones.forEach(function(e,t){n.push(["zone-area-"+t,"highcharts-area highcharts-zone-area-"+t+" "+e.className,e.color||o.color,e.fillColor||s.fillColor])}),n.forEach(function(e){var t=e[0],n=o[t],r=n?"animate":"attr",i={};n?(n.endX=o.preventGraphAnimation?null:a.xMap,n.animate({d:a})):(i.zIndex=0,(n=o[t]=o.chart.renderer.path(a).addClass(e[1]).add(o.group)).isArea=!0),o.chart.styledMode||(i.fill=v(e[3],l(e[2]).setOpacity(v(s.fillOpacity,.75)).get())),n[r](i),n.startX=a.xMap,n.shiftUnit=s.step?2:1})},e.prototype.getGraphPath=function(s){var e,t=a.prototype.getGraphPath,n=this.options,l=n.stacking,u=this.yAxis,c=[],p=[],d=this.index,h=u.stacking.stacks[this.stackKey],f=n.threshold,m=Math.round(u.getThreshold(n.threshold));n=v(n.connectNulls,"percent"===l);var o=function(e,t,n){var r=s[e];e=l&&h[r.x].points[d];var i=r[n+"Null"]||0;if(n=r[n+"Cliff"]||0,r=!0,n||i){var o=(i?e[0]:e[1])+n,a=e[0]+n;r=!!i}else!l&&s[t]&&s[t].isNull&&(o=a=f);void 0!==o&&(p.push({plotX:g,plotY:null===o?m:u.getThreshold(o),isNull:r,isCliff:!0}),c.push({plotX:g,plotY:null===a?m:u.getThreshold(a),doCurve:!1}))};for(s=s||this.points,l&&(s=this.getStackPoints(s)),e=0;e<s.length;e++){l||(s[e].leftCliff=s[e].rightCliff=s[e].leftNull=s[e].rightNull=void 0);var r=s[e].isNull,g=v(s[e].rectPlotX,s[e].plotX),i=l?v(s[e].yBottom,m):m;r&&!n||(n||o(e,e-1,"left"),r&&!l&&n||(p.push(s[e]),c.push({x:e,plotX:g,plotY:i})),n||o(e,e+1,"right"))}return e=t.call(this,p,!0,!0),c.reversed=!0,(i=(r=t.call(this,c,!0,!0))[0])&&"M"===i[0]&&(r[0]=["L",i[1],i[2]]),(r=e.concat(r)).length&&r.push(["Z"]),t=t.call(this,p,!1,n),r.xMap=e.xMap,this.areaPath=r,t},e.prototype.getStackPoints=function(e){var c=_____WB$wombat$check$this$function_____(this),n=[],p=[],i=this.xAxis,r=this.yAxis,d=r.stacking.stacks[this.stackKey],h={},f=r.series,m=f.length,g=r.options.reversedStacks?1:-1,y=f.indexOf(c);if(e=e||this.points,this.options.stacking){for(var t=0;t<e.length;t++)e[t].leftNull=e[t].rightNull=void 0,h[e[t].x]=e[t];u(d,function(e,t){null!==e.total&&p.push(t)}),p.sort(function(e,t){return e-t});var b=f.map(function(e){return e.visible});p.forEach(function(a,s){var l,u,e=0;if(h[a]&&!h[a].isNull)n.push(h[a]),[-1,1].forEach(function(e){var t=1===e?"rightNull":"leftNull",n=0,r=d[p[s+e]];if(r)for(var i=y;0<=i&&i<m;){var o=f[i].index;(l=r.points[o])||(o===c.index?h[a][t]=!0:b[i]&&(u=d[a].points[o])&&(n-=u[1]-u[0])),i+=g}h[a][1===e?"rightCliff":"leftCliff"]=n});else{for(var t=y;0<=t&&t<m;){if(l=d[a].points[f[t].index]){e=l[1];break}t+=g}e=v(e,0),e=r.translate(e,0,1,0,1),n.push({isNull:!0,plotX:i.translate(a,0,0,0,1),x:a,plotY:e,yBottom:e})}})}return n},e.defaultOptions=s(a.defaultOptions,{threshold:0}),e}(a),e(r.prototype,{singleStacks:!1,drawLegendSymbol:t.drawRectangle}),n.registerSeriesType("area",r),r}),e(t,"Series/Spline/SplineSeries.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){var r,n=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=e.seriesTypes.line,o=t.merge,p=t.pick;return t=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.data=void 0,e.options=void 0,e.points=void 0,e}return n(e,t),e.prototype.getPointSpline=function(e,t,n){var r=t.plotX||0,i=t.plotY||0,o=e[n-1];if(n=e[n+1],o&&!o.isNull&&!1!==o.doCurve&&!t.isCliff&&n&&!n.isNull&&!1!==n.doCurve&&!t.isCliff){e=o.plotY||0;var a=n.plotX||0;n=n.plotY||0;var s=0,c=(1.5*r+(o.plotX||0))/2.5,l=(1.5*i+e)/2.5,u=(1.5*i+n)/2.5;(a=(1.5*r+a)/2.5)!==c&&(s=(u-l)*(a-r)/(a-c)+i-u),u+=s,(l+=s)>e&&l>i?u=2*i-(l=Math.max(e,i)):l<e&&l<i&&(u=2*i-(l=Math.min(e,i))),u>n&&u>i?l=2*i-(u=Math.max(n,i)):u<n&&u<i&&(l=2*i-(u=Math.min(n,i))),t.rightContX=a,t.rightContY=u}return t=["C",p(o.rightContX,o.plotX,0),p(o.rightContY,o.plotY,0),p(c,r,0),p(l,i,0),r,i],o.rightContX=o.rightContY=void 0,t},e.defaultOptions=o(i.defaultOptions),e}(i),e.registerSeriesType("spline",t),t}),e(t,"Series/AreaSpline/AreaSplineSeries.js",[t["Series/Area/AreaSeries.js"],t["Series/Spline/SplineSeries.js"],t["Core/Legend/LegendSymbol.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(n,r,e,t,i){var o,a=_____WB$wombat$check$this$function_____(this)&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=n.prototype,l=i.extend,u=i.merge;return i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.data=void 0,e.points=void 0,e.options=void 0,e}return a(e,t),e.defaultOptions=u(r.defaultOptions,n.defaultOptions),e}(r),l(i.prototype,{getGraphPath:s.getGraphPath,getStackPoints:s.getStackPoints,drawGraph:s.drawGraph,drawLegendSymbol:e.drawRectangle}),t.registerSeriesType("areaspline",i),i}),e(t,"Series/Column/ColumnSeries.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/Color/Color.js"],t["Core/Globals.js"],t["Core/Legend/LegendSymbol.js"],t["Core/Series/Series.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,o,t,a,n,s,r){var i,u=_____WB$wombat$check$this$function_____(this)&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=e.animObject,d=o.parse,h=t.hasTouch;e=t.noop;var T=r.clamp,f=r.css,C=r.defined,l=r.extend,m=r.fireEvent,g=r.isArray,x=r.isNumber,p=r.merge,_=r.pick,y=r.objectEach;return r=function(r){function e(){var e=null!==r&&r.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.borderWidth=void 0,e.data=void 0,e.group=void 0,e.options=void 0,e.points=void 0,e}return u(e,r),e.prototype.animate=function(e){var n=_____WB$wombat$check$this$function_____(this),r=this.yAxis,t=n.options,i=this.chart.inverted,o={},a=i?"translateX":"translateY";if(e)o.scaleY=.001,e=T(r.toPixels(t.threshold),r.pos,r.pos+r.len),i?o.translateX=e-r.len:o.translateY=e,n.clipBox&&n.setClip(),n.group.attr(o);else{var s=Number(n.group.attr(a));n.group.animate({scaleY:1},l(c(n.options.animation),{step:function(e,t){n.group&&(o[a]=s+t.pos*(r.pos-s),n.group.attr(o))}}))}},e.prototype.init=function(e,t){r.prototype.init.apply(this,arguments);var n=_____WB$wombat$check$this$function_____(this);(e=n.chart).hasRendered&&e.series.forEach(function(e){e.type===n.type&&(e.isDirty=!0)})},e.prototype.getColumnMetrics=function(){var i=_____WB$wombat$check$this$function_____(this),e=i.options,t=i.xAxis,o=i.yAxis,n=t.options.reversedStacks;n=t.reversed&&!n||!t.reversed&&n;var a,s={},l=0;!1===e.grouping?l=1:i.chart.series.forEach(function(e){var t=e.yAxis,n=e.options;if(e.type===i.type&&(e.visible||!i.chart.options.chart.ignoreHiddenSeries)&&o.len===t.len&&o.pos===t.pos){if(n.stacking&&"group"!==n.stacking){a=e.stackKey,void 0===s[a]&&(s[a]=l++);var r=s[a]}else!1!==n.grouping&&(r=l++);e.columnIndex=r}});var r=Math.min(Math.abs(t.transA)*(t.ordinal&&t.ordinal.slope||e.pointRange||t.closestPointRange||t.tickInterval||1),t.len),c=r*e.groupPadding,u=(r-2*c)/(l||1);return e=Math.min(e.maxPointWidth||t.len,_(e.pointWidth,u*(1-2*e.pointPadding))),i.columnMetrics={width:e,offset:(u-e)/2+(c+((i.columnIndex||0)+(n?1:0))*u-r/2)*(n?-1:1),paddedWidth:u,columnCount:l},i.columnMetrics},e.prototype.crispCol=function(e,t,n,r){var i=this.chart,o=this.borderWidth,a=-(o%2?.5:0);return o=o%2?.5:1,i.inverted&&i.renderer.isVML&&(o+=1),this.options.crisp&&(n=Math.round(e+n)+a,n-=e=Math.round(e)+a),r=Math.round(t+r)+o,a=.5>=Math.abs(t)&&.5<r,r-=t=Math.round(t)+o,a&&r&&(--t,r+=1),{x:e,y:t,width:n,height:r}},e.prototype.adjustForMissingColumns=function(e,t,r,n){var i=_____WB$wombat$check$this$function_____(this),o=this.options.stacking;if(!r.isNull&&1<n.columnCount){var a=0,s=0;y(this.yAxis.stacking&&this.yAxis.stacking.stacks,function(e){if("number"==typeof r.x&&(e=e[r.x.toString()])){var t=e.points[i.index],n=e.total;o?(t&&(a=s),e.hasValidPoints&&s++):g(t)&&(a=t[1],s=n||0)}}),e=(r.plotX||0)+((s-1)*n.paddedWidth+t)/2-t-a*n.paddedWidth}return e},e.prototype.translate=function(){var u=_____WB$wombat$check$this$function_____(this),c=u.chart,p=u.options,e=u.dense=2>u.closestPointRange*u.xAxis.transA;e=u.borderWidth=_(p.borderWidth,e?0:1);var d=u.xAxis,h=u.yAxis,f=p.threshold,m=u.translatedThreshold=h.getThreshold(f),g=_(p.minPointLength,5),y=u.getColumnMetrics(),b=y.width,v=u.pointXOffset=y.offset,w=u.dataMin,E=u.dataMax,S=u.barW=Math.max(b,1+2*e);c.inverted&&(m-=.5),p.pointPadding&&(S=Math.ceil(S)),n.prototype.translate.apply(u),u.points.forEach(function(e){var t=_(e.yBottom,m),n=999+Math.abs(t),r=e.plotX||0;n=T(e.plotY,-n,h.len+n);var i=Math.min(n,t),o=Math.max(n,t)-i,a=b,s=r+v,l=S;g&&Math.abs(o)<g&&(o=g,r=!h.reversed&&!e.negative||h.reversed&&e.negative,x(f)&&x(E)&&e.y===f&&E<=f&&(h.min||0)<f&&(w!==E||(h.max||0)<=f)&&(r=!r),i=Math.abs(i-m)>g?t-g:m-(r?g:0)),C(e.options.pointWidth)&&(a=l=Math.ceil(e.options.pointWidth),s-=Math.round((a-b)/2)),p.centerInCategory&&(s=u.adjustForMissingColumns(s,a,e,y)),e.barX=s,e.pointWidth=a,e.tooltipPos=c.inverted?[T(h.len+h.pos-c.plotLeft-n,h.pos-c.plotLeft,h.len+h.pos-c.plotLeft),d.len+d.pos-c.plotTop-s-l/2,o]:[d.left-c.plotLeft+s+l/2,T(n+h.pos-c.plotTop,h.pos-c.plotTop,h.len+h.pos-c.plotTop),o],e.shapeType=u.pointClass.prototype.shapeType||"rect",e.shapeArgs=u.crispCol.apply(u,e.isNull?[s,m,l,0]:[s,i,l,o])})},e.prototype.drawGraph=function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},e.prototype.pointAttribs=function(e,t){var n=this.options,r=this.pointAttrToOptions||{},i=r.stroke||"borderColor",o=r["stroke-width"]||"borderWidth",a=e&&e.color||this.color,s=e&&e[i]||n[i]||a;r=e&&e.options.dashStyle||n.dashStyle;var l=e&&e[o]||n[o]||_____WB$wombat$check$this$function_____(this)[o]||0,c=_(e&&e.opacity,n.opacity,1);if(e&&this.zones.length){var u=e.getZone();a=e.options.color||u&&(u.color||e.nonZonedColor)||this.color,u&&(s=u.borderColor||s,r=u.dashStyle||r,l=u.borderWidth||l)}return t&&e&&(t=(e=p(n.states[t],e.options.states&&e.options.states[t]||{})).brightness,a=e.color||void 0!==t&&d(a).brighten(e.brightness).get()||a,s=e[i]||s,l=e[o]||l,r=e.dashStyle||r,c=_(e.opacity,c)),i={fill:a,stroke:s,"stroke-width":l,opacity:c},r&&(i.dashstyle=r),i},e.prototype.drawPoints=function(){var i,o=_____WB$wombat$check$this$function_____(this),a=this.chart,s=o.options,l=a.renderer,u=s.animationLimit||250;o.points.forEach(function(e){var t=e.graphic,n=!!t,r=t&&a.pointCount<u?"animate":"attr";x(e.plotY)&&null!==e.y?(i=e.shapeArgs,t&&e.hasNewShapeType()&&(t=t.destroy()),o.enabledDataSorting&&(e.startXPos=o.xAxis.reversed?-(i&&i.width||0):o.xAxis.width),t||(e.graphic=t=l[e.shapeType](i).add(e.group||o.group))&&o.enabledDataSorting&&a.hasRendered&&a.pointCount<u&&(t.attr({x:e.startXPos}),n=!0,r="animate"),t&&n&&t[r](p(i)),s.borderRadius&&t[r]({r:s.borderRadius}),a.styledMode||t[r](o.pointAttribs(e,e.selected&&"select")).shadow(!1!==e.allowShadow&&s.shadow,null,s.stacking&&!s.borderRadius),t&&(t.addClass(e.getClassName(),!0),t.attr({visibility:e.visible?"inherit":"hidden"}))):t&&(e.graphic=t.destroy())})},e.prototype.drawTracker=function(){var e,t=_____WB$wombat$check$this$function_____(this),n=t.chart,r=n.pointer,i=function(e){var t=r.getPointFromEvent(e);void 0!==t&&(r.isDirectTouch=!0,t.onMouseOver(e))};t.points.forEach(function(t){e=g(t.dataLabels)?t.dataLabels:t.dataLabel?[t.dataLabel]:[],t.graphic&&(t.graphic.element.point=t),e.forEach(function(e){e.div?e.div.point=t:e.element.point=t})}),t._hasTracking||(t.trackerGroups.forEach(function(e){t[e]&&(t[e].addClass("highcharts-tracker").on("mouseover",i).on("mouseout",function(e){r.onTrackerMouseOut(e)}),h&&t[e].on("touchstart",i),!n.styledMode&&t.options.cursor&&t[e].css(f).css({cursor:t.options.cursor}))}),t._hasTracking=!0),m(this,"afterDrawTracker")},e.prototype.remove=function(){var t=_____WB$wombat$check$this$function_____(this),e=t.chart;e.hasRendered&&e.series.forEach(function(e){e.type===t.type&&(e.isDirty=!0)}),n.prototype.remove.apply(t,arguments)},e.defaultOptions=p(n.defaultOptions,{borderRadius:0,centerInCategory:!1,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:void 0,verticalAlign:void 0,y:void 0},startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"}),e}(n),l(r.prototype,{cropShoulder:0,directTouch:!0,drawLegendSymbol:a.drawRectangle,getSymbol:e,negStacks:!0,trackerGroups:["group","dataLabelsGroup"]}),s.registerSeriesType("column",r),r}),e(t,"Core/Series/DataLabel.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/FormatUtilities.js"],t["Core/Utilities.js"]],function(e,t,n){var r,p=e.getDeferredAnimation,b=t.format,y=n.defined,v=n.extend,l=n.fireEvent,u=n.isArray,c=n.merge,E=n.objectEach,w=n.pick,S=n.splat;return function(e){function n(t,n,e,r,c){var i=_____WB$wombat$check$this$function_____(this),o=this.chart,a=this.isCartesian&&o.inverted,p=this.enabledDataSorting,s=w(t.dlBox&&t.dlBox.centerX,t.plotX,-9999),d=w(t.plotY,-9999),l=n.getBBox(),h=e.rotation,f=e.align,m=o.isInsidePlot(s,Math.round(d),{inverted:a,paneCoordinates:!0,series:i}),u=function(e){p&&i.xAxis&&!g&&i.setDataLabelStartPos(t,n,c,m,e)},g="justify"===w(e.overflow,p?"none":"justify"),y=this.visible&&!1!==t.visible&&(t.series.forceDL||p&&!g||m||w(e.inside,!!this.options.stacking)&&r&&o.isInsidePlot(s,a?r.x+1:r.y+r.height-1,{inverted:a,paneCoordinates:!0,series:i}));if(y){var b=o.renderer.fontMetrics(o.styledMode?void 0:e.style.fontSize,n).b;r=v({x:a?this.yAxis.len-d:s,y:Math.round(a?this.xAxis.len-s:d),width:0,height:0},r),v(e,{width:l.width,height:l.height}),h?(g=!1,s=o.renderer.rotCorr(b,h),u(s={x:r.x+(e.x||0)+r.width/2+s.x,y:r.y+(e.y||0)+{top:0,middle:.5,bottom:1}[e.verticalAlign]*r.height}),n[c?"attr":"animate"](s).attr({align:f}),u=180<(u=(h+720)%360)&&360>u,"left"===f?s.y-=u?l.height:0:"center"===f?(s.x-=l.width/2,s.y-=l.height/2):"right"===f&&(s.x-=l.width,s.y-=u?0:l.height),n.placed=!0,n.alignAttr=s):(u(r),n.align(e,void 0,r),s=n.alignAttr),g&&0<=r.height?this.justifyDataLabel(n,e,s,l,r,c):w(e.crop,!0)&&(y=o.isInsidePlot(s.x,s.y,{paneCoordinates:!0,series:i})&&o.isInsidePlot(s.x+l.width,s.y+l.height,{paneCoordinates:!0,series:i})),e.shape&&!h&&n[c?"attr":"animate"]({anchorX:a?o.plotWidth-t.plotY:t.plotX,anchorY:a?o.plotHeight-t.plotX:t.plotY})}c&&p&&(n.placed=!1),y||p&&!g||(n.hide(!0),n.placed=!1)}function r(){var d=_____WB$wombat$check$this$function_____(this),h=d.chart,f=d.options,e=d.points,t=d.hasRendered||0,m=h.renderer,n=f.dataLabels,r=n.animation;if(r=n.defer?p(h,r,d):{defer:0,duration:0},n=o(o(h.options.plotOptions&&h.options.plotOptions.series&&h.options.plotOptions.series.dataLabels,h.options.plotOptions&&h.options.plotOptions[d.type]&&h.options.plotOptions[d.type].dataLabels),n),l(this,"drawDataLabels"),u(n)||n.enabled||d._hasPointLabels){var g=d.plotGroup("dataLabelsGroup","data-labels",t?"inherit":"hidden",n.zIndex||6);g.attr({opacity:+t}),!t&&(t=d.dataLabelsGroup)&&(d.visible&&g.show(!0),t[f.animation?"animate":"attr"]({opacity:1},r)),e.forEach(function(p){S(o(n,p.dlOptions||p.options&&p.options.dataLabels)).forEach(function(e,t){var n=e.enabled&&(!p.isNull||p.dataLabelOnNull)&&function(e,t){var n=t.filter;return!n||(t=n.operator,e=e[n.property],n=n.value,">"===t&&e>n||"<"===t&&e<n||">="===t&&e>=n||"<="===t&&e<=n||"=="===t&&e==n||"==="===t&&e===n)}(p,e),r=p.connectors?p.connectors[t]:p.connector,i=p.dataLabels?p.dataLabels[t]:p.dataLabel,o=w(e.distance,p.labelDistance),c=!i;if(n){var a=p.getLabelConfig(),s=w(e[p.formatPrefix+"Format"],e.format);a=y(s)?b(s,a,h):(e[p.formatPrefix+"Formatter"]||e.formatter).call(a,e),s=e.style;var l=e.rotation;h.styledMode||(s.color=w(e.color,s.color,d.color,"#000000"),"contrast"===s.color?(p.contrastColor=m.getContrast(p.color||d.color),s.color=!y(o)&&e.inside||0>o||f.stacking?p.contrastColor:"#000000"):delete p.contrastColor,f.cursor&&(s.cursor=f.cursor));var u={r:e.borderRadius||0,rotation:l,padding:e.padding,zIndex:1};h.styledMode||(u.fill=e.backgroundColor,u.stroke=e.borderColor,u["stroke-width"]=e.borderWidth),E(u,function(e,t){void 0===e&&delete u[t]})}!i||n&&y(a)&&!!i.div==!!e.useHTML||(p.dataLabel=i=p.dataLabel&&p.dataLabel.destroy(),p.dataLabels&&(1===p.dataLabels.length?delete p.dataLabels:delete p.dataLabels[t]),t||delete p.dataLabel,r&&(p.connector=p.connector.destroy(),p.connectors&&(1===p.connectors.length?delete p.connectors:delete p.connectors[t]))),n&&y(a)&&(i?u.text=a:(p.dataLabels=p.dataLabels||[],i=p.dataLabels[t]=l?m.text(a,0,-9999,e.useHTML).addClass("highcharts-data-label"):m.label(a,0,-9999,e.shape,null,null,e.useHTML,null,"data-label"),t||(p.dataLabel=i),i.addClass(" highcharts-data-label-color-"+p.colorIndex+" "+(e.className||"")+(e.useHTML?" highcharts-tracker":""))),i.options=e,i.attr(u),h.styledMode||i.css(s).shadow(e.shadow),i.added||i.add(g),e.textPath&&!e.useHTML&&(i.setTextPath(p.getDataLabelPath&&p.getDataLabelPath(i)||p.graphic,e.textPath),p.dataLabelPath&&!e.textPath.enabled&&(p.dataLabelPath=p.dataLabelPath.destroy())),d.alignDataLabel(p,i,e,null,c))})})}l(this,"afterDrawDataLabels")}function i(e,t,n,r,c,p){var i=this.chart,d=t.align,h=t.verticalAlign,o=e.box?0:e.padding||0,a=t.x;a=void 0===a?0:a;var s=t.y;s=void 0===s?0:s;var l=(n.x||0)+o;if(0>l){"right"===d&&0<=a?(t.align="left",t.inside=!0):a-=l;var u=!0}return(l=(n.x||0)+r.width-o)>i.plotWidth&&("left"===d&&0>=a?(t.align="right",t.inside=!0):a+=i.plotWidth-l,u=!0),0>(l=n.y+o)&&("bottom"===h&&0<=s?(t.verticalAlign="top",t.inside=!0):s-=l,u=!0),(l=(n.y||0)+r.height-o)>i.plotHeight&&("top"===h&&0>=s?(t.verticalAlign="bottom",t.inside=!0):s+=i.plotHeight-l,u=!0),u&&(t.x=a,t.y=s,e.placed=!p,e.align(t,void 0,c)),u}function o(t,n){var e,r=[];if(u(t)&&!u(n))r=t.map(function(e){return c(e,n)});else if(u(n)&&!u(t))r=n.map(function(e){return c(t,e)});else if(u(t)||u(n))for(e=Math.max(t.length,n.length);e--;)r[e]=c(t[e],n[e]);else r=c(t,n);return r}function a(e,t,n,r,i){var o=this.chart,a=o.inverted,s=this.xAxis,l=s.reversed,u=a?t.height/2:t.width/2;e=(e=e.pointWidth)?e/2:0,t.startXPos=a?i.x:l?-u-e:s.width-u+e,t.startYPos=a?l?this.yAxis.height-u+e:-u-e:i.y,r?"hidden"===t.visibility&&(t.show(),t.attr({opacity:0}).animate({opacity:1})):t.attr({opacity:1}).animate({opacity:0},void 0,t.hide),o.hasRendered&&(n&&t.attr({x:t.startXPos,y:t.startYPos}),t.placed=!0)}var s=[];e.compose=function(e){if(-1===s.indexOf(e)){var t=e.prototype;s.push(e),t.alignDataLabel=n,t.drawDataLabels=r,t.justifyDataLabel=i,t.setDataLabelStartPos=a}}}(r||(r={})),r}),e(t,"Series/Column/ColumnDataLabel.js",[t["Core/Series/DataLabel.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(r,e,t){var n,p=e.series,d=t.merge,h=t.pick;return function(e){function t(e,t,n,r,i){var o=this.chart.inverted,a=e.series,c=(a.xAxis?a.xAxis.len:this.chart.plotSizeX)||0;a=(a.yAxis?a.yAxis.len:this.chart.plotSizeY)||0;var s=e.dlBox||e.shapeArgs,l=h(e.below,e.plotY>h(this.translatedThreshold,a)),u=h(n.inside,!!this.options.stacking);s&&(0>(r=d(s)).y&&(r.height+=r.y,r.y=0),0<(s=r.y+r.height-a)&&s<r.height&&(r.height-=s),o&&(r={x:a-r.y-r.height,y:c-r.x-r.width,width:r.height,height:r.width}),u||(o?(r.x+=l?0:r.width,r.width=0):(r.y+=l?r.height:0,r.height=0))),n.align=h(n.align,!o||u?"center":l?"right":"left"),n.verticalAlign=h(n.verticalAlign,o||u?"middle":l?"top":"bottom"),p.prototype.alignDataLabel.call(this,e,t,n,r,i),n.inside&&e.contrastColor&&t.css({color:e.contrastColor})}var n=[];e.compose=function(e){r.compose(p),-1===n.indexOf(e)&&(n.push(e),e.prototype.alignDataLabel=t)}}(n||(n={})),n}),e(t,"Series/Bar/BarSeries.js",[t["Series/Column/ColumnSeries.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(n,e,t){var r,i=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=t.extend,a=t.merge;return t=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.data=void 0,e.options=void 0,e.points=void 0,e}return i(e,t),e.defaultOptions=a(n.defaultOptions,{}),e}(n),o(t.prototype,{inverted:!0}),e.registerSeriesType("bar",t),t}),e(t,"Series/Scatter/ScatterSeries.js",[t["Series/Column/ColumnSeries.js"],t["Series/Line/LineSeries.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,n,t,r){var i,o=_____WB$wombat$check$this$function_____(this)&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=r.addEvent,s=r.extend,l=r.merge;return r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.data=void 0,e.options=void 0,e.points=void 0,e}return o(e,t),e.prototype.applyJitter=function(){var l=_____WB$wombat$check$this$function_____(this),u=this.options.jitter,c=this.points.length;u&&this.points.forEach(function(a,s){["x","y"].forEach(function(e,t){var n="plot"+e.toUpperCase();if(u[e]&&!a.isNull){var r=l[e+"Axis"],i=u[e]*r.transA;if(r&&!r.isLog){var o=Math.max(0,a[n]-i);r=Math.min(r.len,a[n]+i),t=1e4*Math.sin(s+t*c),a[n]=o+(r-o)*(t-Math.floor(t)),"x"===e&&(a.clientX=a.plotX)}}})})},e.prototype.drawGraph=function(){this.options.lineWidth?t.prototype.drawGraph.call(this):this.graph&&(this.graph=this.graph.destroy())},e.defaultOptions=l(n.defaultOptions,{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 10px"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}}),e}(n),s(r.prototype,{drawTracker:e.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1}),a(r,"afterTranslate",function(){this.applyJitter()}),t.registerSeriesType("scatter",r),r}),e(t,"Series/CenteredUtilities.js",[t["Core/Globals.js"],t["Core/Series/Series.js"],t["Core/Utilities.js"]],function(e,u,t){var n,r,i=e.deg2rad,o=t.isNumber,c=t.pick,p=t.relativeLength;return(r=n||(n={})).getCenter=function(){var e=this.options,t=this.chart,n=2*(e.slicedOffset||0),r=t.plotWidth-2*n,i=t.plotHeight-2*n,o=e.center,a=Math.min(r,i),s=e.size,l=e.innerSize||0;for("string"==typeof s&&(s=parseFloat(s)),"string"==typeof l&&(l=parseFloat(l)),e=[c(o[0],"50%"),c(o[1],"50%"),c(s&&0>s?void 0:e.size,"100%"),c(l&&0>l?void 0:e.innerSize||0,"0%")],!t.angular||_____WB$wombat$check$this$function_____(this) instanceof u||(e[3]=0),o=0;4>o;++o)s=e[o],t=2>o||2===o&&/%$/.test(s),e[o]=p(s,[r,i,a,e[2]][o])+(t?n:0);return e[3]>e[2]&&(e[3]=e[2]),e},r.getStartAndEndRadians=function(e,t){return e=o(e)?e:0,t=o(t)&&t>e&&360>t-e?t:e+360,{start:i*(e+-90),end:i*(t+-90)}},n}),e(t,"Series/Pie/PiePoint.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/Series/Point.js"],t["Core/Utilities.js"]],function(e,t,n){var r,i=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=e.setAnimation,a=n.addEvent,s=n.defined;e=n.extend;var l=n.isNumber,u=n.pick,c=n.relativeLength;return t=function(n){function e(){var e=null!==n&&n.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.labelDistance=void 0,e.options=void 0,e.series=void 0,e}return i(e,n),e.prototype.getConnectorPath=function(){var e=this.labelPosition,t=this.series.options.dataLabels,n=this.connectorShapes,r=t.connectorShape;return n[r]&&(r=n[r]),r.call(this,{x:e.final.x,y:e.final.y,alignment:e.alignment},e.connectorPosition,t)},e.prototype.getTranslate=function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},e.prototype.haloPath=function(e){var t=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(t.x,t.y,t.r+e,t.r+e,{innerR:t.r-1,start:t.start,end:t.end})},e.prototype.init=function(){var t=_____WB$wombat$check$this$function_____(this);n.prototype.init.apply(this,arguments),this.name=u(this.name,"Slice");var e=function(e){t.slice("select"===e.type)};return a(this,"select",e),a(this,"unselect",e),_____WB$wombat$check$this$function_____(this)},e.prototype.isValid=function(){return l(this.y)&&0<=this.y},e.prototype.setVisible=function(t,e){var n=_____WB$wombat$check$this$function_____(this),r=this.series,i=r.chart,o=r.options.ignoreHiddenPoint;e=u(e,o),t!==this.visible&&(this.visible=this.options.visible=t=void 0===t?!this.visible:t,r.options.data[r.data.indexOf(this)]=this.options,["graphic","dataLabel","connector","shadowGroup"].forEach(function(e){n[e]&&n[e][t?"show":"hide"](t)}),this.legendItem&&i.legend.colorizeItem(this,t),t||"hover"!==this.state||this.setState(""),o&&(r.isDirty=!0),e&&i.redraw())},e.prototype.slice=function(e,t,n){var r=this.series;o(n,r.chart),u(t,!0),this.sliced=this.options.sliced=s(e)?e:!this.sliced,r.options.data[r.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate()),this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},e}(t),e(t.prototype,{connectorShapes:{fixedOffset:function(e,t,n){var r=t.breakAt;return t=t.touchingSliceAt,[["M",e.x,e.y],n.softConnector?["C",e.x+("left"===e.alignment?-5:5),e.y,2*r.x-t.x,2*r.y-t.y,r.x,r.y]:["L",r.x,r.y],["L",t.x,t.y]]},straight:function(e,t){return t=t.touchingSliceAt,[["M",e.x,e.y],["L",t.x,t.y]]},crookedLine:function(e,t,n){t=t.touchingSliceAt;var r=this.series,i=r.center[0],o=r.chart.plotWidth,a=r.chart.plotLeft;r=e.alignment;var s=this.shapeArgs.r;return n=c(n.crookDistance,1),n=["L",o="left"===r?i+s+(o+a-i-s)*(1-n):a+(i-s)*n,e.y],i=!0,("left"===r?o>e.x||o<t.x:o<e.x||o>t.x)&&(i=!1),e=[["M",e.x,e.y]],i&&e.push(n),e.push(["L",t.x,t.y]),e}}}),t}),e(t,"Series/Pie/PieSeries.js",[t["Series/CenteredUtilities.js"],t["Series/Column/ColumnSeries.js"],t["Core/Globals.js"],t["Core/Legend/LegendSymbol.js"],t["Series/Pie/PiePoint.js"],t["Core/Series/Series.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/Symbols.js"],t["Core/Utilities.js"]],function(e,t,n,r,i,o,l,u,a){var s,c=_____WB$wombat$check$this$function_____(this)&&this.__extends||(s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),y=e.getStartAndEndRadians;n=n.noop;var d=a.clamp,h=a.extend,b=a.fireEvent,p=a.merge,g=a.pick,v=a.relativeLength;return a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.center=void 0,e.data=void 0,e.maxLabelDistance=void 0,e.options=void 0,e.points=void 0,e}return c(e,t),e.prototype.animate=function(e){var r=_____WB$wombat$check$this$function_____(this),t=r.points,i=r.startAngleRad;e||t.forEach(function(e){var t=e.graphic,n=e.shapeArgs;t&&n&&(t.attr({r:g(e.startR,r.center&&r.center[3]/2),start:i,end:i}),t.animate({r:n.r,start:n.start,end:n.end},r.options.animation))})},e.prototype.drawEmpty=function(){var e=this.startAngleRad,t=this.endAngleRad,n=this.options;if(0===this.total&&this.center){var r=this.center[0],i=this.center[1];this.graph||(this.graph=this.chart.renderer.arc(r,i,this.center[1]/2,0,e,t).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:u.arc(r,i,this.center[2]/2,0,{start:e,end:t,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":n.borderWidth,fill:n.fillColor||"none",stroke:n.color||"#cccccc"})}else this.graph&&(this.graph=this.graph.destroy())},e.prototype.drawPoints=function(){var t=this.chart.renderer;this.points.forEach(function(e){e.graphic&&e.hasNewShapeType()&&(e.graphic=e.graphic.destroy()),e.graphic||(e.graphic=t[e.shapeType](e.shapeArgs).add(e.series.group),e.delayedRendering=!0)})},e.prototype.generatePoints=function(){t.prototype.generatePoints.call(this),this.updateTotals()},e.prototype.getX=function(e,t,n){var r=this.center,i=this.radii?this.radii[n.index]||0:r[2]/2;return e=Math.asin(d((e-r[1])/(i+n.labelDistance),-1,1)),r[0]+(t?-1:1)*Math.cos(e)*(i+n.labelDistance)+(0<n.labelDistance?(t?-1:1)*this.options.dataLabels.padding:0)},e.prototype.hasData=function(){return!!this.processedXData.length},e.prototype.redrawPoints=function(){var r,i,o,a,s=_____WB$wombat$check$this$function_____(this),l=s.chart,u=l.renderer,c=s.options.shadow;this.drawEmpty(),!c||s.shadowGroup||l.styledMode||(s.shadowGroup=u.g("shadow").attr({zIndex:-1}).add(s.group)),s.points.forEach(function(e){var t={};if(i=e.graphic,!e.isNull&&i){var n=void 0;a=e.shapeArgs,r=e.getTranslate(),l.styledMode||(n=e.shadowGroup,c&&!n&&(n=e.shadowGroup=u.g("shadow").add(s.shadowGroup)),n&&n.attr(r),o=s.pointAttribs(e,e.selected&&"select")),e.delayedRendering?(i.setRadialReference(s.center).attr(a).attr(r),l.styledMode||i.attr(o).attr({"stroke-linejoin":"round"}).shadow(c,n),e.delayedRendering=!1):(i.setRadialReference(s.center),l.styledMode||p(!0,t,o),p(!0,t,a,r),i.animate(t)),i.attr({visibility:e.visible?"inherit":"hidden"}),i.addClass(e.getClassName(),!0)}else i&&(e.graphic=i.destroy())})},e.prototype.sortByAngle=function(e,n){e.sort(function(e,t){return void 0!==e.angle&&(t.angle-e.angle)*n})},e.prototype.translate=function(e){this.generatePoints();var t=this.options,n=t.slicedOffset,c=n+(t.borderWidth||0),r=y(t.startAngle,t.endAngle),p=this.startAngleRad=r.start;r=(this.endAngleRad=r.end)-p;var d=this.points,h=t.dataLabels.distance;t=t.ignoreHiddenPoint;var i,f=d.length,m=0;for(e||(this.center=e=this.getCenter()),i=0;i<f;i++){var o=d[i],a=p+m*r;!o.isValid()||t&&!o.visible||(m+=o.percentage/100);var s=p+m*r,l={x:e[0],y:e[1],r:e[2]/2,innerR:e[3]/2,start:Math.round(1e3*a)/1e3,end:Math.round(1e3*s)/1e3};o.shapeType="arc",o.shapeArgs=l,o.labelDistance=g(o.options.dataLabels&&o.options.dataLabels.distance,h),o.labelDistance=v(o.labelDistance,l.r),this.maxLabelDistance=Math.max(this.maxLabelDistance||0,o.labelDistance),(s=(s+a)/2)>1.5*Math.PI?s-=2*Math.PI:s<-Math.PI/2&&(s+=2*Math.PI),o.slicedTranslation={translateX:Math.round(Math.cos(s)*n),translateY:Math.round(Math.sin(s)*n)},l=Math.cos(s)*e[2]/2;var u=Math.sin(s)*e[2]/2;o.tooltipPos=[e[0]+.7*l,e[1]+.7*u],o.half=s<-Math.PI/2||s>Math.PI/2?1:0,o.angle=s,a=Math.min(c,o.labelDistance/5),o.labelPosition={natural:{x:e[0]+l+Math.cos(s)*o.labelDistance,y:e[1]+u+Math.sin(s)*o.labelDistance},final:{},alignment:0>o.labelDistance?"center":o.half?"right":"left",connectorPosition:{breakAt:{x:e[0]+l+Math.cos(s)*a,y:e[1]+u+Math.sin(s)*a},touchingSliceAt:{x:e[0]+l,y:e[1]+u}}}}b(this,"afterTranslate")},e.prototype.updateTotals=function(){var e,t=this.points,n=t.length,r=this.options.ignoreHiddenPoint,i=0;for(e=0;e<n;e++){var o=t[e];!o.isValid()||r&&!o.visible||(i+=o.y)}for(this.total=i,e=0;e<n;e++)(o=t[e]).percentage=0<i&&(o.visible||!r)?o.y/i*100:0,o.total=i},e.defaultOptions=p(o.defaultOptions,{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,connectorPadding:5,connectorShape:"fixedOffset",crookDistance:"70%",distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0},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}}}),e}(o),h(a.prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawLegendSymbol:r.drawRectangle,drawTracker:t.prototype.drawTracker,getCenter:e.getCenter,getSymbol:n,isCartesian:!1,noSharedTooltip:!0,pointAttribs:t.prototype.pointAttribs,pointClass:i,requireSorting:!1,searchPoint:n,trackerGroups:["group","dataLabelsGroup"]}),l.registerSeriesType("pie",a),a}),e(t,"Series/Pie/PieDataLabel.js",[t["Core/Series/DataLabel.js"],t["Core/Globals.js"],t["Core/Renderer/RendererUtilities.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(a,e,t,n,r){var i,l=e.noop,L=t.distribute,M=n.series,I=r.arrayMax,s=r.clamp,O=r.defined,N=r.merge,D=r.pick,u=r.relativeLength;return function(e){function t(){var s,r,n,l,g,u,y,c,p,b,v,w,d=_____WB$wombat$check$this$function_____(this),e=d.data,h=d.chart,f=d.options.dataLabels||{},E=f.connectorPadding,S=h.plotWidth,T=h.plotHeight,x=h.plotLeft,t=Math.round(h.chartWidth/3),_=d.center,C=_[2]/2,A=_[1],i=[[],[]],m=[0,0,0,0],k=d.dataLabelPositioners;d.visible&&(f.enabled||d._hasPointLabels)&&(e.forEach(function(e){e.dataLabel&&e.visible&&e.dataLabel.shortened&&(e.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),e.dataLabel.shortened=!1)}),M.prototype.drawDataLabels.apply(d),e.forEach(function(e){e.dataLabel&&(e.visible?(i[e.half].push(e),e.dataLabel._pos=null,!O(f.style.width)&&!O(e.options.dataLabels&&e.options.dataLabels.style&&e.options.dataLabels.style.width)&&e.dataLabel.getBBox().width>t&&(e.dataLabel.css({width:Math.round(.7*t)+"px"}),e.dataLabel.shortened=!0)):(e.dataLabel=e.dataLabel.destroy(),e.dataLabels&&1===e.dataLabels.length&&delete e.dataLabels))}),i.forEach(function(e,t){var n,r=e.length,i=[];if(r){if(d.sortByAngle(e,t-.5),0<d.maxLabelDistance){var o=Math.max(0,A-C-d.maxLabelDistance),a=Math.min(A+C+d.maxLabelDistance,h.plotHeight);e.forEach(function(e){0<e.labelDistance&&e.dataLabel&&(e.top=Math.max(0,A-C-e.labelDistance),e.bottom=Math.min(A+C+e.labelDistance,h.plotHeight),n=e.dataLabel.getBBox().height||21,e.distributeBox={target:e.labelPosition.natural.y-e.top+n/2,size:n,rank:e.y},i.push(e.distributeBox))}),L(i,o=a+n-o,o/5)}for(v=0;v<r;v++){if(s=e[v],u=s.labelPosition,l=s.dataLabel,b=!1===s.visible?"hidden":"inherit",p=o=u.natural.y,i&&O(s.distributeBox)&&(void 0===s.distributeBox.pos?b="hidden":(y=s.distributeBox.size,p=k.radialDistributionY(s))),delete s.positionIndex,f.justify)c=k.justify(s,C,_);else switch(f.alignTo){case"connectors":c=k.alignToConnectors(e,t,S,x);break;case"plotEdges":c=k.alignToPlotEdges(l,t,S,x);break;default:c=k.radialDistributionX(d,s,p,o)}l._attr={visibility:b,align:u.alignment},w=s.options.dataLabels||{},l._pos={x:c+D(w.x,f.x)+({left:E,right:-E}[u.alignment]||0),y:p+D(w.y,f.y)-10},u.final.x=c,u.final.y=p,D(f.crop,!0)&&(g=l.getBBox().width,o=null,c-g<E&&1===t?(o=Math.round(g-c+E),m[3]=Math.max(o,m[3])):c+g>S-E&&0===t&&(o=Math.round(c+g-S+E),m[1]=Math.max(o,m[1])),0>p-y/2?m[0]=Math.max(Math.round(y/2-p),m[0]):p+y/2>T&&(m[2]=Math.max(Math.round(p+y/2-T),m[2])),l.sideOverflow=o)}}}),0===I(m)||this.verifyDataLabelOverflow(m))&&(this.placeDataLabels(),this.points.forEach(function(e){var t;w=N(f,e.options.dataLabels),(r=D(w.connectorWidth,1))&&(n=e.connector,(l=e.dataLabel)&&l._pos&&e.visible&&0<e.labelDistance?(b=l._attr.visibility,(t=!n)&&(e.connector=n=h.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+e.colorIndex+(e.className?" "+e.className:"")).add(d.dataLabelsGroup),h.styledMode||n.attr({"stroke-width":r,stroke:w.connectorColor||e.color||"#666666"})),n[t?"attr":"animate"]({d:e.getConnectorPath()}),n.attr("visibility",b)):n&&(e.connector=n.destroy()))}))}function n(){this.points.forEach(function(e){var t,n=e.dataLabel;n&&e.visible&&((t=n._pos)?(n.sideOverflow&&(n._attr.width=Math.max(n.getBBox().width-n.sideOverflow,0),n.css({width:n._attr.width+"px",textOverflow:(this.options.dataLabels.style||{}).textOverflow||"ellipsis"}),n.shortened=!0),n.attr(n._attr),n[n.moved?"animate":"attr"](t),n.moved=!0):n&&n.attr({y:-9999})),delete e.distributeBox},_____WB$wombat$check$this$function_____(this))}function r(e){var t=this.center,n=this.options,r=n.center,i=n.minSize||80,o=null!==n.size;if(!o){if(null!==r[0])var a=Math.max(t[2]-Math.max(e[1],e[3]),i);else a=Math.max(t[2]-e[1]-e[3],i),t[0]+=(e[3]-e[1])/2;null!==r[1]?a=s(a,i,t[2]-Math.max(e[0],e[2])):(a=s(a,i,t[2]-e[0]-e[2]),t[1]+=(e[0]-e[2])/2),a<t[2]?(t[2]=a,t[3]=Math.min(u(n.innerSize||0,a),a),this.translate(t),this.drawDataLabels&&this.drawDataLabels()):o=!0}return o}var i=[],o={radialDistributionY:function(e){return e.top+e.distributeBox.pos},radialDistributionX:function(e,t,n,r){return e.getX(n<t.top+2||n>t.bottom-2?r:n,t.half,t)},justify:function(e,t,n){return n[0]+(e.half?-1:1)*(t+e.labelDistance)},alignToPlotEdges:function(e,t,n,r){return e=e.getBBox().width,t?e+r:n-e-r},alignToConnectors:function(e,t,n,r){var i,o=0;return e.forEach(function(e){(i=e.dataLabel.getBBox().width)>o&&(o=i)}),t?o+r:n-o-r}};e.compose=function(e){a.compose(M),-1===i.indexOf(e)&&(i.push(e),(e=e.prototype).dataLabelPositioners=o,e.alignDataLabel=l,e.drawDataLabels=t,e.placeDataLabels=n,e.verifyDataLabelOverflow=r)}}(i||(i={})),i}),e(t,"Extensions/OverlappingDataLabels.js",[t["Core/Chart/Chart.js"],t["Core/Utilities.js"]],function(e,t){function p(e,t){var n=!1;if(e){var r=e.newOpacity;e.oldOpacity!==r&&(e.alignAttr&&e.placed?(e[r?"removeClass":"addClass"]("highcharts-data-label-hidden"),n=!0,e.alignAttr.opacity=r,e[e.isOld?"animate":"attr"](e.alignAttr,null,function(){t.styledMode||e.css({pointerEvents:r?"auto":"none"})}),d(t,"afterHideOverlappingLabel")):e.attr({opacity:r})),e.isOld=!0}return n}var n=t.addEvent,d=t.fireEvent,o=t.isArray,h=t.isNumber,a=t.objectEach,s=t.pick;n(e,"render",function(){var r=_____WB$wombat$check$this$function_____(this),i=[];(this.labelCollectors||[]).forEach(function(e){i=i.concat(e())}),(this.yAxis||[]).forEach(function(e){e.stacking&&e.options.stackLabels&&!e.options.stackLabels.allowOverlap&&a(e.stacking.stacks,function(e){a(e,function(e){e.label&&"hidden"!==e.label.visibility&&i.push(e.label)})})}),(this.series||[]).forEach(function(e){var t=e.options.dataLabels;e.visible&&(!1!==t.enabled||e._hasPointLabels)&&((t=function(e){return e.forEach(function(n){n.visible&&(o(n.dataLabels)?n.dataLabels:n.dataLabel?[n.dataLabel]:[]).forEach(function(e){var t=e.options;e.labelrank=s(t.labelrank,n.labelrank,n.shapeArgs&&n.shapeArgs.height),t.allowOverlap?(e.oldOpacity=e.opacity,e.newOpacity=1,p(e,r)):i.push(e)})})})(e.nodes||[]),t(e.points))}),this.hideOverlappingLabels(i)}),e.prototype.hideOverlappingLabels=function(e){var t,n,r,i=_____WB$wombat$check$this$function_____(this),o=e.length,c=i.renderer,a=!1,s=function(e){var t,n,r=e.box?0:e.padding||0,i=t=0;if(e&&(!e.alignAttr||e.placed)){var o=e.alignAttr||{x:e.attr("x"),y:e.attr("y")},a=e.parentGroup;e.width||(t=e.getBBox(),e.width=t.width,e.height=t.height,t=c.fontMetrics(null,e.element).h);var s=e.width-2*r;return(n={left:"0",center:"0.5",right:"1"}[e.alignValue])?i=+n*s:h(e.x)&&Math.round(e.x)!==e.translateX&&(i=e.x-e.translateX),{x:o.x+(a.translateX||0)+r-(i||0),y:o.y+(a.translateY||0)+r-t,width:e.width-2*r,height:e.height-2*r}}};for(n=0;n<o;n++)(t=e[n])&&(t.oldOpacity=t.opacity,t.newOpacity=1,t.absoluteBox=s(t));for(e.sort(function(e,t){return(t.labelrank||0)-(e.labelrank||0)}),n=0;n<o;n++){var l=(s=e[n])&&s.absoluteBox;for(t=n+1;t<o;++t){var u=(r=e[t])&&r.absoluteBox;!l||!u||s===r||0===s.newOpacity||0===r.newOpacity||u.x>=l.x+l.width||u.x+u.width<=l.x||u.y>=l.y+l.height||u.y+u.height<=l.y||((s.labelrank<r.labelrank?s:r).newOpacity=0)}}e.forEach(function(e){p(e,i)&&(a=!0)}),a&&d(i,"afterHideAllOverlappingLabels")}}),e(t,"Core/Responsive.js",[t["Core/Utilities.js"]],function(e){var t,r=e.extend,a=e.find,l=e.isArray,u=e.isObject,s=e.merge,c=e.objectEach,i=e.pick,p=e.splat,d=e.uniqueKey;return function(e){var t=[];e.compose=function(e){return-1===t.indexOf(e)&&(t.push(e),r(e.prototype,n.prototype)),e};var n=function(){function e(){}return e.prototype.currentOptions=function(e){var s=_____WB$wombat$check$this$function_____(this),t={};return function n(e,r,i,o){var a;c(e,function(e,t){if(!o&&-1<s.collectionsWithUpdate.indexOf(t)&&r[t])for(e=p(e),i[t]=[],a=0;a<Math.max(e.length,r[t].length);a++)r[t][a]&&(void 0===e[a]?i[t][a]=r[t][a]:(i[t][a]={},n(e[a],r[t][a],i[t][a],o+1)));else u(e)?(i[t]=l(e)?[]:{},n(e,r[t]||{},i[t],o+1)):i[t]=void 0===r[t]?null:r[t]})}(e,this.options,t,0),t},e.prototype.matchResponsiveRule=function(e,t){var n=e.condition;(n.callback||function(){return this.chartWidth<=i(n.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=i(n.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=i(n.minWidth,0)&&this.chartHeight>=i(n.minHeight,0)}).call(this)&&t.push(e._id)},e.prototype.setResponsive=function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=this.options.responsive,i=this.currentResponsive,o=[];!t&&r&&r.rules&&r.rules.forEach(function(e){void 0===e._id&&(e._id=d()),n.matchResponsiveRule(e,o)},_____WB$wombat$check$this$function_____(this)),(t=s.apply(void 0,o.map(function(t){return a((r||{}).rules||[],function(e){return e._id===t})}).map(function(e){return e&&e.chartOptions}))).isResponsiveOptions=!0,(o=o.toString()||void 0)!==(i&&i.ruleIds)&&(i&&this.update(i.undoOptions,e,!0),o?((i=this.currentOptions(t)).isResponsiveOptions=!0,this.currentResponsive={ruleIds:o,mergedOptions:t,undoOptions:i},this.update(t,e,!0)):this.currentResponsive=void 0)},e}()}(t||(t={})),t}),e(t,"masters/highcharts.src.js",[t["Core/Globals.js"],t["Core/Utilities.js"],t["Core/DefaultOptions.js"],t["Core/Animation/Fx.js"],t["Core/Animation/AnimationUtilities.js"],t["Core/Renderer/HTML/AST.js"],t["Core/FormatUtilities.js"],t["Core/Renderer/RendererUtilities.js"],t["Core/Renderer/SVG/SVGElement.js"],t["Core/Renderer/SVG/SVGRenderer.js"],t["Core/Renderer/HTML/HTMLElement.js"],t["Core/Renderer/HTML/HTMLRenderer.js"],t["Core/Axis/Axis.js"],t["Core/Axis/DateTimeAxis.js"],t["Core/Axis/LogarithmicAxis.js"],t["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],t["Core/Axis/Tick.js"],t["Core/Tooltip.js"],t["Core/Series/Point.js"],t["Core/Pointer.js"],t["Core/MSPointer.js"],t["Core/Legend/Legend.js"],t["Core/Chart/Chart.js"],t["Core/Series/Series.js"],t["Core/Series/SeriesRegistry.js"],t["Series/Column/ColumnSeries.js"],t["Series/Column/ColumnDataLabel.js"],t["Series/Pie/PieSeries.js"],t["Series/Pie/PieDataLabel.js"],t["Core/Series/DataLabel.js"],t["Core/Responsive.js"],t["Core/Color/Color.js"],t["Core/Time.js"]],function(e,t,n,r,i,c,o,p,a,s,d,h,l,f,m,g,y,b,v,w,E,S,u,T,x,_,C,A,k,M,O,D,L){return e.animate=i.animate,e.animObject=i.animObject,e.getDeferredAnimation=i.getDeferredAnimation,e.setAnimation=i.setAnimation,e.stop=i.stop,e.timers=r.timers,e.AST=c,e.Axis=l,e.Chart=u,e.chart=u.chart,e.Fx=r,e.Legend=S,e.PlotLineOrBand=g,e.Point=v,e.Pointer=E.isRequired()?E:w,e.Series=T,e.SVGElement=a,e.SVGRenderer=s,e.Tick=y,e.Time=L,e.Tooltip=b,e.Color=D,e.color=D.parse,h.compose(s),d.compose(a),e.defaultOptions=n.defaultOptions,e.getOptions=n.getOptions,e.time=n.defaultTime,e.setOptions=n.setOptions,e.dateFormat=o.dateFormat,e.format=o.format,e.numberFormat=o.numberFormat,e.addEvent=t.addEvent,e.arrayMax=t.arrayMax,e.arrayMin=t.arrayMin,e.attr=t.attr,e.clearTimeout=t.clearTimeout,e.correctFloat=t.correctFloat,e.createElement=t.createElement,e.css=t.css,e.defined=t.defined,e.destroyObjectProperties=t.destroyObjectProperties,e.discardElement=t.discardElement,e.distribute=p.distribute,e.erase=t.erase,e.error=t.error,e.extend=t.extend,e.extendClass=t.extendClass,e.find=t.find,e.fireEvent=t.fireEvent,e.getMagnitude=t.getMagnitude,e.getStyle=t.getStyle,e.inArray=t.inArray,e.isArray=t.isArray,e.isClass=t.isClass,e.isDOMElement=t.isDOMElement,e.isFunction=t.isFunction,e.isNumber=t.isNumber,e.isObject=t.isObject,e.isString=t.isString,e.keys=t.keys,e.merge=t.merge,e.normalizeTickInterval=t.normalizeTickInterval,e.objectEach=t.objectEach,e.offset=t.offset,e.pad=t.pad,e.pick=t.pick,e.pInt=t.pInt,e.relativeLength=t.relativeLength,e.removeEvent=t.removeEvent,e.seriesType=x.seriesType,e.splat=t.splat,e.stableSort=t.stableSort,e.syncTimeout=t.syncTimeout,e.timeUnits=t.timeUnits,e.uniqueKey=t.uniqueKey,e.useSerialIds=t.useSerialIds,e.wrap=t.wrap,C.compose(_),M.compose(T),f.compose(l),m.compose(l),k.compose(A),g.compose(l),O.compose(u),e}),t["masters/highcharts.src.js"]._modules=t,t["masters/highcharts.src.js"]},n?(t.default=t,n=e.document?t(e):t):"function"==typeof define&&define.amd?define("highcharts/highcharts",function(){return t(e)}):(e.Highcharts&&e.Highcharts.error(16,!0),e.Highcharts=t(e));var r,i={};r=function(e){function t(e,t,n,r){e.hasOwnProperty(t)||(e[t]=r.apply(null,n))}t(e=e?e._modules:{},"Extensions/Pane.js",[e["Core/Chart/Chart.js"],e["Series/CenteredUtilities.js"],e["Core/Globals.js"],e["Core/Pointer.js"],e["Core/Utilities.js"]],function(e,t,n,r,i){function a(e,t,n){return Math.sqrt(Math.pow(e-n[0],2)+Math.pow(t-n[1],2))<=n[2]/2}var o=i.addEvent,s=i.extend,l=i.merge,u=i.pick,c=i.splat;return e.prototype.collectionsWithUpdate.push("pane"),i=function(){function e(e,t){this.options=this.chart=this.center=this.background=void 0,this.coll="pane",this.defaultOptions={center:["50%","50%"],size:"85%",innerSize:"0%",startAngle:0},this.defaultBackgroundOptions={shape:"circle",borderWidth:1,borderColor:"#cccccc",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#ffffff"],[1,"#e6e6e6"]]},from:-Number.MAX_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"},this.init(e,t)}return e.prototype.init=function(e,t){this.chart=t,this.background=[],t.pane.push(this),this.setOptions(e)},e.prototype.setOptions=function(e){this.options=l(this.defaultOptions,this.chart.angular?{background:{}}:void 0,e)},e.prototype.render=function(){var e=this.options,t=this.options.background,n=this.chart.renderer;if(this.group||(this.group=n.g("pane-group").attr({zIndex:e.zIndex||0}).add()),this.updateCenter(),t)for(t=c(t),e=Math.max(t.length,this.background.length||0),n=0;n<e;n++)t[n]&&this.axis?this.renderBackground(l(this.defaultBackgroundOptions,t[n]),n):this.background[n]&&(this.background[n]=this.background[n].destroy(),this.background.splice(n,1))},e.prototype.renderBackground=function(e,t){var n="animate",r={class:"highcharts-pane "+(e.className||"")};this.chart.styledMode||s(r,{fill:e.backgroundColor,stroke:e.borderColor,"stroke-width":e.borderWidth}),this.background[t]||(this.background[t]=this.chart.renderer.path().add(this.group),n="attr"),this.background[t][n]({d:this.axis.getPlotBandPath(e.from,e.to,e)}).attr(r)},e.prototype.updateCenter=function(e){this.center=(e||this.axis||{}).center=t.getCenter.call(this)},e.prototype.update=function(e,t){l(!0,this.options,e),this.setOptions(this.options),this.render(),this.chart.axes.forEach(function(e){e.pane===_____WB$wombat$check$this$function_____(this)&&(e.pane=null,e.update({},t))},_____WB$wombat$check$this$function_____(this))},e}(),e.prototype.getHoverPane=function(r){var i,o=_____WB$wombat$check$this$function_____(this);return r&&o.pane.forEach(function(e){var t=r.chartX-o.plotLeft,n=r.chartY-o.plotTop;a(o.inverted?n:t,o.inverted?t:n,e.center)&&(i=e)}),i},o(e,"afterIsInsidePlot",function(t){this.polar&&(t.isInsidePlot=this.pane.some(function(e){return a(t.x,t.y,e.center)}))}),o(r,"beforeGetHoverData",function(t){var n=this.chart;n.polar?(n.hoverPane=n.getHoverPane(t),t.filter=function(e){return e.visible&&!(!t.shared&&e.directTouch)&&u(e.options.enableMouseTracking,!0)&&(!n.hoverPane||e.xAxis.pane===n.hoverPane)}):n.hoverPane=void 0}),o(r,"afterGetHoverData",function(e){var t=this.chart;e.hoverPoint&&e.hoverPoint.plotX&&e.hoverPoint.plotY&&t.hoverPane&&!a(e.hoverPoint.plotX,e.hoverPoint.plotY,t.hoverPane.center)&&(e.hoverPoint=void 0)}),n.Pane=i,n.Pane}),t(e,"Core/Axis/RadialAxis.js",[e["Core/Axis/AxisDefaults.js"],e["Core/DefaultOptions.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(M,n,r,e){var t,R=n.defaultOptions,O=r.noop,D=e.addEvent,L=e.correctFloat,I=e.defined,P=e.extend,B=e.fireEvent,N=e.merge,j=e.pick,F=e.relativeLength,z=e.wrap;return function(e){function t(){this.autoConnect=this.isCircular&&void 0===j(this.userMax,this.options.max)&&L(this.endAngleRad-this.startAngleRad)===L(2*Math.PI),!this.isCircular&&this.chart.inverted&&this.max++,this.autoConnect&&(this.max+=(this.categories?1:this.pointRange)||this.closestPointRange||0)}function n(){var t=_____WB$wombat$check$this$function_____(this);return function(){if(t.isRadial&&t.tickPositions&&t.options.labels&&!0!==t.options.labels.allowOverlap)return t.tickPositions.map(function(e){return t.ticks[e]&&t.ticks[e].label}).filter(function(e){return!!e})}}function c(){return O}function r(e,t,n){var r=this.pane.center,i=e.value;if(this.isCircular){if(I(i))e.point&&(o=e.point.shapeArgs||{}).start&&(i=this.chart.inverted?this.translate(e.point.rectPlotY,!0):e.point.x);else{var o=e.chartX||0,a=e.chartY||0;i=this.translate(Math.atan2(a-n,o-t)-this.startAngleRad,!0)}o=(e=this.getPosition(i)).x,a=e.y}else I(i)||(o=e.chartX,a=e.chartY),I(o)&&I(a)&&(n=r[1]+this.chart.plotTop,i=this.translate(Math.min(Math.sqrt(Math.pow(o-t,2)+Math.pow(a-n,2)),r[2]/2)-r[3]/2,!0));return[i,o||0,a||0]}function i(e,t,n){e=this.pane.center;var r=this.chart,i=this.left||0,o=_____WB$wombat$check$this$function_____(this).top||0,a=j(t,e[2]/2-this.offset);return void 0===n&&(n=this.horiz?0:this.center&&-this.center[3]/2),n&&(a+=n),this.isCircular||void 0!==t?((t=this.chart.renderer.symbols.arc(i+e[0],o+e[1],a,a,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0})).xBounds=[i+e[0]],t.yBounds=[o+e[1]-a]):(t=this.postTranslate(this.angleRad,a),t=[["M",this.center[0]+r.plotLeft,this.center[1]+r.plotTop],["L",t.x,t.y]]),t}function o(){this.constructor.prototype.getOffset.call(this),this.chart.axisOffset[this.side]=0}function a(e,t,n){var c=this.chart,r=function(e){if("string"==typeof e){var t=parseInt(e,10);return h.test(e)&&(t=t*p/100),t}return e},i=this.center,o=this.startAngleRad,p=i[2]/2,a=Math.min(this.offset,0),s=this.left||0,d=_____WB$wombat$check$this$function_____(this).top||0,h=/%$/,l=this.isCircular,u=j(r(n.outerRadius),p),f=r(n.innerRadius);if(r=j(r(n.thickness),10),"polygon"===this.options.gridLineInterpolation)a=this.getPlotLinePath({value:e}).concat(this.getPlotLinePath({value:t,reverse:!0}));else{if(e=Math.max(e,this.min),t=Math.min(t,this.max),e=this.translate(e),t=this.translate(t),l||(u=e||0,f=t||0),"circle"!==n.shape&&l)n=o+(e||0),o+=t||0;else{n=-Math.PI/2,o=1.5*Math.PI;var m=!0}u-=a,a=c.renderer.symbols.arc(s+i[0],d+i[1],u,u,{start:Math.min(n,o),end:Math.max(n,o),innerR:j(f,u-(r-a)),open:m}),l&&(l=(o+n)/2,s=s+i[0]+i[2]/2*Math.cos(l),a.xBounds=l>-Math.PI/2&&l<Math.PI/2?[s,c.plotWidth]:[0,s],a.yBounds=[d+i[1]+i[2]/2*Math.sin(l)],a.yBounds[0]+=l>-Math.PI&&0>l||l>Math.PI?-10:10)}return a}function l(c){var p=_____WB$wombat$check$this$function_____(this),e=this.pane.center,t=this.chart,d=t.inverted,n=c.reverse,r=this.pane.options.background?this.pane.options.background[0]||this.pane.options.background:{},h=r.innerRadius||"0%",f=r.outerRadius||"100%",i=e[0]+t.plotLeft,o=e[1]+t.plotTop,m=this.height,g=c.isCrosshair;r=e[3]/2;var a,s=c.value,l=this.getPosition(s),u=l.x;if(l=l.y,g&&(s=(l=this.getCrosshairPosition(c,i,o))[0],u=l[1],l=l[2]),this.isCircular)s=Math.sqrt(Math.pow(u-i,2)+Math.pow(l-o,2)),n="string"==typeof h?F(h,1):h/s,t="string"==typeof f?F(f,1):f/s,e&&r&&(n<(r/=s)&&(n=r),t<r&&(t=r)),e=[["M",i+n*(u-i),o-n*(o-l)],["L",u-(1-t)*(u-i),l+(1-t)*(o-l)]];else if((s=this.translate(s))&&(0>s||s>m)&&(s=0),"circle"===this.options.gridLineInterpolation)e=this.getLinePath(0,s,r);else if(e=[],t[d?"yAxis":"xAxis"].forEach(function(e){e.pane===p.pane&&(a=e)}),a)for(i=a.tickPositions,a.autoConnect&&(i=i.concat([i[0]])),n&&(i=i.slice().reverse()),s&&(s+=r),o=0;o<i.length;o++)r=a.getPosition(i[o],s),e.push(o?["L",r.x,r.y]:["M",r.x,r.y]);return e}function u(e,t){return e=this.translate(e),this.postTranslate(this.isCircular?e:this.angleRad,j(this.isCircular?t:0>e?0:e,this.center[2]/2)-this.offset)}function d(){var e=this.center,t=this.chart,n=this.options.title;return{x:t.plotLeft+e[0]+(n.x||0),y:t.plotTop+e[1]-{high:.5,middle:.25,low:0}[n.align]*e[2]+(n.y||0)}}function p(e){e.beforeSetTickPositions=t,e.createLabelCollector=n,e.getCrosshairPosition=r,e.getLinePath=i,e.getOffset=o,e.getPlotBandPath=a,e.getPlotLinePath=l,e.getPosition=u,e.getTitlePosition=d,e.postTranslate=w,e.setAxisSize=S,e.setAxisTranslation=T,e.setOptions=x}function h(){var e=this.chart,t=this.options,n=this.pane,r=n&&n.options;e.angular&&this.isXAxis||!n||!e.angular&&!e.polar||(this.angleRad=(t.angle||0)*Math.PI/180,this.startAngleRad=(r.startAngle-90)*Math.PI/180,this.endAngleRad=(j(r.endAngle,r.startAngle+360)-90)*Math.PI/180,this.offset=t.offset||0)}function f(e){this.isRadial&&(e.align=void 0,e.preventDefault())}function m(){if(this.chart&&this.chart.labelCollectors){var e=this.labelCollector?this.chart.labelCollectors.indexOf(this.labelCollector):-1;0<=e&&this.chart.labelCollectors.splice(e,1)}}function g(e){var t,n=this.chart,r=n.inverted,i=n.angular,o=n.polar,a=this.isXAxis,s=this.coll,l=i&&a,u=n.options;e=e.userOptions.pane||0,e=this.pane=n.pane&&n.pane[e],"colorAxis"===s?this.isRadial=!1:(i?(l?(this.isHidden=!0,this.createLabelCollector=c,this.getOffset=O,this.render=this.redraw=E,this.setTitle=this.setCategories=this.setScale=O):p(this),(t=!a)&&(this.defaultPolarOptions=A)):o&&(p(this),this.defaultPolarOptions=(t=this.horiz)?C:N("xAxis"===s?M.defaultXAxisOptions:M.defaultYAxisOptions,k),r&&"yAxis"===s&&(this.defaultPolarOptions.stackLabels=M.defaultYAxisOptions.stackLabels,this.defaultPolarOptions.reversedStacks=!0)),i||o?(this.isRadial=!0,u.chart.zoomType=null,this.labelCollector||(this.labelCollector=this.createLabelCollector()),this.labelCollector&&n.labelCollectors.push(this.labelCollector)):this.isRadial=!1,e&&t&&(e.axis=_____WB$wombat$check$this$function_____(this)),this.isCircular=t)}function y(){this.isRadial&&this.beforeSetTickPositions()}function b(c){var e=this.label;if(e){var t=this.axis,n=e.getBBox(),r=t.options.labels,i=(t.translate(this.pos)+t.startAngleRad+Math.PI/2)/Math.PI*180%360,o=Math.round(i),p=I(r.y)?0:.3*-n.height,d=r.y,h=20,a=r.align,s="end",l=0>o?o+360:o,u=l,f=0,m=0;if(t.isRadial){var g=t.getPosition(this.pos,t.center[2]/2+F(j(r.distance,-25),t.center[2]/2,-t.center[2]/2));"auto"===r.rotation?e.attr({rotation:i}):I(d)||(d=t.chart.renderer.fontMetrics(e.styles&&e.styles.fontSize).b-n.height/2),I(a)||(t.isCircular?(n.width>t.len*t.tickInterval/(t.max-t.min)&&(h=0),a=i>h&&i<180-h?"left":i>180+h&&i<360-h?"right":"center"):a="center",e.attr({align:a})),"auto"===a&&2===t.tickPositions.length&&t.isCircular&&(90<l&&180>l?l=180-l:270<l&&360>=l&&(l=540-l),180<u&&360>=u&&(u=360-u),t.pane.options.startAngle!==o&&t.pane.options.startAngle!==o+360&&t.pane.options.startAngle!==o-360||(s="start"),a=-90<=o&&90>=o||-360<=o&&-270>=o||270<=o&&360>=o?"start"===s?"right":"left":"start"===s?"left":"right",70<u&&110>u&&(a="center"),15>l||180<=l&&195>l?f=.3*n.height:15<=l&&35>=l?f="start"===s?0:.75*n.height:195<=l&&215>=l?f="start"===s?.75*n.height:0:35<l&&90>=l?f="start"===s?.25*-n.height:n.height:215<l&&270>=l&&(f="start"===s?n.height:.25*-n.height),15>u?m="start"===s?.15*-n.height:.15*n.height:165<u&&180>=u&&(m="start"===s?.15*n.height:.15*-n.height),e.attr({align:a}),e.translate(m,f+p)),c.pos.x=g.x+(r.x||0),c.pos.y=g.y+(d||0)}}}function v(e){this.axis.getPosition&&P(e.pos,this.axis.getPosition(this.pos))}function w(e,t){var n=this.chart,r=this.center;return e=this.startAngleRad+e,{x:n.plotLeft+r[0]+Math.cos(e)*t,y:n.plotTop+r[1]+Math.sin(e)*t}}function E(){this.isDirty=!1}function S(){if(this.constructor.prototype.setAxisSize.call(this),this.isRadial){this.pane.updateCenter(this);var e=this.center=this.pane.center.slice();if(this.isCircular)this.sector=this.endAngleRad-this.startAngleRad;else{var t=this.postTranslate(this.angleRad,e[3]/2);e[0]=t.x-this.chart.plotLeft,e[1]=t.y-this.chart.plotTop}this.len=this.width=this.height=(e[2]-e[3])*j(this.sector,1)/2}}function T(){this.constructor.prototype.setAxisTranslation.call(this),this.center&&(this.transA=this.isCircular?(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1):(this.center[2]-this.center[3])/2/(this.max-this.min||1),this.minPixelPadding=this.isXAxis?this.transA*this.minPointOffset:0)}function x(e){(e=this.options=N(this.constructor.defaultOptions,this.defaultPolarOptions,R[this.coll],e)).plotBands||(e.plotBands=[]),B(this,"afterSetOptions")}function _(e,t,n,r,i,o,a){var s=this.axis;return t=s.isRadial?["M",t,n,"L",(e=s.getPosition(this.pos,s.center[2]/2+r)).x,e.y]:e.call(this,t,n,r,i,o,a)}var s=[],C={gridLineWidth:1,labels:{align:void 0,distance:15,x:0,y:void 0,style:{textOverflow:"none"}},maxPadding:0,minPadding:0,showLastLabel:!1,tickLength:0},A={labels:{align:"center",x:0,y:void 0},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",minorTickWidth:1,tickLength:10,tickPosition:"inside",tickWidth:2,title:{rotation:0},zIndex:2},k={gridLineInterpolation:"circle",gridLineWidth:1,labels:{align:"right",x:-3,y:-2},showLastLabel:!1,title:{x:4,text:null,rotation:90}};e.compose=function(e,t){return-1===s.indexOf(e)&&(s.push(e),D(e,"afterInit",h),D(e,"autoLabelAlign",f),D(e,"destroy",m),D(e,"init",g),D(e,"initialAxisTranslation",y)),-1===s.indexOf(t)&&(s.push(t),D(t,"afterGetLabelPosition",b),D(t,"afterGetPosition",v),z(t.prototype,"getMarkPath",_)),e}}(t||(t={})),t}),t(e,"Series/AreaRange/AreaRangePoint.js",[e["Series/Area/AreaSeries.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],function(e,t,n){var r,i=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=t.prototype,a=n.defined,s=n.isNumber;return function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.high=void 0,e.low=void 0,e.options=void 0,e.plotHigh=void 0,e.plotLow=void 0,e.plotHighX=void 0,e.plotLowX=void 0,e.plotX=void 0,e.series=void 0,e}return i(e,t),e.prototype.setState=function(){var e=this.state,t=this.series,n=t.chart.polar;a(this.plotHigh)||(this.plotHigh=t.yAxis.toPixels(this.high,!0)),a(this.plotLow)||(this.plotLow=this.plotY=t.yAxis.toPixels(this.low,!0)),t.stateMarkerGraphic&&(t.lowerStateMarkerGraphic=t.stateMarkerGraphic,t.stateMarkerGraphic=t.upperStateMarkerGraphic),this.graphic=this.upperGraphic,this.plotY=this.plotHigh,n&&(this.plotX=this.plotHighX),o.setState.apply(this,arguments),this.state=e,this.plotY=this.plotLow,this.graphic=this.lowerGraphic,n&&(this.plotX=this.plotLowX),t.stateMarkerGraphic&&(t.upperStateMarkerGraphic=t.stateMarkerGraphic,t.stateMarkerGraphic=t.lowerStateMarkerGraphic,t.lowerStateMarkerGraphic=void 0),o.setState.apply(this,arguments)},e.prototype.haloPath=function(){var e=this.series.chart.polar,t=[];return this.plotY=this.plotLow,e&&(this.plotX=this.plotLowX),this.isInside&&(t=o.haloPath.apply(this,arguments)),this.plotY=this.plotHigh,e&&(this.plotX=this.plotHighX),this.isTopInside&&(t=t.concat(o.haloPath.apply(this,arguments))),t},e.prototype.isValid=function(){return s(this.low)&&s(this.high)},e}(e.prototype.pointClass)}),t(e,"Series/AreaRange/AreaRangeSeries.js",[e["Series/AreaRange/AreaRangePoint.js"],e["Series/Area/AreaSeries.js"],e["Series/Column/ColumnSeries.js"],e["Core/Globals.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(e,n,t,a,r,s,i){var o,l=_____WB$wombat$check$this$function_____(this)&&this.__extends||(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=n.prototype,u=t.prototype;t=a.noop;var c=r.prototype,d=i.defined,p=i.extend,m=i.isArray,f=i.pick,g=i.merge;return r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.data=void 0,e.options=void 0,e.points=void 0,e.lowerStateMarkerGraphic=void 0,e.xAxis=void 0,e}return l(e,t),e.prototype.toYData=function(e){return[e.low,e.high]},e.prototype.highToXY=function(e){var t=this.chart,n=this.xAxis.postTranslate(e.rectPlotX||0,this.yAxis.len-e.plotHigh);e.plotHighX=n.x-t.plotLeft,e.plotHigh=n.y-t.plotTop,e.plotLowX=e.plotX},e.prototype.translate=function(){var r=_____WB$wombat$check$this$function_____(this),i=r.yAxis;h.translate.apply(r),r.points.forEach(function(e){var t=e.high,n=e.plotY;e.isNull?e.plotY=null:(e.plotLow=n,e.plotHigh=i.translate(r.dataModify?r.dataModify.modifyValue(t):t,0,1,0,1),r.dataModify&&(e.yBottom=e.plotHigh))}),this.chart.polar&&this.points.forEach(function(e){r.highToXY(e),e.tooltipPos=[(e.plotHighX+e.plotLowX)/2,(e.plotHigh+e.plotLow)/2]})},e.prototype.getGraphPath=function(e){var t,n=[],r=[],i=h.getGraphPath,o=this.options,a=this.chart.polar,s=a&&!1!==o.connectEnds,c=o.connectNulls,l=o.step;for(t=(e=e||this.points).length;t--;){var u=e[t],p=a?{plotX:u.rectPlotX,plotY:u.yBottom,doCurve:!1}:{plotX:u.plotX,plotY:u.plotY,doCurve:!1};u.isNull||s||c||e[t+1]&&!e[t+1].isNull||r.push(p);var d={polarPlotY:u.polarPlotY,rectPlotX:u.rectPlotX,yBottom:u.yBottom,plotX:f(u.plotHighX,u.plotX),plotY:u.plotHigh,isNull:u.isNull};r.push(d),n.push(d),u.isNull||s||c||e[t-1]&&!e[t-1].isNull||r.push(p)}return e=i.call(this,e),l&&(!0===l&&(l="left"),o.step={left:"right",center:"center",right:"left"}[l]),n=i.call(this,n),r=i.call(this,r),o.step=l,o=[].concat(e,n),!this.chart.polar&&r[0]&&"M"===r[0][0]&&(r[0]=["L",r[0][1],r[0][2]]),this.graphPath=o,this.areaPath=e.concat(r),o.isArea=!0,o.xMap=e.xMap,this.areaPath.xMap=e.xMap,o},e.prototype.drawDataLabels=function(){var e,t,n=this.points,r=n.length,i=[],o=this.options.dataLabels,u=this.chart.inverted;if(o){if(m(o))var a=o[0]||{enabled:!1},s=o[1]||{enabled:!1};else(a=p({},o)).x=o.xHigh,a.y=o.yHigh,(s=p({},o)).x=o.xLow,s.y=o.yLow;if(a.enabled||this._hasPointLabels){for(e=r;e--;)if(t=n[e]){var l=a.inside?t.plotHigh<t.plotLow:t.plotHigh>t.plotLow;t.y=t.high,t._plotY=t.plotY,t.plotY=t.plotHigh,i[e]=t.dataLabel,t.dataLabel=t.dataLabelUpper,t.below=l,u?a.align||(a.align=l?"right":"left"):a.verticalAlign||(a.verticalAlign=l?"top":"bottom")}for(this.options.dataLabels=a,c.drawDataLabels&&c.drawDataLabels.apply(this,arguments),e=r;e--;)(t=n[e])&&(t.dataLabelUpper=t.dataLabel,t.dataLabel=i[e],delete t.dataLabels,t.y=t.low,t.plotY=t._plotY)}if(s.enabled||this._hasPointLabels){for(e=r;e--;)(t=n[e])&&(l=s.inside?t.plotHigh<t.plotLow:t.plotHigh>t.plotLow,t.below=!l,u?s.align||(s.align=l?"left":"right"):s.verticalAlign||(s.verticalAlign=l?"bottom":"top"));this.options.dataLabels=s,c.drawDataLabels&&c.drawDataLabels.apply(this,arguments)}if(a.enabled)for(e=r;e--;)(t=n[e])&&(t.dataLabels=[t.dataLabelUpper,t.dataLabel].filter(function(e){return!!e}));this.options.dataLabels=o}},e.prototype.alignDataLabel=function(){u.alignDataLabel.apply(this,arguments)},e.prototype.drawPoints=function(){var e,t=this.points.length;for(c.drawPoints.apply(this,arguments),e=0;e<t;){var n=this.points[e];n.origProps={plotY:n.plotY,plotX:n.plotX,isInside:n.isInside,negative:n.negative,zone:n.zone,y:n.y},n.lowerGraphic=n.graphic,n.graphic=n.upperGraphic,n.plotY=n.plotHigh,d(n.plotHighX)&&(n.plotX=n.plotHighX),n.y=f(n.high,n.origProps.y),n.negative=n.y<(this.options.threshold||0),this.zones.length&&(n.zone=n.getZone()),this.chart.polar||(n.isInside=n.isTopInside=void 0!==n.plotY&&0<=n.plotY&&n.plotY<=this.yAxis.len&&0<=n.plotX&&n.plotX<=this.xAxis.len),e++}for(c.drawPoints.apply(this,arguments),e=0;e<t;)(n=this.points[e]).upperGraphic=n.graphic,n.graphic=n.lowerGraphic,n.origProps&&(p(n,n.origProps),delete n.origProps),e++},e.defaultOptions=g(n.defaultOptions,{lineWidth:1,threshold:null,tooltip:{pointFormat:'<span style="color:{series.color}">\u25cf</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'},trackByArea:!0,dataLabels:{align:void 0,verticalAlign:void 0,xLow:0,xHigh:0,yLow:0,yHigh:0}}),e}(n),p(r.prototype,{pointArrayMap:["low","high"],pointValKey:"low",deferTranslatePolar:!0,pointClass:e,setStackedPoints:t}),s.registerSeriesType("arearange",r),r}),t(e,"Series/AreaSplineRange/AreaSplineRangeSeries.js",[e["Series/AreaRange/AreaRangeSeries.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(n,e,t){var r,i=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=e.seriesTypes.spline,a=t.merge;t=t.extend;var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.options=void 0,e.data=void 0,e.points=void 0,e}return i(e,t),e.defaultOptions=a(n.defaultOptions),e}(n);return t(s.prototype,{getPointSpline:o.prototype.getPointSpline}),e.registerSeriesType("areasplinerange",s),s}),t(e,"Series/BoxPlot/BoxPlotSeries.js",[e["Series/Column/ColumnSeries.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(n,e,t,r){var i,o=_____WB$wombat$check$this$function_____(this)&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});e=e.noop;var a=r.extend,s=r.merge,A=r.pick;return r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.data=void 0,e.options=void 0,e.points=void 0,e}return o(e,t),e.prototype.pointAttribs=function(){return{}},e.prototype.translate=function(){var n=this.yAxis,e=this.pointArrayMap;t.prototype.translate.apply(this),this.points.forEach(function(t){e.forEach(function(e){null!==t[e]&&(t[e+"Plot"]=n.translate(t[e],0,1,0,1))}),t.plotHigh=t.highPlot})},e.prototype.drawPoints=function(){var u,c,p,d,v,h,w,f,E,S,T,m=_____WB$wombat$check$this$function_____(this),g=m.options,x=m.chart,_=x.renderer,y=0,C=!1!==m.doQuartiles,b=m.options.whiskerLength;m.points.forEach(function(e){var t=e.graphic,n=t?"animate":"attr",r=e.shapeArgs,i={},o={},a={},s={},l=e.color||m.color;void 0!==e.plotY&&(w=Math.round(r.width),f=Math.floor(r.x),E=f+w,S=Math.round(w/2),u=Math.floor(C?e.q1Plot:e.lowPlot),c=Math.floor(C?e.q3Plot:e.lowPlot),p=Math.floor(e.highPlot),d=Math.floor(e.lowPlot),t||(e.graphic=t=_.g("point").add(m.group),e.stem=_.path().addClass("highcharts-boxplot-stem").add(t),b&&(e.whiskers=_.path().addClass("highcharts-boxplot-whisker").add(t)),C&&(e.box=_.path(void 0).addClass("highcharts-boxplot-box").add(t)),e.medianShape=_.path(void 0).addClass("highcharts-boxplot-median").add(t)),x.styledMode||(o.stroke=e.stemColor||g.stemColor||l,o["stroke-width"]=A(e.stemWidth,g.stemWidth,g.lineWidth),o.dashstyle=e.stemDashStyle||g.stemDashStyle||g.dashStyle,e.stem.attr(o),b&&(a.stroke=e.whiskerColor||g.whiskerColor||l,a["stroke-width"]=A(e.whiskerWidth,g.whiskerWidth,g.lineWidth),a.dashstyle=e.whiskerDashStyle||g.whiskerDashStyle||g.dashStyle,e.whiskers.attr(a)),C&&(i.fill=e.fillColor||g.fillColor||l,i.stroke=g.lineColor||l,i["stroke-width"]=g.lineWidth||0,i.dashstyle=e.boxDashStyle||g.boxDashStyle||g.dashStyle,e.box.attr(i)),s.stroke=e.medianColor||g.medianColor||l,s["stroke-width"]=A(e.medianWidth,g.medianWidth,g.lineWidth),s.dashstyle=e.medianDashStyle||g.medianDashStyle||g.dashStyle,e.medianShape.attr(s)),h=e.stem.strokeWidth()%2/2,t=[["M",y=f+S+h,c],["L",y,p],["M",y,u],["L",y,d]],e.stem[n]({d:t}),C&&(h=e.box.strokeWidth()%2/2,u=Math.floor(u)+h,c=Math.floor(c)+h,t=[["M",f+=h,c],["L",f,u],["L",E+=h,u],["L",E,c],["L",f,c],["Z"]],e.box[n]({d:t})),b&&(h=e.whiskers.strokeWidth()%2/2,p+=h,d+=h,T=/%$/.test(b)?S*parseFloat(b)/100:b/2,t=[["M",y-T,p],["L",y+T,p],["M",y-T,d],["L",y+T,d]],e.whiskers[n]({d:t})),v=Math.round(e.medianPlot),h=e.medianShape.strokeWidth()%2/2,t=[["M",f,v+=h],["L",E,v]],e.medianShape[n]({d:t}))})},e.prototype.toYData=function(e){return[e.low,e.q1,e.median,e.q3,e.high]},e.defaultOptions=s(n.defaultOptions,{threshold:null,tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> <b> {series.name}</b><br/>Maximum: {point.high}<br/>Upper quartile: {point.q3}<br/>Median: {point.median}<br/>Lower quartile: {point.q1}<br/>Minimum: {point.low}<br/>'},whiskerLength:"50%",fillColor:"#ffffff",lineWidth:1,medianWidth:2,whiskerWidth:2}),e}(n),a(r.prototype,{pointArrayMap:["low","q1","median","q3","high"],pointValKey:"high",drawDataLabels:e,setStackedPoints:e}),t.registerSeriesType("boxplot",r),r}),t(e,"Series/Bubble/BubbleLegendDefaults.js",[],function(){return{borderColor:void 0,borderWidth:2,className:void 0,color:void 0,connectorClassName:void 0,connectorColor:void 0,connectorDistance:60,connectorWidth:1,enabled:!1,labels:{className:void 0,allowOverlap:!1,format:"",formatter:void 0,align:"right",style:{fontSize:"10px",color:"#000000"},x:0,y:0},maxSize:60,minSize:10,legendIndex:0,ranges:{value:void 0,borderColor:void 0,color:void 0,connectorColor:void 0},sizeBy:"area",sizeByAbsoluteValue:!1,zIndex:1,zThreshold:0}}),t(e,"Series/Bubble/BubbleLegendItem.js",[e["Core/Color/Color.js"],e["Core/FormatUtilities.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,i,t,n){var p=e.parse,r=t.noop,a=n.arrayMax,l=n.arrayMin,s=n.isNumber,d=n.merge,h=n.pick,u=n.stableSort;return function(){function e(e,t){this.options=this.symbols=this.visible=this.selected=this.ranges=this.movementX=this.maxLabel=this.legendSymbol=this.legendItemWidth=this.legendItemHeight=this.legendItem=this.legendGroup=this.legend=this.fontMetrics=this.chart=void 0,this.setState=r,this.init(e,t)}return e.prototype.init=function(e,t){this.options=e,this.visible=!0,this.chart=t.chart,this.legend=t},e.prototype.addToLegend=function(e){e.splice(this.options.legendIndex,0,_____WB$wombat$check$this$function_____(this))},e.prototype.drawLegendSymbol=function(e){var t=this.chart,n=this.options,r=h(e.options.itemDistance,20),i=n.ranges,o=n.connectorDistance;this.fontMetrics=t.renderer.fontMetrics(n.labels.style.fontSize),i&&i.length&&s(i[0].value)?(u(i,function(e,t){return t.value-e.value}),this.ranges=i,this.setOptions(),this.render(),e=this.getMaxLabelSize(),t=2*(i=this.ranges[0].radius),o=0<(o=o-i+e.width)?o:0,this.maxLabel=e,this.movementX="left"===n.labels.align?o:0,this.legendItemWidth=t+o+r,this.legendItemHeight=t+this.fontMetrics.h/2):e.options.bubbleLegend.autoRanges=!0},e.prototype.setOptions=function(){var n=this.ranges,r=this.options,i=this.chart.series[r.seriesIndex],o=this.legend.baseline,a={zIndex:r.zIndex,"stroke-width":r.borderWidth},s={zIndex:r.zIndex,"stroke-width":r.connectorWidth},l={align:this.legend.options.rtl||"left"===r.labels.align?"right":"left",zIndex:r.zIndex},u=i.options.marker.fillOpacity,c=this.chart.styledMode;n.forEach(function(e,t){c||(a.stroke=h(e.borderColor,r.borderColor,i.color),a.fill=h(e.color,r.color,1!==u?p(i.color).setOpacity(u).get("rgba"):i.color),s.stroke=h(e.connectorColor,r.connectorColor,i.color)),n[t].radius=this.getRangeRadius(e.value),n[t]=d(n[t],{center:n[0].radius-n[t].radius+o}),c||d(!0,n[t],{bubbleAttribs:d(a),connectorAttribs:d(s),labelAttribs:l})},_____WB$wombat$check$this$function_____(this))},e.prototype.getRangeRadius=function(e){var t=this.options;return this.chart.series[this.options.seriesIndex].getRadius.call(this,t.ranges[t.ranges.length-1].value,t.ranges[0].value,t.minSize,t.maxSize,e)},e.prototype.render=function(){var e=this.chart.renderer,t=this.options.zThreshold;this.symbols||(this.symbols={connectors:[],bubbleItems:[],labels:[]}),this.legendSymbol=e.g("bubble-legend"),this.legendItem=e.g("bubble-legend-item"),this.legendSymbol.translateX=0,this.legendSymbol.translateY=0,this.ranges.forEach(function(e){e.value>=t&&this.renderRange(e)},_____WB$wombat$check$this$function_____(this)),this.legendSymbol.add(this.legendItem),this.legendItem.add(this.legendGroup),this.hideOverlappingLabels()},e.prototype.renderRange=function(e){var t=this.options,c=t.labels,n=this.chart,p=n.series[t.seriesIndex],r=n.renderer,d=this.symbols;n=d.labels;var h=e.center,f=Math.abs(e.radius),i=t.connectorDistance||0,o=c.align,m=t.connectorWidth,a=this.ranges[0].radius||0,s=h-f-t.borderWidth/2+m/2,l=this.fontMetrics;l=l.f/2-(l.h-l.f)/2;var u=r.styledMode;i=this.legend.options.rtl||"left"===o?-i:i,"center"===o&&(i=0,t.connectorDistance=0,e.labelAttribs.align="center"),o=s+t.labels.y;var g=a+i+t.labels.x;d.bubbleItems.push(r.circle(a,h+((s%1?1:.5)-(m%2?0:.5)),f).attr(u?{}:e.bubbleAttribs).addClass((u?"highcharts-color-"+p.colorIndex+" ":"")+"highcharts-bubble-legend-symbol "+(t.className||"")).add(this.legendSymbol)),d.connectors.push(r.path(r.crispLine([["M",a,s],["L",a+i,s]],t.connectorWidth)).attr(u?{}:e.connectorAttribs).addClass((u?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-connectors "+(t.connectorClassName||"")).add(this.legendSymbol)),e=r.text(this.formatLabel(e),g,o+l).attr(u?{}:e.labelAttribs).css(u?{}:c.style).addClass("highcharts-bubble-legend-labels "+(t.labels.className||"")).add(this.legendSymbol),n.push(e),e.placed=!0,e.alignAttr={x:g,y:o+l}},e.prototype.getMaxLabelSize=function(){var t,n;return this.symbols.labels.forEach(function(e){n=e.getBBox(!0),t=t?n.width>t.width?n:t:n}),t||{}},e.prototype.formatLabel=function(e){var t=this.options,n=t.labels.formatter;t=t.labels.format;var r=this.chart.numberFormatter;return t?i.format(t,e):n?n.call(e):r(e.value,1)},e.prototype.hideOverlappingLabels=function(){var e=this.chart,n=this.symbols;!this.options.labels.allowOverlap&&n&&(e.hideOverlappingLabels(n.labels),n.labels.forEach(function(e,t){e.newOpacity?e.newOpacity!==e.oldOpacity&&n.connectors[t].show():n.connectors[t].hide()}))},e.prototype.getRanges=function(){var t,e=this.legend.bubbleLegend,n=e.options.ranges,r=Number.MAX_VALUE,i=-Number.MAX_VALUE;e.chart.series.forEach(function(e){e.isBubble&&!e.ignoreSeries&&(t=e.zData.filter(s)).length&&(r=h(e.options.zMin,Math.min(r,Math.max(l(t),!1===e.options.displayNegative?e.options.zThreshold:-Number.MAX_VALUE))),i=h(e.options.zMax,Math.max(i,a(t))))});var o=r===i?[{value:i}]:[{value:r},{value:(r+i)/2},{value:i,autoRanges:!0}];return n.length&&n[0].radius&&o.reverse(),o.forEach(function(e,t){n&&n[t]&&(o[t]=d(n[t],e))}),o},e.prototype.predictBubbleSizes=function(){var e=this.chart,t=this.fontMetrics,n=e.legend.options,r=n.floating,i=(n="horizontal"===n.layout)?e.legend.lastLineHeight:0,o=e.plotSizeX,a=e.plotSizeY,s=e.series[this.options.seriesIndex],l=s.getPxExtremes();e=Math.ceil(l.minPxSize),l=Math.ceil(l.maxPxSize);var u=Math.min(a,o);return s=s.options.maxSize,r||!/%$/.test(s)?t=l:(s=parseFloat(s),t=(u+i-t.h/2)*s/100/(s/100+1),(n&&a-t>=o||!n&&o-t>=a)&&(t=l)),[e,Math.ceil(t)]},e.prototype.updateRanges=function(e,t){var n=this.legend.options.bubbleLegend;n.minSize=e,n.maxSize=t,n.ranges=this.getRanges()},e.prototype.correctSizes=function(){var e=this.legend,t=this.chart.series[this.options.seriesIndex].getPxExtremes();1<Math.abs(Math.ceil(t.maxPxSize)-this.options.maxSize)&&(this.updateRanges(this.options.minSize,t.maxPxSize),e.render())},e}()}),t(e,"Series/Bubble/BubbleLegendComposition.js",[e["Series/Bubble/BubbleLegendDefaults.js"],e["Series/Bubble/BubbleLegendItem.js"],e["Core/DefaultOptions.js"],e["Core/Utilities.js"]],function(c,p,e,t){var n,d=e.setOptions,h=t.addEvent,f=t.objectEach,m=t.wrap;return function(e){function r(e,t,n){var r=this.legend,i=0<=a(this);if(r&&r.options.enabled&&r.bubbleLegend&&r.options.bubbleLegend.autoRanges&&i){var o=r.bubbleLegend.options;i=r.bubbleLegend.predictBubbleSizes(),r.bubbleLegend.updateRanges(i[0],i[1]),o.placed||(r.group.placed=!1,r.allItems.forEach(function(e){e.legendGroup.translateY=null})),r.render(),this.getMargins(),this.axes.forEach(function(e){e.visible&&e.render(),o.placed||(e.setScale(),e.updateNames(),f(e.ticks,function(e){e.isNew=!0,e.isNewLabel=!0}))}),o.placed=!0,this.getMargins(),e.call(this,t,n),r.bubbleLegend.correctSizes(),l(r,s(r))}else e.call(this,t,n),r&&r.options.enabled&&r.bubbleLegend&&(r.render(),l(r,s(r)))}function a(e){e=e.series;for(var t=0;t<e.length;){if(e[t]&&e[t].isBubble&&e[t].visible&&e[t].zData.length)return t;t++}return-1}function s(e){var t,n=[],r=(e=e.allItems).length,i=0;for(t=0;t<r;t++)if(e[t].legendItemHeight&&(e[t].itemHeight=e[t].legendItemHeight),e[t]===e[r-1]||e[t+1]&&e[t]._legendItemPos[1]!==e[t+1]._legendItemPos[1]){n.push({height:0});for(var o=n[n.length-1];i<=t;i++)e[i].itemHeight>o.height&&(o.height=e[i].itemHeight);o.step=t}return n}function i(e){var t=this.bubbleLegend,n=this.options,r=n.bubbleLegend,i=a(this.chart);t&&t.ranges&&t.ranges.length&&(r.ranges.length&&(r.autoRanges=!!r.ranges[0].autoRanges),this.destroyItem(t)),0<=i&&n.enabled&&r.enabled&&(r.seriesIndex=i,this.bubbleLegend=new p(r,_____WB$wombat$check$this$function_____(this)),this.bubbleLegend.addToLegend(e.allItems))}function o(){var e=this.chart,t=this.visible,n=this.chart.legend;n&&n.bubbleLegend&&(this.visible=!t,this.ignoreSeries=t,e=0<=a(e),n.bubbleLegend.visible!==e&&(n.update({bubbleLegend:{enabled:e}}),n.bubbleLegend.visible=e),this.visible=t)}function l(e,n){var r,i,o,a=e.options.rtl,s=0;e.allItems.forEach(function(e,t){r=e.legendGroup.translateX,i=e._legendItemPos[1],((o=e.movementX)||a&&e.ranges)&&(o=a?r-e.options.maxSize/2:r+o,e.legendGroup.attr({translateX:o})),t>n[s].step&&s++,e.legendGroup.attr({translateY:Math.round(i+n[s].height/2)}),e._legendItemPos[1]=i+n[s].height/2})}var u=[];e.compose=function(e,t,n){-1===u.indexOf(e)&&(u.push(e),d({legend:{bubbleLegend:c}}),m(e.prototype,"drawChartBox",r)),-1===u.indexOf(t)&&(u.push(t),h(t,"afterGetAllItems",i)),-1===u.indexOf(n)&&(u.push(n),h(n,"legendItemClick",o))}}(n||(n={})),n}),t(e,"Series/Bubble/BubblePoint.js",[e["Core/Series/Point.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(n,e,t){var r,i=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});return t=t.extend,e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.options=void 0,e.series=void 0,e}return i(e,t),e.prototype.haloPath=function(e){return n.prototype.haloPath.call(this,0===e?0:(this.marker&&this.marker.radius||0)+e)},e}(e.seriesTypes.scatter.prototype.pointClass),t(e.prototype,{ttBelow:!1}),e}),t(e,"Series/Bubble/BubbleSeries.js",[e["Core/Axis/Axis.js"],e["Series/Bubble/BubbleLegendComposition.js"],e["Series/Bubble/BubblePoint.js"],e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(l,u,c,e,t,p,n,r){var i,d=_____WB$wombat$check$this$function_____(this)&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=e.parse;e=t.noop;var o=n.seriesTypes;t=o.column;var a=o.scatter;o=r.addEvent;var g=r.arrayMax,y=r.arrayMin,b=r.clamp,s=r.extend,f=r.isNumber,v=r.merge,m=r.pick;return r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.data=void 0,e.maxPxSize=void 0,e.minPxSize=void 0,e.options=void 0,e.points=void 0,e.radii=void 0,e.yData=void 0,e.zData=void 0,e}return d(e,t),e.prototype.animate=function(e){!e&&this.points.length<this.options.animationLimit&&this.points.forEach(function(e){var t=e.graphic;t&&t.width&&(this.hasRendered||t.attr({x:e.plotX,y:e.plotY,width:1,height:1}),t.animate(this.markerAttribs(e),this.options.animation))},_____WB$wombat$check$this$function_____(this))},e.prototype.getRadii=function(){var t=_____WB$wombat$check$this$function_____(this),e=this.zData,n=this.yData,r=[],i=this.chart.bubbleZExtremes,o=this.getPxExtremes(),c=o.minPxSize,p=o.maxPxSize;if(!i){var a,s=Number.MAX_VALUE,l=-Number.MAX_VALUE;this.chart.series.forEach(function(e){e.bubblePadding&&(e.visible||!t.chart.options.chart.ignoreHiddenSeries)&&(e=e.getZExtremes())&&(s=Math.min(s||e.zMin,e.zMin),l=Math.max(l||e.zMax,e.zMax),a=!0)}),a?(i={zMin:s,zMax:l},this.chart.bubbleZExtremes=i):i={zMin:0,zMax:0}}var u=0;for(o=e.length;u<o;u++){var d=e[u];r.push(this.getRadius(i.zMin,i.zMax,c,p,d,n[u]))}this.radii=r},e.prototype.getRadius=function(e,t,n,r,i,o){var a=this.options,c="width"!==a.sizeBy,s=a.zThreshold,l=t-e,u=.5;if(null===o||null===i)return null;if(f(i)){if(a.sizeByAbsoluteValue&&(i=Math.abs(i-s),l=Math.max(t-s,Math.abs(e-s)),e=0),i<e)return n/2-1;0<l&&(u=(i-e)/l)}return c&&0<=u&&(u=Math.sqrt(u)),Math.ceil(n+u*(r-n))/2},e.prototype.hasData=function(){return!!this.processedXData.length},e.prototype.pointAttribs=function(e,t){var n=this.options.marker.fillOpacity;return e=p.prototype.pointAttribs.call(this,e,t),1!==n&&(e.fill=h(e.fill).setOpacity(n).get("rgba")),e},e.prototype.translate=function(){t.prototype.translate.call(this),this.getRadii(),this.translateBubble()},e.prototype.translateBubble=function(){for(var e=this.data,t=this.radii,n=this.getPxExtremes().minPxSize,r=e.length;r--;){var i=e[r],o=t?t[r]:0;f(o)&&o>=n/2?(i.marker=s(i.marker,{radius:o,width:2*o,height:2*o}),i.dlBox={x:i.plotX-o,y:i.plotY-o,width:2*o,height:2*o}):i.shapeArgs=i.plotY=i.dlBox=void 0}},e.prototype.getPxExtremes=function(){var n=Math.min(this.chart.plotWidth,this.chart.plotHeight),e=function(e){if("string"==typeof e){var t=/%$/.test(e);e=parseInt(e,10)}return t?n*e/100:e},t=e(m(this.options.minSize,8));return{minPxSize:t,maxPxSize:e=Math.max(e(m(this.options.maxSize,"20%")),t)}},e.prototype.getZExtremes=function(){var e=this.options,t=(this.zData||[]).filter(f);if(t.length){var n=m(e.zMin,b(y(t),!1===e.displayNegative?e.zThreshold||0:-Number.MAX_VALUE,Number.MAX_VALUE));if(e=m(e.zMax,g(t)),f(n)&&f(e))return{zMin:n,zMax:e}}},e.compose=u.compose,e.defaultOptions=v(a.defaultOptions,{dataLabels:{formatter:function(){var e=this.series.chart.numberFormatter,t=this.point.z;return f(t)?e(t,-1):""},inside:!0,verticalAlign:"middle"},animationLimit:250,marker:{lineColor:null,lineWidth:1,fillOpacity:.5,radius:null,states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"}),e}(a),s(r.prototype,{alignDataLabel:t.prototype.alignDataLabel,applyZones:e,bubblePadding:!0,buildKDTree:e,directTouch:!0,isBubble:!0,pointArrayMap:["y","z"],pointClass:c,parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],specialGroup:"group",zoneAxis:"z"}),o(r,"updatedData",function(e){delete e.target.chart.bubbleZExtremes}),l.prototype.beforePadding=function(){var i,o=_____WB$wombat$check$this$function_____(this),e=this.len,a=this.chart,s=0,l=e,u=this.isXAxis,h=u?"xData":"yData",c=this.min,p=this.max-c,d=e/p;this.series.forEach(function(e){if(e.bubblePadding&&(e.visible||!a.options.chart.ignoreHiddenSeries)){i=o.allowZoomOutside=!0;var t=e[h];if(u&&e.getRadii(0,0,e),0<p)for(var n=t.length;n--;)if(f(t[n])&&o.dataMin<=t[n]&&t[n]<=o.max){var r=e.radii&&e.radii[n]||0;s=Math.min((t[n]-c)*d-r,s),l=Math.max((t[n]-c)*d+r,l)}}}),i&&0<p&&!this.logarithmic&&(l-=e,d*=(e+Math.max(0,s)-Math.min(l,e))/e,[["min","userMin",s],["max","userMax",l]].forEach(function(e){void 0===m(o.options[e[0]],o[e[1]])&&(o[e[0]]+=e[2]/d)}))},n.registerSeriesType("bubble",r),r}),t(e,"Series/ColumnRange/ColumnRangePoint.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(e,t){var r,n=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=e.seriesTypes;e=i.column.prototype.pointClass;var o=t.extend,a=t.isNumber;return t=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.series=void 0,e.options=void 0,e.barX=void 0,e.pointWidth=void 0,e.shapeType=void 0,e}return n(e,t),e.prototype.isValid=function(){return a(this.low)},e}(i.arearange.prototype.pointClass),o(t.prototype,{setState:e.prototype.setState}),t}),t(e,"Series/ColumnRange/ColumnRangeSeries.js",[e["Series/ColumnRange/ColumnRangePoint.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(l,e,t,n){var r,u=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});e=e.noop;var i=t.seriesTypes,o=i.arearange,a=i.column,f=a.prototype,c=o.prototype,m=n.clamp,s=n.merge,g=n.pick;n=n.extend;var p={pointRange:null,marker:null,states:{hover:{halo:!1}}};return i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.data=void 0,e.points=void 0,e.options=void 0,e}return u(e,t),e.prototype.setOptions=function(){return s(!0,arguments[0],{stacking:void 0}),c.setOptions.apply(this,arguments)},e.prototype.translate=function(){var o,a,s=_____WB$wombat$check$this$function_____(this),l=s.yAxis,u=s.xAxis,c=u.startAngleRad,p=s.chart,d=s.xAxis.isRadial,h=Math.max(p.chartWidth,p.chartHeight)+999;f.translate.apply(s),s.points.forEach(function(e){var t=e.shapeArgs||{},n=s.options.minPointLength;e.plotHigh=a=m(l.translate(e.high,0,1,0,1),-h,h),e.plotLow=m(e.plotY,-h,h);var r=a,i=g(e.rectPlotY,e.plotY)-a;Math.abs(i)<n?(i+=n-=i,r-=n/2):0>i&&(r-=i*=-1),d?(o=e.barX+c,e.shapeType="arc",e.shapeArgs=s.polarArc(r+i,r,o,o+e.pointWidth)):(t.height=i,t.y=r,n=void 0===(n=t.x)?0:n,t=void 0===(t=t.width)?0:t,e.tooltipPos=p.inverted?[l.len+l.pos-p.plotLeft-r-i/2,u.len+u.pos-p.plotTop-n-t/2,i]:[u.left-p.plotLeft+n+t/2,l.pos-p.plotTop+r+i/2,i])})},e.prototype.crispCol=function(){return f.crispCol.apply(this,arguments)},e.prototype.drawPoints=function(){return f.drawPoints.apply(this,arguments)},e.prototype.drawTracker=function(){return f.drawTracker.apply(this,arguments)},e.prototype.getColumnMetrics=function(){return f.getColumnMetrics.apply(this,arguments)},e.prototype.pointAttribs=function(){return f.pointAttribs.apply(this,arguments)},e.prototype.adjustForMissingColumns=function(){return f.adjustForMissingColumns.apply(this,arguments)},e.prototype.animate=function(){return f.animate.apply(this,arguments)},e.prototype.translate3dPoints=function(){return f.translate3dPoints.apply(this,arguments)},e.prototype.translate3dShapes=function(){return f.translate3dShapes.apply(this,arguments)},e.defaultOptions=s(a.defaultOptions,o.defaultOptions,p),e}(o),n(i.prototype,{directTouch:!0,trackerGroups:["group","dataLabelsGroup"],drawGraph:e,getSymbol:e,polarArc:function(){return f.polarArc.apply(this,arguments)},pointClass:l}),t.registerSeriesType("columnrange",i),i}),t(e,"Series/ColumnPyramid/ColumnPyramidSeries.js",[e["Series/Column/ColumnSeries.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(n,e,t){var r,i=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=n.prototype,S=t.clamp,a=t.merge,T=t.pick;return t=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.data=void 0,e.options=void 0,e.points=void 0,e}return i(e,t),e.prototype.translate=function(){var d=_____WB$wombat$check$this$function_____(this),h=d.chart,f=d.options,e=d.dense=2>d.closestPointRange*d.xAxis.transA;e=d.borderWidth=T(f.borderWidth,e?0:1);var m=d.yAxis,g=f.threshold,y=d.translatedThreshold=m.getThreshold(g),b=T(f.minPointLength,5),t=d.getColumnMetrics(),w=t.width,v=d.barW=Math.max(w,1+2*e),E=d.pointXOffset=t.offset;h.inverted&&(y-=.5),f.pointPadding&&(v=Math.ceil(v)),o.translate.apply(d),d.points.forEach(function(e){var t=T(e.yBottom,y),n=999+Math.abs(t),r=S(e.plotY,-n,m.len+n);n=e.plotX+E;var i,o=v/2,a=Math.min(r,t);t=Math.max(r,t)-a,e.barX=n,e.pointWidth=w,e.tooltipPos=h.inverted?[m.len+m.pos-h.plotLeft-r,d.xAxis.len-n-o,t]:[n+o,r+m.pos-h.plotTop,t],r=g+(e.total||e.y),"percent"===f.stacking&&(r=g+(0>e.y)?-100:100),r=m.toPixels(r,!0);var s=(i=h.plotHeight-r-(h.plotHeight-y))?o*(a-r)/i:0,l=i?o*(a+t-r)/i:0;i=n-s+o,s=n+s+o;var c=n+l+o;l=n-l+o;var u=a-b,p=a+t;0>e.y&&(u=a,p=a+t+b),h.inverted&&(l=o*(r-((c=m.width-a)-t))/(i=r-(m.width-y)),s=(i=n+o+(s=o*(r-c)/i))-2*s,c=n-l+o,l=n+l+o,u=a,p=a+t-b,0>e.y&&(p=a+t+b)),e.shapeType="path",e.shapeArgs={x:i,y:u,width:s-i,height:t,d:[["M",i,u],["L",s,u],["L",c,p],["L",l,p],["Z"]]}})},e.defaultOptions=a(n.defaultOptions,{}),e}(n),e.registerSeriesType("columnpyramid",t),t}),t(e,"Series/ErrorBar/ErrorBarSeries.js",[e["Series/BoxPlot/BoxPlotSeries.js"],e["Series/Column/ColumnSeries.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(n,r,e,t){var i,o=_____WB$wombat$check$this$function_____(this)&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=e.seriesTypes.arearange,s=t.merge;t=t.extend;var l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.data=void 0,e.options=void 0,e.points=void 0,e}return o(e,t),e.prototype.getColumnMetrics=function(){return this.linkedParent&&this.linkedParent.columnMetrics||r.prototype.getColumnMetrics.call(this)},e.prototype.drawDataLabels=function(){var t=this.pointValKey;a&&(a.prototype.drawDataLabels.call(this),this.data.forEach(function(e){e.y=e[t]}))},e.prototype.toYData=function(e){return[e.low,e.high]},e.defaultOptions=s(n.defaultOptions,{color:"#000000",grouping:!1,linkedTo:":previous",tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'},whiskerWidth:null}),e}(n);return t(l.prototype,{pointArrayMap:["low","high"],pointValKey:"high",doQuartiles:!1}),e.registerSeriesType("errorbar",l),l}),t(e,"Series/Gauge/GaugePoint.js",[e["Core/Series/SeriesRegistry.js"]],function(e){var r,n=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});return function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.options=void 0,e.series=void 0,e.shapeArgs=void 0,e}return n(e,t),e.prototype.setState=function(e){this.state=e},e}(e.series.prototype.pointClass)}),t(e,"Series/Gauge/GaugeSeries.js",[e["Series/Gauge/GaugePoint.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(e,t,n,r){var i,a=_____WB$wombat$check$this$function_____(this)&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});t=t.noop;var o=n.series,s=n.seriesTypes.column,g=r.clamp,d=r.isNumber,l=r.extend,h=r.merge,f=r.pick,m=r.pInt;return r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.data=void 0,e.points=void 0,e.options=void 0,e.yAxis=void 0,e}return a(e,t),e.prototype.translate=function(){var u=this.yAxis,c=this.options,p=u.center;this.generatePoints(),this.points.forEach(function(e){var t=h(c.dial,e.dial),n=m(f(t.radius,"80%"))*p[2]/200,r=m(f(t.baseLength,"70%"))*n/100,i=m(f(t.rearLength,"10%"))*n/100,o=t.baseWidth||3,a=t.topWidth||1,s=c.overshoot,l=u.startAngleRad+u.translate(e.y,null,null,null,!0);(d(s)||!1===c.wrap)&&(s=d(s)?s/180*Math.PI:0,l=g(l,u.startAngleRad-s,u.endAngleRad+s)),l=180*l/Math.PI,e.shapeType="path",e.shapeArgs={d:t.path||[["M",-i,-o/2],["L",r,-o/2],["L",n,-a/2],["L",n,a/2],["L",r,o/2],["L",-i,o/2],["Z"]],translateX:p[0],translateY:p[1],rotation:l},e.plotX=p[0],e.plotY=p[1]})},e.prototype.drawPoints=function(){var o=_____WB$wombat$check$this$function_____(this),a=o.chart,e=o.yAxis.center,t=o.pivot,s=o.options,n=s.pivot,l=a.renderer;o.points.forEach(function(e){var t=e.graphic,n=e.shapeArgs,r=n.d,i=h(s.dial,e.dial);t?(t.animate(n),n.d=r):e.graphic=l[e.shapeType](n).attr({rotation:n.rotation,zIndex:1}).addClass("highcharts-dial").add(o.group),a.styledMode||e.graphic[t?"animate":"attr"]({stroke:i.borderColor||"none","stroke-width":i.borderWidth||0,fill:i.backgroundColor||"#000000"})}),t?t.animate({translateX:e[0],translateY:e[1]}):(o.pivot=l.circle(0,0,f(n.radius,5)).attr({zIndex:2}).addClass("highcharts-pivot").translate(e[0],e[1]).add(o.group),a.styledMode||o.pivot.attr({"stroke-width":n.borderWidth||0,stroke:n.borderColor||"#cccccc",fill:n.backgroundColor||"#000000"}))},e.prototype.animate=function(e){var n=_____WB$wombat$check$this$function_____(this);e||n.points.forEach(function(e){var t=e.graphic;t&&(t.attr({rotation:180*n.yAxis.startAngleRad/Math.PI}),t.animate({rotation:e.shapeArgs.rotation},n.options.animation))})},e.prototype.render=function(){this.group=this.plotGroup("group","series",this.visible?"visible":"hidden",this.options.zIndex,this.chart.seriesGroup),o.prototype.render.call(this),this.group.clip(this.chart.clipRect)},e.prototype.setData=function(e,t){o.prototype.setData.call(this,e,!1),this.processData(),this.generatePoints(),f(t,!0)&&this.chart.redraw()},e.prototype.hasData=function(){return!!this.points.length},e.defaultOptions=h(o.defaultOptions,{dataLabels:{borderColor:"#cccccc",borderRadius:3,borderWidth:1,crop:!1,defer:!1,enabled:!0,verticalAlign:"top",y:15,zIndex:2},dial:{},pivot:{},tooltip:{headerFormat:""},showInLegend:!1}),e}(o),l(r.prototype,{angular:!0,directTouch:!0,drawGraph:t,drawTracker:s.prototype.drawTracker,fixedBox:!0,forceDL:!0,noSharedTooltip:!0,pointClass:e,trackerGroups:["group","dataLabelsGroup"]}),n.registerSeriesType("gauge",r),r}),t(e,"Series/PackedBubble/PackedBubblePoint.js",[e["Core/Chart/Chart.js"],e["Core/Series/Point.js"],e["Core/Series/SeriesRegistry.js"]],function(n,r,e){var i,o=_____WB$wombat$check$this$function_____(this)&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});return function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.degree=NaN,e.mass=NaN,e.radius=NaN,e.options=void 0,e.series=void 0,e.value=null,e}return o(e,t),e.prototype.destroy=function(){return this.series.layout&&this.series.layout.removeElementFromCollection(this,this.series.layout.nodes),r.prototype.destroy.apply(this,arguments)},e.prototype.firePointEvent=function(){var e=this.series.options;if(this.isParentNode&&e.parentNode){var t=e.allowPointSelect;e.allowPointSelect=e.parentNode.allowPointSelect,r.prototype.firePointEvent.apply(this,arguments),e.allowPointSelect=t}else r.prototype.firePointEvent.apply(this,arguments)},e.prototype.select=function(){var e=this.series.chart;this.isParentNode?(e.getSelectedPoints=e.getSelectedParentNodes,r.prototype.select.apply(this,arguments),e.getSelectedPoints=n.prototype.getSelectedPoints):r.prototype.select.apply(this,arguments)},e}(e.seriesTypes.bubble.prototype.pointClass)}),t(e,"Series/Networkgraph/DraggableNodes.js",[e["Core/Chart/Chart.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,t,n){var o=n.addEvent;t.dragNodesMixin={onMouseDown:function(e,t){t=this.chart.pointer.normalize(t),e.fixedPosition={chartX:t.chartX,chartY:t.chartY,plotX:e.plotX,plotY:e.plotY},e.inDragMode=!0},onMouseMove:function(e,t){if(e.fixedPosition&&e.inDragMode){var n=this.chart,r=n.pointer.normalize(t);t=e.fixedPosition.chartX-r.chartX,r=e.fixedPosition.chartY-r.chartY;var i=void 0,o=void 0,a=n.graphLayoutsLookup;(5<Math.abs(t)||5<Math.abs(r))&&(i=e.fixedPosition.plotX-t,o=e.fixedPosition.plotY-r,n.isInsidePlot(i,o)&&(e.plotX=i,e.plotY=o,e.hasDragged=!0,this.redrawHalo(e),a.forEach(function(e){e.restartSimulation()})))}},onMouseUp:function(e,t){e.fixedPosition&&(e.hasDragged&&(this.layout.enableSimulation?this.layout.start():this.chart.redraw()),e.inDragMode=e.hasDragged=!1,this.options.fixedDraggable||delete e.fixedPosition)},redrawHalo:function(e){e&&this.halo&&this.halo.attr({d:e.haloPath(this.options.states.hover.halo.size)})}},o(e,"load",function(){var e,n,r,i=_____WB$wombat$check$this$function_____(this);i.container&&(e=o(i.container,"mousedown",function(e){var t=i.hoverPoint;t&&t.series&&t.series.hasDraggableNodes&&t.series.options.draggable&&(t.series.onMouseDown(t,e),n=o(i.container,"mousemove",function(e){return t&&t.series&&t.series.onMouseMove(t,e)}),r=o(i.container.ownerDocument,"mouseup",function(e){return n(),r(),t&&t.series&&t.series.onMouseUp(t,e)}))})),o(i,"destroy",function(){e()})})}),t(e,"Series/Networkgraph/Integrations.js",[e["Core/Globals.js"]],function(e){e.networkgraphIntegrations={verlet:{attractiveForceFunction:function(e,t){return(t-e)/e},repulsiveForceFunction:function(e,t){return(t-e)/e*(t>e?1:0)},barycenter:function(){var e=this.options.gravitationalConstant,t=this.barycenter.xFactor,n=this.barycenter.yFactor;t=(t-(this.box.left+this.box.width)/2)*e,n=(n-(this.box.top+this.box.height)/2)*e,this.nodes.forEach(function(e){e.fixedPosition||(e.plotX-=t/e.mass/e.degree,e.plotY-=n/e.mass/e.degree)})},repulsive:function(e,t,n){t=t*this.diffTemperature/e.mass/e.degree,e.fixedPosition||(e.plotX+=n.x*t,e.plotY+=n.y*t)},attractive:function(e,t,n){var r=e.getMass(),i=-n.x*t*this.diffTemperature;t=-n.y*t*this.diffTemperature,e.fromNode.fixedPosition||(e.fromNode.plotX-=i*r.fromNode/e.fromNode.degree,e.fromNode.plotY-=t*r.fromNode/e.fromNode.degree),e.toNode.fixedPosition||(e.toNode.plotX+=i*r.toNode/e.toNode.degree,e.toNode.plotY+=t*r.toNode/e.toNode.degree)},integrate:function(e,t){var n=-e.options.friction,r=e.options.maxSpeed,i=(t.plotX+t.dispX-t.prevX)*n;n*=t.plotY+t.dispY-t.prevY;var o=Math.abs,a=o(i)/(i||1);o=o(n)/(n||1),i=a*Math.min(r,Math.abs(i)),n=o*Math.min(r,Math.abs(n)),t.prevX=t.plotX+t.dispX,t.prevY=t.plotY+t.dispY,t.plotX+=i,t.plotY+=n,t.temperature=e.vectorLength({x:i,y:n})},getK:function(e){return Math.pow(e.box.width*e.box.height/e.nodes.length,.5)}},euler:{attractiveForceFunction:function(e,t){return e*e/t},repulsiveForceFunction:function(e,t){return t*t/e},barycenter:function(){var n=this.options.gravitationalConstant,r=this.barycenter.xFactor,i=this.barycenter.yFactor;this.nodes.forEach(function(e){if(!e.fixedPosition){var t=e.getDegree();t*=1+t/2,e.dispX+=(r-e.plotX)*n*t/e.degree,e.dispY+=(i-e.plotY)*n*t/e.degree}})},repulsive:function(e,t,n,r){e.dispX+=n.x/r*t/e.degree,e.dispY+=n.y/r*t/e.degree},attractive:function(e,t,n,r){var i=e.getMass(),o=n.x/r*t;t*=n.y/r,e.fromNode.fixedPosition||(e.fromNode.dispX-=o*i.fromNode/e.fromNode.degree,e.fromNode.dispY-=t*i.fromNode/e.fromNode.degree),e.toNode.fixedPosition||(e.toNode.dispX+=o*i.toNode/e.toNode.degree,e.toNode.dispY+=t*i.toNode/e.toNode.degree)},integrate:function(e,t){t.dispX+=t.dispX*e.options.friction,t.dispY+=t.dispY*e.options.friction;var n=t.temperature=e.vectorLength({x:t.dispX,y:t.dispY});0!==n&&(t.plotX+=t.dispX/n*Math.min(Math.abs(t.dispX),e.temperature),t.plotY+=t.dispY/n*Math.min(Math.abs(t.dispY),e.temperature))},getK:function(e){return Math.pow(e.box.width*e.box.height/e.nodes.length,.3)}}}}),t(e,"Series/Networkgraph/QuadTree.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,t){t=t.extend;var i=e.QuadTreeNode=function(e){this.box=e,this.boxSize=Math.min(e.width,e.height),this.nodes=[],this.body=this.isInternal=!1,this.isEmpty=!0};t(i.prototype,{insert:function(e,t){this.isInternal?this.nodes[this.getBoxPosition(e)].insert(e,t-1):(this.isEmpty=!1,this.body?t?(this.isInternal=!0,this.divideBox(),!0!==this.body&&(this.nodes[this.getBoxPosition(this.body)].insert(this.body,t-1),this.body=!0),this.nodes[this.getBoxPosition(e)].insert(e,t-1)):((t=new i({top:e.plotX,left:e.plotY,width:.1,height:.1})).body=e,t.isInternal=!1,this.nodes.push(t)):(this.isInternal=!1,this.body=e))},updateMassAndCenter:function(){var t=0,n=0,r=0;this.isInternal?(this.nodes.forEach(function(e){e.isEmpty||(t+=e.mass,n+=e.plotX*e.mass,r+=e.plotY*e.mass)}),n/=t,r/=t):this.body&&(t=this.body.mass,n=this.body.plotX,r=this.body.plotY),this.mass=t,this.plotX=n,this.plotY=r},divideBox:function(){var e=this.box.width/2,t=this.box.height/2;this.nodes[0]=new i({left:this.box.left,top:this.box.top,width:e,height:t}),this.nodes[1]=new i({left:this.box.left+e,top:this.box.top,width:e,height:t}),this.nodes[2]=new i({left:this.box.left+e,top:this.box.top+t,width:e,height:t}),this.nodes[3]=new i({left:this.box.left,top:this.box.top+t,width:e,height:t})},getBoxPosition:function(e){var t=e.plotY<this.box.top+this.box.height/2;return e.plotX<this.box.left+this.box.width/2?t?0:3:t?1:2}}),t((e=e.QuadTree=function(e,t,n,r){this.box={left:e,top:t,width:n,height:r},this.maxDepth=25,this.root=new i(this.box,"0"),this.root.isInternal=!0,this.root.isRoot=!0,this.root.divideBox()}).prototype,{insertNodes:function(e){e.forEach(function(e){this.root.insert(e,this.maxDepth)},_____WB$wombat$check$this$function_____(this))},visitNodeRecursive:function(e,t,n){var r;e||(e=this.root),e===this.root&&t&&(r=t(e)),!1!==r&&(e.nodes.forEach(function(e){if(e.isInternal){if(t&&(r=t(e)),!1===r)return;this.visitNodeRecursive(e,t,n)}else e.body&&t&&t(e.body);n&&n(e)},_____WB$wombat$check$this$function_____(this)),e===this.root&&n&&n(e))},calculateMassAndCenter:function(){this.visitNodeRecursive(null,null,function(e){e.updateMassAndCenter()})}})}),t(e,"Series/Networkgraph/Layouts.js",[e["Core/Chart/Chart.js"],e["Core/Animation/AnimationUtilities.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,t,n,r){var i=t.setAnimation;t=r.addEvent;var o=r.clamp,a=r.defined,s=r.extend,l=r.isFunction,u=r.pick;n.layouts={"reingold-fruchterman":function(){}},s(n.layouts["reingold-fruchterman"].prototype,{init:function(e){this.options=e,this.nodes=[],this.links=[],this.series=[],this.box={x:0,y:0,width:0,height:0},this.setInitialRendering(!0),this.integration=n.networkgraphIntegrations[e.integration],this.enableSimulation=e.enableSimulation,this.attractiveForce=u(e.attractiveForce,this.integration.attractiveForceFunction),this.repulsiveForce=u(e.repulsiveForce,this.integration.repulsiveForceFunction),this.approximation=e.approximation},updateSimulation:function(e){this.enableSimulation=u(e,this.options.enableSimulation)},start:function(){var e=this.series,t=this.options;this.currentStep=0,this.forces=e[0]&&e[0].forces||[],this.chart=e[0]&&e[0].chart,this.initialRendering&&(this.initPositions(),e.forEach(function(e){e.finishedAnimating=!0,e.render()})),this.setK(),this.resetSimulation(t),this.enableSimulation&&this.step()},step:function(){var t=_____WB$wombat$check$this$function_____(this),e=this.series;t.currentStep++,"barnes-hut"===t.approximation&&(t.createQuadTree(),t.quadTree.calculateMassAndCenter()),t.forces.forEach(function(e){t[e+"Forces"](t.temperature)}),t.applyLimits(t.temperature),t.temperature=t.coolDown(t.startTemperature,t.diffTemperature,t.currentStep),t.prevSystemTemperature=t.systemTemperature,t.systemTemperature=t.getSystemTemperature(),t.enableSimulation&&(e.forEach(function(e){e.chart&&e.render()}),t.maxIterations--&&isFinite(t.temperature)&&!t.isStable()?(t.simulation&&n.win.cancelAnimationFrame(t.simulation),t.simulation=n.win.requestAnimationFrame(function(){t.step()})):t.simulation=!1)},stop:function(){this.simulation&&n.win.cancelAnimationFrame(this.simulation)},setArea:function(e,t,n,r){this.box={left:e,top:t,width:n,height:r}},setK:function(){this.k=this.options.linkLength||this.integration.getK(this)},addElementsToCollection:function(e,t){e.forEach(function(e){-1===t.indexOf(e)&&t.push(e)})},removeElementFromCollection:function(e,t){-1!==(e=t.indexOf(e))&&t.splice(e,1)},clear:function(){this.nodes.length=0,this.links.length=0,this.series.length=0,this.resetSimulation()},resetSimulation:function(){this.forcedStop=!1,this.systemTemperature=0,this.setMaxIterations(),this.setTemperature(),this.setDiffTemperature()},restartSimulation:function(){this.simulation?this.resetSimulation():(this.setInitialRendering(!1),this.enableSimulation?this.start():this.setMaxIterations(1),this.chart&&this.chart.redraw(),this.setInitialRendering(!0))},setMaxIterations:function(e){this.maxIterations=u(e,this.options.maxIterations)},setTemperature:function(){this.temperature=this.startTemperature=Math.sqrt(this.nodes.length)},setDiffTemperature:function(){this.diffTemperature=this.startTemperature/(this.options.maxIterations+1)},setInitialRendering:function(e){this.initialRendering=e},createQuadTree:function(){this.quadTree=new n.QuadTree(this.box.left,this.box.top,this.box.width,this.box.height),this.quadTree.insertNodes(this.nodes)},initPositions:function(){var e=this.options.initialPositions;l(e)?(e.call(this),this.nodes.forEach(function(e){a(e.prevX)||(e.prevX=e.plotX),a(e.prevY)||(e.prevY=e.plotY),e.dispX=0,e.dispY=0})):"circle"===e?this.setCircularPositions():this.setRandomPositions()},setCircularPositions:function(){function t(e){e.linksFrom.forEach(function(e){a[e.toNode.id]||(a[e.toNode.id]=!0,o.push(e.toNode),t(e.toNode))})}var n=this.box,e=this.nodes,r=2*Math.PI/(e.length+1),i=e.filter(function(e){return 0===e.linksTo.length}),o=[],a={},s=this.options.initialPositionRadius;i.forEach(function(e){o.push(e),t(e)}),o.length?e.forEach(function(e){-1===o.indexOf(e)&&o.push(e)}):o=e,o.forEach(function(e,t){e.plotX=e.prevX=u(e.plotX,n.width/2+s*Math.cos(t*r)),e.plotY=e.prevY=u(e.plotY,n.height/2+s*Math.sin(t*r)),e.dispX=0,e.dispY=0})},setRandomPositions:function(){function n(e){return(e=e*e/Math.PI)-Math.floor(e)}var r=this.box,e=this.nodes,i=e.length+1;e.forEach(function(e,t){e.plotX=e.prevX=u(e.plotX,r.width*n(t)),e.plotY=e.prevY=u(e.plotY,r.height*n(i+t)),e.dispX=0,e.dispY=0})},force:function(e){this.integration[e].apply(this,Array.prototype.slice.call(arguments,1))},barycenterForces:function(){this.getBarycenter(),this.force("barycenter")},getBarycenter:function(){var t=0,n=0,r=0;return this.nodes.forEach(function(e){n+=e.plotX*e.mass,r+=e.plotY*e.mass,t+=e.mass}),this.barycenter={x:n,y:r,xFactor:n/t,yFactor:r/t}},barnesHutApproximation:function(e,t){var n=this.getDistXY(e,t),r=this.vectorLength(n);if(e!==t&&0!==r)if(t.isInternal)if(t.boxSize/r<this.options.theta&&0!==r){var i=this.repulsiveForce(r,this.k);this.force("repulsive",e,i*t.mass,n,r);var o=!1}else o=!0;else i=this.repulsiveForce(r,this.k),this.force("repulsive",e,i*t.mass,n,r);return o},repulsiveForces:function(){var o=_____WB$wombat$check$this$function_____(this);"barnes-hut"===o.approximation?o.nodes.forEach(function(t){o.quadTree.visitNodeRecursive(null,function(e){return o.barnesHutApproximation(t,e)})}):o.nodes.forEach(function(i){o.nodes.forEach(function(e){if(i!==e&&!i.fixedPosition){var t=o.getDistXY(i,e),n=o.vectorLength(t);if(0!==n){var r=o.repulsiveForce(n,o.k);o.force("repulsive",i,r*e.mass,t,n)}}})})},attractiveForces:function(){var t,n,r,i=_____WB$wombat$check$this$function_____(this);i.links.forEach(function(e){e.fromNode&&e.toNode&&(t=i.getDistXY(e.fromNode,e.toNode),0!==(n=i.vectorLength(t))&&(r=i.attractiveForce(n,i.k),i.force("attractive",e,r,t,n)))})},applyLimits:function(){var t=_____WB$wombat$check$this$function_____(this);t.nodes.forEach(function(e){e.fixedPosition||(t.integration.integrate(t,e),t.applyLimitBox(e,t.box),e.dispX=0,e.dispY=0)})},applyLimitBox:function(e,t){var n=e.radius;e.plotX=o(e.plotX,t.left+n,t.width-n),e.plotY=o(e.plotY,t.top+n,t.height-n)},coolDown:function(e,t,n){return e-t*n},isStable:function(){return 1e-5>Math.abs(this.systemTemperature-this.prevSystemTemperature)||0>=this.temperature},getSystemTemperature:function(){return this.nodes.reduce(function(e,t){return e+t.temperature},0)},vectorLength:function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},getDistR:function(e,t){return e=this.getDistXY(e,t),this.vectorLength(e)},getDistXY:function(e,t){var n=e.plotX-t.plotX;return{x:n,y:e=e.plotY-t.plotY,absX:Math.abs(n),absY:Math.abs(e)}}}),t(e,"predraw",function(){this.graphLayoutsLookup&&this.graphLayoutsLookup.forEach(function(e){e.stop()})}),t(e,"render",function(){function e(e){e.maxIterations--&&isFinite(e.temperature)&&!e.isStable()&&!e.enableSimulation&&(e.beforeStep&&e.beforeStep(),e.step(),n=!1,t=!0)}var t=!1;if(this.graphLayoutsLookup){for(i(!1,_____WB$wombat$check$this$function_____(this)),this.graphLayoutsLookup.forEach(function(e){e.start()});!n;){var n=!0;this.graphLayoutsLookup.forEach(e)}t&&this.series.forEach(function(e){e&&e.layout&&e.render()})}}),t(e,"beforePrint",function(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(function(e){e.updateSimulation(!1)}),this.redraw())}),t(e,"afterPrint",function(){this.graphLayoutsLookup&&this.graphLayoutsLookup.forEach(function(e){e.updateSimulation()}),this.redraw()})}),t(e,"Series/PackedBubble/PackedBubbleComposition.js",[e["Core/Chart/Chart.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(e,t,n){var r=t.layouts["reingold-fruchterman"],i=n.addEvent,o=n.extendClass,l=n.pick;e.prototype.getSelectedParentNodes=function(){var t=[];return this.series.forEach(function(e){e.parentNode&&e.parentNode.selected&&t.push(e.parentNode)}),t},t.networkgraphIntegrations.packedbubble={repulsiveForceFunction:function(e,t,n,r){return Math.min(e,(n.marker.radius+r.marker.radius)/2)},barycenter:function(){var t,n,r=_____WB$wombat$check$this$function_____(this),i=r.options.gravitationalConstant,o=r.box,a=r.nodes;a.forEach(function(e){r.options.splitSeries&&!e.isParentNode?(t=e.series.parentNode.plotX,n=e.series.parentNode.plotY):(t=o.width/2,n=o.height/2),e.fixedPosition||(e.plotX-=(e.plotX-t)*i/(e.mass*Math.sqrt(a.length)),e.plotY-=(e.plotY-n)*i/(e.mass*Math.sqrt(a.length)))})},repulsive:function(e,t,n,r){var i=t*this.diffTemperature/e.mass/e.degree;t=n.x*i,n=n.y*i,e.fixedPosition||(e.plotX+=t,e.plotY+=n),r.fixedPosition||(r.plotX-=t,r.plotY-=n)},integrate:t.networkgraphIntegrations.verlet.integrate,getK:t.noop},t.layouts.packedbubble=o(r,{beforeStep:function(){this.options.marker&&this.series.forEach(function(e){e&&e.calculateParentRadius()})},isStable:function(){var e=Math.abs(this.prevSystemTemperature-this.systemTemperature);return 1>Math.abs(10*this.systemTemperature/Math.sqrt(this.nodes.length))&&1e-5>e||0>=this.temperature},setCircularPositions:function(){var n,r,i=_____WB$wombat$check$this$function_____(this),o=i.box,e=i.nodes,a=2*Math.PI/(e.length+1),s=i.options.initialPositionRadius;e.forEach(function(e,t){i.options.splitSeries&&!e.isParentNode?(n=e.series.parentNode.plotX,r=e.series.parentNode.plotY):(n=o.width/2,r=o.height/2),e.plotX=e.prevX=l(e.plotX,n+s*Math.cos(e.index||t*a)),e.plotY=e.prevY=l(e.plotY,r+s*Math.sin(e.index||t*a)),e.dispX=0,e.dispY=0})},repulsiveForces:function(){var n,r,i,o=_____WB$wombat$check$this$function_____(this),a=o.options.bubblePadding;o.nodes.forEach(function(t){t.degree=t.mass,t.neighbours=0,o.nodes.forEach(function(e){n=0,t===e||t.fixedPosition||!o.options.seriesInteraction&&t.series!==e.series||(i=o.getDistXY(t,e),0>(r=o.vectorLength(i)-(t.marker.radius+e.marker.radius+a))&&(t.degree+=.01,t.neighbours++,n=o.repulsiveForce(-r/Math.sqrt(t.neighbours),o.k,t,e)),o.force("repulsive",t,n*e.mass,i,e,r))})})},applyLimitBox:function(e){if(this.options.splitSeries&&!e.isParentNode&&this.options.parentNodeLimit){var t=this.getDistXY(e,e.series.parentNode),n=e.series.parentNodeRadius-e.marker.radius-this.vectorLength(t);0>n&&n>-2*e.marker.radius&&(e.plotX-=.01*t.x,e.plotY-=.01*t.y)}r.prototype.applyLimitBox.apply(this,arguments)}}),i(e,"beforeRedraw",function(){this.allDataPoints&&delete this.allDataPoints})}),t(e,"Series/PackedBubble/PackedBubbleSeries.js",[e["Core/Color/Color.js"],e["Core/Globals.js"],e["Series/PackedBubble/PackedBubblePoint.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(e,o,s,t,n){var r,p=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=e.parse,i=t.series,h=t.seriesTypes.bubble,f=n.addEvent,m=n.clamp,l=n.defined,g=n.extend,y=n.fireEvent,b=n.isArray,v=n.isNumber,u=n.merge,c=n.pick,a=o.dragNodesMixin;return e=function(n){function e(){var e=null!==n&&n.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.chart=void 0,e.data=void 0,e.layout=void 0,e.options=void 0,e.points=void 0,e.xData=void 0,e}return p(e,n),e.prototype.accumulateAllPoints=function(e){var t,n,r=e.chart,i=[];for(t=0;t<r.series.length;t++)if((e=r.series[t]).is("packedbubble")&&e.visible||!r.options.chart.ignoreHiddenSeries)for(n=0;n<e.yData.length;n++)i.push([null,null,e.yData[n],e.index,n,{id:n,marker:{radius:0}}]);return i},e.prototype.addLayout=function(){var e=this.options.layoutAlgorithm,t=this.chart.graphLayoutsStorage,n=this.chart.graphLayoutsLookup,r=this.chart.options.chart;t||(this.chart.graphLayoutsStorage=t={},this.chart.graphLayoutsLookup=n=[]);var i=t[e.type];i||(e.enableSimulation=l(r.forExport)?!r.forExport:e.enableSimulation,t[e.type]=i=new o.layouts[e.type],i.init(e),n.splice(i.index,0,i)),this.layout=i,this.points.forEach(function(e){e.mass=2,e.degree=1,e.collisionNmb=1}),i.setArea(0,0,this.chart.plotWidth,this.chart.plotHeight),i.addElementsToCollection([this],i.series),i.addElementsToCollection(this.points,i.nodes)},e.prototype.addSeriesLayout=function(){var e=this.options.layoutAlgorithm,t=this.chart.graphLayoutsStorage,n=this.chart.graphLayoutsLookup,r=u(e,e.parentNodeOptions,{enableSimulation:this.layout.options.enableSimulation}),i=t[e.type+"-series"];i||(t[e.type+"-series"]=i=new o.layouts[e.type],i.init(r),n.splice(i.index,0,i)),this.parentNodeLayout=i,this.createParentNodes()},e.prototype.calculateParentRadius=function(){var e=this.seriesBox();this.parentNodeRadius=m(Math.sqrt(2*this.parentNodeMass/Math.PI)+20,20,e?Math.max(Math.sqrt(Math.pow(e.width,2)+Math.pow(e.height,2))/2+20,20):Math.sqrt(2*this.parentNodeMass/Math.PI)+20),this.parentNode&&(this.parentNode.marker.radius=this.parentNode.radius=this.parentNodeRadius)},e.prototype.calculateZExtremes=function(){var e=this.options.zMin,t=this.options.zMax,n=1/0,r=-1/0;return e&&t?[e,t]:(this.chart.series.forEach(function(e){e.yData.forEach(function(e){l(e)&&(e>r&&(r=e),e<n&&(n=e))})}),[e=c(e,n),t=c(t,r)])},e.prototype.checkOverlap=function(e,t){var n=e[0]-t[0],r=e[1]-t[1];return-.001>Math.sqrt(n*n+r*r)-Math.abs(e[2]+t[2])},e.prototype.createParentNodes=function(){var t,n=_____WB$wombat$check$this$function_____(this),e=n.chart,r=n.parentNodeLayout,i=n.parentNode,o=n.pointClass,a=n.layout.options,s={radius:n.parentNodeRadius,lineColor:n.color,fillColor:d(n.color).brighten(.4).get()};a.parentNodeOptions&&(s=u(a.parentNodeOptions.marker||{},s)),n.parentNodeMass=0,n.points.forEach(function(e){n.parentNodeMass+=Math.PI*Math.pow(e.marker.radius,2)}),n.calculateParentRadius(),r.nodes.forEach(function(e){e.seriesIndex===n.index&&(t=!0)}),r.setArea(0,0,e.plotWidth,e.plotHeight),t||(i||(i=(new o).init(this,{mass:n.parentNodeRadius/2,marker:s,dataLabels:{inside:!1},states:{normal:{marker:s},hover:{marker:s}},dataLabelOnNull:!0,degree:n.parentNodeRadius,isParentNode:!0,seriesIndex:n.index})),n.parentNode&&(i.plotX=n.parentNode.plotX,i.plotY=n.parentNode.plotY),n.parentNode=i,r.addElementsToCollection([n],r.series),r.addElementsToCollection([i],r.nodes))},e.prototype.deferLayout=function(){var e=this.options.layoutAlgorithm;this.visible&&(this.addLayout(),e.splitSeries&&this.addSeriesLayout())},e.prototype.destroy=function(){this.chart.graphLayoutsLookup&&this.chart.graphLayoutsLookup.forEach(function(e){e.removeElementFromCollection(this,e.series)},_____WB$wombat$check$this$function_____(this)),this.parentNode&&this.parentNodeLayout&&(this.parentNodeLayout.removeElementFromCollection(this.parentNode,this.parentNodeLayout.nodes),this.parentNode.dataLabel&&(this.parentNode.dataLabel=this.parentNode.dataLabel.destroy())),i.prototype.destroy.apply(this,arguments)},e.prototype.drawDataLabels=function(){var e=this.options.dataLabels.textPath,t=this.points;i.prototype.drawDataLabels.apply(this,arguments),this.parentNode&&(this.parentNode.formatPrefix="parentNode",this.points=[this.parentNode],this.options.dataLabels.textPath=this.options.dataLabels.parentNodeTextPath,i.prototype.drawDataLabels.apply(this,arguments),this.points=t,this.options.dataLabels.textPath=e)},e.prototype.drawGraph=function(){if(this.layout&&this.layout.options.splitSeries){var e=this.chart,t=this.layout.options.parentNodeOptions.marker,n={fill:t.fillColor||d(this.color).brighten(.4).get(),opacity:t.fillOpacity,stroke:t.lineColor||this.color,"stroke-width":c(t.lineWidth,this.options.lineWidth)};this.parentNodesGroup||(this.parentNodesGroup=this.plotGroup("parentNodesGroup","parentNode",this.visible?"inherit":"hidden",.1,e.seriesGroup),this.group.attr({zIndex:2})),this.calculateParentRadius(),t=u({x:this.parentNode.plotX-this.parentNodeRadius,y:this.parentNode.plotY-this.parentNodeRadius,width:2*this.parentNodeRadius,height:2*this.parentNodeRadius},n),this.parentNode.graphic||(this.graph=this.parentNode.graphic=e.renderer.symbol(n.symbol).add(this.parentNodesGroup)),this.parentNode.graphic.attr(t)}},e.prototype.drawTracker=function(){var t=this.parentNode;if(n.prototype.drawTracker.call(this),t){var e=b(t.dataLabels)?t.dataLabels:t.dataLabel?[t.dataLabel]:[];t.graphic&&(t.graphic.element.point=t),e.forEach(function(e){e.div?e.div.point=t:e.element.point=t})}},e.prototype.getPointRadius=function(){var n,r,i,o,a=_____WB$wombat$check$this$function_____(this),e=a.chart,s=a.options,p=s.useSimulation,d=Math.min(e.plotWidth,e.plotHeight),l={},h=[],u=e.allDataPoints;["minSize","maxSize"].forEach(function(e){var t=parseInt(s[e],10),n=/%$/.test(s[e]);l[e]=n?d*t/100:t*Math.sqrt(u.length)}),e.minRadius=n=l.minSize/Math.sqrt(u.length),e.maxRadius=r=l.maxSize/Math.sqrt(u.length);var c=p?a.calculateZExtremes():[n,r];(u||[]).forEach(function(e,t){i=p?m(e[2],c[0],c[1]):e[2],0===(o=a.getRadius(c[0],c[1],n,r,i))&&(o=null),u[t][2]=o,h.push(o)}),a.radii=h},e.prototype.init=function(){return i.prototype.init.apply(this,arguments),this.eventsToUnbind.push(f(this,"updatedData",function(){this.chart.series.forEach(function(e){e.type===this.type&&(e.isDirty=!0)},_____WB$wombat$check$this$function_____(this))})),_____WB$wombat$check$this$function_____(this)},e.prototype.onMouseUp=function(t){if(t.fixedPosition&&!t.removed){var n,r=this.layout,e=this.parentNodeLayout;e&&r.options.dragBetweenSeries&&e.nodes.forEach(function(e){t&&t.marker&&e!==t.series.parentNode&&(n=r.getDistXY(t,e),0>r.vectorLength(n)-e.marker.radius-t.marker.radius&&(e.series.addPoint(u(t.options,{plotX:t.plotX,plotY:t.plotY}),!1),r.removeElementFromCollection(t,r.nodes),t.remove()))}),a.onMouseUp.apply(this,arguments)}},e.prototype.placeBubbles=function(e){var t,n=this.checkOverlap,r=this.positionBubble,i=[],o=1,a=0,s=0,l=[];if((e=e.sort(function(e,t){return t[2]-e[2]})).length){if(i.push([[0,0,e[0][2],e[0][3],e[0][4]]]),1<e.length)for(i.push([[0,0-e[1][2]-e[0][2],e[1][2],e[1][3],e[1][4]]]),t=2;t<e.length;t++)e[t][2]=e[t][2]||1,n(l=r(i[o][a],i[o-1][s],e[t]),i[o][0])?(i.push([]),s=0,i[o+1].push(r(i[o][a],i[o][0],e[t])),o++,a=0):1<o&&i[o-1][s+1]&&n(l,i[o-1][s+1])?(s++,i[o].push(r(i[o][a],i[o-1][s],e[t])),a++):(a++,i[o].push(l));this.chart.stages=i,this.chart.rawPositions=[].concat.apply([],i),this.resizeRadius(),l=this.chart.rawPositions}return l},e.prototype.pointAttribs=function(e,t){var n=this.options,r=n.marker;return e&&e.isParentNode&&n.layoutAlgorithm&&n.layoutAlgorithm.parentNodeOptions&&(r=n.layoutAlgorithm.parentNodeOptions.marker),n=r.fillOpacity,e=i.prototype.pointAttribs.call(this,e,t),1!==n&&(e["fill-opacity"]=n),e},e.prototype.positionBubble=function(e,t,n){var r=Math.sqrt,i=Math.asin,o=Math.acos,a=Math.pow,s=Math.abs;return r=r(a(e[0]-t[0],2)+a(e[1]-t[1],2)),o=o((a(r,2)+a(n[2]+t[2],2)-a(n[2]+e[2],2))/(2*(n[2]+t[2])*r)),i=i(s(e[0]-t[0])/r),e=(0>e[1]-t[1]?0:Math.PI)+o+i*(0>(e[0]-t[0])*(e[1]-t[1])?1:-1),[t[0]+(t[2]+n[2])*Math.sin(e),t[1]-(t[2]+n[2])*Math.cos(e),n[2],n[3],n[4]]},e.prototype.render=function(){var t=[];i.prototype.render.apply(this,arguments),this.options.dataLabels.allowOverlap||(this.data.forEach(function(e){b(e.dataLabels)&&e.dataLabels.forEach(function(e){t.push(e)})}),this.options.useSimulation&&this.chart.hideOverlappingLabels(t))},e.prototype.resizeRadius=function(){var e,t,n,r=this.chart,i=r.rawPositions,o=Math.min,a=Math.max,c=r.plotLeft,p=r.plotTop,d=r.plotHeight,h=r.plotWidth,s=e=Number.POSITIVE_INFINITY,l=t=Number.NEGATIVE_INFINITY;for(n=0;n<i.length;n++){var u=i[n][2];s=o(s,i[n][0]-u),l=a(l,i[n][0]+u),e=o(e,i[n][1]-u),t=a(t,i[n][1]+u)}if(n=[l-s,t-e],o=o.apply([],[(h-c)/n[0],(d-p)/n[1]]),1e-10<Math.abs(o-1)){for(n=0;n<i.length;n++)i[n][2]*=o;this.placeBubbles(i)}else r.diffY=d/2+p-e-(t-e)/2,r.diffX=h/2+c-s-(l-s)/2},e.prototype.seriesBox=function(){var t,e=this.chart,n=Math.max,r=Math.min,i=[e.plotLeft,e.plotLeft+e.plotWidth,e.plotTop,e.plotTop+e.plotHeight];return this.data.forEach(function(e){l(e.plotX)&&l(e.plotY)&&e.marker.radius&&(t=e.marker.radius,i[0]=r(i[0],e.plotX-t),i[1]=n(i[1],e.plotX+t),i[2]=r(i[2],e.plotY-t),i[3]=n(i[3],e.plotY+t))}),v(i.width/i.height)?i:null},e.prototype.setVisible=function(){var t=_____WB$wombat$check$this$function_____(this);i.prototype.setVisible.apply(t,arguments),t.parentNodeLayout&&t.graph?t.visible?(t.graph.show(),t.parentNode.dataLabel&&t.parentNode.dataLabel.show()):(t.graph.hide(),t.parentNodeLayout.removeElementFromCollection(t.parentNode,t.parentNodeLayout.nodes),t.parentNode.dataLabel&&t.parentNode.dataLabel.hide()):t.layout&&(t.visible?t.layout.addElementsToCollection(t.points,t.layout.nodes):t.points.forEach(function(e){t.layout.removeElementFromCollection(e,t.layout.nodes)}))},e.prototype.translate=function(){var e,t=this.chart,n=this.data,r=this.index,i=this.options.useSimulation;if(this.processedXData=this.xData,this.generatePoints(),l(t.allDataPoints)||(t.allDataPoints=this.accumulateAllPoints(this),this.getPointRadius()),i)var o=t.allDataPoints;else o=this.placeBubbles(t.allDataPoints),this.options.draggable=!1;for(e=0;e<o.length;e++)if(o[e][3]===r){var a=n[o[e][4]],s=c(o[e][2],void 0);i||(a.plotX=o[e][0]-t.plotLeft+t.diffX,a.plotY=o[e][1]-t.plotTop+t.diffY),v(s)&&(a.marker=g(a.marker,{radius:s,width:2*s,height:2*s}),a.radius=s)}i&&this.deferLayout(),y(this,"afterTranslate")},e.defaultOptions=u(h.defaultOptions,{minSize:"10%",maxSize:"50%",sizeBy:"area",zoneAxis:"y",crisp:!1,tooltip:{pointFormat:"Value: {point.value}"},draggable:!0,useSimulation:!0,parentNode:{allowPointSelect:!1},dataLabels:{formatter:function(){var e=this.series.chart.numberFormatter,t=this.point.value;return v(t)?e(t,-1):""},parentNodeFormatter:function(){return this.name},parentNodeTextPath:{enabled:!0},padding:0,style:{transition:"opacity 2000ms"}},layoutAlgorithm:{initialPositions:"circle",initialPositionRadius:20,bubblePadding:5,parentNodeLimit:!1,seriesInteraction:!0,dragBetweenSeries:!1,parentNodeOptions:{maxIterations:400,gravitationalConstant:.03,maxSpeed:50,initialPositionRadius:100,seriesInteraction:!0,marker:{fillColor:null,fillOpacity:1,lineWidth:null,lineColor:null,symbol:"circle"}},enableSimulation:!0,type:"packedbubble",integration:"packedbubble",maxIterations:1e3,splitSeries:!1,maxSpeed:5,gravitationalConstant:.01,friction:-.981}}),e}(h),g(e.prototype,{alignDataLabel:i.prototype.alignDataLabel,axisTypes:[],directTouch:!0,forces:["barycenter","repulsive"],hasDraggableNodes:!0,isCartesian:!1,noSharedTooltip:!0,onMouseDown:a.onMouseDown,onMouseMove:a.onMouseMove,pointArrayMap:["value"],pointClass:s,pointValKey:"value",redrawHalo:a.redrawHalo,requireSorting:!1,searchPoint:o.noop,trackerGroups:["group","dataLabelsGroup","parentNodesGroup"]}),t.registerSeriesType("packedbubble",e),e}),t(e,"Series/Polygon/PolygonSeries.js",[e["Core/Globals.js"],e["Core/Legend/LegendSymbol.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(e,t,n,r){var i,o=_____WB$wombat$check$this$function_____(this)&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});e=e.noop;var a=n.series,s=n.seriesTypes,l=s.area,c=s.line,u=s.scatter;s=r.extend;var p=r.merge;return r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.data=void 0,e.options=void 0,e.points=void 0,e}return o(e,t),e.prototype.getGraphPath=function(){for(var e=c.prototype.getGraphPath.call(this),t=e.length+1;t--;)(t===e.length||"M"===e[t][0])&&0<t&&e.splice(t,0,["Z"]);return this.areaPath=e},e.prototype.drawGraph=function(){this.options.fillColor=this.color,l.prototype.drawGraph.call(this)},e.defaultOptions=p(u.defaultOptions,{marker:{enabled:!1,states:{hover:{enabled:!1}}},stickyTracking:!1,tooltip:{followPointer:!0,pointFormat:""},trackByArea:!0}),e}(u),s(r.prototype,{type:"polygon",drawLegendSymbol:t.drawRectangle,drawTracker:a.prototype.drawTracker,setStackedPoints:e}),n.registerSeriesType("polygon",r),r}),t(e,"Core/Axis/WaterfallAxis.js",[e["Extensions/Stacking.js"],e["Core/Utilities.js"]],function(a,e){var t,s=e.addEvent,l=e.objectEach;return function(e){function n(){var e=this.waterfall.stacks;e&&(e.changed=!1,delete e.alreadyChanged)}function r(){var e=this.options.stackLabels;e&&e.enabled&&this.waterfall.stacks&&this.waterfall.renderStackTotals()}function i(){for(var e=this.axes,t=this.series,n=t.length;n--;)t[n].options.stacking&&(e.forEach(function(e){e.isXAxis||(e.waterfall.stacks.changed=!0)}),n=0)}function o(){this.waterfall||(this.waterfall=new t(this))}var t=function(){function e(e){this.axis=e,this.stacks={changed:!1}}return e.prototype.renderStackTotals=function(){var e=this.axis,t=e.waterfall.stacks,n=e.stacking&&e.stacking.stackTotalGroup,r=new a(e,e.options.stackLabels,!1,0,void 0);this.dummyStackItem=r,l(t,function(e){l(e,function(e){r.total=e.stackTotal,e.label&&(r.label=e.label),a.prototype.render.call(r,n),e.label=r.label,delete r.label})}),r.total=null},e}();e.Composition=t,e.compose=function(e,t){s(e,"init",o),s(e,"afterBuildStacks",n),s(e,"afterRender",r),s(t,"beforeRedraw",i)}}(t||(t={})),t}),t(e,"Series/Waterfall/WaterfallPoint.js",[e["Series/Column/ColumnSeries.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],function(e,n,t){var r,i=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=t.isNumber;return function(t){function e(){var e=null!==t&&t.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.options=void 0,e.series=void 0,e}return i(e,t),e.prototype.getClassName=function(){var e=n.prototype.getClassName.call(this);return this.isSum?e+=" highcharts-sum":this.isIntermediateSum&&(e+=" highcharts-intermediate-sum"),e},e.prototype.isValid=function(){return o(this.y)||this.isSum||!!this.isIntermediateSum},e}(e.prototype.pointClass)}),t(e,"Series/Waterfall/WaterfallSeries.js",[e["Core/Axis/Axis.js"],e["Core/Chart/Chart.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"],e["Core/Axis/WaterfallAxis.js"],e["Series/Waterfall/WaterfallPoint.js"]],function(e,l,t,n,u,c){var r,p=_____WB$wombat$check$this$function_____(this)&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=t.seriesTypes,g=i.column,o=i.line,a=n.arrayMax,s=n.arrayMin,f=n.correctFloat;i=n.extend;var y=n.isNumber,d=n.merge,m=n.objectEach,b=n.pick;return n=function(h){function e(){var e=null!==h&&h.apply(this,arguments)||_____WB$wombat$check$this$function_____(this);return e.chart=void 0,e.data=void 0,e.options=void 0,e.points=void 0,e.stackedYNeg=void 0,e.stackedYPos=void 0,e.stackKey=void 0,e.xData=void 0,e.yAxis=void 0,e.yData=void 0,e}return p(e,h),e.prototype.generatePoints=function(){var e;g.prototype.generatePoints.apply(this);var t=0;for(e=this.points.length;t<e;t++){var n=this.points[t],r=this.processedYData[t];(n.isIntermediateSum||n.isSum)&&(n.y=f(r))}},e.prototype.translate=function(){var e=this.options,t=this.yAxis,c=b(e.minPointLength,5),p=c/2,d=e.threshold||0,n=d,h=d;e=e.stacking;var f=t.waterfall.stacks[this.stackKey];g.prototype.translate.apply(this);for(var m=this.points,r=0;r<m.length;r++){var i=m[r],o=this.processedYData[r],a=i.shapeArgs;if(a&&y(o)){var s=[0,o],l=i.y;if(e){if(f){if(s=f[r],"overlap"===e){var u=s.stackState[s.stateIndex--];u=0<=l?u:u-l,Object.hasOwnProperty.call(s,"absolutePos")&&delete s.absolutePos,Object.hasOwnProperty.call(s,"absoluteNeg")&&delete s.absoluteNeg}else 0<=l?(u=s.threshold+s.posTotal,s.posTotal-=l):(u=s.threshold+s.negTotal,s.negTotal-=l,u-=l),!s.posTotal&&Object.hasOwnProperty.call(s,"absolutePos")&&(s.posTotal=s.absolutePos,delete s.absolutePos),!s.negTotal&&Object.hasOwnProperty.call(s,"absoluteNeg")&&(s.negTotal=s.absoluteNeg,delete s.absoluteNeg);i.isSum||(s.connectorThreshold=s.threshold+s.stackTotal),t.reversed?(o=0<=l?u-l:u+l,l=u):(o=u,l=u-l),i.below=o<=d,a.y=t.translate(o,!1,!0,!1,!0)||0,a.height=Math.abs(a.y-(t.translate(l,!1,!0,!1,!0)||0)),(l=t.waterfall.dummyStackItem)&&(l.x=r,l.label=f[r].label,l.setOffset(this.pointXOffset||0,this.barW||0,this.stackedYNeg[r],this.stackedYPos[r]))}}else u=Math.max(n,n+l)+s[0],a.y=t.translate(u,!1,!0,!1,!0)||0,i.isSum?(a.y=t.translate(s[1],!1,!0,!1,!0)||0,a.height=Math.min(t.translate(s[0],!1,!0,!1,!0)||0,t.len)-a.y,i.below=s[1]<=d):i.isIntermediateSum?(0<=l?(o=s[1]+h,l=h):(o=h,l=s[1]+h),t.reversed&&(o^=l,o^=l^=o),a.y=t.translate(o,!1,!0,!1,!0)||0,a.height=Math.abs(a.y-Math.min(t.translate(l,!1,!0,!1,!0)||0,t.len)),h+=s[1],i.below=o<=d):(a.height=0<o?(t.translate(n,!1,!0,!1,!0)||0)-a.y:(t.translate(n,!1,!0,!1,!0)||0)-(t.translate(n-o,!1,!0,!1,!0)||0),n+=o,i.below=n<d),0>a.height&&(a.y+=a.height,a.height*=-1);i.plotY=a.y=Math.round(a.y||0)-this.borderWidth%2/2,a.height=Math.max(Math.round(a.height||0),.001),i.yBottom=a.y+a.height,a.height<=c&&!i.isNull?(a.height=c,a.y-=p,i.plotY=a.y,i.minPointLengthOffset=0>i.y?-p:p):(i.isNull&&(a.width=0),i.minPointLengthOffset=0),l=i.plotY+(i.negative?a.height:0),i.below&&(i.plotY+=a.height),i.tooltipPos&&(this.chart.inverted?i.tooltipPos[0]=t.len-l:i.tooltipPos[1]=l)}}},e.prototype.processData=function(c){var e,t,n,r,i,o=this.options,a=this.yData,s=o.data,p=a.length,d=o.threshold||0;for(i=t=e=n=r=0;i<p;i++){var l=a[i],u=s&&s[i]?s[i]:{};"sum"===l||u.isSum?a[i]=f(t):"intermediateSum"===l||u.isIntermediateSum?(a[i]=f(e),e=0):(t+=l,e+=l),n=Math.min(t,n),r=Math.max(t,r)}h.prototype.processData.call(this,c),o.stacking||(this.dataMin=n+d,this.dataMax=r)},e.prototype.toYData=function(e){return e.isSum?"sum":e.isIntermediateSum?"intermediateSum":e.y},e.prototype.updateParallelArrays=function(e,t){h.prototype.updateParallelArrays.call(this,e,t),"sum"!==this.yData[0]&&"intermediateSum"!==this.yData[0]||(this.yData[0]=null)},e.prototype.pointAttribs=function(e,t){var n=this.options.upColor;return n&&!e.options.color&&(e.color=0<e.y?n:null),delete(e=g.prototype.pointAttribs.call(this,e,t)).dashstyle,e},e.prototype.getGraphPath=function(){return[["M",0,0]]},e.prototype.getCrispPath=function(){var e,t=this.data,n=this.yAxis,c=t.length,p=Math.round(this.graph.strokeWidth())%2/2,d=Math.round(this.borderWidth)%2/2,h=this.xAxis.reversed,r=this.yAxis.reversed,f=this.options.stacking,i=[];for(e=1;e<c;e++){var o=t[e].shapeArgs,a=t[e-1],s=t[e-1].shapeArgs,l=n.waterfall.stacks[this.stackKey],u=0<a.y?-s.height:0;l&&s&&o&&(l=l[e-1],f?(l=l.connectorThreshold,u=Math.round(n.translate(l,0,1,0,1)+(r?u:0))-p):u=s.y+a.minPointLengthOffset+d-p,i.push(["M",(s.x||0)+(h?0:s.width||0),u],["L",(o.x||0)+(h&&o.width||0),u])),s&&i.length&&(!f&&0>a.y&&!r||0<a.y&&r)&&((a=i[i.length-2])&&"number"==typeof a[2]&&(a[2]+=s.height||0),(a=i[i.length-1])&&"number"==typeof a[2]&&(a[2]+=s.height||0))}return i},e.prototype.drawGraph=function(){o.prototype.drawGraph.call(this),this.graph.attr({d:this.getCrispPath()})},e.prototype.setStackedPoints=function(){function c(e,t,n,r){if(w)for(;n<w;n++)s.stackState[n]+=r;else s.stackState[0]=e,w=s.stackState.length;s.stackState.push(s.stackState[w-1]+t)}var e,t,p,d=this.options,n=this.yAxis.waterfall.stacks,h=d.threshold,r=h||0,f=r,i=this.stackKey,m=this.xData,g=m.length;this.yAxis.stacking.usePercentage=!1;var y=t=p=r;if(this.visible||!this.chart.options.chart.ignoreHiddenSeries){var b=n.changed;(e=n.alreadyChanged)&&0>e.indexOf(i)&&(b=!0),n[i]||(n[i]={}),e=n[i];for(var o=0;o<g;o++){var a=m[o];e[a]&&!b||(e[a]={negTotal:0,posTotal:0,stackTotal:0,threshold:0,stateIndex:0,stackState:[],label:b&&e[a]?e[a].label:void 0});var s=e[a],l=this.yData[o];0<=l?s.posTotal+=l:s.negTotal+=l;var u=d.data[o];a=s.absolutePos=s.posTotal;var v=s.absoluteNeg=s.negTotal;s.stackTotal=a+v;var w=s.stackState.length;u&&u.isIntermediateSum?(c(p,t,0,p),p=t,t=h,r^=f,r^=f^=r):u&&u.isSum?(c(h,y,w),r=h):(c(r,l,0,y),u&&(y+=l,t+=l)),s.stateIndex++,s.threshold=r,r+=s.stackTotal}n.changed=!1,n.alreadyChanged||(n.alreadyChanged=[]),n.alreadyChanged.push(i)}},e.prototype.getExtremes=function(){var e=this.options.stacking;if(e){var t=this.yAxis;t=t.waterfall.stacks;var n=this.stackedYNeg=[],r=this.stackedYPos=[];return m(t[this.stackKey],"overlap"===e?function(e){n.push(s(e.stackState)),r.push(a(e.stackState))}:function(e){n.push(e.negTotal+e.threshold),r.push(e.posTotal+e.threshold)}),{dataMin:s(n),dataMax:a(r)}}return{dataMin:this.dataMin,dataMax:this.dataMax}},e.defaultOptions=d(g.defaultOptions,{dataLabels:{inside:!0},lineWidth:1,lineColor:"#333333",dashStyle:"Dot",borderColor:"#333333",states:{hover:{lineWidthPlus:0}}}),e}(g),i(n.prototype,{getZonesGraphs:o.prototype.getZonesGraphs,pointValKey:"y",showLine:!0,pointClass:c}),t.registerSeriesType("waterfall",n),u.compose(e,l),n}),t(e,"Extensions/Polar.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Chart/Chart.js"],e["Core/Globals.js"],e["Extensions/Pane.js"],e["Core/Pointer.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Utilities.js"]],function(e,t,g,a,n,r,i,s,v){var y=e.animObject;i=i.seriesTypes;var o=v.addEvent,E=v.defined,u=v.find,w=v.isNumber,m=v.pick,c=v.splat,p=v.uniqueKey;e=v.wrap;var l=r.prototype;n=n.prototype,l.searchPointByAngle=function(e){var t=this.chart,n=this.xAxis.pane.center;return this.searchKDTree({clientX:180+-180/Math.PI*Math.atan2(e.chartX-n[0]-t.plotLeft,e.chartY-n[1]-t.plotTop)})},l.getConnectors=function(e,t,c,n){var r=n?1:0,i=0<=t&&t<=e.length-1?t:0>t?e.length-1+t:0;t=0>i-1?e.length-(1+r):i-1,r=i+1>e.length-1?r:i+1;var o=e[t];r=e[r];var a=o.plotX;o=o.plotY;var s=r.plotX,l=r.plotY;a=(1.5*(r=e[i].plotX)+a)/2.5,o=(1.5*(i=e[i].plotY)+o)/2.5,s=(1.5*r+s)/2.5;var u=(1.5*i+l)/2.5;l=Math.sqrt(Math.pow(a-r,2)+Math.pow(o-i,2));var p=Math.sqrt(Math.pow(s-r,2)+Math.pow(u-i,2));return a=Math.atan2(o-i,a-r),u=Math.PI/2+(a+Math.atan2(u-i,s-r))/2,Math.abs(a-u)>Math.PI/2&&(u-=Math.PI),a=r+Math.cos(u)*l,o=i+Math.sin(u)*l,r={rightContX:s=r+Math.cos(Math.PI+u)*p,rightContY:u=i+Math.sin(Math.PI+u)*p,leftContX:a,leftContY:o,plotX:r,plotY:i},c&&(r.prevPointCont=this.getConnectors(e,t,!1,n)),r},l.toXY=function(e){var t=this.chart,n=this.xAxis,r=this.yAxis,i=e.plotX,o=e.plotY,a=e.series,s=t.inverted,l=e.y,u=s?i:r.len-o;s&&a&&!a.isRadialBar&&(e.plotY=o="number"==typeof l&&r.translate(l)||0),e.rectPlotX=i,e.rectPlotY=o,r.center&&(u+=r.center[3]/2),w(o)&&(r=s?r.postTranslate(o,u):n.postTranslate(i,u),e.plotX=e.polarPlotX=r.x-t.plotLeft,e.plotY=e.polarPlotY=r.y-t.plotTop),this.kdByAngle?(0>(t=(i/Math.PI*180+n.pane.options.startAngle)%360)&&(t+=360),e.clientX=t):e.clientX=e.plotX},i.spline&&(e(i.spline.prototype,"getPointSpline",function(e,t,n,r){return this.chart.polar?r?(t=(e=this.getConnectors(t,r,!0,this.connectEnds)).prevPointCont&&e.prevPointCont.rightContX,n=e.prevPointCont&&e.prevPointCont.rightContY,e=["C",w(t)?t:e.plotX,w(n)?n:e.plotY,w(e.leftContX)?e.leftContX:e.plotX,w(e.leftContY)?e.leftContY:e.plotY,e.plotX,e.plotY]):e=["M",n.plotX,n.plotY]:e=e.call(this,t,n,r),e}),i.areasplinerange&&(i.areasplinerange.prototype.getPointSpline=i.spline.prototype.getPointSpline)),o(r,"afterTranslate",function(){var t=this.chart;if(t.polar&&this.xAxis){if((this.kdByAngle=t.tooltip&&t.tooltip.shared)?this.searchPoint=this.searchPointByAngle:this.options.findNearestPointBy="xy",!this.preventPostTranslate)for(var e=this.points,n=e.length;n--;)this.toXY(e[n]),!t.hasParallelCoordinates&&!this.yAxis.reversed&&e[n].y<this.yAxis.min&&(e[n].isNull=!0);this.hasClipCircleSetter||(this.hasClipCircleSetter=!!this.eventsToUnbind.push(o(this,"afterRender",function(){if(t.polar){var e=this.yAxis.pane.center;this.clipCircle?this.clipCircle.animate({x:e[0],y:e[1],r:e[2]/2,innerR:e[3]/2}):this.clipCircle=t.renderer.clipCircle(e[0],e[1],e[2]/2,e[3]/2),this.group.clip(this.clipCircle),this.setClip=g.noop}})))}},{order:2}),e(i.line.prototype,"getGraphPath",function(e,t){var n,r=_____WB$wombat$check$this$function_____(this);if(this.chart.polar){for(t=t||this.points,n=0;n<t.length;n++)if(!t[n].isNull){var i=n;break}if(!1!==this.options.connectEnds&&void 0!==i){this.connectEnds=!0,t.splice(t.length,0,t[i]);var o=!0}t.forEach(function(e){void 0===e.polarPlotY&&r.toXY(e)})}return n=e.apply(this,[].slice.call(arguments,1)),o&&t.pop(),n});var d=function(e,t){var n,r,i,c,o=_____WB$wombat$check$this$function_____(this),a=this.chart,s=this.options.animation,p=this.group,l=this.markerGroup,u=this.xAxis&&this.xAxis.center,d=a.plotLeft,h=a.plotTop;if(a.polar){if(o.isRadialBar)t||(o.startAngleRad=m(o.translatedThreshold,o.xAxis.startAngleRad),g.seriesTypes.pie.prototype.animate.call(o,t));else if(a.renderer.isSVG)if(s=y(s),o.is("column")){if(!t){var f=u[3]/2;o.points.forEach(function(e){n=e.graphic,i=(r=e.shapeArgs)&&r.r,c=r&&r.innerR,n&&r&&(n.attr({r:f,innerR:f}),n.animate({r:i,innerR:c},o.options.animation))})}}else t?(e={translateX:u[0]+d,translateY:u[1]+h,scaleX:.001,scaleY:.001},p.attr(e),l&&l.attr(e)):(e={translateX:d,translateY:h,scaleX:1,scaleY:1},p.animate(e,s),l&&l.animate(e,s))}else e.call(this,t)};if(e(l,"animate",d),i.column){var h=i.arearange.prototype;(i=i.column.prototype).polarArc=function(e,t,n,r){var i=this.xAxis.center,o=this.yAxis.len,a=i[3]/2;return t=o-t+a,e=o-m(e,o)+a,this.yAxis.reversed&&(0>t&&(t=a),0>e&&(e=a)),{x:i[0],y:i[1],r:t,innerR:e,start:n,end:r}},e(i,"animate",d),e(i,"translate",function(c){var e=this.options,p=e.stacking,d=this.chart,t=this.xAxis,n=this.yAxis,h=n.reversed,r=n.center,i=t.startAngleRad,f=t.endAngleRad-i;if(this.preventPostTranslate=!0,c.call(this),t.isRadial){t=(c=this.points).length;var m=n.translate(n.min),g=n.translate(n.max);if(e=e.threshold||0,d.inverted&&w(e)){var o=n.translate(e);E(o)&&(0>o?o=0:o>f&&(o=f),this.translatedThreshold=o+i)}for(;t--;){var a=(e=c[t]).barX,y=e.x,s=e.y;if(e.shapeType="arc",d.inverted){var b;if(e.plotY=n.translate(s),p&&n.stacking){if(s=n.stacking.stacks[(0>s?"-":"")+this.stackKey],this.visible&&s&&s[y]&&!e.isNull){var l=s[y].points[this.getStackIndicator(void 0,y,this.index).key],u=n.translate(l[0]);l=n.translate(l[1]),E(u)&&(u=v.clamp(u,0,f))}}else u=o,l=e.plotY;u>l&&(b=u,u=l,l=b),h?l>m?l=m:u<g?u=g:(u>m||l<g)&&(u=l=f):u<m?u=m:l>g?l=g:(l<m||u>g)&&(u=l=0),n.min>n.max&&(u=l=h?f:0),u+=i,l+=i,r&&(e.barX=a+=r[3]/2),y=Math.max(a,0),s=Math.max(a+e.pointWidth,0),e.shapeArgs={x:r&&r[0],y:r&&r[1],r:s,innerR:y,start:u,end:l},e.opacity=u===l?0:void 0,e.plotY=(E(this.translatedThreshold)&&(u<this.translatedThreshold?u:l))-i}else u=a+i,e.shapeArgs=this.polarArc(e.yBottom,e.plotY,u,u+e.pointWidth);this.toXY(e),d.inverted?(a=n.postTranslate(e.rectPlotY,a+e.pointWidth/2),e.tooltipPos=[a.x-d.plotLeft,a.y-d.plotTop]):e.tooltipPos=[e.plotX,e.plotY],r&&(e.ttBelow=e.plotY>r[1])}}}),i.findAlignments=function(e,t){return null===t.align&&(t.align=20<e&&160>e?"left":200<e&&340>e?"right":"center"),null===t.verticalAlign&&(t.verticalAlign=45>e||315<e?"bottom":135<e&&225>e?"top":"middle"),t},h&&(h.findAlignments=i.findAlignments),e(i,"alignDataLabel",function(e,t,n,r,i,o){var a=this.chart,s=m(r.inside,!!this.options.stacking);a.polar?(e=t.rectPlotX/Math.PI*180,a.inverted?(this.forceDL=a.isInsidePlot(t.plotX,Math.round(t.plotY)),s&&t.shapeArgs?(i=t.shapeArgs,i={x:(i=this.yAxis.postTranslate(((i.start||0)+(i.end||0))/2-this.xAxis.startAngleRad,t.barX+t.pointWidth/2)).x-a.plotLeft,y:i.y-a.plotTop}):t.tooltipPos&&(i={x:t.tooltipPos[0],y:t.tooltipPos[1]}),r.align=m(r.align,"center"),r.verticalAlign=m(r.verticalAlign,"middle")):this.findAlignments&&(r=this.findAlignments(e,r)),l.alignDataLabel.call(this,t,n,r,i,o),this.isRadialBar&&t.shapeArgs&&t.shapeArgs.start===t.shapeArgs.end&&n.hide(!0)):e.call(this,t,n,r,i,o)})}e(n,"getCoordinates",function(e,i){var o=this.chart,a={xAxis:[],yAxis:[]};return o.polar?o.axes.forEach(function(e){var t=e.isXAxis,n=e.center;if("colorAxis"!==e.coll){var r=i.chartX-n[0]-o.plotLeft;n=i.chartY-n[1]-o.plotTop,a[t?"xAxis":"yAxis"].push({axis:e,value:e.translate(t?Math.PI-Math.atan2(r,n):Math.sqrt(Math.pow(r,2)+Math.pow(n,2)),!0)})}}):a=e.call(this,i),a}),s.prototype.clipCircle=function(e,t,n,r){var i=p(),o=this.createElement("clipPath").attr({id:i}).add(this.defs);return(e=r?this.arc(e,t,n,r,0,2*Math.PI).add(o):this.circle(e,t,n).add(o)).id=i,e.clipPath=o,e},o(t,"getAxes",function(){this.pane||(this.pane=[]),this.options.pane=c(this.options.pane),this.options.pane.forEach(function(e){new a(e,_____WB$wombat$check$this$function_____(this))},_____WB$wombat$check$this$function_____(this))}),o(t,"afterDrawChartBox",function(){this.pane.forEach(function(e){e.render()})}),o(r,"afterInit",function(){var e=this.chart;e.inverted&&e.polar&&(this.isRadialSeries=!0,this.is("column")&&(this.isRadialBar=!0))}),e(t.prototype,"get",function(e,t){return u(this.pane||[],function(e){return e.options.id===t})||e.call(this,t)})}),t(e,"masters/highcharts-more.src.js",[e["Core/Globals.js"],e["Core/Axis/RadialAxis.js"],e["Series/Bubble/BubbleSeries.js"]],function(e,t,n){t.compose(e.Axis,e.Tick),n.compose(e.Chart,e.Legend,e.Series)})},i?(r.default=r,i=r):"function"==typeof define&&define.amd?define("highcharts/highcharts-more",["highcharts"],function(e){return r(e),r.Highcharts=e,r}):r("undefined"!=typeof Highcharts?Highcharts:void 0);i(n),window.Highcharts=n}();SM.Slider=SM.Widgets.register({__NAME:"slider",__init:function(){this._cacheElements()._setLayoutData()._setValues()._bindEvents()},__defaults:{constraints:{min:0,max:100,step:1},value:0,rangeMin:0,rangeMax:100,options:{restrictStepSize:true,animateClick:false}},__setters:{constraints:function(e,t){e._setConstraints(t)},rangeMin:function(e,t){if(!e._isRange){return}e._setRangeMinView(t)._setRangeMin(t)},rangeMax:function(e,t){if(!e._isRange){return}e._setRangeMaxView(t)._setRangeMax(t)},value:function(e,t){if(e._isRange){return}e._setValueView(t)._setValue(t)},restrictStepSize:function(e,t){if(typeof t!=="boolean"){return}e._setStepSizeRestriction(t)}},_setConstraints:function(e){SM.Object.update(this.__settings.constraints,e);this._setLayoutData()._setValues().__trigger("constraintChange");return _____WB$wombat$check$this$function_____(this)},_setValue:function(e){var t=this.__settings,n=t.constraints;e=this._constrainValue(n.min,n.max,e);if(t.value===e){return _____WB$wombat$check$this$function_____(this)}t.value=e;this.__trigger("change");return _____WB$wombat$check$this$function_____(this)},_setRangeMax:function(e){var t=this.__settings,n=t.constraints;e=this._constrainValue(t.rangeMin+n.step,n.max,e);if(t.rangeMax===e){return _____WB$wombat$check$this$function_____(this)}t.rangeMax=e;this.__trigger("change");return _____WB$wombat$check$this$function_____(this)},_setRangeMin:function(e){var t=this.__settings,n=t.constraints;e=this._constrainValue(n.min,t.rangeMax-n.step,e);if(t.rangeMin===e){return _____WB$wombat$check$this$function_____(this)}t.rangeMin=e;this.__trigger("change");return _____WB$wombat$check$this$function_____(this)},_setStepSizeRestriction:function(e){var t=this.__settings,n=t.options.restrictStepSize;if(!n&&e&&!this._stepSizeDividePerfectly()){throw new Error("Cannot restrict the step size of a slider that previously allowed and "+"had a step size that didn't divide max - min")}t.options.restrictStepSize=e;return _____WB$wombat$check$this$function_____(this)},_stepSizeDividePerfectly:function(){var e=this.__settings.constraints,t=e.max-e.min;return t%e.step===0},_setValueView:function(e,t){var n,r=this.__settings,i=r.constraints;e=this._constrainValue(i.min,i.max,e);n=this._valueToHandlePosition(e);if(this._handleLabel){this._$label.text(e)}if(!t){this.__trigger({type:"slide",value:e,$label:this._$label})}else{this.__trigger({type:"start",value:e,$label:this._$label})}if(!r.options.animateClick||!t){this._$handle.css("left",n)}else{this._$handle.stop().animate({left:n},300)}if(this._handleLabel){this._positionLabel(this._$label,this._$handle)}return _____WB$wombat$check$this$function_____(this)},_setRangeMaxView:function(e){var t,n=this.__settings,r=n.constraints;e=this._constrainValue(n.rangeMin+r.step,r.max,e);t=this._valueToHandlePosition(e);this._$maxHandle.css("left",t);if(this._handleLabel){this._$maxLabel.text(e)}this.__trigger({type:"slide",value:e,$label:this._$maxLabel});if(this._handleLabel){this._positionLabel(this._$maxLabel,this._$maxHandle)}this._adjustMaxEnd(t);return _____WB$wombat$check$this$function_____(this)},_setRangeMinView:function(e){var t,n=this.__settings,r=n.constraints;e=this._constrainValue(r.min,n.rangeMax-r.step,e);t=this._valueToHandlePosition(e);this._$minHandle.css("left",t);if(this._handleLabel){this._$minLabel.text(e)}this.__trigger({type:"slide",value:e,$label:this._$minLabel});if(this._handleLabel){this._positionLabel(this._$minLabel,this._$minHandle)}this._adjustMinEnd(t);return _____WB$wombat$check$this$function_____(this)},_cacheElements:function(){this._$handle=this.$el.find("a");if(this._$handle.length>1){this._$minHandle=this._$handle.eq(0);this._$maxHandle=this._$handle.eq(1);this._$range=this.$el.find("div");this._isRange=true}this._$label=this.$el.find("span.slider-label");this._handleLabel=this._$label.length>0;if(this._$label.length>1){this._$minLabel=this._$label.eq(0);this._$maxLabel=this._$label.eq(1)}return _____WB$wombat$check$this$function_____(this)},_setLayoutData:function(){var e=this.__settings.constraints,t;t=e.max-e.min;if(this.__settings.options.restrictStepSize&&!this._stepSizeDividePerfectly()){throw new Error("your min - max must be divisible by your step")}this._width=this.$el.outerWidth();this._stepPixelDistance=this._width/t*e.step;return _____WB$wombat$check$this$function_____(this)},_setValues:function(){var e=this.__settings;if(!this._isRange){this._setValueView(e.value)._setValue(e.value).__trigger("change")}else{this._setRangeMinView(e.rangeMin)._setRangeMin(e.rangeMin)._setRangeMaxView(e.rangeMax)._setRangeMax(e.rangeMax).__trigger("change")}return _____WB$wombat$check$this$function_____(this)},_bindEvents:function(){if(this._isRange){this.$el.on("click",{slider:this},this._onRangeClick);this._$minHandle.on("mousedown",{slider:this,setter:"_setRangeMin"},this._onHandleMouseDown).on("touchstart",{slider:this,setter:"_setRangeMin"},this._onHandleMouseDown).on("keydown",{slider:this,viewSetter:"_setRangeMinView"},this._onHandleKeyDown).on("keyup",{slider:this,setter:"_setRangeMin"},this._onHandleKeyUp).on("click",this._onHandleClick);this._$maxHandle.on("mousedown",{slider:this,setter:"_setRangeMax"},this._onHandleMouseDown).on("touchstart",{slider:this,setter:"_setRangeMax"},this._onHandleMouseDown).on("keydown",{slider:this,viewSetter:"_setRangeMaxView"},this._onHandleKeyDown).on("keyup",{slider:this,setter:"_setRangeMax"},this._onHandleKeyUp).on("click",{slider:this},this._onHandleClick)}else{this.$el.on("click",{slider:this},this._onClick);this._$handle.on("mousedown",{slider:this,setter:"_setValue"},this._onHandleMouseDown).on("touchstart",{slider:this,setter:"_setValue"},this._onHandleMouseDown).on("keydown",{slider:this,viewSetter:"_setValueView"},this._onHandleKeyDown).on("keyup",{slider:this,setter:"_setValue"},this._onHandleKeyUp).on("click",{slider:this},this._onHandleClick)}if(this._handleLabel){$(window).on("resize."+this.__NAME+this.__uid,{slider:this},this._onGlobalResize)}return _____WB$wombat$check$this$function_____(this)},_valueToHandlePosition:function(e){var t=this.__settings.constraints,n=e-t.min,r=Math.round(n/t.step),i=e===t.max?this._width:r*this._stepPixelDistance;return i},_handlePositionToValue:function(e){var t=this.__settings.constraints,n=Math.ceil(this._width/this._stepPixelDistance),r=Math.round(e/this._stepPixelDistance),i=r*t.step,o=i+t.min,a=this._width-this._stepPixelDistance*(n-1),s=e-this._stepPixelDistance*(n-1);if(Math.ceil(e/this._stepPixelDistance)===n&&s>a/2){return t.max}return o},_adjustMinEnd:function(e){this._$range.css("left",e)},_adjustMaxEnd:function(e){this._$range.css("right",this._width-e)},_constrainValue:function(e,t,n){if(n>t){n=t}else if(n<e){n=e}return n},_positionLabel:function(e,t){var n=parseInt(t.css("left"),10),r=t.outerWidth(),i,o=e.outerWidth();if(!e.is(":visible")){o=e.appendTo(document.body).outerWidth();e.appendTo(this.$el)}i=n-(o-r)/2;e.css("left",i);return _____WB$wombat$check$this$function_____(this)},_onClick:function(e){var t=e.data.slider,n=e.pageX-t.$el.offset().left,r=t._handlePositionToValue(n);t._setValueView(r,true);t._setValue(r);t.__trigger("change")},_onRangeClick:function(e){var t=e.data.slider,n=e.pageX-t.$el.offset().left,r=t._handlePositionToValue(n),i=Math.abs(r-t.__settings.rangeMax),o=Math.abs(r-t.__settings.rangeMin);if(i<=o){t._setRangeMaxView(r);t._setRangeMax(r)}else{t._setRangeMinView(r);t._setRangeMin(r)}},_onHandleKeyDown:function(e){var t=$(this),n=e.data.slider,r=n.__settings.constraints,i=e.data.viewSetter,o=e.which,a=n._handlePositionToValue(parseInt(t.css("left"),10));if(!o){return}if(o===SM.KeyCodes.LEFT){n.__trigger("start");n[i](a-r.step)}else if(o===SM.KeyCodes.RIGHT){n.__trigger("start");n[i](a+r.step)}},_onHandleKeyUp:function(e){var t=$(this),n=e.data.slider,r=e.data.setter,i=e.which,o=n._handlePositionToValue(parseInt(t.css("left"),10));if(!i){return}if(i===SM.KeyCodes.LEFT){n[r](o)}else if(i===SM.KeyCodes.RIGHT){n[r](o)}},_onHandleClick:function(e){e.preventDefault()},_onHandleMouseDown:function(e){var t=$(this),n=e.data.setter+"View",r=e.data.slider;this.ondragstart=function(){return false};document.onselectstart=function(){return false};t.focus();r.__trigger("start").__subscribe("touchend",r._onGlobalMouseup,{valueSetter:e.data.setter}).__subscribe("touchmove",r._onGlobalMousemove,{viewSetter:n}).__subscribe("mouseup",r._onGlobalMouseup,{valueSetter:e.data.setter}).__subscribe("mousemove",r._onGlobalMousemove,{viewSetter:n});e.preventDefault()},_onGlobalMouseup:function(e){var t=e.data.slider,n=e.type==="touchend"?parseInt($(e.target).css("left").replace("px",""),10):e.pageX,r=e.type==="touchend"?n:n-t.$el.offset().left,i=e.data.valueSetter,o=t._handlePositionToValue(r);t.__unsubscribe("touchmove").__unsubscribe("touchend").__unsubscribe("mousemove").__unsubscribe("mouseup");document.onselectstart=null;t[i](o,true);t.__trigger("stop")},_onGlobalMousemove:function(e){var t=e.data.slider,n=e.data.viewSetter,r=e.type==="touchmove"?e.originalEvent.touches[0].pageX:e.pageX,i=r-t.$el.offset().left,o=t._handlePositionToValue(i);t[n](o)},_onGlobalResize:function(e){var t=e.data.slider;if(t._isRange){t._positionLabel(t._$minLabel,t._$minHandle);t._positionLabel(t._$maxLabel,t._$maxHandle)}else{t._positionLabel(t._$label,t._$handle)}}});SM.InfiniteScroll=SM.Widgets.register({__NAME:"infiniteScroll",__defaults:{threshold:100,markerID:"",windowScroll:false,onReachedEnd:function(){},isActive:true},LATENCY:200,removeMarker:function(){this._getMarker().remove()},__init:function(){var e=_____WB$wombat$check$this$function_____(this);this._$window=$(window);this.__settings.markerID="#"+this.__settings.markerID;this._hasLeftThreshold=true;if(this.__settings.isActive){this._bindEvents();setTimeout(function(){if(e._isInThreshold()){e._hitThreshold()}},0)}},__setters:{isActive:function(e,t){if(t){e._activate()}else{e._deactivate()}}},_activate:function(){if(!this._hasMarker()){this._deactivate()}if(!this.__settings.isActive){this.__settings.isActive=true;this._hasLeftThreshold=true;this._bindEvents();if(this._isInThreshold()){this._hitThreshold()}}},_deactivate:function(){if(this.__settings.isActive||!this._hasMarker()){this.__settings.isActive=false;this._unbindEvents()}},__destroy:function(){this.set("isActive",false)},_bindEvents:function(){if(this.get("windowScroll")){this._$window.on("scroll",{self:this},this._onScroll)}else{this.$el.on("scroll",{self:this},this._onScroll)}this._$window.on("resize",{self:this},this._onScroll)},_unbindEvents:function(){if(this.get("windowScroll")){this._$window.off("scroll",this._onScroll)}else{this.$el.off("scroll",this._onScroll)}this._$window.off("resize",this._onScroll)},_hasMarker:function(){return this._getMarker().length>0},_hitThreshold:function(){if(this.__settings.isActive){this.set("isActive",false);this.__settings.onReachedEnd(this);this.trigger("reachedEnd")}},_getScrollBottom:function(){if(this.__settings.windowScroll){return this._$window.scrollTop()+this._$window.height()}return this.$el.scrollTop()+this.el.clientHeight},_getMarker:function(){return $(this.get("markerID"))},_getMarkerTop:function(){var e=this._getMarker(),t;if(this.__settings.windowScroll){t=SM.DOM.getCoordinates(e[0])}else{t=SM.DOM.getCoordinates(e[0],this.$el[0])}return t.top},_isInThreshold:function(){var e;if(!this._hasMarker()){this.set("isActive",false);return false}e=this._getScrollBottom()>=this._getMarkerTop()-this.get("threshold");return e},_checkIfHitThreshold:function(){var e=this._isInThreshold();if(e){if(this._hasLeftThreshold){this._hitThreshold()}}this._hasLeftThreshold=!e},_onScroll:function(e){var t=e.data.self;if(!t._isThrottling&&t.__settings.isActive){t._isThrottling=true;t._checkIfHitThreshold();setTimeout(function(){if(t.__settings.isActive){t._checkIfHitThreshold()}t._isThrottling=false},t.LATENCY)}}});SM.MultiSelect=SM.Widgets.register({__NAME:"multiselect",__defaults:{checkboxSelector:'input[type="checkbox"]'},__init:function(){this.set("lastTarget",null);this._checkedSelector=this.get("checkboxSelector")+":checked";$(document).on("keydown",{self:this},this._onKeydown).on("keyup",{self:this},this._onKeyup);this.$el.on("change",this.get("checkboxSelector"),{self:this},this._onCheckboxChange)},__destroy:function(){this.set("lastTarget",null);$(document).off("keydown",this._onKeydown).off("keyup",this._onKeyup)},reset:function(){this.set("lastTarget",null)},_applySelection:function(e){var t=this._getLastTarget(),n,r,i,o;n=this.$el.find(this.get("checkboxSelector"));r=n.index(t);i=n.index(e);if(r===i){return}if(r<i){o=r;r=i;i=o}n=n.slice(i,r+1);n.each(function(){this.checked=true});this.trigger({type:"applied",$checkboxes:n})},_getLastTarget:function(){return this.get("lastTarget")||this.$el.find(this.get("checkboxSelector")).first().get(0)},_onCheckboxChange:function(e){var t=e.data.self,n=$(e.target),r=n.prop("checked");if(r&&t._isShiftPressed){t._applySelection(e.target)}t.set("lastTarget",e.target);if(!r&&!t.$el.find(t._checkedSelector).length){t.reset()}},_onKeyup:function(e){if(e.which===SM.KeyCodes.SHIFT){e.data.self._isShiftPressed=false}},_onKeydown:function(e){if(e.which===SM.KeyCodes.SHIFT){e.data.self._isShiftPressed=true}}});SM.Constants={CAMPAIGNS:{},DEFAULT_ROWS_PER_PAGE:10,ACTION_TYPES:{INDIVIDUAL:"individual",SHARE:"share",SAVE:"save",SUMMARY:"summary",CLOUD:"cloud",CHART:"chart",FULL:"full",SHARE_SURVEY_RESULTS:"share-survey-results-exp"},EXPORT_TYPES:{CHART:"chart",CLOUD:"cloud",SUMMARY:"summary",SHARED:"shared",FILO:"filo"},DASHBOARD_MODES:{VIEW:"view",EDIT:"edit"},JOB_TYPES:{EXPORT:"export",SHARE:"share"},ROLLUP_TYPES:{COMPARE:"compare"},PERMISSION_LEVELS:{FULL_ACCESS:"full_access",READ_ONLY:"read_only"},INPUT_TYPES:{DEFAULT_TYPED:0,COPY_PASTE:1,VOICE:2},QUESTION_TYPE_TAGS:{NAME:"name"},FILE_STATUSES:{VERIFYING:1,CORRUPT:2,VALID:3},RULE_TYPES:{COLLECTOR:"collector",COMPLETENESS:"completeness",QUIZ_SCORE_BUCKETS:"quiz_score_buckets",QNA:"qna",RANDOM_ASSIGNMENT:"random_assignment",RESPONDENT_DATA:"respondent_data",TIME_PERIOD:"time_period",RELATIVE_TIME_PERIOD:"relative_time_period",SINCE_LAST_INVITE:"since_last_invite",TAG:"tag",SENTIMENT:"sentiment",CUSTOM_VARIABLE:"custom_variable",ADVANCED_RULE:"advanced_rule",RESPONSE_QUALITY:"response_quality"},TIME_PERIOD_UNITS:{HOURS:"hours",DAYS:"days"},TIME_PERIOD_TYPES:{CHOOSE:"-1",LAST_12_HOURS:"last-12-hours",LAST_24_HOURS:"last-24-hours",LAST_7_DAYS:"last-7-days",LAST_30_DAYS:"last-30-days",SINCE_LAST_INVITE:"since-last-invite",DATE_RANGE:"date-range"},LOADING_SKELETON:{BACKGROUND_COLOR:"#f3f3f3",FOREGROUND_COLOR:"#ecebeb"},COOKIES:{SUMMARY_ONBOARDING_MODAL:"analyze_onboarding_carousel",BACK_TO_X_ONBOARDING_MODAL:"analyze_back_to_x_onboarding_modal"},SURVEY_TEMPLATES:{AUTO_SCROLL:"1",CHAT_MODE:"2",COVID_19:"3",BACK_TO_X:"4"},TREND_UNITS:{HOUR:"hour",DAY:"day",WEEK:"week",MONTH:"month",QUARTER:"quarter",YEAR:"year"},TWO_HUNDRED_MEGABYTES:209715200,ELEMENT_TYPE_TO_CARD_TYPE_MAP:{EMPTY:0,TEXT:1,QUESTION:2,LAST_EMPTY:3,PLACE_HOLDER:100},PACKAGE_IDS:{BASIC:"1",PRO:"2",UNLIMITED:"3",SELECT_MONTHLY:"4",GOLD:"5",PLATINUM:"6",SELECT_ANNUAL:"7",TEMP_PRO:"8",PRO_COMP:"9",ZOOM_PRO:"13",ZOOM_PREMIUM:"16",ENTERPRISE_GOLD:"25",ENTERPRISE_PLATINUM:"26",ENTERPRISE_RBP:"27",STANDARD_MONTHLY:"31",STANDARD_ANNUAL:"32",ADVANTAGE_MONTHLY:"33",ADVANTAGE_ANNUAL:"34",PREMIER_MONTHLY:"35",PREMIER_ANNUAL:"36",ANALYZE_MONTHLY:"37",TEAM_ADVANTAGE_ANNUAL:"134",TEAM_PREMIER_ANNUAL:"136"},PACKAGE_TYPE:{ENTERPRISE:"ENTERPRISE",FLEX:"FLEX",TEAM_PREMIER:"TEAM PREMIER"},ACCESS_TYPE:{NONE:"NONE",FULL:"FULL",UPGRADE:"UPGRADE",REQUEST:"REQUEST"},CONTRIBUTOR_ROLES:{ANALYST:1,CASUAL:2},FEATURES:{EXPORT:"analyze_export_enabled",EXPORT_SPSS:"analyze_export_spss_enabled",COMBINE_FILTERS:"analyze_combine_filters",CUSTOMIZE_CHARTS:"analyze_can_customize_charts",PUBLISH_DASHBOARD_PASSWORD:"analyze_dashboard_password_enabled",SENTIMENT_ANALYSIS:["analyze_sentiment_enabled","sa_en_ga","is_statsvc_expr"],RULE_LIMIT:"analyze_rule_limit",SAVE_VIEWS:"analyze_can_save_views",SHARE_SURVEY:"analyze_share_survey",TEXT_ANALYSIS:"analyze_ta_enabled",SHOW_SIG_DIFF_ENABLED:"show_sig_diffs_enabled",SHARE_CUSTOMIZE_BRANDING:"analyze_can_share_customize_branding",SHARE_PASSWORD_ENABLED:"analyze_password_enabled",SHOW_CREATE_CROSSTAB:"show_create_crosstab",BENCHMARKS:"benchmarks",RESPONSE_QUALITY_ENABLED:"response_quality_enabled",RECURRING_EMAIL_COLLECTOR_ENABLED:"recurring_email_collector_enabled"},URLS:{POWER_CASUAL_UPGRADE_REQUEST_URL:"/team/users/seat_request?source_category=analyze&source_feature=",UPGRADE_URL:"/pricing/upgrade/"},STRINGS:{REQUEST_FEATURE_INFO:"Unlock with a Power seat from your Admin."},LANGUAGE:{ENGLISH:"en"},VIEW_TYPE:{READ_ONLY:"read_only",STANDARD:"standard"},NUMBERS:{MIN_RESPONSES_FOR_STATISTICAL_SIGNIFICANCE:30},EXPORT_READABLE_FORMAT:{excel:"xls",pdf:"pdf",html:"html",spss:"spss",excel_plus:"xls+",csv:"csv",ppt:"ppt",png:"png",gss:"drive",zip:"zip"},EXPORT_READABLE_FORMAT_DESC:{excel:"XLS",pdf:"PDF",html:"HTML",spss:"SPSS",excel_plus:"XLS+",csv:"CSV",ppt:"PPT",png:"PNG",gss:"Google Sheet",zip:"ZIP"}};SM.Utils={Permissions:{canAddQuestions:function e(t){return t.create===SM.Constants.PERMISSION_LEVELS.FULL_ACCESS}},TimePeriods:{getMinDate:function(){var e=new Date;return new Date(e.getFullYear()-20,e.getMonth(),e.getDate())},getMaxDate:function(){var e=new Date;return new Date(e.getFullYear()+10,e.getMonth(),e.getDate())}},IndividualResponses:{loadResponses:function c(e,t,n,r,i){var o=e.respondentCounts,a=o.total_context,s=t===0||a-n*t<=0?null:a-1-n*t,p=n-1,l,u;if(s<0){i(new Error("Offset for loading Individual Responses cannot be negative"));return}l={survey:e,params:{offset:s,prev_neighbors:p,next_neighbors:0,view_data:e.getCurrentView().dump(),questions:e.getShownQuestionIDs("all"),include_openended:e.includeOpenEnded}};u=SM.API.fetchRespondents(l.params);$.when(l,u).then(function(e,t){var n={};if(t[0].respondents){n=SM.StatsvcRollup.transformRespondentsRollups(t[0],e.survey)}r(n,e.survey)},i)}},OnboardingModals:{showModal:function(e){var t=e.templateID,n=e.modalName,r=e.cookieID,i=e.survey.currentUser.id,o=e.survey.ID,a=e.survey.ownerPackageType(),s=SM.Views.create(SM.DialogView,{width:685,isModal:true,templateID:t});s.open();var l=s.$el.find(".sm-onboarding-carousel").onboardingCarousel();SM.API.logBi({action_type:"analyze_onboarding_modal_view",modal_name:n,user_id:i,survey_id:o,package_type:a});s.__onAfterClose=function(){SM.Utils.OnboardingModals.addUserIDToCookie(r,i);var e=l.data("onboardingCarousel").slideIndex+1;SM.API.logBi({action_type:"analyze_onboarding_modal_close",modal_name:n,user_id:i,survey_id:o,package_type:a,slide_id:e});this.$el.remove()}},getUserIDsFromCookie:function(e){var t=SM.Cookies.get(e);if(t&&t.indexOf(",")>=0){t=encodeURIComponent(t);SM.API.setCookie(e,t,"365d")}return t?decodeURIComponent(t).split(","):[]},addUserIDToCookie:function(e,t){var n=SM.Utils.OnboardingModals.getUserIDsFromCookie(e);n.push(t);if(n.length>10){n=n.slice(n.length-10)}var r=encodeURIComponent(n.join(","));SM.API.setCookie(e,r,"365d")}},Covid19:{createScoreGroupFilter:function e(t,n,r){var i=SM.BaseAnRule.FactoryCreate({ID:null,attrs:{is_compare_rule:false,rule_type:"quiz_score_buckets",selected:false}},n),o={};i.loadSurvey(n);o[r.range_id]=true;Object.assign(i,{ruleFamily:"filter",ID:"new_auto_filter_"+t,isNew:true,rows:o,isDirty:true});i.commit();i.applyRule()},createRelativeTimePeriodFilter:function(e,t,n,r){var i=SM.BaseAnRule.FactoryCreate({ID:null,attrs:{is_compare_rule:false,rule_type:SM.Constants.RULE_TYPES.RELATIVE_TIME_PERIOD,selected:false}},t);i.loadSurvey(t);Object.assign(i,{ruleFamily:"filter",ID:"new_auto_filter_"+e,isNew:true,isDirty:true,ruleType:SM.Constants.RULE_TYPES.RELATIVE_TIME_PERIOD,amount:n,unit:r});i.commit();i.applyRule()},createAutoFilters:function e(t){var n=_.sortBy(_.values(t.quizScoreRanges),"order").reverse();SM.Utils.Covid19.createRelativeTimePeriodFilter(0,t,12,SM.Constants.TIME_PERIOD_UNITS.HOURS);_.forEach(n,function(e){SM.Utils.Covid19.createScoreGroupFilter(e.order+1,t,e)})},createAutoFiltersIfNeeded:function e(t){if(!t.isCovid19Template()||t.hasARule()){return}SM.Utils.Covid19.createAutoFilters(t)}},Experiments:{isActiveTreatment:function e(t,n){var r,i;if(!SM.AnalyzeApp||SM.AnalyzeApp.isExportApp&&SM.AnalyzeApp.isExportApp()){return false}if(!SM.AnalyzeApp.experiments&&!SM.SharedAnalyzeApp.experiments){SM.Error.log("No experiments to be checked");return false}r=SM.AnalyzeApp.experiments?SM.AnalyzeApp.experiments:SM.SharedAnalyzeApp.experiments;if(r){if(!r[t]){SM.Error.log(t+" does not exist");return false}i=r[t]}return i&&i.isActiveTreatment(n)}},Trends:{getFormattedDate:function(e,t){var n=SM.Utils.Trends.getLocalizedTimestamp(t);if(e===SM.Constants.TREND_UNITS.YEAR){return moment(n).format("YYYY")}else if(e===SM.Constants.TREND_UNITS.QUARTER||e===SM.Constants.TREND_UNITS.MONTH){return moment(n).format("MMMM YYYY")}else if(e===SM.Constants.TREND_UNITS.DAY||e===SM.Constants.TREND_UNITS.WEEK){return moment(n).format("MMM D, YYYY")}return moment(n).format("MMM D, YYYY h:mm:ssA")},getLocalizedTimestamp:function(e){var t=moment.lang();moment.lang(t,{week:{dow:1,doy:4}});return moment(e).zone(moment().zone())}},MomentFill:{isSameOrAfter:function(e,t,n){return e.isSame(t,n)||e.isAfter(t,n)}},Dashboards:{isQuestionIneligibleAddToDashboard:function(e,t){return!_.isEmpty(e.hiddenComposites)||e.hasCombinedAnswers()||e.rowList.length>20||e.survey.getCurrentView().hasCompareRule()&&e.rowList.length>=5||t&&t.chart_type==="stacked"&&e.rowList.length>=5||e.isClickMap()||t&&t.show_benchmark},getNextTrendDate:function(e,t){switch(t){case SM.Constants.TREND_UNITS.DAY:return e.add(1,"days");case SM.Constants.TREND_UNITS.WEEK:return e.add(1,"weeks");case SM.Constants.TREND_UNITS.MONTH:return e.add(1,"months");case SM.Constants.TREND_UNITS.QUARTER:return e.add(3,"months");case SM.Constants.TREND_UNITS.YEAR:return e.add(1,"years");default:return e.add(1,"hours")}},isSameTrendPeriod:function(e,t,n){var r;if(!t||!t.start_date){return false}r=moment.utc(t.start_date);switch(n){case SM.Constants.TREND_UNITS.DAY:return SM.Utils.MomentFill.isSameOrAfter(e,r,"day");case SM.Constants.TREND_UNITS.WEEK:return SM.Utils.MomentFill.isSameOrAfter(e,r,"day");case SM.Constants.TREND_UNITS.MONTH:return SM.Utils.MomentFill.isSameOrAfter(e,r,"month");case SM.Constants.TREND_UNITS.QUARTER:return SM.Utils.MomentFill.isSameOrAfter(e,r,"month");case SM.Constants.TREND_UNITS.YEAR:return SM.Utils.MomentFill.isSameOrAfter(e,r,"year");default:return SM.Utils.MomentFill.isSameOrAfter(e,r,"hour")}},backfillDates:function(e){var t=e.trends,n=t.shift(),r=moment.utc(n.start_date),i=[],o=0,a=1e3;while(r.isBefore(e.trend_metadata.last_date)){o++;if(o>a){console.error("Maximum number of iterations exceeded while backfilling dates");break}if(SM.Utils.Dashboards.isSameTrendPeriod(r,n,e.trend_metadata.trend_by)){i.push(n);r=SM.Utils.Dashboards.getNextTrendDate(moment.utc(n.start_date),e.trend_metadata.trend_by);n=t.shift()}else{i.push({start_date:r.format(),summary_data:[]});r=SM.Utils.Dashboards.getNextTrendDate(r,e.trend_metadata.trend_by)}}e.trends=i;return e},transformTrendsDataToPercentageSeries:function(e){var t=SM.Utils.Dashboards.backfillDates(e.rollups[0]),s={},n=[];_.forEach(t.rows,function(e){s[e.key]={name:e.text,data:[]}});_.forEach(t.trends,function(e){var i=new Date(e.start_date).getTime(),o=0,a={};_.forEach(e.summary_data,function(e){o+=e.total;a[e.row_key]=e});_.forEach(t.rows,function(e){var t,n,r=a[e.key];if(r){t=r.total;n=r.total/o*100}else{t=0;n=0}s[e.key].data.push({x:i,y:n,custom:{numberOfResponses:t}})})});_.forEach(t.rows,function(e){n.push(s[e.key])});return n},transformAutoInsightData:function(e,t){var n=[];var r=Object.keys(e);var c={1:'{0}% of respondents who share the demographic attribute "{1}", answered:',2:'{0}% of respondents who share the demographic attributes "{1}" and "{2}", answered:',3:'{0}% of respondents who share the demographic attributes "{1}", "{2}" and "{3}", answered:'};for(var i=0;i<r.length;i++){var o=r[i];var p=e[o];for(var a=0;a<p.length;a++){var s=p[a];var d=s.filter.length;var h=s.ao_percentage.toFixed(2);var f=t.questions[o];var m=f.answers[s.ao_id].text;var l=c[d];for(var u=0;u<d;u++){var g="{"+(u+1)+"}";var y=s.filter[u];var b=_.keys(y)[0];var v=t.questions[b];var w=v.answers[y[b]].text;l=l.replace(g,w)}n.push({heading:f.heading,body:l.replace("{0}",h)+" "+m})}}return n},transformBenchmarksData:function(e,c){var t,n,r,i,o,a,s,l,u=[],p="{0}% Average across organizations that answered: {1}";t=e["global"];r=_.keys(t);for(s=0;s<r.length;s++){n=t[r[s]];i=c.questions[r[s]];for(l=0;l<n.length;l++){a=n[l];o=i.answers[a.option_id];u.push({heading:i.heading,body:p.replace("{0}",a.value).replace("{1}",o.text)})}}return u},createAutoDashboard:function(e){var t=SM.API.createAutoDashboard({title:e.dashboardTitle,description:"",view_id:e.viewID});$.when(t).done(function(e){var t=e,n=new Uri(document.location.href);SM.Bi.dashboardCreatedBulk(n.getQueryParamValue("source")?n.getQueryParamValue("source"):"analyze");window.location="/stories/"+t.key+"/edit"}).fail(function(e){SM.Error.log(e,"Failed to create auto dashboard")})}},ResponseQuality:{createFilter:function(e,t){if(!e||typeof e!=="object")return;var n=SM.BaseAnRule.FactoryCreate({ID:null,attrs:{is_compare_rule:false,rule_type:"response_quality",selected:true}},t);n.loadSurvey(t);Object.assign(n,{ruleFamily:"filter",ID:"new_response_quality_filter",isNew:true,rows:e});n.commit();n.applyRule()},createLowResponseQualityFilter:function(e){this.createFilter({"low-quality":true},e)},createHighResponseQualityFilter:function(e){this.createFilter({"high-quality":true},e)}}};SM.Utils.AsyncPoller=function(t){var n=false,r=null;var e=function(){if(!n){clearTimeout(r);r=null;n=true}};var i=function(e){clearTimeout(r);r=setTimeout(function(){if(n){return}t(i)},e)};t(i);return e};SM.Utils.StorageFactory=function(r){if(!(r instanceof Storage)){throw Error("Invalid storage object. Accepted types: localStorage, sessionStorage")}return{clear:function(t){_.chain(localStorage).keys().each(function(e){if(e.startsWith(t)){r.removeItem(e)}})},set:function(e,t){return r.setItem(e,_.isObject(t)?JSON.stringify(t):t)},get:function(t,n){var e=r.getItem(t);try{return e?JSON.parse(e):n}catch(e){SM.Error.log(e,t+" value could not be parsed");return n}},remove:function(e){return r.removeItem(e)}}};SM.Hightables=new function(){var e=_____WB$wombat$check$this$function_____(this);e.renderTable=function(e){var t=e.tableData,n=e.tableClasses,r=e.tableAttrs,i=e.target,o,a=$('<table cellpadding="0" cellspacing="0"></table>'),s=$("<thead></thead>"),l=$("<tbody></tbody>"),u=$("<tfoot></tfoot>");if(t.caption){c(t.caption,a)}if(t.thead.rows){p(t.thead.rows,s);a.append(s)}p(t.tbody.rows,l);a.append(l);if(t.tfoot){p(t.tfoot.rows,u);a.append(u)}a.addClass(n);_.each(r,function(e,t){a.attr("data-"+t,e)});if(e.useDivs||e.flattenNestedTables){o=a[0].outerHTML;if(e.useDivs){o=d(o)}if(e.flattenNestedTables){o=h(o)}a=$(o)}f(a,e.events);i.append(a)};function c(e,t){var n=SM.Template.renderHTML(e.template,e.context);t.append(n)}function p(e,t){var n,r,i;_.each(e,function(e){n=o(e);i=$(n);if(e.cells){_.each(e.cells,function(e){r=a(e);i.append(r)})}t.append(i)})}function o(e){var t;if(e.template){t=SM.Template.renderHTML(e.template,e.context)}else{t="<tr></tr>"}return t}function a(e){var t=SM.Template.renderHTML(e.template,e.context);return t}function d(o){var e=["table","caption","thead","tbody","tfoot","tr","th","td"];_.each(e,function(e){var t=new RegExp("<"+e,"g"),n="<div display='"+e+"'",r=new RegExp("</"+e,"g"),i="</div";o=o.replace(t,n).replace(r,i)});return o}function h(e){var t=$(e),n=t.find(".nested-table"),r;if(n.length){r=n.html();n.remove();e=t[0].outerHTML+r}return e}function f(e,t){var n=t.captionClick,r=t.tdMouseEnter,i=t.tdMouseLeave,o=t.thClick,a=t.tdClick;e.on("click","caption",function(e){if(n){n(e)}});e.on("click","th",function(e){if(o){o(e)}});e.on("click","td",function(e){if(a){a(e)}});e.on("mouseenter","td",function(e){if(r){r(e)}});e.on("mouseleave","td",function(e){if(i){i(e)}})}};SM.Highcharts={};SM.Highcharts.CHART_WIDTH=594;SM.Highcharts.MAX_CHART_WIDTH=658;SM.Highcharts.MARGIN_TOP=0;SM.Highcharts.MARGIN_BOTTOM=40;SM.Highcharts.MARGIN_LEFT=95;SM.Highcharts.MARGIN_RIGHT=10;SM.Highcharts.PLOT_AREA_WIDTH=SM.Highcharts.CHART_WIDTH-SM.Highcharts.MARGIN_LEFT;SM.Highcharts.X_AXIS_MAX_VISIBLE_LINES=4;SM.Highcharts.Y_AXIS_MAX_VISIBLE_LINES=3;SM.Highcharts.AXIS_LABEL_CHARACTER_WIDTH=8;SM.Highcharts.DATA_LABEL_CHARACTER_WIDTH=8;SM.Highcharts.DATA_LABEL_CHARACTER_HEIGHT=15;SM.Highcharts.DATA_LABEL_PADDING=10;SM.Highcharts.LEGEND_MARGIN_TOP=20;SM.Highcharts.NUM_SIGNIFICANT_DIGITS=2;SM.Highcharts.MAX_TITLE_CHARS=85;SM.Highcharts.calculateBarHeight=function(e){return Math.max(120-Math.ceil(e/2)*20,50)};SM.Highcharts.calculateChartHeight=function(e,t){var n=t.answerStructures,r=t.titleHeight,i=t.labelHeight,o=t.legendHeight,a,s=e==="pie"?320:250,l=e==="boxplot"?145:200,c=SM.Highcharts.calculateMarginTop(r),p=SM.Highcharts.calculateMarginBottom(i,o),u;if(e==="bar"){l=SM.Highcharts.calculateBarChartHeight(t)}if(e==="pie"||e==="donut"){u=n.rows.length;l=u*18}a=l+c+p;return Math.max(a,s)};SM.Highcharts.calculateBarChartHeight=function(e){var t=e.answerStructures.rows,n=e.answerStructures.cols,c=e.chartIndex,r=!_.isEmpty(n),i=r&&!_.isEmpty(n[0].items),o=i?n[0].items:null,a=0,s,l,u;s=t.length;if(i){a=_.isArray(o)?_.size(o):_.size(_.keys(o))}if(e.isStacked){if(r){if(e.isMirrored){if(i){s=a}else{s=n.length}}else{s=t.length}}else{s=1}}else if(r){if(e.isDistribution){s*=n.length;if(i){if(e.isCompared){s=_.flatten(_.map(n,function(e){return e.items})).length}else{s=n[c].items.length*n.length}}}else if(i){if(e.isCompared){s=a}else{s=t.length}}else if(e.isMirrored){s=n.length}else{s=t.length}}l=SM.Highcharts.calculateBarHeight(s);u=s*l;return u};SM.Highcharts.calculateTrendChartHeight=function(u,e,t,n,r){var i,o=250,a=200,s=SM.Highcharts.calculateMarginTop(e),l=SM.Highcharts.calculateMarginBottom(t,n);r=r||0;i=a+s+l+r;return Math.max(i,o)};SM.Highcharts.calculateChartWidth=function(e,t){var n,r=0,i,o,a;var s=t.numSeries,l=t.numXAxisLabels,u=t.isCompared;if(t.isStacked){i=l}else if(u){if(_.contains(["line","area"],e)){i=s}else{i=l*s}}else{i=Math.max(s,l)}n=Math.max(100-Math.ceil(i/5)*20,30);if(_.contains(["column","line","area"],e)){r=n*i}a=Math.max(r,SM.Highcharts.CHART_WIDTH);o=Math.min(a,SM.Highcharts.MAX_CHART_WIDTH);return o};SM.Highcharts.calculateMarginTop=function(e,t){var n=e;if(t){n+=t}return n};SM.Highcharts.calculateMarginBottom=function(e,t,n){var r=10,i=SM.Highcharts.LEGEND_MARGIN_TOP,o;o=r+e;if(t&&t>0){o+=i+t}if(n){o+=n}return o};SM.Highcharts.calculateSpacingBottom=function(e,t){if(t&&t>0){e+=SM.Highcharts.LEGEND_MARGIN_TOP+t}return e};SM.Highcharts.calculateMarginBottom=function(e,t){var n=SM.Highcharts.LEGEND_MARGIN_TOP,r;r=SM.Highcharts.MARGIN_BOTTOM+e;if(t&&t>0){r+=n+t}return r};SM.Highcharts.calculateLegendHeight=function(e){var t=SM.Highcharts.PLOT_AREA_WIDTH,n=18,r=10,i=22,c=5,p=5,d=i+c+p,o,a,h=6,s=0,l=1,u;if(!_.isEmpty(e)){u=e[0].name?e:e[0].data;_.each(u,function(e){if(e.showInLegend!==false){a=(e.name?e.name.length:0)*h+8;o=n+r+a;if(s+o>t){s=o;l+=1}else{s+=o}}})}return l*d};SM.Highcharts.calculateLegendHeight_fixedItemWidth=function(e){var t=SM.Highcharts.PLOT_AREA_WIDTH,n=15,r=5,i=5,o=n+r+i,c=20,p=75,a=1,d=6,s,l=0,u=e[0].name?e:e[0].data;if(u){_.each(u,function(e){l+=e.name.length*d});a=Math.ceil(l/t)}s=Math.floor(t/p);return a*o/s+c};SM.Highcharts.calculateXAxisLabelHeight=function(e,t){var n,r,i,o,a,s;if(_.isEmpty(t)){return 0}if(_.contains(["column","line","area"],e)){n=_.max(_.map(t,function(e){return e.length}));r=514/t.length;i=Math.ceil(r/SM.Highcharts.AXIS_LABEL_CHARACTER_WIDTH);o=Math.ceil(n/i);a=SM.Highcharts.X_AXIS_MAX_VISIBLE_LINES;s=o>a?a:o;return s*18}return 30};SM.Highcharts.formatAxisLabel=function(e,t,n){return _.isNumber(e)&&_.isFinite(e)?SM.Highcharts.formatNumericAxisLabel(e):SM.Highcharts.formatTextualAxisLabel(e,t,n)};SM.Highcharts.formatNumericAxisLabel=function(e){var t,n;if(Math.abs(e)<=1e3){return e}t=["k","M","B","T"];n=Math.floor(Math.log(Math.abs(e))/Math.log(1e3));return e/Math.pow(1e3,n)+t[n-1]};SM.Highcharts.formatTextualAxisLabel=function(e,c,t){var n=Math.ceil(c/SM.Highcharts.AXIS_LABEL_CHARACTER_WIDTH),r=[],i,o,a,s,l=false,p=e,u;if(e.length>n){o=e.replace(/\ /g,"\xa0").split("\xa0");u="";_.each(o,function(t,e){if(t.length+1+u.length<=n){u+=" "+t}else{if(e!==0){r.push(u)}if(t.length>=n){a=Math.ceil(t.length/n);_.times(a,function(e){u=t.slice(e*n,(e+1)*n);if(u.length===n&&e!==a-1){r.push(u)}})}else{u=t}}if(e===o.length-1){r.push(u)}});r=_.map(r,function(e){return SM.String.trim(e)});i=r.slice(0,t);if(r.length>t){s=i[i.length-1];if(s.length+3>n){i[i.length-1]=s.slice(0,n-3)+"..."}else{i[i.length-1]+="..."}l=true}e=_.map(i,function(e){return"<div>"+_.escape(e)+"</div>"});e=e.join(" ");if(l){e='<div title="'+_.escape(p)+'">'+e+"</div>"}}else{e=_.escape(e)}return e};SM.Highcharts.xAxisLabelFormatter=function(){var e=this.axis.options.categories.length,t=this.axis.width/e,n=SM.Highcharts.X_AXIS_MAX_VISIBLE_LINES;return SM.Highcharts.formatAxisLabel(this.value,t,n)};SM.Highcharts.yAxisLabelFormatter=function(){var e=100,t=SM.Highcharts.Y_AXIS_MAX_VISIBLE_LINES,n=this.value;if(_.isNumber(n)&&_.isFinite(n)&&this.axis.max<n){return""}return SM.Highcharts.formatAxisLabel(n,e,t)};SM.Highcharts.percentageLabelFormatter=function(){var e=this.value;if(_.isNumber(e)&&_.isFinite(e)&&this.axis.max<e){return""}return e+"%"};SM.Highcharts.highchartsRenderLegendItem=window.Highcharts.Legend.prototype.renderItem;SM.Highcharts.renderLegendItem=function(e){var t=e.userOptions&&e.userOptions.__options?e.userOptions.__options.hideLegendItem:false;if(!t){SM.Highcharts.highchartsRenderLegendItem.call(this,e)}};window.Highcharts.Legend.prototype.renderItem=SM.Highcharts.renderLegendItem;window.Highcharts.Legend.prototype.preExistingPositionItem=window.Highcharts.Legend.prototype.positionItem;SM.Highcharts.legendPositionItem=function(e){var t=e.userOptions&&e.userOptions.__options?e.userOptions.__options.hideLegendItem:false;if(!t){window.Highcharts.Legend.prototype.preExistingPositionItem.call(this,e)}};window.Highcharts.Legend.prototype.positionItem=SM.Highcharts.legendPositionItem;SM.Highcharts.legendFormatter=function(){var e=_____WB$wombat$check$this$function_____(this);e.name=_.escape(e.name);if(e.name.length>90){e.name='<div title="'+e.name+'">'+_.string.truncate(e.name,90)+"</div>";return e.name}e.name=_.string.truncate(e.name,90);return e.name};SM.Highcharts.legendUnescapedFormatter=function(){var e=_____WB$wombat$check$this$function_____(this);e.name=_.string.truncate(e.name,90);return e.name};SM.Highcharts.formatTooltip=function(){var e=SM.Highcharts.formatYValue(this.point.absoluteY,"absolute",0),t=SM.Highcharts.formatYValue(this.point.percentageY,"percent",2),n;if(t){n="<span>"+e+"</span> <span>("+t+")</span>"}else if(e){n="<span>"+e+"</span>"}return n};SM.Highcharts.formatTooltipNpsScore=function(){var e=SM.Highcharts.formatYValue(this.point.absoluteY,"absolute",0),t;if(e){t="<span>"+e+"</span>"}return t};SM.Highcharts.formatTooltipNpsDetailed=function(){var e=SM.Highcharts.formatYValue(this.point.absoluteY,"absolute",0),t=SM.Highcharts.formatYValue(this.point.percentageY,"percent",2),n="",r,i;if(this.point.name){n=this.point.name}else if(this.series.name){n=this.series.name}r='<span style="font-weight: 500; text-align:center">'+n+"</span><br>";if(t){i=r+"<span>"+e+"</span> <span>("+t+")</span>"}else if(e){i="<span>"+e+"</span>"}return i};SM.Highcharts.getGlobalizeFormatType=function(e,t){var n;if(e==="percent"){n="p"+t}else{n="n"+t}return n};SM.Highcharts.formatYValue=function(e,t,n){var r=SM.Highcharts.getGlobalizeFormatType(t,n);if(e){if(t==="percent"){e=parseFloat(e)/100}e=Globalize.format(e,r)}return e};SM.Highcharts.floatingPointFormatter=function(){return Globalize.format(this.point.y,"n2")};SM.Highcharts.integerPointFormatter=function(){return Globalize.format(this.point.y,"n0")};SM.Highcharts.bindYAxisEvents=function(r,e){if(e&&e.ticks){_.each(e.ticks,function(e,t){var n=$(e.label.element);n.off("click");n.on("click",{tickPos:t,self:self},function(e){if(r.attr("chart-type")!=="boxplot"){SM.CustomizeActionMenu.actionMenu.call(self,e,"yAxisLabel",{parent:r})}})})}};SM.Highcharts.bindXAxisEvents=function(t){var e=t.find(".highcharts-xaxis-labels span");if(t.attr("chart-type")!=="boxplot"){e.on("click",function(e){SM.CustomizeActionMenu.actionMenu.call(self,e,"xAxisLabel",{parent:t})})}};SM.Highcharts.bindAreaChartEvents=function(t){var e=t.find(".highcharts-series path");e.on("click",function(e){if(self.display&&!self.display.getBenchmarkDisplay()){SM.CustomizeActionMenu.actionMenu.call(self,e,"area",{parent:t})}})};SM.Highcharts.onPointMouseOver=function(e){SM.Highcharts.toggleLegendItemHighlighting(e)};SM.Highcharts.onPointMouseOut=function(e){SM.Highcharts.toggleLegendItemHighlighting(e)};SM.Highcharts.toggleLegendItemHighlighting=function(e){var t=e.target.series.chart,n=t.options.legend.enabled,r=t.options.chart.type,i=[];if(n){if(r==="pie"||r==="donut"){i=$(e.target.legendItem.element)}else if(e.target.series.legendItem){i=$(e.target.series.legendItem.element)}if(i.length){i.toggleClass("point-hovered")}}};SM.Highcharts.calculateSeriesRange=function(e){var t,n,r;t=_.map(e,function(e){r=_.map(e.data,function(e){return e.y});return _.max(r)});n=_.map(e,function(e){r=_.map(e.data,function(e){return e.y});return _.min(r)});return{max:_.max(t),min:_.min(n)}};SM.Highcharts.calculateStackedSeriesRange=function(e){var n=[],r,t;if(_.isEmpty(e)){return{min:0,max:0}}t=e[0].data.length;_.times(t,function(t){r=0;_.map(e,function(e){r+=e.data[t].y});n.push(r)});return{min:_.min(n),max:_.max(n)}};SM.Highcharts.calculateYAxisScaleOptions=function(e,t){var n,r=1,i=false,o;if(_.isUndefined(t)){t=0;i=true}o=e-t||10;if(!_.isFinite(o)||o<0){o=10}if(o>100){while(o>100){o/=10;r*=10}}else if(o<10){while(o<10){o*=10;r/=10}}if(o<=5){o=5;n=1}else if(o<=10){o=10;n=1}else if(o<=20){o=20;n=2}else if(o<=50){o=50;n=10}else if(o<=100){o=100;n=10}if(i){t=Math.floor(t*r/n)*n;e=Math.ceil((t+o)*r/n)*n}return{min:t,max:e,tickInterval:n*r}};function _calculateGaugeOptions(e,t){var n=SM.Highcharts.NPS_SCORE_CHART_MISC_OPTIONS,r,i,o;if(e){r=t/240;i=160*r;o=120*r;$.extend(true,n,{innerradius:60*r,radius:85*r,tHeight:20*r,cx:i,cy:o,letterSize:28*r,exportInnerScoreCSS:{"font-size":50*r+"px"},exportInnerTextCSS:{"font-size":16*r+"px"},labelCSS:{"font-size":12*r+"px"},clockHandCSSExport:{fill:"#FFFFFF"},scoreTextY:o+15*r,npsTextX:i-17*r,npsTextY:o+35*r,labels:[{text:"0",x:i-4*r,y:o-108*r},{text:"-50",x:i-118*r,y:o-30*r},{text:"50",x:i+100*r,y:o-30*r},{text:"-100",x:i-73*r,y:o+95*r},{text:"100",x:i+48*r,y:o+95*r}]})}return n}SM.Highcharts.renderGaugeShapes=function(u,c,p,e,t){var n=_calculateGaugeOptions(t,u.plotHeight),r=u.userOptions.labels?u.userOptions.labels:n.labels,d=u.userOptions&&u.userOptions.chart&&u.userOptions.chart.noResponses,h=c+"",i;if(u.userOptions.chart.showingBenchmark){n.innerradius=50.5;n.tHeight=20;n.alpha=14;n.radius=52/n.handRatio}_.each(r,function(e){u.renderer.text(e.text,e.x,e.y).css(n.labelCSS).attr({zIndex:999}).add()});if(e||t){i=n.cx-h.length/2*n.letterSize;u.renderer.text(h,i,n.scoreTextY).css(n.exportInnerScoreCSS).attr({fontSize:"49px",zIndex:999}).add();u.renderer.text("NPS",n.npsTextX,n.npsTextY).css(n.exportInnerTextCSS).attr({zIndex:999}).add();SM.Highcharts.renderGaugeClockHandForExports(u,n,c)}else{if(u.renderer.isVML||(SM.Browser.isIE||SM.Browser.isSafari&&window.navigator.userAgent.indexOf("Chrome")===-1)){SM.Highcharts.renderGaugeClockHandForExports(u,n,c)}else{SM.Highcharts.renderGaugeClockHand(u,n,c)}setTimeout(function(){var e,t,n,r,i,o,a,s=p.position(),l=0;e=SM.Template.render("highcharts-gauge-text-template",{scoreString:h,noResponses:d});p.after(e);r=p.siblings(".gauge-text").last();if(u.userOptions.chart.showingBenchmark){l=0}if(u.userOptions.chart.isBenchmark){l+=u.plotWidth}r.css({left:l+"px",top:s.top+"px"});i=r.find(".gauge-inner-text");o=r.find(".gauge-top-text");a=r.find(".gauge-bottom-text");if(!d){o.css("padding-left",4-h.length);o.css("letter-spacing",-1.5);if(c===-100||c===100){o.css("font-size",42)}}t=u.plotLeft+u.plotWidth*.5+i.width()*-.5;n=u.plotTop+u.plotHeight*.5+i.height()*-.5+3;if(!u.userOptions.chart.showingBenchmark){n+=24;r.prev(".sm-chart").css("padding-top",24)}i.css("left",t);i.css("top",n);if(u.userOptions&&u.userOptions.__options&&u.userOptions.__options.innerTextColor){o.css("color",u.userOptions.__options.innerTextColor);a.css("color",u.userOptions.__options.innerTextColor)}},0)}};SM.Highcharts.renderGaugeClockHand=function(e,t,c){var p=e.userOptions&&e.userOptions.chart&&e.userOptions.chart.noResponses,n,r,i,o,a,s,d,l,h,f,u,m,g;h="\n"+' <filter id="gaugeShadow" x="0" y="0" height="130%" width="100%">\n'+' <feoffset dx="0" dy="1" in="SourceAlpha" result="offsetOut"></feoffset>\n'+' <feColorMatrix result="matrixOut" in="offsetOut" type="matrix"\n'+' values="0.3 0.3 0.3 0.3 0 0.3 0.3 0.3 0.3 0 0.3 0.3 0.3 0.3 0 0.3 0.3 0.3 0.3 0" />\n'+' <fegaussianblur result="blurOut" in="matrixOut" stdDeviation="1"></fegaussianblur>\n'+' <feblend in="SourceGraphic" in2="blurOut" mode="normal"></feblend>\n'+" </filter>\n";f=$(e.container).find("svg");u=f.find("defs");m=u.find("#gaugeShadow");if(m.length===0){g=u.html()+h;u.html(g)}t.cx=e.chartWidth/2;t.cy=e.chartHeight/2;if(p){e.renderer.circle(t.cx,t.cy,t.innerradius).attr(t.clockHandCSS).attr("filter","url(#gaugeShadow)").add()}else{l=c/100*360/5*2;n=t.cx+(t.innerradius+t.tHeight)*Math.sin(l/360*(2*Math.PI));r=t.cy-(t.innerradius+t.tHeight)*Math.cos(l/360*(2*Math.PI));i=t.cx+t.innerradius*Math.sin((l-t.alpha)/360*(2*Math.PI));o=t.cy-t.innerradius*Math.cos((l-t.alpha)/360*(2*Math.PI));a=t.cx+t.innerradius*Math.sin((l+t.alpha)/360*(2*Math.PI));s=t.cy-t.innerradius*Math.cos((l+t.alpha)/360*(2*Math.PI));d=["M",a,s,"A",t.innerradius,t.innerradius,0,1,1,i,o,"L",n,r,"Z"];e.renderer.path(d).attr(t.clockHandCSS).attr("filter","url(#gaugeShadow)").add()}};SM.Highcharts.renderGaugeClockHandForExports=function(e,t,c){var n,r,i,o,a,s,l,u,p;t.cx=e.chartWidth/2;t.cy=e.chartHeight/2;e.renderer.circle(t.cx,t.cy,t.innerradius).attr(t.exportInnerCircleCSS).add();n=c/100*360/5*2;r=t.innerradius;i=t.cx+(r+t.tHeight)*Math.sin(n/360*(2*Math.PI));o=t.cy-(r+t.tHeight)*Math.cos(n/360*(2*Math.PI));a=t.cx+(r-2)*Math.sin((n-t.alpha)/360*(2*Math.PI));s=t.cy-(r-2)*Math.cos((n-t.alpha)/360*(2*Math.PI));l=t.cx+(r-2)*Math.sin((n+t.alpha)/360*(2*Math.PI));u=t.cy-(r-2)*Math.cos((n+t.alpha)/360*(2*Math.PI));p=["M",i,o,"L",a,s,"L",l,u,"Z"];e.renderer.path(p).attr(t.clockHandCSSExport).add()};SM.Highcharts.renderTMBCShapes=function(c,p,d,n){var e=$.extend(true,{},SM.Highcharts.NPS_SCORE_CHART_MISC_OPTIONS),h=c.userOptions||{},t=h.chart||{},f=t.noResponses,m=p+"",g=t.tmbcType==="tmbc_engagement"||t.isTop2,y=t.isBenchmark,b=t.tmbcType==="tmbc_gei"&&!y,r;if(n){r=e.cx-m.length/2*e.letterSize;if(g){m+="%"}c.renderer.text(m,r,e.scoreTextY).attr(e.exportInnerScoreCSS).add()}else{setTimeout(function(){var e,t,n,r,i,o,a,s=d.position(),l=s.top-5,u=0;e=SM.Template.render("highcharts-tmbc-text-template",{scoreString:m,noResponses:f,usePercent:g,isGEI:b});d.after(e);r=d.siblings(".gauge-text").last();i=r.find(".gauge-inner-text");if(!g&&!y){i.append('<div class="popout sidi-popout tmbc"></div>');i.tmbcpopout(h.tooltip.settings)}if(!c.userOptions.chart.showingBenchmark){l+=20}if(y){u+=c.plotWidth}r.css({left:u+"px",top:l+"px"});o=r.find(".gauge-top-text");a=r.find(".gauge-bottom-text");if(!f){o.css("padding-left",4-m.length);o.css("letter-spacing",-1.5);if(p===-100||p===100){o.css("font-size",42)}}t=c.plotLeft+c.plotWidth*.5+i.width()*-.5;n=c.plotTop+c.plotHeight*.5+i.height()*-.5+3;i.css("left",t);i.css("top",n);if(c.userOptions&&c.userOptions.__options&&c.userOptions.__options.innerTextColor){o.css("color",c.userOptions.__options.innerTextColor);a.css("color",c.userOptions.__options.innerTextColor)}},0)}};SM.Highcharts.renderBoxPlotLabels=function(s,e,t){var l=[],u,c,p,n,r,d,h=s.userOptions&&s.userOptions.chart&&s.userOptions.chart.forcePercent||false,i=function(e,t){var n,r,i;r=0;n=[];$.each(e,function(e,t){if(r>t.left){t.left=r+1}n.push(t);r=t.left+t.width});e=n.reverse();i=t;n=[];$.each(e,function(e,t){if(i<t.left+t.width){t.left=i-t.width-1}n.push(t);i=t.left});return n};p=SM.Highcharts.BOX_PLOT_LABELING_OPTIONS.fontsize;n=SM.Highcharts.BOX_PLOT_LABELING_OPTIONS.labelCSS;r=t?SM.Highcharts.BOX_PLOT_LABELING_OPTIONS.plotLabelY:SM.Highcharts.BOX_PLOT_LABELING_OPTIONS.ypos;u=s.userOptions.yAxis.min;c=s.userOptions.yAxis.max-u;d=!s.userOptions.chart.isNPS||t;$.each(e,function(e,t){var n,r,i,o,a;if(h){a=SM.Highcharts.getGlobalizeFormatType("percent",0);r=Globalize.format(t/100,a)}else{n=d&&t!==Math.floor(t);r=n?Globalize.format(t,"n2"):""+t}i=r.length;o=(t-u)/c*s.plotWidth;l.push({val:r,left:o-p*i/2,width:p*i})});l=i(l,s.plotWidth);$.each(l,function(e,t){s.renderer.text(t.val,s.plotLeft+t.left,s.plotTop+r).css(n).attr({zIndex:999}).add()})};SM.Highcharts.DEFAULT_COLORS=["#00BF6F","#507CB6","#F9BE00","#6BC8CD","#FF8B4F","#7D5E90","#D25F90","#C7B879","#DB4D5C","#768086"];SM.Highcharts.DEFAULT_BENCHMARK_COLORS=["#00BF6F","#507CB6","#F9BE00","#6BC8CD","#FF8B4F","#7D5E90","#D25F90","#C7B879","#DB4D5C","#768086"];SM.Highcharts.NPS_BENCHMARK_DISTRIBUTION_COLORS=["#FD8623","#FFE651","#C6D9%C","#999A8A","#3F707E","#DFDDCE","#6B6A5B","#B9CD48","#D8542A","#10999B"];SM.Highcharts.NPS_DISTRIBUTION_COLORS=["#FF8B4F","#F9BE00","#00BF6F","#768086","#507CB6","#C7B879","#7D5E90","#D25F90","#DB4D5C","#6BC8CD"];SM.Highcharts.NPS_DETAILED_DISTRIBUTION_COLORS=["#6A161E","#941E2A","#BE2736","#D42B3C","#DB4D5C","#E16B77","#E9959E","#E0A500","#F9BE00","#00BF6F","#00A656"];SM.Highcharts.NPS_SCORE_CHART_BASE_OPTIONS={chart:{margin:[0,0,0,0],spacingTop:0,spacingBottom:0,spacingLeft:0,spacingRight:0,style:{fontFamily:"National2"},plotBackgroundColor:"#FFF",type:"pie",width:594,height:240,renderTo:{},events:{}},title:{text:null},colors:["#507CB6","#507CB6","#507CB6","#507CB6"],plotOptions:{series:{animation:false,point:{events:{}},events:{},innerSize:"50%",states:{inactive:{enabled:false},hover:{halo:{size:0}}}},pie:{marker:{states:{hover:{enabled:false}}},size:"90%",center:["50%","50%"],colorByPoint:true,borderWidth:2,dataLabels:{enabled:false},startAngle:-144,endAngle:144}},legend:{enabled:false},tooltip:{enabled:false},credits:{enabled:false},series:[{data:[{y:1},{y:1},{y:1},{y:1}]}]};SM.Highcharts.NPS_SCORE_CHART_MISC_OPTIONS={innerradius:60,radius:85,tHeight:20,cx:297,cy:120,handRatio:.73,alpha:14,letterSize:28,exportInnerCircleCSS:{fill:"#FFFFFF",zIndex:99},exportInnerScoreCSS:{color:"#333e48",textAlign:"center",fontFamily:"National2",fontWeight:"500",fontSize:"50px",zIndex:999},exportInnerTextCSS:{textAlign:"center",color:"#333e48",fontSize:"16px",zIndex:999},labelCSS:{textAlign:"center",color:"#333E48",fontFamily:"National2",fontWeight:"300",fontSize:"12px",zIndex:999},clockHandCSS:{fill:"#FFFFFF",zIndex:999},clockHandCSSExport:{fill:"#F0F0F0",zIndex:999},scoreTextY:135,npsTextX:280,npsTextY:155,labels:[{text:"0",x:293,y:10},{text:"-50",x:180,y:90},{text:"50",x:395,y:90},{text:"-100",x:224,y:215},{text:"100",x:345,y:215}]};SM.Highcharts.NPS_SCORE_BAR_CHART_OPTIONS={xAxis:{labels:{gridLineWidth:2},lineWidth:0,lineColor:"#FFF"},yAxis:{plotLines:[{color:"#EDEEEE",zIndex:1,width:2,value:0}]}};SM.Highcharts.DEFAULT_OPTIONS={chart:{marginLeft:SM.Highcharts.MARGIN_LEFT,spacingRight:0,style:{fontFamily:"National2"},plotBackgroundColor:"#FFF",marginRight:SM.Highcharts.MARGIN_RIGHT,styleMode:true},title:{text:null,style:{fontFamily:"National2",fontWeight:"500",fontSize:"18px",color:"#333E48"}},colors:SM.Highcharts.DEFAULT_COLORS,xAxis:{title:{text:null},labels:{style:{fontFamily:"National2",fontWeight:"400",fontSize:"12px",color:"#333E48"},gridLineColor:"#EDEEEE",overflow:"justify",useHTML:true,autoRotation:[0]},lineColor:"#CCCCCC",tickLength:0},yAxis:{useHTML:true,labels:{overflow:"justify",style:{fontFamily:"National2",fontSize:"12px",fontWeight:"400",color:"#333E48"}},title:{text:null},offset:0,lineColor:"#CCCCCC",lineWidth:1,gridLineColor:"#EDEEEE"},plotOptions:{series:{pointPadding:.05,groupPadding:.1,animation:false,dataLabels:{style:{fontWeight:"500",fontSize:"13px",color:"#333E48",textShadow:"-1px -1px 0 #FFFFFF, 1px -1px 0 #FFFFFF, -1px 1px 0 #FFFFFF, 1px 1px 0 #FFFFFF"}},point:{events:{legendItemClick:function(){return false}}},events:{legendItemClick:function(){return false}},states:{hover:{brightness:-.1,halo:{size:0}},inactive:{enabled:false}}}},legend:{labelFormatter:SM.Highcharts.legendFormatter,enabled:false,borderWidth:0,x:0,y:0,itemDistance:20,itemStyle:{color:"#333E48",fontFamily:"National2",fontSize:"13px",fontWeight:"300",lineHeight:"13px"},itemMarginBottom:5,symbolRadius:3,symbolHeight:13,useHTML:true},tooltip:{animation:false,hideDelay:100,backgroundColor:"#333E48",borderWidth:0,shadow:false,headerFormat:"",followPointer:true,style:{fontFamily:"National2",fontSize:"13px",color:"#FFF"},useHTML:true,formatter:SM.Highcharts.formatTooltip},credits:{enabled:false}};SM.Highcharts.BOX_PLOT_LABELING_OPTIONS={fontsize:7,labelCSS:{color:"#333E48",fontFamily:"National2",fontWeight:"400",fontSize:"12px"},min:-100,range:200,ypos:48,plotLabelY:135};SM.Highcharts.QUIZ_SUMMARY_CHART_OPTIONS={chart:{marginTop:0,marginLeft:75,spacingRight:0,style:{fontFamily:"National2"},plotBackgroundColor:"#FFF"},title:{text:null},colors:["#507CB6"],xAxis:{title:{text:null,style:{color:"#333E48",fontFamily:"National2",fontWeight:"normal"}},labels:{style:{fontFamily:"National2",fontWeight:"normal",whiteSpace:"nowrap",color:"#333E48"},gridLineColor:"#EDEEEE",overflow:"justify",y:25,useHTML:true},lineColor:"#CCCCCC",tickLength:0},yAxis:{labels:{overflow:"justify",style:{fontFamily:"National2",paddingTop:"10px",color:"#333E48"},useHTML:true},title:{text:null,margin:20,style:{color:"#333E48",fontFamily:"National2",fontWeight:"normal"}},offset:0,lineColor:"#CCCCCC",lineWidth:2,gridLineColor:"#EDEEEE",startOnTick:false,endOnTick:false},plotOptions:{column:{colorByPoint:true,borderWidth:0,dataLabels:{enabled:false,x:0,y:-10}},series:{pointPadding:.05,pointWidth:32,groupPadding:.1,animation:false,point:{events:{legendItemClick:function(){return false}}},events:{legendItemClick:function(){return false}},states:{inactive:{enabled:false}}}},legend:{enabled:false},tooltip:{animation:false,hideDelay:100,backgroundColor:"#333E48",borderWidth:0,shadow:false,headerFormat:"",followPointer:true,style:{fontFamily:"National2",fontSize:"13px",color:"#FFF"},useHTML:true},credits:{enabled:false}};SM.CustomizeActionMenu={};SM.CustomizeActionMenu.ActionMenuOptionsSettings={h1:{template:"customize-label-action-menu-template",visibleOptions:{labels:true},isTable:false},background:{template:"chart-customization-bg-action-menu-template",isTable:false},dataPoint:{template:"chart-customization-action-menu-template",isTable:false,visibleOptions:{change:true,customize:true}},dataLabel:{template:"chart-customization-action-menu-template",isTable:false,visibleOptions:{change:false,customize:true}},dataPointNPS:{template:"chart-customization-action-menu-template",isTable:false,visibleOptions:{change:false,customize:true}},legend:{template:"chart-customization-action-menu-template",isTable:false,visibleOptions:{change:true,customize:true}},legendNPS:{template:"chart-customization-action-menu-template",isTable:false,visibleOptions:{change:false,customize:true}},area:{template:"chart-customization-action-menu-template",isTable:false,visibleOptions:{change:true,customize:true}},yAxisLabel:{template:"chart-customization-action-menu-template",isTable:false,visibleOptions:{change:false,customize:true}},xAxisLabel:{template:"chart-customization-xAxis-action-menu-template",isTable:false},th:{template:"chart-customization-thead-action-menu-template",visibleOptions:{ascending:true,descending:true,unsorted:true,labels:true},isTable:true},caption:{template:"customize-label-action-menu-template",isTable:true},td:{template:"customize-label-action-menu-template",isTable:true,visibleOptions:{labels:true}}};SM.CustomizeActionMenu.actionMenu=function(e,t,n){var r=false,i=SM.CustomizeActionMenu.ActionMenuOptionsSettings[t],c,o=i.isTable?$(e.currentTarget):$(e.target),a=o.data("actionMenu"),p=0,s,l,d,u;c=n.visibleOptions?SM.Object.deepExtend(i.visibleOptions,n.visibleOptions):i.visibleOptions;if(!a){o.actionMenu({templateID:i.template,visibleOptions:c,isReadOnly:$(".analyze-container.read-only").length>0,answerID:n.answerID,position:{collision:"none none"}});a=o.data("actionMenu");o.one("actionMenu.afterOpen",function(e){u=e.actionMenu.get("menuView");u.$el.on("mouseover",function(){r=true}).on("mouseout",function(){r=false;setTimeout(function(){if(a&&!r){a.close()}},1e3)});u.$el.find(".options").on("mouseenter",function(){r=true})}).on("mouseout",function(){setTimeout(function(){if(a&&!r){a.close()}},p)});a.open()}u=a.get("menuView");if(e.pageX||e.pageY){s=e.pageX;l=e.pageY}else if(e.clientX||e.clientY){s=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;l=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}else if(n.parent){d=n.parent.offset();s=e.chartX+d.left;l=e.chartY+d.top}u.$el.css({left:s+"px",top:l+"px"});u.$el.find(".q").popout();if(!i.isTable){e.stopPropagation();a.close();if(t==="h1"){u.$el.find("a[data-action=labels]").trigger("click")}else if(t==="yAxisLabel"){u.$el.find("a[data-action=displayOptions]").trigger("click")}else if(t==="xAxisLabel"){u.$el.find("a[data-action=labels]").trigger("click")}else{u.$el.find("a[data-action=chartType]").trigger("click")}}};SM.CustomizeActionMenu.popout=function(e){$(e.currentTarget).popout()};SM.SortedSummary=function(e){var p=_____WB$wombat$check$this$function_____(this);var l="ascending",u="descending",g="unsorted";var s={order:SM.QuestionDisplayModel.SORTING_ORDERS.UNSORTED,dimensionType:null,dimensionID:null};function t(e){var t=e.question,n=e.labels,r=e.isMirrored,i=e.shouldHideEmptyData;p.summary=p._getSortedSummaryData(t,n,r,i,e)}function y(e){var n={};$.each(e,function(e,t){$.each(t.items,function(e,t){if(t.id){n[t.id]=t}})});return n}function d(t){return _.find(p.rows,function(e){return e.id===t})}function h(t){return _.find(p.columns,function(e){return String(e.id)===String(t)})}function r(t){return _.find(p.columnChoices,function(e){return String(e.id)===String(t)})}function b(){var t={};_.each(p.rows,function(e){t[e.id]=S(e.id)});return t}function v(){var t={};_.each(p.columns,function(e){t[e.id]=T(e.id)});return t}function w(){var t={},n;_.each(p.rows,function(e){n=p.summary.summary.options[e.id];if(n&&n.row_total!==undefined){t[e.id]=n.row_total}else{t[e.id]=0}});return t}function E(){var n={},r;if(p.isCompared){r=p.summary.summary.answered_subtotals}else{r=p.summary.summary.options.col_totals}_.each(p.columns,function(e,t){if(r){if(p.isCompared){n[e.id]=r[e.id]}else{n[e.id]=r[t]}}else{n[e.id]=0}});return n}function S(e){var t=0,n=p.summary.summary.options[e],r;if(n&&n.options){_.each(p.columns,function(e){r=n.options[Number(e.id)];if(r){t+=r.count}})}return t}function T(t){var n=0,r,i;_.each(p.rows,function(e){r=p.summary.summary.options[e.id];if(r&&r.options){i=r.options[t];if(i){n+=i.count}}});return n}function x(){var t={};_.each(p.columns,function(e){t[e.id]={count:n(e.id)}});return t}function n(t){var n,r,i,e,o=0,a=0,s=0;_.each(p.rows,function(e){n=p.summary.summary.options[e.id];if(n&&n.options){r=n.options[t];if(r){i=e.id;if(i==="Detractors"){a=r.count}else if(i==="Promoters"){o=r.count}else{s=r.count}}}});if(a+o+s===0){e=0}else{e=Math.round(100*(o-a)/(a+o+s))}return e}function C(){var t={},n;_.each(p.columns,function(e){n=T(e.id);t[e.id]=n});return t}function A(){var r={},i,o;$.each(p.columns,function(e,n){$.each(p.rows,function(e,t){if(r[t.id]===undefined){r[t.id]={}}r[t.id][n.id]=0;i=p.summary.summary.options[t.id];if(i){o=i.options[n.id];if(o){if(o.row_total!==undefined&&o.row_total>=0){r[t.id][n.id]=o.row_total}else{r[t.id][n.id]=o.count}}}})});return r}function k(r){var i={},o;$.each(p.rows,function(e,t){var n=p.summary.summary.options[t.id];if(n){$.each(n.options,function(e,n){$.each(r,function(e,t){if(i[t.id]===undefined){i[t.id]=0}o=n.options[t.id];if(o){i[t.id]+=o.count}})})}});return i}function M(e){var r={},i,o,a;_.each(p.rows,function(n){_.each(p.columns,function(t){e=e||t.items;_.each(e,function(e){if(r[n.id]===undefined){r[n.id]={}}if(r[n.id][e.id]===undefined){r[n.id][e.id]=0}i=p.summary.summary.options[n.id];if(i){o=i.options[t.id];if(o){a=o.options[e.id];if(a){r[n.id][e.id]+=a.count}}}})})});return r}function O(r){var i={},o,n;$.each(p.rows,function(e,t){n=p.summary.summary.options[t.id];if(n){$.each(n.options,function(e,n){$.each(r,function(e,t){if(i[t.id]===undefined){i[t.id]=0}o=n.options[t.id];if(o){i[t.id]+=o.count}})})}else{$.each(r,function(e,t){i[t.id]=0})}});return i}function D(){var n=[],e=p.sortedRowsList[0];if(e){_.each(e,function(e,t){n[t]=S(e.id)})}return n}function L(){var n=[],e=p.sortedColumnsList[0];if(e){$.each(e,function(e,t){n[e]=T(t.id)})}return n}function I(){return p.isCompared?true:p.sortOptions.dimensionType!=="labels"}function N(){return p.others!==undefined&&p.others[0].options.is_answer_choice}function j(){var n=p.sortedRowsList[0];if(N()){$.each(p.others,function(e,t){n.push(t)})}}function F(){if(N()){$.each(p.others,function(e,t){p.rows.push(t)});p.rows[p.rows.length-1].position=p.rows.length}}function R(){p.rows=_.filter(p.rows,function(e){return p.summary.summary.options[e.id]!==undefined})}function P(){var e={},t,r,i,o,a,s,l;_.each(p.columns,function(n){a=l=0;_.each(p.rows,function(e,t){i=p.summary.summary.options[e.id];if(i){o=i.options[n.id];if(o){s=o.count}else{s=0}}else{s=0}r=t+1;l+=r*s;a+=s});if(a===0){t=0}else{t=l/a}e[n.id]=t});return e}function B(){var n={},r,i,o,a,s,l;$.each(p.rows,function(e,t){r=p.summary.summary.options[t.id];if(r===undefined){n[t.id]=0}else{o=r.options;i=r.row_total;if(o){a=0;if(p.question.naCol!==undefined){s=o[p.question.naCol.id];if(s&&s.count){a=s.count}}l=q(p.columns,o,{naCount:a,total:i});n[t.id]=l}else{n[t.id]=0}}});return n}function z(){var r={},i,o,a,s;$.each(p.rows,function(e,n){r[n.id]={};i=p.summary.summary.options[n.id];if(i){$.each(p.columns,function(e,t){o=i.options[t.id];if(o===undefined){r[n.id][t.id]=0}else{a=o.options;if(a){s=W(p.columnChoices,a,{naCount:0});r[n.id][t.id]=s}}})}else{SM.log("No data for Row#"+n.id+" on Question#"+p.question.ID)}});return r}function V(){var r={},i,o;$.each(p.rows,function(e,n){r[n.id]={};i=p.summary.summary.options[n.id];if(i){if(p.isMirrored){$.each(p.columnChoices,function(e,t){o=G(p.columns,i,t);r[n.id][t.id]=o})}else{$.each(p.columns,function(e,t){o=G(p.columnChoices,i,t);r[n.id][t.id]=o})}}else if(p.isMirrored){$.each(p.columnChoices,function(e,t){r[n.id][t.id]=0})}else{$.each(p.columns,function(e,t){r[n.id][t.id]=0})}});return r}function H(e){var n={};$.each(e,function(e,t){if(t.options!==undefined&&t.options.is_na){n[t.id]=0;return}if(t.options===undefined||t.options.weight===undefined){n[t.id]=e+1}else{n[t.id]=t.options.weight}});return n}function U(e){var r={};$.each(e,function(e,t){var n=t.items;$.extend(r,H(n))});return r}function q(e,t,n){return Y(e,t,n)}function W(e,t,n){return Y(e,t,n)}function G(e,n,r){var i=0,o=0,a=0,s,l;$.each(e,function(e,t){if(t.options!==undefined&&t.options.is_na){return}if(p.isMirrored){s=n.options[t.id];if(s){l=s.options[r.id];if(l){a=l.count;i+=a*p.weights[t.id];o+=a}}}else{s=n.options[r.id];if(s){l=s.options[t.id];if(l){a=l.count;i+=a*p.weights[r.id];o+=a}}}});return K(i,o)}function Y(e,r,t){var i=t.total,n=t.naCount||0,o=false,a=0;t=t||{};if(_.isUndefined(i)){o=true;i=0}$.each(e,function(e,t){var n=0;if(undefined!==r[t.id]){n=r[t.id].count}a+=n*p.weights[t.id];if(o){i+=n}});i-=n;return K(a,i)}function K(e,t){var n=0;if(t!==0){n=e/t}return parseFloat(n.toFixed(2))}p._getSortedSummaryData=function(e,t,n,r,i){p.question=e;p.isMirrored=n;p.isCompared=p.question.isCompared();p.rollup=p.question.getRollup();p.display=p.rollup.display;p.summary=p.rollup.getContextSummary();if(i&&i.summary){p.summary=i.summary}p.questionType=p.summary.type;p.questionSubType=p.question.subtype;p.summaryType=p.isCompared?p.summary.summary.type:p.summary.type;p.hasColumnChoices=p.summaryType==="menu_matrix";p.answerStructures=SM.Summarizable.labelAnswerStructures(p.question.getContextAnswerStructure(),p.display,null,p.question);if(i&&i.answerStructures){p.answerStructures=i.answerStructures}p.rows=p.answerStructures.rows;p.columns=p.answerStructures.cols;p.columnChoices=p.hasColumnChoices?y(p.columns):null;p.columnChoicesArray=p.columnChoices?_.values(p.columnChoices):null;p.others=p.answerStructures.other;p.crossedOptions=p.answerStructures.crossedOptions;p.sortOptions=p.rollup.display.getDisplayData().sort_data;p.sortOptionsBS=p.rollup.display.getDisplayData().bs_sort_data;if(I()){F()}if(r){R()}p.rowIds=_.map(p.rows,function(e){return e.id});if(p.columns){p.columnIds=_.map(p.columns,function(e){return e.id})}if(p.hasColumnChoices){p.columnChoiceIds=_.map(p.columnChoices,function(e){return e.id})}if(p.summaryType!=="menu_matrix"){p.responsesCountsByRow=b();p.responsesCountsByColumn=v();p.respondentCountsByColumn=E();p.respondentCountsByRow=w()}if(p.question.isNPS()&&p.question.isCompared()){p.scoresByColumn=x()}p.columnTotals=C();if(p.isCompared||p.summaryType==="menu_matrix"){p.columnTotalsByRow=A()}if(p.hasColumnChoices){p.columnChoiceTotalsByRow=M();p.columnChoiceTotalsByColumnChoice=O(p.columnChoices)}p.numRows=p.rows.length;p.numColumns=p.columns?p.columns.length:0;if(p.numColumns>0){if(p.hasColumnChoices){if(p.isCompared){p.weights=H(p.columns);p.weightedAveragesByRowAndColumnChoice=V()}else{p.weights=U(p.columns);p.weightedAveragesByRowAndColumn=z()}}else{p.weights=H(p.columns);if(p.isCompared){p.weightedAveragesByColumn=P()}else{p.weightedAveragesByColumn=p.weights;p.weightedAveragesByRow=B()}}}p.sortedPositions={rows:[],columns:[],columnChoices:[]};p.sortingBS=false;X(p.sortOptions);Q();if(p.question.getRollup().hasBasicStats()){p.sortedPositions={rows:[],columns:[],columnChoices:[]};p.sortingBS=true;X(p.sortOptionsBS);Z();p.sortingBS=false}if(!_.isEmpty(p.sortedRowsList)){p.sortedRowTotals=D()}if(!_.isEmpty(p.sortedColumnsList)){p.sortedColumnTotals=L()}if(!I()){j()}return{sortedAnswers:{rowsList:p.sortedRowsList,columnsList:p.sortedColumnsList,columnChoicesList:p.sortedColumnChoicesList},sortedBS:{rowsList:p.sortedRowsListBS,columnsList:p.sortedColumnsListBS,columnChoicesList:p.sortedColumnChoicesListBS},totals:{sortedRowTotals:p.sortedRowTotals,sortedColumnTotals:p.sortedColumnTotals,columnTotalsByRow:p.columnTotalsByRow,columnChoiceTotalsByRow:p.columnChoiceTotalsByRow,columnChoiceTotalsByColumnChoice:p.columnChoiceTotalsByColumnChoice},counts:{responsesCountsByColumn:p.responsesCountsByColumn,responsesCountsByRow:p.responsesCountsByRow,respondentCountsByColumn:p.respondentCountsByColumn,respondentCountsByRow:p.respondentCountsByRow,scoresByColumn:p.scoresByColumn},weightedAverages:{weightedAveragesByRow:p.weightedAveragesByRow,weightedAveragesByColumn:p.weightedAveragesByColumn,weightedAveragesByRowAndColumn:p.weightedAveragesByRowAndColumn,weightedAveragesByRowAndColumnChoice:p.weightedAveragesByRowAndColumnChoice},weights:p.weights,quizRankings:p.sortedPositions.quizRankings}};function X(t){var n,e,r,i,o,a;if(p.summaryType==="menu_matrix"){if(!t){t={}}if(p.question.isCompared()){_.each(p.rows,function(e){if(!t[e.id]){t[e.id]=s}})}else{_.each(p.columns,function(e){if(!t[e.id]){t[e.id]=s}})}e=_.keys(t).sort();_.each(e,function(e){n=t[e];r=n.order;o=n.dimensionID;i=n.dimensionType;J(r,i,o,e)})}else{if(!t){t=s}r=t.order;i=t.dimensionType;o=t.dimensionID;a=true;if(o){a=p.rollup.combinehideModel.canApplySort(o)}if(a){J(r,i,o)}else{ee()}}}function Q(){p.sortedRowsList=[];p.sortedColumnsList=[];p.sortedColumnChoicesList=[];$.each(p.sortedPositions.rows,function(e,t){var n=[];$.each(t,function(e,t){n[t]=d(e)});p.sortedRowsList.push(n)});if(_.isEmpty(p.sortedRowsList)){p.sortedRowsList.push(p.rows)}$.each(p.sortedPositions.columns,function(e,t){var n=[];$.each(t,function(e,t){if(e!=="undefined"){n[t]=h(e)}});p.sortedColumnsList.push(n)});if(_.isEmpty(p.sortedColumnsList)){p.sortedColumnsList.push(p.columns)}$.each(p.sortedPositions.columnChoices,function(e,t){var n=[];$.each(t,function(e,t){n[t]=r(e)});p.sortedColumnChoicesList.push(n)});if(_.isEmpty(p.sortedColumnChoicesList)){p.sortedColumnChoicesList.push(p.columnChoices)}}function Z(){p.sortedRowsListBS=[];p.sortedColumnsListBS=[];p.sortedColumnChoicesListBS=[];$.each(p.sortedPositions.rows,function(e,t){var n=[];$.each(t,function(e,t){n[t]=d(e)});p.sortedRowsListBS.push(n)});if(_.isEmpty(p.sortedRowsListBS)){p.sortedRowsListBS.push(p.rows)}$.each(p.sortedPositions.columns,function(e,t){var n=[];$.each(t,function(e,t){if(e!=="undefined"){n[t]=h(e)}});p.sortedColumnsListBS.push(n)});if(_.isEmpty(p.sortedColumnsListBS)){p.sortedColumnsListBS.push(p.columns)}$.each(p.sortedPositions.columnChoices,function(e,t){var n=[];$.each(t,function(e,t){n[t]=r(e)});p.sortedColumnChoicesListBS.push(n)});if(_.isEmpty(p.sortedColumnChoicesListBS)){p.sortedColumnChoicesListBS.push(p.columnChoices)}}function J(e,t,n,r){if(n==="quiz_summary"){Me(e,t)}else if(e===g||e===undefined||e===null){ee(n,r)}else if(t==="averageRating"){te(e,r)}else if(t==="averageNumber"){Ce(e)}else if(t==="totals"){ne(e,n,r)}else if(t==="labels"){re(e,n,r)}else if(t==="responses"){Ae(e)}else if(t==="scores"){ke(e)}else{ie(e,t,n,r)}}function ee(e,t){if(p.sortingBS){if(p.isCompared){if(p.summaryType==="menu_matrix"){ae()}else{o()}}else{i()}}else if(p.isMirrored){if(p.questionType==="menu_matrix"){oe(t)}else if(p.isCompared){if(p.summaryType==="menu_matrix"){ae()}else{o()}}else{o()}}else if(p.isCompared){if(p.summaryType==="menu_matrix"){o()}else{i()}}else{i()}}function te(e,t){if(p.isMirrored){_e(e,t)}else{xe(e)}}function ne(e,t,n){if(p.questionType==="simple"){if(p.questionSubType==="numerical"){Te(e)}else{se(e)}}else if(p.questionType==="menu_matrix"){if(p.isMirrored){Ee(n,e)}else{be(n,e)}}else if(p.isCompared){if(p.isMirrored){if(p.summaryType==="menu_matrix"){Se(n,e)}else{ve(e)}}else if(p.summaryType==="menu_matrix"){we(n,e)}else{ye(e)}}else if(p.isMirrored){ve(e)}else{ye(e)}}function re(e,t,n){if(p.isCompared){if(p.isMirrored||p.sortingBS){if(p.summaryType==="menu_matrix"){ge(t,e)}else{me(e)}}else if(p.summaryType==="menu_matrix"){me(e)}else{fe(e)}}else if(p.isMirrored&&!p.sortingBS){if(p.questionType==="menu_matrix"){ge(n,e)}else{me(e)}}else{fe(e)}}function ie(e,t,n,r){if(p.sortingBS){if(p.isCompared){if(t==="row"){a(n,e)}else{he(r,n,e)}}else if(t==="column"){le(n,e)}else{ue(n,e,r)}}else if(p.isMirrored){if(p.questionType==="menu_matrix"){if(t==="row"){de(r,n,e)}else{oe(n)}}else if(t==="row"){a(n,e)}else if(t==="column"){if(p.isCompared&&p.hasColumnChoices){he(r,n,e)}else{o()}}else if(p.isCompared&&p.hasColumnChoices){ae()}else{a(n,e)}}else if(p.summaryType==="menu_matrix"){if(p.isCompared){pe(r,n,e)}else{ce(n,e)}}else if(t==="column"&&p.columns){le(n,e)}else if(p.isCompared&&t==="row"){le(n,e)}else if(t==="row"){a(n,e)}else{SM.log("Shouldn't have gotten here...");i()}}function i(){var n={};$.each(p.rows,function(e,t){n[t.id]=e});p.sortedPositions.rows.push(n)}function o(){var n={};$.each(p.columns,function(e,t){n[t.id]=e});p.sortedPositions.columns.push(n)}function oe(n){var r,i;$.each(p.columns,function(e,t){if(t.id===n){i={};r=t.items;$.each(r,function(e,t){i[t.id]=e});p.sortedPositions.columnChoices.push(i)}})}function ae(){var n={},e;e=_.sortBy(p.columnChoices,"position");$.each(_.values(e),function(e,t){n[t.id]=e});p.sortedPositions.columnChoices.push(n)}function se(e){var t=[],n;_.map(p.rows,function(e){n=p.summary.summary.options[e.id];if(n){t.push([e.id,n.count])}else{t.push([e.id,0])}});f(t,e)}function le(r,e){var i=[],o,t,a,s;t=p.sortingBS?SM.BasicStatsUtils.getStructure():p.columns;a=p.sortingBS?"stats":"options";_.map(p.rows,function(n){o=p.summary.summary.options[n.id];$.each(t,function(e,t){if(t.id===r){if(o){s=o[a][t.id];if(_.isNumber(s)){i.push([n.id,s])}else if(s){i.push([n.id,s.count])}else{i.push([n.id,0])}}else{i.push([n.id,0])}}})});f(i,e)}function ue(r,e,t){var i=[],o,a,s,l,u,c;$.each(p.rows,function(e,n){s=p.summary.summary.options[n.id];if(s){o=p.sortingBS?SM.BasicStatsUtils.getStructure():p.columns[0].items;a=p.sortingBS?"stats":"options";c=_.pluck(o,"id");if(_.contains(c,r)){l=s.options[t];if(l){$.each(o,function(e,t){if(t.id===r){u=l[a][t.id];if(_.isNumber(u)){i.push([n.id,u])}else if(u){i.push([n.id,u.count])}else{i.push([n.id,0])}}})}else{i.push([n.id,0])}}}else{i.push([n.id,0])}});f(i,e)}function ce(r,e){var i=[],o,a,s,l,u,c;$.each(p.rows,function(e,n){s=p.summary.summary.options[n.id];if(s){$.each(p.columns,function(e,t){o=p.sortingBS?SM.BasicStatsUtils.getStructure():t.items;a=p.sortingBS?"stats":"options";c=_.pluck(o,"id");if(_.contains(c,r)){l=s.options[t.id];if(l){$.each(o,function(e,t){if(t.id===r){u=l[a][t.id];if(_.isNumber(u)){i.push([n.id,u])}else if(u){i.push([n.id,u.count])}else{i.push([n.id,0])}}})}else{i.push([n.id,0])}}})}else{i.push([n.id,0])}});f(i,e)}function a(r,e){var i=[],o,a,t,s;t=p.sortingBS?SM.BasicStatsUtils.getStructure():p.rows;s=p.sortingBS?"stats":"options";_.map(p.columns,function(n){$.each(t,function(e,t){if(t.id===r){o=p.summary.summary[s][t.id];if(p.sortingBS){if(o&&o.compare){a=o.compare[n.id];if(_.isNumber(a)){i.push([n.id,a])}else{i.push([n.id,0])}}else{i.push([n.id,0])}}else if(o&&o.options){a=o.options[n.id];if(a){i.push([n.id,a.count])}else{i.push([n.id,0])}}else{i.push([n.id,0])}}})});c(i,e)}function pe(r,i,e){var o=[],a,s,l,u;$.each(p.columns,function(e,n){$.each(p.rows,function(e,t){if(t.id===r){s=p.summary.summary.options[t.id];l=s.options[n.id];if(s&&l){a=n.items;$.each(a,function(e,t){if(t.id===i){u=l.options[t.id];o.push([n.id,u.count])}})}else{o.push([n.id,0])}}})});c(o,e)}function de(e,r,t){var i=[],n,o,a,s;var l=h(e);n=l.items;$.each(n,function(e,n){$.each(p.rows,function(e,t){if(t.id===r){o=p.summary.summary.options[t.id];if(o){a=o.options[l.id];if(a){s=a.options[n.id];if(s){i.push([n.id,s.count])}else{i.push([n.id,0])}}else{i.push([n.id,0])}}else{i.push([n.id,0])}}})});m(i,t)}function he(e,t,n){var c=d(e),r,i,o,a,s,l,u=[];if(!p.sortingBS){r=h(t);i=r.items}else{r=_.findWhere(SM.BasicStatsUtils.cols,{id:t});i=p.columns[0].items}o=p.sortingBS?"stats":"options";a=p.summary.summary.options[c.id];if(a){s=a[o][r.id];if(s){$.each(i,function(e,t){if(p.sortingBS){l=s.compare[t.id];u.push([t.id,l])}else{l=s.options[t.id];u.push([t.id,l.count])}})}else{$.each(i,function(e,t){u.push([t.id,0])})}}else{$.each(i,function(e,t){u.push([t.id,0])})}m(u,n)}function fe(e){var t=[];_.map(p.rows,function(e){t.push([e.id,e.text])});f(t,e)}function me(e){var t=[];_.map(p.columns,function(e){t.push([e.id,e.text])});c(t,e)}function ge(e,t){var n=[],r,i;if(p.isCompared){i=_.values(p.columnChoices)}else{r=h(e);i=r.items}_.map(i,function(e){n.push([e.id,e.text])});m(n,t)}function ye(e){var t=[],n;_.map(p.rows,function(e){n=p.summary.summary.options[e.id];if(n){t.push([e.id,n.row_total])}else{t.push([e.id,0])}});f(t,e)}function be(t,e){var n=[],r,i;_.map(p.rows,function(e){r=p.summary.summary.options[e.id];if(r){i=r.options[t];if(i){n.push([e.id,i.row_total])}else{n.push([e.id,0])}}else{n.push([e.id,0])}});f(n,e)}function ve(e){var t=[];_.each(p.columns,function(e){t.push([e.id,p.columnTotals[e.id]])});c(t,e)}function we(n,e){var r=[];$.each(p.columns,function(e,t){r.push([t.id,p.columnTotalsByRow[n][t.id]])});c(r,e)}function Ee(n,e){var r=[],i,o;$.each(p.columns,function(e,t){if(t.id===n){i=t.items;o=k(i);$.each(i,function(e,t){r.push([t.id,o[t.id]])})}});m(r,e)}function Se(e,t){var n=[];_.each(p.rows,function(t){if(t.id===e){_.each(p.columnChoices,function(e){n.push([e.id,p.columnChoiceTotalsByRow[t.id][e.id]])})}});m(n,t)}function Te(e){var t=[],n;_.map(p.rows,function(e){n=p.summary.summary.options[e.id];if(n){t.push([e.id,n.sum])}else{t.push([e.id,0])}});f(t,e)}function xe(e){var n=[];$.each(p.weightedAveragesByRow,function(e,t){n.push([e,t])});f(n,e)}function _e(e,t){var n=[];var r=p.weightedAveragesByRowAndColumnChoice[t];_.each(r,function(e,t){n.push([t,e])});m(n,e)}function Ce(e){var t=[],n;_.each(p.rows,function(e){n=p.summary.summary.options[e.id];if(n){t.push([e.id,n.average])}else{t.push([e.id,0])}});f(t,e)}function Ae(e){var t=[],n;_.each(p.rows,function(e){n=p.summary.summary.options[e.id];if(n){t.push([e.id,n.count])}else{t.push([e.id,0])}});f(t,e)}function ke(e){var t=[],n;_.each(p.rows,function(e){n=p.summary.summary.quiz_stats.option_values[e.id];if(n){t.push([e.id,n.score])}else{t.push([e.id,0])}});f(t,e)}function Me(i,e){var o=e==="rankings"?"rank":e==="averageScores"?"avg_score":"position",n=p.question.survey,t=_.map(p.question.structure.question_ranking,function(e){var t=n.getQuestion(e.question_id);_.extend(e,{heading:t.heading,position:t.position});return e});t.sort(function(e,t){var n=e[o],r=t[o];if(o!=="position"){if(!e.rank&&!t.rank){return e.position-t.position}if(!e.rank){return 1}if(!t.rank){return-1}if(n===r){return 0}}if(i==="descending"){return n<r?1:-1}return n>r?1:-1});p.sortedPositions.quizRankings=t}function f(e,t){Oe("rows",e,t)}function c(e,t){Oe("columns",e,t)}function m(e,t){Oe("columnChoices",e,t)}function Oe(e,t,n){var r,i={};if(n===l){r=t.sort(De)}else if(n===u){r=t.sort(Le)}else if(n===g){r=t}$.each(r,function(e,t){var n=t[0];i[n]=e});p.sortedPositions[e].push(i)}function De(e,t){if(typeof e[1]==="string"){if(e[1].toLowerCase()>t[1].toLowerCase()){return 1}if(e[1].toLowerCase()<t[1].toLowerCase()){return-1}return 0}return e[1]-t[1]}function Le(e,t){if(typeof e[1]==="string"){if(e[1].toLowerCase()<t[1].toLowerCase()){return 1}if(e[1].toLowerCase()>t[1].toLowerCase()){return-1}return 0}return t[1]-e[1]}t(e)};SM.NPSSummary=function(e){var t=_____WB$wombat$check$this$function_____(this),n="rows",r,i,o,a;function s(e){r.init(e);i.init(e);o.init(e);a.init(e)}function l(){a._buildComposites();t.compositeSummary=o.compositeSummary;t.compositeAnswerStructure=r.compositeAnswerStructure}r=SM.Object.deepExtend(SM.QuestionModel,{init:function(e){this.structure={answers:e.answerStructures};this.answers=e.answerStructures;this.dim=n},canCombineHide:function(){return true},isMultipleChoice:function(){return true},getCombineHideDim:function(){return this.dim},getContextStructure:function(){return this.structure},getContextAnswerStructure:function(){return this.answers}});i=SM.Object.deepExtend(SM.QuestionDisplayModel,{init:function(){this.question=r;this.rollup=o;this.display={}},getDisplayData:function(){return this.display}});o=SM.Object.deepExtend(SM.QuestionRollupModel,{init:function(e){this.question=r;this.summary=e.rollup;this.display=i;this.type=e.type}});a=SM.Object.deepExtend(SM.QuestionCombineHideModel,{init:function(e){this.question=r;this.rollup=o;if(e.type==="score"){this.buildSettings4Score(e.answerStructures[n])}else{this.buildSettings4Distribution(e.answerStructures[n])}},buildSettings4Score:function(e){var t=_.pluck(e,"id");this.settings={combines:[{id:"Score",title:"",combine:t}],hides:[]}},buildSettings4Distribution:function(e){var t=_.pluck(e,"id");this.settings={combines:[{combine:t.slice(0,7),id:"Detractors",title:Globalize.localize("Detractors (0-6)")},{combine:t.slice(7,9),id:"Passives",title:Globalize.localize("Passives (7-8)")},{combine:t.slice(9,11),id:"Promoters",title:Globalize.localize("Promoters (9-10)")}],hides:[]}}});s(e);l()};SM.Sortable={SORTING_ORDERS:{UNSORTED:"unsorted",ASCENDING:"ascending",DESCENDING:"descending"},DIMENSION_TYPES:{LABELS:"labels",RESPONSES:"responses",TOTALS:"totals",POSITIONS:"positions",RANKINGS:"rankings",SCORES:"scores",AVERAGE_SCORES:"averageScores",AVERAGE_RATING:"averageRating",AVERAGE_NUMBER:"averageNumber",ROW:"row",COLUMN:"column",COLUMN_CHOICE:"columnChoice",DATA_SEGMENT:"dataSegment",MIN:"min",LOWER_QUARTILE:"lowerQuartile",MEDIAN:"median",UPPER_QUARTILE:"upperQuartile",MAX:"max"}};SM.Summarizable={SCALE_TYPE_PERCENT:"percent",_createAsSummarizable:function(e){var t=_____WB$wombat$check$this$function_____(this),n=e.question,r=n.getRollup(),i=r.display,o=i.getBenchmarkDisplay(),a=i.isTop2ChartType(),s=n.isTop2(),l=!o||s&&a,u=o&&s&&a,c=l?n.getContextAnswerStructure(u):n.getContextStructure().answers,p=l?r.getContextSummary(u):r.summary;t.question=n;t.isCompared=n.isCompared();t.rollup=r;t.display=i;t.summary=p;t.benchmarkSummary=this.question.survey.getBenchmarkRollup(t.question.ID);t.questionType=this.summary.type;t.questionSubType=this.question.subtype;t.questionFamily=this.question.family;t.answerStructures=t.labelAnswerStructures(c,t.display,{noLabelByWeight:e.noLabelByWeight,noLabelBySidi:e.noLabelBySidi});t._setAsSummarizable();t._mungeOtherData()},_setAsSummarizable:function(){var e=_____WB$wombat$check$this$function_____(this);e.rows=e.answerStructures.rows.slice();e.columns=e.answerStructures.cols;e.others=e.answerStructures.other;e.crossedOptions=e.answerStructures.crossedOptions;e.numRows=e.rows.length;e.numColumns=e.columns?e.columns.length:0},_setAsSummarizableNps:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r;r=t.npsSummary[e];t.summary=r.summary;t.answerStructures=t.labelAnswerStructures(r.answerStructures,t.display);if(t.question.isCompared()){t._setAsSummarizable();n=t.rollup.getSortedSummary({summary:t.summary,answerStructures:t.answerStructures});t.setSortedSummaryAttributes(n);t.scoresByColumn=n.counts.scoresByColumn;t.sortedRowsList=[t.answerStructures.rows]}},_setAsSummarizableNpsScoreComparedChart:function(){var e=_____WB$wombat$check$this$function_____(this),t,n;n=e.npsSummary.distribution;e.summary=n.summary;e.answerStructures=e.labelAnswerStructures(n.answerStructures,e.display);e._setAsSummarizable();t=e.rollup.getSortedSummary({summary:e.summary,answerStructures:e.answerStructures});e.setSortedSummaryAttributes(t);e.scoresByColumn=t.counts.scoresByColumn;n=e.npsSummary.score;e.answerStructures=e.labelAnswerStructures(n.answerStructures,e.display);e._setAsSummarizable();e.sortedRowsList=[e.answerStructures.rows];e.summary.summary.options={Score:{options:e.scoresByColumn}}},labelAnswerStructures:function(e,t,n,r){var i=_____WB$wombat$check$this$function_____(this),o,a=t.getDisplayData().mirror,c=t.getDisplayData().show_basic_stats,p=t.getDisplayData().show_sig_diffs,d=n&&n.noLabelByWeight,h=n&&n.noLabelBySidi,s=t.getDisplayData().labels,l,u;r=r||i.question;if(c&&!d&&r.ID!=="quiz_summary"){o=r.labelByWeights(e)}else{o=SM.Object.deepCopy(e)}if(s){if(s.rows){_.each(o.rows,function(e){l=s.rows[e.id];if(l){if(!_.isEmpty(l.text)){e.text=l.text}}})}if(s.columns){_.each(o.cols,function(e){l=s.columns[e.id];if(l){if(!_.isEmpty(l.text)){e.text=l.text}}})}if(s.columnChoices){_.each(o.cols,function(e){_.each(e.items,function(e){l=s.columnChoices[e.id];if(l){if(!_.isEmpty(l.text)){e.text=l.text}}})})}if(s.crossedOptions){_.each(o.crossedOptions,function(e){l=s.crossedOptions[e.id];if(l){if(!_.isEmpty(l.text)){e.text=l.text;if(p){e.text+=" (A)"}}}});if(a){_.each(o.cols,function(e){_.each(e.items,function(e){l=s.crossedOptions[e.id];if(l){if(!_.isEmpty(l.text)){e.text=l.text}}})})}else{_.each(o.rows,function(e){_.each(e.items,function(e){l=s.crossedOptions[e.id];if(l){if(!_.isEmpty(l.text)){e.text=l.text}}})})}if(o.cols&&o.crossedOptions&&o.cols[0].id===o.crossedOptions[0].id){_.each(o.cols,function(e){l=s.crossedOptions[e.id];if(l){if(!_.isEmpty(l.text)){e.text=l.text}}})}}if(s.others){u=o.other[0];l=s.others[u.id];if(!_.isEmpty(l.text)){u.text=l.text}}}if(!h){i.labelBySidi(o,r,t)}return o},labelBySidi:function(e,t,n){var r=n.getDisplayData().mirror,i=n.getDisplayData().show_sig_diffs;if(i&&t.isStatisticalSignificanceEnabled()&&t.isCompared()){if(t.isMenuMatrix()){if(r){_.each(e.cols,function(e){_.each(e.items,function(e){if(e.sidiLabel){e.text+=" ("+e.sidiLabel+")"}})})}else{_.each(e.rows,function(e){_.each(e.items,function(e){if(e.sidiLabel){e.text+=" ("+e.sidiLabel+")"}})})}}else if(e.cols&&e.crossedOptions&&e.cols[0].id===e.crossedOptions[0].id){_.each(e.cols,function(e){if(e.sidiLabel){e.text+=" ("+e.sidiLabel+")"}})}}return e},_getDisplayOptions:function(){var e=_____WB$wombat$check$this$function_____(this);e.displayData=e.rollup.display.getDisplayData();e.showTable=e.displayData.show_table;e.showChart=e.displayData.show_chart;e.isMirrored=e.displayData.mirror;e.isStacked=e.displayData.isStacked;e.isWeightedAvg=e.displayData.isWeightedAvg;e.showDataLabels=e.displayData.show_data;e.hideEmptyData=!e.displayData.show_empty_data;e.scaleType=e.displayData.scale_type;e.scaleIsPercent=e.scaleType===e.SCALE_TYPE_PERCENT;e.decimalPlaces=e.scaleIsPercent?e.displayData.dp_percentage:e.displayData.dp_absolute;e.decimalPlacesAbsolute=e.displayData.dp_absolute;e.decimalPlacesPercentage=e.displayData.dp_percentage;e.showBasicStats=e.displayData.show_basic_stats;e.showSidi=e.displayData.show_sig_diffs},_getSortedSummaryData:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.rollup.getSortedSummary({summary:e.summary,answerStructures:e.answerStructures});e.summaryType=e.isCompared?e.summary.summary.type:e.summary.type;e.hasColumnChoices=e.summaryType==="menu_matrix";if(e.isCompared){e.aggregateOverColumns=e.summaryType==="matrix"&&e.isMirrored}else{e.aggregateOverColumns=e.isMirrored}e.setSortedSummaryAttributes(t)},setSortedSummaryAttributes:function(e){var t=_____WB$wombat$check$this$function_____(this);t.sortedRowsList=e.sortedAnswers.rowsList;t.sortedColumnsList=e.sortedAnswers.columnsList;t.sortedColumnChoicesList=e.sortedAnswers.columnChoicesList;t.sortedRowsListBS=e.sortedBS.rowsList;t.sortedColumnsListBS=e.sortedBS.columnsList;t.sortedColumnChoicesListBS=e.sortedBS.columnChoicesList;t.responsesCountsByRow=e.counts.responsesCountsByRow;t.responsesCountsByColumn=e.counts.responsesCountsByColumn;t.respondentCountsByColumn=e.counts.respondentCountsByColumn;t.respondentCountsByRow=e.counts.respondentCountsByRow;t.sortedRowTotals=e.totals.sortedRowTotals;t.sortedColumnTotals=e.totals.sortedColumnTotals;t.columnTotalsByRow=e.totals.columnTotalsByRow;t.columnChoiceTotalsByRow=e.totals.columnChoiceTotalsByRow;t.columnChoiceTotalsByColumnChoice=e.totals.columnChoiceTotalsByColumnChoice;t.weightedAveragesByRow=e.weightedAverages.weightedAveragesByRow;t.weightedAveragesByColumn=e.weightedAverages.weightedAveragesByColumn;t.weightedAveragesByRowAndColumn=e.weightedAverages.weightedAveragesByRowAndColumn;t.weightedAveragesByRowAndColumnChoice=e.weightedAverages.weightedAveragesByRowAndColumnChoice;t.weights=e.weights},_getNpsData:function(){var e=_____WB$wombat$check$this$function_____(this);e.npsSummary=e.rollup.buildNpsSummary()},_mungeOtherData:function(){var t=_____WB$wombat$check$this$function_____(this);var e=t.others!==undefined&&t.others[0].options.is_answer_choice;if(e){_.each(t.others,function(e){t.rows.push(e)})}}};SM.SummarySeriesFactory=SM.Object.extend(SM.Summarizable,SM.Sortable,{buildSimpleSeries:function(e,n,t){var r=_____WB$wombat$check$this$function_____(this),i,o,a,s,l;i=r._summarizeDimension(n,e.summary,function(e,t){a=n[t];s=a?a.text:null;l=r.summary.answered;o=r._buildSeriesItemDatum(e,l,s);return o},function(e){a=n[e];s=a?a.text:null;o=r._buildSeriesItemDatum(null,0,s);return o},t&&t.isBasicStats?{key:"stats"}:null);return[r._buildSeriesItem(i)]},_makeWeights:function(e){var t={};_.each(e,function(e){t[e.id]=e.position});return t},buildSimpleWeightedAverageSeries:function(e,t){var i=this._makeWeights(t),n=[],o=0,a=0,r,s,l;_.each(e.summary.options,function(e,t){var n=0,r=0;if(i[t]){n=i[t];r=e.count}a+=r;o+=r*n});if(a===0){r=1}else{r=o/a}s=this._buildSeriesItemDatum(r,a,"weightedAverage");l=this._buildSeriesItem([s]);n.push(l);return n},buildSimpleSeriesFromMatrixSummary:function(){var n=_____WB$wombat$check$this$function_____(this),e=[],t,r,i,o,a,s,l,u,c;a=n.rows[0];s=n.summary.summary.options[a.id];o=n.sortedColumnsList[0];r=n._summarizeDimension(o,s,function(e,t){l=o[t];u=l?l.text:null;c=s.row_total;i=n._buildSeriesItemDatum(e,c,u);return i},function(e){l=o[e];u=l?l.text:null;i=n._buildSeriesItemDatum(null,0,u);return i});t=n._buildSeriesItem(r);e.push(t);return e},buildSimpleSeriesFromComparedMatrixSummary:function(){var t=_____WB$wombat$check$this$function_____(this),e=[],n,r,i,o,a,s,l,u;o=t.columns[0];u=t.summary.answered;r=_.map(t.rows,function(e){a=t.summary.summary.options[e.id];l=e.text;if(a){s=a.options[o.id];if(s){i=t._buildSeriesItemDatum(s,u,l)}else{i=t._buildSeriesItemDatum(null,0,l)}}else{i=t._buildSeriesItemDatum(null,0,l)}return i});n=t._buildSeriesItem(r);e.push(n);return e},buildSimpleSeriesFromMenuMatrixSummary:function(c){var n=_____WB$wombat$check$this$function_____(this),e=[],t,r,i,o,a,p,s,l,u,d;a=n.rows[0];p=n.summary.summary.options[a.id];s=p.options[c];o=n.sortedColumnChoicesList[0];r=n._summarizeDimension(o,s,function(e,t){l=o[t];u=l?l.text:null;d=s.row_total;i=n._buildSeriesItemDatum(e,d,u);return i},function(e,t){l=o[t];u=l?l.text:null;i=n._buildSeriesItemDatum(null,0,u);return i});t=n._buildSeriesItem(r);e.push(t);return e},buildSimpleStackedSeries:function(e,n){var r=_____WB$wombat$check$this$function_____(this),t,i,o,a,s,l,u;t=r._summarizeDimension(n,e.summary,function(e,t){a=n[t];s=a?a.text:null;l=r.summary.answered;i=r._buildSeriesItemDatum(e,l,s);return i},function(e){a=n[e];s=a.text;i=r._buildSeriesItemDatum(null,0,s);return i});o=_.map(t,function(e,t){s=e.name;u=n.length;return r._buildSeriesItem([e],{name:s,index:t,numSeries:u})});return o},buildTop2StackedSeries:function(u){var c=_____WB$wombat$check$this$function_____(this),a=u.isCompared?c.rollup.top2compositeSummary:c.summary,h=c.rollup.summary.summary.answered_subtotals,e=c.question.getBenchmarkRollup(),s=c.answerStructures,l=u.isCompared?s.cols:s.rows,t,n,p=[],f=[],m=[],g,y,b,v,w,d=c.rollup.answeredCount,E=c.summary.answered,r=e.getNumResponses(),S=e.getContextDistributionValues(),i=[],T,x=0,C,A,o,k=Globalize.localize("Your Top 2 Box Score"),M=e.getSegmentName()+" "+Globalize.localize("Top 2 Box Score");u=u||{};for(o=0;o<l.length;o++){i[o]=0}if(u.isCompared){_.each(l,function(n,r){_.each(a.summary.options,function(e){_.each(e.options,function(e,t){if(t===n.id){i[r]+=e.count}})})});_.each(i,function(e,t){var n=c.summary.crossed_rows[t],r=h[n],i=r===0?0:e*100/r,o=d===0?0:r*100/d,a=e===0,s,l=k;p.push({__options:{disableDataLabels:a},y:i,absoluteY:e,percentageY:i,name:l});m.push({y:o,absoluteY:r,percentageY:o,name:l});if(u.isTable){T=r;s=r===0?0:T*100/E}else{T=r-e;s=r===0||e===0?0:T*100/r}f.push({__options:{disableDataLabels:true},y:s,absoluteY:T,percentageY:s,name:"rest"})})}else{c._summarizeDimension(l,a.summary,function(e,t){i[t]+=e.count;return{}},function(){return{}});_.each(i,function(e,t){var n=d===0?0:e*100/d,r=d===0?0:(d-e)*100/d,i=u.isCompared?l[t].text:k,o=e===0;if(t===0){c.top2pct=n}p.push({__options:{decimalPlaces:1,disableDataLabels:o},y:n,absoluteY:e,percentageY:n,name:i});f.push({__options:{disableDataLabels:true},y:r,absoluteY:d-e,percentageY:r,name:"rest"})})}x=S.length===0?0:0 in S?S[0].count:0;b={y:0,absoluteY:0,percentageY:0,name:"blank"};C=r===0?0:x*100/r;A=r===0?0:(r-x)*100/r;c.bmTop2pct=C;g={y:C,absoluteY:x,percentageY:C,name:"BMtop2"};y={__options:{disableDataLabels:true},y:A,absoluteY:r-x,percentageY:A,name:"BMrest"};w={y:100,absoluteY:r,percentageY:100};if(u.isTable){t=[];if(u.isCompared){if(u.distribution){n=c._buildSeriesItem([g],{dimension:{text:e.getSegmentName(),type:"responses"},index:0,numSeries:1,template:"benchmark-matrix-table-response-cell",name:"name of segment"});t.push(n);n=c._buildSeriesItem([w],{dimension:{text:Globalize.localize("Total"),type:"responses"},index:0,numSeries:1,template:"benchmark-matrix-table-response-cell",name:"sub totals"});t.push(n)}else{n=c._buildSeriesItem(p,{dimension:{text:Globalize.localize("Your Top 2 Box Score"),type:"row"},index:0,numSeries:p.length,template:"benchmark-matrix-table-response-cell",name:k});t.push(n);n=c._buildSeriesItem(m,{dimension:{text:Globalize.localize("Total"),type:"row"},index:0,numSeries:1,template:"benchmark-matrix-table-response-cell",name:"sub totals"});t.push(n)}}else{n=c._buildSeriesItem(p,{dimension:{text:Globalize.localize("Your Responses"),dimension:"row"},index:0,numSeries:p.length,template:"benchmark-matrix-table-response-cell",name:k});t.push(n);n=c._buildSeriesItem([g],{dimension:{text:e.getSegmentName(),dimension:"row"},index:0,numSeries:1,sampleSize:e.getSampleSize(),template:"benchmark-matrix-table-response-cell",name:"name of segment"});t.push(n)}}else{p.push(b);f.push(y);v=[];for(o=0;o<i.length;o++){v.push(b)}v.push(g);t=[c._buildSeriesItem(p,{name:k,index:0,numSeries:p.length}),c._buildSeriesItem(v,{name:M,index:1,numSeries:v.length}),c._buildSeriesItem(f,{name:"rest",hideLegendItem:true,index:2,numSeries:f.length,disableHover:true})]}return t},buildNumericalSeries:function(e){var t=_____WB$wombat$check$this$function_____(this),n=[],r,i,o,a,s,l,u,c,p;e=e||{};i=t.sortedRowsList[0];a=_.map(i,function(e){o=t.summary.summary.options[e.id];u=o?o.average:0;return{absoluteY:Globalize.format(u,"n0")}});r=t._buildTableSeriesItem(a,e.averageSeriesName,"averageNumber");n.push(r);s=_.map(i,function(e){o=t.summary.summary.options[e.id];c=o?o.sum:0;return{absoluteY:Globalize.format(c,"n0")}});r=t._buildTableSeriesItem(s,e.totalSeriesName,"totals");n.push(r);l=_.map(i,function(e){o=t.summary.summary.options[e.id];p=o?o.count:0;return{absoluteY:Globalize.format(p,"n0")}});r=t._buildTableSeriesItem(l,e.responsesSeriesName,"responses");n.push(r);return n},buildMatrixSeries:function(r){var i=_____WB$wombat$check$this$function_____(this),e,t=[],o,p,a,s,l,u,n,c,d,h;r=r||{};e=r.columns||i.columns;l=r.isBasicStats?i.sortedRowsListBS[0]:i.sortedRowsList[0];_.each(e,function(n,e){p=i._summarizeDimension(l,i.summary.summary,function(e,t){if(r.isBasicStats&&e.stats){u=e.stats[n.id];a=i._buildSeriesItemDatum(u,0,null,{})}else if(e.options){c=l[t];u=e.options[n.id];h=i.respondentCountsByRow[c.id];s={};if(i._seriesDatumHasComments(c)){s.commentData=i._buildCommentData({option:c,crossedOption:n,crossedOptionSummary:u,matrixCross:i._isMatrixCross(i.summary)})}a=i._buildSeriesItemDatum(u,h,null,s)}else{a=i._buildSeriesItemDatum(null,0)}return a},function(e){c=l[e];a=i._buildSeriesItemDatum(null,0);return a});o=i._buildSeriesItem(p,{dimension:n,index:e,numSeries:i.numColumns});t.push(o)});if(r.includeTotal){d=_.map(l,function(e){var t=i.respondentCountsByRow[e.id];return{absoluteY:Globalize.format(t,"n0")}});o=i._buildTableSeriesItem(d,r.totalSeriesName,"totals");t.push(o)}if(r.includeAverage){n=i._calculateAverage(l,function(e){return i.weightedAveragesByRow[e.id]});o=i._buildTableSeriesItem(n,r.averageSeriesName,"averageRating");t.push(o)}return t},buildMirroredMatrixSeries:function(t){var r=_____WB$wombat$check$this$function_____(this),e,d,i=[],o,a,n,h,f,s,l,m,u,c,g,y,p,b;t=t||{};u=t.isBasicStats?r.sortedColumnsListBS[0]:r.sortedColumnsList[0];e=t.rows||r.rows;d=t.isBasicStats?"stats":"options";_.each(e,function(n,e){c=r.summary.summary[d][n.id];f=r._summarizeDimension(u,c,function(e,t){l={};p=u[t];b=r.respondentCountsByColumn[p.id];if(r.question.randomAssignmentOption!==undefined){b=r.respondentCountsByRow[n.id]}if(r._seriesDatumHasComments(n)){g="0";if(r.question.randomAssignmentOption!==undefined){g=r.question.randomAssignmentOption.toString()}l.commentData=r._buildCommentData({option:n,crossedOption:p,crossedOptionSummary:e,matrixCross:r._isMatrixCross(r.summary),variationID:g})}s=r._buildSeriesItemDatum(e,b,null,l);return s},function(e){p=u[e];s=r._buildSeriesItemDatum(null,0);return s},t.isBasicStats?{key:"compare"}:null);a={dimension:n,index:e,numSeries:r.numRows};if(r.question.hasCommentsPerRow()){y=c?c.row_other:0;a.hasCommentsPerRow=true;a.numComments=Globalize.format(y,"n0")}o=r._buildSeriesItem(f,a);i.push(o)});if(t.includeTotal){n=_.map(u,function(e){var t=r.responsesCountsByColumn[e.id];return{absoluteY:Globalize.format(t,"n0")}});o=r._buildTableSeriesItem(n,t.totalSeriesName,"totals");i.push(o)}if(t.includeScore){h=_.map(u,function(e){var t=r.scoresByColumn[e.id];return{absoluteY:Globalize.format(t.count,"n0")}});o=r._buildTableSeriesItem(h,t.scoreSeriesName,"score");i.push(o)}if(t.includeAverage){m=r._calculateAverage(u,function(e){return r.weightedAveragesByColumn[e.id]});o=r._buildTableSeriesItem(m,t.averageSeriesName,"averageRating");i.push(o)}return i},buildMenuMatrixSeries:function(n,t,p,d,e){var r=_____WB$wombat$check$this$function_____(this),i=[],o,a,s,h,l,f,m,g,u,c,y,b=e&&e.isBasicStats?"stats":"options",v;e=e||{};v=r.summary.summary;m=p.length;if(r.isMirrored&&!r.isBasicStats){u=r.sortedColumnChoicesList[t];_.each(r.rows,function(e,t){h=v.options[e.id];if(h){l=h.options[n.id];if(l){a=r._summarizeDimension(u,l,function(e,t,n){c=d[n];s=r._buildSeriesItemDatum(e,c);return s},function(){s=r._buildSeriesItemDatum(null,0);return s})}else{a=r._dataForUnsummarizedDimension(u.length)}}else{a=r._dataForUnsummarizedDimension(u.length)}o=r._buildSeriesItem(a,{dimension:e,index:t,numSeries:r.numRows});i.push(o)});if(e.includeTotal){y=_.map(u,function(e){c=r.columnChoiceTotalsByColumnChoice[e.id];return{absoluteY:Globalize.format(c,"n0")}});o=r._buildTableSeriesItem(y,e.totalSeriesName,"totals");i.push(o)}}else{g=e.isBasicStats?r.sortedRowsListBS[t]:r.sortedRowsList[n.position-1];_.each(p,function(t,e){a=r._summarizeDimension(g,v,function(e){l=e.options[n.id];if(l){f=l[b][t.id];c=l.row_total;s=r._buildSeriesItemDatum(f,c)}else{s=r._buildSeriesItemDatum(null,0)}return s},function(){s=r._buildSeriesItemDatum(null,0);return s});o=r._buildSeriesItem(a,{dimension:t,index:e,numSeries:m});i.push(o)});if(e.includeTotal){y=_.map(g,function(e){c=r.columnTotalsByRow[e.id][n.id];return{absoluteY:Globalize.format(c,"n0")}});o=r._buildTableSeriesItem(y,e.totalSeriesName,"totals");i.push(o)}}return i},buildComparedMatrixSeries:function(t,n,p,r){var i=_____WB$wombat$check$this$function_____(this),o=[],d,a,s,e,l,h,f,u,m,g,y,b,c,v,w;r=r||{};m=n.length;l=i.summary.summary.options[t.id];if(i.isMirrored||i.isBasicStats){y=r.isBasicStats?i.sortedColumnChoicesListBS[t.position-1]:i.sortedColumnChoicesList[t.position-1];e=r.columns||i.columns;d=r.isBasicStats?"stats":"options";_.each(e,function(e,t){if(l){h=l[d][e.id];if(h){a=i._summarizeDimension(y,h,function(e,t,n){c=p[n];s=i._buildSeriesItemDatum(e,c);return s},null,r.isBasicStats?{key:"compare"}:null)}else{a=_.map(n,function(){s=i._buildSeriesItemDatum(null,0);return s})}}else{a=_.compact(_.map(n,function(e){if(e.id){s=i._buildSeriesItemDatum(null,0);return s}}))}u=i._buildSeriesItem(a,{dimension:e,index:t,numSeries:i.numColumns});o.push(u)});if(r.includeTotal){b=_.map(y,function(e){c=i.columnChoiceTotalsByRow[t.id][e.id];return{absoluteY:Globalize.format(c,"n0")}});u=i._buildTableSeriesItem(b,r.totalSeriesName,"totals");o.push(u)}if(r.includeAverage){v=i._calculateAverage(y,function(e){return i.weightedAveragesByRowAndColumnChoice[t.id][e.id]});u=i._buildTableSeriesItem(v,r.averageSeriesName,"averageRating");o.push(u)}}else{g=i.sortedColumnsList[t.position-1];_.each(n,function(t,e){a=i._summarizeDimension(g,l,function(e){w=t.id||t.variable_id;f=e.options[w];c=e.row_total;s=i._buildSeriesItemDatum(f,c);return s},function(){s=i._buildSeriesItemDatum(null,0);return s});u=i._buildSeriesItem(a,{dimension:t,index:e,numSeries:m});o.push(u)});if(r.includeTotal){b=_.map(g,function(e){c=i.columnTotalsByRow[t.id][e.id];return{absoluteY:Globalize.format(c,"n0")}});u=i._buildTableSeriesItem(b,r.totalSeriesName,"totals");o.push(u)}if(r.includeAverage){v=i._calculateAverage(g,function(e){return i.weightedAveragesByRowAndColumnChoice[t.id][e.id]});u=i._buildTableSeriesItem(v,r.averageSeriesName,"averageRating");o.push(u)}}return o},buildComparedMatrixSeriesNumericalBasicStats:function(e,t,n){var r=_____WB$wombat$check$this$function_____(this),i=[],o,a,s,l,u;s=r.summary.summary.stats[e.id];_.each(t,function(e,t){if(s){l=s[e.id];if(l){o=r._summarizeDimension(n,l,function(e){a=r._buildSeriesItemDatum(e,1);return a},null,{key:"compare"})}else{o=_.map(n,function(){a=r._buildSeriesItemDatum(null,0);return a})}}else{o=_.compact(_.map(n,function(e){if(e.id){a=r._buildSeriesItemDatum(null,0);return a}}))}u=r._buildSeriesItem(o,{dimension:e,index:t,numSeries:r.numColumns});i.push(u)});return i},_buildBenchmarkDistributionTableSeries:function(e,n){var r=[],t,i=e.getContextDistributionValues(),o=e.getNumResponses(),a=n.isTop2?"table-response-cell":"benchmark-table-percentage-cell",s=n.isTop2?"table-response-cell":"benchmark-table-response-cell";_.each(i,function(e,t){r.push({name:t,data:[{absoluteY:e.count,percentageY:e.percent*100,name:t}],__options:{dimensionType:n.isTop2?SM.Sortable.DIMENSION_TYPES.RESPONSES:"percentage",template:a}})});t=[{y:o,absoluteY:o,percentageY:100,name:5}];r.push({name:"Total",data:t,__options:{dimensionType:SM.Sortable.DIMENSION_TYPES.RESPONSES,template:s}});return r},_buildBenchmarkNPSDistributionTableSeries:function(e){var r=[],t=e.getNpsDistributionValues(),n=this.getNPSScore();_.each(t,function(e,t){var n=[{absoluteY:e.responses,percentageY:e.percentage,name:t}];r.push({name:t,data:n,__options:{dimensionType:"averageRating",template:"benchmark-table-response-cell"}})});r.push({name:"Net promo",data:[{absoluteY:n,percentageY:n,name:"Nt prom"}],__options:{dimensionType:"averageRating",template:"benchmark-table-response-cell"}});return r},_buildBenchmarkQuartileTableSeries:function(e,n){var r=[],i,t=e.getQuartileValuesArray(),o=e.getNumResponses();_.each(t,function(e,t){i=[{y:e,absoluteY:e,percentageY:e,value:e,name:n.names[t]}];r.push({name:"Benchmark",data:i,__options:{dimensionType:"averageRating",template:"benchmark-table-response-cell"}})});if(!n.nps&&n.includeTotal){i=[{y:o,absoluteY:o,percentageY:o,name:5}];r.push({name:"Total",data:i,__options:{dimensionType:SM.Sortable.DIMENSION_TYPES.RESPONSES,template:"benchmark-table-response-cell"}})}return r},buildComparedAverageSeries:function(){var n=this.question,e=n.compareStructure.answers.crossedOptions,t=this.question.getRollup(),u=t.summary.summary.options,o=t.summary.summary.answered_subtotals,c=[],r=[];if(n.isNPS()){u=this.npsSummary.distribution.summary.summary.options;_.each(e,function(e){var t=e.id,n=u.Detractors?u.Detractors.options||{}:{},r=n[t]?n[t].count||0:0,i=u.Passives?u.Passives.options||{}:{},o=i[t]?i[t].count||0:0,a=u.Promoters?u.Promoters.options||{}:{},s=a[t]?a[t].count||0:0,l;if(r+o+s>0){l=100*(s-r)/(r+o+s);c.push({y:l,absoluteY:l,percentageY:l,value:l,name:e.text})}});r.push({name:"User Scores",data:c,__options:{dimensionType:SM.Sortable.DIMENSION_TYPES.AVERAGE,template:"benchmark-table-response-cell"}});return r}_.each(e,function(e){var r=e.id,i=0,t=0;_.each(n.answers,function(e,t){var n=e.position;if(u[t]&&u[t].options[r]){i+=u[t].options[r].count*n}});if(o[r]){t=i/o[r]}c.push({y:t,absoluteY:t,percentageY:t,value:t,name:e.text})});r.push({name:"Weighted Averages",data:c,__options:{dimensionType:SM.Sortable.DIMENSION_TYPES.AVERAGE,template:"benchmark-table-response-cell"}});return r},NPS_MINIMUM:-100,NPS_MAXIMUM:100,BOXPLOT_LINE_WIDTH:4,BOXPLOT_MEDIAN_WIDTH:2,BOXPLOT_MEDIAN_COLOR:"#FFFFFF",BOXPLOT_USER_VALUE_LINE_WIDTH:2,_buildBenchmarkQuartileChartSeries:function(e,n){var t=e.getQuartileValues(),r,i,o=[],a=[],s=n.colors[0],l=SM.Highcharts.DEFAULT_BENCHMARK_COLORS.slice(1),u;if(this.question.isCompared()){i=this.buildComparedAverageSeries();_.each(i[0].data,function(e,t){o.push({name:e.name,color:l[t%l.length],lineWidth:this.BOXPLOT_USER_VALUE_LINE_WIDTH,data:[e],__options:{dimensionType:"userAverage"}})})}else{if(this.question.isNPS()){r=this.getNPSScore();u=Globalize.localize("Your Net Promoter&#174; Score")}else{r=e.getResponseMean(this.question.ID);if(this.question.is_tmbc){u=Globalize.localize("Your average")}else{u=Globalize.localize("Your score")}}o.push({name:u,color:l[0],lineWidth:this.BOXPLOT_USER_VALUE_LINE_WIDTH,data:[{y:r,absoluteY:r,percentageY:r,name:u}]})}_.each(t,function(e,t){a.push({y:e,absoluteY:e,percentageY:e,name:n.names[t]})});a=[[],[],a,[]];o.push({name:e.getSegmentName(),pointWidth:58,data:a,tooltip:{headerFormat:"<em>Experiment No {point.key}</em><br/>"},color:s,fillColor:s,stemColor:s,stemWidth:this.BOXPLOT_LINE_WIDTH,whiskerColor:s,whiskerWidth:this.BOXPLOT_LINE_WIDTH,medianColor:this.BOXPLOT_MEDIAN_COLOR,medianWidth:this.BOXPLOT_MEDIAN_WIDTH,__options:{dimensionType:"benchmark"}});return o},getNPSScore:function(){return this.npsSummary.score.summary.summary.options.Score.count},isNPSScoreValid:function(){var e,t,n,r;if(this.question.isCompared()){e=this.npsSummary.distribution.summary.summary.options;if(!e){return false}t=e.Detractors?e.Detractors.row_total||0:0;n=e.Passives?e.Passives.row_total||0:0;r=e.Promoters?e.Promoters.row_total||0:0;return t+n+r!==0}return!this.npsSummary.score.summary.summary.options.Score.noResponses},buildSimpleBenchmarkSeries:function(e){var t=this.question.survey.getBenchmarkRollup(this.question.ID);e.names=[Globalize.localize("Minimum"),Globalize.localize("Lower Quartile"),Globalize.localize("Median"),Globalize.localize("Upper Quartile"),Globalize.localize("Maximum")];if(e.tableOutput){if(e.distribution){if(this.question.isNPS()){return this._buildBenchmarkNPSDistributionTableSeries(t,e)}if(e.isTop2&&e.isCompared){return this.buildTop2StackedSeries(e)}return this._buildBenchmarkDistributionTableSeries(t,e)}return this._buildBenchmarkQuartileTableSeries(t,e)}return this._buildBenchmarkQuartileChartSeries(t,e)},_customizeColors:function(e,n){_.each(e,function(e,t){e.color=n[t]})},buildBenchmarkMatrixSeries:function(e){var i=_____WB$wombat$check$this$function_____(this),t=[],n,r,o,c,a,s,p,d,l,h=i.question.isNPS(),u,f=!_.isUndefined(i.answerStructures.other),m=i.displayData.benchmark_chart_type===i.display.DISPLAY_VALUES.top2_vbar||i.displayData.benchmark_chart_type===i.display.DISPLAY_VALUES.top2_hbar||i.displayData.benchmark_chart_type===i.display.DISPLAY_VALUES.top2_donut,g;e=e||{};u=i.summary.summary;if(i.question.compositeAnswerStructure&&!(i.question.isTop2()&&m)){a=i.question.structure.answers.rows;u=i.rollup.summary.summary}else if(h){a=i.answerStructures.rows}else{a=i.sortedRowsList[0]}if(!e.ignoreUserData){s=0;_.each(u.options,function(e,t){var n,r;if(f){r=_.find(i.answerStructures.other,function(e){if(e.id===t){return true}});n=!!r}if(!n){s+=e.count}});r=i._summarizeDimension(a,u,function(e){if(e){c={};o=i._buildSeriesItemDatum(e,s,null,c)}else{o=i._buildSeriesItemDatum(null,0)}return o},function(){o=i._buildSeriesItemDatum(null,0);return o});if(h){i._customizeColors(r,SM.Highcharts.NPS_DISTRIBUTION_COLORS)}l=SM.Object.extend({},a[0]);l.text=Globalize.localize("Your Responses");n=i._buildSeriesItem(r,{dimension:l,index:0,numSeries:2,template:"benchmark-matrix-table-response-cell"});t.push(n);if(e.includeTotal){p=_.map(a,function(e){return{absoluteY:Globalize.format(i.respondentCountsByRow[e.id],"n0")}});n=i._buildTableSeriesItem(p,e.totalSeriesName,"totals");t.push(n)}if(e.includeAverage){d=i._calculateAverage(a,function(e){return i.weightedAveragesByRow[e.id]});n=i._buildTableSeriesItem(d,e.averageSeriesName,"averageRating");t.push(n)}}g=m?i.benchmarkSummary.getContextDistributionValues():i.benchmarkSummary.getDistributionValues();r=i._summarizeBenchmarkRow(a,g);if(h){i._customizeColors(r,SM.Highcharts.NPS_BENCHMARK_DISTRIBUTION_COLORS)}n=i._buildSeriesItem(r,{dimension:{text:i.benchmarkSummary.getSegmentName()},index:1,numSeries:2,template:"benchmark-matrix-table-percent-cell",name:i.benchmarkSummary.getSegmentName()});n.__options.sampleSize=Globalize.format(i.benchmarkSummary.getSampleSize(),"n0");t.push(n);return t},buildComparedBenchmarkMatrixSeries:function(e){var n=this.buildMirroredMatrixSeries(e),t;e.ignoreUserdata=true;t=this.buildBenchmarkMatrixSeries(e);_.each(t[1].data,function(e,t){n[t].data.push(e)});return n},_dataForUnsummarizedDimension:function(e){var t=_____WB$wombat$check$this$function_____(this),n=[],r;_.times(e,function(){r=t._buildSeriesItemDatum(null,0);n.push(r)});return n},_summarizeDimension:function(e,n,r,i,t){var o,a,s=[],l=t&&t.key?t.key:"options",u=this.question.hasRandomAssignment(),c=this.question.randomAssignmentOption;_.each(e,function(e,t){if(n&&n[l]){o=n[l][e.id];if(!o&&u){o=n[l][c]}if(o||_.isNumber(o)){a=r(o,t,e.id)}else if(i){a=i(t,e.id)}else{a=[0,0]}}else if(i){a=i(t,e.id)}else{a=[0,0]}s.push(a)});return s},_summarizeBenchmarkRow:function(e,n){var r=[];if(_.isEmpty(n)){_.each(e,function(){r.push({_options:{},absoluteY:0,name:null,percentageY:0,y:0})})}else{_.each(e,function(t){var e=_.find(n,function(e){if(t.id===e.option_ids[t.question_id]){return e}});if(!e){e={count:0,percent:0}}r.push({_options:{},absoluteY:e.count,name:null,percentageY:e.percent*100,y:e.percent*100})})}return r},_buildSeriesItemDatum:function(e,t,n,r){var i=_____WB$wombat$check$this$function_____(this),o,a,s,l;if(_.isNumber(e)){a=e;s=null}else if(_.isEmpty(e)){a=0;if(i.get("isBasicStats")||i.isBasicStats){s=null}else{s=0}}else{l=i.questionSubType==="numerical"&&!i.isCompared;o=l?"average":"count";a=e[o];if(!l){s=i._calculatePercentage(a,t)}}return{y:i.scaleIsPercent?s:a,absoluteY:a,percentageY:s,name:n,__options:r}},_seriesDatumHasComments:function(e){var t=_____WB$wombat$check$this$function_____(this);return t.isCompared&&e.is_openended&&!e.apply_all_rows},_buildCommentData:function(e){return{optionID:e.option.id,crossedOptionID:e.crossedOption.id,matrixCross:e.matrixCross,numComments:e.crossedOptionSummary.count||0,variationID:e.variationID}},_isMatrixCross:function(e){return e.crossed_cols?"1":"0"},_calculatePercentage:function(e,t){if(t===undefined||t===0||e===undefined){return 0}return e/t*100},_buildSeriesItem:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r,i,o,a;r={name:null,data:e,__options:{}};if(!_.isEmpty(t)){i=t.dimension;if(i){r.name=i.text;r.__options.labelText=i.text;r.__options.labelHTML=i.mediaHTML;r.__options.dimensionType=n._getDimensionType(i);r.__options.dimensionID=i.id}if(t.name!==undefined){r.name=t.name}r.__options.hasCommentsPerRow=t.hasCommentsPerRow;r.__options.numComments=t.numComments;o=t.index;a=t.numSeries;if(o!==undefined&&a!==undefined){r.index=n._seriesIndex(o,a);r.legendIndex=n._legendIndex(o,a)}if(t.template){r.__options.template=t.template}if(t.hideLegendItem){r.__options.hideLegendItem=t.hideLegendItem}if(t.disableHover){r.states={hover:{enabled:false}}}if(t.sampleSize){r.__options.sampleSize=t.sampleSize}}r.__options.scaleType=n.scaleType;r.__options.decimalPlaces=n.decimalPlaces;r.__options.showDataLabels=n.displayData.show_data;r.__options.isLegend=n.displayData.isLegend;if(n.questionSubType==="net_promoter_score"&&n.nps_depth==="score"){r.__options.decimalPlaces=0}return r},_seriesIndex:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=n.highchartsChartType==="column"&&!n.isStacked;return r?e:t-e},_legendIndex:function(e,t){var n=false;return n?t-e:e},_getDimensionType:function(e){if(e.type==="column_choice"){return"columnChoice"}return e.type},_buildTableSeriesItem:function(e,t,n){return{name:t,data:e,__options:{labelText:t,dimensionType:n}}},_calculateAverage:function(e,n){var r,i,t;t=_.map(e,function(e,t){r=n(e,t);i=Globalize.format(r,"n2");return{absoluteY:i}});return t}});SM.CompositeSummaryBuilder={buildCompositeSummary:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=n.summary,i=r.summary;if(!e){if(t){n.top2compositeSummary=null}else{n.compositeSummary=null}return}if(r.type==="compare"&&i.type==="matrix"){n.buildCompositeSummaryComparedMatrix(r,e,t)}else if(r.type==="matrix"){n.buildCompositeSummaryMatrix(r,e,t)}else if(r.type==="simple"){n.buildCompositeSummarySimple(r,e,t)}},buildCompositeSummarySimple:function(e,t,n){var r=_____WB$wombat$check$this$function_____(this),i,o,a;a=SM.Object.deepCopy(e);o=e.summary.options;i=r._buildCompositeOptions(o,t);a.summary.options=i;if(!r.question.isMultipleChoice()){a.answered=r._calcAnswered(i)}if(n){r.top2compositeSummary=a}else{r.compositeSummary=a}},_calcAnswered:function(e){var n=_____WB$wombat$check$this$function_____(this),r=0;_.each(e,function(e,t){if(_.isArray(e)){return}if(t==="other_option"){return}if(n.question.isOther(t)&&!n.question.otherIsAnAnswerChoice()){return}if(e.count){r+=e.count}else if(e.options){_.each(e.options,function(e){r+=e.count})}});return r},_buildScoreByDistribution:function(e){var t={Score:{count:0}},n,r=0,i=0,o=0;_.each(e,function(e,t){if(t==="Detractors"){i=e.count}else if(t==="Promoters"){r=e.count}else{o=e.count}});if(i+r+o===0){n=0;t.Score.noResponses=true}else{n=Math.round(100*(r-i)/(i+r+o))}t.Score.count=n;return t},_buildCompositeOptions:function(e,n){var r=_____WB$wombat$check$this$function_____(this),i,o,a,s;if(r.type==="score"){return r._buildScoreByDistribution(e)}o={};_.each(e,function(e,t){if(n[t]===null){return}if(t==="other_option"){return}if(_.isUndefined(n[t])){o[t]=[];o[t].push(e)}else{s=n[t].id;if(!o[s]){o[s]=[]}o[s].push(e)}});i={};_.each(o,function(e,t){a=r.combineSummaries(e);i[t]=a});return i},_calcColTotals:function(e,t,n){var r=false,i={},o=[];_.each(e,function(e,t){if(!e.options){return}if(t==="other_option"){return}_.each(e.options,function(e,t){if(e.count){if(!i[t]){i[t]=0}i[t]+=e.count}else if(e.options){r=true;_.each(e.options,function(e,t){if(!i[t]){i[t]=0}i[t]+=e.count})}})});_.each(t,function(e){if(!i[e]){i[e]=0}o.push(i[e])});if(!r){e.col_totals=o}if(n){n.answered_subtotals=i}},_calcOptionStats:function(e){var t=0,n=0;_.each(e.options,function(e){if(e.count){t+=e.count;n=Math.max(n,e.count)}else if(e.options){_.each(e.options,function(e){t+=e.count})}});e.row_max=n;e.row_total=t;return t===0},buildCompositeSummaryMatrix:function(e,n,t){var r=_____WB$wombat$check$this$function_____(this),i,o,a,s=SM.Object.deepCopy(e),l=e.summary.options,u=s.summary.options;_.each(l,function(e,t){o=e.options;if(!o){return}i=r._buildCompositeOptions(o,n);u[t].options=i;if(r.question.isMultipleChoice()){u[t].row_total=e.row_total;u[t].row_max=e.row_max}else{r._calcOptionStats(u[t])}});a=_.pluck(r.question.compositeAnswerStructure.cols,"id");r._calcColTotals(u,a);if(!r.question.isMultipleChoice()){s.answered=r._calcAnswered(u)}if(t){r.top2compositeSummary=s}else{r.compositeSummary=s}},buildCompositeSummaryComparedMatrix:function(e,t,n){var r=_____WB$wombat$check$this$function_____(this),i,o,a;a=SM.Object.deepCopy(e);o=e.summary.options;i=r._buildCompositeOptions(o,t);if(o.other_option){i.other_option=SM.Object.deepCopy(o.other_option)}r._calcColTotals(i,a.crossed_cols||a.crossed_rows,a.summary);a.summary.options=i;if(!r.question.isMultipleChoice()){a.answered=r._calcAnswered(i)}if(n){r.top2compositeSummary=a}else{r.compositeSummary=a}},combineSummaries:function(e){var t=_____WB$wombat$check$this$function_____(this),n={};_.each(e,function(e){t.aggregate(n,e)});return n},aggregate:function(n,e){var r=_____WB$wombat$check$this$function_____(this);_.each(e,function(e,t){if(!_.has(n,t)){if(_.isNumber(e)){n[t]=e}else{n[t]=SM.Object.deepCopy(e)}}else if(_.isNumber(e)){n[t]+=e}else{r.aggregate(n[t],e)}})}};SM.TMBCPopout=SM.Widgets.register({__NAME:"tmbcpopout",__defaults:{templateID:"tmbc-popout-msg-template",tipSideX:"left",tipSideY:"top",parentElement:document.body,offsetX:null,offsetY:null,at:"left top",showDelayTime:250,hideDelayTime:150,collision:"flip flip"},__init:function(){this.$el.on("mouseenter",{popout:this},this._onMouseenter).on("mouseleave",{popout:this},this._onMouseleave)},_isHovered:false,_isMsgSetup:false,_$msg:undefined,_tipSideX:undefined,_tipSideY:undefined,_offsetX:undefined,_offsetY:undefined,_positions:{left:{css:"tip-left",offset:"+32",flip:"right"},right:{css:"tip-right",offset:"-15",flip:"left"},bottom:{css:"tip-bottom",offset:"+34",flip:"top"},top:{css:"tip-top",offset:"-14",flip:"bottom"}},_beforeShow:function(){var e;if(this.__settings.offsetX){this._offsetX=this.__settings.offsetX}else{this._offsetX=this._positions[this.__settings.tipSideX].offset}if(this.__settings.offsetY){this._offsetY=this.__settings.offsetY}else{this._offsetY=this._positions[this.__settings.tipSideY].offset}this._$msg=this.$el.find(".popout");this._$msg=this._$msg.clone();e=SM.Template.render(this.__settings.templateID,this.__settings);this._$msg.append(e);this._$msg.on("mouseenter",{popout:this},this._onMessageMouseenter).on("mouseleave",{popout:this},this._onMessageMouseleave).addClass("sidi-tip-"+this.__settings.tipSideX).appendTo(this.__settings.parentElement);this._isMsgSetup=true;return _____WB$wombat$check$this$function_____(this)},_show:function(){var i=_____WB$wombat$check$this$function_____(this);setTimeout(function(){var e=i.$el,t=e.offset(),n=t.left,r=t.top;if(i._isHovered){if(i.__settings.tipSideX==="left"){n+=e.outerWidth()+10}else{n-=i._$msg.outerWidth()}r+=(e.outerHeight()-i._$msg.outerHeight())/2;r+=i.__settings.offsetY;i._$msg.addClass("open").css({left:Math.floor(n)+"px",top:Math.floor(r)+"px"});i.trigger("opened")}},i.get("showDelayTime"));return i},_hide:function(){var e=_____WB$wombat$check$this$function_____(this);setTimeout(function(){if(!e._isHovered){if(e._$msg){e._$msg.remove()}e._isMsgSetup=false}},e.get("hideDelayTime"));return e},_onMouseenter:function(e){var t=e.data.popout;t._isHovered=true;if(!t._isMsgSetup){t._beforeShow()._show()}},_onMouseleave:function(e){var t=e.data.popout;t._isHovered=false;t._hide()},_onMessageMouseenter:function(e){var t=e.data.popout;t._isHovered=true},_onMessageMouseleave:function(e){var t=e.data.popout;t._isHovered=false;t._hide()}});SM.Models.register("QuestionDisplay",SM.Object.deepExtend(SM.Sortable,{DISPLAY_VALUES:{show:"show",hide:"hide",percent:"percent",absolute:"absolute",labels:"labels",legend:"legend",wtd_avg:"weighted_avg",distribution:"distribution",pie:"pie",donut:"donut",hbar:"hbar",vbar:"vbar",area:"area",line:"line",boxplot:"boxplot",top2_vbar:"top2_vbar",top2_hbar:"top2_hbar",top2_donut:"top2_donut",stacked:"stacked",stacked_hbar:"stacked_hbar",stacked_vbar:"stacked_vbar",nps_score:"score",nps_detailed:"detailed",nps_distribution:"distribution",score_hbar:"score_hbar",score_vbar:"score_vbar",score_gauge:"score_gauge",none:"none",menu_matrix:"menu_matrix",matrix:"matrix",mirror:"mirror",disabled:"disabled",single_chart:"single_chart",breakdown:"breakdown",breakdown_trend:"breakdown_trend",rating_trend:"rating_trend"},DISPLAY_OPTIONS:{chart_type:"chart_type",benchmark_chart_type:"benchmark_chart_type",driver_state:"driver_state",colors:"colors",stacking:"stacking",benchmark_stacking:"benchmark_stacking",scale_type:"scale_type",scale_min_absolute:"scale_min_absolute",scale_min_percentage:"scale_min_percentage",scale_min_stacked:"scale_min_stacked",scale_min_wtd_avg:"scale_min_wtd_avg",scale_max_absolute:"scale_max_absolute",scale_max_percentage:"scale_max_percentage",scale_max_stacked:"scale_max_stacked",scale_max_wtd_avg:"scale_max_wtd_avg",dp_absolute:"dp_absolute",dp_percentage:"dp_percentage",mirror:"mirror",matrix_display:"matrix_display",label_type:"label_type",labels:"labels",show_data:"show_data",show_chart:"show_chart",show_table:"show_table",show_basic_stats:"show_basic_stats",show_sig_diffs:"show_sig_diffs",show_empty_data:"show_empty_data",show_benchmark:"show_benchmark",sort_data:"sort_data",bs_sort_data:"bs_sort_data",nps_depth:"nps_depth"},SHARED_DISPLAY_OPTIONS:["chart_type","benchmark_chart_type","stacking","scale_type","matrix_display","label_type","colors","show_data","show_chart","show_table","show_basic_stats","show_sig_diffs","show_empty_data","dp_absolute","dp_percentage","scale_max_wtd_avg","scale_min_wtd_avg"],DEFAULT_CHART_TYPE:"hbar",DRIVER_DEFAULT_DISPLAY_OPTIONS:{tmbc:{shared:{show_table:"hide"},by_question_type:{"single_choice.vertical":{matrix_display:"weighted_avg"}},by_depth_type:{},by_compared:{}},std:{shared:{},by_question_type:{},by_depth_type:{},by_compared:{}}},DEFAULT_DISPLAY_OPTIONS:{shared:{chart_type:"hbar",benchmark_chart_type:"hbar",stacking:"none",matrix_display:"distribution",scale_type:"percent",show_chart:"show",show_table:"show",show_data:"hide",show_basic_stats:"hide",show_sig_diffs:"hide",show_empty_data:"show",dp_absolute:"0",dp_percentage:"2"},by_question_type:{"matrix.rating":{matrix_display:"distribution"},"single_choice.net_promoter_score":{nps_depth:"score",chart_type:"score_gauge"},"matrix.ranking":{matrix_display:"weighted_avg"},"single_choice.vertical":{show_benchmark:"hide"}},by_depth_type:{single:{label_type:"labels"},matrix:{label_type:"legend"},menu_matrix:{label_type:"legend"}},by_compared:{true:{mirror:"mirror",chart_type:"stacked_hbar",stacking:"stacked"},false:{mirror:"none"}}},METAKEY_TYPE_COMPARE:"compare:",UNTYPED_DISPLAY_OPTIONS:{show_chart:true,show_table:true,show_empty_data:true,show_basic_stats:true,show_sig_diffs:true,colors:true,dp_absolute:true,dp_percentage:true,labels:true,show_benchmark:true,sentiment_toggle:true,driver_state:true,tmbc_chart_type:true},BENCHMARKABLE_CHART_TYPES:{hbar:true,vbar:true,top2_hbar:true,top2_vbar:true,top2_donut:true},TOP2_CHART_TYPES:{top2_hbar:true,top2_vbar:true,top2_donut:true},__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.question=e.question;t.rollup=e.rollup;t.tempDisplay={};t.displayUpdates={};t.defaultViewMetadataUpdates={}},_fetchMetadata:function(){var i=_____WB$wombat$check$this$function_____(this),o=i.rollup.isCompare(),a=i.METAKEY_TYPE_COMPARE,e=i.question,s=e.displayOptions||e.survey.anviews.defaultView.getDisplayData(e.ID),l={};_.each(s,function(e,t){var n=SM.String.beginsWith(t,a),r;if(!n){if(o){r=a+t;if(i.UNTYPED_DISPLAY_OPTIONS[t]&&s[r]===undefined){l[t]=s[t]}}else if(!o){l[t]=s[t]}}else{r=t;if(o){t=r.substr(a.length);l[t]=s[r]}}});return l},_updateMetadata:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=t.noTypify?false:n.rollup.isCompare();if(n.question.survey.anviews){n.question.survey.anviews.defaultView.updateDisplayData(n.question.ID,e,{isCompared:r,untypedKeys:n.UNTYPED_DISPLAY_OPTIONS,done:t.done,fail:t.fail})}},getDisplayData:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.question,c=n.survey,p=n.family+"."+n.subtype,d=c.getDriverType(),r=t.DRIVER_DEFAULT_DISPLAY_OPTIONS[d],h=n.depthType(),f=n.isCompared(),m=f.toString(),g=t._fetchMetadata(),i,y,o,b,v,a=t.DISPLAY_VALUES.show,s,l,w,E,S,T,x,C=SM.StarRatingUtils.newVizEffective(n),A={},k,u,M=["open_ended.multi","datetime.both","datetime.date_only","datetime.time_only","open_ended.single","open_ended.essay"];if(_.isUndefined(e)){e={}}if(_.isUndefined(e.includeTempDisplay)){e.includeTempDisplay=true}k=SM.Object.deepCopy(t.DEFAULT_DISPLAY_OPTIONS.by_compared);if(t.question.isNPS()&&t.question.isCompared()){k.true.chart_type=t.DISPLAY_VALUES.score_hbar;k.true.stacking=t.DISPLAY_VALUES.none}if(d==="tmbc"&&!n.is_tmbc){r=t.DRIVER_DEFAULT_DISPLAY_OPTIONS.std}if(C){A[t.DISPLAY_OPTIONS.chart_type]=t.DISPLAY_VALUES.wtd_avg}s=SM.Object.extend(t.DEFAULT_DISPLAY_OPTIONS.shared,r.shared,t.DEFAULT_DISPLAY_OPTIONS.by_question_type[p],r.by_question_type[p],A,t.DEFAULT_DISPLAY_OPTIONS.by_depth_type[h],r.by_depth_type[h],k[m],r.by_compared[m],g);if(M.includes(p)){s.show_table=t.DISPLAY_VALUES.show}if(e.includeTempDisplay){s=SM.Object.extend(s,t.tempDisplay)}if(n.isMatrix()&&s.matrix_display===t.DISPLAY_VALUES.wtd_avg){if(n.isNPS()){s.matrix_display=t.DISPLAY_VALUES.nps_score}else{b=t.question.isCompared()?t.DISPLAY_VALUES.mirror:t.DISPLAY_VALUES.none;if(s.mirror!==b){t._updateMetadata({mirror:b},{});s.mirror=b}}}s.depth_type=h;s.show_chart=s.show_chart===a;s.show_table=s.show_table===a;s.show_data=s.show_data===a;s.show_empty_data=s.show_empty_data===a;s.show_basic_stats=s.show_basic_stats===a;s.show_sig_diffs=s.show_sig_diffs===a&&n.isCompared();s.mirror=s.mirror===this.DISPLAY_VALUES.mirror;s.show_benchmark=n.isBenchmarkable()&&s.show_benchmark===a&&!c.shouldShowProfiler()&&c.canShowBenchmarking();if(s.show_benchmark){if(!s.benchmark_chart_type){if(c.isTMBCTemplate()){s.benchmark_chart_type=t.DISPLAY_VALUES.boxplot}else if(n.isTop2()){s.benchmark_chart_type=t.DISPLAY_VALUES.top2_vbar}}if(s.benchmark_chart_type in t.TOP2_CHART_TYPES&&!t.question.isTop2()){s.benchmark_chart_type=t.DISPLAY_VALUES.hbar}if(s.benchmark_chart_type===t.DISPLAY_VALUES.top2_donut&&t.question.isCompared()&&t.question.compareStructure.answers.cols.length!==1){s.benchmark_chart_type=t.DISPLAY_VALUES.top2_vbar}if(s.benchmark_chart_type){s.chart_type=s.benchmark_chart_type}if(s.benchmark_stacking){s.stacking=s.benchmark_stacking}if(s.chart_type!==t.DISPLAY_VALUES.boxplot){if(t.question.isNPS()&&t.question.isCompared()){s.chart_type=t.DISPLAY_VALUES.boxplot}else{s.depth_type="matrix"}}if(s.matrix_display===t.DISPLAY_VALUES.wtd_avg){s.matrix_display=t.DISPLAY_VALUES.distribution}s.show_sig_diffs=false}else if(s.chart_type===t.DISPLAY_VALUES.boxplot){s.chart_type=t.DISPLAY_VALUES.hbar}if(t._shouldSetDefaultSortData(s)){t._setDefaultSortData(s)}if(t.question.isNPS()){t._setDefaultSortData(s)}v=[t.DISPLAY_VALUES.pie,t.DISPLAY_VALUES.donut,t.DISPLAY_VALUES.line,t.DISPLAY_VALUES.area];if(t.question.isNPS()&&_.contains(v,s.chart_type)){s.chart_type=t.question.isCompared()?t.DISPLAY_VALUES.score_hbar:t.DISPLAY_VALUES.score_gauge}i=t.tableHasOneRow(s);if(n.isMultiResponse()&&(t._isPieChart(s)||t._isDonutChart(s))){s.chart_type=t.DEFAULT_CHART_TYPE}if(t._isStacked(s)){s.stacking=t.DISPLAY_VALUES.stacked;if(t._isVerticalBarChart(s)){s.chart_type=t.DISPLAY_VALUES.stacked_vbar}else if(t._isHorizontalBarChart(s)){s.chart_type=t.DISPLAY_VALUES.stacked_hbar}}if(s.depth_type!==n.QTYPE.single){if(i&&(t._isAreaChart(s)||t._isLineChart(s))){s.chart_type=t.DEFAULT_CHART_TYPE}if(!i&&(t._isPieChart(s)||t._isDonutChart(s))){s.chart_type=t.DEFAULT_CHART_TYPE}}if(t._scaleIsPercent(s)&&(t._isStacked(s)||t._isAreaChart(s))&&t._tableRowsAddToMoreThan100Percent(s)){s.scale_type=this.DISPLAY_VALUES.absolute}if(t._isPieChart(s)||t._isDonutChart(s)){s.scale_type=this.DISPLAY_VALUES.percent;if(s.stacking===this.DISPLAY_VALUES.none){if(!i&&!n.isSingleChoice()){s.matrix_display=this.DISPLAY_VALUES.wtd_avg}}}if(n.QTYPE.open_ended===n.family&&n.QTYPE.numerical===n.subtype){s.scale_type=this.DISPLAY_VALUES.absolute}if(s.depth_type===n.QTYPE.single){if(s.stacking===this.DISPLAY_VALUES.stacked){s.label_type=this.DISPLAY_VALUES.legend}else if(!t._isPieChart(s)&&!t._isDonutChart(s)){s.label_type=this.DISPLAY_VALUES.labels}s.mirror=false;if(!n.isSingleChoice()||n.isNPS()){s.matrix_display=this.DISPLAY_VALUES.distribution}}if(this.DISPLAY_VALUES.wtd_avg===s.matrix_display){s.scale_type=this.DISPLAY_VALUES.absolute;s.stacking=this.DISPLAY_VALUES.none}if(n.isSimple()){if(!t.rollup.options){s.hasShowEmptyOptions=true}else{_.each(n.getContextStructure().answers.rows,function(e){if(!t.rollup.options[e.id]){s.hasShowEmptyOptions=true}})}}else{s.show_empty_data=true;s.hasShowEmptyOptions=false}if(s.show_benchmark){if(s.chart_type!==t.DISPLAY_VALUES.boxplot){if(!(s.chart_type in t.BENCHMARKABLE_CHART_TYPES)){s.chart_type=t.DISPLAY_VALUES.vbar}if(this.question.isNPS()){s.chart_type=t.DISPLAY_VALUES.score_gauge}}s.isStacked=false;s.label_type=this.DISPLAY_VALUES.legend;if(s.chart_type in t.BENCHMARKABLE_CHART_TYPES){s.isPercent=true}s.show_empty_data=true;s.show_basic_stats=false}if(!C&&s.chart_type===t.DISPLAY_VALUES.wtd_avg){s.chart_type=t.DEFAULT_CHART_TYPE}if(n.isCompared()&&s.chart_type===t.DISPLAY_VALUES.wtd_avg){s.chart_type=t.DEFAULT_CHART_TYPE}l=t._isDonutChart(s);w=t._isPieChart(s);E=t._isLineChart(s);S=t._isAreaChart(s);T=t._isBoxplotChart(s);x=s.matrix_display===this.DISPLAY_VALUES.distribution;u=t._isStacked(s)&&!s.show_benchmark;o=!(l||w||T);y=!(l||w||T)&&x;if((u||S)&&t._tableRowsAddToMoreThan100Percent(s)){y=false}if(n.isMultipleChoice()&&(u||S)&&!s.mirror){o=false}if(n.isSingleChoice()&&(E||S)){o=false}if(n.isMatrix()){if(u){o=false}}if(n.isMenuMatrix()){if(u){o=false}}if(C){o=false;if(s.chart_type===t.DISPLAY_VALUES.wtd_avg){s.matrix_display=t.DISPLAY_VALUES.wtd_avg;s.scale_type=this.DISPLAY_VALUES.absolute;y=false;s.show_data=true;s.disable_show_data=this.DISPLAY_VALUES.disabled;if(!g.dp_absolute&&!t.tempDisplay.dp_absolute){s.dp_absolute="1"}}else{s.matrix_display=t.DISPLAY_VALUES.distribution}}s.isLegend=s.label_type===this.DISPLAY_VALUES.legend;s.isDistribution=s.matrix_display===this.DISPLAY_VALUES.distribution;s.isWeightedAvg=s.matrix_display!==this.DISPLAY_VALUES.distribution;s.isPercent=t._scaleIsPercent(s);s.isStacked=u;s.isDonutChart=l;s.isLineChart=E;s.isPieChart=w;s.isAreaChart=S;s.isBoxplotChart=T;s.isLableable=l||w;s.hasDepthOptions=o;s.hasScaleOptions=y;s.isMirrorable=this._isDisplayMirrorable(s);s.tableHasOneRow=i;s.numColors=t._getNumColorsRequired(s.isDistribution);if(n.isNPS()){if(!_.contains([t.DISPLAY_VALUES.score_gauge,t.DISPLAY_VALUES.score_hbar,t.DISPLAY_VALUES.score_vbar],s.chart_type)&&s.nps_depth===t.DISPLAY_VALUES.nps_score){s.nps_depth=t.DISPLAY_VALUES.nps_distribution}if(s.show_benchmark&&s.nps_depth===t.DISPLAY_VALUES.nps_detailed){s.nps_depth=t.DISPLAY_VALUES.nps_distribution}o=true;s.isDepthScore=s.nps_depth===t.DISPLAY_VALUES.nps_score;s.isDepthDistribution=s.nps_depth===t.DISPLAY_VALUES.nps_distribution;s.isDepthDetailed=s.nps_depth===t.DISPLAY_VALUES.nps_detailed;if(s.isDepthScore){s.isStacked=false;s.scale_type=t.DISPLAY_VALUES.absolute;s.isPercent=false}if(_.isUndefined(s.disable_show_data)){t.setNpsDisableShowDataSetting(s)}}if(n.hasRandomAssignment()){s.show_basic_stats=false}return s},getExportDisplayData:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.question,n=t.family+"."+t.subtype,r=t.depthType(),i=t.isCompared(),o=e._fetchMetadata(),a;a=SM.Object.extend(e.DEFAULT_DISPLAY_OPTIONS.shared,e.DEFAULT_DISPLAY_OPTIONS.by_question_type[n],e.DEFAULT_DISPLAY_OPTIONS.by_depth_type[r],e.DEFAULT_DISPLAY_OPTIONS.by_compared[i.toString()],o,e.tempDisplay);a.depth_type=r;a.show_chart=a.show_chart===this.DISPLAY_VALUES.show;a.show_table=a.show_table===this.DISPLAY_VALUES.show;a.show_data=a.show_data===this.DISPLAY_VALUES.show;a.show_empty_data=a.show_empty_data===this.DISPLAY_VALUES.show;a.show_basic_stats=a.show_basic_stats===this.DISPLAY_VALUES.show;a.mirror=a.mirror===this.DISPLAY_VALUES.mirror;a.show_sig_diffs=a.show_sig_diffs===this.DISPLAY_VALUES.show&&a.mirror&&t.isCompared();return a},updateDisplayData:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=n.getDisplayData();t=t||{};if(_.isUndefined(t.notify)){t.notify=true}if(e.mirror){e.sort_data=n._setDefaultSortData(r)}n._updateMetadata(e,{done:t.done,fail:t.fail,noTypify:t.noTypify});if(t.notify){n._trigger({type:"displayChange"})}if(t.toggle){n._trigger("toggleSentiment")}},getTempDisplay:function(){var e=_____WB$wombat$check$this$function_____(this);return e.tempDisplay},setNpsUpdatesByDepthOption:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.getChartType();if(e.nps_depth===t.DISPLAY_VALUES.nps_score){if(t.question.isCompared()){e.chart_type=t.DISPLAY_VALUES.score_hbar}else{e.chart_type=t.DISPLAY_VALUES.score_gauge}}else if(_.contains([t.DISPLAY_VALUES.score_gauge,t.DISPLAY_VALUES.score_hbar,t.DISPLAY_VALUES.score_vbar],n)){e.chart_type=t.DISPLAY_VALUES.stacked_hbar;e.stacking=t.DISPLAY_VALUES.stacked}t.setNpsDisableShowDataSetting(e)},setNpsDisableShowDataSetting:function(e){var t=_____WB$wombat$check$this$function_____(this);if(e.nps_depth===t.DISPLAY_VALUES.nps_score){e.show_data=t.DISPLAY_VALUES.show;e.disable_show_data=t.DISPLAY_VALUES.disabled}else if(e.nps_depth===t.DISPLAY_VALUES.nps_distribution){e.show_data=t.DISPLAY_VALUES.show;e.disable_show_data=t.DISPLAY_VALUES.none}else{e.show_data=t.DISPLAY_VALUES.hide;e.disable_show_data=t.DISPLAY_VALUES.none}},updateTempDisplay:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.getDisplayData(),r,i;r=e.show_basic_stats&&e.show_basic_stats===t.DISPLAY_VALUES.show;i=e.show_sig_diffs&&e.show_sig_diffs===t.DISPLAY_VALUES.show;if(i&&!n.mirror){e.mirror=this.DISPLAY_VALUES.mirror}if(e.mirror){e.sort_data=t._setDefaultSortData(n)}if(e.chart_type){t.updateChartDisplayOptions(e)}else if(e.nps_depth){t.setNpsUpdatesByDepthOption(e)}SM.Object.deepUpdate(t.tempDisplay,e);if((r||i)&&!t.question.getRollup().hasBasicStats()){t.question.getRollup().fetchStatsRollup()}else{t._trigger({type:"tempDisplayChange"})}},updateChartDisplayOptions:function(e){var t=_____WB$wombat$check$this$function_____(this);e.disable_show_data=t.DISPLAY_VALUES.none;if(e.chart_type===t.DISPLAY_VALUES.score_gauge){t.setNpsDisableShowDataSetting(e)}},clearTempDisplay:function(e){var t=_____WB$wombat$check$this$function_____(this);e=e||{};if(_.isUndefined(e.notify)){e.notify=true}t.tempDisplay={};if(e.notify){t._trigger({type:"tempDisplayChange"})}},getDefaultViewMetadataUpdates:function(){return this.defaultViewMetadataUpdates},setDefaultViewMetadataUpdates:function(e){var t=this.getDefaultViewMetadataUpdates();SM.Object.deepUpdate(t,e)},clearDefaultViewMetadataUpdates:function(){this.metadataUpdates={}},getDisplayUpdates:function(){return this.displayUpdates},setDisplayUpdates:function(e){var t=this.getDisplayUpdates();SM.Object.deepUpdate(t,e)},clearDisplayUpdates:function(){this.displayUpdates={}},getSharedDisplayUpdates:function(){var n=_____WB$wombat$check$this$function_____(this),e=n.getDisplayData(),t=n.getDisplayUpdates(),r,i;if(n.question.isNPS()){i={show_chart:e.show_chart?n.DISPLAY_VALUES.show:n.DISPLAY_VALUES.hide,show_table:e.show_table?n.DISPLAY_VALUES.show:n.DISPLAY_VALUES.hide,show_basic_stats:e.show_basic_stats?n.DISPLAY_VALUES.show:n.DISPLAY_VALUES.hide,show_sig_diffs:e.show_sig_diffs?n.DISPLAY_VALUES.show:n.DISPLAY_VALUES.hide};return i}i={colors:e.colors,show_chart:e.show_chart?n.DISPLAY_VALUES.show:n.DISPLAY_VALUES.hide,show_table:e.show_table?n.DISPLAY_VALUES.show:n.DISPLAY_VALUES.hide,show_data:e.show_data?n.DISPLAY_VALUES.show:n.DISPLAY_VALUES.hide,show_basic_stats:e.show_basic_stats?n.DISPLAY_VALUES.show:n.DISPLAY_VALUES.hide,show_sig_diffs:e.show_sig_diffs?n.DISPLAY_VALUES.show:n.DISPLAY_VALUES.hide,scale_type:e.scale_type,dp_absolute:e.dp_absolute,dp_percentage:e.dp_percentage,stacking:e.stacking,show_empty_data:e.show_empty_data?n.DISPLAY_VALUES.show:n.DISPLAY_VALUES.hide,label_type:e.label_type,matrix_display:e.matrix_display,scale_max_wtd_avg:e.scale_max_wtd_avg,scale_min_wtd_avg:e.scale_min_wtd_avg};if(e.show_benchmark){i.benchmark_chart_type=e.benchmark_chart_type}else{i.chart_type=e.chart_type}if(t.chart_type){r=n.getChartTypeUpdates(e.chart_type)}i=SM.Object.extend(i,t,r);_.each(i,function(e,t){if(!_.contains(n.SHARED_DISPLAY_OPTIONS,t)){delete i[t]}});i.show_chart=e.show_chart?n.DISPLAY_VALUES.show:n.DISPLAY_VALUES.hide;return i},getChartType:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.getDisplayData(),n;var r=SM.StarRatingUtils.newVizEffective(e.question);n=t[e.DISPLAY_OPTIONS.chart_type]||(r?e.DISPLAY_VALUES.wtd_avg:e.DEFAULT_CHART_TYPE);return n},isTop2ChartType:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.getDisplayData(),n=t.benchmark_chart_type;return n===e.DISPLAY_VALUES.top2_hbar||n===e.DISPLAY_VALUES.top2_vbar||n===e.DISPLAY_VALUES.top2_donut},_getNpsChartTypeByDepth:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.getChartType();if(e===t.DISPLAY_VALUES.nps_score){return t.DISPLAY_VALUES.score_gauge}if(_.contains([t.DISPLAY_VALUES.score_gauge,t.DISPLAY_VALUES.score_hbar,t.DISPLAY_VALUES.score_vbar],n)){return t.DISPLAY_VALUES.hbar}return n},getChartTypeUpdates:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r={},i,o,a;var s;if(e===n.DISPLAY_VALUES.stacked_hbar||e===n.DISPLAY_VALUES.stacked_vbar){i=n.DISPLAY_VALUES.matrix}else{i=n.DISPLAY_VALUES.none}if(SM.StarRatingUtils.newVizEffective(n.question)){if(e===n.DISPLAY_VALUES.wtd_avg){s=n.DISPLAY_VALUES.wtd_avg}else{s=n.DISPLAY_VALUES.distribution}r[n.DISPLAY_OPTIONS.matrix_display]=s}if(n.question.isNPS()){o=[n.DISPLAY_VALUES.score_gauge,n.DISPLAY_VALUES.score_hbar,n.DISPLAY_VALUES.score_vbar];if(_.contains(o,e)){r.nps_depth=n.DISPLAY_VALUES.nps_score;r.show_data="show"}else{a=n.getChartType();if(_.contains(o,a)){r.nps_depth=n.DISPLAY_VALUES.nps_distribution}}}if(t){r[n.DISPLAY_OPTIONS.benchmark_chart_type]=e}else{r[n.DISPLAY_OPTIONS.chart_type]=e}r[n.DISPLAY_OPTIONS.stacking]=i;r[n.DISPLAY_OPTIONS.show_chart]=n.DISPLAY_VALUES.show;return r},setBenchmarkDisplay:function(e){var t=_____WB$wombat$check$this$function_____(this),n={show_benchmark:e?t.DISPLAY_VALUES.show:t.DISPLAY_VALUES.hide};t.updateDisplayData(n,{notify:!e,noTypify:true})},getBenchmarkDisplay:function(){var e=this.getDisplayData();return e.show_benchmark},isTop2:function(){var e=this.getDisplayData();return e.chart_type===this.DISPLAY_VALUES.top2_vbar||e.chart_type===this.DISPLAY_VALUES.top2_hbar||e.chart_type===this.DISPLAY_VALUES.top2_donut},notifyBenchmarkDisplay:function(){this._trigger("displayChange")},getScaleMinOptionKey:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.getDisplayData(),n;var r=t.isStacked||t.isAreaChart&&!e.question.isSimple()&&!t.isWeightedAvg;if(t.isPercent){n=e.DISPLAY_OPTIONS.scale_min_percentage}else if(r){n=e.DISPLAY_OPTIONS.scale_min_stacked}else if(t.isWeightedAvg){n=e.DISPLAY_OPTIONS.scale_min_wtd_avg}else{n=e.DISPLAY_OPTIONS.scale_min_absolute}if(t.mirror){n=n+":"+e.DISPLAY_OPTIONS.mirror}return n},getScaleMaxOptionKey:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.getDisplayData(),n;var r=t.isStacked||t.isAreaChart&&!e.question.isSimple()&&!t.isWeightedAvg;if(t.isPercent){n=e.DISPLAY_OPTIONS.scale_max_percentage}else if(r){n=e.DISPLAY_OPTIONS.scale_max_stacked}else if(t.isWeightedAvg){n=e.DISPLAY_OPTIONS.scale_max_wtd_avg}else{n=e.DISPLAY_OPTIONS.scale_max_absolute}if(t.mirror){n=n+":"+e.DISPLAY_OPTIONS.mirror}return n},getCustomScale:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=n.getDisplayData(),i=n.getScaleMinOptionKey(),o=r[i],a=n.getScaleMaxOptionKey(),s=r[a],l,u;if(_.isUndefined(o)||o>e.min){l=t?t.min:e.min}else{l=parseFloat(o)}if(_.isUndefined(s)||s<e.max){u=t?t.max:e.max}else{u=parseFloat(s)}return $.extend(t||{},{min:l,max:u})},buildLabelUpdates:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.getDisplayData().labels,r,i=e.labelType,o=e.answerID,a=e.labelText;r={labels:n||{}};if(_.isEmpty(r.labels[i])){r.labels[i]={}}if(i==="questionHeading"){r.labels[i].text=a}else{r.labels[i][o]={text:a}}return r},labelUpdatesHaveEmptyLabel:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.getTempDisplay().labels,n=false;if(t){if(t.questionHeading){if(t.questionHeading.text===""){n=true}}_.each(["rows","columns","columnChoices","crossedOptions","others"],function(e){_.each(t[e],function(e){if(e.text===""){n=true}})})}return n},getQuestionHeadingLabel:function(){return this.getLabel("questionHeading")},getLabel:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=n.getDisplayData(),i;if(_.isEmpty(r.labels)||_.isEmpty(r.labels[e])){return}if(e==="questionHeading"){i=r.labels[e]}else{i=r.labels[e][t]}return i},_isDisplayMirrorable:function(e){if(e.isDonutChart||e.isPieChart||e.isBoxplotChart){return false}if(e.isWeightedAvg&&(e.depth_type===this.DISPLAY_VALUES.matrix||e.depth_type===this.DISPLAY_VALUES.menu_matrix)){return false}return true},tableHasOneRow:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.rollup.question,r=n.getContextStructure().answers,i=r.rows,o=r.cols,a=false;if(n.isMatrix()){if(n.isMenuMatrix()){if(e.mirror){a=true;_.each(o,function(e){if(e.items.length!==1){a=false}})}else{a=i.length===1}}else{a=e.mirror&&o.length===1||!e.mirror&&i.length===1}}else if(n.isSingleChoice()&&e.matrix_display!==this.DISPLAY_VALUES.distribution){a=true}return a},_tableRowsAddToMoreThan100Percent:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.question,r,i;if(n.ID==="quiz_summary"){return false}r=n.getCrossedQuestion();i=!!r;if(e.mirror){if(n.family===n.QTYPE.multiple_choice){return true}}else if(i){if(r.isMultiResponse()){return true}}else if(n.isMultipleChoice()){return true}return false},_scaleIsAbsolute:function(e){return e.scale_type===this.DISPLAY_VALUES.absolute},_scaleIsPercent:function(e){return e.scale_type===this.DISPLAY_VALUES.percent},_isStacked:function(e){return e.stacking!==this.DISPLAY_VALUES.none},_isVerticalBarChart:function(e){return e.chart_type===this.DISPLAY_VALUES.vbar},_isHorizontalBarChart:function(e){return e.chart_type===this.DISPLAY_VALUES.hbar},_isAreaChart:function(e){return e.chart_type===this.DISPLAY_VALUES.area},_isLineChart:function(e){return e.chart_type===this.DISPLAY_VALUES.line},_isPieChart:function(e){return e.chart_type===this.DISPLAY_VALUES.pie},_isDonutChart:function(e){return e.chart_type===this.DISPLAY_VALUES.donut},_isBoxplotChart:function(e){return e.chart_type===this.DISPLAY_VALUES.boxplot},isSentimentOn:function(){return this.getDisplayData().sentiment_toggle==="on"},sort:function(e,t,n,r,c,p){var i=_____WB$wombat$check$this$function_____(this),o,a,s={},l,u;if(p){o=this.DISPLAY_OPTIONS.bs_sort_data}else{o=this.DISPLAY_OPTIONS.sort_data}a=i.getDisplayData()[o];u={dimensionType:e,dimensionID:t,order:n};if(r){l=SM.Object.deepCopy(a);l[c]=u}else{l=u}s[o]=l;i.updateDisplayData(s)},_updateDisplaySortData:function(e){var t=_____WB$wombat$check$this$function_____(this),n={};n[t.DISPLAY_OPTIONS.sort_data]=e;t.updateDisplayData(n)},_shouldSetDefaultSortData:function(e){var t=_____WB$wombat$check$this$function_____(this),n=e.sort_data,r=t.question,i=r.isCompared(),o=!!e.mirror,a;a=_.isEmpty(n)||t._sortDataAppliesToDifferentQuestion(r,n,i,o);return a},_sortDataAppliesToDifferentQuestion:function(e,t,n,r){var i=e.summaryType(),o=e.getContextStructure().answers,c=o.crossedOptions,a,s,l,u=false;if(n&&!r){a=_.map(c,function(e){return e.id});if(i==="menu_matrix"){s=_.values(t);_.each(s,function(e){l=e.dimensionID;if(l&&!_.contains(a,l)){u=true}})}else{l=t.dimensionID;if(l&&!_.contains(a,l)){u=true}}}return u},_setDefaultSortData:function(e){var t=_____WB$wombat$check$this$function_____(this),n=e.sort_data||{},r=t.question,i=r.summaryType(),o=r.isCompared(),a=r.structure.answers.rows,s=r.structure.answers.cols;if(i==="menu_matrix"){if(o){_.each(a,function(e){n[e.id]={order:t.SORTING_ORDERS.UNSORTED,dimensionType:null,dimensionID:null}})}else{_.each(s,function(e){n[e.id]={order:t.SORTING_ORDERS.UNSORTED,dimensionType:null,dimensionID:null}})}}else if(r.ID==="quiz_summary"){n={order:t.SORTING_ORDERS.ASCENDING,dimensionType:"rankings",dimensionID:r.ID}}else{n={order:t.SORTING_ORDERS.UNSORTED,dimensionType:null,dimensionID:null}}e.sort_data=n;return n},_getNumColorsRequired:function(e){var c=_____WB$wombat$check$this$function_____(this),t=c.question,n=t.getContextAnswerStructure(),r=false,i=false,o,a,s=false,p=false,l,u;if(t.ID==="quiz_summary"){return}if(t.isClickMap()){return 1}if(!_.isEmpty(t.compareStructure)){n=t.compareStructure.answers;r=true}if(!_.isEmpty(t.compositeAnswerStructure)){n=t.compositeAnswerStructure;i=true}if(!_.isEmpty(n.cols)){u=n.cols[0];if(u.isCombined){l=u.weight}else if(u.options){l=u.options.weight}if(!_.isUndefined(l)){p=true}}o=n.rows?n.rows.length:0;if(!e){if(r){if(i&&!n.cols){n.cols=[]}o=i?n.cols.length:n.crossedOptions.length}if(t.isSingleChoice()){if(r){return o}return 1}}else if(t.isMultiMatrix()||t.isRanking()||t.isRating()||t.isSingleMatrix()&&!r&&!p){o=n.cols.length}else if(t.isMenuMatrix()){if(r){o=n.cols.length}else{o=_.chain(n.cols).map(function(e){return e.items.length}).max().value()}}if(!_.isEmpty(n.other)){a=n.other[0];if(a.options.is_answer_choice){o++;s=_.find(n.crossedOptions,function(e){return e.id===a.id});if(r&&!s&&!e){o--}}}return o},isBenchmarkShown:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.getDisplayData();return t[e.DISPLAY_OPTIONS.show_benchmark]}}));SM.Models.register("QuestionCombineHide",{__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.question=e.question;t.hasTop2=e.question.isTop2();t.rollup=e.rollup},load:function(){var e=_____WB$wombat$check$this$function_____(this);e._loadSettings();e._buildComposites()},_buildCompositesQuestion:function(){var e=_____WB$wombat$check$this$function_____(this),t=e._isSettingsEmpty();if(t||!e.question.canCombineHide()||!e._sanityCheckSettings()){e.question.buildCompositeAnswerStructure()}else{e.question.buildCompositeAnswerStructure(e.settings)}if(e.hasTop2){e.question.buildCompositeAnswerStructure(e.top2settings,true)}},_buildCompositesRollup:function(){var e=_____WB$wombat$check$this$function_____(this),t,n=e._isSettingsEmpty();if(n||!e.question.canCombineHide()||!e._sanityCheckSettings()){e.rollup.buildCompositeSummary()}else{t=e.question.buildCompositeMapping(e.settings);e.rollup.buildCompositeSummary(t)}if(e.hasTop2){t=e.question.buildCompositeMapping(e.top2settings,true);e.rollup.buildCompositeSummary(t,true);e.benchmarkRollup=e.question.survey.getBenchmarkRollup(e.question.ID);if(e.benchmarkRollup){e.benchmarkRollup.buildCompositeSummary(e.top2settings,t,true)}}},_buildComposites:function(){var e=_____WB$wombat$check$this$function_____(this);e._buildCompositesQuestion();if(e.rollup){e._buildCompositesRollup()}},_isSettingsEmpty:function(){var e=_____WB$wombat$check$this$function_____(this);if(e.rollup&&e.rollup.display.getBenchmarkDisplay()&&!e.question.isTop2()){return true}return _.size(e.settings.combines)===0&&_.size(e.settings.hides)===0},_sanityCheckSettings:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.question.getContextStructure(),n=t.answers,r=e.question.getCombineHideDim(),i=n[r],o,a=true;_.each(e.settings.combines,function(e){_.each(e.combine,function(e){o=_.findWhere(i,{id:e});if(_.isUndefined(o)){a=false}})});_.each(e.settings.hides,function(e){o=_.findWhere(i,{id:e.id});if(_.isUndefined(o)){a=false}});return a},_fetchSettings:function(){var e,t=this.question;if(t.survey.state.isDashboardMode()){return{combines:[],hides:[]}}e=t.survey.anviews.defaultView.getDisplayData(t.ID,{forTrends:true});return e.combine_hide},_updateSettings:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.settings;e.question.survey.anviews.defaultView.updateDisplayData(this.question.ID,{combine_hide:t});e.rollup.display._trigger({type:"displayChange"})},_loadSettings:function(){var e=_____WB$wombat$check$this$function_____(this),t={combines:[],hides:[]},n,r;if(e.question.isTop2()){e.top2settings=e._createTop2Settings()}else{e.top2settings=t}if(!e.question.canCombineHide()){e.settings=t;return}r=e._fetchSettings();if(!r){e.settings=t;return}e.settings=r;n=e._sanityCheckSettings();if(!n){e.settings=t}},_createTop2Settings:function(){var t=_____WB$wombat$check$this$function_____(this),e={combines:[],hides:[]},n=t.question.structure.answers.rows,r=n.length,i=[],o=[];_.each(n,function(e){if(t.question.isTop2Ascending()){if(e.position===r||e.position===r-1){i.push(e)}else{o.push(e)}}else if(e.position===1||e.position===2){i.push(e)}else{o.push(e)}});e.combines[0]={combine:_.map(i,function(e){return e.id}),id:i[0].id+"ch",title:Globalize.localize("Top 2 Box Score")};e.hides=_.map(o,function(e){return{id:e.id}});return e},addCombine:function(e){var n=_____WB$wombat$check$this$function_____(this),r=[];_.each(e.combine,function(e){var t=_.findWhere(n.settings.combines,{id:e});if(!_.isUndefined(t)){r=r.concat(t.combine);n.settings.combines=_.reject(n.settings.combines,function(e){return e.id===t.id})}else{r.push(e)}});r=_.sortBy(r,function(e){return e});n.settings.combines.push({title:e.title,id:r[0]+"ch",combine:r});_.each(r,function(t){n.settings.hides=_.reject(n.settings.hides,function(e){return t===e.id})});n._buildComposites();n._updateSettings();SM.Bi.answersCombine(n.question.ID);return true},editCombine:function(t,e){var n=_____WB$wombat$check$this$function_____(this);n.settings.combines=_.reject(n.settings.combines,function(e){return e.id===t});n.addCombine(e);n._buildComposites();n._updateSettings();SM.Bi.answersEditCombine(n.question.ID);return true},unCombine:function(t){var e=_____WB$wombat$check$this$function_____(this),n=_.findWhere(e.settings.combines,{id:t});if(_.isUndefined(n)){return false}e.settings.combines=_.reject(e.settings.combines,function(e){return e.id===t});e._buildComposites();e._updateSettings();SM.Bi.answersUncombine(e.question.ID);return true},addHide:function(t){var n=_____WB$wombat$check$this$function_____(this),e;e=_.findWhere(n.settings.combines,{id:t});if(_.isUndefined(e)){this.settings.hides.push({id:t})}else{n.settings.combines=_.reject(n.settings.combines,function(e){return e.id===t});_.each(e.combine,function(e){n.settings.hides.push({id:e})})}n._buildComposites();n._updateSettings();SM.Bi.answersHide(n.question.ID);return true},unHideAll:function(){var e=_____WB$wombat$check$this$function_____(this);e.settings.hides=[];e._buildComposites();e._updateSettings();$(document).trigger("unhide-event");SM.Bi.answersUnhideAll(e.question.ID)},unHide:function(t){var e=_____WB$wombat$check$this$function_____(this),n;n=_.findWhere(e.settings.hides,{id:t});if(!n){return false}e.settings.hides=_.reject(e.settings.hides,function(e){return e.id===t});e._buildComposites();e._updateSettings();$(document).trigger("unhide-event");SM.Bi.answersUnhide(e.question.ID);return true},getHides:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.question.hiddenComposites;return t},isCombined:function(e){var t=_____WB$wombat$check$this$function_____(this),n=_.findWhere(t.settings.combines,{id:e});return!_.isUndefined(n)},canApplySort:function(e){var t=_____WB$wombat$check$this$function_____(this);if(!t.question.canCombineHide()){return true}if(t.isContextAnswerOption(e)){return true}if(t.inCombine(e)||t.isHidden(e)){return false}if(e.indexOf("ch")!==-1){return false}return true},isContextAnswerOption:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r=t.question.getContextAnswerStructure(),i=t.question.getCombineHideDim();if(!i){return false}n=_.findWhere(r[i],{id:e});return!!n},inCombine:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r=t.question.combinedComposites;n=_.findWhere(r,{id:e});return!!n},isHidden:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r=t.question.hiddenComposites;n=_.findWhere(r,{id:e});return!!n},canCombineHide:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r,i;if(!t.question.canCombineHide()){return false}n=t.question.getContextAnswerStructure();r=t.question.getCombineHideDim();if(!r){return false}if(!t.getMenuVisibleOptions(e)){return false}i=_.findWhere(n[r],{id:e});return!!i},getMenuVisibleOptions:function(e){var t=_____WB$wombat$check$this$function_____(this),n;if(t.question.isQuiz()){return{combine:false,hide:false,editCombine:false,unCombine:false}}n=_.findWhere(t.settings.combines,{id:e});if(_.isUndefined(n)){if(t._isOnlyComposite()){if(t.question.otherIsAnAnswerChoice()){return{combine:false,hide:true,editCombine:false,unCombine:false}}return null}return{combine:true,hide:true,editCombine:false,unCombine:false}}return{combine:false,hide:!t._isSingleComposite(),editCombine:true,unCombine:true}},getActionMenuOption:function(e){var t=_____WB$wombat$check$this$function_____(this);if(!t.canCombineHide(e)){return null}return{id:e,visibleOptions:t.getMenuVisibleOptions(e)}},getUnHidingStatus:function(){return _.size(this.settings.hides)},_isSingleComposite:function(){var e=_____WB$wombat$check$this$function_____(this);return e._isOnlyComposite()&&!e.question.otherIsAnAnswerChoice()},_isOnlyComposite:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.question.getContextAnswerStructure(),n=e.question.getCombineHideDim(),r=_.pluck(t[n],"id");return _.size(r)===1},_getLabelTextById:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.question.getCombineHideDim(),r=t.rollup.display,i=r.getDisplayData().labels;n=n==="cols"?"columns":n;if(i&&i[n]&&i[n][e]){return i[n][e].text}return null},_getCompositeLabel:function(e){var t=_____WB$wombat$check$this$function_____(this);return t._getLabelTextById(e.id)||e.text},_getCombinedAnswerTextsByIds:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.question.combinedComposites,r;return _.map(e,function(e){r=_.findWhere(n,{id:e});return r?t._getLabelTextById(r.id)||r.text:""})},getCompositeAnswerTextById:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.question.getContextAnswerStructure(),r=t.question.getCombineHideDim(),i;i=_.findWhere(n[r],{id:e});return i?t._getLabelTextById(i.id)||i.text:""},getCombinedDataInfo:function(o,a){var s=_____WB$wombat$check$this$function_____(this),e=s.question.getContextAnswerStructure(),t=s.question.getCombineHideDim(),l=[],n;_.each(e[t],function(e){var t,n,r,i;if(e.id===o){if(!a){l.push({id:e.id,text:s._getCompositeLabel(e),isCombined:false,disabled:false,checked:true})}}else{r=_.findWhere(s.settings.combines,{id:e.id});if(r){i=s._getCombinedAnswerTextsByIds(r.combine);if(a){t=e.text+" ("+i.join(", ")+")"}else{t=e.text+" ("+_.size(r.combine)+")"}n=true}else{t=s._getCompositeLabel(e);n=false}l.push({id:e.id,text:t,isCombined:n,disabled:false,checked:false})}});if(a){_.each(s.question.combinedComposites,function(e){if(e.combineId===o){l.push({id:e.id,text:s._getCompositeLabel(e),isCombined:false,disabled:false,checked:true})}})}_.each(s.question.hiddenComposites,function(e){l.push({id:e.id,text:s._getCompositeLabel(e),isCombined:false,disabled:false,checked:false})});l=_.sortBy(l,function(e){return e.id});if(t==="rows"){n=e.other;if(!_.isUndefined(n)&&!_.isUndefined(n[0].options.is_answer_choice)){l.push({id:n[0].id,text:n[0].text,isCombined:false,disabled:true,checked:false})}}return l}});SM.Models.register("QuestionRollup",SM.Object.deepExtend(SM.Sortable,SM.CompositeSummaryBuilder,{METAKEY_TYPE_COMPARE:"compare:",__create:function(e){var t=_____WB$wombat$check$this$function_____(this);this.isLoaded=e.isLoaded;this.question=e.question;this.questionID=this.question.ID;t.display=SM.Models.create("QuestionDisplay",{rollup:t,question:t.question});t.combinehideModel=SM.Models.create("QuestionCombineHide",{rollup:t,question:t.question});this.summary={answered_subtotals:{},options:{}};this.answered="";this.skipped="";this.type="null_rollup";this.taModelMap={};this.filoModelMap={};this.paymentModelMap={};this.nestedQuestionDict={}},getContextSummary:function(e){return(e?this.top2compositeSummary:this.compositeSummary)||this.summary},load:function(t,c){var e=_____WB$wombat$check$this$function_____(this),n=e.question,r=n.survey,i=r.getCurrentView()?r.getCurrentView().compareRule:c?SM.BaseAnRule.loadRule(c,r):null,o,a,s,l,p=[],d,h,f=[],u;if(t.type==="does_not_apply"){e.type="does_not_apply"}if(n.isNPS()){t=SM.ComparedByNps.rollup(t)}o=t.summary;if(t.type==="compare"){l=r.getQuestion(i.get("questionID"));if(n.isComparable()){if(!_.contains(["collector","time_period"],i.ruleType)){if(l.ID===n.ID){e.comparedByMyself=true}e.comparedByRA=i.isRA;e.setComparedByNpsDistributed(i);t=e._mungeCompareData(t,i,l,e.isComparedByNpsDistributed());SM.SidiUtils.labelBySidi(t,l);if(o.type==="menu_matrix"){t=e._mungeCompareMenuMatrixRollup(t,l);if(i.ruleType==="random_assignment"){u=n.mungeCompareMenuMatrixRA(t,l)}else{u=n.mungeCompareMenuMatrix(t,l,e.isComparedByNpsDistributed())}}else{t=e._mungeCompareMatrixRollup(t,l,n.isNumerical());if(i.ruleType==="random_assignment"){u=n.mungeCompareMatrixRA(t,l)}else{u=n.mungeCompareMatrix(t,l,e.isComparedByNpsDistributed())}}}else if(i.ruleType==="collector"){d=i.survey.collectors;h=Object.keys(i.rows);_.each(h,function(e){f.push(d[e])});t.crossed_rows=Object.keys(i.rows);t.summary.answered_subtotals=t.answered.compare_options_total;t.answered=t.answered.this_question;if(this.question.family!=="matrix"){t.summary.type="matrix"}else{t.summary.type="menu_matrix"}if(o.type==="menu_matrix"){t=e._mungeCompareMenuMatrixRollupCBC(t);u=n.mungeCompareMenuMatrixCBC(t,f)}else{t=e._mungeCompareMatrixRollupCBC(t);u=n.mungeCompareMatrixCBC(t,f)}}else if(i.ruleType==="time_period"){p=["1","2"];t.crossed_rows=p;t.summary.answered_subtotals=t.answered.compare_options_total;t.answered=t.answered.this_question;if(n.family!=="matrix"){t.summary.type="matrix"}else{t.summary.type="menu_matrix"}if(o.type==="menu_matrix"){t=e._mungeCompareMenuMatrixRollupCTP(t);u=n.mungeCompareMenuMatrixCTP(t,p)}else{t=e._mungeCompareMatrixRollupCTP(t);u=n.mungeCompareMatrixRollupCTP(t,p)}}}else if(!t.answered){t.answered=0}else{t.answered=t.answered.this_question}}n.setCompareStructure(u);e.summary=t;e.summary.saEligible=n.isSaEligible();if(!(e.type==="does_not_apply")){e.answeredCount=t.answered;e.answered=Globalize.format(t.answered,"n0");e.answered_subtotals=t.summary.answered_subtotals;e.skipped=Globalize.format(t.skipped,"n0");e.type=t.type;e.otherOption=t.other_option;e.options=o.options;if(o.type==="matrix"||e.type==="matrix"){e.options.col_totals=e._buildColumnTotals()}if(n.commentField&&!n.commentField.options.is_answer_choice){if(t.other_option){e.options[n.commentField.id]={count:t.other_option}}else if(o.type==="matrix"&&e.options.other_option){e.options[n.commentField.id]={count:e.options.other_option.row_total}}else if(o.type==="menu_matrix"){s=e.options.other_option;if(s&&s.options&&s.options.other_option){e.options[n.commentField.id]=s.options.other_option}}}a=o.ta_data;if(a){_.each(a,function(e){e.flags=t.flags});e._loadTaModels(a)}if(!r.state.isDashboardMode()){e.combinehideModel.load()}}e._trigger({type:"loaded"})},hasBasicStats:function(){return SM.BasicStatsUtils.hasBasicStats(this.summary)},fetchStatsRollup:function(){var e=_____WB$wombat$check$this$function_____(this),t,n={},r;n.self=e;t={view_data:e.question.survey.getCurrentView().dump(),questions:[e.question.ID],include_basic_stats:true};r=SM.API.fetchRollups(t);$.when(n,r).done(e._onFetchedStatsRollups).fail(function(){})},_onFetchedStatsRollups:function(e,t){var n=t[0],r=e.self,i=SM.StatsvcRollup.transformQuestionRollups(n.question_rollups,r.question.survey);r.load(_.values(i)[0]);r.display._trigger({type:"displayChange"})},getSidiData:function(e,t,n){var r=this.summary.summary,i,o,a;if(!n){i=r.stats}else{if(!r.options[n]){return null}i=r.options[n].stats}if(!i||!i.sig_diffs){return null}o=i.sig_diffs.options;if(o[e]&&o[e][t]){a=SM.Object.deepCopy(o[e][t]);a.p=i.sig_diffs.p;a.confidence_level=i.sig_diffs.confidence_level;return a}return null},updatePresentationRollup:function(e,t){var n=e[t];if(n){this.answered=n.count}else{this.answered=0}},isSimple:function(){return this.type==="simple"},isCompare:function(){return this.type==="compare"},getRowData:function(e){var t=this._getRowData(e);if(!t){t={count:0,row_max:0,row_total:0}}return t},getColData:function(e,t){var n=this._getColData(e,t);if(!n){n={count:0}}return n},getChoiceData:function(e,t,n){var r=this._getColData(e,t);if(r){r=r.options[n]}if(!r){r={count:0}}return r},getFileUploadModel:function(e,t,n,r){var i=this._makeTaModelID(e,t,r),o=this.filoModelMap[i];if(!o){o=this.filoModelMap[i]=SM.Models.create("FileUploadList",{ID:i,rollup:this,matrixCrossTab:n})}return o},getPaymentModel:function(e,t,n,r){var i=this._makeTaModelID(e,t,r),o=this.paymentModelMap[i];if(!o){o=this.paymentModelMap[i]=SM.Models.create("PaymentList",{ID:i,rollup:this,matrixCrossTab:n})}return o},getTaModel:function(e,t,n){var r=this._makeTaModelID(e,t,n);return this.taModelMap[r]},createTaModel:function(e,t,n,r){var i=this._makeTaModelID(e,t,r),o;if(this.taModelMap[i]){return this.taModelMap[i]}o=SM.Models.create("TextAnalysis",{ID:i,matrixCrossTab:n});if(r){o.variationID=r}o.rollup=_____WB$wombat$check$this$function_____(this);this.taModelMap[i]=o;return o},hasTaModels:function(){return!$.isEmptyObject(this.taModelMap)},getDisplayMode:function(){var e=this.question,t=e.survey.getCurrentView().compareRule,n=t&&t.get("selected")&&!t.get("isCorrupt");if(this.type==="compare"){return"compare"}if(n){if(this.type==="null_rollup"||e.isMenuMatrix()||e.isPresentation()&&e.hasRandomAssignment()){return"compare"}}return"standard"},getSortedSummary:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.display.getDisplayData(),r={question:t.question,labels:n.labels,isMirrored:n.mirror,shouldHideEmptyData:t.question.ID!=="quiz_summary"&&!n.show_empty_data},i;if(e){r=_.extend(r,e)}i=new SM.SortedSummary(r);return i.summary},buildNpsSummary:function(){var e=_____WB$wombat$check$this$function_____(this),t,n,r;n=new SM.NPSSummary({rollup:e.summary,answerStructures:e.question.getContextAnswerStructure(),type:"distribution"});r=new SM.NPSSummary({rollup:n.compositeSummary,answerStructures:n.compositeAnswerStructure,type:"score"});t={score:{summary:r.compositeSummary,answerStructures:r.compositeAnswerStructure},distribution:{summary:n.compositeSummary,answerStructures:n.compositeAnswerStructure},detailed:{summary:e.summary,answerStructures:e.question.getContextAnswerStructure()}};return t},_buildColumnTotals:function(){var e=this.question,t=e.getContextStructure(),a=this.options,n=t.answers.cols,r=t.answers.rows,s=[];$.each(n,function(i,o){s.push(0);$.each(r,function(e,t){var n=t.id,r=o.id;if(a[n]&&a[n].options&&a[n].options[r]){s[i]+=a[n].options[r].count}})});return s},_makeTaModelID:function(e,t,n){var r;if(!e){e=0}if(!t){t=0}if(!n){n=0}r=["qid",this.questionID,"oid",e,"xid",t,"vid",n].join("_");return r},_loadTaModels:function(e){var n=_____WB$wombat$check$this$function_____(this),r={},i;this.taModelMap=r;$.each(e,function(e,t){i=SM.Models.create("TextAnalysis",{ID:e});i.rollup=n;r[e]=i;i.load(t)})},_getRowData:function(e){return this.options[e]},_getColData:function(e,t){var n=this._getRowData(e);if(n){n=n.options[t]}return n},_mungeCompareData:function(e,t,n,r){var i=_____WB$wombat$check$this$function_____(this),o=0,a,s,l=e.answered;if(t.ruleType==="random_assignment"){e.crossed_rows=this._getRACrossedList(t,n,"rows")}else{a=this._getCrossedList(t,n,"rows");e.crossed_rows=r?SM.ComparedByNps.mergeCrossedRows(a,n):a}if(t.ruleType==="random_assignment"){if(n.family==="matrix"){e.crossed_cols=this._getRACrossedList(t,n,"cols")}}else if(n.family==="matrix"){e.crossed_cols=this._getCrossedList(t,n,"cols")}e.type="compare";e.crossed_question_id=n.ID;if(!l){l={this_question:0,compare_options_total:{}};if(e.crossed_cols&&e.crossed_cols.length>0){s=e.crossed_rows[0];l.compare_options_total[s]={};for(;o<e.crossed_cols.length;o++){l.compare_options_total[s][e.crossed_cols[o]]=0}e.answered=l;e.summary.answered_subtotals=e.answered.compare_options_total[s]}else{for(;o<e.crossed_rows.length;o++){l.compare_options_total[e.crossed_rows[o]]=0}e.answered=l;e.summary.answered_subtotals=e.answered.compare_options_total}}else if(e.crossed_cols&&e.crossed_cols.length>0){s=e.crossed_rows[0];e.summary.answered_subtotals=e.answered.compare_options_total[s]}else{e.summary.answered_subtotals=i._processCompareOptionsTotal(e.answered.compare_options_total,n)}e.answered=e.answered.this_question;e.summary.type=this.question.getCompareType();return e},_getCrossedList:function(e,t,n){var r=n==="rows"?t.rowList:t.colList,i;if(t.family==="matrix"){i=e.choiceSetList[0][n]}else{i=e.choiceSet.get("rows")}return $.map(r,function(e){if(e.id in i){return e.id}})},_getRACrossedList:function(e,t,n){var r=t.randomAssignmentList,i;if(t.family==="matrix"){if(n==="rows"){i=e.get("rows")}else{return $.map(r,function(e){return e.id})}}else{i=e.get("rows")}return $.map(r,function(e){if(e.variable_id in i){return e.variable_id}})},_processCompareItem:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r;if(!t.isNPS()){return e}r=_.map(e,function(e){return e});if(n.isComparedByNpsDistributed()){return SM.ComparedByNps.aggregate(r[0],t)}return r[0]},_processCompareOptionsTotal:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r;if(!t.isNPS()){return e}r=_.map(e,function(e){return e});if(n.isComparedByNpsDistributed()){return SM.ComparedByNps.answered_subtotals(r[0],t)}return r[0]},_mungeCompareMenuMatrixRollup:function(r,i){var o=_____WB$wombat$check$this$function_____(this),n,e=r.summary,t=e.options,a,s,l,u="-2";_.each(t,function(e,t){if(t===u){n=e}else{if(e.row_total===undefined){e.compare_options_total=-1;e.row_total=-1}else{a=e.row_total.compare_options_total;e.compare_options_total=a===undefined?-1:a;e.row_total=e.row_total.current_row}_.each(e.options,function(e){var n;e.row_total=e.row_total.current_row;e.options=o._processCompareItem(e.compare,i);if(r.crossed_cols&&r.crossed_cols.length){_.each(e.options,function(e,t){n=t});e.options=e.options[n]}delete e.compare})}s=e.stats;if(s){_.each(s,function(e){var n;if(r.crossed_cols&&r.crossed_cols.length&&e.compare){_.each(e.compare,function(e,t){n=t});e.compare=e.compare[n]}})}});if(n){t.other_option=n;delete t[u];if(n.options[u]!==undefined){n.other_option=n.options[u];delete n.options[u];l=n.other_option;if(l.row_total!==undefined&&l.row_total.current_row!==undefined){l.row_total=l.row_total.current_row;l.options=l.compare;delete l.compare;n.options.other_option=l;delete n.other_option}}}return r},_mungeCompareMenuMatrixRollupCBC:function(e){var n,t=e.summary,r=t.options,i,o,a="-2";_.each(r,function(e,t){if(t===a){n=e}else{if(e.row_total===undefined){e.compare_options_total=-1;e.row_total=-1}else{i=e.row_total.compare_options_total;e.compare_options_total=i===undefined?-1:i;e.row_total=e.row_total.current_row}_.each(e.options,function(e){e.row_total=e.row_total.current_row;e.options=e.compare;delete e.compare})}});if(n){r.other_option=n;delete r[a];if(n.options[a]!==undefined){n.other_option=n.options[a];delete n.options[a];o=n.other_option;if(o.row_total!==undefined&&o.row_total.current_row!==undefined){o.row_total=o.row_total.current_row;o.options=o.compare;delete o.compare;n.options.other_option=o;delete n.other_option}}}return e},_mungeCompareMatrixRollupCBC:function(e){var t,n=e.summary,r="-2",i=n.options;_.each(i,function(e){if(e.options){t=e.options[r]}else{e.row_total=e.row_total.current_row;e.options=e.compare;delete e.compare}});if(t&&t.row_total!==undefined&&t.row_total.current_row!==undefined){t.row_total=t.row_total.current_row;t.options=t.compare;delete t.compare;i.other_option=t;delete i[r]}return e},_mungeCompareMenuMatrixRollupCTP:function(e){var n,t=e.summary,r=t.options,i,o,a="-2";_.each(r,function(e,t){if(t===a){n=e}else{if(_.isUndefined(e.row_total)){e.compare_options_total=-1;e.row_total=-1}else{i=e.row_total.compare_options_total;e.compare_options_total=_.isUndefined(i)?-1:i;e.row_total=e.row_total.current_row}_.each(e.options,function(e){e.row_total=e.row_total.current_row;e.options=e.compare;delete e.compare})}});if(n){r.other_option=n;delete r[a];if(n.options[a]!==undefined){n.other_option=n.options[a];delete n.options[a];o=n.other_option;if(o.row_total!==undefined&&o.row_total.current_row!==undefined){o.row_total=o.row_total.current_row;o.options=o.compare;delete o.compare;n.options.other_option=o;delete n.other_option}}}return e},_mungeCompareMatrixRollupCTP:function(e){var t,n=e.summary,r=n.options,i="-2";_.each(r,function(e){if(e.options){t=e.options[i]}else{e.row_total=e.row_total.current_row;e.options=e.compare;delete e.compare}});if(t&&t.row_total!==undefined&&t.row_total.current_row!==undefined){t.row_total=t.row_total.current_row;t.options=t.compare;delete t.compare;r.other_option=t;delete r[i]}return e},setComparedByNpsDistributed:function(e){this.is_nps_distributed=e.is_nps_distributed},isComparedByNpsDistributed:function(){return this.is_nps_distributed},_mungeCompareMatrixRollup:function(t,r,e){var i=_____WB$wombat$check$this$function_____(this),o,n=t.summary,a=n.options,s=n.stats,l="-2";_.each(a,function(e){var n;if(e.options){o=e.options[l]}else{e.row_total=e.row_total.current_row;e.options=i._processCompareItem(e.compare,r);if(t.crossed_cols&&t.crossed_cols.length){_.each(e.options,function(e,t){n=t});e.options=e.options[n]}delete e.compare}});if(s&&(t.crossed_cols&&t.crossed_cols.length)){if(!e){_.each(s,function(e){e.compare=_.values(e.compare)[0]})}else{_.each(s,function(e){_.each(e,function(e){e.compare=_.values(e.compare)[0]})})}}if(o&&o.row_total!==undefined&&o.row_total.current_row!==undefined){o.row_total=o.row_total.current_row;o.options=o.compare;delete o.compare;a.other_option=o;delete a[l]}return t}}));SM.Models.register("QuestionRollupList",{__create:function(){this.pages={};this.questions={};this.lastRollupsRequest=null;this.lastFetchFilteredStamp=-1;this.isLoading=false;this.failedLoad=false;this.failedLoadRequestID=null;this.isUpdating=false},loadSurvey:function(e){var t=e.anviews;this.survey=e;if(!e.state.isDashboardMode()){t.on("selectedViewLoaded",{self:this},this._onSelectedViewLoaded).on("selectedViewChanged",{self:this},this._onSelectedViewChanged).on("selectedViewFailed",{self:this},this._onSelectedViewFailed);t.currentView.on("failedLoadRequestID.set",{self:this},this._onSelectedViewFailed).on("lastSwitchRequest.changed",{self:this},this._onSwitchRequestChanged).on("ruleDeleted",{self:this},this._onRuleDeleted).on("ruleAdded",{self:this},this._onRuleAdded).on("ruleEdited",{self:this},this._onRuleEdited)}this.createRollupModels()},createRollupModels:function(){var i=_____WB$wombat$check$this$function_____(this);_.each(i.survey.questions,function(e,t){var n=e.page.ID,r;if(!i.pages[n]){i.pages[n]={}}r=SM.Models.create("QuestionRollup",{question:e});i.pages[n][t]=r;i.questions[t]=r})},clear:function(){this.pages={};this.questions={};_.each(this.survey.questions,function(e){e.compareStructure=undefined});this.createRollupModels()},loadRollups:function(e,n){var r=_____WB$wombat$check$this$function_____(this),i=r.survey,o,t=SM.StatsvcRollup.transformQuestionRollups(e,i),a={};if(t){_.each(t,function(e,t){e.flags=a;if(t==="quiz_summary"){if(i.isQuiz){i.quizSummaryModel=SM.Models.create("QuizSummary",{survey:i,quizSummary:e})}}else if(t==="payment_summary"){i.paymentSummaryData=e}else{o=r.questions[t];if(o){if(o.question.hasRandomAssignment()){r._loadRandomAssignmentRollups(o,e)}else{o.load(e,n)}}}})}return t},_loadRandomAssignmentRollups:function(o,a){var e=o.question.randomAssignmentList,s=o.nestedQuestionDict,l=o.question.family==="presentation",u=a.type==="does_not_apply",c;_.each(e,function(e){var t=e.variable_id,n=a[t],r,i;if(u||n&&n.type==="does_not_apply"){o.load(a);if(l){o.updatePresentationRollup(a,t)}}else if(n){if(n.type==="compare"&&(o.question.isEssay()||o.question.isFileUpload())&&n.answered){r=n.summary.options[t];if(r){i=n.answered.compare_options_total;_.each(r.compare,function(e,n){_.each(e,function(e,t){i[n][t]=e.count})});n.answered.this_question=r.row_total.current_row;n.summary.options[0]=n.summary.options[t]}else{n.summary.options[0].row_total=0;_.each(n.summary.options[0].compare,function(e,t){n.summary.options[0].compare[t].count=0})}}n.flags=a.flags;o.load(n);if(l){o.updatePresentationRollup(n.summary,t)}c=_.clone(o);s[t]=c}else if(typeof a.answered!=="undefined"&&a.answered instanceof Object){n=a;o.load(n);if(l){o.updatePresentationRollup(n.summary,t)}c=_.clone(o);s[t]=c}})},fetchStatsRollups:function(){var e=_____WB$wombat$check$this$function_____(this),t,n={},r=e.survey.shownQuestionList,i=[],o;e.set("isUpdating",true,{notify:true});n.self=e;_.each(r,function(e){if(e.hasRollupLoaded()){i.push(e.ID)}});t={view_data:e.survey.getCurrentView().dump(),questions:i,include_basic_stats:true};o=SM.API.fetchRollups(t);$.when(n,o).done(e._onFetchedStatsRollups).fail(function(){e.set("isUpdating",false,{notify:true})})},_onFetchedStatsRollups:function(e,t){var n=t[0],r=e.self;r.loadRollups(n.question_rollups);r.onSharedDisplayDataChange()},onSharedDisplayDataChange:function(){var n=_____WB$wombat$check$this$function_____(this),r=_.values(n.questions),i=200;if(!n.get("isUpdating")){n.set("isUpdating",true,{notify:true})}n._clearTempDisplays();_.each(r,function(e,t){setTimeout(function(){e.display._trigger({type:"allDisplaysChange"});if(t===r.length-1){n.set("isUpdating",false,{notify:true})}},i*t)})},_clearTempDisplays:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.questions;_.each(t,function(e){e.display.clearTempDisplay({notify:false})})},isBuffered:function(){var n=true,e=this.survey,r=e.config.question_buffer_page_load_size,t=e.shownQuestionList,i=e.state.get("page");if(i!=="all"){t=this.survey.pageList[i].shownQuestionList}$.each(t,function(e,t){if(!t.hasRollupLoaded()&&e<r){n=false;return false}if(e>=r){return false}});return n},hasAll:function(){var e=this.survey,n=true,t=e.shownQuestionList,r=e.state.get("page");if(r!=="all"){t=e.pageList[r].shownQuestionList}$.each(t,function(e,t){if(!t.hasRollupLoaded()){n=false;return false}});return n},isAfterLastLoadedPage:function(e){var t=this._getLastLoadedQuestion(),n;if(!t){return false}n=t.page;return e.position>n.position},isAfterLastLoadedQuestion:function(e){var t=this._getLastLoadedQuestion();if(!t){return false}return e.position>t.position},_getLastLoadedQuestion:function(){var e=this.survey,n,t=e.shownQuestionList,r;if(e.state.isDashboardMode()){return null}r=e.state.get("page");if(r!=="all"){t=e.pageList[r].shownQuestionList}$.each(t,function(e,t){if(!t.hasRollupLoaded()){n=t;return false}});return n},fetchMoreRollups:function(){var e=_____WB$wombat$check$this$function_____(this),t=this.survey.state.get("page"),n={self:this},r=this._getNextUnloadedQuestionIndex(t);if(r>=0){$.when(n,this.lastRollupsRequest).always(function(){e._makeFetchMoreRequest(n)})}},fetchFiltered:function(){var e=_____WB$wombat$check$this$function_____(this),t={self:this,timestamp:SM.Date.timestamp()};this.set("lastFetchFilteredStamp",t.timestamp);$.when(t,this.lastRollupsRequest).always(function(){e._makeFetchFilteredRequest(t)})},_makeFetchMoreRequest:function(t){var n=t.self,e,r=n.survey.state.get("page"),i=n._getNextUnloadedQuestionIndex(r),o;t.timestamp=SM.Date.timestamp();e={view_data:n.survey.getCurrentView().dump(),questions:n._getQuestionIDBuffer(r,i)};if(e.questions.length===0){return}o=SM.API.fetchRollups(e);$.when(t,o).done(n._onFetchedMoreRollups).fail(function(e){n._onFetchMoreRollupsFailed(t,e)})},_getQuestionIDBuffer:function(e,t,n){var r=this.survey.shownQuestionList,i=this.survey.config.question_buffer_fetch_size,o=[];if(e!=="all"){r=this.survey.pageList[e].shownQuestionList}r=r.slice(t);$.each(r,function(e,t){if(!t.hasRollupLoaded()||n){o.push(t.ID)}else{return false}if(o.length===i){return false}});return o},_getNextUnloadedQuestionIndex:function(e){var t=this.survey.shownQuestionList,n=-1;if(e!=="all"){t=this.survey.pageList[e].shownQuestionList}$.each(t,function(e,t){if(!t.hasRollupLoaded()){n=e;return false}});return n},_makeFetchFilteredRequest:function(t){var n=t.self,e,r,i;if(t.timestamp===n.get("lastFetchFilteredStamp")){e=n.survey.state.get("page");r={view_data:n.survey.getCurrentView().dump(),questions:n._getQuestionIDBuffer(e,0,true),include_quiz_summary:n.survey.isQuiz};i=n.survey.anviews.defaultView.appliedSidiAll();if(i){r=_.extend(r,{include_basic_stats:true})}if(r.questions.length===0){return}n.set("failedLoad",false);n.set("failedLoadRequestID",null);n.set("isLoading",true,{notify:true});n.lastRollupsRequest=SM.API.fetchRollups(r);n.clear();$.when(t,n.lastRollupsRequest).done(n._onFetchFiltered).fail(function(e){n._onFetchFilteredFail(t,e)})}},_triggerRollupsLoaded:function(e){var t=-1,n,r=_____WB$wombat$check$this$function_____(this),i=r.survey.pageList;$.each(e,function(e){n=r.survey.getQuestion(e);if(e==="payment_summary"){n=i[i.length-1].questionList[0]}if(n.position>t){t=n.position}n._trigger({type:"rollupLoaded"})});r.survey._trigger({type:"rollupsAppended",lastLoadedPosition:t})},_onFetchedMoreRollups:function(e,t){var n=t[0],r=e.self,i;if(e.timestamp>r.get("lastFetchFilteredStamp")){r.survey.set("respondentCounts",n.respondent_counts,{notify:true});i=r.loadRollups(n.question_rollups);r.survey.benchmarkRollups.loadRollups(n.benchmark_rollups);if(i){r._triggerRollupsLoaded(i)}}},_onFetchMoreRollupsFailed:function(e){if(e.timestamp>this.get("lastFetchFilteredStamp")){this.survey._trigger({type:"fetchRollupsFailed"})}},_onFetchFiltered:function(e,t){var n=t[0],r=e.self;if(e.timestamp===r.get("lastFetchFilteredStamp")){r.survey.set("respondentCounts",n.respondent_counts,{notify:true});r.loadRollups(n.question_rollups);r.survey.benchmarkRollups.loadRollups(n.benchmark_rollups);r.survey.getCurrentView().save();r.set("isLoading",false,{notify:true})}},_onFetchFilteredFail:function(e,t){var n=t&&t.request_id;if(e.timestamp===this.get("lastFetchFilteredStamp")){this.set("failedLoad",true);this.set("failedLoadRequestID",n);this.set("isLoading",false,{notify:true});this.survey.getCurrentView().invalidateNewRules()}},_onSelectedViewChanged:function(e){var t=e.data.self,n=t.survey.getCurrentView().get("lastSwitchStamp");t.set("lastFetchFilteredStamp",n);t.set("failedLoad",false);t.set("failedLoadRequestID",null);t.set("isLoading",true,{notify:true});t.clear()},_onSelectedViewLoaded:function(e){var t=e.data.self,n=e.respondentData.respondent_counts;if(t.survey.getCurrentView().get("lastSwitchStamp")===t.get("lastFetchFilteredStamp")){t.survey.set("respondentCounts",n,{notify:true});t.loadRollups(e.respondentData.question_rollups);t.set("isLoading",false,{notify:true})}},_onSelectedViewFailed:function(e){var t=e.data.self;if(t.survey.getCurrentView().get("lastSwitchStamp")===t.get("lastFetchFilteredStamp")){t.set("failedLoad",true);t.set("failedLoadRequestID",t.survey.getCurrentView().get("failedLoadRequestID"));t.set("isLoading",false,{notify:true})}},_onSwitchRequestChanged:function(e){var t=e.data.self;t.lastRollupsRequest=e.value},_onRuleDeleted:function(e){var t=e.ruleModel,n=e.data.self;if(t.get("selected")&&!e.ruleModel.isShow){n.fetchFiltered()}},_onRuleEdited:function(e){var t=e.data.self;if(!e.ruleModel.isShow){t.fetchFiltered()}},_onRuleAdded:function(e){var t=e.data.self;if(!e.ruleModel.isShow&&e.ruleModel.get("selected")){t.fetchFiltered()}}});SM.Models.register("AppliedCategoriesSelection",{__create:function(e){this._state={};this.responseID=e.responseID},load:function(e){this.categories=e},reset:function(){this._state={}},update:function(e,t){this._state[e]=t;this._trigger({type:"selection.changed",isDirty:this.isDirty()})},dump:function(){var i={},o=this._state,a=this.responseID,s=this.categories.UNCATEGORIZED_ID,e=this.categories.map;$.each(e,function(e,t){var n,r;if(e!==s){n=t.getApplicationState(a);r=o[e];if(r&&n!==r){i[e]=r}else{i[e]=n}}});return i},isDirty:function(){var e=this._state,r=this.responseID,i=this.categories.map,o=false;$.each(e,function(e,t){var n=i[e].getApplicationState(r);if(n!==t){o=true;return false}});return o}});SM.Models.register("FilterCategoriesSelection",{__create:function(){this.reset()},loadSelection:function(){var e=this.categories.map,n,r;this.reset();n=this._state;r=this._list;$.each(e,function(e,t){if(t.isFiltering()){n[e]=true;r.push(e)}else{n[e]=false}})},reset:function(){this._state={};this._list=[]},isEmpty:function(){return this._list.length===0},update:function(e,t){this._state[e]=t;if(t){SM.Array.addUnique(this._list,e)}else{SM.Array.removeItem(this._list,e)}this._trigger({type:"selection.changed",isDirty:this.isDirty()})},clear:function(){var t=_____WB$wombat$check$this$function_____(this);$.each(this.categories.map,function(e){t._state[e]=false});this._list=[];this._trigger({type:"selection.changed",isDirty:this.isDirty()})},isDirty:function(){var e=this._state,r=this.categories.map,i=false;$.each(e,function(e,t){var n=r[e].isFiltering();if(n!==t){i=true;return false}});return i},apply:function(){this.categories.taModel.filterCategories(this._list)}});SM.Models.register("TextPhrase",{MAX_CATNAME_LEN:25,DEFAULT_WEIGHTED_AVERAGE:.5,ID_PREFIX:"phrase-",DEFAULT_FONT_COLOR:"#007FAA",__create:function(){this.ID=this.ID_PREFIX+this.__uid},__getters:{localizedPercent:function(e){var t=e.phrases.taModel[e.phrases.taModel.isTAEnabled()?"filterCount":"fakeFilterCount"];return Globalize.formatPercent(e.responseCount/t,2)},percent:function(e){var t=e.phrases.taModel[e.phrases.taModel.isTAEnabled()?"filterCount":"fakeFilterCount"];return SM.Math.toPercentString(e.responseCount/t,2)},fontSize:function(e){var t=e.phrases,n=14,r=32,i;if(t.lowScore!==t.highScore){i=(e.dscore-t.lowScore)/(t.highScore-t.lowScore)}else{i=e.DEFAULT_WEIGHTED_AVERAGE}return n+r*i}},load:function(e){this.text=e.phrase;this.responseCount=e.count;this.score=e.score;this.dscore=e.dscore;this.isCombined=e.isCombined||false;this.words=e.words||[];this.combinedPhraseStr=e.combinedPhraseStr;this.limit=e.limit;this.color=e.color||this.DEFAULT_FONT_COLOR;this.colorScale=e.colorScale||0;this.combinedResponseCount=e.combinedResponseCount},hasManyResponses:function(){return this.responseCount>1}});SM.Models.register("TextPhraseList",{viewModes:{CLOUD:"cloud",LIST:"list"},__create:function(e){this.ID=e.ID;this.taModel=e.taModel;this.customedPhraseList=[];this.originalPhrasesList=[];this.list=[];this.sortedList=[];this.map={};this.viewMode=this.viewModes.CLOUD;this.isLoaded=false},load:function(e,t){var r=_____WB$wombat$check$this$function_____(this),i=100,o=0,n=Number.MAX_SAFE_INTEGER,a=0,p,s,l,d,u=SM.Object.deepCopy(e),c;r.originalPhrasesList=e;r.customedPhraseList=[];if(t){_.each(t.hides,function(t){u=_.filter(u,function(e){return e.phrase.toLowerCase()!==t.toLowerCase()})});_.each(t.combines,function(e){var t=e.title,n=e.words,r={phrase:t,count:0,score:0,dscore:0,isCombined:true,combinedResponseCount:0,words:n};_.each(n,function(t){u=_.filter(u,function(e){if(e.phrase.toLowerCase()===t.toLowerCase()){r.count+=e.count;r.combinedResponseCount=Math.max(r.combinedResponseCount,e.count);r.score=Math.max(r.score,e.score);return false}return true})});if(r.count!==0){u.push(r)}});_.each(u,function(e){n=Math.min(e.count,n);a=Math.max(e.count,a)});u=_.filter(u,function(e){return e.count>=t.minFreq&&e.count<=t.maxFreq});if(u.length>0){u=_.sortBy(u,"count").reverse();c=u.length-1;_.each(u,function(e,t){e.dscore=(c-t)/c})}l=t.minFreq>-1?t.minFreq:n;d=t.maxFreq<Number.MAX_SAFE_INTEGER?t.maxFreq:a;p=d-l;_.each(u,function(e){s=Math.round((e.count-l)*7/p);s=s<0?0:s>7?7:s;e.colorScale=s})}r.list=[];r.sortedList=[];r.map={};_.each(u,function(e,t){var n=SM.Models.create("TextPhrase");n.phrases=r;n.load(e);n.set("rank",t+1);i=Math.min(n.dscore,i);o=Math.max(n.dscore,o);r.list.push(n);r.customedPhraseList.push(n);r.map[n.ID]=n;r.sortedList.push(n);r.limit=n.limit});r.highScore=o;r.lowScore=i;r.lowRange=n>=a?a-1:n;r.highRange=a;r._sortListUneven();r.isLoaded=true},isLanguageAvailable:function(e){return e!=="ja"&&e!=="zh"},_sortListByText:function(){this.sortedList.sort(function(e,t){e=e.text.toLowerCase();t=t.text.toLowerCase();if(e===t){return 0}return e<t?-1:1})},_sortListAsCurve:function(e){var n=[];e=_.sortBy(e,function(e,t){return e.dscore>t.dscore?-1:1});_.each(e,function(e,t){if(t%2===0){n.push(e)}else{n.unshift(e)}});return n},findCombinedWords:function(){var t=[];_.each(this.customedPhraseList,function(e){if(e.isCombined){t.push(e)}});return t.length},_sortListUneven:function(){var e=this.sortedList,t,n,r,i,o,a=[];e.sort(function(e,t){return e.dscore>t.dscore?-1:1});t=e;n=t.length;r=t.length/2;i=t.slice(0,r+1);o=t.slice(r+1,n);i=this._sortListAsCurve(i);o=this._sortListAsCurve(o);_.each(i,function(e,t){a.push(i[t]);if(i.length===o.length){a.push(o[t])}else if(t<o.length){a.push(o[t])}});this.sortedList=a}});SM.Models.register("TextResponse",{__create:function(e){this.ID=e.ID;this.responseCategoryMap={};this.sentimentCategoryID=-1;this.sentimentType=""},__setters:{categoryIDs:function(r,t){var i,e,o;r.categories={list:[],map:{}};r.categoryIDs=[];i=r.categories.list;o=r.categories.map;if(!r.responses.taModel.categories.failed){e=r.responses.taModel.categories.sortedList;$.each(e,function(e,n){$.each(t,function(e,t){t=String(t);r.responseCategoryMap[n.ID]="unchecked";if(t===n.ID){o[t]=n;i.push(n);r.categoryIDs.push(t);r.responseCategoryMap[t]="checked";if(t==="-2"){r.responses.unProcessedResponsesList.push(r.ID)}if(n.isSentiment){r.sentimentCategoryID=t;r.sentimentType=n.sentimentType}return false}})});r.set("isInFilter",r._isInFilter(),{notify:true});if(!r.get("isInFilter")){r.responses.remove(r.ID)}}}},load:function(e){var t=this.responses.taModel,n=this.responses.highlights,r=e.date;this.localizedDate=SM.AnalyzeLocalDatetime.localizeDatetime(r);this.dateStr=Globalize.format(this.localizedDate,"d")+" "+Globalize.format(this.localizedDate,"t");this.content=e.content;this.date=e.date;this.number=e.number;this.respondentID=e.respondent_id;this.highlights=n&&n[this.respondentID];this.respondentUrl=t.rollup.question.survey.getRespondentUrl(this.respondentID);if(this.highlights){this.text=this._highlight()}else{this.text=[{text:DOMPurify.sanitize(SM.Html.removeExternalAttributes(e.content))}]}this.categories={map:{},list:[]};if(t.isTAEnabled()){this.set("categoryIDs",e.tag_ids||[])}},isSelected:function(){var e=this.responses.selection;if(e.isNone()){return false}return e.isAll()||e.map[this.ID]&&!e.selectUnloaded||!e.unselectedMap[this.ID]&&e.selectUnloaded},addCategoryID:function(e){var t=this.get("categoryIDs");t=t.concat([e]);this.set("categoryIDs",t,{notify:true})},removeCategory:function(t){var e=this.categories;delete e.map[t];SM.Array.removeItem(this.categoryIDs,t);e.list=$.map(e.list,function(e){if(e.ID!==t){return e}});this._trigger("category.removed")},applyCategories:function(n,e){var t=_____WB$wombat$check$this$function_____(this),r=[],i=this.categories.map,o=t.responses.taModel.categories.sortedList,a;if(n){a=$.map(o,function(e){var t=n[e.ID];if(t==="checked"||t==="indeterminate"&&i[e.ID]){return e.ID}});r=this._diffCategories(a,this.categoryIDs);t.set("categoryIDs",a,{notify:true})}if(e&&e.label){r.push({action:"create",label:e.label,color:e.color,text:e.text})}return r},save:function(e,n,t){var r,i=_____WB$wombat$check$this$function_____(this);if(e.length){r=this.responses.taModel._makeParams();this.responses.taModel._checkMatrixCrosstabForStatsvc(r);r.commands=e;r.response_text_ids=[this.ID];if(t){r.sa_data=t}SM.API.taTagAllText(r).done(function(e){var t;if(e.new_tags.length){t=SM.Models.create("TextCategory");t.categories=i.responses.taModel.categories;t.load(e.new_tags[0]);i.responses.taModel.categories.add(t);i.addCategoryID(t.ID);i.responses.taModel.categories.tempTagCountsMap[t.ID].count=1}if(n){i.responses.taModel.categories.updateUnProcessedCounts(e.tag_counts.tags,true)}i.responses.taModel.categories.updateCounts()})}},_isInFilter:function(){var n,r;if(this.responses&&this.responses.taModel&&this.responses.taModel.categories){r=this.responses.taModel.categories;if(!r.hasFilter()){return true}if(!this.userResponseTags().length&&!r.hasSentimentFilter()){return r.isInFilter(r.UNCATEGORIZED_ID)}$.each(this.categoryIDs,function(e,t){if(r.isInFilter(t)){n=true;return false}});return n}return true},_diffCategories:function(e,r){var t=_____WB$wombat$check$this$function_____(this),i=t.responses.taModel.categories.tempTagCountsMap,o=true,a=[],s={};if(!e.length){if(!r.length){if(o){i["-1"].count-=1;o=false}return[]}return $.map(r,function(e){i[e].count-=1;if(o){i["-1"].count+=1;o=false}return{action:"remove",tag_id:e}})}_.each(e,function(t){var n=false;_.each(r,function(e){if(e===t){n=true;s[e]=false}if(e!==t&&s[e]===undefined){s[e]=true}});if(!n){if(!r.length&&o){i[-1].count-=1;o=false}i[t].count+=1;a.push({action:"add",tag_id:t})}});s=$.map(s,function(e,t){if(e){i[t].count-=1;return{action:"remove",tag_id:t}}});return a.concat(s)},_highlight:function(){var a=this.content,e=a.length,s=[],l,u=0;$.each(this.highlights,function(e,t){var n=t[0],r=t[1],i=r-n,o=n-u;if(o>0){l=a.substr(u,o);s.push({text:DOMPurify.sanitize(l)})}l=a.substr(n,i);u=r;s.push({text:DOMPurify.sanitize(l),highlight:true})});if(u<e){l=a.substr(u);s.push({text:DOMPurify.sanitize(l)})}return s},applyProcessedCategory:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.categories.map,n=e.responses.taModel.categories,r=n.processedSentimentTag,i;i=$.map(t,function(e){if(e.ID!=="-2"){return e.ID}});i.push(String(r.tag_id));e.set("categoryIDs",i,{notify:true})},userResponseTags:function(){var e=_____WB$wombat$check$this$function_____(this),t=Object.values(this.responses.taModel.categories.sentimentsMap);return _.filter(e.categoryIDs,function(e){return!_.contains(t,e)})}});SM.Models.register("TextResponseList",{TA_INVALID_OFFSET:0,MAX_SEARCH_STRING_LEN:60,__create:function(e){this.ID=e.ID;this.selection=SM.Models.create("ResponsesSelection",{ID:this.ID});this.selection.responses=_____WB$wombat$check$this$function_____(this);this.map={};this.list=[];this.unProcessedResponsesList=[];this.loadedCount=0;this.highlights={}},load:function(e){var t=this.taModel.rollup.question.survey.owner,n;this.map={};this.list=[];this.loadedCount=0;this.highlights={};this.removedCount=0;this.totalCount=e.question_response_count;n=this.taModel.filterCount<e.count?this.taModel.filterCount:e.count;this.queryCount=t.isOverResponseLimit(n)?t.responseLimit:n;this._append(e);this.failed=false;this._trigger({type:"loaded"})},append:function(e){this._append(e);this._trigger({type:"appended",respondents:this.list.slice(this.loadedCount-e.response_texts.length)})},isEmpty:function(){return this.list.length===0},applyProcessedCategory:function(e){var t=_____WB$wombat$check$this$function_____(this),n=[];_.each(e,function(e){n=n.concat(t.map[e].applyProcessedCategory())});return n},applyCategories:function(n,r){var i=_____WB$wombat$check$this$function_____(this),e=i.selection.selectedIDs(),t,o=false,a=[];$.each(e,function(e,t){a=a.concat(i.map[t].applyCategories(n,r))});t=this._cleanDiffs(a);i.selection.clear();return{diff:t,responseIDs:e,except:o}},remove:function(t){this.queryCount--;this.removedCount++;delete this.map[t];this.list=$.map(this.list,function(e){if(e.ID!==t){return e}});this._trigger("responseRemoved")},save:function(e,t,n,r){var i,o,a,s=_____WB$wombat$check$this$function_____(this),l=s.taModel.get("survey");function u(e){var n;if(e.new_tags.length){n=SM.Models.create("TextCategory");n.categories=s.taModel.categories;n.load(e.new_tags[0]);s.taModel.categories.add(n);$.each(t,function(e,t){s.map[t].addCategoryID(n.ID)});s.taModel.categories.tempTagCountsMap[n.ID].count=t.length}if(r){s.taModel.categories.updateUnProcessedCounts(e.tag_counts.tags,false)}s.taModel.categories.updateCounts()}if(e.length){a=this._isRemovingFilteredCategory(e);if(a){this.taModel.set("isSearching",true,{notify:true})}o=this.taModel._makeParams();this.taModel._checkMatrixCrosstabForStatsvc(o);o.commands=e;if(n){o.except_response_text_ids=t;i=SM.API.taTagExceptText(o)}else{o.response_text_ids=t;i=SM.API.taTagAllText(o)}i.done(u);if(a){i.done(function(){s.taModel.filterCategories(s.taModel.categories.filter.list)})}if(!l.isStatSvcExprUser()){this.invalidateFilter(o)}}},invalidateFilter:function(e){var t=e.view_data.metadata;if(_.find(t,function(e){return e.key==="rule_filter_tag"})){SM.API.invalidateFilters()}},_cleanDiffs:function(e){var t={};return $.map(e,function(e){if(!t[e.action]){t[e.action]={};if(e.action==="create"){return e}}if(e.action==="create"){return}if(!t[e.action][e.tag_id]){t[e.action][e.tag_id]=true;return e}})},_append:function(e){var r=_____WB$wombat$check$this$function_____(this);SM.Object.update(this.highlights,e.highlights);$.each(e.response_texts,function(e,t){var n=SM.Models.create("TextResponse",{ID:t.response_text_id});n.responses=r;r.loadedCount++;t.number=r.loadedCount;n.load(t);r.map[t.response_text_id]=n;r.list.push(n)})},_isRemovingFilteredCategory:function(e){var n=false,r=this.taModel.categories.filter.map;$.each(e,function(e,t){if(t.action==="remove"&&r[t.tag_id]){n=true;return false}});return n}});SM.Models.register("TextCategory",{MAX_CATNAME_LEN:25,sentimentLabels:{sm_positive:"positive",sm_negative:"negative",sm_neutral:"neutral",sm__processed_q:"uncategorized",sm_unprocessed_q:"uncategorized",sm_uncategorized:"uncategorized"},__getters:{localizedPercent:function(e){var t=e.categories.taModel.filterCount;return Globalize.formatPercent(e.responseCount/t,2)},percent:function(e){var t=e.categories.taModel.filterCount;return SM.Math.toPercentString(e.responseCount/t,2)}},__validators:{name:function(e,t){var n={isValid:true},r=SM.String.trim(t);r=_.escape(r);if(!r){n.isValid=false;n.exception="empty"}if(r.length>e.MAX_CATNAME_LEN){n.isValid=false;n.exception="maxlength"}if(e._isDuplicateName(t)){n.isValid=false;n.exception="duplicate"}if(e._isHtmlTag(t)){n.isValid=false;n.exception="htmlTag"}return n}},load:function(t){var n,r;if(t){try{n=decodeURIComponent(t.label);r=decodeURIComponent(t.color)}catch(e){n=t.label;r=t.color}this.isSentiment=t.tag_type_id===2;this.isFiltered=false;this.name=DOMPurify.sanitize(n);this.color=r;this.responseCount=t.response_text_count||0;this.ID=""+t.tag_id;this.isNew=false;this.sentimentType=this.isSentiment?this.sentimentLabels[this.name]:""}else{this.responseCount=0;this.color="00BF6F";this.name="";this.isNew=true}},getApplicationState:function(e){if(e){return this._getResponseApplication(e)}return this._getResponsesSelectedApplication()},_getResponsesSelectedApplication:function(){var e=this.categories,n=e.taModel.responses,t=n.selection,r=_____WB$wombat$check$this$function_____(this),i=this.categories.taModel.filterCount,o;if(this.responseCount===0){return"unchecked"}if(t.isAll()){if(this.responseCount===i){return"checked"}return"indeterminate"}if(t.get("selectUnloaded")){o=0;$.each(t.unselectedMap,function(e,t){if(t&&n.map[e].categories.map[r.ID]){o++}});if(this.responseCount-o===t.get("count")){return"checked"}if(this.responseCount-o===0){return"unchecked"}return"indeterminate"}o=0;$.each(t.map,function(e,t){if(t&&n.map[e].categories.map[r.ID]){o++}});if(t.get("count")===o){return"checked"}if(o===0){return"unchecked"}return"indeterminate"},_getResponseApplication:function(e){var t=this.categories.taModel.responses.map[e];return t.categories.map[this.ID]?"checked":"unchecked"},isFiltering:function(){return!!this.categories.filter.map[this.ID]},_colorOptions:[{name:"dataviz_sabaeus",hex:"00BF6F"},{name:"dataviz_turquoise",hex:"6BC8CD"},{name:"dataviz_blue",hex:"507CB6"},{name:"dataviz_red",hex:"DB4D5C"},{name:"dataviz_orange",hex:"FF8B4F"},{name:"dataviz_ltbrown",hex:"C7B879"},{name:"dataviz_gray",hex:"768086"},{name:"dataviz_purple",hex:"7D5E90"},{name:"dataviz_pink",hex:"D25F90"}],_isDuplicateName:function(n){var e=this.categories.list,r=_____WB$wombat$check$this$function_____(this),i=false;$.each(e,function(e,t){if(t.ID!==r.ID&&t.name===n){i=true;return false}});return i},_isHtmlTag:function(e){var t=/^(?!\s*$).+/g;return!t.test(DOMPurify.sanitize(e))},save:function(){var e,t=_____WB$wombat$check$this$function_____(this);if(this.ID===this.categories.UNCATEGORIZED_ID){throw new Error("Cannot save uncategorized")}if(!this.isNew){throw new Error("Cannot save a tag that is not new")}e=this.categories.taModel._makeParams();e.color=DOMPurify.sanitize(this.color);e.label=DOMPurify.sanitize(this.name);SM.API.taCreateTag(e).done(function(e){t.load(e);t.categories.add(t)})},edit:function(e){var t;if(this.ID===this.categories.UNCATEGORIZED_ID){throw new Error("Cannot delete the uncategorized id")}t=this.categories.taModel._makeParams();t.tag_id=this.ID;t.color=e.color?DOMPurify.sanitize(e.color):this.color;t.label=e.name?DOMPurify.sanitize(e.name):this.name;this.name=t.label;this.color=t.color;SM.API.taEditTag(t);this.categories._trigger({type:"category.edited",category:this})},kill:function(){var e,r;if(this.ID===this.categories.UNCATEGORIZED_ID){throw new Error("Cannot delete the untagged id")}e=this.categories.taModel._makeParams();e.tag_id=this.ID;r=this.categories.map[this.categories.UNCATEGORIZED_ID];this.categories.remove(this);this.categories=null;SM.API.taDeleteTag(e).done(function(e){var t=e.tag_counts,n;if(t.status===200){n=t.tags[r.ID];if(n){r.set("responseCount",n.response_text_count,{notify:true})}}})}});SM.Models.register("TextCategoriesList",{__create:function(e){this.ID=e.ID;this.map={};this.sentimentsMap={};this.tempTagCountsMap={};this.processedSentimentTag=null;this.unProcessedSentimentTag=null;this.sortedUserTagList=[];this.sortedList=[];this.list=[];this.filter={list:[],map:{}}},UNCATEGORIZED_ID:"-1",UNPROCESSED_ID:"-2",load:function(e){this._buildStructures(e,false);this._ensureUncategorizedModel();this.ensureUnprocessedModel();this._sortListByName()},count:function(){return this.list.length?this.list.length-1:0},noSentimentsCount:function(){var t=[];_.each(this.list,function(e){if(!e.isSentiment){t.push(e)}});return t.length?t.length-1:0},hasMany:function(){return this.count()>1},isEmpty:function(){return this.count()===0},hasFilter:function(){return this.filter.list.length>0},getFilterList:function(){var t=_____WB$wombat$check$this$function_____(this);return $.map(this.filter.list,function(e){return t.map[e]})},isInFilter:function(e){if(this.hasFilter()){return!!this.filter.map[e]}return true},hasSentimentFilter:function(){var t=false,e=this.getFilterList(),n=Object.values(this.sentimentsMap);_.each(e,function(e){if(_.contains(n,e.ID)){t=true}});return t},createModel:function(){var e=SM.Models.create("TextCategory");e.categories=_____WB$wombat$check$this$function_____(this);e.load();return e},add:function(e){this._add(e);this.addTagToQuestion(e,false);this._sortListByName();this.taModel._trigger({type:"category.added",category:e})},addTagToQuestion:function(e,t){var n=e.categories.taModel.rollup.question,r=n.tags,i=parseInt(e.ID,10);r[i]={hexcolor:e.color,label:e.name};if(t){r[i].tag_type_id=2;r[i].tag_type_name="sentiment"}else{r[i].tag_type_id=1;r[i].tag_type_name="user"}},remove:function(e){this._remove(e);this._removeTagFromQuestion(e);this.taModel._trigger({type:"category.deleted",category:e})},clearFilter:function(e){var t=_____WB$wombat$check$this$function_____(this),n=this.map;_.each(n,function(e){e.set("isFiltered",false)});t.set("inSAFilterMode",false);if(e){t._trigger("filterChange")}},loadFilterSelection:function(e){this.filterSelection=e;this.filterSelection.categories=_____WB$wombat$check$this$function_____(this)},updateUnProcessedCounts:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=n.processedSentimentTag,i=n.map[n.UNPROCESSED_ID],o,a;if(t){a=Math.max(0,i.responseCount-1)}else{o=e[String(r.tag_id)].response_text_count;a=Math.max(0,i.responseCount-o)}i.set("responseCount",a,{notify:true})},updateCounts:function(){var t=_____WB$wombat$check$this$function_____(this);var n;var r=_.size(t.taModel.responses.map);_.each(t.tempTagCountsMap,function(e){if(t.tempTagCountsMap[e.id].count!==0){n=t.map[e.id].responseCount+e.count;t.map[e.id].set("responseCount",n,{notify:true});e.count=0}},_____WB$wombat$check$this$function_____(this));_.each(t.taModel.responses.map,function(e){if(e.categories.list.length!==0&&t.checkIfTagged(e.categories.list)){r--}});t.map[this.UNCATEGORIZED_ID].set("responseCount",r,{notify:true});t._trigger("saveSentiment")},updateSentimentCounts:function(e){var t=_____WB$wombat$check$this$function_____(this),n={};_.each(e,function(e){if(t.map[e.tag_id]){t.map[e.tag_id].set("responseCount",e.response_text_count,{notify:true})}else{n[e.tag_id]=e}});if(!_.isEmpty(n)){t._buildStructures(n,true);if(t.map[t.UNPROCESSED_ID]){t.map["-2"].set("responseCount",0)}else{t.ensureUnprocessedModel(true)}}},_remove:function(e){var n=_____WB$wombat$check$this$function_____(this),r=e.ID,i=false,o=false,a=_.size(n.taModel.responses.map);delete this.map[r];$.each(this.list,function(e,t){if(!i&&r===t.ID){n.list.splice(e,1);i=true}if(!o){t=n.sortedList[e];if(r===t.ID){n.sortedList.splice(e,1);o=true}}if(o&&i){return false}});if(this.filter.map[r]){SM.Array.removeItem(this.filter.list,r);this.taModel.filterCategories(this.filter.list)}$.each(this.taModel.responses.list,function(e,t){if(t.categories.map[r]){t.removeCategory(r)}});this.sortedUserTagList=_.filter(this.sortedUserTagList,function(e){return e.ID!==r});if(!o&&!i){throw new Error("Tag was not deleted properly: deleted ordered: "+o," clearedUnordered: "+i)}_.each(n.taModel.responses.map,function(e){if(e.categories.list.length!==0&&n.checkIfTagged(e.categories.list)){a--}});n.map[this.UNCATEGORIZED_ID].set("responseCount",a,{notify:true});$.each(n.list,function(e,t){if(n.UNCATEGORIZED_ID===t.ID){t.responseCount=a}});$.each(n.sortedList,function(e,t){if(n.UNCATEGORIZED_ID===t.ID){t.responseCount=a}})},checkIfTagged:function(e){return _.some(e,function(e){return e.isSentiment===false})},_removeTagFromQuestion:function(e){var t=e.categories.taModel.rollup.question,n=t.tags,r=parseInt(e.ID,10);delete n[r]},_add:function(e){this.map[e.ID]=e;this.list.push(e);this.sortedList.push(e);if(e.isSentiment){this.sentimentsMap[e.name]=e.ID}this.tempTagCountsMap[e.ID]={id:e.ID,count:0}},_buildStructures:function(e,r){var i=_____WB$wombat$check$this$function_____(this);$.each(e,function(e,t){var n=SM.Models.create("TextCategory");if(t.label==="sm_processed_q"){t.label="sm_uncategorized";i.processedSentimentTag=t}n.categories=i;n.load(t);i._add(n);if(r){i.addTagToQuestion(n,true)}})},_ensureUncategorizedModel:function(){var e;if(!this.map[this.UNCATEGORIZED_ID]){e=SM.Models.create("TextCategory");e.load({label:Globalize.localize("Untagged"),color:"333333",tag_id:this.UNCATEGORIZED_ID});this.map[this.UNCATEGORIZED_ID]=e;this.list.push(e);this.sortedList.push(e)}this.map[this.UNCATEGORIZED_ID].set("name",Globalize.localize("Untagged"));this.map[this.UNCATEGORIZED_ID].set("isUncategorized",true)},ensureUnprocessedModel:function(e){var t;if(this.map[this.UNPROCESSED_ID]){this.unProcessedSentimentTag=this.map[this.UNPROCESSED_ID]}else if(e){t=SM.Models.create("TextCategory");t.load({label:"sm_unprocessed_q",color:"671E75",tag_id:this.UNPROCESSED_ID,tag_type_id:2,response_text_count:0});this.map[this.UNPROCESSED_ID]=t;this.list.push(t);this.sortedList.push(t)}},_sortListByName:function(){var n=Globalize.localize("Untagged").toLowerCase();this.sortedList.sort(function(e,t){e=e.name.toLowerCase();t=t.name.toLowerCase();if(e===n){return 1}if(t===n){return-1}if(e===t){return 0}return e<t?-1:1});this.sortedUserTagList=_.filter(this.sortedList,function(e){return!e.isSentiment})}});SM.Models.register("ResponsesSelection",{__create:function(e){this.ID=e.ID;this.map={};this.unselectedMap={};this.count=0;this.selectUnloaded=false},isAll:function(){return this.count>0&&this.count===this.responses.queryCount},isNone:function(){return this.count===0},isPartial:function(){return this.count>0&&this.count<this.responses.queryCount},add:function(e){if(!this.selectUnloaded){this.map[e]=true}else{this.unselectedMap[e]=false}if(!this.isAll()){this.set("count",this.count+1,{notify:true})}},selectedIDs:function(){var n=_____WB$wombat$check$this$function_____(this);if(n.selectUnloaded){return $.map(n.responses.list,function(e){var t=n.unselectedMap[e.ID];if(!t){return e.ID}})}return $.map(n.map,function(e,t){if(e){return t}})},unselectedIDs:function(){var n=_____WB$wombat$check$this$function_____(this);if(this.selectUnloaded){return $.map(this.unselectedMap,function(e,t){if(e){return t}})}return $.map(this.responses.list,function(e){var t=n.map[e.ID];if(!t){return e.ID}})},remove:function(e){if(!this.selectUnloaded){this.map[e]=false}else{this.unselectedMap[e]=true}if(!this.isNone()){this.set("count",this.count-1,{notify:true})}},clear:function(){this.map={};this.unselectedMap={};this.set("count",0,{notify:true});this.selectUnloaded=false},selectAll:function(){this.unselectedMap={};this.map={};this.set("count",this.responses.queryCount,{notify:true});this.selectUnloaded=true}});SM.Models.register("TextAnalysis",{PAGE_SIZE:50,TA_SUCCESS:200,ETL_NONE:0,ETL_START:1,ETL_DONE:2,ETL_LOADED:3,ETL_FAILED:4,__create:function(e){var t;this.ID=e.ID;t=this.ID.split("_");this.optionID=t[3];this.crossedOptionID=t[5];this.matrixCrossTabID=e.matrixCrossTab||"0";this.variationID=t[7];this.inProgress=false;this.etlProcessing=this.ETL_NONE;this.insightsFlagOn=false;this._hasLoaded=false;this._hasWordCloudLoaded=false;this.responses=SM.Models.create("TextResponseList",{ID:this.ID});this.responses.taModel=_____WB$wombat$check$this$function_____(this);this.categories=SM.Models.create("TextCategoriesList",{ID:this.ID});this.categories.taModel=_____WB$wombat$check$this$function_____(this);this.phrases=SM.Models.create("TextPhraseList",{ID:this.ID,taModel:this});this.customization=SM.Models.create("WordCloudCustomization",{ID:this.ID,optionID:this.optionID});this.fakeData=[{phrase:"lorem ipsum",count:75},{phrase:"dolor sit amet",count:49},{phrase:"antehabeo sociosqu",count:48},{phrase:"causa lacinia metuo",count:47},{phrase:"secundum",count:46},{phrase:"porta",count:45},{phrase:"abigo litora",count:44},{phrase:"validus",count:43},{phrase:"mauris",count:32},{phrase:"dolor sit amet",count:25},{phrase:"consectetur",count:15},{phrase:"adipiscing elit",count:10},{phrase:"sed do eiusmod",count:5}];this.fakeCustomization=SM.Models.create("WordCloudCustomization",{ID:"fake",optionID:"fake"});this.fakeCustomization.load({fake:{color:"#007FAA",maxFreq:75,maxFreqOrigin:75,minFreq:5,minFreqOrigin:5,colorOrigin:"#007FAA",combines:[],optionID:"0"}});this.fakeFilterCount=810;this.customization.taModel=_____WB$wombat$check$this$function_____(this)},__getters:{questionID:function(e){return e.rollup.question.ID},survey:function(e){return e.rollup.question.survey}},__setters:{searchDraft:function(e,t){var n=SM.String.trim(t);n=SM.String.htmlStrip(n);e.searchDraft=n}},__validators:{searchDraft:function(e,t){var n=SM.String.trim(t);n=SM.String.htmlStrip(n);if(!n){return{isValid:false,exception:"empty"}}return{isValid:true}}},load:function(e){this.enableAnalysis=e.text_data.enable_analysis;this._loadCategoryData(e.tag_data);this._loadResponseData(e.text_data);if(this.get("survey").isExport&&!_.isEmpty(e.analysis_data)){this._loadAnalysisData(e.analysis_data);this._hasWordCloudLoaded=true}this._hasLoaded=true;this.flags=e.flags;this.inProgress=e.inProgress;this._trigger("loaded")},hasLoaded:function(){return this._hasLoaded},isTAEnabled:function(){return this.rollup.question.survey.isTAEnabled()},makeModelId:function(e,t,n){return["qid",e,"oid",t,"xid",n].join("_")},fetch:function(){var e=this._makeSearchParams(),n=_____WB$wombat$check$this$function_____(this);e.offset=0;SM.API.taGetRollupQuestion(e).done(function(e){var t=e[n.ID];t.flags=n.rollup.summary.flags;n.load(t)})},fetchMoreResponses:function(){var n=_____WB$wombat$check$this$function_____(this),e=this._makeSearchParams(),r=false,t,i;this._lastSearch=SM.Date.timestamp();i=this._lastSearch;if(this.categories.hasFilter()){e.restrict_by_tag_ids=this.categories.filter.list}e.offset=this.responses.loadedCount;if(this.get("query")){e.search_phrase=this.get("query");t=SM.API.taGetRollupSearch(e)}else if(this.get("phrase")){e.phrase=this.get("phrase");t=SM.API.taGetRollupPhrase(e)}else{t=SM.API.taGetRollupQuestion(e)}t.done(function(e){var t=e[n.ID];if(n._lastSearch===i){if(t.text_data.status===n.TA_SUCCESS){n.responses.set("fetchFailErrorID",null);n.responses.append(t.text_data);if(!_.isEmpty(n.responses.unProcessedResponsesList)&&r){n.tagUnprocessedResponses()}}else{n.responses.set("fetchFailErrorID",e.request_id);n.responses._trigger("fetchMoreResponses.failed")}}}).fail(function(e){if(n._lastSearch===i){n.responses.set("fetchFailErrorID",e.request_id);n.responses._trigger("fetchMoreResponses.failed")}});return t},fetchResponses:function(e){var t=this._makeSearchParams(),n;t.offset=0;if(this.categories.hasFilter()){t.restrict_by_tag_ids=this.categories.filter.list}this._beforeResponseRequest();n=SM.API.taGetRollupQuestion(t);this._handleResponseRequest(n,this._lastSearch,e);return n},fetchWordCloudData:function(){var n=_____WB$wombat$check$this$function_____(this),e,r=n.phrases;if(n._hasWordCloudLoaded){return}e=n._makeSearchParams();e.offset=0;r.set("inProgress",true);r.set("failed",false);r._trigger("TaAnalysisInProgress.changed");SM.API.taGetWordCloudQuestion(e).done(function(e){var t=e[n.ID];t.flags=n.flags;n._loadAnalysisData(t.analysis_data);r.set("inProgress",false);r._trigger("TaAnalysisInProgress.changed")}).fail(function(){r.set("failed",true);r._trigger("TaAnalysisInProgress.changed")});n._hasWordCloudLoaded=true},clearQuery:function(){var e=_____WB$wombat$check$this$function_____(this),t=e._makeSearchParams(),n;t.offset=0;e.set("query","");e.set("phrase","");e.set("searchDraft","",{notify:true});e.categories.filter.list=[];e.categories.filter.map={};e.categories.clearFilter(true);e._beforeResponseRequest();n=SM.API.taGetRollupQuestion(t);e._handleResponseRequest(n,e._lastSearch)},searchPhrase:function(e){var t=this._makeSearchParams(),n;t.offset=0;t.phrase=e;if(this.categories.hasFilter()){t.restrict_by_tag_ids=this.categories.filter.list}this.set("query","");this.set("phrase",e);this._beforeResponseRequest();n=SM.API.taGetRollupPhrase(t);this._handleResponseRequest(n,this._lastSearch)},searchQuery:function(e){var t=this._makeSearchParams(),n;t.offset=0;t.search_phrase=e;if(this.categories.hasFilter()){t.restrict_by_tag_ids=this.categories.filter.list}this.set("phrase","");this.set("query",e);this._beforeResponseRequest();n=SM.API.taGetRollupSearch(t);this._handleResponseRequest(n,this._lastSearch);return n},filterCategories:function(e){var n=_____WB$wombat$check$this$function_____(this),r=false,i;this.categories.filter.map={};this.categories.filter.list=e;i=this.categories.filter.map;$.each(e,function(e,t){i[t]=true;n.categories.map[t].set("isFiltered",true);if(n.categories.map[t].isSentiment){r=true}});n.categories.set("inSAFilterMode",r);n.categories._trigger("filterChange");if(this.query){this.searchQuery(this.query)}else if(this.phrase){this.searchPhrase(this.phrase)}else{return this.fetchResponses()}},_lastSearch:null,_loadResponseData:function(e){if(e.status===200){this.responses.load(e)}else{this.responses.set("failed",true)}},_loadCategoryData:function(e){if(e.status===200){this.categories.load(e.tags)}else{this.categories.set("failed",true)}},_loadAnalysisData:function(e){var t,n=this.phrases,r=this.get("survey");if(!this.isTAEnabled()){n.set("failed",false);n.load(this.fakeData,this.fakeCustomization)}else if(e.status===200){t=this.rollup.display.getDisplayData(this.get("questionID"));n.set("failed",false);if(!r.isExport){t=this.rollup.display.getDisplayData(this.get("questionID"));this.customization.load(t.wc_customization,r.owner.wcAccessTier);n.load(e.text_analysis,this.customization)}else{n.load(e.text_analysis)}}else{n.set("failed",true)}},_makeParams:function(){var e=this.get("survey");return{question_id:this.get("questionID"),variation_id:this.get("variationID"),option_id:this.get("optionID"),crosstab_option_id:this.get("crossedOptionID"),matrix_crosstab:this.get("matrixCrossTabID"),view_data:e.getCurrentView().dump(),survey_id:e.ID}},_checkMatrixCrosstabForStatsvc:function(e){var t=this.rollup,n=t.question;if(n.isCompared()){if(n.isMenuMatrix()&&t.summary.crossed_cols){e.matrix_crosstab="1"}}return e},_makeSearchParams:function(){var e=this._makeParams();SM.Object.update(e,{language:this._getLanguageParam(),page_size:this.PAGE_SIZE,hide_ids:1,include_question_tags:1,include_question_response_count:1});return e},_getLanguageParam:function(){switch(Globalize.culture().name){case"en":return"english";case"nl":return"dutch";case"da":return"danish";case"fr":return"french";case"de":return"german";case"it":return"italian";case"no":return"norwegian";case"pt":return"portuguese";case"ru":return"russian";case"es":return"spanish";case"sv":return"swedish";default:return"not_supported"}},_handleResponseRequest:function(e,n,r){var i=_____WB$wombat$check$this$function_____(this);e.done(function(e){var t=e[i.ID];if(i._lastSearch===n){i.set("isSearching",false);if(t.text_data.status===i.TA_SUCCESS){if(r){if(t.tag_data.status===i.TA_SUCCESS){i.categories.updateSentimentCounts(t.tag_data.tags);i.responses.load(t.text_data);i.set("etlProcessing",i.ETL_LOADED,{notify:true})}}else{i.responses.load(t.text_data)}}else{i.responses.set("failed",true,{notify:true})}}}).fail(function(){i.set("isSearching",false);if(i._lastSearch===n){i.responses.set("failed",true,{notify:true})}})},_beforeResponseRequest:function(){this.responses.selection.clear();this.responses.set("failed",false);this.set("isSearching",true,{notify:true});this._lastSearch=SM.Date.timestamp()},_updateWordCloudDisplayData:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=n.get("optionID")||"0",i=n.customization,o={},a={wc_customization:o},s={notify:false};if(t){i.resetFreqRange()}n.phrases.load(n.phrases.originalPhrasesList,i);o[r]=i.makeParams();$.when(n.rollup.display.updateDisplayData(a,s)).done(function(){if(e){n._applyToAll()}});n.phrases._trigger("TaWordCloudCustomized")},_applyToAll:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.rollup.question.survey,n=e.rollup.display,r={};r.apply_all=e.customization.makeParams();t.anviews.defaultView.updateSharedDisplayData({updates:{wc_customization:r},deletedKeys:["wc_customization"],untypedKeys:n.UNTYPED_DISPLAY_OPTIONS,isCompared:e.rollup.question.isCompared()});t.questionRollups.onSharedDisplayDataChange()},editWordCloudColor:function(e){this.customization.color=e;this.phrases._trigger("WordCloudSingleColorCustomized")},editWordCloudMultiColor:function(e){this.customization.colorGroup=e;this.phrases._trigger("WordCloudMultiColorCustomized")},toggleSingleMultiColor:function(e){this.customization.isMultiColorSelected=e;if(e){this.phrases._trigger("WordCloudMultiColorCustomized")}else{this.phrases._trigger("WordCloudSingleColorCustomized")}},setWordCloudFont:function(e){this.customization.font=e;this.phrases._trigger("TaWordCloudFontCustomized")},editCombine:function(t,e){var n=_____WB$wombat$check$this$function_____(this),r=n.customization.combines,i;i=_.find(r,function(e){return e.title===t});if(!i){return false}i.title=e.title;i.words=e.words;SM.Bi.taWordCloudPhrasesCombineEdit(i.title,i.words.join(","));n._updateWordCloudDisplayData(false,true);return true},addCombine:function(t){var e=_____WB$wombat$check$this$function_____(this),n=e.customization.combines,r;r=_.find(n,function(e){return e.title===t.title});if(!r){n.push(t);SM.Bi.taWordCloudPhrasesCombineAdd(t.title,t.words.join(","))}e._updateWordCloudDisplayData(false,true);return true},removeCombine:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.phrases.map[e],r=n.text;t.customization.removeCombine(r);SM.Bi.taWordCloudPhrasesCombineRemove(r);t._updateWordCloudDisplayData(false,true)},addHide:function(e){var t=_____WB$wombat$check$this$function_____(this);SM.Bi.taWordCloudPhrasesHideUpdate(t);t._updateWordCloudDisplayData(e)},saveWordCloudCustomization:function(e){this.customization.save();this._updateWordCloudDisplayData(e)},cancelWordCloudCustomization:function(){var e=_____WB$wombat$check$this$function_____(this);e.customization.cancel();e.phrases.load(e.phrases.originalPhrasesList,e.customization);e.phrases._trigger("TaWordCloudCustomized")},resetWordCloudRange:function(){this.customization.resetFreqRange();this._updateWordCloudDisplayData()},editMinMaxFreq:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=n.get("survey").owner.wcAccessTier!==2;n.customization.minFreq=r?e:-1;n.customization.maxFreq=r?t:Number.MAX_SAFE_INTEGER;n.phrases.load(n.phrases.originalPhrasesList,n.customization);n.phrases._trigger("TaWordCloudFreqCustomized")},loadApplyAllDisplayData:function(){var e=this.rollup.display.getDisplayData(this.get("questionID"));this.customization.load(e.wc_customization,this.get("survey").owner.wcAccessTier);this.phrases.load(this.phrases.originalPhrasesList,this.customization)},updateETL:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.get("survey"),n,r;r={survey_id:t.ID,user_id:t.owner.ID,question_id:e.rollup.questionID,respondent_total:t.respondentCounts.total};e.set("etlProcessing",e.ETL_START,{notify:true});n=SM.API.triggerETL(r);$.when(n,{self:e}).done(e._onInsightJobCreated).fail(function(){e.setSAToggleFail()})},isEtlProcessing:function(){return this.etlProcessing>this.ETL_NONE&&this.etlProcessing<=this.ETL_DONE},setSAToggleFail:function(){var e=_____WB$wombat$check$this$function_____(this),t={sentiment_toggle:"off"},n={notify:false,toggle:true};e.set("etlProcessing",e.ETL_FAILED,{notify:true});$.when(e.rollup.display.updateDisplayData(t,n)).done(function(){SM.log("Unable to create insight job, turning toggle off")}).fail(function(){SM.log("Unable to toggle sentiment")})},_onInsightJobCreated:function(e,t){var n=t.self,r=e[0].insight_job,i=n.get("survey"),o;o=SM.Models.create("InsightJob",{options:r});o.taModel=n;i.insightJobs.addJob(o);i.insightJobs.poller.start()},tagUnprocessedResponses:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.categories.processedSentimentTag,n=e.responses.unProcessedResponsesList,r;if(t){r=[{action:"add",tag_id:String(t.tag_id)}];e.responses.applyProcessedCategory(n);e.responses.save(r,n,false,true);e.responses.unProcessedResponsesList=[]}},ownerShouldSeeUpgradeToPremium:function(){return this.get("survey").ownerPackageType()==="STANDARD"||this.get("survey").ownerPackageType()==="ADVANTAGE"},findTaDisplayData:function(e){var t=this.rollup,n=t,r=t.display.getDisplayData(n),i={sentiment_toggle:r.sentiment_toggle==="on"};return i[e]},isInStatsvcExperiment:function(){return this.rollup.question.survey.currentUser.statsvc_experiment},isHideAddTagsExpEnabled:function(){var e=SM.Utils.Experiments.isActiveTreatment("hide_add_tags_topic_categorization","hide_add_tags_enabled");return e}});SM.TaLearnMoreWCExpView=SM.Views.deepExtend(SM.DialogView,{__NAME:"TaLearnMoreWCExp",__templateID:"ta-upgrade-wc-exp-dialog-template",__defaults:{width:850,isModal:true,isWCExperiment:true},__init:function(){this.$el.on("click",".cancel-btn",{self:this},this._onCancel).on("click",".upgrade-btn",{self:this},this._onUpgrade)},_onCancel:function(e){e.preventDefault();e.data.self.close()},_onUpgrade:function(e){e.data.self.close()}});SM.SaLearnMoreView=SM.Views.deepExtend(SM.DialogView,{__NAME:"SaLearnMore",__templateID:"sa-upgrade-dialog-template",__defaults:{width:800,isModal:true},__init:function(){this.$el.on("click",".cancel-btn",{self:this},this._onCancel).on("click",".upgrade-btn",{self:this},this._onUpgrade)},_onCancel:function(e){e.preventDefault();e.data.self.close()},_onUpgrade:function(e){e.data.self.close()}});SM.SaOptInModal=SM.Views.deepExtend(SM.DialogView,{__NAME:"SaInsightsModal",__templateID:"sa-insights-modal-template",__model:"taModel",__defaults:{width:550,isModal:true},__init:function(){this.$el.on("click","[close-btn]",{self:this},this._closeDialog);this.$el.on("click","[opt-in-btn]",{self:this},this._onSaEtlProcessClick);_.bindAll(this,"_onSuccess")},_onSaEtlProcessClick:function(e){var t=e.data.self,n=$(e.target),r=n.attr("data-action")==="opt-in",i={opted_in:r,survey_id:SM.API.surveyID,user_id:SM.API.userID},o;e.preventDefault();SM.Bi.saOptInEditClick();o=SM.API.updateUser(i);$.when(o,{self:t,optInFlag:r}).done(t._onSuccess).fail(function(){SM.log("Unable to update insights user preferences")})},_onSuccess:function(e,t){var n=t.self,r=n.taModel,i=this.__settings.survey,o=t.optInFlag;if(r){i=r.get("survey");r.rollup.summary.saEnabled=true}i.owner.hasOptedInInsights=o;i.owner.insightsFlagTurnedOn=o;if(n.__onEnableClicked){n.__onEnableClicked()}n.close();if(r){r._trigger("enableInsights")}},_closeDialog:function(e){var t=e.data.self;e.preventDefault();t.close()}});SM.TAFABView=SM.Views.register({__NAME:"FABUpgradeView",__templateID:"fab-topbar-template",__model:"taModel",__init:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.taModel.get("survey");t.on("closeFAB",{self:this},this._closeFAB);this.$el.on("click","[upgrade-btn], [request-btn]",{self:this},this._onUpgradeBtnClick).on("click","[video-link]",{self:this},this._onShowDemoModal).on("click",".close-fab",{self:this},this._onCloseFABBtnClick)},__beforeRender:function(){var e=this.taModel.get("survey"),t=e.surveyAccessController.determineFeatureAccessType(SM.Constants.FEATURES.SENTIMENT_ANALYSIS);return{showUpgradeBtn:t===SM.Constants.ACCESS_TYPE.UPGRADE,showRequestBtn:t===SM.Constants.ACCESS_TYPE.REQUEST,requestAccessUrlForFeature:e.surveyAccessController.requestAccessUrlForFeature(SM.Constants.FEATURES.SENTIMENT_ANALYSIS[1])}},_onCloseFABBtnClick:function(e){var t=e.data.self;t._closeFAB(e)},_onUpgradeBtnClick:function(e){var t=e.data.self;t._closeFAB(e);window.location.href=e.currentTarget.href},_onShowDemoModal:function(e){var t=e.data.self,n=t.taModel.get("survey");e.preventDefault();SM.TAFABView.showDemoModal();n._trigger("closeFAB")},_closeFAB:function(e){var t=e.data.self;e.preventDefault();if(t.$el.is(":visible")){t.$el.hide();SM.TAFABView.setFABCookie()}}});SM.TAFABView.setFABCookie=function(){SM.API.setCookie("sa_show_fab",true,"365d",{path:"/","max-age":"31536000"})};SM.TAFABView.showDemoModal=function(){var t=SM.Views.create(SM.DialogView,{isModal:true,closeBtn:true,height:360,width:640,templateID:"sa-demo-modal-template"});function e(e){e.preventDefault();t.close()}t.$el.on("click",".w-foreground a.w-css-reset",e);t.$el.on("dialog.beforeClose",function(){t.$el.off("click")});t.open()};SM.TaUpgradeView=SM.Views.register({__NAME:"TAUpgradeNow",__templateID:"upgrade-now-topbar-template",__model:"taModel",__init:function(){this.$el.on("click",".close",{self:this},this._onCloseBtnClick)},__beforeRender:function(){return{powerCasualFeature:this.__settings.powerCasualFeature,showPowerCasualRequest:this.__settings.showSentimentAnalysisRequest||this.__settings.showWordCloudRequest}},_onCloseBtnClick:function(e){var t=e.data.self;e.preventDefault();t.$el.remove()}});SM.TaResponseShowTextView=SM.Views.register({__NAME:"TaResponseShowText",__templateID:"ta-response-summary-text-template",__model:"taModel",__init:function(){var e=this.taModel;this.$el.on("click","[ta-reset-results-btn]",{self:this},this._onClear);this.bindModel(e.responses.selection,"count.changed",{self:this},this._update);this.bindModel(e.responses,"failed.set",{self:this},this._onResponsesFailed);this.bindModel(e.responses,"loaded",{self:this},this._update);this.bindModel(e.responses,"appended",{self:this},this._update);this.bindModel(e.responses,"responseRemoved",{self:this},this._update);this.bindModel(e.categories,"category.edited",{self:this},this._update);this.bindModel(e,"isSearching.changed",{self:this},this._update)},__beforeRender:function(){var e,t=this.taModel,n=t.responses,r=n.selection,i=t.query,o=t.phrase,a=t.categories.hasFilter(),s=(i||o||a)&&!t.isSearching;e=r.isNone()?n.queryCount:r.count;if(!r.isNone()&&n.loadedCount<e){e=n.loadedCount}return{responsesFailed:n.failed,taQuery:i||o||null,isSearching:t.isSearching,hasFilter:a,categories:t.categories.getFilterList(),hasSelection:!r.isNone(),hasSingle:e===1,responsesCount:Globalize.format(e,"n0"),canClear:s}},_update:function(e){e.data.self.render()},_onClear:function(e){e.preventDefault();e.data.self.taModel.clearQuery()},_onResponsesFailed:function(e){if(e.value){e.data.self.render()}}});SM.TaResponseSearchFormView=SM.Views.register({__NAME:"TAResponseSearchFrom",__templateID:"ta-response-search-form-template",__model:"taModel",__init:function(){var e=this.taModel;this.bindModel(e,"searchDraft.changed",{self:this},this._onSearchChange);this.$el.on("paste","[ta-search-responses-input]",{self:this},this._onPaste).on("keyup","[ta-search-responses-input]",{self:this},this._onKeyup).on("submit","form",{self:this},this._onFormSubmit).on("click","[ta-search-responses-btn]",{self:this},this._onSearchBtnClick)},__beforeRender:function(){return{query:this.taModel.query}},__afterRender:function(){this.$el.find("[ta-search-tip]").popout()},_onSearchBtnClick:function(e){var t=e.data.self,n=t.taModel;e.preventDefault();if(n.validate("searchDraft",n.searchDraft).isValid){t.trigger({type:"search",query:n.searchDraft})}},_onKeyup:function(e){var t=e.data.self,n=$(e.target);t._isCurrentForm=true;t.taModel.set("searchDraft",n.val(),{notify:true})},_onPaste:function(e){var t=e.data.self,n=$(e.target);setTimeout(function(){t._isCurrentForm=true;t.taModel.set("searchDraft",n.val(),{notify:true})},0)},_onFormSubmit:function(e){var t=e.data.self;e.preventDefault();t.$el.find("[ta-search-responses-btn]").trigger("click")},_onSearchChange:function(e){var t=e.data.self,n=t.$el.find("[ta-search-responses-input]");if(!n.is(":focus")){n.val(e.value)}}});SM.TaCategoryFormView=SM.Views.register({__NAME:"TaCategoryForm",__templateID:"ta-category-form-template",__model:"category",__setup:function(){this.__defaults.saveText=Globalize.localize("SAVE")},__defaults:{isDisabled:true,ignoreEmptyName:false},__init:function(){this.$el.on("submit",{self:this},this._onFormSubmit).on("keyup","[category-name-text]",{self:this},this._onKeyup).on("paste","[category-name-text]",{self:this},this._onPaste).on("click","[color-swatch]",{self:this},this._onSwatchClick).on("click","[save-btn]",{self:this},this._onSaveClick);this.category.on("validated",{self:this},this._onNameValidation)},__destroy:function(){this.category.off("validated",this._onNameValidation)},__beforeRender:function(){var e,t=this.category,n=this._getSelectedColor();this._currentName=t.name;e=$.map(t._colorOptions,function(e){return{isSelected:e.hex===n,name:e.name,hex:e.hex}});return{maxLen:this.category.MAX_CATNAME_LEN,isReadOnly:$(".analyze-container.read-only").length>0,name:t.name,colors:e,saveText:this.__settings.saveText,isDisabled:this.__settings.isDisabled,isEdit:!t.isNew}},__setters:{isDisabled:function(e,t){var n=e.$el.find("[save-btn]");if(t){n.addClass("disabled")}else{n.removeClass("disabled")}e.__settings.isDisabled=t},isSaving:function(e,t){e.__settings.isSaving=t;e.render()}},_isDirty:function(){var e=this.category,t=this._currentName,n=t!==e.name;if(!e.isNew){return n||this._getSelectedColor()!==e.color}return n},_testDirty:function(){if(this._dirty||this._isDirty()){this.set("isDisabled",false)}else if(!this._isDirty()&&!this._dirty){this.set("isDisabled",true)}},markDirty:function(e){this._dirty=e;this._testDirty()},_dirty:false,_selectedColor:"",_onSwatchClick:function(e){var t=e.data.self,n=$(e.target);e.preventDefault();if(n.closest("ul").hasClass("disabled")){return}t._selectedColor=n.attr("color-hex");t.$el.find("[color-swatch]").removeClass("selected");n.addClass("selected");t._testDirty()},_onSaveClick:function(e){var t=e.data.self,n,r;e.preventDefault();n=t._currentName;r=t._getSelectedColor();t._removeError();if(t.__settings.isDisabled){return}if(t.__settings.ignoreEmptyName&&!t._currentName||t.category.validate("name",n).isValid){t.trigger({type:"save",color:r,name:n,ID:t.category.ID})}if(!t.category.isNew){SM.Bi.taTagEdit()}},_onFormSubmit:function(e){var t=e.data.self;e.preventDefault();t.$el.find("[save-btn]").trigger("click")},_onNameValidation:function(e){var t=e.data.self,n=e.validations.invalids.name,r=SM.Template.renderHTML("ta-category-name-error-template",{isEmpty:n.exception==="empty",isTooLong:n.exception==="maxlength",isDuplicate:n.exception==="duplicate",hasCharError:n.exception==="htmlTag"});t.$el.prepend(r)},_onKeyup:function(e){var t=e.data.self;t._currentName=SM.String.trim(t.$el.find("[category-name-text]").val());if(e.which!==SM.KeyCodes.ENTER&&e.which!==SM.KeyCodes.NUMPAD_ENTER){t._removeError();t._testDirty()}},_onPaste:function(e){var t=e.data.self;setTimeout(function(){t._currentName=SM.String.trim(t.$el.find("[category-name-text]").val());t._removeError();t._testDirty()},0)},_removeError:function(){this.$el.find("[category-error-msg]").remove()},_getSelectedColor:function(){return this._selectedColor||this.category.color}});SM.TaCagetoriesAppliedView=SM.Views.register({__NAME:"TaCategoriesApplied",__templateID:"ta-categories-chkbox-list-template",__model:"categories",__init:function(){var e=this.categories;this.selection=SM.Models.create("AppliedCategoriesSelection",{responseID:this.__settings.responseID});this.selection.load(e);this.$el.on("change","[category-item-chkbx]",{self:this},this._onStateChange).on("click",{self:this},this._onListItemClick)},__beforeRender:function(){var e=this.categories.sortedUserTagList;return{isReadOnly:$(".analyze-container.read-only").length>0,categories:e.slice(0,e.length-1)}},__afterRender:function(){var r=this.categories.sortedUserTagList,i=this.__settings.responseID;this.$el.find("[category-item-chkbx]").each(function(e,t){var n=r[e].getApplicationState(i);if(n==="indeterminate"){t.indeterminate=true}else{t.checked=n==="checked"}})},_onStateChange:function(e){var t=e.data.self,n=$(e.target),r=n.closest("[category-id]"),i=r.attr("category-id");t.selection.update(i,e.target.checked?"checked":"unchecked");t.trigger("selectionChanged")},_onListItemClick:function(e){var t=$(e.target).closest("[category-id]").find("[category-item-chkbx]"),n=t.get(0).indeterminate;if(t.prop("disabled")===true){return}if(n){t.get(0).indeterminate=false;t.prop("checked",true)}else{t.prop("checked",!t.prop("checked"))}t.trigger("change").trigger("focus")}});SM.TaCategorizeMenuView=SM.Views.deepExtend(SM.BaseMenuView,{__NAME:"TaCategorizeMenu",__templateID:"ta-categorize-menu-template",__model:"categories",__init:function(){this.$el.on("TaCategoryForm.save",{self:this},this._onApplyCategories).on("TaCategoriesApplied.selectionChanged",{self:this},this._onSelectionChange)},__afterRender:function(){var e=this.categories,t=e.createModel();if(e.count()>0){this.categoriesView=SM.Views.create(SM.TaCagetoriesAppliedView,{model:e,responseID:this.__settings.responseID});this.el.appendChild(this.categoriesView.el)}this.formView=SM.Views.create(SM.TaCategoryFormView,{model:t,saveText:Globalize.localize("APPLY"),ignoreEmptyName:true});this.el.appendChild(this.formView.el)},_onSelectionChange:function(e){var t=e.data.self,n=t.categoriesView;t.formView.markDirty(n.selection.isDirty())},_onApplyCategories:function(e){var t=e.data.self;e.selection=t.categoriesView&&t.categoriesView.selection.dump()}});SM.CategorizeMenu=SM.Widgets.deepExtend(SM.BaseMenu,{__NAME:"categorizeMenu",__onMenuInit:function(){this.get("menuView").$el.on("TaCategoryForm.save",{self:this},this._onApplyCategories).on("click","[cancel-btn]",{self:this},this._onCancelCategories)},__onBeforeMenuOpen:function(){SM.BaseMenu.__onBeforeMenuOpen.call(this);this.get("menuView").render()},_menuView:"TaCategorizeMenuView",_onApplyCategories:function(e){var t=e.data.self;e.preventDefault();t.close();t.trigger({type:"apply",responseID:t.__settings.responseID,selection:e.selection,name:e.name,color:e.color})},_onCancelCategories:function(e){e.preventDefault();e.data.self.close()}});SM.TaCategoryFilterListView=SM.Views.register({__NAME:"TaCagetoryFilterList",__templateID:"ta-categories-chkbox-list-template",__model:"categories",__init:function(){var e=this.categories,t;if(!e.filterSelection){t=SM.Models.create("FilterCategoriesSelection");e.loadFilterSelection(t)}e.filterSelection.loadSelection();this.$el.on("change","[category-item-chkbx]",{self:this},this._onStateChange).on("click",{self:this},this._onListItemClick)},__beforeRender:function(){return{categories:this.categories.sortedUserTagList}},__afterRender:function(){var n=this.categories.sortedUserTagList;this.$el.find("[category-item-chkbx]").each(function(e,t){t.checked=n[e].isFiltering()})},_onStateChange:function(e){var t=e.data.self,n=$(e.target),r=n.closest("[category-id]"),i=r.attr("category-id");t.categories.filterSelection.update(i,e.target.checked)},_onListItemClick:function(e){var t=$(e.target),n=t.closest("[category-id]"),r=n.find("[category-item-chkbx]");r.prop("checked",!r.prop("checked")).trigger("change").trigger("focus")}});SM.TaFilterMenuView=SM.Views.deepExtend(SM.BaseMenuView,{__NAME:"TaFilterMenu",__templateID:"ta-filter-menu-template",__defaults:{isDisabled:true},__model:"categories",__init:function(){var e=this.categories;e.filterSelection.on("selection.changed",{self:this},this._onSelectionChange);this.$el.on("click","[clear-btn]",{self:this},this._onClearClick)},__destroy:function(){var e=this.categories;e.filterSelection.off("selection.changed",this._onSelectionChange)},__beforeRender:function(){return{isDisabled:this.__settings.isDisabled,hasFilter:this.categories.hasFilter()}},__afterRender:function(){var e=this.categories,t;t=SM.Views.create(SM.TaCategoryFilterListView,{model:e});this.$el.prepend(t.el)},_onClearClick:function(e){var t=e.data.self;e.preventDefault();t.categories.filterSelection.clear();t.$el.find("[clear-btn]").addClass("disabled");t.$el.find("input[type=checkbox]").prop("checked",false)},_onSelectionChange:function(e){var t=e.data.self,n=t.$el.find("[clear-btn]"),r=t.$el.find("[save-btn]");if(e.isDirty){r.removeClass("disabled")}else{r.addClass("disabled")}if(!t.categories.filterSelection.isEmpty()){n.removeClass("disabled")}}});SM.TaCategoriesShowTextView=SM.Views.register({__NAME:"TaCategoriesShowText",__templateID:"ta-categories-summary-text-template",__model:"categories",__init:function(){var e=this.categories.taModel;e.on("category.deleted",{self:this},this._onChangeCount);e.on("category.added",{self:this},this._onChangeCount)},__destroy:function(){var e=this.categories.taModel;e.off("category.deleted",this._onChangeCount);e.off("category.added",this._onChangeCount)},__beforeRender:function(){var e=this.categories;return{hasCategories:!e.isEmpty(),hasMany:e.hasMany(),hasError:e.failed,count:Globalize.format(e.noSentimentsCount(),"n0")}},_onChangeCount:function(e){var t=e.data.self;t.render()}});SM.TaCategoriesToolbarView=SM.Views.register({__NAME:"TaCategoriesToolbar",__templateID:"ta-categories-toolbar-template",__model:"taModel",__beforeRender:function(){return{isDisabled:this.taModel.categories.failed}},__afterRender:function(){var e,t;t=SM.Views.create(SM.TaResponseSearchFormView,{model:this.taModel});e=SM.Views.create(SM.TaCategoriesShowTextView,{model:this.taModel.categories});this.$el.find(".responses-toolbar").prepend(t.el);this.$el.append(e.el)}});SM.TaCategoryItemView=SM.Views.register({__NAME:"TaCategoryItem",__templateID:"ta-category-item-template",__model:"category",__defaults:{mode:"view"},__init:function(){this.category.on("responseCount.changed",{self:this},this._onCountChange)},__destroy:function(){this.category.off("responseCount.changed",this._onCountChange)},__beforeRender:function(){var e=this.category;return{isReadOnly:$(".analyze-container.read-only").length>0,deleteMode:this._isDeleteMode(),viewMode:this._isViewMode(),editMode:this._isEditMode(),isSaving:this.__settings.isSaving,isUncategorized:e.isUncategorized,name:e.name,color:e.color,ID:e.ID,isSentiment:e.isSentiment,count:e.responseCount,localizedPercent:e.get("localizedPercent"),percent:e.get("percent")}},__afterRender:function(){var e;if(this._isEditMode()){this.$el.on("leave",{self:this},this._onLeaveEdit).on("keyup",{self:this},this._onKeyup);e=SM.Views.create(SM.TaCategoryFormView,{model:this.category});this.el.appendChild(e.el);this.$el.find("input").trigger("focus")}},__setters:{mode:function(e,t){e.__settings.mode=t;e.render()}},modes:{VIEW:"view",DELETE:"delete",EDIT:"edit"},_cancel:function(){if(this.category.isNew){this.category.off("isLoading.changed",this._onLoading)}this.$el.find("[cancel-btn]").trigger("click")},_isDeleteMode:function(){return this.__settings.mode===this.modes.DELETE},_isViewMode:function(){return this.__settings.mode===this.modes.VIEW},_isEditMode:function(){return this.__settings.mode===this.modes.EDIT},_onLeaveEdit:function(e){var t=e.data.self;t.$el.off("leave");t._cancel()},_onKeyup:function(e){var t=e.data.self;if(e.which===SM.KeyCodes.ESCAPE){t.$el.off("keyup");t._cancel()}},_onCountChange:function(e){var t=e.data.self;t.render()}});SM.TaCategoriesListView=SM.Views.register({__NAME:"TaCategoriesListView",__templateID:"ta-categories-list-template",__model:"categories",__init:function(){this.categories.taModel.on("category.added",{self:this},this._onAdd);this.$el.on("TaCategoryForm.save",{self:this},this._onSave).on("click","[confirm-delete-btn]",{self:this},this._onConfirmDeleteClick).on("click","[delete-btn]",{self:this},this._onDeleteClick).on("click","[cancel-btn]",{self:this},this._onCancelClick).on("click","[edit-btn]",{self:this},this._onEditClick)},__destroy:function(){this.categories.taModel.off("category.added",this._onAdd)},__afterRender:function(){var e=this.categories,t,n;if(e.failed){t=SM.Template.render("ta-categories-error-template",{isServiceError:true});this.$el.html(t)}else{n=$.map(e.sortedUserTagList,function(e){return SM.Views.create(SM.TaCategoryItemView,{model:e}).el});this.$el.append(n)}},_onConfirmDeleteClick:function(e){var t=e.data.self,n;e.preventDefault();n=t._getViewData(e.target);n.model.kill();n.view.$el.remove();SM.Bi.taTagDelete()},_onDeleteClick:function(e){var t=e.data.self,n;e.preventDefault();if(!_.isUndefined($(e.target).attr("full-access-only"))){return}n=t._getViewData(e.target);n.view.set("mode",n.view.modes.DELETE)},_onCancelClick:function(e){var t=e.data.self,n;e.preventDefault();n=t._getViewData(e.target);if(n.model.isNew){n.view.$el.remove()}else{n.view.set("mode",n.view.modes.VIEW)}},_onEditClick:function(e){var t=e.data.self,n;e.preventDefault();if(!_.isUndefined($(e.target).attr("full-access-only"))){return}n=t._getViewData(e.target);n.view.set("mode",n.view.modes.EDIT)},_onSave:function(e){var t=e.data.self,n;e.preventDefault();n=t._getViewData(e.target);if(n.model.isNew){n.model.color=e.color;n.model.name=e.name;n.view.set("isSaving",true);n.view.set("mode",n.view.modes.VIEW);n.model.save()}else{n.model.edit({color:e.color,name:e.name});n.view.set("mode",n.view.modes.VIEW);t.categories.addTagToQuestion(n.model,false)}},createNewCategory:function(e){var t=SM.Views.create(SM.TaCategoryItemView,{model:e,mode:"edit",isNew:true});this.$el.prepend(t.el);this.$el.find("input").trigger("focus")},_getViewData:function(e){var t=$(e).closest("[category-id]"),n=t.data("TaCategoryItem");return{view:n,model:n.category}},_onAdd:function(e){e.data.self.render()}});SM.TaCategoriesPanelView=SM.Views.extend({__NAME:"TaCategoriesPanel",__templateID:"ta-categories-panel-template",__model:"taModel",__init:function(){this.$el.on("click","[ta-new-category-btn]",{self:this},this._onCreateClick)},__afterRender:function(){var e,t=this.taModel;e=SM.Views.create(SM.TaCategoriesToolbarView,{model:t});this._listView=SM.Views.create(SM.TaCategoriesListView,{model:this.taModel.categories});this.$el.append(e.el);this.$el.append(this._listView.el)},_onCreateClick:function(e){var t=e.data.self,n;e.preventDefault();if(!t.taModel.categories.failed){n=t.taModel.categories.createModel();t._listView.createNewCategory(n)}SM.Bi.taCreateTagsButtonClick()}});SM.TaResponseBtnMenuView=SM.Views.register({__NAME:"TaResponseBtnMenu",__templateID:"ta-response-btn-menu-template",__model:"taModel",__init:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.taModel,n=t.rollup,r=t.responses.selection,i=t.get("survey"),o=i.surveyAccessController.determineFeatureAccessType(SM.Constants.FEATURES.TEXT_ANALYSIS),a=o===SM.Constants.ACCESS_TYPE.REQUEST||o===SM.Constants.ACCESS_TYPE.UPGRADE;e.bindModel(n.display,"toggleSentiment",{self:e},e._updateSentimentView);if(t.isTAEnabled()&&!i.isReadOnly()&&!a){r.on("count.changed",{self:e},e._enableCategorizeMenu);t.on("category.deleted",{self:e},e._enableFilterMenu);t.on("category.added",{self:e},e._enableFilterMenu);t.on("etlProcessing.changed",{self:e},e._updateSentimentFilter);e.$el.on("categorizeMenu.apply",{self:e},e._onApplyCategories).on("menu.menuInit","[filter-menu-btn]",{self:e},e._onFilterMenuInit).on("menu.beforeOpen","[filter-menu-btn]",{self:e},e._onFilterBeforeOpen).on("menu.afterOpen","[filter-menu-btn]",{self:e},e._onFilterAfterOpen);e.$el.on("menu.menuInit","[sentiment-filter-menu-btn]",{self:e},e._onSentimentMenuInit).on("menu.beforeOpen","[sentiment-filter-menu-btn]",{self:e},e._onSentimentBeforeOpen).on("menu.afterOpen","[sentiment-filter-menu-btn]",{self:e},e._onSentimentAfterOpen)}},__destroy:function(){var e=this.taModel,t=e.responses.selection;if(e.isTAEnabled()){t.off("count.changed",this._enableCategorizeMenu);e.off("category.deleted",this._enableFilterMenu);e.off("category.added",this._enableFilterMenu)}},__beforeRender:function(){var e=this.taModel,t=e.rollup,n=t.question.survey,r=!e.isEtlProcessing(),i=n.owner.hasOptedInInsights,o=n.owner.sentimentAnalysisFF,a=e.responses,s=e.findTaDisplayData("sentiment_toggle"),l=t.summary.saEnabled,c=t.summary.saEligible,p=l&&c&&i&&o,d=a.selection,h=e.categories.isEmpty()||e.filterCount===0||e.categories.failed,f=!e.isTAEnabled()||d.get("count")===0||e.categories.failed,m=e.get("survey").isReadOnly(),u=n.surveyAccessController.determineFeatureAccessType(SM.Constants.FEATURES.TEXT_ANALYSIS),g=u===SM.Constants.ACCESS_TYPE.UPGRADE||u===SM.Constants.ACCESS_TYPE.REQUEST;return{hasSelectAll:e.isTAEnabled()&&!e.categories.failed,isCategorizeDisabled:f,hasSentimentView:p&&r,isFilterDisabled:h||m||g,saToggled:s}},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.taModel.categories;if(e.taModel.isTAEnabled()){e.$el.find("[categorize-menu-btn]").categorizeMenu({model:t});e._filterMenu=e.$el.find("[filter-menu-btn]").menu({menuView:"TaFilterMenuView",model:t}).data("menu");e._sentimentMenu=e.$el.find("[sentiment-filter-menu-btn]").menu({menuView:"SaFilterMenuView",model:t}).data("menu")}},_updateSentimentView:function(e){var t=e.data.self;e.preventDefault();t.$el.find("[sentiment-filter-menu-btn]").toggleClass("on")},_updateSentimentFilter:function(e){var t=e.data.self,n=t.taModel;if(!n.isEtlProcessing()){e.data.self.render()}},_enableCategorizeMenu:function(e){var t=e.data.self,n=t.$el.find("[categorize-menu-btn]");if(t.taModel.responses.selection.isNone()){n.addClass("disabled")}else{n.removeClass("disabled")}},_enableFilterMenu:function(e){var t=e.data.self,n=t.$el.find("[filter-menu-btn]");if(t.taModel.categories.isEmpty()){n.addClass("disabled")}else{n.removeClass("disabled")}},_onApplyCategories:function(e){var t=e.data.self,n;n=t.taModel.responses.applyCategories(e.selection,{label:e.name,color:e.color});t.taModel.responses.save(n.diff,n.responseIDs,n.except)},_onFilterBeforeOpen:function(e){var t=e.menu.get("menuView");t.render()},_onFilterAfterOpen:function(e){var t=e.menu.get("menuView");t.$el.find("input:first").trigger("focus")},_onFilterMenuInit:function(e){var t=e.data.self,n=e.menu.get("menuView");n.$el.on("click","[save-btn]",{menu:e.menu,self:t},t._onApplyFilter).on("click","[cancel-btn]",{menu:e.menu,self:t},t._onCancelFilter)},_onSentimentBeforeOpen:function(e){var t=e.menu.get("menuView");t.render()},_onSentimentAfterOpen:function(e){var t=e.menu.get("menuView");t.$el.find("input:first").trigger("focus")},_onSentimentMenuInit:function(e){var t=e.data.self,n=e.menu.get("menuView");n.$el.on("click","[save-btn]",{menu:e.menu,self:t},t._onApplySAFilter).on("click","[cancel-btn]",{menu:e.menu,self:t},t._onCancelFilter)},_onApplyFilter:function(e){var t=e.data.self,n=t.taModel.categories.filterSelection;e.preventDefault();if(n.isDirty()){n.apply();e.data.menu.close()}},_onApplySAFilter:function(e){var t=e.data.self,n=t.taModel.categories.filterSelection;e.preventDefault();if(n.isDirty()){n.apply();e.data.menu.close()}SM.Bi.saFilterQLevelClick()},_onCancelFilter:function(e){e.preventDefault();e.data.menu.close()}});SM.TaResponseSelectAllView=SM.Views.register({__NAME:"TaResponseSelectAllView",__templateID:"ta-select-all-template",__model:"taModel",__init:function(){var e=this.taModel,t=e.responses,n=t.selection;t.on("loaded",{self:this},this._onResponsesLoaded);e.on("isSearching.changed",{self:this},this._onSearching);n.on("count.changed",{self:this},this._onCountChange);this.$el.on("click",{self:this},this._onSelectAllClick)},__destroy:function(){var e=this.taModel,t=e.responses,n=t.selection;n.off("count.changed",this._onCountChange);t.off("loaded",this._onResponsesLoaded)},__beforeRender:function(){return{selectAllSelectId:this.taModel.__uid}},__afterRender:function(){var e=this.taModel.responses;this.$el.find("[select-all-responses-chkbx]").prop("checked",e.selection.isAll()).prop("disabled",e.queryCount===0||this.taModel.isSearching).prop("indeterminate",e.selection.isPartial())},_onSelectAllClick:function(e){var t=e.data.self,n=t.taModel.responses,r=t.$el.find("[select-all-responses-chkbx]"),i=r.prop("checked");if(i){n.selection.selectAll()}else{n.selection.clear()}},_onCountChange:function(e){e.data.self.render()},_onResponsesLoaded:function(e){e.data.self.render()},_onSearching:function(e){e.data.self.render()}});SM.TaResponseToolbarView=SM.Views.register({__NAME:"TAResponseTopBar",__templateID:"ta-response-toolbar-template",__model:"taModel",__afterRender:function(){var e=this.taModel,t=e.get("survey"),n=e.rollup.question,r,i,o,a,s=!e.categories.failed,l=this.$el.find(".responses-toolbar"),u={model:e};o=SM.Views.create(SM.TaResponseSearchFormView,u);l.append(o.el);if(s||n.isEssay()){a=SM.Views.create(SM.TaResponseSelectAllView,u);l.append(a.el)}if(n.isEssay()&&!t.isReadOnly()){i=SM.Views.create(SM.TaResponseBtnBulkActionMenuView,u)}else{i=SM.Views.create(SM.TaResponseBtnMenuView,u)}l.append(i.el);r=SM.Views.create(SM.TaResponseShowTextView,u);this.$el.append(r.el)}});SM.TaLoadMoreResponsesView=SM.Views.register({__NAME:"TaLoadMoreResponsesView",__model:"responses",__templateID:"ta-load-more-responses-template",__defaults:{fetchMoreFailed:false,fetchFailErrorID:null},__init:function(){this.$el.on(SM.Event.CLICK,"[ta-responses-try-again-btn]",{self:this},this._onTryAgainClicked);this.responses.on("fetchMoreResponses.failed",{self:this},this._onFetchFail)},__destroy:function(){this.responses.off("fetchMoreResponses.failed",this._onFetchFail)},__beforeRender:function(){return{id:this.get("ID"),failed:this.get("fetchMoreFailed"),errorID:this.get("fetchFailErrorID")}},_onFetchFail:function(e){var t=e.data.self;t.set("fetchMoreFailed",true);t.set("fetchFailErrorID",t.responses.fetchFailErrorID);t.render()},_onTryAgainClicked:function(e){var t=e.data.self;e.preventDefault();t.set("fetchMoreFailed",false);t.set("fetchFailErrorID",null);t.render();t.responses.taModel.fetchMoreResponses()}});SM.TaResponseItemView=SM.Views.register({__NAME:"TaResponseItem",__templateID:"ta-response-item-template",__model:"response",__init:function(){this.bindModel(this.response,"categoryIDs.changed",{self:this},this._onCategoryIDsChange);this.bindModel(this.response.responses.taModel.categories,"category.edited",{self:this},this._onCategoryEdited);this.$el.on(SM.Event.CLICK,"[edit-sentiment]",{self:this},this._onEditSentimentClick);this.response.responses.taModel.on("etlProcessing.changed",{self:this},this._onETLProcessing);this.bindModel(this.response,"category.removed",{self:this},this._onCategoryRemoved);this.$el.on(SM.Event.CLICK,"a.ta-response-item-categorize-link",{self:this},this._onAddTagsClick)},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.response,n=t.responses.taModel,r=n.get("survey"),i=r.owner.sentimentAnalysisFF&&!SM.SharedAnalyzeApp,o=r.saEnabled,a=n.findTaDisplayData("sentiment_toggle"),s=r.isReadOnlyUser,l=r.surveyAccessController.determineFeatureAccessType(SM.Constants.FEATURES.TEXT_ANALYSIS),u=l===SM.Constants.ACCESS_TYPE.UPGRADE||l===SM.Constants.ACCESS_TYPE.REQUEST;return{ID:t.ID,categories:t.categories.list,text:t.text,createDate:t.dateStr,respondentUrl:t.respondentUrl,isChecked:t.isSelected(),noTA:!n.isTAEnabled()||s||u,hideAddTagsEnabled:n.isHideAddTagsExpEnabled(),canCategorize:!n.categories.failed,actionsEnabled:e._areActionsEnabled(),showSentiment:o&&i,sentimentType:t.sentimentType,sentimentCategoryID:t.sentimentCategoryID,etlProcessing:n.isEtlProcessing(),saToggled:a}},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=this.response.responses.taModel;if(t.isTAEnabled()&&!t.categories.failed){this.$el.find("[categorize-menu-btn]").categorizeMenu({model:t.categories,responseID:this.response.ID,parentEl:this.__settings.parentEl})}if(!SM.Cookies.get("sa_show_popout")){e.$el.find(".analyze-sa-popout").popout({tipSideX:"left",tipSideY:"bottom",collision:"flip flip",autoClose:true,tipOrientation:"topbottom"})}},_onEditSentimentClick:function(e){var t=e.data.self,c=$(e.target),n=c.attr("data-action"),p=t.$el.find("[sentiment-category-id]"),r=p.attr("sentiment-category-id"),i=t.response,o=i.responseCategoryMap,a=i.responses.taModel,d=a.categories.sentimentsMap,s=a.get("survey"),h=s.owner.isSaPackageAvailable,f=s.owner.hasOptedInInsights,m={sm_positive:"positive",sm_neutral:"neutral",sm_negative:"negative",sm_uncategorized:"undetected",sm_processed_q:"undetected"},g,l,u;if(h&&f){if(r==="-2"){delete o["-2"];i.categoryIDs=_.filter(i.categoryIDs,function(e){if(e!=="-2"){return e}});l=true}else{o[r]="unchecked";l=false}o[d[n]]="checked";g=i.applyCategories(o,{label:"",color:"00BF6F"});u=t._makeSentimentParams(m[n],m[a.categories.map[r].name]);if(r!=="-2"){SM.Bi.saEditSentimentClick(u.respondent_id,u.question_id,u.option_id,u.new_sa,u.previous_sa)}i.save(g,l,u)}else{SM.Views.create(SM.SaLearnMoreView).open()}},__destroy:function(){this.__unsubscribe("popout.opened",this._onPopoutOpened)},_onCategoryIDsChange:function(e){var t=e.data.self;if(t.response.get("isInFilter")){t.render()}else{t.$el.remove()}},_onCategoryEdited:function(e){var t=e.data.self;if(t.response.categories.map[e.category.ID]){t.render()}},_onCategoryRemoved:function(e){var t=e.data.self;t.render()},_onETLProcessing:function(e){e.data.self.render()},_areActionsEnabled:function(){return!SM.App.isSharingApp()},_makeSentimentParams:function(e,t){var n=this.response,r=n.responses.taModel;return{respondent_id:n.respondentID,question_id:r.rollup.questionID,option_id:r.optionID,previous_sa:t,new_sa:e}},_onAddTagsClick:function(e){e.preventDefault();return!$(e.target).hasClass("disabled")}});SM.TaResponseListView=SM.Views.register({__NAME:"TaResponseList",__templateID:"ta-response-list-template",__model:"responses",__create:function(){this.set("lazyLoaderID",this.__NAME+"loader"+this.__uid)},__init:function(){var e=this.responses,t=e.taModel,n=t.rollup;this.$el.on("infiniteScroll.reachedEnd",{self:this},this._requestMoreResponses).on("multiselect.applied",{self:this},this._onMultiSelectApplied).on("change","[response-item-chkbx]",{self:this},this._onItemSelected);e.on("appended",{self:this},this._onResponsesAppended);e.on("removePopouts",{self:this},this._removeResponseListPopouts);e.on("loaded",{self:this},this._onResponsesLoaded);e.on("failed.set",{self:this},this._onResponsesFailed);e.selection.on("count.changed",{self:this},this._onCountChange);t.on("isSearching.changed",{self:this},this._onIsSearching);if(t.isTAEnabled()){this.$el.on("categorizeMenu.apply","[categorize-menu-btn]",{self:this},this._onApplyCategories)}this.bindModel(n.display,"toggleSentiment",{self:this},this._updateSentimentView);this._infiniteScroll=this.$el.infiniteScroll({markerID:this.get("lazyLoaderID")}).data("infiniteScroll");this.$el.multiselect({checkboxSelector:"input[response-item-chkbx]"})},__destroy:function(){this.responses.off("appended",this._onResponsesAppended);this.responses.selection.off("count.changed",this._onCountChange);this.responses.taModel.off("isSearching.changed",this._onIsSearching);this.responses.off("failed.set",this._onResponsesFailed);this.responses.off("loaded",this._onResponsesLoaded)},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=this.responses,n=t.taModel,r=false,i,o,a;if(t.failed){o=SM.Template.render("ta-responses-error-template",{isServiceError:true});e.$el.html(o)}else if(t.taModel.isSearching){o=SM.Template.render("qtext-search-spinner-template");e.$el.html(o)}else{if(!t.isEmpty()){a=e._createListFragment(t.list);e.$el.append(a);e.__subscribe("popout.opened",e._onPopoutOpened,{self:e})}if(e._hasUnloadedResponses()){i=SM.Views.create(SM.TaLoadMoreResponsesView,{model:e.responses,ID:e.get("lazyLoaderID")});e.$el.append(i.el)}if(!_.isEmpty(t.unProcessedResponsesList)&&r){n.tagUnprocessedResponses()}}},_removeResponseListPopouts:function(e){var t=e.data.self;SM.API.setCookie("sa_show_popout",true,"365d",{path:"/","max-age":"31536000"});t.render()},_updateSentimentView:function(e){e.preventDefault();e.data.self.$el.find(".sa-emoji-inline, .sa-edit-emoji-tab, .sa-current, .sa-inline-date").toggleClass("on")},_createListFragment:function(e){var r=document.createDocumentFragment(),i=_____WB$wombat$check$this$function_____(this);$.each(e,function(e,t){var n=SM.Views.create(SM.TaResponseItemView,{model:t,parentEl:i.el}).el;r.appendChild(n)});return r},_requestMoreResponses:function(e){var t=e.data.self;t.responses.taModel.fetchMoreResponses();e.stopPropagation()},_hasUnloadedResponses:function(){return this.responses.loadedCount<this.responses.queryCount+this.responses.removedCount},_updateResponseSelection:function(e){var t=$(e),n=this.responses.selection,r=e.checked,i=t.closest("[data-response-id]"),o=i.attr("data-response-id");if(r){n.add(o)}else{n.remove(o)}},_onMultiSelectApplied:function(e){var t=e.data.self;e.$checkboxes.each(function(){t._updateResponseSelection(this)})},_onItemSelected:function(e){var t=e.data.self;if(!e.isEditingAll){t._updateResponseSelection(e.target)}},_onCountChange:function(e){var t=e.data.self;if(t.responses.selection.isAll()){t.$el.find("input[response-item-chkbx]").each(function(){this.checked=true});t.$el.data("multiselect").reset()}else if(t.responses.selection.isNone()){t.$el.find("input[response-item-chkbx]").each(function(){this.checked=false});t.$el.data("multiselect").reset()}},_onIsSearching:function(e){var t=e.data.self;t._infiniteScroll.set("isActive",false);t.render()},_onResponsesLoaded:function(e){var t=e.data.self;t.render();if(!t._hasUnloadedResponses()){t._infiniteScroll.removeMarker()}t._infiniteScroll.set("isActive",true)},_onResponsesFailed:function(e){var t=e.data.self;if(e.value){t.render()}},_onResponsesAppended:function(e){var t=e.data.self,n=t._createListFragment(e.respondents);t.$el.find("[data-response-id]").last().after(n);if(!t._hasUnloadedResponses()){t._infiniteScroll.removeMarker()}t._infiniteScroll.set("isActive",true)},_onApplyCategories:function(e){var t=e.data.self,n,r=t.responses.map[e.responseID];n=r.applyCategories(e.selection,{label:e.name,color:e.color});r.save(n)},_onPopoutOpened:function(e){var t=e.data.self,n=$(".popout.open");if(n.find(".sa-got-it-btn").length){n.on(SM.Event.CLICK,".sa-got-it-btn, .close",{self:t},t._setSaPopoutCookie)}},_setSaPopoutCookie:function(e){var t=e.data.self,n=$(".popout.open");e.preventDefault();e.stopPropagation();if(!SM.Cookies.get("sa_show_popout")){n.removeClass("open");SM.API.setCookie("sa_show_popout",true,"365d",{path:"/","max-age":"31536000"});SM.Bi.saEditEduTip()}t.render()}});SM.TaResponsesPanelView=SM.Views.extend({__NAME:"TAResponsePanel",__templateID:"ta-response-panel-template",__model:"taModel",__create:function(){var e=_____WB$wombat$check$this$function_____(this);e.survey=e.taModel.get("survey")},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.taModel.get("survey");if(t.language.code===SM.Constants.LANGUAGE.ENGLISH){var n=e.taModel.rollup,r=t.owner.sentimentAnalysisFF,c=n.summary.saEligible,p=t.owner.isSaPackageAvailable,d=r&&c&&p,h=e.taModel.findTaDisplayData("sentiment_toggle"),i=e.survey.isCurrentUserAlsoOwner(),o,a,s;s=t.surveyAccessController.determineFeatureAccessType(SM.Constants.FEATURES.SENTIMENT_ANALYSIS);if(!SM.App.isSharingApp()&&!e.survey.isReadOnly()&&i){if(e._shouldFABView()||t.owner.packageType==="BASIC"){o=SM.Views.create(SM.TAFABView,{model:e.taModel});e.$el.append(o.el)}}if(!SM.App.isSharingApp()){if(d&&(i||h)){a=SM.Views.create(SM.SaGraphView,{model:this.taModel});e.$el.append(a.$el)}else if(s===SM.Constants.ACCESS_TYPE.REQUEST){o=SM.Views.create(SM.TaUpgradeView,{model:e.taModel,showSentimentAnalysisRequest:true,powerCasualFeature:SM.Constants.FEATURES.SENTIMENT_ANALYSIS[0]});e.$el.append(o.el)}}}if(!SM.App.isSharingApp()){var l;l=SM.Views.create(SM.TaResponseToolbarView,{model:e.taModel});e.$el.append(l.el)}var u;u=SM.Views.create(SM.TaResponseListView,{model:e.taModel.responses});e.$el.append(u.el)},_shouldFABView:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.taModel,n=t.rollup,r=t.get("survey"),i=n.summary.saEligible,o=SM.Cookies.get("sa_show_fab"),a=n.summary.saEnabled,s=r.owner.isSaPackageAvailable,l=!s&&i&&!a&&!o;return l}});SM.TaAnalysisShowTextView=SM.Views.register({__NAME:"TaAnalysisShowText",__templateID:"ta-analysis-summary-text-template",__model:"phrases",__init:function(){this.bindModel(this.phrases,"TaAnalysisInProgress.changed",{self:this},this._onAnalysisInProgress)},__beforeRender:function(){var e=this.phrases,t=e.list.length;return{hasAny:t>0,hasOne:t===1,count:t,hasError:e.failed,inProgress:e.inProgress}},_onAnalysisInProgress:function(e){var t=e.data.self;t.render()}});SM.TaAnalysisToolbarView=SM.Views.register({__NAME:"TaAnalysisToolbar",__templateID:"ta-analysis-toolbar-template",__model:"taModel",__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.taModel.phrases.on("viewMode.changed",{self:e},e._onViewModeChanged);e.$el.on(SM.Event.CLICK,"[ta-phrase-mode-tab]",{self:e},e._onTabClick)},__destroy:function(){this.taModel.phrases.off("viewMode.changed",this._onViewModeChanged)},__beforeRender:function(){var e=this.taModel.phrases.viewModes;return{cloudTab:e.CLOUD,listTab:e.LIST,isDisabled:this.taModel.phrases.failed}},__afterRender:function(){var e,t=this.taModel,n=t.phrases;if(!this.taModel.phrases.failed){this.$el.find("[ta-phrase-mode-tab="+n.viewMode+"]").addClass("selected")}e=SM.Views.create(SM.TaResponseSearchFormView,{model:t});this.$el.find(".responses-toolbar").prepend(e.el)},_onViewModeChanged:function(e){var t=e.data.self;t.$el.find("[ta-phrase-mode-tab]").removeClass("selected");t.$el.find("[ta-phrase-mode-tab="+e.value+"]").addClass("selected")},_onTabClick:function(e){var t=e.data.self,n=$(e.target).closest("[ta-phrase-mode-tab]"),r=t.taModel.phrases;e.preventDefault();if(!r.failed){r.set("viewMode",n.attr("ta-phrase-mode-tab"),{notify:true})}if(r.viewMode==="cloud"){SM.Bi.taWordCloudCloudViewClick()}else{SM.Bi.taWordCloudListViewClick()}},_getViewMode:function(e){return e==="cloud"?"Cloud":"List"}});SM.TaAnalysisFooterView=SM.Views.register({__NAME:"TaAnalysisFooter",__templateID:"ta-analysis-footer-template",__model:"taModel",WORD_CLOUD_TOUR_COOKIE_KEY:"sm_analyze_word_cloud_tour",__init:function(){var e=this.taModel.phrases;this.bindModel(e,"TaAnalysisInProgress.changed",{self:this},this._onAnalysisInProgress);this.bindModel(e,"TaWordCloudFreqCustomized",{self:this},this._newDataLoaded);this.bindModel(e,"WordCloudOpenHideWordsModal",{self:this},this.toggleHlgWithPhrase);this.$el.on("keyup","[hide-words-input]",{self:this},this._onInputChange).on("click","[hide-apply-all-chkbx]",{self:this},this._onInputChange).on("click","[save-btn]",{self:this},this._onSaveClick)},__create:function(){_.bindAll(this,"toggleHlg");_.bindAll(this,"_emptyHideBox")},__beforeRender:function(){var e=this.taModel.phrases,t=e.taModel.customization,n=t.hides,r=n.join(","),i=this.taModel.get("survey"),o=e.list.length,a=i.surveyAccessController.determineFeatureAccessType(SM.Constants.FEATURES.TEXT_ANALYSIS);return{hasAny:o>0,ID:this.taModel.ID,count:o,hasOne:o===1,hasError:e.failed,hideString:r,numberOfCombines:e.findCombinedWords(),numberOfHides:t.hides.length,inProgress:e.inProgress,upgradeToPremier:this.taModel.ownerShouldSeeUpgradeToPremium(),showUpgradeView:!this.taModel.isTAEnabled()||a!==SM.Constants.ACCESS_TYPE.FULL,showUpgradeBtn:a===SM.Constants.ACCESS_TYPE.UPGRADE,showRequestBtn:a===SM.Constants.ACCESS_TYPE.REQUEST}},__afterRender:function(){var i=_____WB$wombat$check$this$function_____(this),e,n=i.createHideWordsDlg(),r=i.toggleHlg;e=i.$el.find(".combine-words");i.$el.find(".upgrade-trigger-combined-words").on("click",function(e){e.preventDefault();SM.Views.create(SM.DialogView,{width:700,isModal:true,utSource:"analyze_wc_StAdv_combine",templateID:"wc-upgrade-to-premier-template"}).open()});i.$el.find(".upgrade-trigger-hidden-words").on("click",function(e){e.preventDefault();SM.Views.create(SM.DialogView,{width:700,isModal:true,utSource:"analyze_wc_StAdv_hide",templateID:"wc-upgrade-to-premier-template"}).open()});e.find("a[combine-words-goto-list-btn]").on("click",function(e){var t=i.$el.closest(".ta-analysis-panel"),n=t.closest(".sm-question-view"),r=function(){t.find("li[ta-phrase-mode-tab=list] a").trigger("click");setTimeout(function(){var e=t.find("[phrase-menu-action-id]").first();if(e){e.trigger("click");if(!SM.Cookies.get(i.WORD_CLOUD_TOUR_COOKIE_KEY)){setTimeout(function(){$(".q.analyze-wc-combine-words-q").trigger("mouseover")},200)}}},300)};e.preventDefault();if(n.hasClass("wc-customizing")){n.find(".wc-customize-actions [cancel-btn]").trigger("click");setTimeout(function(){r()},600)}else{r()}});i.$el.find(".hide-words").on("click",function(e){var t=i.$el.closest(".sm-question-view");e.preventDefault();if(n.hasClass("open")){n.fadeOut(r)}else if(t.hasClass("wc-customizing")){i.taModel.customization.shouldOpenHideWordsPopoutAfterRender(true);t.find(".wc-customize-actions [cancel-btn]").trigger("click")}else{n.fadeIn(r)}});if(i.taModel.customization.openHideWordsPopoutAfterRender){i.taModel.customization.shouldOpenHideWordsPopoutAfterRender(false);n.fadeIn(r)}this.$el.find(".q").popout()},createHideWordsDlg:function(){var t=_____WB$wombat$check$this$function_____(this),n=t.$el.find(".hidden-words-popout"),r=t.toggleHlg;n.find(".hidden-close").on("click",function(e){e.preventDefault();n.fadeOut(r);t._emptyHideBox()});return n},toggleHlg:function(){this.$el.find(".hidden-words-popout").toggleClass("open")},toggleHlgWithPhrase:function(e){var t=e.data.self,n=t.$el.find(".hidden-words-popout"),r=t.$el.find("[hide-words-input]"),i=r.val();e.preventDefault();if(_.string.isBlank(i)){i=e.hidePhrase}else{i=i+", "+e.hidePhrase}r.val(i);n.addClass("open");t._validate()},_emptyHideBox:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.taModel.customization.hides;e.$el.find("[hide-words-input]").val(t.join(","))},_onAnalysisInProgress:function(e){var t=e.data.self;t.render()},_newDataLoaded:function(e){var t=e.data.self;t.render()},_onInputChange:function(e){var t=e.data.self;t._validate()},_validate:function(){var e=_____WB$wombat$check$this$function_____(this);if(e._canSave()){e._enableSaveBtn()}else{e._disableSaveBtn()}},_canSave:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.taModel.customization.hides,n=t.join(","),r,i;r=e.$el.find("[hide-words-input]");i=r.val();if(e.$el.find("[hide-apply-all-chkbx]").prop("checked")){return true}return!(i===n)},_enableSaveBtn:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.find("[save-btn]").removeClass("disabled")},_disableSaveBtn:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.find("[save-btn]").addClass("disabled")},_onSaveClick:function(e){var t=e.data.self,n=t.taModel,r=t.$el.find("[hide-apply-all-chkbx]"),i=t.$el.find("[hide-words-input]").val(),o=i.split(","),a=[],s;if(!_.string.isBlank(i)){a=_.filter(o,function(e){return!_.string.isBlank(e)});a=_.map(a,function(e){return e.trim()})}s=r.prop("checked");n.customization.hides=a;n.addHide(s)}});SM.TaAnalysisListView=SM.Views.register({__NAME:"TaAnalysisListView",__templateID:"ta-analysis-list-template",__model:"phrases",WORD_CLOUD_TOUR_COOKIE_KEY:"sm_analyze_word_cloud_tour",__init:function(){this.bindModel(this.phrases,"TaWordCloudFreqCustomized",{self:this},this._newDataLoaded);this.$el.on("click","[wc-range-reset-btn]",{self:this},this._resetWCRange)},__beforeRender:function(){var r=this.phrases.taModel.ownerShouldSeeUpgradeToPremium(),e=$.map(this.phrases.list,function(e){var t=e.words,n=t?t.join(", "):"";return{ID:e.ID,localizedPercent:e.get("localizedPercent"),percent:e.get("percent"),count:e.responseCount,text:e.text,isCombined:e.isCombined,combinedPhraseStr:n,upgradeToPremier:r}});return{phrases:e,basicUser:!this.phrases.taModel.isTAEnabled()}},__afterRender:function(){var i=_____WB$wombat$check$this$function_____(this),o=i.phrases,e=this.$el.find(".action-arrow[phrase-menu-action-id]");if(o.taModel.isTAEnabled()){_.each(e,function(e){var t=$(e).attr("phrase-menu-action-id"),n=$(e).attr("phrase-menu-action-combined"),r={templateID:"word-cloud-list-item-menu-template",phraseID:t,isCombined:n,upgradeToPremier:o.taModel.ownerShouldSeeUpgradeToPremium(),actions:[{text:"Combine with...",action:"combine-words-modal"},{text:"Hide from word cloud",action:"hide-words"},{text:"Edit combined words",action:"edit-combine-words-modal"},{text:"Split combined words",action:"split-combine-words"}],position:{collision:"none none"}};$(e).actionMenu(r).on("actionMenu.actionSelected",{self:i},i._onMenuAction).on("actionMenu.beforeClose",{self:i},i._onMenuClose).on("actionMenu.menuInit",function(e){var t=e.actionMenu.get("menuView");i._combineWordsPopout=t.$el.find(".q.analyze-wc-combine-words-q").popout({autoClose:true});i._hideWordsPopout=t.$el.find(".q.analyze-wc-hide-words-q").popout({autoClose:true})})})}if(o.sortedList.length===0){if(o.originalPhrasesList.length===0){i.$el.html(SM.Template.render("ta-analysis-empty-template"));i.$el.find(".wc-not-enough-response").toggleClass("hide",o.taModel.filterCount>=5)}else{i.$el.html(SM.Template.render("ta-analysis-reset-range-template"))}}i.$el.find("[wordcloud-combine-popout]").popout({tipSideX:"left",tipSideY:"bottom",collision:"flip flip",tipOrientation:"topbottom",showDelayTime:400,dismissible:false,preventClick:false});this.__subscribe("popout.opened",i._onPopoutOpened,{self:i})},__destroy:function(){this.__unsubscribe("popout.opened",this._onPopoutOpened)},_resetWCRange:function(e){var t=e.data.self;e.preventDefault();t.phrases.taModel.resetWordCloudRange()},_onPopoutOpened:function(e){var t=e.data.self,n=$(".popout.open");n.on(SM.Event.CLICK,"[combine-words-goto-next-btn]",{self:t},t._onPopoutNextClicked);n.on(SM.Event.CLICK,"[combine-words-got-it-btn]",{self:t},t._onPopoutGotItClicked)},_onPopoutNextClicked:function(e){var t=e.data.self;e.preventDefault();e.stopPropagation();t.$el.find("[phrase-menu-action-id]").first().trigger("click");setTimeout(function(){$(".q.analyze-wc-hide-words-q").trigger("mouseover")},200)},_onPopoutGotItClicked:function(e){var t=e.data.self;e.preventDefault();e.stopPropagation();SM.API.setCookie(t.WORD_CLOUD_TOUR_COOKIE_KEY,true,"365d",{path:"/","max-age":"31536000"})},_onMenuAction:function(e){var t,n=e.data.self,r=e.$action.attr("data-phrase-id"),i,o=e.action.trim();if(_.isUndefined(o)){e.preventDefault();e.stopPropagation()}else if(o==="combine-words-modal"||o==="edit-combine-words-modal"){n._combineWordsPopout.mouseleave();n._hideWordsPopout.mouseleave();i=n.phrases.map[r].isCombined;t=SM.Views.create(SM.AnalysisCombineDialogView,{model:n.phrases,selectedPhraseID:r,isEditCombine:i});t.open()}else if(o==="upgrade-modal-cta"){SM.Views.create(SM.DialogView,{width:700,isModal:true,utSource:"analyze_wc_StAdv_hide",templateID:"wc-upgrade-to-premier-template"}).open()}else if(o==="split-combine-words"){n.phrases.taModel.removeCombine(r)}else if(o==="hide-words"){n.phrases._trigger({type:"WordCloudOpenHideWordsModal",hidePhrase:n.phrases.map[r].text})}},_onMenuClose:function(e){var t=e.data.self;t._combineWordsPopout.mouseleave();t._hideWordsPopout.mouseleave()},_newDataLoaded:function(e){var t=e.data.self;t.render()}});SM.TaAnalysisCloudView=SM.Views.register({__NAME:"TaAnalysisCloudView",__templateID:"ta-analysis-cloud-template",__model:"phrases",__init:function(){var e=_____WB$wombat$check$this$function_____(this);e._popouts={};e.$el.on("click","[phrase-filter-id]",{self:e},e._onClickPhrase).on("click","[wc-range-reset-btn]",{self:e},e._resetWCRange).on("mouseenter","[phrase-filter-id]",{self:e},e._onMouseenter).on("mouseleave","[phrase-filter-id]",{self:e},e._onMouseleave);e.bindModel(e.phrases,"WordCloudSingleColorCustomized",{self:e},e._onDataLoaded);e.bindModel(e.phrases,"WordCloudMultiColorCustomized",{self:e},e._onDataLoaded);e.bindModel(e.phrases,"TaWordCloudFreqCustomized",{self:e},e._onDataLoaded);e.bindModel(e.phrases,"TaWordCloudFontCustomized",{self:e},e._onDataLoaded)},__beforeRender:function(){var t=this.phrases.taModel.customization,n=t.isMultiColorSelected,r=t.MULTI_FONT_COLOR_GROUPS[t.colorGroup-1].COLOR_SCALES,e=$.map(this.phrases.sortedList,function(e){e.text=e.text.charAt(0)+e.text.slice(1);return{ID:e.ID,fontSize:e.get("fontSize"),color:n?r[e.colorScale]:t.color,text:SM.String.truncate(e.text,100,false)}});return{phrases:e,font:SM.CustomizeWordCloudFontView.FONT_MAP[t.font],showLegend:e.length>0}},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.phrases,n=t.taModel.customization,r=n.minFreq>-1?n.minFreq:t.lowRange,i=n.maxFreq<Number.MAX_SAFE_INTEGER?n.maxFreq:t.highRange,o=n.isMultiColorSelected,a=n.color,s=n.MULTI_FONT_COLOR_GROUPS[n.colorGroup-1].COLOR_SCALES,l=e.$el.find(".wc-legend-container");if(t.sortedList.length===0){if(t.originalPhrasesList.length===0){e.$el.html(SM.Template.render("ta-analysis-empty-template"));e.$el.find(".wc-not-enough-response").toggleClass("hide",t.taModel.filterCount>=5)}else{e.$el.html(SM.Template.render("ta-analysis-reset-range-template"));if(n.minFreq===-1&&n.maxFreq===Number.MAX_SAFE_INTEGER){e.$el.find("[wc-range-reset-btn]").toggleClass("hide")}}return}if(o){l.find(".wc-label-fewer").css("color",s[0]);l.find(".wc-label-more").css("color",s[7])}else{l.find(".wc-label-fewer").css("color",a);l.find(".wc-label-more").css("color",a)}_.each(e.$el.find(".wc-legend-block"),function(e,t){if(o){$(e).css("background-color",s[t])}else{$(e).css("background-color",a)}});l.find(".wc-range-min").text(r);l.find(".wc-range-max").text(i)},__destroy:function(){if(this._popouts){$.each(this._popouts,function(e,t){t.remove()})}this._popouts=null},_onMouseenter:function(e){var t=e.data.self,n=$(e.target),r=n.attr("phrase-filter-id");t._addTip(n,r)},_onMouseleave:function(e){var t=e.data.self,n=$(e.target),r=n.attr("phrase-filter-id");t._removeTip(r)},_onClickPhrase:function(e){var t=e.data.self,n=$(e.target),r=n.attr("phrase-filter-id");t._removeTip(r)},_resetWCRange:function(e){var t=e.data.self;e.preventDefault();t.phrases.taModel.resetWordCloudRange()},_phraseWidth:function(e){if(e>500){return"right top"}return"center top"},_addTip:function(e,t){var n=this.phrases.map[t],r;if(!this._popouts[t]){r=SM.Template.renderHTML("ta-cloud-popout-template",{isCombined:n.isCombined,hasMany:n.hasManyResponses(),count:n.responseCount,percent:n.get("localizedPercent"),rank:n.rank});this._popouts[t]=$(r)}$(document.body).append(this._popouts[t]);this._popouts[t].removeClass("out").position({my:"center bottom",at:this._phraseWidth(e.width()),of:e,collision:"none"}).addClass("active")},_removeTip:function(e){var t=_____WB$wombat$check$this$function_____(this);if(!t._popouts[e]){return}t._popouts[e].addClass("out");setTimeout(function(){if(t._popouts&&t._popouts[e]){t._popouts[e].removeClass("active").detach()}},200)},_onDataLoaded:function(e){e.data.self.render()}});SM.TaAnalysisContentView=SM.Views.register({__NAME:"TaAnalysisContent",__templateID:"ta-analysis-panel-content-template",__model:"phrases",__init:function(){this.phrases.on("viewMode.changed",{self:this},this._onViewModeChanged);this.phrases.on("TaAnalysisInProgress.changed",{self:this},this._onViewModeChanged)},__destroy:function(){this.phrases.off("viewMode.changed",this._onViewModeChanged);this.phrases.off("TaAnalysisInProgress.changed",this._onViewModeChanged)},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.$el,n=e.phrases,r,i=Globalize.culture().name,o=(n.viewMode==="cloud"||n.viewMode==="list")&&!n.taModel.isTAEnabled()&&!n.taModel.seenCTA;t.toggleClass("wc-overlay-container",o);t.closest(".fake-data-cta").toggle(o);if(!n.isLanguageAvailable(i)){r=SM.Template.render("ta-analysis-error-template",{isUnsupported:true})}else if(n.failed){r=SM.Template.render("ta-analysis-error-template",{isServiceError:true})}else if(n.inProgress){r=SM.Template.render("ta-analysis-spinner-template");e.isLoading=true}else if(n.viewMode==="cloud"){r=SM.Views.create(SM.TaAnalysisCloudView,{model:n}).el;if(e.isLoading){$(r).hide()}}else{r=SM.Views.create(SM.TaAnalysisListView,{model:n}).el}t.html(r);if(e.isLoading){if(n.viewMode==="cloud"){t.find(".ta-phrase-cloud").fadeIn(function(){e.isLoading=false})}else{e.isLoading=false}}},_onViewModeChanged:function(e){e.data.self.render()}});SM.TaAnalysisPanelView=SM.Views.extend({__NAME:"TaAnalysisPanel",__templateID:"ta-analysis-panel-template",__model:"taModel",__create:function(){this.applyToAll=false},__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.on("click","[customize-wc-btn]",{self:e},e.openCustomizeView).on("click","[wc-color-font-apply-to-all]",{self:e},e._onColorFontApplyToAllSelect).on("click",".wc-customize-actions [cancel-btn]",{self:e},e._onCancelBtnClick).on("click",".wc-customize-actions [upgrade-to-premier-from-wc-range-btn]",{self:e},e._onUpgradeToPremierClick).on("click","[phrase-filter-id]",{self:e},e._onPhraseClick).on("click",".wc-customize-actions [save-btn]",{self:e},e._onSaveBtnClick);e.bindModel(e.taModel.rollup.display,"allDisplaysChange",{self:e},e._onDisplayChange);e.bindModel(e.taModel.phrases,"TaWordCloudCustomized",{self:e},e._newDataLoaded)},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.taModel,n=e.taModel.get("survey"),r=e.$el,i,o,a,s;a=SM.Views.create(SM.TaAnalysisToolbarView,{model:t});o=SM.Views.create(SM.TaAnalysisContentView,{model:t.phrases});s=SM.Views.create(SM.TaAnalysisFooterView,{model:t});e.customizeView=SM.Views.create(SM.WCTabsView,{model:t});if(!t.isTAEnabled()&&!t.seenCTA){this.$el.append($("#ta-analysis-panel-basic-template")[0].innerHTML);this.$el.find(".fake-data-cta-button, [close-try-before-buy]").on("click",function(e){e.preventDefault();SM.Bi.taWordCloudTryBeforeBuyClicked();r.find(".ta-panel-list-container").removeClass("wc-overlay-container");r.find(".fake-data-cta").remove();t.seenCTA=true})}r.append(e.customizeView.el);if(n.hasFeatureAccessType(SM.Constants.FEATURES.TEXT_ANALYSIS,SM.Constants.ACCESS_TYPE.REQUEST)){i=SM.Views.create(SM.TaUpgradeView,{model:e.taModel,showWordCloudRequest:true,learnMoreLink:n.owner.helpLinkBase.replace("$FEATURE","Enterprise-Seats"),powerCasualFeature:SM.Constants.FEATURES.TEXT_ANALYSIS});r.append(i.el)}r.append(a.el);r.append(o.el);r.append(s.el)},openCustomizeView:function(e){var t=e.data.self,n=t.$el.find(".hidden-words-popout");e.preventDefault();if(n.hasClass("open")){n.find(".hidden-close").trigger("click")}t.customizeView.tabs.open("color");t.$el.closest(".sm-question-view").addClass("wc-customizing");t.customizeView.$el.slideDown(500)},_onCancelBtnClick:function(e){var t=e.data.self;e.stopPropagation();e.preventDefault();t.customizeView.$el.slideUp(500,function(){t.$el.closest(".sm-question-view").removeClass("wc-customizing");t.taModel.cancelWordCloudCustomization()})},_onUpgradeToPremierClick:function(e){var t=e.data.self;e.preventDefault();var n=SM.Views.create(SM.DialogView,{width:700,isModal:true,utSource:"analyze_wc_StAdv_range",templateID:"wc-upgrade-to-premier-template"});n.open();n.$el.on("dialog.afterClose",function(){t.customizeView.$el.slideUp(500,function(){t.$el.closest(".sm-question-view").removeClass("wc-customizing");t.taModel.cancelWordCloudCustomization()})})},_onSaveBtnClick:function(e){var t=e.data.self;e.preventDefault();t.customizeView.$el.slideUp(500,function(){t.$el.closest(".sm-question-view").removeClass("wc-customizing");t.taModel.saveWordCloudCustomization(t.applyToAll)})},_onPhraseClick:function(e){var t=e.data.self,n=t.$el.closest(".sm-question-view");if(n.hasClass("wc-customizing")){t.customizeView.$el.slideUp(500,function(){n.removeClass("wc-customizing");t.$el.closest(".tabs.ta-tabs").find(".ta-tabs-nav").removeClass("hide")})}else{t.$el.closest(".tabs.ta-tabs").find(".ta-tabs-nav").removeClass("hide")}},_onColorFontApplyToAllSelect:function(e){e.data.self.applyToAll=$(e.target).prop("checked")},_newDataLoaded:function(e){e.data.self.render()},_onDisplayChange:function(e){var t=e.data.self;t.taModel.loadApplyAllDisplayData();t.render()}});SM.WCTabsView=SM.Views.register({__NAME:"WCTabsView",__templateID:"word-cloud-tabs-template",__model:"taModel",__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.tabs.$el.on("tabs.beforeOpen",{self:e,wcAccessTier:this.taModel.get("survey").owner.wcAccessTier},e._onBeforeTabOpen)},__beforeRender:function(){var e=!this.taModel.isTAEnabled(),t=this.taModel.rollup.question.survey,n=this.taModel.ownerShouldSeeUpgradeToPremium(),r,i=t.surveyAccessController.determineFeatureAccessType(SM.Constants.FEATURES.TEXT_ANALYSIS),o=i===SM.Constants.ACCESS_TYPE.UPGRADE,a=i===SM.Constants.ACCESS_TYPE.REQUEST;if(e){r="analyze_wc_basic_colorfont"}else if(n){r="analyze_wc_StAdv_range"}return{upgradeToPremier:this.taModel.ownerShouldSeeUpgradeToPremium(),basicUser:e,ID:this.taModel.ID,upgradeUTSource:r,showRequestButton:a,showUpgradeButton:o,requestAccessUrlForFeature:t.surveyAccessController.requestAccessUrlForFeature(SM.Constants.FEATURES.TEXT_ANALYSIS)}},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this);e.tabs=e.$el.find(".tabs.wc-customization-tabs").tabs({requireOpenTab:true}).data("tabs")},_onBeforeTabOpen:function(e){var t=e.data.self,n=e.tab.key,r=e.tab.$panel,i=e.data.wcAccessTier,o=i===2&&n==="range",a=i===2&&n!=="range";t.$el.find("[cancel-btn]").html(i===1||o?Globalize.localize("No thanks"):Globalize.localize("Cancel"));t.$el.find(".apply-to-all").toggle(i===1||i===3||a);t.$el.find("[save-btn]").toggle(i===3||a);t.$el.find("[upgrade-btn]").toggle(i===1);t.$el.find("[upgrade-to-premier-from-wc-range-btn]").toggle(o);t.$el.find("[wc-customize-actions]").toggleClass("range-upgrade-cta",o);t._renderTab(n,r)},_renderTab:function(e,t){var n=_____WB$wombat$check$this$function_____(this);switch(e){case"color":n._renderCustomizeWordCloudColorView(t);break;case"font":n._renderCustomizeWordCloudFontView(t);break;case"range":n._renderCustomizeWordCloudRangeView(t);break;default:break}},_renderCustomizeWordCloudFontView:function(e){var t=_____WB$wombat$check$this$function_____(this);t.currentView=SM.Views.create(SM.CustomizeWordCloudFontView,{model:t.taModel});e.empty().append(t.currentView.el)},_renderCustomizeWordCloudColorView:function(e){var t=_____WB$wombat$check$this$function_____(this);t.currentView=SM.Views.create(SM.CustomizeWordCloudColorView,{model:t.taModel});e.html(t.currentView.el)},_renderCustomizeWordCloudRangeView:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.taModel.customization,r=t.taModel.phrases.lowRange,i=t.taModel.phrases.highRange,o=n.minFreq<0?r:n.minFreq,a=n.maxFreq>=Number.MAX_SAFE_INTEGER?i:n.maxFreq;t.currentView=SM.Views.create(SM.CustomizeWordCloudRangeView,{model:t.taModel});e.empty().append(t.currentView.el);t.$el.find("[wc-range-slider]").slider({constraints:{min:r===i?0:r,max:i},rangeMin:o,rangeMax:a})}});SM.CustomizeWordCloudColorView=SM.Views.register({__NAME:"CustomizeWordCloudColorView",__templateID:"customize-word-cloud-color-template",__model:"taModel",DEFAULT_COLOR_PALETTE:[["FFFFFF","EAEAE8","CCCCCC","999999","666666","333333","000000"],["CFCEBF","B5B7A9","94938C","7F7E71","706F65","5B594A","4B4A3C"],["FFFBB9","F8F67E","E8EC75","CCD832","A7C23D","86A33B","4F7A27"],["FFCB3E","F1B12A","F19E2D","DE7E35","C65126","C6332A","FF3300"],["D9EEEC","8CC8C9","4BBFBF","42A9A8","00858B","36606E","00374A"],["A8C6FE","73A7FF","3888FE","0062FF","0042AA","002F7B","001E57"],["E392FE","D357FE","992ABD","7B219F","61187C","450E59","2E073E"]],_selectedColor:"",_selectedColorGroupID:0,__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.taModel.rollup,n=t.display.getDisplayData(),r=e.taModel.customization.MULTI_FONT_COLOR_GROUPS,i=e.taModel.customization.colorGroup,o=t.question.survey.ID;e.colorPickerStorageKey="sm.colorcustomization.colorpicker"+o;if(window.localStorage&&n.default_color_palette){n.default_color_palette.unshift("");window.localStorage[e.colorPickerStorageKey]=n.default_color_palette.join(";")}return{hex:e._selectedColor?e._selectedColor:e.taModel.customization.color,selectedColorGroupID:e._selectedColorGroupID?e._selectedColorGroupID:i,colorGroups:r,selectedColorPalette:r[i-1].PALETTE}},__afterRender:function(){var t=_____WB$wombat$check$this$function_____(this),e=t.$el.find("[wc-single-color-select]"),n=t.$el.find("[wc-multi-color-select]"),r=t.$el.find(".wc-color-select-wrapper.single-color"),i=t.$el.find(".wc-color-select-wrapper.multiple-color"),o=t.$el.find(".wc-multi-color-popout"),a=t.toggleDlg,s=t.taModel.customization.colorGroup,l=e.attr("data-hex");e.spectrum({showInput:true,preferredFormat:"hex",showPalette:true,maxSelectionSize:21,localStorageKey:t.colorPickerStorageKey,chooseText:Globalize.localize("APPLY"),cancelText:Globalize.localize("CANCEL"),palette:t.DEFAULT_COLOR_PALETTE,change:function(e){t._updateColor({color:e})}});e.spectrum("set",l);t.singleColorPicker=e.spectrum("container");t._toggleSelected(s);e.on("click",function(){i.removeClass("selected");if(!r.hasClass("selected")){r.addClass("selected");t.taModel.toggleSingleMultiColor(false)}});n.on("click",function(e){e.preventDefault();if(o.hasClass("open")){o.fadeOut(a)}else{o.fadeIn(a)}});if(t.taModel.customization.isMultiColorSelected){i.addClass("selected")}else{r.addClass("selected")}},__init:function(){this.$el.on("click",".wc-color-select-wrapper.single-color",{self:this},this._onSingleColorClick);this.$el.on("click",".wc-color-select-wrapper.multiple-color",{self:this},this._onMultipleColorClick);this.$el.on("click","li.wc-multi-color-select-item",{self:this},this._onMultipleColorSelect);this.$el.on("click",".wc-multi-color-popout [cancel-btn], .wc-multi-color-popout .close",{self:this},this._onCancelSelectColorGroup);this.$el.on("click",".wc-multi-color-popout [save-btn]",{self:this},this._onSaveSelectColorGroup)},__create:function(){_.bindAll(this,"toggleDlg");_.bindAll(this,"_toggleSelected")},__destroy:function(){this.singleColorPicker.remove()},toggleDlg:function(){this.$el.find(".wc-multi-color-popout").toggleClass("open")},_onMultipleColorClick:function(e){var t=e.data.self,n=t.$el.find(".wc-color-select-wrapper.single-color"),r=t.$el.find(".wc-color-select-wrapper.multiple-color");n.removeClass("selected");if(!r.hasClass("selected")){r.addClass("selected");t.taModel.toggleSingleMultiColor(true)}},_onSingleColorClick:function(e){var t=e.data.self,n=t.$el.find(".wc-color-select-wrapper.single-color"),r=t.$el.find(".wc-color-select-wrapper.multiple-color");r.removeClass("selected");if(!n.hasClass("selected")){n.addClass("selected");t.taModel.toggleSingleMultiColor(false)}},_onMultipleColorSelect:function(e){var t=e.data.self,n=$(e.target).closest(".wc-multi-color-select-item"),r=n.attr("wc-color-group-id");e.preventDefault();if(t._selectedColorGroupID!==r){t._toggleSelected(r)}t._selectedColorGroupID=r},_onCancelSelectColorGroup:function(e){var t=e.data.self,n=t.$el.find(".wc-multi-color-popout"),r=t.toggleDlg,i=t.taModel.customization.colorGroup;if(n.hasClass("open")){n.fadeOut(r)}if(t._selectedColorGroupID>0&&t._selectedColorGroupID!==i){t._toggleSelected(i);t._selectedColorGroupID=0}},_toggleSelected:function(n){var e=this.$el.find("li.wc-multi-color-select-item");_.each(e,function(e){var t=$(e);if(t.attr("wc-color-group-id")-n===0&&!t.hasClass("selected")){t.addClass("selected")}else{t.removeClass("selected")}})},_onSaveSelectColorGroup:function(e){var t=e.data.self,n=t.$el.find(".wc-multi-color-popout"),r=t.taModel.customization.colorGroup;if(n.hasClass("open")){t.toggleDlg();n.fadeOut()}if(t._selectedColorGroupID>0&&t._selectedColorGroupID!==r){t.taModel.editWordCloudMultiColor(t._selectedColorGroupID);t._selectedColorGroupID=0;t.__destroy();t.render()}},_updateColor:function(e){var t=_____WB$wombat$check$this$function_____(this),n=e.color,r=_.chain(t.DEFAULT_COLOR_PALETTE).flatten().contains(n.toHex()).value(),i;if(window.localStorage&&!r){i=window.localStorage[t.colorPickerStorageKey].split(";");i=_.compact(i);t.taModel.rollup.display.setDefaultViewMetadataUpdates({default_color_palette:i})}t._selectedColor=n.toHexString();t.taModel.editWordCloudColor(t._selectedColor);t.__destroy();t.render()}});SM.CustomizeWordCloudRangeView=SM.Views.register({__NAME:"CustomizeWordCloudRangeView",__templateID:"customize-word-cloud-range-template",__model:"taModel",__create:function(){},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=this.taModel.phrases.lowRange,n=this.taModel.phrases.highRange,r=Globalize.localize("Mentions: ")+t,i=Globalize.localize("Mentions: ")+n;return{totalWords:e.taModel.phrases.list.length,upgradeToPremier:e.taModel.ownerShouldSeeUpgradeToPremium(),rangeMinCopy:r,rangeMaxCopy:i}},__afterRender:function(){},__init:function(){this.$el.on("slider.change","[wc-range-slider]",{self:this},this._sliderSlide);this.taModel.phrases.on("TaWordCloudFreqCustomized",{self:this},this._updateCountText)},_updateCountText:function(e){var t=e.data.self;t.$el.find(".total-words-input").text(t.taModel.phrases.list.length)},_sliderSlide:function(e){var t=e.slider.get("constraints"),n=e.slider.get("rangeMin"),r=e.slider.get("rangeMax");if(n===t.min){n=-1}if(r===t.max){r=Number.MAX_SAFE_INTEGER}e.data.self.taModel.editMinMaxFreq(n,r)}});SM.CustomizeWordCloudFontView=SM.Views.register({__NAME:"CustomizeWordCloudFontMenu",__templateID:"customize-word-cloud-font-template",__model:"taModel",__init:function(){var t=_____WB$wombat$check$this$function_____(this),e=t.taModel.customization.font,n=[],r;_.each(SM.CustomizeWordCloudFontView.FONT_MAP,function(e,t){n.push({label:t,style:e})});r=t.$el.actionMenu({actions:n,saveState:true,templateID:"customize-word-cloud-font-menu-template",selectedAction:e});r.on("actionMenu.actionSelected",function(e){t.taModel.setWordCloudFont(e.action);t._setFontLabel(e.action)});t._setFontLabel(e)},_setFontLabel:function(e){this.$el.find("a[word-cloud-font-btn] span").text(e)}});SM.CustomizeWordCloudFontView.FONT_MAP={"Andale Mono":"andale mono,monospace",Arial:"arial,sans-serif","Arial Black":"arial black,avant garde,sans-serif","Book Antiqua":"book antiqua,palatino,serif","Comic Sans MS":"comic sans ms,sans-serif","Courier New":"courier new,courier,monospace","Droid Serif":"droid serif,serif",Garamond:"garamond,baskerville,serif",Georgia:"georgia,palatino,serif",Helvetica:"helvetica,helvetica neue,arial,sans-serif","Helvetica Neue":"helvetica neue,helvetica,arial,sans-serif",Impact:"impact,sans-serif",Lato:"lato,sans-serif",Merriweather:"merriweather,serif",Montserrat:"montserrat,sans-serif","National 2":"National2","Open Sans":"open sans,sans-serif",Palatino:"palatino,palatino linotype,serif",Roboto:"roboto,sans-serif",Tahoma:"tahoma,geneva,sans-serif",Terminal:"terminal,monaco,monospace","Times New Roman":"times new roman,times,serif",Trebuchet:"trebuchet ms,geneva,sans-serif",Verdana:"verdana,arial,sans-serif","Noto Sans (Traditional Chinese)":"noto sans tc,sans-serif","Noto Sans (Japanese)":"noto sans jp,sans-serif","Noto Sans (Korean)":"noto sans kr,sans-serif"};SM.TaTabsView=SM.Views.register({__NAME:"TaTabsView",__templateID:"ta-tabs-template",__model:"taModel",__defaults:{selectedTab:"responses"},__init:function(){var e=this.taModel,t=e.rollup;this.bindModel(t.display,"toggleSentiment",{self:this},this._toggleSentimentView);this.bindModel(e,"insightJobStatusChanged",{self:this},this._onJobStatusChange);e.on("category.deleted",{self:this},this._onCategoryCountChange);e.on("category.added",{self:this},this._onCategoryCountChange);e.on("etlProcessing.changed",{self:this},this._onETLProcessing);e.on("enableInsights",{self:this},this._onToggleSentimentView);this.$el.on("TAResponseSearchFrom.search",{self:this},this._onSearch).on("click","[category-filter-id]",{self:this},this._onCategoryClick).on("click","[phrase-filter-id]",{self:this},this._onPhraseClick).on("click","[sentiment-upgrade-trigger]",{self:this},this._onSentimentUpgradeClick).on("click","[sentiment-analysis-toggle]",{self:this},this._onToggleSentimentView).on("click","[tab-target]",{self:this},this._onTabClick).on(SM.Event.CLICK,"[sentiment-request-trigger]",{self:this},this._onToggleSentimentAnalysisWithoutAccess).on("click","a.tab",{self:this},this._onTagsClick)},__destroy:function(){this.taModel.off("category.deleted",this._onCategoryCountChange);this.taModel.off("category.added",this._onCategoryCountChange)},__beforeRender:function(){var c=this.get("selectedTab"),e=this.taModel,t=e.get("survey"),n=e.rollup,p=n.question.isEssay(),d=t.owner.sentimentAnalysisFF,h=n.summary.saEligible&&t.isCurrentUserAlsoOwner(),r=d&&h&&!SM.SharedAnalyzeApp,i=n.summary.saEnabled,f=t.owner.isSaPackageAvailable,m=t.owner.hasOptedInInsights,g=e.findTaDisplayData("sentiment_toggle"),o,a=[],s=t.hasFeatureAccessType(SM.Constants.FEATURES.TEXT_ANALYSIS,SM.Constants.ACCESS_TYPE.REQUEST),l=SM.WrenchIcons.IconLock.render(),u=t.surveyAccessController.determineFeatureAccessType(SM.Constants.FEATURES.TEXT_ANALYSIS),y=u===SM.Constants.ACCESS_TYPE.UPGRADE||u===SM.Constants.ACCESS_TYPE.REQUEST;o=t.surveyAccessController.determineFeatureAccessType(SM.Constants.FEATURES.SENTIMENT_ANALYSIS);a.push({name:"responses",hasCount:true,count:Globalize.format(e.responses.queryCount,"n0"),text:Globalize.localize("RESPONSES"),isEssay:p});if(this._shouldShowAnalysisTab()){a.push({name:"analysis",text:Globalize.localize("WORD CLOUD"),icon:l,showRequest:s,isDisabled:t.isReadOnly()})}if(!SM.App.isSharingApp()){a.push({name:"categories",text:Globalize.localize("TAGS"),hasCount:!e.categories.failed,count:!e.categories.failed?Globalize.format(e.categories.noSentimentsCount(),"n0"):0,isDisabled:!e.isTAEnabled()||t.isReadOnly()||y,icon:l,showRequest:s})}$.each(a,function(e,t){t.isOpen=c===t.name});return{tabs:a,saToggled:g&&m&&i,saEligible:r,saToggleUpgrade:r&&!i&&!f&&o!==SM.Constants.ACCESS_TYPE.FULL,showSentimentAnalysisUpgrade:SM.App.isSharingApp()?false:o===SM.Constants.ACCESS_TYPE.UPGRADE,showSentimentAnalysisRequest:SM.App.isSharingApp()?false:o===SM.Constants.ACCESS_TYPE.REQUEST,lockIcon:SM.App.isSharingApp()?null:SM.WrenchIcons.IconLock.render()}},__afterRender:function(){var e=[],t,n,r,i=this.$el.find("[ta-tabs-panel]");this.$el.tabs({selectedTab:this.__settings.selectedTab});t=SM.Views.create(SM.TaResponsesPanelView,{model:this.taModel});e.push(t.el);if(this._shouldShowAnalysisTab()){n=SM.Views.create(SM.TaAnalysisPanelView,{model:this.taModel});e.push(n.el)}if(!SM.App.isSharingApp()){r=SM.Views.create(SM.TaCategoriesPanelView,{model:this.taModel});e.push(r.el)}$.each(e,function(e,t){i.eq(e).append(t)})},_onSentimentOptInClick:function(){var e=SM.App.survey.owner,t=!e.hasOptedInInsights&&(e.isAutoRenewOn||e.packageType===SM.Constants.PACKAGE_TYPE.ENTERPRISE)&&e.sentimentAnalysisFF;if(t){var n=SM.Views.create(SM.SaOptInModal,{model:this.taModel});n.open();SM.Bi.saOptInToggleClick()}},_toggleSentimentView:function(e){var t=e.data.self;t.$el.find("[sentiment-analysis-toggle], .sa-toggle-text-on, .sa-toggle-text-off").toggleClass("on")},_onToggleSentimentAnalysisWithoutAccess:function(e){e.preventDefault();SM.Views.create(SM.SaLearnMoreView,{showSentimentAnalysisRequest:true}).open()},_onToggleSentimentView:function(e){var t=e.data.self,n=t.taModel.rollup,r=t.taModel.get("survey"),i=t.taModel.insightsFlagOn,o=r.owner.insightsFlagTurnedOn&&!i,a=n.display.getDisplayData(n.questionID).sentiment_toggle,s=a==="on"?"off":"on",l=o?"on":s;e.preventDefault();SM.Bi[s==="on"?"saToggleClickOn":"saToggleClickOff"]();t._updateSentimentView(l,e)},_updateSentimentView:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=n.taModel,i=r.insightsFlagOn,o=r.rollup,a=o.summary.saEnabled,s=r.get("survey"),l=s.owner.hasOptedInInsights,u=r.rollup.display,c={sentiment_toggle:e},p={notify:false,toggle:true};if(!l){n._onSentimentOptInClick()}else{$("[ta-reset-results-btn]").trigger("click");if(!a){o.summary.saEnabled=true}$.when(u.updateDisplayData(c,p)).done(function(){n.isSentimentToggled=e}).fail(function(){SM.log("sentiment toggle failed")});if(e==="on"){if(!i){n.taModel.insightsFlagOn=true}if(!SM.Cookies.get("sa_show_fab")){n._closeFAB(t)}r.updateETL()}}},_onSentimentUpgradeClick:function(e){var t=e.data.self,n=t.taModel.get("survey");t._closeFAB(e);e.preventDefault();SM.Bi.saUpgradeToggleClick();if(!n.isReadOnly()){SM.Views.create(SM.SaLearnMoreView).open()}e.stopPropagation()},_closeFAB:function(e){var t=e.data.self,n=t.taModel.get("survey");e.preventDefault();n._trigger("closeFAB")},_onCategoryClick:function(e){var t=e.data.self,n=$(e.target).attr("category-filter-id");e.preventDefault();t.taModel.filterCategories([n]);t.$el.find("a[tab-target=responses]").trigger("click");SM.Bi.taViewAllTags()},_onPhraseClick:function(e){var t=e.data.self,n,r;e.preventDefault();n=$(e.target).attr("phrase-filter-id");r=t.taModel.phrases.map[n].text;t.taModel.searchQuery(r);t.$el.find("a[tab-target=responses]").trigger("click")},_onSearch:function(e){var t=e.data.self;t.taModel.searchQuery(e.query);t.$el.find("a[tab-target=responses]").trigger("click")},_onCategoryCountChange:function(e){var t=e.data.self,n=t.$el.find("[tab-target=categories] [ta-tab-count]");n.text("("+t.taModel.categories.noSentimentsCount()+")")},_shouldShowAnalysisTab:function(){var e=this.taModel.get("survey");return!SM.App.isSharingApp()&&!this.taModel.rollup.question.isDateTime()&&!this.taModel.rollup.question.isNumerical()&&!e.isCAUser()},_onTabClick:function(e){var t=e.data.self;if(t.$el.find("a[tab-target=responses]").hasClass("active")){t.$el.find(".sa-toggle-container").show();SM.Bi.taResponseTabClick()}else if(t.$el.find("a[tab-target=analysis]").hasClass("active")){t.$el.find(".sa-toggle-container").hide();t.taModel.fetchWordCloudData();SM.Bi.taWordCloudTabClick()}else if(t.$el.find("a[tab-target=categories]").hasClass("active")){t.$el.find(".sa-toggle-container").hide();SM.Bi.taTagsTabClick()}},_onETLProcessing:function(e){var t=e.data.self,n=t.taModel,r=t.$el.find(".sa-toggle-container");if(n.isEtlProcessing()){r.addClass("sa-loading")}else if(n.etlProcessing===n.ETL_FAILED){r.addClass("sa-failed")}else{r.removeClass("sa-loading")}},_onJobStatusChange:function(e){var t=e.job,n=t.taModel,r=n.get("survey");if(t.status===t.STATUS.SUCCESS){n.fetchResponses(true);r.insightJobs.list.shift();delete r.insightJobs.map[t.ID]}else if(t.status===t.STATUS.FAILED){n.set("etlProcessing",n.ETL_FAILED,{notify:true});n.setSAToggleFail();r.insightJobs.list.shift();delete r.insightJobs.map[t.ID]}},_onTagsClick:function(e){e.preventDefault();if($(e.target).hasClass("disabled")){return false}}});SM.TaContainerView=SM.Views.register({__NAME:"TaContainerView",__templateID:"ta-container-template",__model:"taModel",__afterRender:function(){var e=SM.Utils.Experiments.isActiveTreatment("analyze_rule_based_tagging","analyze_rule_based_tagging_treatment");var t=SM.Views.create(e?SM.TextResponseTabs:SM.TaTabsView,{model:this.taModel});this.$el.find(".summary-responses-container").prepend(t.el)}});SM.SummaryChartContainerView=SM.Views.register({__NAME:"summaryQuestionChartView",__templateID:"summary-chart-container-template",__model:"question",__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.survey=e.survey;t.question=e.question;t.rollup=t.question.getRollup();t.display=t.rollup.display;t.isExport=e.isExport;t.randomAssignmentOption=e.randomAssignmentOption;t.questionView=e.questionView},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.display.getDisplayData();return{isShown:t.show_chart}},__afterRender:function(){var t=_____WB$wombat$check$this$function_____(this),e,n;if(t._shouldHideChart()){return}try{if(t.display.getBenchmarkDisplay()){if(t.question.isNPS()&&t.display.getChartType()==="score_gauge"){n=SM.BenchmarkNpsSummaryChartView}else if(t.question.isTop2()){n=SM.BenchmarkTop2SummaryChartView}else{n=SM.BenchmarkSummaryChartView}}else if(t.question.isNPS()){n=SM.NpsSummaryChartView}else if(SM.StarRatingUtils.newVizEffective(t.question)&&t.display.getChartType()===t.display.DISPLAY_VALUES.wtd_avg){n=SM.StarRatingChartReactView}else{n=SM.BaseSummaryChartView}e=SM.Views.create(n,{question:t.question,questionView:t.questionView});t.$el.html(e.el);t.chartView=e}catch(e){t._handleRenderingError(e)}},_shouldHideChart:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.display.getDisplayData();return!t.show_chart},_handleRenderingError:function(e){var t=_____WB$wombat$check$this$function_____(this),n;n=document.createElement("div");n.innerHTML=SM.Template.render("summary-chart-display-error-template");t.$el.html(n);SM.Error.log(e,"question summary chart rendering error, QuestionID: "+t.question.ID)},__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.bindModel(e.display,"displayChange",{self:e},e._onDisplayChange);e.bindModel(e.display,"tempDisplayChange",{self:e},e._onDisplayChange);e.bindModel(e.display,"allDisplaysChange",{self:e},e._onDisplayChange)},_onDisplayChange:function(e){var t=e.data.self;if(t.question.hasRandomAssignment()&&!!t.randomAssignmentOption){t.question.randomAssignmentOption=t.randomAssignmentOption}t.render()}});SM.BaseSummaryChartView=SM.Views.register(SM.Object.deepExtend(SM.SummarySeriesFactory,{__NAME:"BaseSummaryChartView",__templateID:"summary-chart-template",HIGHCHARTS_CHART_TYPE_MAP:{vbar:"column",hbar:"bar",area:"area",line:"line",stacked_vbar:"column",stacked_hbar:"bar",pie:"pie",donut:"pie",boxplot:"boxplot",top2_hbar:"bar",top2_vbar:"column",top2_donut:"pie"},DATA_LABEL_OFFSETS:{column:[0,-10],bar:[10,0],pie:[10,0],donut:[10,0],line:[0,-10],area:[0,-10],boxplot:[10,0]},TITLE_HEIGHT:30,ITEM_STYLE_WIDTH:75,__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t._createAsSummarizable(_.extend(e,{noLabelByWeight:true,noLabelBySidi:true}));t.DEFAULT_HIGHCHARTS_OPTIONS=SM.Object.deepExtend(SM.Highcharts.DEFAULT_OPTIONS,{plotOptions:{series:{dataLabels:{formatter:t._formatDataLabel}}}});_.bindAll(t,"_compileChartOptions","_renderChart")},getSeriesList:function(){var e=_____WB$wombat$check$this$function_____(this);return e.seriesList},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this);e._getDisplayOptions();e._getChartMetadata();e._getSortedSummaryData();e._validateChart()},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t,n,r,i=0,o=0;e.$el.empty();e.seriesList=[];if(e.summary.answered===0&&!e.displayData.show_benchmark){e._showNoResponsesMsg();return}t=e._buildQuestionOptions();n=_.map(t,e._compileChartOptions);if(_.size(n[0].series)===0){e.$el.html(SM.Template.render("no-matching-responses-template",{isBenchmarkable:false,classes:"mod-no-header"}));return}o=0;_.each(n,function(e){i=_.size(e.series)*_.size(e.series[0].data);o+=i});r=e.question.survey.config.question_chart_display_threshold;if(i>r||o>r*3){e.$el.html(SM.Template.render("chart-too-big-template"));return}_.each(n,e._renderChart)},_compileChartOptions:function(e,c){var t=_____WB$wombat$check$this$function_____(this),n,r,i,o,a,s,p,l,d,u;u=$("<div></div>");u.attr("chart-type",t.chartType);l=e.series;t.seriesList.push(l);d=e.xAxis.categories;n=t._buildChartOptions(l,d,u,c);r=t._buildEventOptions(u);s=t._buildColorOptions();i=t._buildPlotOptions(l,n);o=t._buildTooltipOptions();a=t._buildLegendOptions();if(t.question.isEmoji()&&l[0].__options.dimensionType==="row"&&t.question.structure.answers.rows[0].text===l[0].name){a.legend.itemStyle={fontFamily:"Mateo"}}t._setDataLabelCoordinates(l,e.yAxis,n.chart);p=SM.Object.deepExtend(t.DEFAULT_HIGHCHARTS_OPTIONS,n,r,s,i,o,a,e);return p},_showNoResponsesMsg:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.question,n=t.survey.state.isDashboardMode(),r=t.isBenchmarkable()&&!(SM.App.isSharingApp()||SM.App.isExportApp()||n);e.$el.html(SM.Template.render("no-matching-responses-template",{isBenchmarkable:r,isDashboardMode:n,showLink:!t.survey.isProfilerDialogEnabled(),height:(e.displayData.height||0)-46,width:(e.displayData.width||0)-40,classes:"mod-no-header"}))},_renderChart:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r=$(e.chart.renderTo),i;t.$el.append(r);if(t.isBoxplot){i=t._renderBoxPlotLabels}else{i=function(){}}n=new window.Highcharts.Chart(e,i);t._bindEvents(r,n)},_bindEvents:function(e,t){if(!SM.App.isSharingApp()){SM.Highcharts.bindYAxisEvents(e,t.yAxis[0]);SM.Highcharts.bindAreaChartEvents(e);SM.Highcharts.bindXAxisEvents(e)}},_getChartMetadata:function(){var e=_____WB$wombat$check$this$function_____(this);e.chartMetadata=e.rollup.display.getDisplayData();e.chartType=e.chartMetadata.chart_type;e.scaleType=e.chartMetadata.scale_type;e.scaleIsPercent=e.scaleType===e.SCALE_TYPE_PERCENT;e.isMirrored=e.chartMetadata.mirror;e.isWeightedAvg=e.chartMetadata.isWeightedAvg;e.isDistribution=e.chartMetadata.isDistribution;e.isStacked=e.chartMetadata.isStacked;e.isArea=e.chartMetadata.isAreaChart;e.isPie=e.chartMetadata.isPieChart;e.isDonut=e.chartMetadata.isDonutChart;e.isBoxplot=e.chartMetadata.isBoxplotChart;e.showDataLabels=e.chartMetadata.show_data;e.hideEmptyData=!e.chartMetadata.show_empty_data;e.hasXAxis=!e.isPie&&!e.isDonut;e.showBenchmark=e.chartMetadata.show_benchmark;e.hasTitle=e._hasTitle();e.hasLegend=e._hasLegend();e.highchartsChartType=e.HIGHCHARTS_CHART_TYPE_MAP[e.chartType];e.isVertical=e._isVertical()},_buildQuestionOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t;if(e.summaryType==="menu_matrix"){if(e.isWeightedAvg){t=e._buildMenuMatrixWeightedAvgChartOptionsList()}else if(e.isPie||e.isDonut){t=e._buildMenuMatrixPieChartOptionsList()}else{t=e._buildMenuMatrixChartOptionsList()}}else if(e.summaryType==="matrix"){if(e.isWeightedAvg){t=[e._buildMatrixWeightedAvgChartOptions()]}else if(e.isPie||e.isDonut){t=[e._buildPieChartOptions()]}else{t=[e._buildMatrixChartOptions()]}}else if(e.isPie||e.isDonut){t=[e._buildPieChartOptions()]}else{t=[e._buildSimpleChartOptions()]}return t},_buildSimpleChartOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t,n,r,i;i=e.sortedRowsList[0];if(e.isStacked){n=[];r=e.buildSimpleStackedSeries(e.summary,i)}else if(e.isWeightedAvg){n=["Weighted Average"];r=e.buildSimpleWeightedAverageSeries(e.summary,i)}else{n=e.buildCategories(i);r=e.buildSimpleSeries(e.summary,i)}t={xAxis:e._buildXAxisOptions(n),series:r,yAxis:e._buildYAxisOptions(r)};return t},_buildPieChartOptions:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r,i,o;e=e||{};o=t.sortedRowsList[0];r=t.buildCategories(o);if(t.summaryType==="matrix"){if(t.isCompared){i=t.buildSimpleSeriesFromComparedMatrixSummary()}else{i=t.buildSimpleSeriesFromMatrixSummary()}}else if(t.summaryType==="menu_matrix"){i=t.buildSimpleSeriesFromMenuMatrixSummary(e.columnID)}else{i=t.buildSimpleSeries(t.summary,o)}n={xAxis:t._buildXAxisOptions(r),series:i,yAxis:t._buildYAxisOptions(i)};return n},_buildMatrixChartOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t,n,r;if(e.aggregateOverColumns){n=e.buildCategories(e.sortedColumnsList[0]);r=e.buildMirroredMatrixSeries()}else{n=e.buildCategories(e.sortedRowsList[0]);r=e.buildMatrixSeries()}t={xAxis:e._buildXAxisOptions(n),yAxis:e._buildYAxisOptions(r),series:r};return t},_buildMenuMatrixChartOptionsList:function(){var n=_____WB$wombat$check$this$function_____(this),r,i,e,o,a,s,l,u,c;if(n.question.isCompared()){e=_.map(n.rows,function(e,t){r=e.items;if(_.isEmpty(r)){return}if(n.isMirrored){l=n.sortedColumnChoicesList[t];u=n.buildCategories(l)}else{s=n.sortedColumnsList[t];u=n.buildCategories(s)}i=n.columnChoiceTotalsByRow[e.id];c=n.buildComparedMatrixSeries(e,r,i);o=n._buildMenuMatrixChartOptions(u,c,e.text);return o})}else{e=_.map(n.columns,function(e,t){if(n.isMirrored){l=n.sortedColumnChoicesList[t];u=n.buildCategories(l)}else{a=n.sortedRowsList[t];u=n.buildCategories(a)}c=n.buildMenuMatrixSeries(e,t,e.items,n.columnChoiceTotalsByColumnChoice);o=n._buildMenuMatrixChartOptions(u,c,e.text);return o})}e=_.compact(e);return e},_buildMenuMatrixChartOptions:function(e,t,n){var r=_____WB$wombat$check$this$function_____(this);return{title:r._buildMenuMatrixTitleOptions(n),xAxis:r._buildXAxisOptions(e),series:t,yAxis:r._buildYAxisOptions(t)}},_buildMatrixWeightedAvgChartOptions:function(){var t=_____WB$wombat$check$this$function_____(this);return t._buildWeightedAvgChartOptions(0,function(e){if(t.isCompared){return t.weightedAveragesByColumn[e]}return t.weightedAveragesByRow[e]})},_buildMenuMatrixWeightedAvgChartOptionsList:function(){var o=_____WB$wombat$check$this$function_____(this);var a=[],s;if(o.isCompared){var l=0;var u=0;var c=0;_.each(o.rows,function(t,e){s=o._buildWeightedAvgChartOptions(e,function(e){return o.weightedAveragesByRowAndColumnChoice[t.id][e]});var n=s.yAxis.max;l=n>l?n:l;var r=s.yAxis.min;u=r<u?r:u;var i=s.yAxis.tickInterval;c=i>c?i:c;s.title=o._buildMenuMatrixTitleOptions(t.text);a.push(s)});_.each(a,function(e){_.extend(e.yAxis,{max:l,min:u,tickInterval:c})})}else{_.each(o.columns,function(t,e){s=o._buildWeightedAvgChartOptions(e,function(e){return o.weightedAveragesByRowAndColumn[e][t.id]});s.title=o._buildMenuMatrixTitleOptions(t.text);a.push(s)})}return a},_buildMenuMatrixPieChartOptionsList:function(){var t=_____WB$wombat$check$this$function_____(this);var n=[],r;_.each(t.columns,function(e){r=t._buildPieChartOptions({columnID:e.id});r.title=t._buildMenuMatrixTitleOptions(e.text);n.push(r)});return n},_buildMenuMatrixTitleOptions:function(e){var t=_____WB$wombat$check$this$function_____(this),n;if(!/\s/.test(e)){e+=" "}e=_.string.truncate(e,SM.Highcharts.MAX_TITLE_CHARS);n={align:"left",text:e,style:{padding:"10px 1500px 10px 10px",backgroundColor:"#DFDFDF",fontSize:"12px"},x:84,y:0};if(this.highchartsChartType==="bar"&&!t.isStacked){n.x=104}if(t.question.isEmoji()&&t.question.structure.answers.rows[0].text===e){n.style.fontFamily="Mateo"}return n},_buildWeightedAvgChartOptions:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r,i=[],o,a=[],s,l;if(n.isCompared){if(n.summaryType==="menu_matrix"){if(n.sortedColumnChoicesList.length){_.each(n.sortedColumnChoicesList[e],function(e){s=e.text;l=t(e.id);i.push(s);a.push({y:l,absoluteY:l})})}}else if(n.sortedColumnsList.length){_.each(n.sortedColumnsList[e],function(e){s=e.text;l=t(e.id);i.push(s);a.push({y:l,absoluteY:l})})}}else if(n.sortedRowsList.length){_.each(n.sortedRowsList[e],function(e){s=e.text;l=t(e.id);i.push(s);a.push({y:l,absoluteY:l})})}o=[n._buildSeriesItem(a,{})];r={xAxis:n._buildXAxisOptions(i),series:o,yAxis:n._buildYAxisOptions(o)};return r},_buildChartOptions:function(e,t,c,p){var n=_____WB$wombat$check$this$function_____(this),r=n.question,i=r.displayOptions,d=e.length,h=_.isEmpty(t)?0:t.length,o=n.hasTitle?n.TITLE_HEIGHT:0,a=n.hasXAxis?SM.Highcharts.calculateXAxisLabelHeight(n.highchartsChartType,t):0,s=n.hasLegend?SM.Highcharts.calculateLegendHeight_fixedItemWidth(e):0,l=n.answerStructures,u;if(r.isSingleChoice()&&n.isWeightedAvg){l={rows:[{text:Globalize.localize("Weighted Average")}]}}u={chart:{type:n.highchartsChartType,width:i?i.width:SM.Highcharts.calculateChartWidth(n.highchartsChartType,{numSeries:d,numXAxisLabels:h,isStacked:n.isStacked,isCompared:n.isCompared}),height:r.survey.state.isDashboardMode()?i.height:SM.Highcharts.calculateChartHeight(n.highchartsChartType,{answerStructures:l,titleHeight:o,labelHeight:a,legendHeight:s,isDistribution:r.isNPS()||n.isDistribution,isCompared:n.isCompared,isStacked:n.isStacked,isMirrored:n.isMirrored,chartIndex:p}),spacingRight:1,marginTop:SM.Highcharts.calculateMarginTop(10,o),marginBottom:SM.Highcharts.calculateMarginBottom(a,s),renderTo:c[0]}};if(n.isPie||n.isDonut){u.chart.plotBackgroundColor="#FFF";u.chart.marginLeft=0}if(r.isNPS()&&n.nps_depth===SM.QuestionDisplayModel.DISPLAY_VALUES.nps_score){u.chart.marginLeft=80;u.chart.marginRight=50}else if(n.highchartsChartType==="bar"&&!n.isStacked){u.chart.marginLeft=115}return u},_buildEventOptions:function(t){var e,n,r=_____WB$wombat$check$this$function_____(this);if(SM.App.isSharingApp()){return}e={chart:{events:{click:function(e){SM.CustomizeActionMenu.actionMenu.call(r,e,"background",{parent:t})}}},plotOptions:{series:{events:{legendItemClick:function(e){e.preventDefault();n=r.question.isNPS()?"legendNPS":"legend";SM.CustomizeActionMenu.actionMenu.call(r,e.browserEvent,n,{parent:t})}},point:{events:{click:function(e){n=r.question.isNPS()?"dataPointNPS":"dataPoint";SM.CustomizeActionMenu.actionMenu.call(r,e,n,{parent:t})},mouseOver:SM.Highcharts.onPointMouseOver,mouseOut:SM.Highcharts.onPointMouseOut}}}}};return e},_buildColorOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t={};if(_.isEmpty(e.chartMetadata.colors)){return}t.colors=e.chartMetadata.colors;return t},_buildXAxisOptions:function(e){var t=_____WB$wombat$check$this$function_____(this),n={};if(_.isEmpty(e)){n.labels={enabled:false}}else{n.categories=e;if(_.contains(["column","line","area"],t.highchartsChartType)){SM.Object.deepUpdate(n,{labels:{y:25,formatter:SM.Highcharts.xAxisLabelFormatter}})}if(_.contains(["bar"],t.highchartsChartType)){SM.Object.deepUpdate(n,{labels:{formatter:function(){return SM.Highcharts.formatAxisLabel(this.value,115,2)},style:{textAlign:"right"}},reversedStacks:true})}if(this.question.isEmoji()&&!t.aggregateOverColumns&&this.question.structure.answers.rows.length>=1&&this.question.structure.answers.rows[0].text===e[0]){SM.Object.deepUpdate(n,{labels:{style:{fontFamily:"Mateo"}}})}}return n},buildCategories:function(e){return _.map(e,function(e){return e.text})},_buildYAxisOptions:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r,i={startOnTick:false,endOnTick:false};n=t._getYAxisScaleOptions(e);r={labels:{formatter:t.scaleIsPercent?SM.Highcharts.percentageLabelFormatter:SM.Highcharts.yAxisLabelFormatter}};SM.Object.deepUpdate(i,n);SM.Object.deepUpdate(i,r);return i},_otherIsAnAnswerChoice:function(){var e=_____WB$wombat$check$this$function_____(this);return e.others!==undefined&&e.others[0].options.is_answer_choice},_getYAxisScaleOptions:function(e){var t=_____WB$wombat$check$this$function_____(this),n=SM.Highcharts,r=t.isStacked||t.isArea&&!t.question.isSimple()&&!t.isWeightedAvg,i,o,a,s;if(t.scaleIsPercent){if(r){return{min:0,max:100,tickInterval:10}}s=n.calculateSeriesRange(e);i={min:0,max:Math.ceil(s.max/100)*100||100};i.tickInterval=i.max/10}else if(r){s=n.calculateStackedSeriesRange(e);i=n.calculateYAxisScaleOptions(s.max)}else if(t.question.isSingleChoice()&&t.isWeightedAvg){a=t._otherIsAnAnswerChoice()?t.question.rowList.length+1:t.question.rowList.length;s={min:0,max:a};i=n.calculateYAxisScaleOptions(a,0)}else if(t.question.isStarRating()&&t.isWeightedAvg){s=n.calculateSeriesRange(e);if(s.max<0){s.max=0}i=n.calculateYAxisScaleOptions(Math.max(s.max,5),0)}else{s=n.calculateSeriesRange(e);if(s.max<0){s.max=0}i=n.calculateYAxisScaleOptions(Math.max(s.max,-s.min));if(s.min<0){i.min=-i.max;i.tickInterval*=2}}i=t.display.getCustomScale(s,i);if(r){i.min=0}o=n.calculateYAxisScaleOptions(i.max,i.min);i.tickInterval=o.tickInterval;return i},_buildPlotOptions:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=e.length,i=n.highchartsChartType,o={series:{}},a;o[i]={colorByPoint:n._shouldColorByPoint(r),borderWidth:0,dataLabels:{enabled:n.showDataLabels,x:n.DATA_LABEL_OFFSETS[i][0],y:n.DATA_LABEL_OFFSETS[i][1]}};if(n.isStacked){o.series.stacking="normal";o[i].dataLabels.x=0;o[i].dataLabels.y=0}if(n.isArea){o.area.stacking="normal";o.area.dataLabels.y=30}if(n.isPie||n.isDonut){o.pie.dataLabels={enabled:n.showDataLabels||n.chartMetadata.label_type==="labels",color:"#000000",connectorColor:"#000000"};o.series.dataLabels={formatter:n._formatPieChartDataLabel};if(n.isDonut){o.series.innerSize="40%"}if(n._hasLegend()){o.pie.showInLegend=true}}a=n._calculatePointWidth(e,t);if(a){o[i].pointWidth=a}return{plotOptions:o}},_getNumPoints:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r;n=_.map(e,function(e){return e.data?e.data.length:0});if(t.isStacked){r=_.max(n)}else{r=_.reduce(n,function(e,t){return e+t},0)}return r},_calculatePointWidth:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=n._getNumPoints(e),i=n.question.survey.state.isDashboardMode(),o=t.chart,a=null;if(i&&r>2){return a}if(n.highchartsChartType==="column"){if(i){a=(o.width-o.marginBottom-o.marginTop)/4}else if(r<=4){a=80}else if(r<=6){a=60}}else if(n.highchartsChartType==="bar"){if(i){a=(o.height-100)/4}else if(r<=4){a=50}else if(r<=6){a=40}}return a},_shouldColorByPoint:function(e){var t=_____WB$wombat$check$this$function_____(this),n;if(e===1){if(_.contains(["line","area"],t.highchartsChartType)||t.isStacked||t.isMirrored&&!t.isCompared||t.isCompared&&!t.isMirrored){n=false}else{n=true}}else{n=false}return n},_buildTooltipOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t={tooltip:{}};if(e.showDataLabels&&!e.isStacked){t.tooltip.enabled=false}return t},_buildLegendOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t={legend:{enabled:e._hasLegend(),labelFormatter:function(){this.name=_.escape(this.name);return'<div style="width:'+e.ITEM_STYLE_WIDTH+'px;text-overflow: ellipsis;overflow: hidden;" title="'+this.name+'">'+this.name+"</div>"}}};if(e._hasLegend()){t.legend.enabled=true;t.legend.symbolHeight=16;if(e.isPie||e.isDonut){t.legend.align="center"}else{t.legend.x=75;t.legend.align="left";t.legend.width=514}if(e.isStacked){t.legend.y=20}if(e.question.isNPS()&&e.isStacked&&e.nps_depth===SM.QuestionDisplayModel.DISPLAY_VALUES.nps_detailed){t.legend.itemDistance=15}}return t},_hasTitle:function(){var e=_____WB$wombat$check$this$function_____(this);return e.questionType==="menu_matrix"||e.questionType==="compare"&&e.questionFamily==="matrix"},_hasLegend:function(){var e=_____WB$wombat$check$this$function_____(this);if((e.isPie||e.isDonut)&&e.chartMetadata.label_type!=="legend"){return false}if(e.nps_depth===SM.QuestionDisplayModel.DISPLAY_VALUES.nps_score&&e.question.isCompared()){return false}return(e.questionType==="simple"&&e.isStacked||e.questionType==="matrix"||e.questionType==="menu_matrix"||e.questionType==="compare"||(e.isPie||e.isDonut)&&e.chartMetadata.label_type==="legend")&&!e.isWeightedAvg},_isVertical:function(){var e=_____WB$wombat$check$this$function_____(this);if(!e.highchartsChartType){throw new Error("_isVertical requires highchartsChartType to be set")}return _.contains(["column","area","line"],e.highchartsChartType)},_formatDataLabel:function(){var e=this.series.options.__options,t=this.point.__options||{},n=e.scaleType,r=e.decimalPlaces;if(t.disableDataLabels){return null}if(this.y===0){return null}return SM.Highcharts.formatYValue(this.y,n,r)},_formatPieChartDataLabel:function(){var e=this.series.options.__options,t=e.showDataLabels,n=e.isLegend,r,i,o;r=SM.Highcharts.formatTextualAxisLabel(this.point.name,150,4);i=this.point.absoluteY;o=SM.Highcharts.formatYValue(this.point.percentageY,"percent",e.decimalPlaces);if(i===0){return null}if(t){if(n){return o+"("+i+")"}return r+" <div>"+o+" ("+i+")</div>"}return r},_setDataLabelCoordinates:function(r,e,t){var i=_____WB$wombat$check$this$function_____(this),o=t.type,a=t.height-t.marginTop-t.marginBottom,s=e.max,l,u;if(i.isStacked){return}_.each(r,function(e,n){_.each(e.data,function(e,t){if(typeof e==="number"){l=SM.Highcharts.formatYValue(e,i.scaleType,i.decimalPlaces);u=l.length;if(i._isLabelInsidePoint(u,e.y,s,o,a)){r[n].data[t]={y:e,dataLabels:i._buildDataLabelCoordinateOptions(u)}}}else if(typeof e==="object"){if(e.y){l=SM.Highcharts.formatYValue(e.y,i.scaleType,i.decimalPlaces);u=l.length;if(i._isLabelInsidePoint(u,e.y,s,o,a)){e.dataLabels=i._buildDataLabelCoordinateOptions(u)}}}})})},_isLabelInsidePoint:function(e,t,n,r,i){var o=_____WB$wombat$check$this$function_____(this);if(o.isVertical){return SM.Highcharts.DATA_LABEL_CHARACTER_HEIGHT+Math.abs(o.DATA_LABEL_OFFSETS[r][1])+SM.Highcharts.DATA_LABEL_PADDING>(n-t)/n*i}return e*SM.Highcharts.DATA_LABEL_CHARACTER_WIDTH+o.DATA_LABEL_OFFSETS[r][0]+SM.Highcharts.DATA_LABEL_PADDING>(n-t)/n*SM.Highcharts.PLOT_AREA_WIDTH},_buildDataLabelCoordinateOptions:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r,i=10,o=30;n=t.isVertical?0:Math.min(-e*i,-o);r=t.isVertical?Math.max(-e*i,o):0;return{x:n,y:r}},_validateChart:function(){var e=_____WB$wombat$check$this$function_____(this),t,n;if(e.question.isSlider()&&(e.chartType==="area"||e.chartType==="line")){t=e.question.survey.anviews.defaultView;n=e.display.getChartTypeUpdates("hbar");e.display.updateTempDisplay(n);e.display.setDisplayUpdates(n);t.updateDisplayData(e.question.ID,n,{isCompared:e.question.isCompared(),untypedKeys:SM.QuestionDisplayModel.UNTYPED_DISPLAY_OPTIONS,done:function(){e.render()}});e.render()}}}));SM.NpsSummaryChartView=SM.Views.deepExtend(SM.BaseSummaryChartView,{__NAME:"NpsSummaryChartView",HIGHCHARTS_CHART_TYPE_MAP:{vbar:"column",hbar:"bar",stacked_vbar:"column",stacked_hbar:"bar",score_gauge:"score",score_vbar:"column",score_hbar:"bar"},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this);e._getDisplayOptions();e._getChartMetadata();e._getSortedSummaryData();e._getNpsData();if(e.nps_depth===SM.QuestionDisplayModel.DISPLAY_VALUES.nps_score&&e.question.isCompared()){e._setAsSummarizableNpsScoreComparedChart()}else{e._setAsSummarizableNps(e.nps_depth)}},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t,n;e.$el.empty();e.seriesList=[];if(e.summary.answered===0&&!e.displayData.show_benchmark){e._showNoResponsesMsg();return}if(e.chartType===SM.QuestionDisplayModel.DISPLAY_VALUES.score_gauge){_.bindAll(this,"_renderGaugeShapes");e._renderScoreChart();return}t=e._buildQuestionOptions();n=_.map(t,e._compileChartOptions);_.each(n,e._renderChart)},_buildColorOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t={};if(e.nps_depth===SM.QuestionDisplayModel.DISPLAY_VALUES.nps_distribution){t.colors=SM.Highcharts.NPS_DISTRIBUTION_COLORS}else if(e.nps_depth===SM.QuestionDisplayModel.DISPLAY_VALUES.nps_detailed){t.colors=SM.Highcharts.NPS_DETAILED_DISTRIBUTION_COLORS}else{t.colors=SM.Highcharts.DEFAULT_COLORS}return t},_buildTooltipOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t;t=SM.BaseSummaryChartView._buildTooltipOptions.call(this);if(e.nps_depth===SM.QuestionDisplayModel.DISPLAY_VALUES.nps_score){t.tooltip.formatter=SM.Highcharts.formatTooltipNpsScore}else if(e.nps_depth===SM.QuestionDisplayModel.DISPLAY_VALUES.nps_detailed){t.tooltip.formatter=SM.Highcharts.formatTooltipNpsDetailed}return t},_getChartMetadata:function(){var e=_____WB$wombat$check$this$function_____(this);e.chartType=e.displayData.chart_type;e.nps_depth=e.displayData.nps_depth;e.hasXAxis=true;e.showDataLabels=e.displayData.show_data;e.hasTitle=e._hasTitle();e.hasLegend=e._hasLegend();e.highchartsChartType=e.HIGHCHARTS_CHART_TYPE_MAP[e.chartType];e.isVertical=e._isVertical()},_buildQuestionOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t;if(e.summaryType==="matrix"){t=[e._buildMatrixChartOptions()]}else{t=[e._buildSimpleChartOptions()]}if(e.nps_depth===SM.QuestionDisplayModel.DISPLAY_VALUES.nps_score){SM.Object.deepUpdate(t[0],SM.Highcharts.NPS_SCORE_BAR_CHART_OPTIONS)}return t},_buildSimpleChartOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t,n,r,i=e.summary,o=e.answerStructures.rows;if(e.isStacked){n=[];r=e.buildSimpleStackedSeries(i,o)}else{n=e.buildCategories(o);r=e.buildSimpleSeries(i,o)}t={xAxis:e._buildXAxisOptions(n),series:r,yAxis:e._buildYAxisOptions(r)};return t},buildCategories:function(e){var t=_____WB$wombat$check$this$function_____(this),n;if(t.nps_depth===SM.QuestionDisplayModel.DISPLAY_VALUES.nps_detailed&&t.chartType===SM.QuestionDisplayModel.DISPLAY_VALUES.vbar&&!t.question.isCompared()){n=true}else{n=false}return _.map(e,function(e,t){if(t===0&&n){return"0"}if(t===10&&n){return"10"}return e.text})},_renderScoreChart:function(){var e=_____WB$wombat$check$this$function_____(this),t=SM.Highcharts.NPS_SCORE_CHART_BASE_OPTIONS,n=e.question.displayOptions;if(e.question.survey.state.isDashboardMode()){t.chart.height=n.height;t.chart.width=n.height*320/240}e.$el.highcharts(t,e._renderGaugeShapes)},_renderGaugeShapes:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.question.survey,r=n.isExport,i=t.npsSummary.score.summary.summary.options.Score.count,o=t.question.survey.state.isDashboardMode();SM.Highcharts.renderGaugeShapes(e,i,t.$el,r,o)}});SM.SummaryTMBCChartContainerView=SM.Views.register({__NAME:"summaryTMBCChartContainerView",__templateID:"summary-tmbc-chart-container-template",__model:"tmbc",__create:function(e){var t=_____WB$wombat$check$this$function_____(this);if(t.get("isTop2")){t.question=e.question;t.survey=t.question.survey}else{t.survey=t.tmbc.survey}t.tmbcType=e.tmbcType;t.chartType=e.chartType;t.questionView=e.questionView},__beforeRender:function(){return{isShown:true}},__afterRender:function(){var t=_____WB$wombat$check$this$function_____(this),e,n,r=t.get("showBenchmark");if(t._shouldHideChart()){return}try{if(t.chartType===SM.QuestionDisplayModel.DISPLAY_VALUES.donut||t.get("isTop2")){n=SM.TMBCSummaryChartView;t.$el.addClass("short")}else{n=SM.TMBCBoxPlotView}e=SM.Views.create(n,{model:t.tmbc,tmbcType:t.tmbcType,benchmarkDisplay:r,questionView:t.questionView,question:t.question});t.$el.html(e.el);t.chartView=e}catch(e){t._handleRenderingError(e)}},_shouldHideChart:function(){return false},_handleRenderingError:function(e){var t=_____WB$wombat$check$this$function_____(this),n;n=document.createElement("div");n.innerHTML=SM.Template.render("summary-chart-display-error-template");t.$el.html(n);SM.Error.log(e,"tmbc summary chart rendering error")},__init:function(){},_onDisplayChange:function(e){var t=e.data.self;if(t.question.hasRandomAssignment()&&!!t.randomAssignmentOption){t.question.randomAssignmentOption=t.randomAssignmentOption}t.render()}});SM.TMBCSummaryChartView=SM.Views.register({__NAME:"TMBCSummaryChartView",__templateID:"summary-chart-template",__model:"tmbc",TEXT_RADIUS:115,CHAR_W:7,CHAR_H:12,COLOR_EMPTY:"#CCC",TMBC_COLOR_OPTIONS:{colors:["#00BF6F","#E0E0E0"]},TMBC_CHART_OPTIONS:{chart:{width:328,height:215,noResponses:false,margin:[0,0,0,0],spacingTop:0,spacingBottom:0,spacingLeft:0,spacingRight:0,style:{fontFamily:"National2"},plotBackgroundColor:"#FFF",type:"pie",renderTo:{},events:{}},title:{text:null},colors:["#507CB6","#E0E0E0"],plotOptions:{series:{animation:false,point:{events:{}},events:{},innerSize:156},pie:{size:186,marker:{states:{hover:{enabled:false}}},center:["50%","50%"],colorByPoint:true,borderWidth:1,borderColor:null,dataLabels:{enabled:false},startAngle:0,endAngle:360.5}},labels:[],legend:{enabled:false},tooltip:{enabled:false},credits:{enabled:false},series:[{data:[{y:1},{y:1}]}]},__create:function(e){this.chartType=SM.QuestionDisplayModel.DISPLAY_VALUES.donut;this.tmbcType=e.tmbcType;this.benchmarkDisplay=e.benchmarkDisplay;if(SM.Browser.isIE8){this.TMBC_CHART_OPTIONS.plotOptions.pie.borderWidth=0}this.isTop2=e.question?e.question.isTop2():false;this.survey=e.question?e.question.survey:this.tmbc.survey;if(this.isTop2){this.summary=e.summary;this.series=e.series;this.rollup=e.question.getRollup()}this.DEFAULT_HIGHCHARTS_OPTIONS=SM.Object.deepExtend(SM.Highcharts.DEFAULT_OPTIONS,{plotOptions:{series:{dataLabels:{formatter:this._formatDataLabel}}}});_.bindAll(this,"_compileChartOptions","_renderChart")},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t,n,r=this.survey,i={};if(!this.isTop2&&this.tmbc.hasError()){this.$el.addClass("bm-error");i.notApplicable=this.tmbc.getError()==="no_access";i.noData=this.tmbc.getError()==="no_data";i.isNPS=true;i.user_id=r.currentUserID;i.name=this.tmbc.getSegmentName();i.useBMStr=i.name.indexOf("Benchmark")===-1;i.source="tmbc";this.$el.html(SM.Template.render("summary-benchmark-data-not-available-template",i));return}this.$el.removeClass("bm-error");this.$el.addClass("sm-bm-nps");if(this.isTop2){this.$el.addClass("top2")}e.$el.empty();e.seriesList=[];e.$el.empty();e.seriesList=[];if(e.chartType===SM.QuestionDisplayModel.DISPLAY_VALUES.donut){_.bindAll(this,"_renderTMBCShapes");e._renderTMBCChart();return}t=e._buildQuestionOptions();n=_.map(t,e._compileChartOptions);_.each(n,e._renderChart)},__init:function(){this.$el.on(SM.Event.CLICK,"[cta]",{self:this},this._onBuyBenchmarksClicked)},_compileChartOptions:function(e,c){var t=_____WB$wombat$check$this$function_____(this),n,r,i,o,a,s,p,l,d,u;u=$("<div></div>");u.attr("chart-type",t.chartType);l=e.series;t.seriesList.push(l);d=e.xAxis.categories;n=t._buildChartOptions(l,d,u,c);r=t._buildEventOptions(u);s=t._buildColorOptions();i=t._buildPlotOptions(l);o=t._buildTooltipOptions();a=t._buildLegendOptions();t._setDataLabelCoordinates(l,e.yAxis,n.chart);p=SM.Object.deepExtend(t.DEFAULT_HIGHCHARTS_OPTIONS,n,r,s,i,o,a,e);return p},_renderChart:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r=$(e.chart.renderTo),i;t.$el.append(r);if(t.isBoxplot){i=t._renderBoxPlotLabels}else{i=function(){}}n=new window.Highcharts.Chart(e,i);t._bindEvents(r,n)},_onBuyBenchmarksClicked:function(e){var t=e.data.self,n=$(e.target),r=n.attr("link"),i=n.attr("source");e.preventDefault();e.stopPropagation();SM.Bi.benchmarkingAbout(t.question.ID,i,r,t.question.isNPS());r=r+"?param="+t.question.survey.currentUserID;window.open(r,"_blank")},_renderTMBCShapes:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.survey.isExport,r,i;if(e.userOptions.chart.isBenchmark){i=t._$bmNpsCtnr;if(t.isTop2){r=Math.round(t.series[1].data[1].y*10)/10}else{r=Math.round(t.tmbc.getTMBCBenchmarkValue(t.tmbcType))}}else{i=t._$userNpsCtnr;if(t.isTop2){r=Math.round(t.series[0].data[0].y*10)/10}else{r=Math.round(t.tmbc.getTMBCValue(t.tmbcType))}}SM.Highcharts.renderTMBCShapes(e,r,i,n)},_renderTMBCChart:function(){var e=_____WB$wombat$check$this$function_____(this),t,n,c,p,r,i,o=0,a,s=0,l,u="Segment";e.$el.addClass("sm-bm-nps");t=$.extend(true,{},e.TMBC_CHART_OPTIONS);t.chart.showingBenchmark=e.benchmarkDisplay;t.chart.tmbcType=e.tmbcType;t.chart.isTop2=e.isTop2;if(e.benchmarkDisplay){if(e.isTop2){n=$("<div/>").html(e.series[0].name).text();o=e.rollup.answered;a=Globalize.localize("Answered: ")+" "+o;if(o===0){a=Globalize.localize("Answered: 0")}else if(o===1){a=Globalize.localize("Answered: 1")}s=e.rollup.skipped;l=Globalize.localize("Skipped: ")+" "+s;if(s===0){l=Globalize.localize("Skipped: 0")}else if(s===1){l=Globalize.localize("Skipped: 1")}u=e.survey.benchmarkRollups.getSegmentName()}else{n=$("<div/>").html(e.tmbc.getTMBCName(e.tmbcType)).text();u=e.tmbc.getSegmentName()}c=SM.Template.render("tmbc-chart-template",{title:n,side:"left",isBenchmark:false,isTop2:e.isTop2,answeredStr:a,skippedStr:l});p=SM.Template.render("tmbc-chart-template",{title:u,isTop2:e.isTop2,side:"right",isBenchmark:true});e.$el.append($(c));e.$el.append($(p));e._$userNpsCtnr=e.$el.find(".sm-bm-nps-chart.left");e._$bmNpsCtnr=e.$el.find(".sm-bm-nps-chart.right")}else{e.$el.addClass("tmbc");e._$userNpsCtnr=e.$el;t.chart.width*=2}if(e.isTop2){r=e.series[0].data[0].y}else{r=e.tmbc.getTMBCValue(e.tmbcType)}if(e.tmbcType===SM.TMBCModel.TMBC_TYPE_GEI){i=e.tmbc.getGrade(r);t.tooltip.settings={grade:i.grade};t.tooltip.settings[i.key]=true;r/=1.1}else{t.tooltip.settings={}}if(e.isTop2){t.chart.score=Math.round(r*10)/10}else{t.chart.score=Math.round(r)}if(r<1){r=50;t.colors[0]=t.colors[1];t.plotOptions.pie.borderColor=t.colors[0]}else if(r>99){r=50;t.colors[1]=t.colors[0];t.plotOptions.pie.borderColor=t.colors[0]}t.series[0].data[0].y=r;t.series[0].data[1].y=100-r;e._$userNpsCtnr.highcharts(t,e._renderTMBCShapes);if(e.benchmarkDisplay){t=$.extend(true,{},e.TMBC_CHART_OPTIONS,e.TMBC_COLOR_OPTIONS);t.chart.showingBenchmark=e.benchmarkDisplay;t.chart.tmbcType=e.tmbcType;if(e.isTop2){r=e.series[1].data[1].y;t.chart.isTop2=true}else{r=e.tmbc.getTMBCBenchmarkValue(e.tmbcType)}if(e.tmbcType===SM.TMBCModel.TMBC_TYPE_GEI){r/=1.1}if(e.isTop2){t.chart.score=Math.round(r*10)/10}else{t.chart.score=Math.round(r)}if(r<1){r=50;t.colors[0]=t.colors[1];t.plotOptions.pie.borderColor=t.colors[0]}else if(r>99){r=50;t.colors[1]=t.colors[0];t.plotOptions.pie.borderColor=t.colors[0]}t.series[0].data[0].y=r;t.series[0].data[1].y=100-r;t.chart.isBenchmark=true;e._$bmNpsCtnr.highcharts(t,e._renderTMBCShapes)}}});SM.TMBCBoxPlotView=SM.Views.register({__NAME:"TMBCBoxPlotView",__templateID:"summary-chart-template",__model:"tmbc",__create:function(e){this.chartType="boxplot";this.isBoxplot=true;this.tmbcType=e.tmbcType;this.highchartsChartType="boxplot";this.hasLegend=true;this.DEFAULT_HIGHCHARTS_OPTIONS=SM.Object.deepExtend(SM.Highcharts.DEFAULT_OPTIONS,{chart:{forcePercent:this.tmbcType===this.tmbc.TMBC_TYPE_ENGAGEMENT},plotOptions:{series:{dataLabels:{formatter:this._formatDataLabel}}}});_.bindAll(this,"_compileChartOptions","_renderChart")},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t,n,r=this.tmbc.survey,i={};if(this.showBenchmark&&(this.tmbc.hasError()||this.tmbc.wasEdited())){this.$el.addClass("bm-error");i.notApplicable=this.tmbc.getError()==="no_access";i.noData=this.tmbc.getError()==="no_data";i.wasEdited=this.tmbc.wasEdited();i.isNPS=false;i.user_id=r.currentUserID;i.name=this.tmbc.getSegmentName();i.source="tmbc";this.$el.html(SM.Template.render("tmbc-data-not-available-template",i));return}this.$el.removeClass("bm-error");_.bindAll(this,"_renderBoxPlotLabels");e.$el.empty();e.seriesList=[];t=e._buildQuestionOptions();n=_.map(t,e._compileChartOptions);_.each(n,e._renderChart)},__init:function(){},_buildPlotOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t={plotOptions:{series:{}}};t.plotOptions[e.highchartsChartType]={colorByPoint:false,borderWidth:0,dataLabels:{enabled:e.showDataLabels,x:10,y:0}};return t},_buildTooltipOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t={tooltip:{}};if(e.showDataLabels){t.tooltip.enabled=false}return t},_buildLegendOptions:function(){var e={legend:{enabled:true}};e.legend.x=75;e.legend.align="left";e.legend.width=514;return e},_compileChartOptions:function(e,c){var t=_____WB$wombat$check$this$function_____(this),n,r,i,o,a,s,p,l,d,u;u=$("<div></div>");u.attr("chart-type",t.chartType);l=e.series;t.seriesList.push(l);d=e.xAxis.categories;n=t._buildChartOptions(l,d,u,c);r=t._buildEventOptions(u);s=t._buildColorOptions();i=t._buildPlotOptions(l);o=t._buildTooltipOptions();a=t._buildLegendOptions();p=SM.Object.deepExtend(t.DEFAULT_HIGHCHARTS_OPTIONS,n,r,s,i,o,a,e);return p},_renderChart:function(e){var t=_____WB$wombat$check$this$function_____(this),n=$(e.chart.renderTo),r;t.$el.append(n);if(t.isBoxplot){r=t._renderBoxPlotLabels}else{r=function(){}}return new window.Highcharts.Chart(e,r)},_buildQuestionOptions:function(){var e=[];if(this.isBoxplot){e=[this._buildBoxPlotOptions()]}return e},BOXPLOT_LINE_WIDTH:4,BOXPLOT_MEDIAN_WIDTH:2,BOXPLOT_MEDIAN_COLOR:"#FFFFFF",BOXPLOT_USER_VALUE_LINE_WIDTH:2,_buildTMBCQuartileChartSeries:function(n){var e=this.tmbc.getQuartileValues(this.tmbcType),t,r=[],i=[],o=n.colors[0],a=SM.Highcharts.DEFAULT_BENCHMARK_COLORS.slice(1),s;n.names=[Globalize.localize("Minimum"),Globalize.localize("Lower Quartile"),Globalize.localize("Median"),Globalize.localize("Upper Quartile"),Globalize.localize("Maximum")];t=this.tmbc.getTMBCValue(this.tmbcType);s=Globalize.localize("Your average");r.push({name:s,color:a[0],lineWidth:this.BOXPLOT_USER_VALUE_LINE_WIDTH,data:[{y:t,absoluteY:t,percentageY:t,name:s}]});_.each(e,function(e,t){i.push({y:e,absoluteY:e,percentageY:e,name:n.names[t]})});i=[[],[],i,[]];r.push({name:this.tmbc.getSegmentName(),pointWidth:58,data:i,tooltip:{headerFormat:"<em>Experiment No {point.key}</em><br/>"},color:o,fillColor:o,stemColor:o,stemWidth:this.BOXPLOT_LINE_WIDTH,whiskerColor:o,whiskerWidth:this.BOXPLOT_LINE_WIDTH,medianColor:this.BOXPLOT_MEDIAN_COLOR,medianWidth:this.BOXPLOT_MEDIAN_WIDTH,__options:{dimensionType:"benchmark"}});return r},_fixBoxPlotSeries:function(e){var t=[],n=2,r;r=_.filter(e,function(e){if(e.__options&&e.__options.dimensionType==="benchmark"){return e}});_.each(r[0].data[n],function(e){t.push(e.y)});r[0].data[n]=t;this.dataBoxPlot=t;return e},_buildBoxPlotOptions:function(){var e=function(){var e=this.axis.width/3,t=SM.Highcharts.X_AXIS_MAX_VISIBLE_LINES,n=this.value,r;if(i.tmbcType===i.tmbc.TMBC_TYPE_ENGAGEMENT){r=SM.Highcharts.getGlobalizeFormatType("percent",0);n=Globalize.format(this.value/100,r)}return SM.Highcharts.formatAxisLabel(n,e,t)},i=_____WB$wombat$check$this$function_____(this),t={colors:SM.Highcharts.DEFAULT_BENCHMARK_COLORS},n,r=2,o=this._buildTMBCQuartileChartSeries(t),a=0,s=i.tmbcType===i.tmbc.TMBC_TYPE_GEI?110:100,l=i.tmbcType===i.tmbc.TMBC_TYPE_GEI?27.5:25,u={chart:{type:"boxplot",inverted:true,width:SM.Highcharts.CHART_WIDTH,isNPS:false},plotOptions:{boxplot:{dataLabels:{enabled:true}}},xAxis:{categories:["","","",""]},yAxis:{tickInterval:l,min:a,max:s,labels:{formatter:e}},legend:{labelFormatter:SM.Highcharts.legendUnescapedFormatter},series:this._fixBoxPlotSeries(o),tooltip:{enabled:false}};n=this.tmbc.getTMBCValue(this.tmbcType);u.yAxis.plotLines=[{__options:{grade:this.tmbc.getGrade(n),tmbcType:this.tmbcType},value:n,color:t.colors[1],width:r,zIndex:100,events:{mouseover:i._tmbcMouseOver,mouseout:i._tmbcMouseOut}}];this.dataPlotLabels=[n];u.yAxis.gridLineColor="#FFF";return u},buildCategories:function(e){return _.map(e,function(e){var t=e.text.replace(/\/([^\s])/g,"/ $1");return t})},_buildChartOptions:function(e,t,n){var r=_____WB$wombat$check$this$function_____(this),i=e.length,o=_.isEmpty(t)?0:t.length,a=r.hasTitle?r.TITLE_HEIGHT:0,s=r.hasXAxis?SM.Highcharts.calculateXAxisLabelHeight(r.highchartsChartType,t):0,l=r.hasLegend?SM.Highcharts.calculateLegendHeight(e):0;var u={chart:{type:r.highchartsChartType,width:SM.Highcharts.calculateChartWidth(r.highchartsChartType,{numSeries:i,numXAxisLabels:o,isStacked:r.isStacked,isCompared:r.isCompared}),height:SM.Highcharts.calculateChartHeight(r.highchartsChartType,{answerStructures:{rows:[0,50,100],cols:[]},titleHeight:a,labelHeight:s,legendHeight:l,isDistribution:true,isCompared:false,isStacked:false,isMirrored:false,chartIndex:0})-25,marginTop:SM.Highcharts.calculateMarginTop(0,a),marginBottom:SM.Highcharts.calculateMarginBottom(s,l),renderTo:n[0]}};return u},_tmbcMouseOver:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.axis.chart.series[0],r=t.axis.chart.userOptions.yAxis.plotLines[0].__options,i=$(e.currentTarget),o=$(n.legendItem.element);if(o.length){o.toggleClass("point-hovered")}if(r.tmbcType==="tmbc_engagement"){return}if(i.find(".popout.tmbc").length<1){i.append('<div class="popout sidi-popout tmbc"></div>')}if(t._tmbcpopout){t._tmbcpopout.__settings.offsetY=e.offsetY}else{r.grade.offsetY=e.offsetY;t._tmbcpopout=i.tmbcpopout(r.grade).data("tmbcpopout");t._tmbcpopout._beforeShow()}t._tmbcpopout._isHovered=true;t._tmbcpopout._show()},_tmbcMouseOut:function(){var e=this.axis.chart.series[0],t=$(e.legendItem.element);if(t.length){t.toggleClass("point-hovered")}},_buildEventOptions:function(){if(SM.App.isSharingApp()){return}return{plotOptions:{series:{point:{events:{mouseOver:SM.Highcharts.onPointMouseOver,mouseOut:SM.Highcharts.onPointMouseOver}}}}}},_buildColorOptions:function(){return{}},_hasLegend:function(){return!!this.isBoxplot},_renderBoxPlotLabels:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.dataBoxPlot;SM.Highcharts.renderBoxPlotLabels(e,n);if(t.dataPlotLabels){SM.Highcharts.renderBoxPlotLabels(e,t.dataPlotLabels,true)}}});SM.SummaryQuizSummaryChartView=SM.Views.register(SM.Object.deepExtend(SM.SummarySeriesFactory,{__NAME:"summaryQuizSummaryChartView",__templateID:"summary-quiz-summary-chart-template",XAXIS_LABELS:["0-10%","11-20%","21-30%","31-40%","41-50%","51-60%","61-70%","71-80%","81-90%","91-100%"],__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.question=e.quizSummary;t.rollup=t.question.getRollup();t.display=t.rollup.display;t._createAsSummarizable(_.extend(e,{question:t.question,noLabelByWeight:true,noLabelBySidi:true}));t.quizChartOptions=SM.Object.deepCopy(SM.Highcharts.QUIZ_SUMMARY_CHART_OPTIONS);_.bindAll(this,"_compileChartOptions","_renderChart")},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this);e._getDisplayOptions();e._getChartMetadata();e._getSortedSummaryData()},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t,n,r="no-matching-responses-template";e.$el.empty();e.seriesList=[];t=[e._buildSimpleChartOptions()];n=_.map(t,e._compileChartOptions);if(_.size(n[0].series)===0){e.$el.html(SM.Template.render(r,{isBenchmarkable:false,classes:"mod-no-header"}));return}_.each(n,e._renderChart)},_compileChartOptions:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r,i,o,a,s=e.series,l=e.xAxis.categories,u=$("<div></div>");u.attr("chart-type",n.chartType);if(n.question.survey.isExport){u.addClass("sm-chart")}n.seriesList.push(s);r=n._buildChartOptions(s,l,u,t);i=n._buildEventOptions(u);o=n._buildTooltipOptions();n._setDataLabelCoordinates(s,e.yAxis,r.chart);a=SM.Object.deepExtend(n.quizChartOptions,r,i,o,e);return a},_renderChart:function(e){var t=_____WB$wombat$check$this$function_____(this),n=$(e.chart.renderTo),r=new window.Highcharts.Chart(e,function(){});t.$el.append(n);if(!SM.App.isSharingApp()){SM.Highcharts.bindYAxisEvents(n,r.yAxis[0]);SM.Highcharts.bindAreaChartEvents(n);SM.Highcharts.bindXAxisEvents(n)}},_getChartMetadata:function(){var e=_____WB$wombat$check$this$function_____(this);e.chartMetadata=e.rollup.display.getDisplayData();e.chartType=e.chartMetadata.chart_type;e.scaleType="absolute";e.scaleIsPercent=false;e.hideEmptyData=false;e.highchartsChartType="column"},_buildSimpleChartOptions:function(){var n=_____WB$wombat$check$this$function_____(this),e=n.sortedRowsList[0],t=_.map(e,function(e){return e.value}),r=n.buildSimpleSeries(n.summary,e);return{xAxis:{categories:t,title:{text:Globalize.localize("Score"),offset:28},labels:{formatter:function(){var e=parseInt(this.axis.categories[0],10),t=this.value/e-1;return n.XAXIS_LABELS[t]}}},series:r,yAxis:n._buildYAxisOptions(r)}},_buildChartOptions:function(e,t,n,r){var i=_____WB$wombat$check$this$function_____(this),o=SM.Highcharts.calculateXAxisLabelHeight(i.highchartsChartType,t);return{chart:{type:i.highchartsChartType,width:625,height:SM.Highcharts.calculateChartHeight(i.highchartsChartType,{answerStructures:i.answerStructures,titleHeight:0,labelHeight:o,legendHeight:0,isDistribution:false,isCompared:false,isStacked:false,isMirrored:false,chartIndex:r}),marginBottom:SM.Highcharts.calculateMarginBottom(o,5),renderTo:n[0]}}},_buildEventOptions:function(){var e;if(SM.App.isSharingApp()){return}e={plotOptions:{series:{point:{events:{mouseOver:SM.Highcharts.onPointMouseOver,mouseOut:SM.Highcharts.onPointMouseOut}}}}};return e},_buildYAxisOptions:function(e){var t={title:{text:Globalize.localize("Number of respondents")}},n=SM.Highcharts,r=n.calculateSeriesRange(e),i=n.calculateYAxisScaleOptions(Math.max(r.max,-r.min)),o=n.calculateYAxisScaleOptions(i.max,i.min);i.tickInterval=o.tickInterval;SM.Object.deepUpdate(t,i);return t},_buildTooltipOptions:function(){var i=_____WB$wombat$check$this$function_____(this);return{tooltip:{formatter:function(){var e=SM.Highcharts.formatYValue(this.point.absoluteY,"absolute",0),t=this.point.x,n=t===0?0:t/10+.01,r=parseInt(this.point.category,10)/(t+1);return SM.Template.render("summary-quiz-summary-chart-tooltip-template",{absoluteY:e,label:i.XAXIS_LABELS[t],startVal:Globalize.format(r*n,"n1"),endVal:Globalize.format(r*(t+1)/10,"n1"),total:Globalize.format(r,"n0")})}}}},_setDataLabelCoordinates:function(e){var n=_____WB$wombat$check$this$function_____(this);_.each(e,function(e){_.each(e.data,function(e){var t;if(e.y){t=SM.Highcharts.formatYValue(e.y,n.scaleType,n.decimalPlaces);e.dataLabels={x:0,y:Math.max(-t.length*10,30)}}})})}}));SM.SummaryTableContainerView=SM.Views.register({__NAME:"SummaryTableContainerView",__templateID:"summary-table-container-template",__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.survey=e.survey;t.question=e.question;t.rollup=t.question.getRollup();t.display=t.rollup.display;t.tableViewType=e.tableViewType;t.hasBenchmarkingOptions=e.hasBenchmarkingOptions;t.isExport=e.isExport;t.randomAssignmentOption=e.randomAssignmentOption;t._showingBenchmark=t.display.getDisplayData().show_benchmark;t.benchmarkRollup=t.question.survey.getBenchmarkRollup(t.question.ID);if(t.hasBenchmarkingOptions&&t.question.isTop2()){t.isTop2=t.display.isTop2()}_.bindAll(this,"_onTableDisplayChange","_onDisplaySaving","_setHighlightedLabelCell")},__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.bindModel(e.display,"displayChange",{self:e},e._onTableDisplayChange);e.bindModel(e.display,"tempDisplayChange",{self:e},e._onTableDisplayChange);e.bindModel(e.display,"allDisplaysChange",{self:e},e._onTableDisplayChange);e.bindModel(e.display,"saving",{self:e},e._onDisplaySaving);if(e.benchmarkRollup){e.benchmarkRollup.rollupList.on("benchmarkRollupLoaded",{self:e},e._onBenchmarkRollupLoaded);e.bindModel(e.benchmarkRollup,"revertBenchmarkRollup",{self:e},e._onRevertBenchmarkRollup)}e.$el.on("setHighlightedLabelCell",e._setHighlightedLabelCell)},__afterRender:function(){var t=_____WB$wombat$check$this$function_____(this),e,n,r,i,o,a,s=t.question,l=t.$el,c=t._shouldHideTable(),u=s.isTop2()?" top2":"";try{if(s.isTop2()){l.addClass("top2")}l.html("");if(s.isQuiz()&&parseInt(t.rollup.answered,10)>0&&!this.survey.isCovid19Template()){e=SM.Views.create(SM.QuizStatsTableView,{question:s,isBasicStats:i,highlightedDimensionID:t.highlightedDimensionID,isExport:t.isExport,isTop2:t.isTop2});l.append(e.el);l.append($('<div class="sm-bs-space'+u+'"></div>'))}n=t._getTableViewType();e=SM.Views.create(n,{question:s,highlightedDimensionID:t.highlightedDimensionID,isExport:t.isExport,isTop2:t.isTop2});if(s.isNPS()&&!e.isNPSScoreValid()&&!t._hasBenchmarking()){return}if(!c){l.append(e.el)}i=!s.isQuiz()&&e.showBasicStats&&s.getRollup().hasBasicStats()&&!s.isNPS();n=t._getAuxiliaryTableViewType(i);if(n){l.append($('<div class="sm-bs-space'+u+'"></div>'));if(s.isTop2()){l.append($('<div class="sm-bs-space top2 ledger"></div>'))}o=t._hasBenchmarking()&&s.isNPS()&&s.isCompared();if(o){a=SM.Template.render("benchmark-nps-distribution-table-title",{});l.append($(a))}e=SM.Views.create(n,{question:s,isBasicStats:i,highlightedDimensionID:t.highlightedDimensionID,isExport:t.isExport,isTop2:t.isTop2});l.append(e.el);if(o){l.append($('<div class="sm-bs-space"></div>'));e=SM.Views.create(SM.BenchmarkNpsDistributionTableView,{question:s,highlightedDimensionID:t.highlightedDimensionID,isExport:t.isExport});l.append(e.el)}}if(!SM.App.isSharingApp()&&!t.isExport&&!t._hasBenchmarking()){r=SM.Views.create(SM.CombineHideFooterView,{rollup:t.rollup,isMultiple:true,isSingle:true,isNone:false});l.append(r.el)}}catch(e){t._handleRenderingError(e)}},_hasBenchmarking:function(){return this.hasBenchmarkingOptions&&this.survey.owner.hasBenchmarking()&&this._showingBenchmark},_getTableViewType:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.question,n;if(e._hasBenchmarking()){if(!t.isNPS()&&e.display.getDisplayData().isDistribution&&e.display.getChartType()!=="boxplot"){if(t.isCompared()){n=SM.ComparedMatrixSummaryTableView}else{n=SM.BenchmarkMatrixTableView}}else{n=SM.BenchmarkQuartileTableView}}else if(t.isNPS()){if(t.isCompared()){n=SM.NpsComparedMatrixSummaryTableView}else{n=SM.NpsSimpleSummaryTableView}}else if(t.isCompared()){if(t.isMenuMatrix()){n=SM.ComparedMenuMatrixSummaryTablesView}else{n=SM.ComparedMatrixSummaryTableView}}else if(t.isMenuMatrix()){n=SM.MenuMatrixSummaryTablesView}else if(t.isMatrix()){n=SM.MatrixSummaryTableView}else if(t.isNumerical()){n=SM.NumericalSummaryTableView}else if(t.isQuiz()){n=SM.QuizSummaryTableView}else if(t.isClickMap()){n=SM.ClickMapSummaryTableView}else{n=SM.SimpleSummaryTableView}return n},_getAuxiliaryTableViewType:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.question;if(n.isQuiz()){return null}if(t._hasBenchmarking()&&(n.isNPS()||n.isCompared())){if(t.benchmarkRollup.hasError()){return null}if(n.isNPS()){if(n.isCompared()){return SM.NpsComparedMatrixSummaryTableView}return SM.BenchmarkNpsDistributionTableView}if(t.display.getChartType()==="boxplot"){return SM.ComparedAverageTableView}return SM.BenchmarkDistributionTableView}if(e&&!t._hasBenchmarking()){if(n.isMenuMatrix()){return}if(n.isCompared()&&n.isNumerical()){return SM.MenuMatrixBasicStatsTableView}if(n.isSimpleRating()){return SM.SimpleBasicStatsTableView}if(n.isCompared()||n.isMatrix()||n.isNumerical()){return SM.MatrixBasicStatsTableView}if(n.isSimple()){return SM.SimpleBasicStatsTableView}}return null},_shouldHideTable:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.display.getDisplayData(),n,r;if(!t.show_table){return true}if(t.show_benchmark){n=e.question.survey;r=n.getBenchmarkRollup(e.question.ID);return r.hasError()}return false},_handleRenderingError:function(e){var t=_____WB$wombat$check$this$function_____(this),n;n=document.createElement("div");n.innerHTML=SM.Template.render("summary-table-display-error-template");t.$el.html(n);SM.Error.log(e,"question summary table rendering error, QuestionID: "+t.question.ID)},_setHighlightedLabelCell:function(e){var t=_____WB$wombat$check$this$function_____(this);t.highlightedDimensionID=e.answerID},_unsetHighlightedLabelCell:function(){var e=_____WB$wombat$check$this$function_____(this);e.highlightedDimensionID=null},_onTableDisplayChange:function(){var e=_____WB$wombat$check$this$function_____(this);if(e.question.hasRandomAssignment()&&!!e.randomAssignmentOption){e.question.randomAssignmentOption=e.randomAssignmentOption}e.render()},_onDisplaySaving:function(){var e=_____WB$wombat$check$this$function_____(this);e._unsetHighlightedLabelCell()},_onBenchmarkRollupLoaded:function(e){var t=e.data.self,n=e.questionID;if(n===t.question.ID){t._showingBenchmark=true;t.render()}},_onRevertBenchmarkRollup:function(e){var t=e.data.self;t._showingBenchmark=false;t.render()}});SM.BaseSummaryTableView=SM.Object.deepExtend(SM.SummarySeriesFactory,{__defaults:{tableOptions:{headingsType:null,showFooter:false,hideExpandLinks:false},seriesOptions:{},seriesData:{},labelsData:{}},__create:function(e){var t=_____WB$wombat$check$this$function_____(this);if(!e.question.survey.owner.isStatisticalSignificanceEnabled()){e=_.extend(e,{noLabelBySidi:true})}t._createAsSummarizable(e);t._buildLocalizedLabels();t._bindEvents(e.events);t._runIntegrityChecks();t.seriesOptions=t.__settings.seriesOptions;t.tableOptions=t.__settings.tableOptions;t.isExport=e.isExport;t.highlightedDimensionID=e.highlightedDimensionID},_runIntegrityChecks:function(){var e=_____WB$wombat$check$this$function_____(this);if(e.__settings.tableOptions.headingsType===undefined){throw new Error('You must define tableOptions.headingsType as one of "series" or "labels"')}},_buildLocalizedLabels:function(){var e=_____WB$wombat$check$this$function_____(this);e.localizedLabels={answerChoices:Globalize.localize("Answer Choices"),responses:Globalize.localize("Responses"),total:Globalize.localize("Total"),score:Globalize.localize("Net Promoter&#174; Score"),totalNumber:Globalize.localize("Total Number"),totalRespondents:Globalize.localize("Total Respondents"),averageNumber:Globalize.localize("Average Number"),averageRating:Globalize.localize("Weighted Average"),averageRanking:Globalize.localize("Score")}},_bindEvents:function(){_.bindAll(this,"_onCaptionClick","_onThClick","_onTdClick","_onThActionSelected","_onTAToggleLinkClick")},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this);e._getDisplayOptions();e._getSortedSummaryData();if(e._setSeriesOptions){e._setSeriesOptions(e.get("seriesOptions"))}},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.empty();e._renderTable();e.$el.find(".q").popout();if(e.question.survey.owner.isStatisticalSignificanceEnabled()&&e.question.isStatisticalSignificanceEnabled()&&!e.rollup.comparedByRA&&e.showSidi&&e.isMirrored){e._renderSidiPopout()}},_renderSidiPopout:function(){var f=_____WB$wombat$check$this$function_____(this),m=SM.App.isSharingApp(),g=f.question.survey.isExport,y=Globalize.culture().name==="en"&&SM.ENABLE_AUDIENCE_CTA,e=f.$el.find("tbody td"),b="tr",v="td",w="table",E="th",S="caption";if(g){e=f.$el.find("div[display=tbody] div[display=td]");w="div[display=table]";b="div[display=tr]";v="div[display=td]";E="div[display=th]";S="div[display=caption]"}e.each(function(){var e=$(this),t,n,c,r,p,d,i,o,a,s,l,h,u;if(!e.find(".sm-data-table-liner").length){return}r=e.closest(b);d=r.find(v+":first-child");p=r.find(v).length/2;n=e.closest(w);if(n.hasClass("basic-stats-matrix-table")){return}i=d.attr("data-dimension-id");if(!i){return}o=e.closest(w).find(E).eq(e.index());a=o.attr("data-dimension-id");s=o.attr("data-dimension-type")==="totals";if(s){l=SM.String.trim(e.find(".sm-data-total").text()).replace(/[,\s]+|[,\s]+/g,"");s=parseInt(isNaN(l)?0:l,10)<30}if(!a&&!s){return}if(s&&m){return}if(a){if(f.question.isMenuMatrix()){t=n.find(S);c=t.attr("data-dimension-id")}u=f.question.getSidiOptions(a,i,c);if(!u){return}if(u.hasSidi){if(!g){e.css({"background-color":"#D9E7E9"})}e.append('<div class="sm-data-table-liner sm-data-sidi">'+u.groups+"</div>")}}else if(s){u={hasSidi:false,needMore:true}}if(!g){e.append('<div class="popout sidi-popout"></div>');h=e.index()<p?"left":"right";u=_.extend(u,{question:f.question,surveyID:f.question.survey.ID,isSharing:m,canBuy:y,tipSide:h});e.sidipopout(u)}})},_renderTable:function(){var t=_____WB$wombat$check$this$function_____(this);_.each(["_buildTableHeaderRowData","_buildTableBodyRowData","_buildTableFooterRowData"],function(e){if(t[e]===undefined){throw new Error("You must define "+e+" in "+t.__NAME)}});if(t.display.isBenchmarkShown()&&t.benchmarkSummary.hasError()){return}if(t._setLabelsAndSeriesData){t._setLabelsAndSeriesData()}if(t.showTitle&&t._renderTitle){t._renderTitle()}SM.Hightables.renderTable(t._getTableOptions());if(t.highlightedDimensionID){t._highlightLabelCell(t.highlightedDimensionID)}},__init:function(){var t=_____WB$wombat$check$this$function_____(this);t.$el.on(SM.Event.CLICK,"[ta-toggle-link]",{self:t},t._onTAToggleLinkClick);t.$el.on("actionMenu.actionSelected","th",{self:t},t._onThActionSelected);t.$el.on("actionMenu.actionSelected","td",{self:t},t._onTdActionSelected);t.$el.on("highlightLabelCell",function(e){t._highlightLabelCell(e.answerID)});t.$el.on("unHighlightLabelCell",function(e){t._unHighlightLabelCell(e.answerID)})},_highlightLabelCell:function(e){var t=_____WB$wombat$check$this$function_____(this);t.$el.find(".highlight").removeClass("highlight");t.$el.find("[data-dimension-id='"+e+"']").addClass("highlight")},_unHighlightLabelCell:function(e){var t=_____WB$wombat$check$this$function_____(this);t.$el.find("[data-dimension-id='"+e+"']").removeClass("highlight")},_getTableOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t=!!e.isExport;return{target:e.$el,tableData:e._getTableData(),tableClasses:e._getTableClasses(),useDivs:t,flattenNestedTables:t,events:e._getTableEvents()}},_getTableData:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r,i,o;e=e||{};if(t._buildTableCaptionData&&t._enableCaption!==false){n=t._buildTableCaptionData(e)}i=t._buildTableBodyRowData(e);r=t._buildTableHeaderRowData(e);o=t._buildTableFooterRowData(e);return{caption:n,thead:{rows:r},tbody:{rows:i},tfoot:{rows:o}}},_getTableLabelsData:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.question,r=false,i,o,a,s,l;o=_.map(e,function(e){if(n.isEmoji()&&e.type==="row"&&n.structure.answers.rows[0].text===e.text){r=true}a={dimensionID:e.id,labelText:e.text,useEmoji:r};if(e.mediaHTML){a.labelHTML=e.mediaHTML}if(t._labelCellHasComments(e)&&t._shouldShowCommentsInLabelCell()){i=t.summary.summary.options[e.id];if(n.randomAssignmentOption){a.variationID=t.question.randomAssignmentOption.toString();if(t.questionFamily==="demographic"){i=t.summary.summary.options[n.randomAssignmentOption]}}else{a.variationID="0"}if(i){s=i.count}else{s=0}a.hasComments=true;a.optionID=e.id;a.responsesCount=s}l=t.rollup.combinehideModel.canCombineHide(e.id);a.hideActionMenu=!t._shouldShowTdActionMenu(e.id,l);return a});return o},_shouldShowTdActionMenu:function(e,t){var n=_____WB$wombat$check$this$function_____(this);if(n.question.isNPS()){if(!n.question.isCompared()){return false}if(!n.isMirrored){return false}}if(n.displayData.show_benchmark){return false}if(n.isBasicStats){return false}if(n.get("isBasicStats")){return false}return n._shouldAllowLabelEditing(e)||t},_labelCellHasComments:function(e){var t=_____WB$wombat$check$this$function_____(this);return t.question.isNumerical()||t.question.isOpenEnded()||e.is_openended&&e.options.is_answer_choice},_shouldShowCommentsInLabelCell:function(){var e=_____WB$wombat$check$this$function_____(this);return!e.isCompared&&e.__NAME!=="MatrixBasicStatsTableView"},_getTableHeaderRowDataForLabels:function(e){var t=_____WB$wombat$check$this$function_____(this),n=e.labelsData,c=e.includeBlankCell,r=[],i={},o=[],a,s,l,u;l=t.numRows;u=l>1;if(c){a=t._buildBlankTableHeaderCell({isSortable:u});o.push(a)}_.each(n,function(e){s=t._getTableHeaderCellCSSClasses(u,e.dimensionType);a={template:e.template||"table-header-cell",context:{labelText:e.text,classes:s,dimensionType:e.dimensionType,hideActionMenu:e.hideActionMenu,variationID:"0"}};if(e.flags){$.extend(a.context,e.flags)}o.push(a)});i.cells=o;r.push(i);return r},_getTableHeaderRowDataForSeries:function(s){var e=s.series,r=s.includeBlankCell,l=s.scopedDimensionID;var u=_____WB$wombat$check$this$function_____(this),t=[],c=[],n={},p,f,i,d,h;i=e[0].data.length;d=i>1;if(r){p=u._buildBlankTableHeaderCell({scopedDimensionID:l,isSortable:d});c.push(p)}_.each(e,function(e){var t=e.__options,n=t.dimensionType,r=t.dimensionID,i=false,o=t.labelText.trim(),a=u.question.isNPS()?o:t.labelHTML;f=u._getTableHeaderCellCSSClasses(d,n,r,l);if(s.hideActionMenu){h=true}else{h=u.isBasicStats&&u.question.isCompared()&&u.question.isNumerical()||!u.get("isBasicStats")&&u.question.isNPS()&&(u.isMirrored||!r)}if(u.question.isEmoji()&&t.dimensionType==="row"&&u.question.getAnswer(t.dimensionID)&&u.question.getAnswer(t.dimensionID).text.trim()===o){i=true}p={template:"table-header-cell",context:{labelText:o||"&nbsp;",labelHTML:a,classes:f,dimensionType:n,dimensionID:r,hasCommentsPerRow:t.hasCommentsPerRow,optionID:r,variationID:"0",responsesCount:t.numComments,columnHasComments:t.numComments>0,colSpan:t.colSpan,hideActionMenu:h,useEmoji:i,isQuiz:e.isQuiz&&!u.question.survey.isCovid19Template(),isQuizCorrect:e.isQuizCorrect&&!u.question.survey.isCovid19Template()}};c.push(p)});n.cells=c;t.push(n);return t},_buildBlankTableHeaderCell:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r,i,o=e.scopedDimensionID,a=e.isSortable;i=t.isBasicStats||t.question.isCompared()&&(!t.get("isBasicStats")&&t.question.isNPS()||t.isBasicStats&&t.question.isNumerical());r="labels";n=t._getTableHeaderCellCSSClasses(a,r,null,o);return{template:"table-header-blank-cell",context:{classes:n,dimensionType:r,hideActionMenu:i,isStatsHeader:t.isBasicStats}}},_getTableBodyRowData:function(e){var n=_____WB$wombat$check$this$function_____(this),r=[],i,o,a,t=e.labelsData,s=e.series;_.each(t,function(e,t){o=[];a=n._buildLabelCell(e);o.push(a);_.each(s,function(e){a=n._buildSeriesCell(e,t);o.push(a)});i={cells:o};r.push(i)});return r},_buildLabelCell:function(e){return{template:"table-label-cell",context:e}},_buildSeriesCell:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r,i,o=e.__options.defaultContext||{},a,s,l,u;r=e.data[t];i=e.__options.dimensionType;a=e.__options.template||"table-response-cell";s=r?r.absoluteY:0;if(s===null){s="--"}o.numResponses=n._formattedNumResponses(s,i);if(n._shouldIncludePercentageData(i)){l=r?r.percentageY:0;if(l!==null){o.percentage=n._formattedPercentage(l)}}if(i==="totals"&&n.question.isCompared()){if(n.summary.answered===0){l=0}else{l=100*Globalize.parseInt(s+"")/n.summary.answered;o.percentage=n._formattedPercentage(l)}}if(r&&r.__options&&r.__options.commentData){u=r.__options.commentData;o.numComments=u.numComments;o.hasComments=u.numComments>0;o.optionID=u.optionID;o.crossedOptionID=u.crossedOptionID;o.matrixCrossTab=u.matrixCross;o.variationID=u.variationID||"0"}return{template:a,context:o}},_formattedNumResponses:function(e){var t=this.get("isBasicStats")||this.isBasicStats?2:0,n=SM.Highcharts.getGlobalizeFormatType("absolute",t);return Globalize.format(e,n)},_formattedPercentage:function(e){var t=SM.Highcharts.getGlobalizeFormatType("percent",this.decimalPlacesPercentage);return Globalize.format(e/100,t)},_shouldIncludePercentageData:function(e){return!_.contains(["totals","averageRating","averageNumber","responses","score"],e)},_getTableFooterRowData:function(e){var t=_____WB$wombat$check$this$function_____(this),n=[],r=e.colSpan,i;if(t.question.isSimple()){r=r>1?r-1:1;i={template:"simple-table-footer-row",context:{colSpan:r,questionIsMultiResponse:t.question.isMultiResponse(),numRespondents:Globalize.format(t.rollup.getContextSummary().answered,"n0")}};n.push(i)}else if(t.question.isNumerical()){i={template:"numerical-table-footer-row",context:{colSpan:e.colSpan===4,numRespondents:Globalize.format(t.rollup.getContextSummary().answered,"n0")}};n.push(i)}if(t._shouldShowCommentsRow()){i={template:"table-footer-comments-row",context:{colSpan:e.colSpan,optionID:e.optionID,variationID:e.variationID,hasComments:e.hasComments,numComments:e.numComments}};n.push(i)}return n},_shouldShowCommentsRow:function(){var e=_____WB$wombat$check$this$function_____(this);if(e.isExport){return false}return e._hasCommentField()&&!e._commentFieldIsAnswer()&&!e._hasCommentFieldPerRow()},_getTableClasses:function(){var e=_____WB$wombat$check$this$function_____(this),t=[];t.push("sm-data-table");if(SM.App.isSharingApp()){t.push("shared")}if(e.questionType==="simple"){t.push("sm-data-table-summary")}else if(e.questionType==="matrix"||e.questionType==="menu_matrix"||e.question.isCompared()){t.push("sm-matrix-table")}if(e.question.isNPS()){if(!e.question.isCompared()){t.push("nps-detailed-table")}else{t.push("nps-compared-table")}}if(e.question.survey.isQuiz){t.push("is-quiz")}if(e.isBasicStats||e.__NAME==="MatrixBasicStatsTableView"){t.push("basic-stats-matrix-table")}return t.join(" ")},_getTableHeaderCellCSSClasses:function(e,t,n,r){var i=_____WB$wombat$check$this$function_____(this),o=[],a;a=i._getSortData(r);if(e){o.push("sortable")}if(_.contains(["totals","averageRating","averageNumber","averageRanking","dataSegment"],t)){o.push(t)}if(a&&a.dimensionType===t){if(n){if(a.dimensionID===n){o.push(a.order)}}else{o.push(a.order)}}if(i.isBasicStats){o.push("basic-stats")}return o.join(" ")},_hasCommentField:function(){var e=_____WB$wombat$check$this$function_____(this);return!!e.question.commentField},_commentFieldIsAnswer:function(){var e=_____WB$wombat$check$this$function_____(this);return!!e.question.commentField.options.is_answer_choice},_hasCommentFieldPerRow:function(){var e=_____WB$wombat$check$this$function_____(this);return e._hasCommentField()&&e.question.commentField.options.apply_all_rows},_shouldAllowLabelEditing:function(e){var t=_____WB$wombat$check$this$function_____(this),n=true;if(!e||t.question.isOpenEnded()||t.question.isCompared()&&t.question.isNumerical()||t.rollup.combinehideModel.isCombined(e)){n=false}return n},_getSortData:function(e){var t=_____WB$wombat$check$this$function_____(this),n;if(e){n=t.displayData.sort_data[e]}else{n=t.displayData.sort_data}return n},_getTableEvents:function(){return{tdMouseEnter:this._onTdMouseEnter,tdMouseLeave:this._onTdMouseLeave,thClick:this._onThClick,tdClick:this._onTdClick}},_onCaptionClick:function(e){var t=_____WB$wombat$check$this$function_____(this),n=$(e.currentTarget),r=n.attr("data-dimension-id"),i={answerID:r,visibleOptions:{labels:true}};SM.CustomizeActionMenu.actionMenu.call(t,e,"caption",i)},_onThClick:function(e){var t=_____WB$wombat$check$this$function_____(this),n=$(e.currentTarget),r=n.attr("data-dimension-type"),i=n.attr("data-dimension-id"),o,a={parent:n,visibleOptions:{}};if(_.isEmpty(r)){return}if(SM.App.isSharingApp()){return}if(n.hasClass("no-action-menu")){return}if(_.contains(["labels","totals","averageRating","averageNumber","responses"],r)||i&&t.rollup.combinehideModel.isCombined(i)){a.visibleOptions.labels=false}else{a.visibleOptions.labels=true}if(r==="labels"){a.visibleOptions.number=false}else{a.visibleOptions.number=true}a.visibleOptions.labels=t._shouldAllowLabelEditing(i);a.answerID=i;if(!t.get("isBasicStats")&&t.question.isNPS()&&!!i){a.visibleOptions.ascending=false;a.visibleOptions.descending=false;a.visibleOptions.unsorted=false}if(n.hasClass("basic-stats")||this.__NAME==="MatrixBasicStatsTableView"){a.visibleOptions.labels=false}if(t.display.getBenchmarkDisplay()){return}o=t.rollup.combinehideModel.getActionMenuOption(i);if(t.question.ID==="quiz_summary"){a.visibleOptions.unsorted=false}SM.CustomizeActionMenu.actionMenu.call(t,e,"th",SM.Object.deepExtend(a,o))},_onThActionSelected:function(e){var t=_____WB$wombat$check$this$function_____(this),n=$(e.target),r=n,i=r.parents("table").eq(0),o=r.attr("data-dimension-type"),c=r.attr("data-dimension-id"),a,s,l,u;if(_.contains(["unsorted","ascending","descending"],e.action)){l=e.action;if(i.attr("data-dimension-id")){a=i.attr("data-dimension-id");s=i.attr("data-dimension-type")}u=i.hasClass("basic-stats-matrix-table");t.rollup.display.sort(o,c,l,s,a,u)}else{t._onCombineHideActionSelected(e)}},_onTdClick:function(e){var t=_____WB$wombat$check$this$function_____(this),n=$(e.target),r=$(e.currentTarget),i,o,a,s={visibleOptions:{}};if(SM.App.isSharingApp()){return}if(r.parents("tfoot").length){return}if(n.is("a")){return}if(r.hasClass("no-action-menu")){return}i=r.attr("data-dimension-id");if(!i){return}s.answerID=i;s.visibleOptions.labels=t._shouldAllowLabelEditing(i);o=t.rollup.combinehideModel.canCombineHide(i);if(t._shouldShowTdActionMenu(i,o)){a=t.rollup.combinehideModel.getActionMenuOption(i);SM.CustomizeActionMenu.actionMenu.call(t,e,"td",SM.Object.deepExtend({parent:r},s,a))}},_onTdActionSelected:function(e){var t=e.data.self;if(t._onCombineHideActionSelected(e)){e.stopPropagation()}},_onTdMouseLeave:function(){},_onTdMouseEnter:function(){},_onCombineHideActionSelected:function(e){var t=e.data.self,n,r;n=e.action;r=e.$action.attr("data-answer-id");if(_.contains(["combine","editCombine","unCombine","hide"],n)){t._handleCombineHideAction(n,r);return true}return false},_handleCombineHideAction:function(e,t){var n=_____WB$wombat$check$this$function_____(this);switch(e){case"combine":SM.Bi.uiTrigger="addCombineQuestionSummaryTableAnswerChoiceMenu";n._openCombineDialog(t,false);break;case"editCombine":SM.Bi.uiTrigger="editCombineQuestionSummaryTableAnswerChoiceMenu";n._openCombineDialog(t,true);break;case"unCombine":SM.Bi.uiTrigger="unCombineQuestionSummaryTableAnswerChoiceMenu";n.rollup.combinehideModel.unCombine(t);break;case"hide":SM.Bi.uiTrigger="hideQuestionSummaryTableAnswerChoiceMenu";n.rollup.combinehideModel.addHide(t);break;default:break}$(document).trigger("combine-event")},_openCombineDialog:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r;r=SM.Views.create(SM.CombineDialogView,{model:n.rollup,answerID:e,isEditCombine:t});r.open();$("body").addClass("modal-open")},_onTAToggleLinkClick:function(e){var t=_____WB$wombat$check$this$function_____(this),n="ta-visible",r="ta-visible",i=$(e.target),o,a,s;e.preventDefault();if(t.question.hasCommentsPerRow()&&!t.question.isCompared()&&t.isMirrored){o=i.parents("th:eq(0)")}else{o=i.parents("td:eq(0)")}a=i.closest("tr").find("["+n+"=true]").not(o);s=o.attr(n)==="true";if(a.length){a.attr(n,"false");a.removeClass(r);t._hideTARowView(a)}if(s){t._hideTARowView(i);o.attr(n,"false");o.removeClass(r)}else{t._expandTARowView(i);o.attr(n,"true");o.addClass(r)}SM.Bi.taToggleResponsesClick()},_expandTARowView:function(e){var t=_____WB$wombat$check$this$function_____(this),n=e.attr("option-id"),r=e.attr("variation-id"),i=e.attr("crossed-option-id"),o=e.attr("matrix-crosstab"),a=e.data("responseCount"),s,l,u=e.closest("tr");if(t.question.isFileUpload()){s=t.rollup.getFileUploadModel(n,i,o,r)}else{s=t.rollup.getTaModel(n,i,r);if(!s){s=t.rollup.createTaModel(n,i,o,r)}s.set("filterCount",a)}l=SM.Views.create(SM.SummaryTaRowView,{question:t.question,model:s});u.after(l.el);$(l.el).data("containerView",l)},_hideTARowView:function(e){var t=e.closest("tr"),n=t.next();n.data("containerView").destroy();n.hide()},_getQuizScoresData:function(e,r){var t=_____WB$wombat$check$this$function_____(this),i=t.summary.summary.quiz_stats,o,a,s;if(!i){return}s=i.option_values;return _.map(e,function(n){var e=_.find(s,function(e,t){if(r){o=n.__options.dimensionID;a=n.__options.labelText}else{o=n.dimensionID;a=n.labelText}return t===o});if(e&&e.score!==-1){n.isQuiz=true;n.isQuizCorrect=e.is_correct;if(t.question.survey.isCovid19Template()){n.isQuiz=false;n.isQuizCorrect=false}return{name:a,isCorrect:e.is_correct,score:Globalize.format(e.score,"n0"),total:Globalize.format(i.total_score,"n0")}}return{name:a,noScore:true}})}});SM.SimpleSummaryTableView=SM.Views.deepExtend(SM.BaseSummaryTableView,{__NAME:"SimpleSummaryTableView",__templateID:"summary-table-template",_buildTableHeaderRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t,n;n=[{text:e.localizedLabels.answerChoices,dimensionType:e.DIMENSION_TYPES.LABELS},{text:e.localizedLabels.responses,dimensionType:e.DIMENSION_TYPES.RESPONSES}];t=e._getTableHeaderRowDataForLabels({labelsData:n});return t},_buildTableBodyRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t,n=e.sortedRowsList[0],r,i;r=e._getTableLabelsData(n);i=e.buildSimpleSeries(e.summary,n,e.seriesOptions);t=e._getTableBodyRowData({labelsData:r,series:i});return t},_buildTableFooterRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t={colSpan:2},n,r="0";if(e._hasCommentField()&&!e._commentFieldIsAnswer()){n=e.summary.other_option||0;if(e.question.randomAssignmentOption){r=e.question.randomAssignmentOption.toString()}_.extend(t,{optionID:e.question.commentField.id,variationID:r,hasComments:n>0,numComments:n})}return e._getTableFooterRowData(t)}});SM.NpsSimpleSummaryTableView=SM.Views.deepExtend(SM.SimpleSummaryTableView,{__NAME:"NpsSimpleSummaryTableView",__templateID:"summary-table-template",__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this);e._getDisplayOptions();e._getSortedSummaryData();e._getNpsData()},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.empty();if(e.isDepthDetailed){e._renderTable()}e._renderDistributionTable()},_buildTableHeaderRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t,n;n=[{text:"",dimensionType:e.DIMENSION_TYPES.LABELS,hideActionMenu:true},{text:e.localizedLabels.responses,dimensionType:e.DIMENSION_TYPES.RESPONSES,hideActionMenu:true}];t=e._getTableHeaderRowDataForLabels({labelsData:n});return t},_renderDistributionTable:function(){var e=_____WB$wombat$check$this$function_____(this),t,n;t=e._buildDistributionSeries();t.hasHeader=e.isDepthDetailed;n=SM.Template.renderHTML("nps-distribution-table",t);e.$el.prepend(n)},_buildTableCaptionData:function(){return{template:"table-caption",context:{caption:Globalize.localize("Answer Choices"),dimensionID:"scopedDimension.id",mediaCaption:Globalize.localize("Answer Choices"),classes:""}}},_buildDistributionSeries:function(){var e=_____WB$wombat$check$this$function_____(this),t,n=e.decimalPlacesPercentage,r=SM.Highcharts.formatYValue;t=e.buildSimpleSeries(e.npsSummary.distribution.summary,e.npsSummary.distribution.answerStructures.rows);if(e.nps_depth==="score"){n=e.decimalPlaces}return{Detractors:{name:t[0].data[0].name,percent:r(t[0].data[0].percentageY,"percent",n),value:e._formattedNumResponses(t[0].data[0].absoluteY)},Passives:{name:t[0].data[1].name,percent:r(t[0].data[1].percentageY,"percent",n),value:e._formattedNumResponses(t[0].data[1].absoluteY)},Promoters:{name:t[0].data[2].name,percent:r(t[0].data[2].percentageY,"percent",n),value:e._formattedNumResponses(t[0].data[2].absoluteY)},Score:Math.round(t[0].data[2].percentageY-t[0].data[0].percentageY)}},_getDisplayOptions:function(){var e=_____WB$wombat$check$this$function_____(this);SM.Summarizable._getDisplayOptions.call(e);e.nps_depth=e.displayData.nps_depth;e.isDepthDetailed=e.displayData.isDepthDetailed}});SM.NumericalSummaryTableView=SM.Views.extend(SM.BaseSummaryTableView,{__NAME:"NumericalSummaryTableView",__templateID:"summary-table-template",_setSeriesOptions:function(e){var t=_____WB$wombat$check$this$function_____(this);e.averageSeriesName=t.localizedLabels.averageNumber;e.totalSeriesName=t.localizedLabels.totalNumber;e.responsesSeriesName=t.localizedLabels.responses},_buildTableHeaderRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t,n,r;n=[{text:e.localizedLabels.answerChoices,dimensionType:e.DIMENSION_TYPES.LABELS},{text:e.localizedLabels.averageNumber,dimensionType:e.DIMENSION_TYPES.AVERAGE_NUMBER},{text:e.localizedLabels.totalNumber,dimensionType:e.DIMENSION_TYPES.TOTALS},{text:e.localizedLabels.responses,dimensionType:e.DIMENSION_TYPES.RESPONSES}];r=n;t=e._getTableHeaderRowDataForLabels({labelsData:r});return t},_buildTableBodyRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t,n=e.sortedRowsList[0],r,i,o=e.get("seriesOptions");i=e.buildNumericalSeries(o);r=e._getTableLabelsData(n);t=e._getTableBodyRowData({labelsData:r,series:i});return t},_buildTableFooterRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t;t=e._getTableFooterRowData({colSpan:4});return t}});SM.MatrixSummaryTableView=SM.Views.extend(SM.BaseSummaryTableView,{__NAME:"MatrixSummaryTableView",__templateID:"summary-table-template",_setSeriesOptions:function(e){var t=_____WB$wombat$check$this$function_____(this);e.includeTotal=true;if(t.question.isMultiResponse()){e.totalSeriesName=t.localizedLabels.totalRespondents}else{e.totalSeriesName=t.localizedLabels.total}if(t.question.isRating()||t.question.isRanking()){e.includeAverage=true;if(t.question.isRating()){e.averageSeriesName=t.localizedLabels.averageRating}else{e.averageSeriesName=t.localizedLabels.averageRanking}}},_setLabelsAndSeriesData:function(){var e=_____WB$wombat$check$this$function_____(this),t,n,r=e.get("seriesOptions");if(e.isMirrored){n=e.sortedColumnsList[0];e.labelsData=e._getTableLabelsData(n);e.seriesData=e.buildMirroredMatrixSeries(r)}else{t=e.sortedRowsList[0];e.seriesData=e.buildMatrixSeries(r);if(e._hasCommentFieldPerRow()){e.labelsData=e._getCommentsPerRowTableLabelsData(t)}else{e.labelsData=e._getTableLabelsData(t)}}},_getCommentsPerRowTableLabelsData:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r,i,o;return _.map(e,function(e){n=t.summary.summary.options[e.id];i=n&&n.row_other?n.row_other:0;o=t.question.randomAssignmentOption?t.question.randomAssignmentOption:0;r={variationID:o,labelText:e.text,labelHTML:e.mediaHTML,hasCommentsPerRow:true,optionID:e.id,responsesCount:i,rowHasComments:i>0};return r})},_buildTableHeaderRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t;t=e._getTableHeaderRowDataForSeries({series:e.seriesData,includeBlankCell:true});return t},_buildTableBodyRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t;t=e._getTableBodyRowData({labelsData:e.labelsData,series:e.seriesData});return t},_buildTableFooterRowData:function(){var e=_____WB$wombat$check$this$function_____(this);var t;var n;var r;if(e._hasCommentField()&&!e._hasCommentFieldPerRow()){r=e.summary.other_option||0;n={colSpan:e.seriesData.length+1,optionID:e.question.commentField.id,variationID:e.question.randomAssignmentOption,hasComments:r>0,numComments:r};t=e._getTableFooterRowData(n);return t}}});SM.BaseMenuMatrixSummaryTablesView=SM.Views.extend(SM.BaseSummaryTableView,{__NAME:"BaseMenuMatrixSummaryTablesView",__templateID:"summary-table-template",_setSeriesOptions:function(e){var t=_____WB$wombat$check$this$function_____(this);e.includeTotal=true;e.totalSeriesName=t.localizedLabels.total;e.averageSeriesName=t.localizedLabels.averageNumber;if(t.question.isRating()||t.question.isRanking()){e.includeAverage=true;if(t.question.isRating()){e.averageSeriesName=t.localizedLabels.averageRating}else{e.averageSeriesName=t.localizedLabels.averageRanking}}},__afterRender:function(){var n=_____WB$wombat$check$this$function_____(this),r;n.$el.empty();if(!n.dimensionalSplitKey){throw new Error("You must define self.dimensionalSplitKey for menu-matrix questions")}_.each(n[n.dimensionalSplitKey],function(e,t){n._setLabelsAndSeriesData(e,t);r=n._getTableOptions(e,t);SM.Hightables.renderTable(r);if(n.showBasicStats&&n.question.getRollup().hasBasicStats()&&!n.question.isNumerical()){n.isBasicStats=true;n._enableCaption=false;n._setLabelsAndSeriesData(e,t);r=n._getTableOptions(e,t);SM.Hightables.renderTable(r);n._enableCaption=true;n.isBasicStats=false}});if(n._hasOtherCommentsTable()){n._renderOtherCommentsTable()}if(n.highlightedDimensionID){n._highlightLabelCell(n.highlightedDimensionID)}n.$el.find(".q").popout();if(n.question.survey.owner.isStatisticalSignificanceEnabled()&&n.showSidi&&n.isMirrored){n._renderSidiPopout()}},_getTableOptions:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=n._getTableData({scopedDimension:e,scopedDimensionIndex:t}),i=n._getTableClasses(),o=!!n.isExport,a,s;if(n.isBasicStats){s=$('<div class="sm-bs-menu-matrix-table"></div>')}else if(n.showBasicStats){s=$('<div class="sm-bs-table"></div>')}else{s=$("<div></div>")}n.$el.append(s);a={target:s,tableData:r,tableClasses:i,tableAttrs:{"dimension-id":e.id,"dimension-type":e.type},events:{captionClick:n._onCaptionClick,thClick:n._onThClick,tdClick:n._onTdClick},useDivs:o,flattenNestedTables:o};return a},_buildTableCaptionData:function(e){var t=_____WB$wombat$check$this$function_____(this),n=e.scopedDimension,r=false;if(t.question.isEmoji()&&n.type==="row"&&t.question.getAnswer(n.id).text===n.text){r=true}return{template:"table-caption",context:{caption:n.text,dimensionID:n.id,mediaCaption:n.mediaHTML,classes:"",useEmoji:r}}},_buildTableHeaderRowData:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r=e.scopedDimension.id;n=t._getTableHeaderRowDataForSeries({series:t.seriesData,includeBlankCell:true,scopedDimensionID:r});return n},_buildTableBodyRowData:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r=e.scopedDimension.id;n=t._getTableBodyRowData({labelsData:t.labelsData,series:t.seriesData,scopedDimensionID:r});return n}});SM.MenuMatrixSummaryTablesView=SM.Views.extend(SM.BaseMenuMatrixSummaryTablesView,{__NAME:"MenuMatrixSummaryTablesView",dimensionalSplitKey:"columns",_setLabelsAndSeriesData:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=n.get("seriesOptions"),i,o;if(n.isBasicStats){i=n.sortedRowsListBS[t]}else if(n.isMirrored){i=n.sortedColumnChoicesList[t]}else{i=n.sortedRowsList[t]}n.labelsData=n._getTableLabelsData(i);if(n.isBasicStats){o=SM.BasicStatsUtils.getStructure("column_choice");r={isBasicStats:true}}else{o=e.items}n.seriesData=n.buildMenuMatrixSeries(e,t,o,n.columnChoiceTotalsByColumnChoice,r)},_buildTableFooterRowData:function(){},_hasOtherCommentsTable:function(){var e=_____WB$wombat$check$this$function_____(this);return e._hasCommentField()},_getOtherTableData:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.summary.other_option||0;return{optionID:e.question.commentField.id,hasComments:t>0,numComments:t,variationID:"0"}},_renderOtherCommentsTable:function(){var e=_____WB$wombat$check$this$function_____(this),t=e._getOtherTableData();e.$el.append(SM.Template.render("other-comments-for-menu-matrix-table",t))}});SM.ComparedMatrixSummaryTableView=SM.Views.deepExtend(SM.BaseSummaryTableView,{__NAME:"ComparedMatrixSummaryTableView",__templateID:"summary-table-template",__create:function(e){SM.BaseSummaryTableView.__create.call(this,e);this.isTop2=e.isTop2;this.showTitle=this.isTop2},_renderTitle:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.rollup.answeredCount,n=t===0?0:e.rollup.top2compositeSummary.answered/t,r=Globalize.format(n,"p1"),i=SM.Template.render("top2-table-title",{score:r});e.$el.prepend($(i))},_setSeriesOptions:function(e){var t=_____WB$wombat$check$this$function_____(this);e.includeTotal=true;e.totalSeriesName=t.localizedLabels.total},_setLabelsAndSeriesData:function(){var e=_____WB$wombat$check$this$function_____(this),t,n,r=e.get("seriesOptions"),i=e.get("isTop2");if(i){e.decimalPlacesPercentage=1}if(e.isMirrored){n=e.sortedColumnsList[0];e.labelsData=e._getTableLabelsData(n);if(i){r.isTable=true;r.isCompared=true;e.seriesData=e.buildTop2StackedSeries(r)}else{e.seriesData=e.buildMirroredMatrixSeries(r)}}else{t=e.sortedRowsList[0];e.seriesData=e.buildMatrixSeries(r);e.labelsData=e._getTableLabelsData(t)}},_buildTableHeaderRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t;if(e.question.survey.isQuiz){e._getQuizScoresData(e.seriesData,true)}t=e._getTableHeaderRowDataForSeries({series:e.seriesData,includeBlankCell:true,hideActionMenu:e.display.getBenchmarkDisplay()});return t},_buildTableBodyRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t;if(e.question.survey.isQuiz){e._getQuizScoresData(e.labelsData,false)}t=e._getTableBodyRowData({labelsData:e.labelsData,series:e.seriesData});return t},_buildTableFooterRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t,n={};if(e._hasCommentField()&&!e._commentFieldIsAnswer()){n.showComments=true}t=e._getTableFooterRowData(n);return t},_getTableFooterRowData:function(e){var t=_____WB$wombat$check$this$function_____(this),n=[],r,i;r=t._getTableFooterTotalsRowData();n.push(r);if(e.showComments){if(t.isMirrored){i=t._getMirroredTableFooterCommentsRowData();n.push(i)}else{i=t._getTableFooterCommentsRowData();n.push(i)}}return n},_getTableFooterTotalsRowData:function(){var n=_____WB$wombat$check$this$function_____(this),e,r=[],i=n.get("isTop2"),o=i&&n.sortedColumnsList[0].length>1;r.push({template:"table-label-cell",context:{hideActionMenu:n.question.isNPS(),labelText:n.localizedLabels.totalRespondents}});if(i){e=[n.rollup.top2compositeSummary.answered]}else if(n.isMirrored){e=_.map(n.rows,function(e){return n.respondentCountsByRow[e.id]})}else{e=_.map(n.columns,function(e){return n.respondentCountsByColumn[e.id]})}_.each(e,function(e){var t=i?e===0?0:e*100/n.rollup.answeredCount:0;n.top2Percentage=n._formattedPercentage(t);r.push({template:"table-footer-total-cell",context:{hasPercentage:o,percentage:n.top2Percentage,total:n._formattedNumResponses(e)}})});r.push({template:"table-footer-total-cell",context:{hasPercentage:o,percentage:n._formattedPercentage(100),total:n._formattedNumResponses(n.rollup.answeredCount)}});if(n.get("seriesOptions").includeScore){r.push({template:"table-footer-total-cell",context:{total:""}})}return{cells:r}},_getTableFooterCommentsRowData:function(){var t=_____WB$wombat$check$this$function_____(this),e=t.question.getRollup(),n,c=t.sortedColumnsList[0],r,i,o=0,a,s=[],l,u;try{n=e.options.other_option.options}catch(e){n=null}r=e.summary.crossed_cols?"1":"0";l={template:"table-label-cell",context:{labelText:t.question.commentField.text}};s.push(l);_.each(c,function(e){if(n&&n[e.id]){u=n[e.id];i=u.count}else{i=0}o+=i;l={template:"table-footer-comment-cell",context:{hasComments:i>0,numComments:i,optionID:t.question.commentField.id,crossedOptionID:e.id,matrixCrossTab:r,responsesCount:i}};s.push(l)});l={template:"table-footer-total-cell",context:{total:o}};s.push(l);a={cells:s};return a},_getMirroredTableFooterCommentsRowData:function(){var t=_____WB$wombat$check$this$function_____(this),n=t.question.getRollup(),r,c=t.sortedColumnsList[0],i=[],o,a,s,l,e,u;try{r=n.options.other_option.options}catch(e){r=null}l=n.summary.crossed_cols?"1":"0";_.each(c,function(e){if(r&&r[e.id]){s=r[e.id].count}else{s=0}if(l==="2"){u=e.id||0;u.toString()}else if(n.comparedByRA&&t.question.hasRandomAssignment()){u=t.question.randomAssignmentOption}else{u="0"}a=[{labelText:e.text,numComments:s,hasComments:s>0,optionID:t.question.commentField.id,crossedOptionID:e.id,matrixCrossTab:l,variationID:u}];o={cells:a};i.push(o)});e=t.numRows+2;return{template:"mirrored-compared-other-comments-for-matrix-table",context:{otherFieldLabel:t.question.commentField.text,rows:i,colSpan:e,variationID:"0"}}}});SM.NpsComparedMatrixSummaryTableView=SM.Views.deepExtend(SM.ComparedMatrixSummaryTableView,{__NAME:"NpsComparedMatrixSummaryTableView",__templateID:"summary-table-template",_setSeriesOptions:function(e){var t=_____WB$wombat$check$this$function_____(this);e.includeTotal=true;e.totalSeriesName=t.localizedLabels.total;e.includeScore=true;e.scoreSeriesName=t.localizedLabels.score},_unsetSeriesOptions:function(e){e.includeScore=false},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this);e._getDisplayOptions();e._getSortedSummaryData();e._getNpsData()},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.empty();e._enableCaption=e.nps_depth===SM.QuestionDisplayModel.DISPLAY_VALUES.nps_detailed;e.isMirrored=true;e._setAsSummarizableNps(SM.QuestionDisplayModel.DISPLAY_VALUES.nps_distribution);e._setSeriesOptions(e.get("seriesOptions"));e._renderTable();if(e.nps_depth===SM.QuestionDisplayModel.DISPLAY_VALUES.nps_detailed){e.isMirrored=false;e._setAsSummarizableNps(SM.QuestionDisplayModel.DISPLAY_VALUES.nps_detailed);e._unsetSeriesOptions(e.get("seriesOptions"));e._renderTable()}e.isMirrored=true},_buildTableCaptionData:function(){var e=_____WB$wombat$check$this$function_____(this);return{template:"table-caption",context:{caption:Globalize.localize("Net Promoter Score"),dimensionID:"",mediaCaption:Globalize.localize(e.isMirrored?"Net Promoter Score":"Answer Choices"),classes:""}}},_getDisplayOptions:function(){var e=_____WB$wombat$check$this$function_____(this);e.displayData=e.rollup.display.getDisplayData();e.isDepthDetailed=e.displayData.isDepthDetailed;e.showTable=e.displayData.show_table;e.showChart=e.displayData.show_chart;e.isMirrored=e.displayData.mirror;e.isStacked=e.displayData.isStacked;e.isWeightedAvg=e.displayData.isWeightedAvg;e.showDataLabels=e.displayData.show_data;e.hideEmptyData=!e.displayData.show_empty_data;e.scaleType=e.displayData.scale_type;e.scaleIsPercent=e.scaleType===e.SCALE_TYPE_PERCENT;e.decimalPlaces=e.scaleIsPercent?e.displayData.dp_percentage:e.displayData.dp_absolute;if(e.displayData.nps_depth==="score"){e.decimalPlacesAbsolute="0";e.decimalPlacesPercentage=e.displayData.dp_absolute}else{e.decimalPlacesAbsolute=e.displayData.dp_absolute;e.decimalPlacesPercentage=e.displayData.dp_percentage}e.nps_depth=e.displayData.nps_depth;e.showBasicStats=e.displayData.show_basic_stats;e.showSidi=e.displayData.show_sig_diffs}});SM.ComparedMenuMatrixSummaryTablesView=SM.Views.extend(SM.BaseMenuMatrixSummaryTablesView,{__NAME:"ComparedMenuMatrixSummaryTablesView",dimensionalSplitKey:"rows",_setLabelsAndSeriesData:function(t,e){var n=_____WB$wombat$check$this$function_____(this),r,i,o,a,s,l,c,p,u;r=n.get("seriesOptions");i=t.items;if(n.isMirrored||n.isBasicStats){o=n.isBasicStats?n.sortedColumnChoicesListBS[e]:n.sortedColumnChoicesList[e];n.labelsData=n._getTableLabelsData(o);if(n.question.survey.isQuiz){n._getQuizScoresData(n.labelsData,false)}if(n.isMirrored&&n._hasCommentFieldPerRow()){l=n.summary.summary.options[t.id];u=n.summary.crossed_question_id?n.summary.crossed_question_id:0;p=u&&n.question.survey.questions[u].family==="matrix"?1:0;c=n.question.randomAssignmentOption?n.question.randomAssignmentOption:0;if(!n.isBasicStats){n.labelsData=_.map(n.labelsData,function(e){e.hasCommentsPerRow=true;e.optionID=t.id;e.variationID=c;e.matrixCrossTab=p;if(e.dimensionID&&e.dimensionID>0){e.crossedOptionID=e.dimensionID}e.responsesCount=n.summary&&l.row_other_with_comments_per_row&&l.row_other_with_comments_per_row[e.dimensionID]||l.row_other||0;e.rowHasComments=e.responsesCount>0;return e})}}}else{a=n.sortedColumnsList[e];n.labelsData=n._getTableLabelsData(a)}s=n.columnChoiceTotalsByRow[t.id];if(n.isBasicStats){r={columns:SM.BasicStatsUtils.getStructure(),isBasicStats:true}}n.seriesData=n.buildComparedMatrixSeries(t,i,s,r)},_buildTableFooterRowData:function(){},_hasOtherCommentsTable:function(){var e=_____WB$wombat$check$this$function_____(this);return e._hasCommentField()&&!e._commentFieldIsAnswer()&&!e._hasCommentFieldPerRow()},_crossedOptionInOtherSummary:function(e,t){var n=_.find(e,function(e){return t in e});return n?n[t]:{count:0}},_getOtherTableData:function(){var t=_____WB$wombat$check$this$function_____(this),n=t.question.getRollup(),r,i=[],o,a=[],s,l,c=0,u,p,e;try{r=n.options.other_option.options.other_option.options}catch(e){r=null}p=n.summary.crossed_cols?"1":"0";_.each(t.crossedOptions,function(e){o={text:e.text};i.push(o);if(r){if(r[e.id]){l=r[e.id].count}else if(t._crossedOptionInOtherSummary(r,e.id)){l=t._crossedOptionInOtherSummary(r,e.id).count}}else{l=0}if(n.comparedByRA&&t.question.hasRandomAssignment()){u=t.question.randomAssignmentOption}else{u=e.variable_id||0;u=u.toString()}c+=l;s={hasComments:l>0,numComments:l,optionID:t.question.commentField.id,crossedOptionID:e.id,matrixCrossTab:p,variationID:u};a.push(s)});if(t.isMirrored){e=t.columns.length+2}else{e=t.crossedOptions.length+2}return{crossedOptionLabels:i,otherOptionLabel:t.question.commentField.text,crossedOptionCells:a,totalNumComments:c,colSpan:e}},_renderOtherCommentsTable:function(){var e=_____WB$wombat$check$this$function_____(this),t=e._getOtherTableData();e.$el.append(SM.Template.render("compared-other-comments-for-menu-matrix-table",t))}});SM.MenuMatrixBasicStatsTableView=SM.Views.extend(SM.BaseMenuMatrixSummaryTablesView,{__NAME:"MenuMatrixBasicStatsTableView",dimensionalSplitKey:"rows",_setLabelsAndSeriesData:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r;r=t.columns;n=SM.BasicStatsUtils.getStructure();t.isBasicStats=true;t.labelsData=t._getTableLabelsData(t.columns);t.seriesData=t.buildComparedMatrixSeriesNumericalBasicStats(e,n,r)},_hasOtherCommentsTable:function(){return false},_buildTableFooterRowData:function(){}});SM.MatrixBasicStatsTableView=SM.Views.extend(SM.BaseSummaryTableView,{__NAME:"MatrixBasicStatsTableView",__templateID:"summary-table-template",_buildTableCaptionData:function(){return{template:"table-caption-bs-stats",context:{caption:"Basic Statistics",dimensionID:"",mediaCaption:Globalize.localize("Basic Statistics"),classes:""}}},_setLabelsAndSeriesData:function(){var e=_____WB$wombat$check$this$function_____(this),t,n;if(e.question.isCompared()){n=e.sortedColumnsListBS[0];e.labelsData=e._getTableLabelsData(n);e.seriesData=e.buildMirroredMatrixSeries({isBasicStats:true,rows:SM.BasicStatsUtils.getStructure("row")})}else{t=e.sortedRowsListBS[0];e.seriesData=e.buildMatrixSeries({isBasicStats:true,columns:SM.BasicStatsUtils.getStructure()});e.labelsData=e._getTableLabelsData(t)}},_buildTableHeaderRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t;t=e._getTableHeaderRowDataForSeries({series:e.seriesData,includeBlankCell:true});return t},_buildTableBodyRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t;t=e._getTableBodyRowData({labelsData:e.labelsData,series:e.seriesData});return t},_buildTableFooterRowData:function(){}});SM.SimpleBasicStatsTableView=SM.Views.extend(SM.BaseSummaryTableView,{__NAME:"SimpleBasicStatsTableView",__templateID:"summary-table-template",__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.empty();e._renderTable();e.$el.find(".q").popout()},_renderTable:function(){var e=_____WB$wombat$check$this$function_____(this),t,n;t=e._buildTemplateData();n=SM.Template.renderHTML("simple-basic-stats-table",t);e.$el.prepend(n)},_buildTemplateData:function(){var e=_____WB$wombat$check$this$function_____(this),t;if(e.question.isMatrix()){t=e.buildMatrixSeries({isBasicStats:true,columns:SM.BasicStatsUtils.getStructure()});return{min:e._formattedNumResponses(t[0].data[0].absoluteY),max:e._formattedNumResponses(t[1].data[0].absoluteY),median:e._formattedNumResponses(t[2].data[0].absoluteY),mean:e._formattedNumResponses(t[3].data[0].absoluteY),std:e._formattedNumResponses(t[4].data[0].absoluteY)}}t=e.buildSimpleSeries(e.summary,SM.BasicStatsUtils.getStructure(),{isBasicStats:true});return{min:e._formattedNumResponses(t[0].data[0].absoluteY),max:e._formattedNumResponses(t[0].data[1].absoluteY),median:e._formattedNumResponses(t[0].data[2].absoluteY),mean:e._formattedNumResponses(t[0].data[3].absoluteY),std:e._formattedNumResponses(t[0].data[4].absoluteY)}}});SM.SummaryTaRowView=SM.Views.register({__NAME:"SummaryTaRowView",__templateID:"summary-ta-row-template",__model:"taModel",__init:function(){if(!this.taModel.hasLoaded()){this.taModel.on("loaded",{self:this},this._onLoaded);this.taModel.fetch()}},__create:function(e){this.question=e.question;this.containerView=null},__destroy:function(){this.taModel.off("loaded",this._onLoaded);if(this.containerView){this.containerView.destroy()}},__beforeRender:function(){return{isLoading:!this.taModel.hasLoaded()}},__afterRender:function(){if(this.taModel.hasLoaded()){this.containerView=SM.Views.create(this.taModel.filoData?SM.SummaryFileUploadContainerView:SM.TaContainerView,{question:this.question,model:this.taModel});this.$el.find("td").append(this.containerView.el)}},_onLoaded:function(e){e.data.self.render()}});SM.TMBCTableContainerView=SM.Views.register({__NAME:"TMBCTableContainerView",__templateID:"summary-table-container-template",__model:"tmbc",__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.tmbcType=e.tmbcType;t.tableViewType=e.tableViewType;t.isExport=e.isExport;t._showingBenchmark=true;_.bindAll(this,"_onTableDisplayChange","_setHighlightedLabelCell")},__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.on("setHighlightedLabelCell",e._setHighlightedLabelCell)},__afterRender:function(){var t=_____WB$wombat$check$this$function_____(this),e,n;if(t._shouldHideTable()){return}try{n=t._getTableViewType();e=SM.Views.create(n,{model:t.tmbc,tmbcType:t.tmbcType,highlightedDimensionID:t.highlightedDimensionID,isExport:t.isExport});t.$el.html(e.el)}catch(e){t._handleRenderingError(e)}},_hasBenchmarking:function(){return this.survey.owner.hasBenchmarking()&&this._showingBenchmark},_getTableViewType:function(){return SM.TMBCQuartileTableView},_shouldHideTable:function(){return false},_handleRenderingError:function(e){var t=_____WB$wombat$check$this$function_____(this),n;n=document.createElement("div");n.innerHTML=SM.Template.render("summary-table-display-error-template");t.$el.html(n);SM.Error.log(e,"tmbc summary table rendering error")},_setHighlightedLabelCell:function(e){var t=_____WB$wombat$check$this$function_____(this);t.highlightedDimensionID=e.answerID},_unsetHighlightedLabelCell:function(){var e=_____WB$wombat$check$this$function_____(this);e.highlightedDimensionID=null},_onTableDisplayChange:function(){this.render()}});SM.TMBCQuartileTableView=SM.Views.extend(SM.Sortable,{__NAME:"TMBCQuartileTableView",__templateID:"summary-table-template",__model:"tmbc",__defaults:{tableOptions:{headingsType:null,showFooter:false,hideExpandLinks:false},seriesOptions:{},seriesData:{},labelsData:{}},__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t._buildLocalizedLabels();t._bindEvents(e.events);t.seriesOptions=t.__settings.seriesOptions;t.tableOptions=t.__settings.tableOptions;t.isExport=e.isExport;t.tmbcType=e.tmbcType},_bindEvents:function(){_.bindAll(this,"_onCaptionClick","_onThClick","_onTdClick","_onThActionSelected")},__beforeRender:function(){},__afterRender:function(){this.$el.empty();this._renderTable();this.$el.find(".q").popout();this._renderTitle()},_renderTable:function(){var t=_____WB$wombat$check$this$function_____(this),e;_.each(["_buildTableHeaderRowData","_buildTableBodyRowData","_buildTableFooterRowData"],function(e){if(t[e]===undefined){throw new Error("You must define "+e+" in "+t.__NAME)}});if(t.tmbc.hasError()){return}if(t._setLabelsAndSeriesData){t._setLabelsAndSeriesData()}e=t._getTableOptions();SM.Hightables.renderTable(e)},_renderTitle:function(){var e,t;this.$el.prepend($("<br/>"));t=this.tmbc.calculateQuartile(this.tmbcType);e=SM.Template.render("tmbc-quartile-table-title",t);this.$el.prepend($(e));this.$el.find(".q").popout()},__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.on("actionMenu.actionSelected","td",{self:e},e._onTdActionSelected)},_getTableOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t=e._getTableData(),n=e._getTableClasses(),r=!!e.isExport,i;i={target:e.$el,tableData:t,tableClasses:n,useDivs:r,flattenNestedTables:r,events:e._getTableEvents()};return i},_getTableData:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r,i,o;e=e||{};i=t._buildTableBodyRowData(e);r=t._buildTableHeaderRowData(e);o=t._buildTableFooterRowData(e);return{caption:n,thead:{rows:r},tbody:{rows:i},tfoot:{rows:o}}},_getTableHeaderRowDataForLabels:function(e){var t=_____WB$wombat$check$this$function_____(this),n=e.labelsData,c=e.includeBlankCell,r=[],i={},o=[],a,s,l,u;l=t.numRows;u=l>1;if(c){a=t._buildBlankTableHeaderCell({isSortable:u});o.push(a)}_.each(n,function(e){s=t._getTableHeaderCellCSSClasses(u,e.dimensionType);a={template:e.template||"table-header-cell",context:{labelText:e.text,classes:s,dimensionType:e.dimensionType,hideActionMenu:e.hideActionMenu,variationID:"0"}};if(e.flags){$.extend(a.context,e.flags)}o.push(a)});i.cells=o;r.push(i);return r},_getTableHeaderRowDataForSeries:function(i){var e=i.series,r=i.includeBlankCell,o=i.scopedDimensionID;var a=_____WB$wombat$check$this$function_____(this),t=[],s=[],n={},l,p,d,u,c,h;d=e[0].data.length;u=d>1;if(r){l=a._buildBlankTableHeaderCell({scopedDimensionID:o,isSortable:u});s.push(l)}_.each(e,function(e){var t=e.__options,n=t.dimensionType,r=t.dimensionID;p=a._getTableHeaderCellCSSClasses(u,n,r,o);if(i.hideActionMenu){c=true}else{c=false}h=t.labelHTML;l={template:"table-header-cell",context:{labelText:t.labelText,labelHTML:h,classes:p,dimensionType:n,dimensionID:r,hasCommentsPerRow:t.hasCommentsPerRow,optionID:r,variationID:"0",responsesCount:t.numComments,columnHasComments:t.numComments>0,colSpan:t.colSpan,hideActionMenu:c}};s.push(l)});n.cells=s;t.push(n);return t},_buildBlankTableHeaderCell:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r,i,o=e.scopedDimensionID,a=e.isSortable;i=false;r="labels";n=t._getTableHeaderCellCSSClasses(a,r,null,o);return{template:"table-header-blank-cell",context:{classes:n,dimensionType:r,hideActionMenu:i,isStatsHeader:false}}},_getTableBodyRowData:function(e){var t=_____WB$wombat$check$this$function_____(this),n=[],r,i=[],o,a=e.series;_.each(a,function(e){o=t._buildSeriesCell(e,0);i.push(o)});r={cells:i};n.push(r);return n},_buildLabelCell:function(e){return{template:"table-label-cell",context:e}},_buildSeriesCell:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r,i,o=e.__options.defaultContext||{},a,s;r=e.data[t];i=e.__options.dimensionType;a=e.__options.template||"table-response-cell";s=r?r.absoluteY:0;if(n.tmbcType===n.tmbc.TMBC_TYPE_GEI){o.numResponses=n._formattedNumResponses(s,i)}else{o.numResponses=n._formattedPercentage(s)}return{template:a,context:o}},_formattedNumResponses:function(e){var t=0,n=SM.Highcharts.getGlobalizeFormatType("absolute",t);return Globalize.format(e,n)},_formattedPercentage:function(e){var t=SM.Highcharts.getGlobalizeFormatType("percent",0);return Globalize.format(e/100,t)},_getTableFooterRowData:function(){return[{template:"simple-table-footer-row",context:{questionIsMultiResponse:false,numRespondents:Globalize.format(this.tmbc.getTMBCValue(this.tmbcType),"n0")}}]},_getTableHeaderCellCSSClasses:function(e,t,n,r){var i=_____WB$wombat$check$this$function_____(this),o=[],a;a=i._getSortData(r);if(e){o.push("sortable")}if(_.contains(["totals","averageRating","averageNumber","averageRanking","dataSegment"],t)){o.push(t)}if(a&&a.dimensionType===t){if(n){if(a.dimensionID===n){o.push(a.order)}}else{o.push(a.order)}}return o.join(" ")},_getSortData:function(){return{order:"ascending"}},_onCaptionClick:function(e){var t=_____WB$wombat$check$this$function_____(this),n=$(e.currentTarget),r=n.attr("data-dimension-id"),i={answerID:r,visibleOptions:{labels:true}};SM.CustomizeActionMenu.actionMenu.call(t,e,"caption",i)},_onThClick:function(e){var t=$(e.currentTarget),n=t.attr("data-dimension-type"),r=t.attr("data-dimension-id"),i={parent:t,visibleOptions:{}};if(SM.App.isSharingApp()||_.isEmpty(n)||t.hasClass("no-action-menu")){return}i.visibleOptions.labels=false;i.visibleOptions.number=n!=="labels";i.visibleOptions.labels=false;i.answerID=r},_onThActionSelected:function(){},_onTdActionSelected:function(){},_onTdMouseLeave:function(){},_onTdMouseEnter:function(){},_getTableClasses:function(){var e=[];e.push("sm-data-table");if(SM.App.isSharingApp()){e.push("shared")}e.push("sm-data-table-summary");e.push("benchmark");return e.join(" ")},_getTableEvents:function(){return{tdClick:this._onTdClick}},_onTdClick:function(e){var t=$(e.currentTarget),n=t.closest("td").attr("data-dimension-id"),r=this.tmbc.survey,i=r.dataSegmentList.getSelectedSegment();if(n==="segment-name"){SM.BenchmarkActionMenu.actionMenu(this,t,i,"tmbc",e,true)}},_buildTableHeaderRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t,n=[];n=n.concat([{text:e.localizedLabels.min,dimensionType:e.DIMENSION_TYPES.MIN,hideActionMenu:true,template:"benchmark-table-header-cell",flags:{hasHelp:true,isMinimum:true}},{text:e.localizedLabels.lowerQuartile,dimensionType:e.DIMENSION_TYPES.LOWER_QUARTILE,hideActionMenu:true,template:"benchmark-table-header-cell",flags:{hasHelp:true,isLowerQuartile:true}},{text:e.localizedLabels.median,dimensionType:e.DIMENSION_TYPES.MEDIAN,hideActionMenu:true,template:"benchmark-table-header-cell",flags:{hasHelp:true,isMedian:true}},{text:e.localizedLabels.upperQuartile,dimensionType:e.DIMENSION_TYPES.UPPER_QUARTILE,hideActionMenu:true,template:"benchmark-table-header-cell",flags:{hasHelp:true,isUpperQuartile:true}},{text:e.localizedLabels.max,dimensionType:e.DIMENSION_TYPES.MAX,hideActionMenu:true,template:"benchmark-table-header-cell",flags:{hasHelp:true,isMaximum:true}}]);t=e._getTableHeaderRowDataForLabels({labelsData:n});return t},_buildLocalizedLabels:function(){var e=_____WB$wombat$check$this$function_____(this);e.localizedLabels={dataSegment:Globalize.localize("Segment"),min:Globalize.localize("Minimum"),lowerQuartile:Globalize.localize("Lower Quartile"),median:Globalize.localize("Median"),upperQuartile:Globalize.localize("Upper Quartile"),max:Globalize.localize("Maximum"),total:Globalize.localize("Total")}},_getTMBCTableBodyRowData:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r=[],i,o=e.series;_.each(o,function(e){e.__options={template:"benchmark-nps-simple-table-response-cell",defaultContext:{value:e.data[0].value}};i=t._buildSeriesCell(e,0);r.push(i)});n={cells:r};return[n]},_buildTMBCQuartileTableSeries:function(n){var r=_____WB$wombat$check$this$function_____(this),i=[],o,e=this.tmbc.getQuartileValuesArray(this.tmbcType);_.each(e,function(e,t){o=[{y:e,absoluteY:e,percentageY:e,value:e,name:n.names[t]}];i.push({name:r.tmbc.getSegmentName(),data:o,__options:{dimensionType:"averageRating",template:"benchmark-table-response-cell"}})});return i},buildTMBCSeries:function(e){e.names=[Globalize.localize("Minimum"),Globalize.localize("Lower Quartile"),Globalize.localize("Median"),Globalize.localize("Upper Quartile"),Globalize.localize("Maximum")];if(e.tableOutput){return this._buildTMBCQuartileTableSeries(e)}return this._buildTMBCQuartileChartSeries(e)},_buildTableBodyRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.buildTMBCSeries({colors:["#000","#000"],tableOutput:true,nps:false,includeTotal:false});return e._getTableBodyRowData({series:t})},_buildTableFooterRowData:function(){var e=this.tmbcType===this.tmbc.TMBC_TYPE_GEI?"Your Global Engagement Index":"Your % Fully Engaged";return[{context:{tmbcValue:Globalize.format(this.tmbc.getTMBCValue(this.tmbcType),"n0"),isFE:this.tmbcType===this.tmbc.TMBC_TYPE_ENGAGEMENT,tmbcName:e},template:"tmbc-quartile-table-footer-row"}]}});SM.QuizSummaryTableView=SM.Views.deepExtend(SM.BaseSummaryTableView,{__NAME:"QuizSummaryTableView",__templateID:"summary-table-template",__afterRender:function(){this._isCovid19Template=this.question.survey.isCovid19Template();SM.BaseSummaryTableView.__afterRender.call(this);this.$el.find("table.sm-data-table").addClass("is-quiz")},_buildTableHeaderRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t=[{text:e.localizedLabels.answerChoices,dimensionType:e.DIMENSION_TYPES.LABELS},{text:e.localizedLabels.responses,dimensionType:e.DIMENSION_TYPES.RESPONSES}];if(!e._isCovid19Template){t.splice(1,0,{text:e.localizedLabels.averageRanking,dimensionType:e.DIMENSION_TYPES.SCORES})}return e._getTableHeaderRowDataForLabels({labelsData:t})},_buildTableBodyRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.sortedRowsList[0],n=e._getTableLabelsData(t),r=e._getQuizScoresData(n,false),i=e.buildSimpleSeries(e.summary,t,e.seriesOptions);return e._getTableBodyRowData({labelsData:n,scoresData:r,series:i})},_getTableBodyRowData:function(e){var r=_____WB$wombat$check$this$function_____(this),i=[],t=e.labelsData,o=e.scoresData,a=e.series;_.each(t,function(e,t){var n=[];n.push(r._buildLabelCell(e));if(!r._isCovid19Template){n.push({template:"table-quiz-score-cell",context:o[t]})}_.each(a,function(e){n.push(r._buildSeriesCell(e,t))});i.push({cells:n})});return i},_buildTableFooterRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t=e._isCovid19Template?2:3,n={colSpan:t},r="0",i=e.summary.other_option||0;if(e._hasCommentField()&&!e._commentFieldIsAnswer()){if(e.question.randomAssignmentOption){r=e.question.randomAssignmentOption.toString()}_.extend(n,{optionID:e.question.commentField.id,variationID:r,hasComments:i>0,numComments:i})}return e._getTableFooterRowData(n)},_getTableFooterRowData:function(e){var t=_____WB$wombat$check$this$function_____(this),n=[{template:"quiz-table-footer-row",context:{questionIsMultiResponse:t.question.isMultiResponse(),numRespondents:Globalize.format(t.rollup.getContextSummary().answered,"n0"),isCovid19Template:t._isCovid19Template}}];if(t._shouldShowCommentsRow()){n.push({template:"table-footer-comments-row",context:e})}return n}});SM.SummaryQuizSummaryTableContainerView=SM.Views.register({__NAME:"summaryQuizSummaryTableContainerView",__templateID:"summary-table-container-template",__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.survey=e.survey;t.quizSummary=e.quizSummary;t.isExport=e.isExport;t.display=t.quizSummary.getRollup().display},__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.bindModel(e.display,"displayChange",{self:e},e._onTableDisplayChange);e.$el.on("setHighlightedLabelCell",e._setHighlightedLabelCell).on("click","#quiz-ranking-show-all",{self:e},e._showAllRankings).on("click","#quiz-ranking-show-top",{self:e},e._showTopRankings)},__afterRender:function(){var t=_____WB$wombat$check$this$function_____(this),e;try{e=SM.Views.create(SM.QuizStatsSummaryTableView,{question:t.quizSummary,isExport:t.isExport});t.$el.html(e.el);t.$el.append($(SM.Template.render("quiz-ranking-table-caption")));e=t._rankingTableView=SM.Views.create(SM.QuizRankSummaryTableView,{question:t.quizSummary,isExport:t.isExport});t.$el.append(e.el);if(e.isLongTable){t.$el.append($(SM.Template.render("quiz-ranking-table-footer")))}}catch(e){t._handleRenderingError(e)}},_handleRenderingError:function(e){var t=_____WB$wombat$check$this$function_____(this),n=document.createElement("div");n.innerHTML=SM.Template.render("summary-table-display-error-template");t.$el.html(n);SM.Error.log(e,"quiz summary table rendering error")},_onTableDisplayChange:function(e){e.data.self._rankingTableView.render()},_showAllRankings:function(e){var t=e.data.self;e.preventDefault();t._rankingTableView.showAll();$("#quiz-ranking-show-all").addClass("hide");$("#quiz-ranking-show-top").removeClass("hide")},_showTopRankings:function(e){var t=e.data.self;e.preventDefault();t._rankingTableView.showTop();$("#quiz-ranking-show-all").removeClass("hide");$("#quiz-ranking-show-top").addClass("hide")}});SM.QuizStatsSummaryTableView=SM.Views.extend(SM.BaseSummaryTableView,{__NAME:"QuizStatsSummaryTableView",__templateID:"summary-table-template",__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.empty();e._renderTable()},_renderTable:function(){var e=_____WB$wombat$check$this$function_____(this),t=e._buildTemplateData(),n=SM.Template.renderHTML("quiz-summary-stats-table",t);e.$el.prepend(n)},_getSortedSummaryData:function(){},_buildTemplateData:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.summary.summary.quiz_stats,n=SM.String.formatNumber;if(t.std_dev===null){t.std_dev="--"}return{lowest:n(t.lowest,true),highest:n(t.highest,true),median:n(t.median,true),mean:n(t.mean,true),std:_.isNumber(t.std_dev)?n(t.std_dev,true):t.std_dev}}});SM.QuizRankSummaryTableView=SM.Views.deepExtend(SM.BaseSummaryTableView,{__NAME:"QuizRankSummaryTableView",__templateID:"summary-table-template",_LONG_TABLE_THRESHOLD:5,_LONG_TABLE_TOP_SIZE:3,_showTopRows:true,isLongTable:false,__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this);SM.BaseSummaryTableView.__afterRender.call(e);e.$el.addClass("quiz-rank-container");e.isLongTable=!e.isExport&&e.sortedQuizRankings.length>e._LONG_TABLE_THRESHOLD;if(e._showTopRows&&e.isLongTable){e._collapseTable()}},_collapseTable:function(){var n=_____WB$wombat$check$this$function_____(this);_.each(n.$el.find("tbody tr"),function(e,t){if(t>=n._LONG_TABLE_TOP_SIZE){$(e).hide()}})},_buildTableHeaderRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t=[{text:Globalize.localize("Questions")+" ("+_.size(e.question.structure.question_ranking)+")",dimensionType:e.DIMENSION_TYPES.POSITIONS},{text:Globalize.localize("Difficulty"),dimensionType:e.DIMENSION_TYPES.RANKINGS},{text:Globalize.localize("Average Score"),dimensionType:e.DIMENSION_TYPES.AVERAGE_SCORES}];return e._getTableHeaderRowDataForLabels({labelsData:t})},_buildTableBodyRowData:function(){var t=_____WB$wombat$check$this$function_____(this),e=_.map(t.sortedQuizRankings,function(e){return{cells:[{context:{qId:e.question_id,position:e.position,heading:e.heading,isExport:t.question.survey.isExport},template:"quiz-ranking-table-label-cell"},{context:{value:e.rank?e.rank+"":"--"},template:"quiz-ranking-table-value-cell"},{context:{value:_.isUndefined(e.avg_score)||_.isNull(e.avg_score)?"--":SM.String.formatNumber(e.avg_score,true)},template:"quiz-ranking-table-value-cell"}]}});return e},_getSortedSummaryData:function(){this.sortedQuizRankings=this.question.getRollup().getSortedSummary().quizRankings},_getTableClasses:function(){var e=["sm-data-table sm-data-table-summary"];if(SM.App.isSharingApp()){e.push("shared")}return e.join(" ")},setHeight:function(){var e=this.$el;setTimeout(function(){e.height(e.find("table").height()+2+"px")},0)},showAll:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.$el,n=t.find("table");n.find("tbody tr").show();setTimeout(function(){t.animate({height:n.height()+2+"px"},function(){e.setHeight();e._showTopRows=false})})},showTop:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.$el,n=t.find("table"),r=$(n.find("tbody tr")[e._LONG_TABLE_TOP_SIZE]);t.animate({height:r.offset().top+2-n.offset().top+"px"},function(){e._collapseTable();setTimeout(function(){e.setHeight();e._showTopRows=true;n.scrollIntoView()},0)})},_buildTableFooterRowData:function(){}});SM.QuizStatsTableView=SM.Views.extend(SM.BaseSummaryTableView,{__NAME:"QuizStatsTableView",__templateID:"summary-table-template",__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.empty();e._renderTable();e.$el.find(".q").popout()},_renderTable:function(){var e=_____WB$wombat$check$this$function_____(this),t=e._buildTemplateData(),n=SM.Template.renderHTML("quiz-stats-table",t);e.$el.prepend(n)},_buildTemplateData:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.summary.summary.quiz_stats,n=SM.String.formatNumber;return{avg_score:n(t.avg_score,false,1),avg_percent:n(t.avg_score/t.total_score,true),total_score:n(t.total_score,false,1),total_questions:n(t.total_questions),std_dev:n(t.std_dev,false,2),rank:n(t.rank),percent_correct:n(t.percent_correct,true)}}});SM.ClickMapSummaryTableView=SM.Views.deepExtend(SM.BaseSummaryTableView,{__NAME:"ClickMapSummaryTableView",__templateID:"summary-table-template",__afterRender:function(){SM.BaseSummaryTableView.__afterRender.call(this);this.$el.find("table.sm-data-table").addClass("is-click-map")},_buildTableHeaderRowData:function(){var e=_____WB$wombat$check$this$function_____(this);return e._getTableHeaderRowDataForLabels({includeBlankCell:true,labelsData:[{text:e.localizedLabels.total,dimensionType:e.DIMENSION_TYPES.TOTALS}]})},_getSummaryDataByRowKey:function(e){var t={};_.each(e,function(e){if(e.row_key){t[e.row_key]=e}});return t},_getSortedRows:function e(n,t,r,i){var o;if(i==="unsorted"){return t}if(r==="labels"){o=_.sortBy(t,function e(t){return t.text})}else{o=_.sortBy(t,function e(t){return n[t.key].total})}if(i==="descending"){return o.reverse()}return o},_getClickMapScoresData:function e(t,n){var r;return _.map(n,function(e){if(t[e.key]){r=t[e.key].total}else{r=0}return{name:e.text,score:Globalize.format(r,"n0")}})},_buildTableBodyRowData:function c(){var e=_____WB$wombat$check$this$function_____(this),t=e.display.getDisplayData(),n=t?t.sort_data:{dimensionType:"labels",order:"unsorted"},r=e.summary.summary_data,i=e._getSummaryDataByRowKey(r),o=e.summary.respondent_summary,a=e.summary.rows,s=e._getSortedRows(i,a,n.dimensionType,n.order),l=e._getTableLabelsData(s),u=e._getClickMapScoresData(i,s);e.numRespondents=o.answered;return e._getTableBodyRowData({labelsData:l,scoresData:u})},_getTableBodyRowData:function(e){var r=_____WB$wombat$check$this$function_____(this),i=[],t=e.labelsData,o=e.scoresData;_.each(t,function(e,t){var n=[];n.push(r._buildLabelCell(e));n.push({template:"click-map-table-cell",context:o[t]});i.push({cells:n})});return i},_buildTableFooterRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t={colSpan:3};return e._getTableFooterRowData(t)},_getTableFooterRowData:function(){var e=_____WB$wombat$check$this$function_____(this),t=[{template:"click-map-table-footer-row",context:{questionIsMultiResponse:e.question.isMultiResponse(),numRespondents:Globalize.format(e.numRespondents,"n0")}}];return t}});SM.SummaryQuizSummaryView=SM.Views.register({__NAME:"summaryQuizSummaryView",__templateID:"summary-quiz-summary-template",__model:"quizSummary",__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.rollup=t.quizSummary.getRollup();t.display=t.rollup.display;t.isExport=e.isExport},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.quizSummary,n=t.structure,r=n.avg_score,i=t.survey,o=i.currentUserID,a=SM.String.formatNumber,s,l,u;return{avgPercent:a(r.score/r.total,true),avgScore:a(r.score,false,r.total>20?0:1),avgTotal:a(r.total),encryptedID:e.quizSummary.survey.encryptedID,userID:o,optionLetter:u+1,viewedPercentage:l,viewedNumber:a(s),user_id:i.currentUserID,surveyId:i.ID}},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this);e.$questionContent=e.$el.find("[quiz-summary-content]");e.chartContainerView=SM.Views.create(SM.SummaryQuizSummaryChartView,{survey:e.survey,quizSummary:e.quizSummary});e.$questionContent.append(e.chartContainerView.el);e.tableView=SM.Views.create(SM.SummaryQuizSummaryTableContainerView,{survey:e.survey,quizSummary:e.quizSummary,isExport:e.isExport});e.$questionContent.append(e.tableView.el);e.$el.find(".q").popout()},__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.on("actionMenu.actionSelected",".sm-chart-container *",{self:e},e._onChartActionSelected);e.$el.on("actionMenu.actionSelected",".sm-data-table-container *",{self:e},e._onTableActionSelected)},_onChartActionSelected:function(e){var t=e.data.self,n,r=t.survey.owner.canCustomizeCharts();e.stopPropagation();if(e.action==="colors"&&!r){SM.Bi.uiTrigger="questionChartEditColorsMenuButton";n=SM.Views.create(SM.DialogView,{width:800,isModal:true,templateID:"customize-upgrade-dialog-template"});n.open()}else{SM.Bi.uiTrigger="questionChart"+e.action+"MenuButton";t.$el.trigger({type:"openCustomizeView",action:e.action})}},_onTableActionSelected:function(e){var t=e.data.self;if(e.action==="labels"){e.stopPropagation();t.$el.trigger({type:"openCustomizeView",action:e.action,answerID:e.$action.attr("data-answer-id")})}},getCurrentChartView:function(){var e=_____WB$wombat$check$this$function_____(this);return e.chartContainerView.chartView}});SM.SummaryQuestionViewContainer=SM.Views.register({__NAME:"summaryQuestionViewContainer",__templateID:"summary-question-container-template",__model:"question",nestedQuestionDict:{},NON_DASHBOARD_QUESTIONS:{presentation:[SM.QuestionModel.QTYPE.image,SM.QuestionModel.QTYPE.descriptive_text],open_ended:[SM.QuestionModel.QTYPE.multi,SM.QuestionModel.QTYPE.file_upload,SM.QuestionModel.QTYPE.numerical],datetime:[SM.QuestionModel.QTYPE.both,SM.QuestionModel.QTYPE.date_only,SM.QuestionModel.QTYPE.time_only],matrix:[SM.QuestionModel.QTYPE.menu],demographic:[SM.QuestionModel.QTYPE.international,SM.QuestionModel.QTYPE.us]},NON_DASHBOARD_QUESTIONS_COMPARE_BY_1D:{open_ended:[SM.QuestionModel.QTYPE.single,SM.QuestionModel.QTYPE.essay,SM.QuestionModel.QTYPE.numerical],datetime:[SM.QuestionModel.QTYPE.both,SM.QuestionModel.QTYPE.date_only,SM.QuestionModel.QTYPE.time_only]},QTYPE_2D:[SM.QuestionModel.QTYPE.matrix],__create:function(e){this.questionViewProto=e.questionViewProto;this.isBenchmarkable=false},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.question,c=t.hasRollupLoaded(),p=t.isPayment(),n=t.survey,r=n.state.isDashboardMode(),d=n.currentUserID,i=e.questionViewProto,h=!!SM.API.getQueryParam("gallery"),o,a,s=false,l=0,u=false;if(this.isSharedView){a=SM.SharedAnalyzeApp.sharedView;s=a.commenting_enabled;l=a.comment_count_summary[t.ID]||0;u=l>0}if(c){if(t.hasRandomAssignment()&&t.isPresentation()){o=t.heading}return{isVisible:r||!t.isAfterLastLoadedRollup()&&t.isShown(),isPaymentQ:p,question:t,questionHeading:o,encryptedID:t.survey.encryptedID,userID:d,hasTable:i._hasTableView,hasChart:i._hasChartView,hasCustomize:i._hasChartView||t.hasCustomizeView(),hasBenchmarking:false,displayCommentingTools:!!SM.SharedAnalyzeApp&&!h,isSharedPage:!!SM.SharedAnalyzeApp,exportEnabled:!r&&n.isExportFormatTypeEnabled("png","chart"),commentingEnabled:s,commentCount:l,hasComments:u}}return{isVisible:false,question:t}},_canBeAddedToDashboard:function(e){var t=e.survey,n,r;if(e.hasRandomAssignment()||e.displayType==="payment"){return false}n=t.anviews.currentView.getCompareRuleSelected();r=n?n.questionID:null;if(r){if(_.contains(this.QTYPE_2D,t.questions[r].family)||n.isRA||this.NON_DASHBOARD_QUESTIONS_COMPARE_BY_1D[e.family]&&_.contains(this.NON_DASHBOARD_QUESTIONS_COMPARE_BY_1D[e.family],e.subtype)){return false}if(e.isMultiRowMatrix()){return false}}else if(n&&(n.ruleType==="collector"||n.ruleType==="time_period")){if(n.isRA||this.NON_DASHBOARD_QUESTIONS_COMPARE_BY_1D[e.family]&&_.contains(this.NON_DASHBOARD_QUESTIONS_COMPARE_BY_1D[e.family],e.subtype)){return false}if(e.isMultiRowMatrix()){return false}}return!(this.NON_DASHBOARD_QUESTIONS[e.family]&&_.contains(this.NON_DASHBOARD_QUESTIONS[e.family],e.subtype))},__afterRender:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.question,r=n.survey,i=n.getRollup().display;if(e.isDisabledQuestionType||!e.isVisible){return}t._renderQuestionContent();if(!SM.App.isSharingApp()&&!r.state.isDashboardMode()){t.$el.find(".share-btn").popout();if(t._canBeAddedToDashboard(n)){t.$el.find("[pin-to-dashboard-container]").append(SM.Views.create(SM.PinToDashboardView,{survey:r,dashboards:r.currentUser.dashboards,question:n,questionDisplay:i,shouldShowShareBtn:true,shouldShowExportBtn:true,singleMode:true,noBorder:true,hasTACloud:n.hasTACloud(),hasCloudView:n.hasCloudView(),hasChartView:n.hasChartView(),hasFiloView:n.isFileUpload(),hasPaymentView:n.hasPaymentView(),buttonName:"CombinedExportDashboardButton"}).el)}if(r.isExportEnabled()){t.$el.find("[export-btn]").append(SM.Views.create(SM.ExportAllBtnView,{model:n.survey,noBorder:false,buttonName:"ExportQuestionButton",singleMode:true,question:n,hasTACloud:n.hasTACloud(),hasCloudView:n.hasCloudView(),hasChartView:n.hasChartView(),hasPaymentView:n.hasPaymentView(),hasFiloView:n.isFileUpload()}).el)}}},_renderQuestionContent:function(){var e=_____WB$wombat$check$this$function_____(this);var t=e.question;var n=t.hasRandomAssignment();var r=e.$el.find("[sm-questionview-content-container]");if(n){e._renderRandomAssignmentQuestionViews(r)}else{e._renderQuestionView(r)}},_renderQuestionView:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.questionViewProto;t.questionView=SM.Views.create(n,{model:t.question,isBenchmarkable:t.isBenchmarkable});e.html(t.questionView.el)},_renderRandomAssignmentQuestionViews:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.question.getRollup(),r,i,o,a,s,l=0;o=this.question.randomAssignmentList;e.empty();for(l;l<o.length;l++){i=o[l];a=i.variable_id;s=t.__settings.nestedQuestionDict[a];if(n.type==="does_not_apply"){s=n}if(s){r=SM.Views.create(this.questionViewProto,{model:s.question,isRandomAssignment:true,optionTypeID:a,randomAssignmentIndex:l});e.append(r.el)}}},__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.on(SM.Event.CLICK,"[customize-btn]",{self:e},e._onCustomizeBtnClick).on(SM.Event.CLICK,"[share-btn]",{self:e},e._onShareBtnClick);e.$el.on("openCustomizeView",{self:e},e._onOpenCustomizeView);e.$el.on("beforeCustomizeViewAnimateIn","[sm-customize-question-view]",{self:e},e._onBeforeCustomizeViewAnimateIn);e.$el.on("afterCustomizeViewAnimateOut","[sm-customize-question-view]",{self:e},e._onAfterCustomizeViewAnimateOut);e.bindModel(e.question,"rollupLoaded",{self:e},e._onQuestionLoaded);e.bindModel(e.question.survey,"rollupsAppended",{self:e},e._onSurveyRollupsAppended)},_onCustomizeBtnClick:function(e){var t=e.data.self,n=$(e.target);e.preventDefault();if(t.question.survey.isReadOnly()||n.hasClass("disabled")){return}SM.Bi.uiTrigger="questionCustomizeButton";if(t.question.hasChartTypeCustomization()){t.openCustomizeView("chartType")}else if(t.question.hasDisplayOptionsCustomization()){t.openCustomizeView("displayOptions")}else if(t.question.hasColorCustomization()){t.openCustomizeView("colors")}else{t.openCustomizeView("labels")}},_onBeforeCustomizeViewAnimateIn:function(e){var t=e.data.self;_.each(["[customize-btn]","[export-btn]","[share-btn]","[dashboard-btn]"],function(e){t.$el.find(e).addClass("hide")})},_onAfterCustomizeViewAnimateOut:function(e){var t=e.data.self;_.each(["[customize-btn]","[export-btn]","[share-btn]","[dashboard-btn]"],function(e){t.$el.find(e).removeClass("hide")});t.customizeView.$el.remove();t.customizeView=null},_onOpenCustomizeView:function(e){var t=e.data.self,n=e.action,r=e.answerID;t.openCustomizeView(n,{answerID:r})},_onShareBtnClick:function(e){e.preventDefault()},_onQuestionLoaded:function(e){e.data.self.render()},_onSurveyRollupsAppended:function(e){var t=e.data.self;if(t.question.position>e.lastLoadedPosition){t.render()}},openCustomizeView:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r,i;t=t||{};if(!n.customizeView){r=n._buildCustomizeViewOptions();n.customizeView=SM.Views.create(SM.CustomizeQuestionSummaryView,r)}if(e!=="top2ChartType"){n.customizeView.tabs.open(e)}i=n.$el.offset().top-20;$("body").animate({scrollTop:i},250,function(){n.customizeView.animateIn(n.$el.find("[sm-customize-menu-container]"),function(){if(e==="labels"){n.customizeView.currentView.scrollToLabel(t.answerID)}})})},_buildCustomizeViewOptions:function(){var e=_____WB$wombat$check$this$function_____(this),t=this.questionViewProto;return{question:e.question,questionView:e.questionView,hasMirrorOptions:t._hasMirrorOptions,hasDepthOptions:t._hasDepthOptions,hasScaleOptions:t._hasScaleOptions,hasShowEmptyOptions:t._hasShowEmptyOptions,hasPieDonutCharts:t._hasPieDonutCharts,hasStackedCharts:t._hasStackedCharts}}});SM.SummaryBaseQuestionView={__templateID:"summary-question-template",__model:"question",_hasTableView:false,_hasChartView:false,_hasClickMapView:false,_hasTextView:false,_hasFileUploadView:false,_hasPaymentView:false,_hasPieDonutCharts:false,_hasStackedCharts:false,_hasScaleOptions:false,_hasDepthOptions:false,_hasMirrorOptions:false,_hasShowEmptyOptions:false,_hasBenchmarkingOptions:false,_tableViewType:undefined,_textViewType:undefined,_isDisabledQuestionType:false,_isPresentation:false,isRandomAssignment:false,optionTypeID:undefined,randomAssignmentIndex:undefined,__create:function(e){var t=_____WB$wombat$check$this$function_____(this);if(!!t.__settings.optionTypeID&&!!t.__settings.isRandomAssignment){t.question.randomAssignmentOption=t.__settings.optionTypeID}t.rollup=t.question.getRollup();t.survey=t.question.survey;t.display=t.rollup.display;t.currentQuestionHeading=t._getQuestionHeading();t.questionContainerView=e.questionContainerView;t.isBenchmarkable=e.isBenchmarkable},__beforeRender:function(){var c=_____WB$wombat$check$this$function_____(this),e=this.question,t=e.getRollup(),p=e.hasRollupLoaded(),d=e.isPayment(),n=e.survey,h=n.currentUserID,r=this.__settings.isRandomAssignment,f=c.currentQuestionHeading,i=n.state.isDashboardMode(),o=n.getTemplateName(),m=n.isTMBCTemplate(),g=!i&&n.isCurrentUserAlsoOwner()&&!n.owner.hasBenchmarkingRestricted(),y=g&&n.hasActivatedBenchmark(),b=n.isStoreTemplate()||y,v=i?"ENTERPRISE":n.ownerPackageType(),w=i?false:n.owner.hasBenchmarkingRestricted(),E=Globalize.localize("Answered: ")+" "+t.answered,S=Globalize.localize("Skipped: ")+" "+t.skipped,a,T,s,x,_,l,C,A,u;l=t.summary.crossed_rows;if(l!==undefined&&r){for(C=0;C<l.length;C++){if(e.randomAssignmentOption===l[C]){r=false;break}}}if(r){x=e.randomAssignmentList[this.__settings.randomAssignmentIndex];f=x.variable_name||x.heading;s=this.__settings.randomAssignmentIndex;a=parseInt(t.answered,10);if(this._isPresentation){T=Globalize.formatPercent(a/t.answeredCount,2);if(e.subtype===e.QTYPE.descriptive_text){f="";_=true}u=Globalize.localize("Viewed:")+" "+Globalize.format(a,"n0");if(a===0){u=Globalize.localize("Viewed: 0")}else if(a===1){u=Globalize.localize("Viewed: 1")}}else{T=Globalize.formatPercent(a/(parseInt(t.skipped,10)+a),2);u=Globalize.localize("Answered: ")+" "+Globalize.format(a,"n0");if(a===0){u=Globalize.localize("Answered: 0")}else if(a===1){u=Globalize.localize("Answered: 1")}}}if(o){o="&qbcat="+o}if(t.answered===0){E=Globalize.localize("Answered: 0")}else if(t.answered===1){E=Globalize.localize("Answered: 1")}if(t.skipped===0){S=Globalize.localize("Skipped: 0")}else if(t.skipped===1){S=Globalize.localize("Skipped: 1")}A=Globalize.localize("Variable:")+" "+(s+1);if(!s||s===0){A=Globalize.localize("Variable: 1")}return{isVisible:i||!e.isAfterLastLoadedRollup()&&p&&e.isShown(),isPaymentQ:d,questionHeading:f,question_id:e.ID,answeredStr:E,skippedStr:S,hasBenchmarking:this.isBenchmarkable,isActive:this.display.getBenchmarkDisplay(),isBenchmarkable:this.isBenchmarkable,showBenchmark:this.showBenchmark,sampleSize:5467,dateStart:"1/10/2010",dateEnd:"1/30/2012",isDisabledQuestionType:this._isDisabledQuestionType,disabledMsg:this.__settings.disabledMsg,encryptedID:this.question.survey.encryptedID,userID:h,hasRandomAssignment:r,optionLetter:s+1,variableStr:A,viewedPercentage:T,viewedNumber:Globalize.format(a,"n0"),viewedStr:u,isPresentation:this._isPresentation,isTextPresentation:_,templateName:o,isTMBC:m,toStore:b,isActivator:y,planName:v,hasPaid:w,user_id:n.currentUserID,surveyId:n.ID}},__afterRender:function(e){var t=_____WB$wombat$check$this$function_____(this);if(e.isDisabledQuestionType||!e.isVisible){return}t.$questionContent=this.isBenchmarkable?t.$el.find(".sm-questionview-data-ctnr"):t.$el;if(t._hasChartView){t._renderChartView()}if(t._hasClickMapView){t._renderClickMapView()}if(!t.question.survey.state.isDashboardMode()&&t._hasTableView){t._renderTableView()}if(t._hasTextView){if(t._shouldRenderTextView()){t._renderTextView()}else{t._renderUnavailableTextView()}}if(t._hasFileUploadView){t._renderFileUploadView()}if(t._hasPaymentView){t._renderPaymentView();t.$el.find("[payment-search-tip]").popout()}if(t._isPresentation){t._renderPresentationView()}t._setMinHeight()},__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.on(SM.Event.CLICK,"[question-heading]",{self:e},e._onQuestionHeadingClick);e.$el.on("actionMenu.actionSelected","[question-heading]",{self:e},e._onQuestionHeadingActionSelected);e.$el.on("actionMenu.actionSelected",".sm-chart-container *",{self:e},e._onChartActionSelected);e.$el.on("actionMenu.actionSelected",".sm-data-table-container *",{self:e},e._onTableActionSelected);e.bindModel(e.display,"displayChange",{self:e},e._onDisplayChange);e.bindModel(e.display,"tempDisplayChange",{self:e},e._onDisplayChange);e.bindModel(e.display,"allDisplaysChange",{self:e},e._onDisplayChange)},_getQuestionHeading:function(){var e=this.display.getQuestionHeadingLabel();if(e&&!_.isEmpty(e.text)){return e.text}return this.question.heading},_onChartActionSelected:function(e){var t=e.data.self,n=t.survey.owner.canCustomizeCharts();e.stopPropagation();if(e.action==="colors"&&!n){SM.Bi.uiTrigger="questionChartEditColorsMenuButton";SM.Views.create(SM.DialogView,{width:800,isModal:true,templateID:"customize-upgrade-dialog-template"}).open()}else if(e.action==="labels"&&t.question.isNPS()&&!t.question.isCompared()){SM.Bi.uiTrigger="questionChartchartTypeMenuButton";t.$el.trigger({type:"openCustomizeView",action:"chartType"})}else{SM.Bi.uiTrigger="questionChart"+e.action+"MenuButton";t.$el.trigger({type:"openCustomizeView",action:e.action})}},_renderQuestionHeading:function(){var e=_____WB$wombat$check$this$function_____(this),t=e._getQuestionHeading();if(e.currentQuestionHeading!==t){e.$el.find("[question-heading]").text(t);e.currentQuestionHeading=t}},_renderChartView:function(){var e=_____WB$wombat$check$this$function_____(this),t;t=SM.Views.create(SM.SummaryChartContainerView,{survey:e.survey,question:e.question,randomAssignmentOption:e.question.randomAssignmentOption,questionView:e});e.$questionContent.append(t.el);e.chartContainerView=t},_renderClickMapView:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.display.getDisplayData(),n=SM.ClickMapUtils.getColor(t),r=e.question.headings[0].image,i=!!SM.SharedAnalyzeApp,o;o=SM.Views.create(SM.ClickMapView,{view:i?SM.Constants.ACTION_TYPES.SHARE:SM.Constants.ACTION_TYPES.SUMMARY,surveyEncryptedID:e.question.survey.encryptedID,surveyID:e.question.survey.ID,packageID:e.question.survey.currentUser.package_id,packageType:e.question.survey.owner.packageType,userID:e.question.survey.currentUserID,questionDisplayModel:e.display,questionID:Number(e.question.ID),color:n,imageHeight:Number(r.image_height),imageWidth:Number(r.image_width),imageURL:r.url,clickCoordinates:SM.ClickMapUtils.getClickCoordinates(e.rollup.summary.coordinates_data)});e.$questionContent.find(".sm-click-map").remove();e.$questionContent.append(o.el)},_renderTableView:function(){var e=_____WB$wombat$check$this$function_____(this),t;t=SM.Views.create(SM.SummaryTableContainerView,{survey:this.survey,question:this.question,tableViewType:this._tableViewType,hasBenchmarkingOptions:this._hasBenchmarkingOptions,randomAssignmentOption:e.question.randomAssignmentOption});e.$questionContent.append(t.el)},_renderTextView:function(){var e=_____WB$wombat$check$this$function_____(this),t=this.question.getRollup(),n=t.getTaModel(),r;if(this.question.hasRandomAssignment()){n=t.getTaModel(0,0,this.question.randomAssignmentOption)}n.set("filterCount",t.answeredCount);r=SM.Views.create(SM.TaContainerView,{model:n});e.$questionContent.append(r.el)},_renderPresentationView:function(){var e=_____WB$wombat$check$this$function_____(this),t;t=SM.Views.create(SM.SummaryPresentationContainerView,{question:this.question,randomAssignmentOption:this.question.randomAssignmentList[this.__settings.randomAssignmentIndex]});e.$questionContent.append(t.el)},_renderUnavailableTextView:function(){var e=this.$el.find(".summary-question-text-analysis-container"),t=SM.Template.render("response-data-unavailable-template");e.append(t)},_renderFileUploadView:function(){var e=SM.Views.create(SM.SummaryFileUploadContainerView,{question:this.question,model:this.question.getRollup().getFileUploadModel()});this.$questionContent.append(e.el)},_renderPaymentView:function(){var e=this.question,t=e.survey,n=t.isSimplePayment,r=!!SM.SharedAnalyzeApp,i,o;if(n){o=e.getRollup().getPaymentModel();o.isSharedView=r;i=SM.Views.create(SM.SummaryPaymentView,{model:o,question:e})}else{o=SM.Models.create("ComplexPaymentList",{paymentSummary:t.getPaymentData(),question:e,isExport:false,isSharedView:r});i=SM.Views.create(SM.SummaryPaymentView,{model:o,question:e})}this.$questionContent.append(i.el)},_onQuestionHeadingClick:function(e){var t=e.data.self;var n={};if(t.question.isNPS()){return}if(SM.SharedAnalyzeApp){return}if(t._hasChartView){if(t._hasBenchmarkingOptions&&!t.display.getBenchmarkDisplay()||!t._hasBenchmarkingOptions){SM.CustomizeActionMenu.actionMenu.call(t,e,"h1",n)}}},_onDisplayChange:function(e){var t=e.data.self;t._setMinHeight();t._renderQuestionHeading();if(t.isBenchmarkable){t._updateBenchmarkIcon()}},_onQuestionHeadingActionSelected:function(e){var t=e.data.self;e.stopPropagation();if(e.action==="labels"){SM.Bi.uiTrigger="questionHeadingEditLabelMenuButton";t.$el.trigger({type:"openCustomizeView",action:e.action,answerID:null})}},_onTableActionSelected:function(e){var t=e.data.self;if(e.action==="labels"){e.stopPropagation();t.$el.trigger({type:"openCustomizeView",action:e.action,answerID:e.$action.attr("data-answer-id")})}},_setMinHeight:function(){var e=_____WB$wombat$check$this$function_____(this),t;setTimeout(function(){t=0;if(e.$questionContent!==undefined){if(e.$el.attr("view-role")==="summaryEssayQuestionView"){t=660}else{_.each(e.$questionContent.children(":visible"),function(e){t+=$(e).outerHeight()})}e.$questionContent.css({"min-height":t})}},150)},_shouldRenderTextView:function(){if(SM.App.isSharingApp()){return!SM.App.sharedView.hideOpenEnded()}return true},_updateBenchmarkIcon:function(){var e=this.$el.find(".benchmarkable-icon-ctnr"),t=this.display.getBenchmarkDisplay();if(t){e.addClass("active")}else{e.removeClass("active")}},getCurrentChartView:function(){var e=_____WB$wombat$check$this$function_____(this);return e.chartContainerView.chartView}};SM.SummarySingleChoiceQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summarySingleChoiceQuestionView",_hasTableView:true,_hasChartView:true,_hasPieDonutCharts:true,_hasStackedCharts:true,_hasScaleOptions:true,_hasShowEmptyOptions:true,_hasBenchmarkingOptions:true,_hasDepthOptions:true});SM.SummaryClickMapQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summaryClickMapQuestionView",_hasClickMapView:true,_hasTableView:false,_hasChartView:false,_hasPieDonutCharts:false,_hasStackedCharts:false,_hasScaleOptions:false,_hasShowEmptyOptions:false,_hasBenchmarkingOptions:false,_hasDepthOptions:false});SM.SummaryMultipleChoiceQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summaryMultipleChoiceQuestionView",_hasTableView:true,_hasChartView:true,_hasStackedCharts:true,_hasScaleOptions:true,_hasShowEmptyOptions:true});SM.SummaryPresentationQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summaryPresentationQuestionView",_isPresentation:true});SM.SummaryNumericalQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summaryNumericalQuestionView",_hasTableView:true,_hasChartView:true});SM.SummaryDemographicQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summaryDemographicQuestionView",_hasTableView:true});SM.SummaryOpenEndedMultiQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summaryOpenEndedQuestionView",_hasTableView:true});SM.SummaryDateTimeQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summaryDateTimeQuestionView",_hasTableView:true});SM.SummaryEssayQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summaryEssayQuestionView",_hasTextView:true,_textViewType:SM.SummaryTextView});SM.SummaryFileUploadQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summaryFileUploadQuestionView",_hasFileUploadView:true});SM.SummaryPaymentQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summaryPaymentQuestionView",_hasPaymentView:true});SM.SummaryMatrixRatingQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summaryMatrixRatingQuestionView",_hasTableView:true,_hasChartView:true,_hasStackedCharts:true,_hasScaleOptions:true,_hasDepthOptions:true,_hasMirrorOptions:true});SM.SummarySingleMatrixQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summarySingleMatrixQuestionView",_hasTableView:true,_hasChartView:true,_hasStackedCharts:true,_hasScaleOptions:true,_hasDepthOptions:true,_hasMirrorOptions:true});SM.SummaryMatrixRankingQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summaryMatrixRankingQuestionView",_hasTableView:true,_hasChartView:true,_hasStackedCharts:true,_hasScaleOptions:true,_hasDepthOptions:true,_hasMirrorOptions:true});SM.SummaryMultiMatrixQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summaryMultiMatrixQuestionView",_hasTableView:true,_hasChartView:true,_hasStackedCharts:true,_hasScaleOptions:true,_hasDepthOptions:true,_hasMirrorOptions:true});SM.SummaryMenuMatrixQuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"summaryMenuMatrixQuestionView",_hasTableView:true,_hasChartView:true,_hasStackedCharts:true,_hasScaleOptions:true,_hasDepthOptions:true,_hasMirrorOptions:true});SM.SummaryDisabledQuestionView=SM.Views.deepExtend(SM.SummaryBaseQuestionView,{__NAME:"summaryDisabledQuestionView",__defaults:{disabledMsg:"This question is disabled"},_hasTableView:false,_hasChartView:false,_isDisabledQuestionType:true});SM.SummaryCompareNumericalQuestionView=SM.Views.deepExtend(SM.SummarySingleMatrixQuestionView,{__NAME:"summaryCompareNumericalQuestionView",_hasChartView:false,_tableViewType:SM.SummaryCompareMatrixTableView,_exportTableViewType:SM.ExportSummaryCompareMatrixTableView});SM.SummaryCompareDemographicQuestionView=SM.Views.deepExtend(SM.SummarySingleMatrixQuestionView,{__NAME:"summaryCompareDemographicQuestionView",_hasChartView:false,_tableViewType:SM.SummaryCompareMatrixTableView,_exportTableViewType:SM.ExportSummaryCompareMatrixTableView});SM.SummaryCompareOpenEndedMultiQuestionView=SM.Views.deepExtend(SM.SummarySingleMatrixQuestionView,{__NAME:"summaryCompareOpenEndedQuestionView",_hasChartView:false,_tableViewType:SM.SummaryCompareMatrixTableView,_exportTableViewType:SM.ExportSummaryCompareMatrixTableView});SM.SummaryCompareDateTimeQuestionView=SM.Views.deepExtend(SM.SummarySingleMatrixQuestionView,{__NAME:"summaryCompareDateTimeQuestionView",_hasChartView:false,_tableViewType:SM.SummaryCompareMatrixTableView,_exportTableViewType:SM.ExportSummaryCompareMatrixTableView});SM.SummaryCompareEssayQuestionView=SM.Views.deepExtend(SM.SummarySingleMatrixQuestionView,{__NAME:"summaryCompareEssayQuestionView",_hasChartView:false,_hasTextView:false,_tableViewType:SM.SummaryCompareMatrixTableView,_exportTableViewType:SM.ExportSummaryCompareMatrixTableView});SM.SummaryCompareClickMapQuestionView=SM.Views.deepExtend(SM.SummaryBaseQuestionView,{__NAME:"summaryCompareClickMapQuestionView",_hasTableView:true,_hasChartView:false,_hasStackedCharts:false,_hasScaleOptions:false,_hasDepthOptions:false,_hasMirrorOptions:false,_hasTextView:false,_tableViewType:SM.SummaryCompareMatrixTableView,_exportTableViewType:SM.ExportSummaryCompareMatrixTableView});SM.SummaryCompareMenuMatrixQuestionView=SM.Views.deepExtend(SM.SummaryDisabledQuestionView,{__setup:function(){this.__defaults.disabledMsg=Globalize.localize("Compare rules do not apply to this question")},__defaults:{},__NAME:"summaryCompareMenuMatrixQuestionView"});SM.SummaryCompareSingleChoiceQuestionView=SM.Views.extend(SM.SummarySingleMatrixQuestionView,{__NAME:"summaryCompareSingleChoiceQuestionView",_tableViewType:SM.SummaryCompareMatrixTableView,_exportTableViewType:SM.ExportSummaryCompareMatrixTableView,_hasBenchmarkingOptions:true});SM.SummaryCompareMultipleChoiceQuestionView=SM.Views.extend(SM.SummaryCompareSingleChoiceQuestionView,{__NAME:"summaryCompareMultipleChoiceQuestionView",_tableViewType:SM.SummaryCompareMatrixTableView,_exportTableViewType:SM.ExportSummaryCompareMatrixTableView});SM.SummaryCompareMatrixRatingQuestionView=SM.Views.extend(SM.SummaryMenuMatrixQuestionView,{__NAME:"summaryCompareMatrixRatingQuestionView",_tableViewType:SM.SummaryCompareMenuMatrixTableView,_exportTableViewType:SM.ExportSummaryCompareMenuMatrixTableView});SM.SummaryCompareMatrixRankingQuestionView=SM.Views.extend(SM.SummaryMenuMatrixQuestionView,{__NAME:"summaryCompareMatrixRatingQuestionView",_tableViewType:SM.SummaryCompareMenuMatrixTableView,_exportTableViewType:SM.ExportSummaryCompareMenuMatrixTableView});SM.SummaryCompareSingleMatrixQuestionView=SM.Views.extend(SM.SummaryMenuMatrixQuestionView,{__NAME:"summaryCompareSingleMatrixQuestionView",_tableViewType:SM.SummaryCompareMenuMatrixTableView,_exportTableViewType:SM.ExportSummaryCompareMenuMatrixTableView});SM.SummaryCompareMultiMatrixQuestionView=SM.Views.extend(SM.SummaryMenuMatrixQuestionView,{__NAME:"summaryCompareMultiMatrixQuestionView",_tableViewType:SM.SummaryCompareMenuMatrixTableView,_exportTableViewType:SM.ExportSummaryCompareMenuMatrixTableView});SM.SummaryComparePresentationQuestionView=SM.Views.deepExtend(SM.SummaryDisabledQuestionView,{__setup:function(){this.__defaults.disabledMsg=Globalize.localize("Compare rules do not apply to this question")},__defaults:{},__NAME:"summaryComparePresentationQuestionView"});SM.SummaryQuestionListView=SM.Views.register({__NAME:"summaryQuestionList",__templateID:"summary-question-list-template",__model:"page",qTypes:{standard:{single_choice:SM.SummarySingleChoiceQuestionView,multiple_choice:SM.SummaryMultipleChoiceQuestionView,matrix_rating:SM.SummaryMatrixRatingQuestionView,matrix_ranking:SM.SummaryMatrixRankingQuestionView,matrix_single:SM.SummarySingleMatrixQuestionView,matrix_multi:SM.SummaryMultiMatrixQuestionView,matrix_menu:SM.SummaryMenuMatrixQuestionView,open_ended_essay:SM.SummaryEssayQuestionView,open_ended_single:SM.SummaryEssayQuestionView,open_ended_multi:SM.SummaryOpenEndedMultiQuestionView,open_ended_numerical:SM.SummaryNumericalQuestionView,open_ended_file_upload:SM.SummaryFileUploadQuestionView,click_map:SM.SummaryClickMapQuestionView,demographic:SM.SummaryDemographicQuestionView,datetime:SM.SummaryDateTimeQuestionView,presentation:SM.SummaryPresentationQuestionView},compare:{single_choice:SM.SummaryCompareSingleChoiceQuestionView,multiple_choice:SM.SummaryCompareMultipleChoiceQuestionView,matrix_rating:SM.SummaryCompareMatrixRatingQuestionView,matrix_ranking:SM.SummaryCompareMatrixRankingQuestionView,matrix_single:SM.SummaryCompareSingleMatrixQuestionView,matrix_multi:SM.SummaryCompareMultiMatrixQuestionView,matrix_menu:SM.SummaryCompareMenuMatrixQuestionView,open_ended_essay:SM.SummaryCompareEssayQuestionView,open_ended_single:SM.SummaryCompareEssayQuestionView,open_ended_multi:SM.SummaryCompareOpenEndedMultiQuestionView,open_ended_numerical:SM.SummaryCompareNumericalQuestionView,open_ended_file_upload:SM.SummaryCompareEssayQuestionView,click_map:SM.SummaryCompareClickMapQuestionView,demographic:SM.SummaryCompareDemographicQuestionView,datetime:SM.SummaryCompareDateTimeQuestionView,presentation:SM.SummaryComparePresentationQuestionView}},__afterRender:function(){var i=_____WB$wombat$check$this$function_____(this),e=i.page.shownQuestionList,o=document.createDocumentFragment(),a=i.page.survey.isExport;_.each(e,function(e){var t,n,r;if(SM.App.isSharingApp()&&e.subtype==="file_upload"){return}t=e.isBenchmarkable()&&!a&&!SM.App.isSharingApp()?SM.SummaryBenchmarkQuestionViewContainer:SM.SummaryQuestionViewContainer;n=i._getQuestionViewForQuestionType(e);r=SM.Views.create(t,{model:e,nestedQuestionDict:i.page.survey.questionRollups.questions[e.ID].nestedQuestionDict,questionViewProto:n});o.appendChild(r.el)},i);i.el.appendChild(o)},_getQuestionViewForQuestionType:function(e){var t=e.family,n=e.subtype,r=e.getRollup().getDisplayMode(),i;if(e.isPayment()){return SM.SummaryPaymentQuestionView}switch(t){case"matrix":i="matrix_"+n;break;case"open_ended":i="open_ended_"+n;break;case"single_choice":case"multiple_choice":case"demographic":case"datetime":case"presentation":default:i=t;break}return this.qTypes[r][i]}});SM.SummaryTMBCViewContainer=SM.Views.register({__NAME:"summaryTMBCViewContainer",__templateID:"tmbc-view-container-template",__model:"survey",__create:function(e){this.tmbcType=e.tmbcType},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.survey.tmbc,n={tmbcType:e.tmbcType,isGEI:e.tmbcType===t.TMBC_TYPE_GEI,isFE:e.tmbcType===t.TMBC_TYPE_ENGAGEMENT};if(this.survey.owner.hasBenchmarkingOptOut()&&!this.survey.owner.hasBenchmarkingRestricted()||this.survey.driverRollups.hasError()||SM.App.isSharingApp()){this._showingBenchmark=false}else{this._showingBenchmark=this.survey.tmbc.getTMBCShowHide(this.tmbcType)}if(!this._showingBenchmark){this.chartType=SM.QuestionDisplayModel.DISPLAY_VALUES.donut}else{this.chartType=this.survey.tmbc.getTMBCChartType(this.tmbcType)}return n},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.survey.getCurrentView(),n=e.survey.tmbc.hasError(),r=e.survey.tmbc.hasTooFewResponses(),i=!!t.getCompareRuleSelected()||t.hasFilterRule(),o=e.survey.tmbc.wasEdited(),a=e.survey.isCurrentUserAlsoOwner(),s;e.$tmbcContent=this.$el.find("[tmbc-content-container]");if(!n&&!r&&!i&&!o){e.tmbcView=SM.Views.create(SM.TMBCView,{model:e.survey.tmbc,tmbcType:e.tmbcType,chartType:e.chartType,showBenchmark:e._showingBenchmark});e.$tmbcContent.append(e.tmbcView.$el);e._dataNotAvailable=false}else{if(n){r=false;i=false;o=false}else if(o){r=false;i=false}else if(r){i=false;o=false}else{r=false;o=false}s=SM.Template.render("tmbc-data-not-available-template",{hasError:n,tooFewResponses:r,hasFilter:i,wasEdited:o,isGEI:e.tmbcType===e.survey.tmbc.TMBC_TYPE_GEI,isFE:e.tmbcType===e.survey.tmbc.TMBC_TYPE_ENGAGEMENT,isTMBC:true,toStore:e.survey.isStoreTemplate(),user_id:e.survey.currentUserID,tmbcType:e.tmbcType});e.$tmbcContent.html(s);e._dataNotAvailable=true}e._setupBenchmarkMenus();this._setBenchmarkSubheading();this._showOrHideButtons();this._showOrHideBenchmarkSubheading();this.$el.find(".q").popout();if(a&&!e.survey.isProfilerDialogEnabled()){this._popout=this.$el.find(".benchmarkable-icon-ctnr").popout({at:"right top",offsetX:10,tmbcType:this.tmbcType});this._popout.tmbcType=this.tmbcType}},__init:function(){this.survey.getCurrentView().on("ruleEdited",{self:this},this._onRuleEdited);this.$el.on("actionMenu.actionSelected",{self:this},this._onBenchmarkingBtnClick).on(SM.Event.CLICK,"a[summary-btn], a[benchmarking-btn]",{self:this},this._onBenchmarkingBtnClick).on(SM.Event.CLICK,"[hide-link]",{self:this},this._onHideBenchmarksClicked).on(SM.Event.CLICK,"[show-link]",{self:this},this._onShowBenchmarksClicked).on(SM.Event.CLICK,"[bm-chart-type-btn]",{self:this},this._onChartTypeBtnClicked).on("actionMenu.actionSelected","[bm-chart-type-btn]",{self:this},this._onChartTypeSelected).on(SM.Event.CLICK,".benchmarkable-icon-ctnr",{self:this},this._onBenchmarkableIconClicked).on(SM.Event.CLICK,".tmbc-chart-header.right",{self:this},this._onTMBCChartHeaderClick);this.__subscribe("popout.opened",this._onPopoutOpened,{self:this})},__destroy:function(){this.__unsubscribe("popout.opened",this._onPopoutOpened)},_onPopoutOpened:function(e){var t=e.data.self,n=$(".popout.open");if(t.tmbcType===e.popout.__settings.tmbcType){SM.Bi.logUpsellTooltipOpened(t.tmbcType)}n.on(SM.Event.CLICK,".upsell-btn",{self:t},t._onPopoutGetBenchmarksClicked)},_onPopoutGetBenchmarksClicked:function(e){var t=e.data.self,n=$(e.target),r=n.attr("destination"),i=n.attr("tmbcType"),o=t.survey.owner,a=o.hasBenchmarkingRestricted(),s=t.survey.isTMBCTemplate(),l,u=function(){if(s){SM.Views.create(SM.BenchmarkRequestDialogView,{model:t.survey,type:t.survey.getTemplateType(),triggeredFrom:"tmbc",lqid:"",canonical_name:""}).open()}else{window.location.href=r}};e.preventDefault();e.stopPropagation();if(t.tmbcType===i){l=t._popout.data("popout");l._isHovered=false;l._$msg.remove();SM.Bi.benchmarkingBuyMore(i,"upsell_popout","icon",r,a,false).done(u).fail(u)}},_onRuleEdited:function(e){var t=e.data.self;if(!e.ruleModel.isShow){t.render()}},_onTMBCChartHeaderClick:function(e){var t=e.data.self,n=$(e.currentTarget),r=t.survey,i=r.dataSegmentList.getSelectedSegment();SM.BenchmarkActionMenu.actionMenu(t,n,i,"tmbc",e,true)},_initBenchmarkMenu:function(e,t){var n,r;e.actionMenu({templateID:t});n=e.data("actionMenu");if(n){r=n.get("menuView");r.$el.find(".q").popout()}},_initChartMenu:function(e){this.chartMenu=e.actionMenu({menuView:"TMBCChartOptionsMenuView",position:{my:"left top",at:"left bottom"},model:this.survey.tmbc,tmbcType:this.tmbcType,isReadOnly:this.survey.isReadOnly()}).data("actionMenu");this.chartMenu.open()},_onChartTypeBtnClicked:function(e){var t=e.data.self,n=$(e.target);e.stopPropagation();e.preventDefault();if(t._showingBenchmark){t._initChartMenu(n)}},_setupBenchmarkMenus:function(){var e=this.$el.find("span[benchmarking-btn]").find("a[show-menu]"),t=this.$el.find("span[summary-btn]").find("a[hide-menu]");this._initBenchmarkMenu(e,"show-benchmarks-menu-template");this._initBenchmarkMenu(t,"hide-benchmarks-menu-template")},_setBenchmarkSubheading:function(){var e=this.chartType===SM.QuestionDisplayModel.DISPLAY_VALUES.donut,t=e?".benchmark-nps-chart-footer [benchmark]":"[benchmark-sub-heading]",n=this.$el.find(t),r=this.survey.tmbc,i=r.getSegmentName(),o=Globalize.format(r.getSampleSize(this.tmbcType),"n0"),a=moment.unix(r.getDateStart(this.tmbcType)).toDate(),s=moment.unix(r.getDateEnd(this.tmbcType)).toDate(),l=SM.Template.render("summary-benchmark-question-subheading-template",{isGaugeChart:e,isTMBC:true,segmentName:i,sampleSize:o,dateStart:Globalize.format(a,"d"),dateEnd:Globalize.format(s,"d")});n.html(l)},_showOrHideBenchmarkSubheading:function(){var e=this.chartType===SM.QuestionDisplayModel.DISPLAY_VALUES.donut,t=this.$el.find("[question-sub-heading][standard]"),n=this.$el.find("[benchmark-sub-heading]"),r=this.survey.tmbc;if(this._showingBenchmark){t.hide();if(this.isBenchmarkable){if(r.hasError()){n.hide()}else if(e){n.hide()}else{n.show()}}}else{t.show();n.hide()}},_showOrHideButtons:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.$el.find("span[summary-btn]"),n=t.find("a[summary-btn]"),r=t.find("a[hide-menu]"),i=e.$el.find("span[benchmarking-btn]"),o=i.find("a[benchmarking-btn]"),a=i.find("a[show-menu]"),s=e.$el.find("a[bm-chart-type-btn]"),l=e.survey.driverRollups.getError()==="no_access";if(e._dataNotAvailable||e.survey.driverRollups.hasError()&&!l){n.addClass("disabled");r.addClass("disabled");o.addClass("disabled");a.addClass("disabled")}else{n.removeClass("disabled");r.removeClass("disabled");o.removeClass("disabled");a.removeClass("disabled")}if(e._showingBenchmark){t.show();i.hide();if(e._dataNotAvailable){s.addClass("disabled")}else{s.removeClass("disabled")}}else{t.hide();i.show();s.addClass("disabled")}},_toggleBenchmarkingBtn:function(){this._showingBenchmark=!this._showingBenchmark;this._showOrHideButtons();this._showOrHideBenchmarkSubheading()},_hideBenchmarks:function(e,t){if(t){this.survey.dataSegmentList.enableAllBenchmarks(false)}else{this.survey.tmbc.setTMBCShowHide(e,false);this.render()}SM.Bi.benchmarkingShowHide(e,"show",t)},_showBenchmarks:function(e,t){if(t){this.survey.dataSegmentList.enableAllBenchmarks(true)}else{this.survey.tmbc.setTMBCShowHide(e,true);this.render()}SM.Bi.benchmarkingShowHide(e,"show",t)},_onHideBenchmarksClicked:function(e){var t=e.data.self;e.preventDefault();e.stopPropagation();t._hideBenchmarks(t.tmbcType,false)},_onShowBenchmarksClicked:function(e){var t=e.data.self;e.preventDefault();e.stopPropagation();t._showBenchmarks(t.tmbcType,false)},_onBenchmarkingBtnClick:function(e){var t=e.data.self,n=t.survey,r=e.$action?e.$action:$(e.target),i=r.attr("data-action"),o;e.preventDefault();if($(e.target).hasClass("disabled")){return}if(i==="hide-benchmark"||i==="hide-all-benchmarks"){t._hideBenchmarks(t.tmbcType,i==="hide-all-benchmarks")}else if(i==="show-benchmark"||i==="show-all-benchmarks"){if(n.isProfilerDialogEnabled()){o=SM.Views.create(SM.ProfilerDialogView,{model:n.profiler,type:n.getTemplateType(),action_source:"driver",triggeredFrom:"driver_benchmarking_button"});o.open()}else{t._showBenchmarks(t.tmbcType,i==="show-all-benchmarks")}}},_hasBenchmarking:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.survey,n=t.owner;if(!t.isCurrentUserAlsoOwner()){return t.canShowBenchmarking()}return n.hasBenchmarking()},_onChartTypeSelected:function(e){var t=e.data.self,n=e.action,r=t.survey.tmbc.getTMBCChartType(t.tmbcType);if($(e.target).hasClass("disabled")){return}if(n!==r){t.chartType=n;t.survey.tmbc.setTMBCChartType(t.tmbcType,n);t.render()}},_onBenchmarkableIconClicked:function(e){var t=e.data.self,n=$(e.target),r=t.survey,i=r.isCurrentUserAlsoOwner(),o=t.$el.find("[sm-questionview-content]");e.preventDefault();e.stopPropagation();if(!i){return}if(n.hasClass("disabled")){return}if(r.isProfilerDialogEnabled()){if(t._profilerOverlay){t._profilerOverlay.close()}else{if(o.length===0){o=t.$el.find("[tmbc-content-container]")}t._profilerOverlay=SM.Views.create(SM.ProfilerDriverOverlayView,{model:r.profiler,type:r.getTemplateType(),action_source:"tmbc",triggeredFrom:"icon",owner:t,$tgt:n,$ctnr:o});t._profilerOverlay.open(o)}}}});SM.TMBCView=SM.Views.register({__NAME:"tmbcView",__templateID:"summary-tmbc-template",__model:"tmbc",_hasTableView:false,_hasChartView:false,_chartViewType:undefined,_tableViewType:undefined,__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.survey=t.tmbc.survey;t.tmbcType=e.tmbcType;t.chartType=e.chartType;this._hasChartView=true;this._hasTableView=true},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=!e.tmbc.hasError(),n=e.tmbc.survey,r=n.currentUserID,i=n.isTMBCTemplate(),o=n.isStoreTemplate();this._hasTableView=e.get("showBenchmark");return{isVisible:t,hasBenchmarking:true,isActive:e.get("showBenchmark"),isBenchmarkable:!SM.App.isSharingApp(),showBenchmark:e.get("showBenchmark"),sampleSize:e.tmbc.getSampleSize(e.tmbcType),dateStart:e.tmbc.getDateStart(e.tmbcType),dateEnd:e.tmbc.getDateEnd(e.tmbcType),userID:r,viewedPercentage:true,viewedNumber:Globalize.format(0,"n0"),isPresentation:false,isTextPresentation:false,isTMBC:i,toStore:o,tmbcType:e.tmbcType}},__afterRender:function(e){var t=_____WB$wombat$check$this$function_____(this);if(!e.isVisible){return}t.$questionContent=this.$el;if(this._hasChartView){this._renderChartView()}if(this._hasTableView){this._renderTableView()}t._setMinHeight()},__init:function(){var e=_____WB$wombat$check$this$function_____(this),t="actionMenu.actionSelected";e.$el.on(SM.Event.CLICK,"[question-heading]",{self:e},e._onQuestionHeadingClick).on(t,"[question-heading]",{self:e},e._onQuestionHeadingActionSelected).on(t,".sm-chart-container *",{self:this},this._onChartActionSelected).on(t,".sm-data-table-container *",{self:this},this._onTableActionSelected)},_onChartActionSelected:function(e){var t=e.data.self,n=t.survey.owner.canCustomizeCharts();e.stopPropagation();if(e.action==="colors"&&!n){SM.Bi.uiTrigger="questionChartEditColorsMenuButton";SM.Views.create(SM.DialogView,{width:800,isModal:true,templateID:"customize-upgrade-dialog-template"}).open()}else{SM.Bi.uiTrigger="questionChart"+e.action+"MenuButton";t.$el.trigger({type:"openCustomizeView",action:e.action})}},_renderChartView:function(){var e=_____WB$wombat$check$this$function_____(this),t;t=SM.Views.create(SM.SummaryTMBCChartContainerView,{model:e.tmbc,tmbcType:e.tmbcType,chartType:e.chartType,questionView:e,showBenchmark:e.get("showBenchmark")});e.$questionContent.append(t.el);e.chartContainerView=t},_renderTableView:function(){var e=_____WB$wombat$check$this$function_____(this),t;t=SM.Views.create(SM.TMBCTableContainerView,{model:e.tmbc,tmbcType:e.tmbcType,tableViewType:this._tableViewType});e.$questionContent.append(t.el)},_onTableActionSelected:function(e){var t=e.data.self;if(e.action==="labels"){e.stopPropagation();t.$el.trigger({type:"openCustomizeView",action:e.action,answerID:e.$action.attr("data-answer-id")})}},_setMinHeight:function(){var e=_____WB$wombat$check$this$function_____(this),t;setTimeout(function(){t=0;if(e.$questionContent!==undefined){_.each(e.$questionContent.children(":visible"),function(e){t+=$(e).outerHeight()});e.$questionContent.css({"min-height":t})}},150)},_updateBenchmarkIcon:function(){var e=this.$el.find(".benchmarkable-icon-ctnr"),t=this.display.getBenchmarkDisplay();if(t){e.addClass("active")}else{e.removeClass("active")}},getCurrentChartView:function(){var e=_____WB$wombat$check$this$function_____(this);return e.chartContainerView.chartView}});SM.BenchmarkTop2QuestionView=SM.Views.extend(SM.SummaryBaseQuestionView,{__NAME:"benchmarkTop2QuestionView",__templateID:"summary-question-template",__model:"question",_hasTableView:true,_hasChartView:true,_hasTextView:false,_hasBenchmarkingOptions:true,_chartViewType:undefined,_tableViewType:undefined,__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.survey=t.question.survey;t.rollup=t.question.getRollup();t.survey=t.question.survey;t.display=t.rollup.display;t.currentQuestionHeading=t._getQuestionHeading();t.questionContainerView=e.questionContainerView;t.isBenchmarkable=e.isBenchmarkable},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.survey,n=t.currentUserID,r=t.isTMBCTemplate(),i=t.isCurrentUserAlsoOwner()&&!t.owner.hasBenchmarkingRestricted(),o=i&&t.hasActivatedBenchmark(),a=t.isStoreTemplate()||o,c=t.ownerPackageType(),s=e.question.getBenchmarkRollup(),l=t.dataSegmentList.getSelectedSegment(),u=t.getTemplateName();this._hasTableView=true;this.benchmarkRollup=s;if(u){u="&qbcat="+u}return{isVisible:true,hasBenchmarking:true,isActive:true,isBenchmarkable:!SM.App.isSharingApp(),answered:e.rollup.answered,skipped:e.rollup.skipped,showBenchmark:true,question_id:e.question.ID,sampleSize:s.getSampleSize(),dateStart:l.dateStart(),dateEnd:l.dateEnd(),userID:n,viewedPercentage:true,viewedNumber:Globalize.format(0,"n0"),isPresentation:false,isTextPresentation:false,isTMBC:r,templateName:u,toStore:a,isActivator:o,planName:c,tmbcType:e.tmbcType,questionHeading:e.currentQuestionHeading,user_id:t.currentUserID,surveyId:t.ID}},_onChartActionSelected:function(e){var t=e.data.self,n=t.survey.owner.canCustomizeCharts();e.stopPropagation();if(e.action==="colors"&&!n){SM.Bi.uiTrigger="questionChartEditColorsMenuButton";SM.Views.create(SM.DialogView,{width:800,isModal:true,templateID:"customize-upgrade-dialog-template"}).open()}else{SM.Bi.uiTrigger="questionChart"+e.action+"MenuButton";t.$el.trigger({type:"openCustomizeView",action:e.action})}},__afterRender:function(e){SM.SummaryBaseQuestionView.__afterRender.call(this,e);this._renderQuestionHeading();if(this.isBenchmarkable){this._updateBenchmarkIcon();this._setBenchmarkSubheading();this._showOrHideBenchmarkSubheading()}},_setBenchmarkSubheading:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.display.getDisplayData(),n=t.benchmark_chart_type===e.display.DISPLAY_VALUES.top2_donut,r=n?this.$el.find(".benchmark-nps-chart-footer [benchmark]"):this.$el.find("[benchmark-sub-heading]"),i=this.benchmarkRollup.getSegmentName(),o=Globalize.format(this.benchmarkRollup.getSampleSize(),"n0"),a=moment.unix(this.benchmarkRollup.getDateStart()).toDate(),s=moment.unix(this.benchmarkRollup.getDateEnd()).toDate(),l=SM.Template.render("summary-benchmark-question-subheading-template",{isGaugeChart:false,isTop2Donut:n,isTMBC:this.question.survey.isTMBCTemplate(),segmentName:i,sampleSize:o,dateStart:Globalize.format(a,"d"),dateEnd:Globalize.format(s,"d")});r.html(l)},_showOrHideBenchmarkSubheading:function(){var e=this.$el.find("[question-sub-heading][standard]"),t=this.$el.find("[benchmark-sub-heading]"),n=this.question.getRollup().display;e.hide();if(this.benchmarkRollup.hasError()){t.hide()}else if(n.getChartType()===n.DISPLAY_VALUES.score_gauge||n.getChartType()===n.DISPLAY_VALUES.top2_donut){t.hide()}else{t.show()}},_renderChartView:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.question.getRollup().display,n=t.getDisplayData(),r=n.show_benchmark?n.benchmark_chart_type:n.chart_type,i;if(r===t.DISPLAY_VALUES.top2_donut||r===t.DISPLAY_VALUES.top2_vbar||r===t.DISPLAY_VALUES.top2_hbar){i=SM.Views.create(SM.BenchmarkTop2SummaryChartView,{model:e.question,questionView:e,showBenchmark:true,question:e.question,isDonut:r===t.DISPLAY_VALUES.top2_donut})}else{i=SM.Views.create(SM.BenchmarkSummaryChartView,{question:e.question,isBenchmarkable:true})}e.$questionContent.append(i.el);e.chartContainerView=i},_renderTableView:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.question.getRollup().display,n=t.getDisplayData(),r=n.benchmark_chart_type,i;if(!n.show_table){return}if(r===t.DISPLAY_VALUES.hbar||r===t.DISPLAY_VALUES.vbar){i=SM.Views.create(SM.SummaryTableContainerView,{survey:e.survey,question:e.question,tableViewType:e._tableViewType,hasBenchmarkingOptions:e._hasBenchmarkingOptions,randomAssignmentOption:e.question.randomAssignmentOption})}else if(r===t.DISPLAY_VALUES.top2_hbar||r===t.DISPLAY_VALUES.top2_vbar||r===t.DISPLAY_VALUES.top2_donut){i=SM.Views.create(SM.SummaryTableContainerView,{survey:e.survey,question:e.question,tableViewType:e._tableViewType,hasBenchmarkingOptions:e._hasBenchmarkingOptions,randomAssignmentOption:e.question.randomAssignmentOption,isTop2:true})}else if(r===t.DISPLAY_VALUES.boxplot){i=SM.Views.create(SM.SummaryTableContainerView,{survey:e.survey,question:e.question,tableViewType:SM.BenchmarkQuartileTableView,hasBenchmarkingOptions:e._hasBenchmarkingOptions,randomAssignmentOption:e.question.randomAssignmentOption,isTop2:true})}else{i=SM.Views.create(SM.TMBCTableContainerView,{model:e.tmbc,tmbcType:e.tmbcType,tableViewType:this._tableViewType})}e.$questionContent.append(i.el)},_onTableActionSelected:function(e){var t=e.data.self;if(e.action==="labels"){e.stopPropagation();t.$el.trigger({type:"openCustomizeView",action:e.action,answerID:e.$action.attr("data-answer-id")})}},_onDisplayChange:function(e){var t=e.data.self;t.render()},_setMinHeight:function(){var e=_____WB$wombat$check$this$function_____(this),t;setTimeout(function(){t=0;if(e.$questionContent!==undefined){_.each(e.$questionContent.children(":visible"),function(e){t+=$(e).outerHeight()});e.$questionContent.css({"min-height":t})}},150)},_updateBenchmarkIcon:function(){var e=this.$el.find(".benchmarkable-icon-ctnr"),t=this.display.getBenchmarkDisplay();if(t){e.addClass("active")}else{e.removeClass("active")}},getCurrentChartView:function(){var e=_____WB$wombat$check$this$function_____(this);return e.chartContainerView}});SM.CustomizeQuestionSummaryView=SM.Views.register({__NAME:"CustomizeQuestionSummaryView",__templateID:"customize-question-summary-template",_customizationTabMap:{chartType:"chart",displayOptions:"display",colors:"color",labels:"label"},__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.question=e.question;t.survey=t.question.survey;t.rollup=t.question.getRollup();t.display=t.rollup.display;t.questionView=e.questionView;t.applyToAll=false;t.hasMirrorOptions=e.hasMirrorOptions;t.hasDepthOptions=e.hasDepthOptions;t.hasScaleOptions=e.hasScaleOptions;t.hasShowEmptyOptions=e.hasShowEmptyOptions;t.hasAreaCharts=e.hasAreaCharts;t.hasPieDonutCharts=e.hasPieDonutCharts;t.hasStackedCharts=e.hasStackedCharts;t.isTop2Customizer=e.isTop2Customizer||false;t.hasRequestAccessType=t.question.survey.hasFeatureAccessType(SM.Constants.FEATURES.CUSTOMIZE_CHARTS,SM.Constants.ACCESS_TYPE.REQUEST);t.hasUpgradeAccessType=t.question.survey.hasFeatureAccessType(SM.Constants.FEATURES.CUSTOMIZE_CHARTS,SM.Constants.ACCESS_TYPE.UPGRADE);t.currentView=null;_.bindAll(this,"_onBeforeTabOpen","_onSaveBtnClick","_onCancelBtnClick","_onApplyToAllCheckBoxClick","_hasUpgradeRequestBtns","_onDisplayChange","_enableSaveBtn")},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.question.isNPS(),n=t&&!e.question.isCompared();return{questionID:e.question.ID,hasChartTypeCustomization:e.question.hasChartTypeCustomization(),hasDisplayOptionsCustomization:e.question.hasDisplayOptionsCustomization(),hasColorCustomization:e.question.hasColorCustomization(),hasLabelCustomization:e.question.hasLabelCustomization(),isNps:t,isNpsSimple:n,isTop2Customizer:e.isTop2Customizer,lockIcon:SM.WrenchIcons.IconLock.render(),showRequest:e.hasRequestAccessType,requestUrl:e.question.survey.surveyAccessController.requestAccessUrlForFeature(SM.Constants.FEATURES.CUSTOMIZE_CHARTS)}},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.css("height","auto");if(e.isTop2Customizer){e._renderTop2ChartTypeView(e.$el.find("[top2-chart-type]"))}else{e.tabs=e.$el.find(".tabs").tabs({requireOpenTab:true}).data("tabs")}e.$el.find(".sm-customize-actions [save-btn]").addClass("disabled")},_renderTab:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=e==="colors",i=r&&n.survey.hasFeatureAccessType(SM.Constants.FEATURES.CUSTOMIZE_CHARTS,SM.Constants.ACCESS_TYPE.REQUEST),c=r&&n.survey.hasFeatureAccessType(SM.Constants.FEATURES.CUSTOMIZE_CHARTS,SM.Constants.ACCESS_TYPE.UPGRADE),o=n.$el.find(".sm-customize-actions a[save-btn]"),a=n.$el.find(".sm-customize-actions a[request-btn]"),s=n.$el.find("div[sm-customize-actions]"),l=n.$el.find("a[cancel-btn]"),u=n.$el.find("span[lock-icon]");switch(e){case"chartType":n._renderCustomizeChartTypeView(t);break;case"displayOptions":n._renderCustomizeDisplayOptionsView(t);break;case"colors":n._renderCustomizeColorsView(t);break;case"labels":n._renderCustomizeLabelsView(t);break;default:break}if(n.question.isClickMap()&&e==="labels"){n.$el.find("input[apply-to-all-checkbox]").attr("disabled","")}else if(n.question.isClickMap()){n.$el.find("input[apply-to-all-checkbox]").attr("disabled",null)}if(c){s.addClass("upgrade-trigger");s.removeClass("analyze-request-access");u.removeClass("lock-icon--visible");s.removeClass("save-btn--hidden");a.removeClass("request-trigger--visible");o.text(Globalize.localize("UPGRADE"));o.addClass("wds-button--upgrade");o.removeClass("save-btn--hidden");l.removeClass("cancel-btn--hidden");this._enableSaveBtn()}else if(i){s.addClass("analyze-request-access");o.addClass("save-btn--hidden");a.addClass("request-trigger--visible");u.addClass("lock-icon--visible");l.addClass("cancel-btn--hidden")}else{s.removeClass("save-btn--hidden");s.removeClass("analyze-request-access");u.removeClass("lock-icon--visible");a.removeClass("request-trigger--visible");l.removeClass("cancel-btn--hidden");o.text(Globalize.localize("SAVE"));o.removeClass("wds-button--upgrade save-btn--hidden");if(!n._isDirty()){n._disableSaveBtn()}}},_renderCustomizeChartTypeView:function(e){var t=_____WB$wombat$check$this$function_____(this);if(t.question.isNPS()){t.currentView=SM.Views.create(SM.NpsCustomizeChartTypeView,{question:t.question,rollup:t.rollup,display:t.display,hasPieDonutCharts:t.hasPieDonutCharts,hasStackedCharts:t.hasStackedCharts})}else{t.currentView=SM.Views.create(SM.CustomizeChartTypeView,{question:t.question,rollup:t.rollup,display:t.display,hasPieDonutCharts:t.hasPieDonutCharts,hasStackedCharts:t.hasStackedCharts,hasAreaCharts:t.question.displayType!=="slider",hasLineCharts:t.question.displayType!=="slider"})}e.html(t.currentView.el)},_renderTop2ChartTypeView:function(e){var t=_____WB$wombat$check$this$function_____(this);t.currentView=SM.Views.create(SM.CustomizeTop2ChartTypeView,{question:t.question,rollup:t.rollup,display:t.display});e.html(t.currentView.el)},_renderCustomizeDisplayOptionsView:function(e){var n=_____WB$wombat$check$this$function_____(this);n.currentView=SM.Views.create(SM.CustomizeDisplayOptionsView,{question:n.question,rollup:n.rollup,display:n.display,customizeView:n,hasMirrorOptions:n.hasMirrorOptions,hasDepthOptions:n.hasDepthOptions,hasScaleOptions:n.hasScaleOptions,hasShowEmptyOptions:n.hasShowEmptyOptions});$(n.currentView.el).on("displayOptionsValidation",function(e,t){if(!t&&n._canSave()){n._enableTabs();n._enableSaveBtn()}else{n._disableTabs();n._disableSaveBtn()}});e.html(n.currentView.el)},_renderCustomizeColorsView:function(e){var t=_____WB$wombat$check$this$function_____(this);t.currentView=SM.Views.create(SM.CustomizeColorsView,{display:t.display});e.html(t.currentView.el)},_renderCustomizeLabelsView:function(e){var t=_____WB$wombat$check$this$function_____(this);t.currentView=SM.Views.create(SM.CustomizeLabelsView,{question:t.question,rollup:t.rollup,display:t.display});e.html(t.currentView.el)},animateIn:function(e,t){var n=_____WB$wombat$check$this$function_____(this);if(e.find("[sm-customize-question-view]").length===0){n.$el.prependTo(e)}n.$el.trigger({type:"beforeCustomizeViewAnimateIn"});n.$el.slideDown(500,function(){if(t){t()}})},animateOut:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.slideUp({duration:250,complete:function(){e.$el.trigger({type:"afterCustomizeViewAnimateOut"});e.$el.find(".sm-customize-actions [save-btn]").addClass("disabled")}})},__init:function(){var e=_____WB$wombat$check$this$function_____(this);if(!e.isTop2Customizer){e.tabs.$el.on("tabs.beforeOpen",e._onBeforeTabOpen)}e.$el.find(".apply-to-all .q").popout();e.$el.on("click","[apply-to-all-checkbox]",e._onApplyToAllCheckBoxClick);e.$el.on("click",".sm-customize-actions [save-btn]",e._onSaveBtnClick);e.$el.on("click",".sm-customize-actions [cancel-btn]",e._onCancelBtnClick);e.bindModel(e.display,"allDisplaysChange",{self:e},function(){e.currentView.render()});e.bindModel(e.display,"displayChange",{self:e},e._onDisplayChange);e.bindModel(e.display,"tempDisplayChange",{self:e},e._onDisplayChange);e.bindModel(e.display,"allDisplaysChange",{self:e},e._onDisplayChange)},_onDisplayChange:function(){var e=_____WB$wombat$check$this$function_____(this);if(e._canSave()){e._enableTabs();e._enableSaveBtn()}else{e._disableTabs();e._disableSaveBtn()}},_onBeforeTabOpen:function(e){var t=_____WB$wombat$check$this$function_____(this),n=e.tab.key,r=e.tab.$panel;t._renderTab(n,r)},_hasUpgradeRequestBtns:function(){var e=_____WB$wombat$check$this$function_____(this);return e.$el.find("[sm-customize-actions]").hasClass("upgrade-trigger")||e.$el.find("[request-btn]").hasClass("request-trigger--visible")},_onApplyToAllCheckBoxClick:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r=$(e.target);if((t.hasUpgradeAccessType||t.hasRequestAccessType)&&t._hasUpgradeRequestBtns()){e.preventDefault();n=SM.Views.create(SM.DialogView,{width:800,isModal:true,templateID:"customize-upgrade-dialog-template",showUpgrade:t.hasUpgradeAccessType,showRequest:t.hasRequestAccessType,requestUrl:t.question.survey.surveyAccessController.requestAccessUrlForFeature(SM.Constants.FEATURES.CUSTOMIZE_CHARTS)});n.open();return}t.applyToAll=r.prop("checked");if(t.applyToAll&&t._canSave()){t._enableSaveBtn()}else if(!t._isDirty()){t._disableSaveBtn()}},_onSaveBtnClick:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r=$(e.target);e.preventDefault();if(r.hasClass("wds-button--upgrade")){n=SM.Views.create(SM.DialogView,{width:800,isModal:true,templateID:"customize-upgrade-dialog-template"});n.open();return}if(r.hasClass("disabled")){return}t.display._trigger({type:"saving"});t._save({applyToAll:t.applyToAll});t.animateOut();SM.MetricsTracker.track({name:"ELEMENT_INTERACTION",data:{actionType:"ANALYZE_APPLIED_CUSTOMIZATION",actionFlow:"analyze customization",amplitudeEvent:"analyze applied customization",pageName:"question summary",headerName:"analyze",appliedToAll:t.applyToAll,customizationType:t._customizationTabMap[t.tabs._selectedTab]}})},_onCancelBtnClick:function(e){var t=_____WB$wombat$check$this$function_____(this);e.preventDefault();t._clearUpdates();t.animateOut()},_save:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r,i,o,a=t.survey.anviews.defaultView;e=e||{};o=e.applyToAll;n=t.display.getDisplayUpdates();SM.Bi.logCustomizeQuestion(n,e.applyToAll,t.display.question);i=t.display.getDefaultViewMetadataUpdates();if(!_.isEmpty(i)){a.updateDisplayData("0",i,{save:false})}if(o&&t.question.isTop2()){r=_.filter(t.survey.questions,function(e){return e.isTop2()&&!e.isSlider()});a.updateQuestionDisplayData(n,r,{isCompared:t.question.isCompared(),untypedKeys:SM.QuestionDisplayModel.UNTYPED_DISPLAY_OPTIONS});t._clearUpdates();t.survey.questionRollups.onSharedDisplayDataChange();return}if(!_.isEmpty(n)){t.display.updateDisplayData(n,{done:function(){if(o){t._applyToAll()}}})}else if(o){t._applyToAll()}t._clearUpdates()},_applyToAll:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.display.getSharedDisplayUpdates(),n,r;var i=function(e){return!e.question.isSlider()};e.survey.anviews.defaultView.updateSharedDisplayData({updates:t,deletedKeys:e.display.SHARED_DISPLAY_OPTIONS,untypedKeys:e.display.UNTYPED_DISPLAY_OPTIONS,isCompared:e.question.isCompared(),rollupQuestionsFilter:i});n=t.show_basic_stats&&t.show_basic_stats===SM.QuestionDisplayModel.DISPLAY_VALUES.show;r=t.show_sig_diffs&&t.show_sig_diffs===SM.QuestionDisplayModel.DISPLAY_VALUES.show;if(n||r){e.survey.questionRollups.fetchStatsRollups()}else{e.survey.questionRollups.onSharedDisplayDataChange()}},_clearUpdates:function(){var e=_____WB$wombat$check$this$function_____(this);e.display.clearDisplayUpdates();e.display.clearTempDisplay();e.display.clearDefaultViewMetadataUpdates()},_canSave:function(){var e=_____WB$wombat$check$this$function_____(this);if(e.display.labelUpdatesHaveEmptyLabel()){return false}return true},_isDirty:function(){var e=_____WB$wombat$check$this$function_____(this);return!_.isEmpty(e.display.getDisplayUpdates())},_disableTabs:function(){if(!this.isTop2Customizer){this.tabs.$el.children("nav").find(".tab").addClass("disabled")}},_enableTabs:function(){if(!this.isTop2Customizer){this.tabs.$el.children("nav").find(".tab").removeClass("disabled")}},_enableSaveBtn:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.find("[sm-customize-actions] [save-btn]").removeClass("disabled")},_disableSaveBtn:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.find("[sm-customize-actions] [save-btn]").addClass("disabled")}});SM.CustomizeChartTypeView=SM.Views.register({__NAME:"CustomizeChartTypeView",__templateID:"customize-chart-type-template",__defaults:{hasAreaCharts:true,hasLineCharts:true,hasPieDonutCharts:false,hasStackedCharts:false},__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.question=e.question;t.rollup=e.rollup;t.display=e.display;t.set("hasAreaCharts",e.hasAreaCharts);t.set("hasLineCharts",e.hasLineCharts);t.set("hasPieDonutCharts",e.hasPieDonutCharts);t.set("hasStackedCharts",e.hasStackedCharts)},__beforeRender:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.display.DISPLAY_VALUES,r=t.display.getDisplayData(),i=t.display.getChartType();var o=SM.StarRatingUtils.newVizApplicable(t.question);var a=SM.StarRatingUtils.newVizEffective(t.question);e={hbar:{isEnabled:true,isSelected:i===n.hbar},vbar:{isEnabled:true,isSelected:i===n.vbar},pie:{isEnabled:t.get("hasPieDonutCharts"),isSelected:i===n.pie},donut:{isEnabled:t.get("hasPieDonutCharts"),isSelected:i===n.donut},stacked_hbar:{isEnabled:t.get("hasStackedCharts"),isSelected:i===n.stacked_hbar},stacked_vbar:{isEnabled:t.get("hasStackedCharts"),isSelected:i===n.stacked_vbar},line:{isEnabled:t.get("hasLineCharts"),isSelected:i===n.line},area:{isEnabled:t.get("hasAreaCharts"),isSelected:i===n.area},boxplot:{isEnabled:false,isSelected:false},weighted_avg:{isEnabled:a,isSelected:i===n.wtd_avg,isVisible:o}};if(r.tableHasOneRow){e.stacked_hbar.isEnabled=true;e.stacked_vbar.isEnabled=true;e.line.isEnabled=false;e.area.isEnabled=false;if(!t.display._tableRowsAddToMoreThan100Percent(r)){e.pie.isEnabled=true;e.donut.isEnabled=true}}if(r.isWeightedAvg&&!a){e.stacked_hbar.isEnabled=false;e.stacked_vbar.isEnabled=false;e.pie.isEnabled=false;e.donut.isEnabled=false}if(!e[i].isEnabled&&e[i].isSelected){e[i].isSelected=false;i=t.display.DEFAULT_CHART_TYPE;e[i].isSelected=true}return e},__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.on(SM.Event.CLICK,".chart-types li",{self:e},e._onChartTypeClick)},_onChartTypeClick:function(e){var t=e.data.self,n=$(e.target),r=n.attr("data-chart-type"),i;e.preventDefault();if(n.hasClass("disabled")){return}i=t.display.getChartTypeUpdates(r);t.display.updateTempDisplay(i);t.display.setDisplayUpdates(i);t.render()}});SM.CustomizeTop2ChartTypeView=SM.Views.register({__NAME:"CustomizeChartTypeView",__templateID:"top2-customize-chart-type-template",__defaults:{hasAreaCharts:false,hasPieDonutCharts:false,hasStackedCharts:false},__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.question=e.question;t.rollup=e.rollup;t.display=e.display;t.set("hasAreaCharts",e.hasAreaCharts);t.set("hasPieDonutCharts",e.hasPieDonutCharts);t.set("hasStackedCharts",e.hasStackedCharts);_.bindAll(this,"_onChartTypeClick")},__beforeRender:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.display.DISPLAY_VALUES,r=t.display.getChartType(),i=t.rollup.type==="compare",o=true;if(i){o=t.question.compareStructure.answers.crossedOptions.length===1}e={hbar:{isEnabled:true,isSelected:r===n.hbar},vbar:{isEnabled:true,isSelected:r===n.vbar},boxplot:{isEnabled:true,isSelected:r===n.boxplot},top2_vbar:{isEnabled:true,isSelected:r===n.top2_vbar},top2_hbar:{isEnabled:true,isSelected:r===n.top2_hbar},top2_donut:{isEnabled:o,isSelected:r===n.top2_donut}};if(!e[r].isEnabled&&e[r].isSelected){e[r].isSelected=false;r=t.display.DEFAULT_CHART_TYPE;e[r].isSelected=true}return e},__afterRender:function(){this.$el.find(".q").popout()},__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.on(SM.Event.CLICK,".chart-types li",{self:e},e._onChartTypeClick)},_onChartTypeClick:function(e){var t=_____WB$wombat$check$this$function_____(this),n=$(e.target),r;e.preventDefault();if(n.hasClass("disabled")){return}r=n.attr("data-chart-type");t._changeChartType(r)},_changeChartType:function(e){var t=_____WB$wombat$check$this$function_____(this),n;n=t.display.getChartTypeUpdates(e,true);t.display.updateTempDisplay(n);t.display.setDisplayUpdates(n);t.render()}});SM.CustomizeDisplayOptionsView=SM.Views.register({__NAME:"CustomizeDisplayOptionsView",__templateID:"customize-display-options-template",__defaults:{hasDepthOptions:false,hasScaleOptions:false,hasMirrorOptions:false,hasShowEmptyOptions:false},_yAxisScaleOptions:null,__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.question=e.question;t.rollup=e.rollup;t.display=e.display;t.customizeView=e.customizeView;t.set("hasMirrorOptions",e.hasMirrorOptions);t.set("hasDepthOptions",e.hasDepthOptions);t.set("hasScaleOptions",e.hasScaleOptions);t.set("hasShowEmptyOptions",e.hasShowEmptyOptions);_.bindAll(t,"_onDisplayOptionSelected","_onShowUpgradeDialog","_onScaleEditSpin","_getStatisticalSignificanceProps","_onUpgradeTriggerFieldToggle")},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this),c=e.display.DISPLAY_OPTIONS,t=e.display.DISPLAY_VALUES,n=e.display.getDisplayData({isCustomization:true}),r=n.hasDepthOptions&&e.get("hasDepthOptions"),p=n.hasScaleOptions&&e.get("hasScaleOptions"),i=n.isPercent,o=n.isMirrorable&&e.get("hasMirrorOptions"),d=e.question.hasRandomAssignment()||e.question.isQuiz()||e.question.isNPS(),a=n.hasShowEmptyOptions&&e.get("hasShowEmptyOptions"),h,s=parseInt(i?n.dp_percentage:n.dp_absolute,10),l=e._getRangeScaleOptions(n),f=e._getStatisticalSignificanceProps(n),u;if(e.question.isNPS()&&n.nps_depth===t.nps_score){p=false}if(l!=="none"){u=e._buildAxisMaxValuesContext(n);if(u&&!u.hasOptions){l="none"}}h=i||n.isWeightedAvg;return{questionID:e.question.ID,isTableShown:n.show_table,isChartShown:n.show_chart,isDataShown:n.show_data,disableDataShown:n.disable_show_data===t.disabled,disableBS:d,isBasicStatsShown:n.show_basic_stats,hasEmptyOptions:a,canShowEmpty:a&&!n.show_empty_data,canHideEmpty:a&&n.show_empty_data,hasMirrorOptions:o,canMirror:o&&!n.mirror,canUnMirror:o&&n.mirror,hasDepthOptions:r,isDistributionChart:n.isDistribution,isWeightedAvg:n.isWeightedAvg,canDistributionChart:r&&!n.isDistribution,canWeightedAvgChart:e._canChooseWeightedAvgChart(n,r),hasScaleOptions:p,scaleIsPercent:i,rangeScaleMinEditable:l.indexOf("min")>-1,rangeScaleMaxEditable:l.indexOf("max")>-1,scaleMinOptionKey:e.display.getScaleMinOptionKey(),scaleMaxOptionKey:e.display.getScaleMaxOptionKey(),axisMaxValue:u?u.max:null,axisMinValue:u?u.min:null,enableDecimalPlaces:h,decimalPlacesKey:c[i?"dp_percentage":"dp_absolute"],dpIsZero:s===0,dpIsOne:s===1,dpIsTwo:s===2,isLabelable:n.isLableable,labelIsLegend:n.isLableable&&n.isLegend,labelIsLabel:n.isLableable&&!n.isLegend,isNps:e.question.isNPS(),isDepthScore:n.isDepthScore,isDepthDistribution:n.isDepthDistribution,isDepthDetailed:n.isDepthDetailed,displayOptions:c,displayValues:t,statisticalSignificanceProps:f}},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e._yAxisScaleOptions,n=e.$el.find("#scaleMin"),r=e.$el.find("#scaleMax");e.$el.find(".q").each(function(){$(this).popout()});n.spinner({max:t?Math.floor(t.min):null,spin:e._onScaleEditSpin});if(n.prop("disabled")){n.spinner("disable");if(!n.closest(".form-group").hasClass("disabled")){n.closest(".scale-wrapper").addClass("disabled")}}r.spinner({min:t?Math.ceil(t.max):null,spin:e._onScaleEditSpin});if(r.prop("disabled")){r.spinner("disable")}},__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.on("change","input, select",e._onDisplayOptionSelected);e.$el.on("click",".upgrade-trigger .upgrade-btn",e._onUpgradeBtnClicked);e.$el.on("click",'.upgrade-trigger input[type="checkbox"]',e._onUpgradeTriggerFieldToggle)},_onShowUpgradeDialog:function(){this._showUpgradeDialog("statistical-significance-upgrade-dialog-template")},_showUpgradeDialog:function(e){var t=SM.Views.create(SM.DialogView,{width:800,isModal:true,templateID:e});t.open()},_onUpgradeTriggerFieldToggle:function(e){var t=this.question.survey,n=t.surveyAccessController.determineFeatureAccessType(SM.Constants.FEATURES.SHOW_SIG_DIFF_ENABLED),r=n===SM.Constants.ACCESS_TYPE.REQUEST,i=n?t.surveyAccessController.requestAccessUrlForFeature(SM.Constants.FEATURES.SHOW_SIG_DIFF_ENABLED):"",o;e.stopImmediatePropagation();$(e.currentTarget).prop("checked",false);o=SM.Views.create(SM.DialogView,{width:800,isModal:true,showRequest:r,requestUrl:i,templateID:"statistical-significance-upgrade-dialog-template"});o.open()},_onUpgradeBtnClicked:function(e){e.stopImmediatePropagation()},_onScaleEditSpin:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=$(e.target),i=r.attr("data-action").split(".");if(i[0]==="chart"){r.removeClass("error").closest(".scale-container").removeAttr("title");clearTimeout(n._spinnerTimeout);n._spinnerTimeout=setTimeout(function(){n._updateChartDisplayOptions(i[1],t.value+"")},250)}},_onDisplayOptionSelected:function(c){var e=_____WB$wombat$check$this$function_____(this),t=$(c.target),p=t.parents(".display-option"),d,h,n,f,r,i,o,m,g,a,s,l,u,y;if(!!p.attr("disabled")||p.hasClass("upgrade-trigger")){return}if(t.is("select")){d=t.children("option:selected");h=d.attr("data-action");n=d.attr("data-value")}else{h=t.attr("data-action");if(h.indexOf("chart.scale")>-1){i=e.$el.find("#scaleMin");o=e.$el.find("#scaleMax");m=e._yAxisScaleOptions.min;g=e._yAxisScaleOptions.max;a=parseFloat(i.val());s=parseFloat(o.val());i.val(isNaN(a)?Math.floor(m):a);o.val(isNaN(s)?Math.ceil(g):s);l=!isNaN(a)&&a>m;u=!isNaN(s)&&s<g;i.toggleClass("error",l);if(l){i.closest(".scale-container").attr("title",Globalize.localize("Enter a number less than the lowest number in your chart"))}else{i.closest(".scale-container").removeAttr("title")}if(!isNaN(s)){o.val(s)}o.toggleClass("error",u);if(u){o.closest(".scale-container").attr("title",Globalize.localize("Enter a number greater than the highest number in your chart"))}else{o.closest(".scale-container").removeAttr("title")}e.$el.trigger("displayOptionsValidation",[l||u]);if(l||u){return}}n=t.attr("data-value");if(_.isUndefined(n)){n=t.val()}}f=h.split(".");y=f[0];r=f[1];c.preventDefault();if(n&&r&&y){if(y==="table"){e._updateTableDisplayOptions(r,n)}else if(y==="chart"){e._updateChartDisplayOptions(r,n)}else if(y==="both"){e._updateChartDisplayOptions(r,n);e._updateTableDisplayOptions(r,n)}}else{SM.Error.log({name:"DisplayOptionSelectedException",details:"_onDisplayOptionSelected: no field or value selected"})}e.render()},_updateChartDisplayOptions:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r={};r[e]=t;n.display.updateTempDisplay(r);n.display.setDisplayUpdates(r)},_updateTableDisplayOptions:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r={};r[e]=t;n.display.updateTempDisplay(r);n.display.setDisplayUpdates(r)},_canChooseWeightedAvgChart:function(e,t){var n=_____WB$wombat$check$this$function_____(this);return t&&e.isDistribution&&(n.question.isCompared()?e.mirror:!e.mirror)},_getRangeScaleOptions:function(e){var t=_____WB$wombat$check$this$function_____(this);if(SM.StarRatingUtils.newVizEffective(t.question)&&e.isWeightedAvg){return"none"}if(t.question.hasRandomAssignment()||!t.customizeView.questionView.getCurrentChartView()||e.isPieChart||e.isDonutChart||t.question.isNPS()&&e.chart_type===t.display.DISPLAY_VALUES.score_gauge){return"none"}if(e.isStacked||e.isAreaChart&&!t.question.isSimple()){return e.isPercent?"none":"max"}return"max_min"},_buildAxisMaxValuesContext:function(n){var r=_____WB$wombat$check$this$function_____(this),e=r.question.isNPS(),i=SM.Highcharts,t=n.isStacked||n.isAreaChart&&!r.question.isSimple(),o,a,s;if(e&&n.chart_type===SM.QuestionDisplayModel.DISPLAY_VALUES.score_gauge){r._yAxisScaleOptions=o={min:-100,max:100,hasOptions:false}}else if(t&&n.isPercent){r._yAxisScaleOptions=o={min:0,max:100,hasOptions:false}}else{_.each(r.customizeView.questionView.getCurrentChartView().getSeriesList(),function(e){var t;if(n.isStacked||n.isAreaChart&&!r.question.isSimple()&&!n.isWeightedAvg){t=i.calculateStackedSeriesRange(e)}else{t=i.calculateSeriesRange(e)}if(_.isUndefined(a)){a=t.min;s=t.max}else{a=Math.min(a,t.min);s=Math.max(s,t.max)}});if(n.isPercent){o={min:0,max:Math.ceil(s/100)*100||100};o.tickInterval=o.max/10}else if(r.question.isSingleChoice()&&n.isWeightedAvg){o=i.calculateYAxisScaleOptions(r.question.rowList.length,0)}else if(r.question.isStarRating()&&n.isWeightedAvg){o=i.calculateYAxisScaleOptions(5,0)}else{if(s<0){s=0}o=i.calculateYAxisScaleOptions(s);if(a<0){o.min=-o.max;o.tickInterval*=2}}o=r.display.getCustomScale({min:a,max:s},o);if(e){if(n.nps_depth===r.display.DISPLAY_VALUES.nps_distribution||n.nps_depth===r.display.DISPLAY_VALUES.nps_detailed){o.min=0;a=0}else if(o.min<0){o.min=Math.min(o.min,-o.max)}}else if(t){o.min=0;a=0}o.hasOptions=true;r._yAxisScaleOptions={min:a,max:s,tickInterval:o.tickInterval}}return o},_getStatisticalSignificanceProps:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.question,r=n.survey.surveyAccessController.determineFeatureAccessType(SM.Constants.FEATURES.SHOW_SIG_DIFF_ENABLED),i="sidi_"+n.ID,o,a,s=r===SM.Constants.ACCESS_TYPE.UPGRADE,l=r===SM.Constants.ACCESS_TYPE.REQUEST,c=r===SM.Constants.ACCESS_TYPE.FULL,p=c&&(!n.isStatisticalSignificanceEnabled()||t.rollup.comparedByRA),u=e.show_sig_diffs&&e.mirror,d=p?"disabled":"",h=u?"checked":"",f=s||l?"upgrade-trigger":"";if(!p){i=(u?"hide_sidi_stats_":"show_sig_diffs_")+n.ID;o="table."+t.display.DISPLAY_OPTIONS.show_sig_diffs;a=u?t.display.DISPLAY_VALUES.hide:t.display.DISPLAY_VALUES.show}if(l){f+=" analyze-request-access"}return{checkboxId:i,dataAction:o,dataValue:a,disabled:d,checked:h,upgrade:s,request:l,isstatisticalSignificanceDataShown:u,classes:f,lockIcon:SM.WrenchIcons.IconLock.render(),requestFeatureInfo:Globalize.localize(SM.Constants.STRINGS.REQUEST_FEATURE_INFO),requestUrl:n.survey.surveyAccessController.requestAccessUrlForFeature(SM.Constants.FEATURES.SHOW_SIG_DIFF_ENABLED)}}});SM.CustomizeColorsView=SM.Views.register({__NAME:"CustomizeColorsView",__templateID:"customize-colors-template",DEFAULT_COLOR_PALETTE:[["FFFFFF","EAEAE8","CCCCCC","999999","666666","333333","000000"],["CFCEBF","B5B7A9","94938C","7F7E71","706F65","5B594A","4B4A3C"],["FFFBB9","F8F67E","E8EC75","CCD832","A7C23D","86A33B","4F7A27"],["FFCB3E","F1B12A","F19E2D","DE7E35","C65126","C6332A","FF3300"],["D9EEEC","8CC8C9","4BBFBF","42A9A8","00858B","36606E","00374A"],["A8C6FE","73A7FF","3888FE","0062FF","0042AA","002F7B","001E57"],["E392FE","D357FE","992ABD","7B219F","61187C","450E59","2E073E"]],__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.display=e.display;t.colorPickers=[];_.bindAll(this,"_updateColor","_sortColors","_onCancelBtnClick")},__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.on("click","[cancel-btn]",e._onCancelBtnClick)},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.display.getDisplayData(),n=t.numColors,r,i=[],o=e.display.question.survey.ID;e.colorPickerStorageKey="sm.colorcustomization.colorpicker"+o;if(window.localStorage&&t.default_color_palette){t.default_color_palette.unshift("");window.localStorage[e.colorPickerStorageKey]=t.default_color_palette.join(";")}if(t.colors){r=_.extend([],SM.Highcharts.DEFAULT_COLORS,t.colors)}else{r=_.clone(SM.Highcharts.DEFAULT_COLORS)}while(n>i.length){i=i.concat(r)}e.colors=t.colors||_.first(i,n);if(n>e.colors.length){e.colors=_.first(i,n)}else if(n<e.colors.length){e.colors=_.first(e.colors,n)}SM.Bi.colorCustomizationTileCount(e.colors.length,e.display.question.family,e.display.question.subtype,t.chart_type);return{colors:e._colorsForTemplate(),showCancel:e.display.question.survey.hasFeatureAccessType(SM.Constants.FEATURES.CUSTOMIZE_CHARTS,SM.Constants.ACCESS_TYPE.REQUEST)}},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this);e._bindColorPickerToColorListItems();e._makeColorListSortable()},__destroy:function(){var e=_____WB$wombat$check$this$function_____(this);_.map(e.colorPickers,function(e){e.remove()})},_onCancelBtnClick:function(e){var t=_____WB$wombat$check$this$function_____(this);e.preventDefault();t._clearUpdates();t.animateOut()},_clearUpdates:function(){var e=_____WB$wombat$check$this$function_____(this);e.display.clearDisplayUpdates();e.display.clearTempDisplay();e.display.clearDefaultViewMetadataUpdates()},animateOut:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.slideUp({duration:250,complete:function(){e.$el.trigger({type:"afterCustomizeViewAnimateOut"})}})},_colorsForTemplate:function(){var e=_____WB$wombat$check$this$function_____(this),t;t=_.map(e.colors,function(e,t){return{position:t,hex:e}});return t},_makeColorListSortable:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.$el.find(".color-list");t.sortable({scroll:false,distance:5,tolerance:"pointer",containment:"parent",placeholder:"color-list-item-placeholder",forcePlaceholderSize:true,update:e._sortColors})},_bindColorPickerToColorListItems:function(){var n=_____WB$wombat$check$this$function_____(this),t,e,r,i;e=n.$el.find(".color-list-item");_.each(e,function(e){r=$(e);t={hex:r.attr("data-hex"),position:parseInt(r.attr("data-position"),10)};(function(t,e){e.on("click",n._logColorTileClick);e.spectrum({showInput:true,preferredFormat:"hex",showPalette:true,maxSelectionSize:21,localStorageKey:n.colorPickerStorageKey,chooseText:Globalize.localize("APPLY"),cancelText:Globalize.localize("CANCEL"),palette:n.DEFAULT_COLOR_PALETTE,change:function(e){n._updateColor({position:t.position,color:e})}});e.spectrum("set",t.hex);i=e.spectrum("container");n._logColorPickerClick(i);n.colorPickers.push(i)})(t,r)})},_updateColor:function(e){var t=_____WB$wombat$check$this$function_____(this),n=e.position,r=e.color,i=_.chain(t.DEFAULT_COLOR_PALETTE).flatten().contains(r.toHex()).value(),o;if(window.localStorage&&!i){o=window.localStorage[t.colorPickerStorageKey].split(";");o=_.compact(o);t.display.setDefaultViewMetadataUpdates({default_color_palette:o})}t.colors[n]=r.toHexString();t.display.updateTempDisplay({colors:t.colors});t._setChartDisplayUpdates(t.colors);t.__destroy();t.render()},_sortColors:function(){var e=_____WB$wombat$check$this$function_____(this),t,n;t=e.$el.find(".color-list-item");n=_.map(t,function(e){return $(e).attr("data-hex")});e.colors=n;e.display.updateTempDisplay({colors:e.colors});e._setChartDisplayUpdates(e.colors);e.__destroy();e.render()},_setChartDisplayUpdates:function(e){var t=_____WB$wombat$check$this$function_____(this),n={colors:e};t.display.setDisplayUpdates(n)},_logColorTileClick:function(e){var t=e.target.className==="color-swatch";if(t){SM.Bi.colorCustomizationTileClick()}else{SM.Bi.colorCustomizationDropdownClick()}},_logColorPickerClick:function(e){var r=_____WB$wombat$check$this$function_____(this);e.find(".sp-palette").on("click.spectrum",".sp-thumb-el",function(e){var t=$(e.target),n=t.parents(".sp-palette-row-selection").length;if(n){SM.Bi.colorCustomizationDefaultPaletteClick()}else{SM.API.logBi({action_type:"analyze_color_customization_preset_color_click",question_family:r.display.question.family,survey_id:r.display.question.survey.ID,package_id:r.display.question.survey.currentUser.package_id,package_type:r.display.question.survey.owner.packageType,user_id:r.display.question.survey.currentUserID})}});e.find(".sp-choose").on("click",function(){SM.Bi.colorCustomizationHexInputSucceed()});e.find(".sp-cancel").on("click",function(){SM.Bi.colorCustomizationCancel()})}});SM.CustomizeLabelsView=SM.Views.register({__NAME:"CustomizeLabelsView",__templateID:"customize-labels-template",__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.question=e.question;t.rollup=e.rollup;t.display=e.display;_.bindAll(this,"_onLabelInputClick","_onLabelInputKeyUp","_onLabelInputFocus","_onLabelInputBlur","_onRevertLinkClick")},__beforeRender:function(){var t=_____WB$wombat$check$this$function_____(this),e=t.question.isCompared(),n=t.question.labelByWeights(t.question.getContextStructure().answers),c=n.rows,r=n.cols,i,o=n.crossedOptions,p=n.other,a=[],s,l,u,d,h,f;if(!t.question.isNPS()){s=t._buildQuestionHeadingLabelContext();a=a.concat(s);l=t._buildLabelsContext("rows",c);a=a.concat(l);if(!e||e&&o!==r){u=t._buildLabelsContext("columns",r);a=a.concat(u)}f=t._buildLabelsContext("others",p);a=a.concat(f)}if(e){if(!t.rollup.comparedByMyself){h=t._buildLabelsContext("crossedOptions",o);a=a.concat(h)}}else if(r&&r[0].items){_.each(r,function(e){i=e.items;d=t._buildLabelsContext("columnChoices",i);a=a.concat(d)})}_.each(a,function(e,t){e.tabIndex=t+1});return{answerLabels:a}},_buildQuestionHeadingLabelContext:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.display.getQuestionHeadingLabel(),n=t&&t.text&&t.text.length?t.text:null;return e._buildLabelContext("questionHeading",e.question.heading,n,{})},_buildLabelsContext:function(t,e){var n=_____WB$wombat$check$this$function_____(this),r=[],i,o,a;_.each(e,function(e){if(n._isCustomizableAnswerOption(e)){i=n.display.getLabel(t,e.id);if(i&&i.text){a=i.text.length?i.text:null}else{a=null}o=n._buildLabelContext(t,e.text,a,{answerID:e.id});if(e.type==="row"&&n.question.isEmoji()&&!a){o.useEmoji=true}r.push(o)}});return r},_isCustomizableAnswerOption:function(e){var t=true;if(e.type==="other"&&!e.options.is_answer_choice){t=false}return t},_buildLabelContext:function(e,t,n,r){var i={};i.labelType=e;i.originalText=t;i.customText=n;i.showRevertLink=t!==n&&!_.isEmpty(n);if(r.answerID){i.answerID=r.answerID}return i},__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.$el.on("click","[custom-label-input]",e._onLabelInputClick);e.$el.on("focus","[custom-label-input]",e._onLabelInputFocus);e.$el.on("blur","[custom-label-input]",e._onLabelInputBlur);e.$el.on("keyup","[custom-label-input]",e._onLabelInputKeyUp);e.$el.on("click","[revert-custom-label-link]",e._onRevertLinkClick)},_onLabelInputClick:function(e){var t=_____WB$wombat$check$this$function_____(this),n=$(e.currentTarget);n.select();t._hideErrorMessaging(n);if(!t.customizeQuestionView){t.customizeQuestionView=t.$el.parents("[sm-customize-question-view]");t.customizeQuestionView.on("click",".sm-customize-actions [save-btn]",t._onSaveBtnClick.bind(t))}},_onSaveBtnClick:function(){var e=_____WB$wombat$check$this$function_____(this);SM.API.logBi({action_type:"analyze_label_customization_save",question_family:e.question.family,survey_id:e.question.survey.ID,package_id:e.question.survey.currentUser.package_id,package_type:e.question.survey.owner.packageType,user_id:e.question.survey.currentUserID})},_onLabelInputFocus:function(e){var t=_____WB$wombat$check$this$function_____(this),n=$(e.currentTarget),r=n.attr("answer-id");t._highlightTableLabelCell(r);t._hideErrorMessaging(n)},_onLabelInputKeyUp:function(e){var t=_____WB$wombat$check$this$function_____(this),n=$(e.currentTarget),r=n.parent().parent().find("[revert-custom-label-link]"),i=n.attr("answer-id"),o=n.attr("label-type"),a=n.val(),s;s=t._getOriginalText(o,i);if(a!==s){if(o==="rows"&&t.question.isEmoji()){n.removeAttr("style")}r.removeClass("hidden");t._changeLabel({labelType:o,answerID:i,labelText:a})}else{r.addClass("hidden")}},_onLabelInputBlur:function(e){var t=_____WB$wombat$check$this$function_____(this),n=$(e.currentTarget),r=n.attr("answer-id"),i=n.next("[custom-label-error-message]"),o=n.val();if(!o){n.addClass("has-errors");i.show()}else{t._unHighlightTableLabelCell(r)}},_onRevertLinkClick:function(e){var t=_____WB$wombat$check$this$function_____(this),n=$(e.currentTarget),r=n.parent().find("[custom-label-input]"),i=r.attr("answer-id"),o=r.attr("label-type"),a;e.preventDefault();a=t._getOriginalText(o,i);r.val(a);if(o==="rows"&&t.question.isEmoji()){r.css("font-family","Mateo")}n.addClass("hidden");t._hideErrorMessaging(r);t._changeLabel({labelType:o,answerID:i,labelText:null})},scrollToLabel:function(e){var t=_____WB$wombat$check$this$function_____(this),n,r;if(e){n=t.$el.find("[answer-id='"+e+"']")}else{n=t.$el.find("[label-type='questionHeading']")}if(n.length===0){return}r=t.$el.scrollTop()+n.position().top;t.$el.animate({scrollTop:r},250,function(){n.trigger("click")})},_highlightTableLabelCell:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.$el.parents("[sm-question-view]").find("[summary-table-container] table");n.trigger({type:"highlightLabelCell",answerID:e})},_unHighlightTableLabelCell:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.$el.parents("[sm-question-view]").find("[summary-table-container] > table");n.trigger({type:"unHighlightLabelCell",answerID:e})},_setHighlightedTableLabelCell:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.$el.parents("[sm-question-view]").find("[summary-table-container]");n.trigger({type:"setHighlightedLabelCell",answerID:e})},_changeLabel:function(e){var t=_____WB$wombat$check$this$function_____(this),n;t._setHighlightedTableLabelCell(e.answerID);n=t.display.buildLabelUpdates(e);t.display.updateTempDisplay(n);t.display.setDisplayUpdates(n)},_getOriginalText:function(e,t){var n=_____WB$wombat$check$this$function_____(this),r=n.question.getContextStructure().answers,i,o;if(e==="questionHeading"){o=n.question.heading}else if(e==="rows"){i=_.find(r.rows,function(e){return e.id===t});o=i.text}else if(e==="columns"){i=_.find(r.cols,function(e){return e.id===t});o=i.text}else if(e==="columnChoices"){_.each(r.cols,function(e){_.each(e.items,function(e){if(e.id===t){i=e;o=i.text}})})}else if(e==="crossedOptions"){i=_.find(r.crossedOptions,function(e){return e.id===t});o=i.text}else if(e==="others"){i=_.find(r.other,function(e){return e.id===t});o=i.text}return o},_hideErrorMessaging:function(e){var t=e.next("[custom-label-error-message]");if(e.hasClass("has-errors")){e.removeClass("has-errors");t.hide()}}});SM.SummaryPageView=SM.Views.register({__NAME:"summaryPageView",__model:"page",__templateID:"summary-page-template",__beforeRender:function(){return{id:this.page.ID}},__afterRender:function(){var e,t=SM.Views.create(SM.SummaryPageHeaderView,{model:this.page}),n;this.$el.prepend(t.el);if(this.page.shownQuestionList.length){n=SM.Views.create(SM.SummaryQuestionListView,{model:this.page});this.$el.find(".page-header").after(n.el)}else{e=document.createElement("div");e.innerHTML=SM.Template.render("no-page-questions");this.el.appendChild(e)}}});SM.SummaryPageHeaderView=SM.Views.register({__NAME:"SummaryPageHeaderView",__model:"page",__templateID:"summary-page-title-template",__init:function(){this.bindModel(this.page.survey,"rollupsAppended",{self:this},this._onRollupsAppended)},__beforeRender:function(){var e=this.page,t=e.isPaymentPage,n=e.survey,r=n.questionRollups.isAfterLastLoadedPage(e),i=n.state.isSummaryMode()&&n.isQuiz&&n.state.page===0;return{isVisible:(n.state.page==="all"||i)&&!r&&e.isShown(),title:e.heading,number:e.position,isPaymentPage:t}},_onRollupsAppended:function(e){var t=e.data.self;t.render()}});SM.SummaryPageListView=SM.Views.register({__NAME:"pageListView",__model:"survey",__templateID:"summary-page-list-template",__create:function(){this.set("lazyLoaderID",this.__NAME+"loader"+this.__uid)},__init:function(){var e=this.survey,t=e.questionRollups;this.$el.on(SM.Event.CLICK,"[try-again-btn]",{self:this},this._onTryAgainClicked).on("infiniteScroll.reachedEnd",{self:this},this._onReachedEnd);this.bindModel(e,"rollupsAppended",{self:this},this._onRollupsAppended);this.bindModel(e.state,"page.changed",{self:this},this._onPageChange);this.bindModel(e,"shownListsChanged",{self:this},this._onPageChange);this.infiniteScroll=this.$el.infiniteScroll({windowScroll:true,threshold:1e3,markerID:this.get("lazyLoaderID"),isActive:!t.hasAll()&&t.isBuffered()}).data("infiniteScroll");if(this.infiniteScroll){this.survey.on("suspendResumeScroll",{self:this},this._onSuspendResumeScroll)}},__destroy:function(){if(this.infiniteScroll){this.survey.off("suspendResumeScroll",this._onSuspendResumeScroll)}},__beforeRender:function(){return{hasAllRollups:this.survey.questionRollups.hasAll()}},__afterRender:function(){var e,t,n=this.survey,r=n.questionRollups,i=n.shownQuestionList.length>0,o=n.state.get("page"),a=n.state.get("allPagesSelected");if(!i){SM.Template.renderHTML("no-shown-page-questions")}else if(!a){e=n.pageList[o];this._renderPage(e)}else{this._renderAllPages(n.shownPageList)}if(this._shouldRenderTMBCViews()){this._renderTMBCViews()}if(!r.hasAll()&&!SM.App.isSharingApp()){t=SM.Views.create(SM.SummaryLazyLoadView,{model:this.survey,ID:this.get("lazyLoaderID")});this.el.appendChild(t.el);if(this.infiniteScroll&&r.isBuffered()){this.infiniteScroll.set("isActive",true)}}},_shouldRenderTMBCViews:function(){var e=this.survey;if(!e.state.isSummaryMode()||e.isExport){return false}if(!SM.App.isSharingApp()&&!e.hasValidEntity()&&!e.owner.hasBenchmarkingRestricted()){return false}if(!e.isTMBCTemplate()){return false}if(e.state.get("allPagesSelected")||e.state.get("page")===0){return true}return false},_renderTMBCViews:function(){var e=SM.Views.create(SM.SummaryTMBCViewContainer,{model:this.survey,tmbcType:this.survey.tmbc.TMBC_TYPE_ENGAGEMENT});this.$el.prepend(e.el);e=SM.Views.create(SM.SummaryTMBCViewContainer,{model:this.survey,tmbcType:this.survey.tmbc.TMBC_TYPE_GEI});this.$el.prepend(e.el)},_onSuspendResumeScroll:function(e){var t=e.data.self,n=e.suspend;if(n){t.suspendScroll()}else{t.resumeScroll()}},suspendScroll:function(){var e=_____WB$wombat$check$this$function_____(this);if(e.infiniteScroll){e._scrollWasActive=e.infiniteScroll.get("isActive");e.infiniteScroll.set("isActive",false)}},resumeScroll:function(){var e=_____WB$wombat$check$this$function_____(this);if(e.infiniteScroll&&!_.isUndefined(e._scrollWasActive)){e.infiniteScroll.set("isActive",e._scrollWasActive);delete e._scrollWasActive}},_renderPage:function(e){var t=SM.Views.create(SM.SummaryPageView,{model:e});this.$el.prepend(t.el)},_renderAllPages:function(e){var n,r=document.createDocumentFragment();$.each(e,function(e,t){if(!t.shownQuestionList.length){return true}n=SM.Views.create(SM.SummaryPageView,{model:t});r.appendChild(n.el)});this.$el.prepend(r)},_onPageChange:function(e){var t=e.data.self;if(t.survey.questionRollups.isBuffered()){t.infiniteScroll.set("isActive",true)}else{t.infiniteScroll.set("isActive",false);t.survey.questionRollups.fetchMoreRollups()}t.render();if(SM.SharedAnalyzeApp){$(".question-comment").on("click",SM.SharedAnalyzeCommenting.onQuestionBubbleClick)}},_onTryAgainClicked:function(e){var t=e.data.self;t.infiniteScroll.set("isActive",false);t.survey.questionRollups.fetchMoreRollups()},_onReachedEnd:function(e){if(!SM.App.isSharingApp()){e.data.self.survey.questionRollups.fetchMoreRollups()}},_onRollupsAppended:function(e){var t=e.data.self;if(!t.survey.questionRollups.hasAll()){t.infiniteScroll.set("isActive",true)}else{t.infiniteScroll.removeMarker();t.infiniteScroll.set("isActive",false)}}});SM.SummaryLazyLoadView=SM.Views.register({__NAME:"lazyLoadView",__model:"survey",__templateID:"lazy-load-template",__defaults:{lastFetchFailed:false},__init:function(){this.$el.on(SM.Event.CLICK,"[try-again-btn]",{self:this},this._onTryAgainClicked);this.bindModel(this.survey,"fetchRollupsFailed",{self:this},this._onFetchFail)},__beforeRender:function(){return{id:this.get("ID"),lastFetchFailed:this.__settings.lastFetchFailed}},_onFetchFail:function(e){var t=e.data.self;t.__settings.lastFetchFailed=true;t.render()},_onTryAgainClicked:function(e){var t=e.data.self;e.preventDefault();t.__settings.lastFetchFailed=false;t.$el.trigger("tryFetchMore");t.render()}});SM.SummaryPresentationContainerView=SM.Views.register({__NAME:"summaryPresentationContainerView",__templateID:"summary-presentation-question-template",randomAssignmentOption:null,__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.question=e.question},__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.__settings.randomAssignmentOption,n=this.question.subtype===this.question.QTYPE.image,r=this.question.subtype===this.question.QTYPE.descriptive_text,i,o,a,s;if(n){if(t){i=t.image||{};a=i.source}else{i=this.image||{};a=i.source}if(i.type==="upload"){s=this.question.survey.resourcePath+"/"+a}else if(i.type==="s3"){s=i.url}else{s=a}}else if(t){o=t.heading}else{o=this.heading}return{imagePresentation:n,textPresentation:r,imageObject:i,text:o,surveyID:this.question.survey.ID,imageSourceLink:s}}});SM.SummaryPaymentView=SM.Views.register({__NAME:"summaryPaymentView",__templateID:"summary-payment-template",__model:"paymentList",__init:function(){var e=_____WB$wombat$check$this$function_____(this);e.bindModel(e.question,"rollupLoaded",{self:e},e._onQuestionLoaded);e.paymentList.on("appended",{self:e},e._onPaymentsAppended).on("loaded",{self:e},e._onPaymentsLoaded)},__create:function(e){var t=_____WB$wombat$check$this$function_____(this);t.rollup=e.question;t.display=t.rollup.display;t.question=e.question},__beforeRender:function(){},__afterRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.paymentList,n=e.$el.find(".pqt-list-container"),r=t.paymentData.payment_respondent_data,i;if(_.isEmpty(r.payments)){i=SM.Template.render("no-payments-template");n.append(i)}else{i=e._createListFragment(r);n.append(i)}if(!t.isFullyLoaded()){i=SM.Template.render("pqt-more-payments-template");n.append(i)}e._infiniteScroll=n.infiniteScroll({threshold:10,markerID:"pqt-load-more-marker"}).data("infiniteScroll");n.on("infiniteScroll.reachedEnd",{self:e},e.onRequestMorePayments)},onRequestMorePayments:function(e){var t=e.data.self,n=t.paymentList;n.fetchMorePayments();e.stopPropagation()},_createListFragment:function(e){var t=_____WB$wombat$check$this$function_____(this),n=t.paymentList,r=e.payments,i=t.question,o=i.survey,a=document.createDocumentFragment(),s,l;_.each(r,function(e){s=SM.Models.create("Payment",{ID:e.transaction_id});s.load(e);s.itemDesc=t._findDescription(i,o,e.respondent_id);n.map[s.ID]=s;n.list.push(s);l=SM.Views.create(SM.PaymentItemView,{model:s}).el;a.appendChild(l)});return a},_findDescription:function(e,t,n){var r=_____WB$wombat$check$this$function_____(this),i=r.paymentList,o=e.family,a=["open_ended","numerical","slider"],s=i.paymentData.payment_respondent_data.pqt_desc,l,u;if(t.isSimplePayment){u=i.description}else if(_.contains(a,o)){u=Globalize.localize("Survey")+": "+t.title}else{l=s[n].option_id;u=e.answers[l].text}return u},_onPaymentsAppended:function(e){var t=e.data.self,n=t._createListFragment(e.payments),r=false;if(e.payments.length===0){r=true}if(e.payments.payments&&e.payments.payments.length===0){r=true}t.$el.find("[payment-response-id]").last().after(n);if(t.paymentList.isFullyLoaded()||r){t._infiniteScroll.removeMarker()}else{t._infiniteScroll.set("isActive",true)}},_onPaymentsLoaded:function(e){var t=e.data.self;t.render();if(t.paymentList.isFullyLoaded()){t._infiniteScroll.removeMarker()}t._infiniteScroll.set("isActive",true)},_onQuestionLoaded:function(e){e.data.self.render()}});SM.PaymentItemView=SM.Views.register({__NAME:"PaymentItemView",__templateID:"payment-item-template",__model:"paymentModel",__beforeRender:function(){var e=_____WB$wombat$check$this$function_____(this),t=e.paymentModel;return{name:t.name,amount:t.amount,transID:t.transactionID,date:t.date,respondentID:t.respondentID,cardNumber:t.cardNumber,status:t.status,itemDesc:t.itemDesc,hexcolor:t.hexcolor}}});!function(){var Oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};function K(e){return e&&e.__esModule?e.default:e}function Su(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var o={},a={},Tu=Oe.parcelRequire658a;null==Tu&&((Tu=function(e){if(e in o)return o[e].exports;if(e in a){var t=a[e];delete a[e];var n={id:e,exports:{}};return o[e]=n,t.call(n.exports,n,n.exports),n.exports}var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}).register=function(e,t){a[e]=t},Oe.parcelRequire658a=Tu);var y,u,g={},r=function(e){return e&&e.Math==Math&&e};g=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof Oe&&Oe)||function(){return _____WB$wombat$check$this$function_____(this)}()||Function("return _____WB$wombat$check$this$function_____(this)")();var d,b;d=!(b=function(e){try{return!!e()}catch(e){return!0}})(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]});var h,v={},s=Function.prototype.call;v=s.bind?s.bind(s):function(){return s.apply(s,arguments)};var c={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,f=p&&!c.call({1:2},1);h=f?function(e){var t=p(this,e);return!!t&&t.enumerable}:c;var m;m=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}};var w,E={},S={},T=Function.prototype,x=T.bind,C=T.call,k=x&&x.bind(C);S=x?function(e){return e&&k(C,e)}:function(e){return e&&function(){return C.apply(e,arguments)}};var M,O=S({}.toString),D=S("".slice);M=function(e){return D(O(e),8,-1)};var L=g.Object,I=S("".split);E=b(function(){return!L("z").propertyIsEnumerable(0)})?function(e){return"String"==M(e)?I(e,""):L(e)}:L;var N,j=g.TypeError;N=function(e){if(null==e)throw j("Can't call method on "+e);return e},w=function(e){return E(N(e))};var F,R,P,B;B=function(e){return"function"==typeof e},P=function(e){return"object"==typeof e?null!==e:B(e)};var z,V={},H=function(e){return B(e)?e:void 0};z=function(e,t){return arguments.length<2?H(g[e]):g[e]&&g[e][t]};var U={};U=S({}.isPrototypeOf);var q,W,G,Y={};Y=z("navigator","userAgent")||"";var Q,Z,J=g.process,ee=g.Deno,te=J&&J.versions||ee&&ee.version,ne=te&&te.v8;ne&&(Z=(Q=ne.split("."))[0]>0&&Q[0]<4?1:+(Q[0]+Q[1])),!Z&&Y&&(!(Q=Y.match(/Edge\/(\d+)/))||Q[1]>=74)&&(Q=Y.match(/Chrome\/(\d+)/))&&(Z=+Q[1]),G=Z,W=!!Object.getOwnPropertySymbols&&!b(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&G&&G<41}),q=W&&!Symbol.sham&&"symbol"==typeof Symbol.iterator;var re=g.Object;V=q?function(e){return"symbol"==typeof e}:function(e){var t=z("Symbol");return B(t)&&U(t.prototype,re(e))};var ie,oe,ae,se=g.String;ae=function(e){try{return se(e)}catch(e){return"Object"}};var le=g.TypeError;oe=function(e){if(B(e))return e;throw le(ae(e)+" is not a function")},ie=function(e,t){var n=e[t];return null==n?void 0:oe(n)};var ue,ce=g.TypeError;ue=function(e,t){var n,r;if("string"===t&&B(n=e.toString)&&!P(r=v(n,e)))return r;if(B(n=e.valueOf)&&!P(r=v(n,e)))return r;if("string"!==t&&B(n=e.toString)&&!P(r=v(n,e)))return r;throw ce("Can't convert object to primitive value")};var pe,de,he;he=!1;var fe,me={},ge=Object.defineProperty;fe=function(t,n){try{ge(g,t,{value:n,configurable:!0,writable:!0})}catch(e){g[t]=n}return n};var ye="__core-js_shared__",be=g["__core-js_shared__"]||fe(ye,{});me=be,(de=function(e,t){return me[e]||(me[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.20.0",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"});var ve,we={},Ee=g.Object;ve=function(e){return Ee(N(e))};var Se=S({}.hasOwnProperty);we=Object.hasOwn||function(e,t){return Se(ve(e),t)};var Te,xe=0,_e=Math.random(),Ce=S(1..toString);Te=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ce(++xe+_e,36)};var Ae=de("wks"),ke=g.Symbol,Me=ke&&ke.for,De=q?ke:ke&&ke.withoutSetter||Te;pe=function(e){if(!we(Ae,e)||!W&&"string"!=typeof Ae[e]){var t="Symbol."+e;W&&we(ke,e)?Ae[e]=ke[e]:Ae[e]=q&&Me?Me(t):De(t)}return Ae[e]};var Le=g.TypeError,Ie=pe("toPrimitive");R=function(e,t){if(!P(e)||V(e))return e;var n,r=ie(e,Ie);if(r){if(void 0===t&&(t="default"),n=v(r,e,t),!P(n)||V(n))return n;throw Le("Can't convert object to primitive value")}return void 0===t&&(t="number"),ue(e,t)},F=function(e){var t=R(e,"string");return V(t)?t:t+""};var Ne,je,Fe=g.document,Re=P(Fe)&&P(Fe.createElement);je=function(e){return Re?Fe.createElement(e):{}},Ne=!d&&!b(function(){return 7!=Object.defineProperty(je("div"),"a",{get:function(){return 7}}).a});var Pe,Be,ze=Object.getOwnPropertyDescriptor,Ve=u=d?ze:function(e,t){if(e=w(e),t=F(t),Ne)try{return ze(e,t)}catch(e){}if(we(e,t))return m(!v(h,e,t),e[t])},He={},Ue=g.String,qe=g.TypeError;Be=function(e){if(P(e))return e;throw qe(Ue(e)+" is not an object")};var We=g.TypeError,Ge=Object.defineProperty;Pe=d?Ge:function(e,t,n){if(Be(e),t=F(t),Be(n),Ne)try{return Ge(e,t,n)}catch(e){}if("get"in n||"set"in n)throw We("Accessors not supported");return"value"in n&&(e[t]=n.value),e},He=d?function(e,t,n){return Pe(e,t,m(1,n))}:function(e,t,n){return e[t]=n,e};var Ye,Ke={},Xe=S(Function.toString);B(me.inspectSource)||(me.inspectSource=function(e){return Xe(e)}),Ke=me.inspectSource;var Qe,Ze,Je=g.WeakMap;Ze=B(Je)&&/native code/.test(Ke(Je));var $e,et=de("keys");$e=function(e){return et[e]||(et[e]=Te(e))};var tt={};tt={};var nt,rt,it,ot="Object already initialized",at=g.TypeError,st=g.WeakMap;if(Ze||me.state){var lt=me.state||(me.state=new st),ut=S(lt.get),ct=S(lt.has),pt=S(lt.set);nt=function(e,t){if(ct(lt,e))throw new at(ot);return t.facade=e,pt(lt,e,t),t},rt=function(e){return ut(lt,e)||{}},it=function(e){return ct(lt,e)}}else{var dt=$e("state");tt[dt]=!0,nt=function(e,t){if(we(e,dt))throw new at(ot);return t.facade=e,He(e,dt,t),t},rt=function(e){return we(e,dt)?e[dt]:{}},it=function(e){return we(e,dt)}}Qe={set:nt,get:rt,has:it,enforce:function(e){return it(e)?rt(e):nt(e,{})},getterFor:function(n){return function(e){var t;if(!P(e)||(t=rt(e)).type!==n)throw at("Incompatible receiver, "+n+" required");return t}}};var ht,ft=Function.prototype,mt=d&&Object.getOwnPropertyDescriptor,gt=we(ft,"name"),yt=(ht={EXISTS:gt,PROPER:gt&&"something"===function(){}.name,CONFIGURABLE:gt&&(!d||d&&mt(ft,"name").configurable)}).CONFIGURABLE,bt=Qe.get,vt=Qe.enforce,wt=String(String).split("String");(Ye=function(e,t,n,r){var i,o=!!r&&!!r.unsafe,a=!!r&&!!r.enumerable,s=!!r&&!!r.noTargetGet,l=r&&void 0!==r.name?r.name:t;B(n)&&("Symbol("===String(l).slice(0,7)&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!we(n,"name")||yt&&n.name!==l)&&He(n,"name",l),(i=vt(n)).source||(i.source=wt.join("string"==typeof l?l:""))),e!==g?(o?!s&&e[t]&&(a=!0):delete e[t],a?e[t]=n:He(e,t,n)):a?e[t]=n:fe(t,n)})(Function.prototype,"toString",function(){return B(this)&&bt(this).source||Ke(this)});var Et,St,Tt,xt,_t,Ct,At={},kt=Math.ceil,Mt=Math.floor;Ct=function(e){var t=+e;return t!=t||0===t?0:(t>0?Mt:kt)(t)};var Ot=Math.max,Dt=Math.min;_t=function(e,t){var n=Ct(e);return n<0?Ot(n+t,0):Dt(n,t)};var Lt,It,Nt=Math.min;It=function(e){return e>0?Nt(Ct(e),9007199254740991):0},Lt=function(e){return It(e.length)};var jt=function(s){return function(e,t,n){var r,i=w(e),o=Lt(i),a=_t(n,o);if(s&&t!=t){for(;o>a;)if((r=i[a++])!=r)return!0}else for(;o>a;a++)if((s||a in i)&&i[a]===t)return s||a||0;return!s&&-1}},Ft=(xt={includes:jt(!0),indexOf:jt(!1)}).indexOf,Rt=S([].push);Tt=function(e,t){var n,r=w(e),i=0,o=[];for(n in r)!we(tt,n)&&we(r,n)&&Rt(o,n);for(;t.length>i;)we(r,n=t[i++])&&(~Ft(o,n)||Rt(o,n));return o};var Pt,Bt={},zt=(Bt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]).concat("length","prototype");St=Object.getOwnPropertyNames||function(e){return Tt(e,zt)},Pt=Object.getOwnPropertySymbols;var Vt=S([].concat);At=z("Reflect","ownKeys")||function(e){var t=St(Be(e));return Pt?Vt(t,Pt(e)):t}
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment