gc.spread.common.10.0.0.min.js 125 KB

1234
  1. !function e(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.Spread=r():(t.GC=t.GC||{},t.GC.Spread=r())}(this,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}return r.m=e,r.c=t,r.p="/assets/",r(0)}([function(e,t,r){t.Common=r(1),t.Commands=r(13),t.Formatter=r(16),t.Sparklines=r(19),t.Slicers=r(21)},function(e,t,r){var n=r(2);r(10);var a=r(3);o(n,a);var i=r(11);o(n,i),n._Types=r(4),n._ArrayHelper=r(9),n._DateTimeHelper=r(8),n._NumberHelper=r(5),n._RegexHelper=r(6),n._StringHelper=r(7),n.SR={},n.SR.en=r(12),e.exports=n;function o(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}},function(e,t,r){var n={},a=r(3).CultureManager,i=function(e){return function(){var t=a.culture();if(e&&t){var r=t.substr(0,2).toLowerCase();return e.hasOwnProperty(r)?e[r]:e.en}return{}}};function o(e,t,r,n){if(e&&r>=0&&t>r){var a=[],i,o;for(o=r;t>o;o++)void 0!==e[o]&&a.push(o);for(i=a.length,o=0;i>o;o++){var s=a[i-o-1],u=e[s];e[s]=null,e[Math.floor(s)+n]=u}}}function s(e,t,r,n){if(e&&r>=0&&t>r){var a=[],i,o=r+n,s;for(s=r;t>s;s++)void 0!==e[s]&&(s>=r&&o>s?e[s]=null:s>=o&&a.push(s));for(i=a.length,s=0;i>s;s++){var u=a[s],l=e[u];e[u]=null,e[Math.floor(u)-n]=l}}}function u(e,t){return e.hasOwnProperty(t)}function l(e,t){return e instanceof t}n._addElements=o,n._deleteElements=s,n._getResource=i,n._hasOwnProperty=u,n._isInstanceOf=l,e.exports=n},function(e,t,r){var n=r(4),a=void 0,i=null,o=n._inherit,s=n._each,u=function(){function e(){}return e._isValidEraDate=function(e){return e>=this._getEraMin()&&e<=this._getEraMax()},e._getEraDates=function(){var e=l.eras;if(e!==a){for(var t=[],r=0;r<e.length;r++)t[r]=new Date(e[r].startDate.replace(/-/g,"/"));return t}return this._EraDates},e._getEraPropByFormat=function(e){var t=this,r,n;switch(e){case"g":r="symbol",n=t._symbols;break;case"gg":r="abbreviation",n=t._abbreviations;break;case"ggg":r="name",n=t._names;break;default:return[]}var i=l.eras,o=[];if(i!==a){for(var s=0;s<i.length;s++)o[s]=i[s][r];return o}return n},e._getEraMax=function(){var e=l.eras;if(e!==a&&e.length>0){var t=new Date(e[e.length-1].startDate.replace(/-/g,"/"));return t.setFullYear(t.getFullYear()+99),t}return this._EraMax},e._getEraMin=function(){var e=l.eras;return e!==a&&e.length>0?new Date(e[0].startDate.replace(/-/g,"/")):this._EraMin},e._getEraCount=function(){var e=l.eras;return e!==a?e.length:this._EraCount},e._getEraYears=function(){var e=l.eras;if(e!==a){for(var t=[],r=1;r<e.length;r++){var n=new Date(e[r-1].startDate.replace(/-/g,"/")),i=new Date(e[r].startDate.replace(/-/g,"/"));t[r-1]=i.getFullYear()-n.getFullYear()+1}return t[r-1]=99,t}return this._EraYears},e._getEraDate=function(e){var t={};t._era=-1,t._eraYear=-1;var r=this;if(!r._isValidEraDate(e))return t;for(var n=0;n<r._getEraCount();n++){var a=n+1!==r._getEraCount()?r._getEraDates()[n+1]:r._addMilliseconds(r._getEraMax(),1);if(a>e){t._era=n,t._eraYear=e.getFullYear()-r._getEraDates()[n].getFullYear()+1;break}}return t},e._addMilliseconds=function(e,t){var r=new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());return r.setMilliseconds(r.getMilliseconds()+t),new Date(r.valueOf())},e._getYearFromEra=function(t,r){var n=e._getEraDates()[t].getFullYear();return n+r-1},e._parseEraPart=function(t,r){r=r.toUpperCase();for(var n=e._getEraPropByFormat(t),a=0;a<n.length;a++)if(n[a]===r)return a;return-1},e._formatEraPart=function(t,r){var n=e,a=n._getEraDate(r),i=a._era;if(i>=0){var o=n._getEraPropByFormat(t);if(o.length>0)return o[i]}var s=a._eraYear;if(s>=0){var u=""+s;if("ee"===t)return 1===u.length&&(u="0"+u),u;if("e"===t)return u}return""},e._EraDates=[new Date(1868,8,8),new Date(1912,6,30),new Date(1926,11,25),new Date(1989,0,8)],e._EraCount=4,e._EraYears=[45,15,64,99],e._EraMax=new Date(2087,11,31,23,59,59),e._EraMin=new Date(1868,8,8),e._shortcuts=["1,m","2,t","3,s","4,h"],e._EraIndices=[0,1,2,3,0,1,2,3],e._names=["明治","大正","昭和","平成"],e._symbols=["M","T","S","H"],e._abbreviations=["明","大","昭","平"],e._EraYearMax=99,e}(),l=function(){function e(){this.NumberFormat={currencyDecimalDigits:2,currencyDecimalSeparator:".",currencyGroupSeparator:",",currencyGroupSizes:[3],currencyNegativePattern:0,currencyPositivePattern:0,currencySymbol:"¤",digitSubstitution:1,isReadOnly:!0,numberGroupSizes:[3],nanSymbol:"NaN",nativeDigits:["0","1","2","3","4","5","6","7","8","9"],numberNegativePattern:1,negativeInfinitySymbol:"-Infinity",negativeSign:"-",numberDecimalDigits:2,numberDecimalSeparator:".",numberGroupSeparator:",",positiveInfinitySymbol:"Infinity",positiveSign:"+",percentDecimalDigits:2,percentDecimalSeparator:".",percentGroupSeparator:",",percentGroupSizes:[3],percentNegativePattern:0,percentPositivePattern:0,percentSymbol:"%",perMilleSymbol:"‰",listSeparator:",",arrayListSeparator:",",arrayGroupSeparator:";",dbNumber:{}},this.DateTimeFormat={abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],abbreviatedMonthGenitiveNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],amDesignator:"AM",calendarIsReadOnly:!0,calendarWeekRule:0,Calendar:{MinSupportedDateTime:"@-62135568000000@",MaxSupportedDateTime:"@253402300799999@",AlgorithmType:1,CalendarType:1,Eras:[1],TwoDigitYearMax:2029,isReadOnly:!0},dateSeparator:"/",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],firstDayOfWeek:0,fullDateTimePattern:"dddd, dd MMMM yyyy HH:mm:ss",longDatePattern:"dddd, dd MMMM yyyy",longTimePattern:"HH:mm:ss",monthDayPattern:"MMMM dd",monthGenitiveNames:["January","February","March","April","May","June","July","August","September","October","November","December",""],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December",""],nativeCalendarName:"Gregorian Calendar",pmDesignator:"PM",rfc1123Pattern:"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",shortDatePattern:"MM/dd/yyyy",shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],shortTimePattern:"HH:mm",sortableDateTimePattern:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",timeSeparator:":",universalSortableDateTimePattern:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",yearMonthPattern:"yyyy MMMM"},this.name=function(){return""},this.id=-1}e.prototype={constructor:e,_getDateTimePattern:function(){return this._dateTimeFormatPattern||(this._dateTimeFormatPattern=_),this._dateTimeFormatPattern},_getMonthIndex:function(e){var t=this;return t._upperMonths||(t._upperMonths=r(t.DateTimeFormat.monthNames),t._upperMonthsGenitive=r(t.DateTimeFormat.monthGenitiveNames)),n(e,t._upperMonths,t._upperMonthsGenitive)},_getAbbrMonthIndex:function(e){var t=this;return t._upperAbbrMonths||(t._upperAbbrMonths=r(t.DateTimeFormat.abbreviatedMonthNames),t._upperAbbrMonthsGenitive=r(t.DateTimeFormat.abbreviatedMonthGenitiveNames)),n(e,t._upperAbbrMonths,t._upperAbbrMonthsGenitive)},_getDayIndex:function(e){var n=this;return n._upperDays||(n._upperDays=r(n.DateTimeFormat.dayNames)),n._upperDays.indexOf(t(e))},_getAbbrDayIndex:function(e){var n=this;return n._upperAbbrDays||(n._upperAbbrDays=r(n.DateTimeFormat.abbreviatedDayNames)),n._upperAbbrDays.indexOf(t(e))}};function t(e){return e.split(" ").join(" ").toUpperCase()}function r(e){for(var r=[],n=0,a=e.length;a>n;n++)r[n]=t(e[n]);return r}function n(e,r,n){var a=t(e),i=r.indexOf(a);return-1===i&&(i=n.indexOf(a)),i}return e}(),f=function(e){o(t,e);function t(){e.apply(this,arguments),M.call(this,"NumberFormat",["currencySymbol","isReadOnly"],["$",!1]),M.call(this,"DateTimeFormat",["fullDateTimePattern","longDatePattern","longTimePattern","shortDatePattern","shortTimePattern","yearMonthPattern","calendarIsReadOnly"],["dddd, MMMM dd, yyyy h:mm:ss tt","dddd, MMMM dd, yyyy","h:mm:ss tt","M/d/yyyy","h:mm tt","MMMM, yyyy",!1]),this.name=function(){return"en-US"},this.id=1033}return t}(l),c=function(e){o(t,e);function t(){e.apply(this,arguments);var t={1:{letters:["兆","千","百","十","亿","千","百","十","万","千","百","十",""],numbers:["〇","一","二","三","四","五","六","七","八","九"]},2:{letters:["兆","阡","百","拾","億","阡","百","拾","萬","阡","百","拾",""],numbers:["〇","壱","弐","参","四","伍","六","七","八","九"]},3:{letters:i,numbers:["0","1","2","3","4","5","6","7","8","9"]}};M.call(this,"NumberFormat",["currencyDecimalDigits","currencyNegativePattern","currencySymbol","isReadOnly","nanSymbol","negativeInfinitySymbol","percentNegativePattern","percentPositivePattern","positiveInfinitySymbol","dbNumber"],[0,1,"¥",!1,"NaN (非数値)","-∞",1,1,"+∞",t]);var r=["1","2","3","4","5","6","7","8","9","10","11","12",""],n=["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""];M.call(this,"DateTimeFormat",["abbreviatedDayNames","abbreviatedMonthGenitiveNames","abbreviatedMonthNames","amDesignator","calendarIsReadOnly","dayNames","fullDateTimePattern","longDatePattern","longTimePattern","monthDayPattern","monthGenitiveNames","monthNames","nativeCalendarName","pmDesignator","shortDatePattern","shortestDayNames","shortTimePattern","yearMonthPattern"],[["日","月","火","水","木","金","土"],r,r,"午前",!1,["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],"yyyy'年'M'月'd'日' H:mm:ss","yyyy'年'M'月'd'日'","H:mm:ss","M'月'd'日'",n,n,"西暦 (日本語)","午後","yyyy/MM/dd",["日","月","火","水","木","金","土"],"H:mm","yyyy'年'M'月'"]),this.DateTimeFormat.eras=u,this.name=function(){return"ja-JP"},this.id=1041}return t}(l),m=function(e){o(t,e);function t(){e.apply(this,arguments);var t={1:{letters:["兆","千","百","十","亿","千","百","十","万","千","百","十",""],numbers:["○","一","二","三","四","五","六","七","八","九"]},2:{letters:["兆","仟","佰","拾","亿","仟","佰","拾","万","仟","佰","拾",""],numbers:["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"]},3:{letters:i,numbers:["0","1","2","3","4","5","6","7","8","9"]}};M.call(this,"NumberFormat",["currencyNegativePattern","currencySymbol","isReadOnly","nanSymbol","negativeInfinitySymbol","percentNegativePattern","percentPositivePattern","positiveInfinitySymbol","dbNumber"],[2,"¥",!1,"非数字","负无穷大",1,1,"正无穷大",t]);var r=["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],n=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""];M.call(this,"DateTimeFormat",["abbreviatedDayNames","abbreviatedMonthGenitiveNames","abbreviatedMonthNames","amDesignator","calendarIsReadOnly","dayNames","firstDayOfWeek","fullDateTimePattern","longDatePattern","longTimePattern","monthDayPattern","monthGenitiveNames","monthNames","nativeCalendarName","pmDesignator","shortDatePattern","shortestDayNames","shortTimePattern","yearMonthPattern"],[["周日","周一","周二","周三","周四","周五","周六"],r,r,"上午",!1,["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],1,"yyyy'年'M'月'd'日' H:mm:ss","yyyy'年'M'月'd'日'","H:mm:ss","M'月'd'日'",n,n,"公历","下午","yyyy/M/d",["日","一","二","三","四","五","六"],"H:mm","yyyy'年'M'月'"]),this.name=function(){return"zh-cn"},this.id=2052}return t}(l),h={invariant:new l,"en-us":new f,"ja-jp":new c,"zh-cn":new m},y=["MM/dd/yyyy","MM/d/yyyy","M/dd/yyyy","M/d/yyyy","yy/MM/dd","yy/MM/d","yy/M/dd","yy/M/d","yyyy/MM/dd","yyyy/MM/d","yyyy/M/dd","yyyy/M/d"],d=["hh:mm:ss","hh:mm:s","hh:m:ss","hh:m:s","h:mm:ss","h:mm:s","h:m:ss","h:m:s","hh:mm:ss tt","hh:mm:s tt","hh:m:ss tt","hh:m:s tt","h:mm:ss tt","h:mm:s tt","h:m:ss tt","h:m:s tt","hh:mm","hh:m","h:mm","h:m","hh:mm tt","hh:m tt","h:mm tt","h:m tt"],g=["MM-dd-yyyy","MM-d-yyyy","M-dd-yyyy","M-d-yyyy","yy-MM-dd","yy-MM-d","yy-M-dd","yy-M-d","yyyy-MM-dd","yyyy-MM-d","yyyy-M-dd","yyyy-M-d","dd-MMMM-yy","dd-MMM-yy"],_=y.concat(d);s(y,function(e,t){s(d,function(e,r){e<d.length-4&&_.push(t+" "+r)})}),_=_.concat(g),s(g,function(e,t){s(d,function(e,r){e<d.length-4&&_.push(t+" "+r)})});function M(e,t,r){for(var n=this,a,i=0,o=t.length;o>i;i++)a=t[i],n[e][a]=r[i]}var v=function(){if("object"==typeof e.instance)return e.instance;function e(){var n="en-us";this.culture=function(e){return 0===arguments.length?n:void(e&&n!==e&&(n=e.toLowerCase(),t(n)))},this.addCultureInfo=function(e,t){var n=t.NumberFormat.numberDecimalSeparator,a=t.NumberFormat.arrayListSeparator,i=t.NumberFormat.arrayGroupSeparator;if(n===t.NumberFormat.listSeparator||i===a){var o=r(2);throw o._getResource(o.SR)().Exp_Separator}h[e.toLowerCase()]=t},this.getCultureInfo=function(e){if(0===arguments.length)return h[n];var t="string"==typeof e;e=t?e.toLowerCase():e;var r=h,o=i;for(var s in r)if(s===e||r[s].id!==a&&r[s].id===e){o=r[s];break}return o},this._getCultureInfo=function(e){var t=this.getCultureInfo(e);return t||(t=h[n],t||(t=new l)),t},e.instance=this}function t(e){var t;"function"!=typeof CustomEvent?(t=document.createEvent("CustomEvent"),t.initCustomEvent("cultureChanged",!1,!1,void 0)):t=new CustomEvent("cultureChanged",{}),t.cultureInfo=e,document.dispatchEvent(t)}return e}();e.exports={CultureInfo:l,CultureManager:new v}},function(e,t,r){var n={};n._each=function(e,t){var r,a=n._isArraylike(e);if(a)for(var i=0,o=e.length;o>i&&(r=t.call(e[i],i,e[i]),r!==!1);i++);else for(var s in e)if(e.hasOwnProperty(s)&&(r=t.call(e[s],s,e[s]),r===!1))break;return e},n._isEmptyObject=function(e){return e?"object"==typeof e&&0===Object.keys(e).length:!0},n._isFunction=function(e){return"function"===n._getType(e)},n._isArray=function(e){return Array.isArray?Array.isArray(e):"array"===n._getType(e)},n._isNumeric=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},n._getType=function(e){if(null===e)return"null";var t=n._class2type;if(!t){t=n._class2type={};for(var r=["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error"],a=0,i=r.length;i>a;a++)t["[object "+r[a]+"]"]=r[a].toLowerCase()}var o=t.toString,s=typeof e;return"object"===s||"function"===s?t[o.call(e)]||"object":s},n._inArray=function(e,t,r){var a;if(t){var i=[].indexOf;if(i)return i.call(t,e,r);for(a=t.length,n._isNullOrUndefined(r)&&(r=0),r=0>r?Math.max(0,a+r):r;a>r;r++)if(r in t&&t[r]===e)return r}return-1},n._merge=function(e,t){var r=t.length,n=e.length,a=0;if("number"==typeof r)for(;r>a;a++)e[n++]=t[a];else for(;void 0!==t[a];)e[n++]=t[a++];return e.length=n,e},n._map=function(e,t,r){var a,i=0,o=e.length,s=n._isArraylike(e),u=[];if(s)for(;o>i;i++)a=t(e[i],i,r),null!==a&&(u[u.length]=a);else for(i in e)e.hasOwnProperty(i)&&(a=t(e[i],i,r),null!==a&&(u[u.length]=a));var l=[].concat;return l.apply([],u)},n._extend=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r,a,i,o,s,u,l=arguments[0]||{},f=1,c=arguments.length,m=!1;for("boolean"==typeof l&&(m=l,l=arguments[1]||{},f=2),"object"==typeof l||n._isFunction(l)||(l={}),c===f&&(l=this,--f);c>f;f++)if(!n._isNullOrUndefined(s=arguments[f]))for(o in s)r=l[o],i=s[o],l!==i&&(m&&i&&(n._isPlainObject(i)||(a=n._isArray(i)))?(a?(a=!1,u=r&&n._isArray(r)?r:[]):u=r&&n._isPlainObject(r)?r:{},l[o]=n._extend(m,u,i)):void 0!==i&&(l[o]=i));return l},n._inherit=function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n},n._isWindow=function(e){return null!==e&&e===e.window},n._isPlainObject=function(e){if(!e||"object"!==n._getType(e)||e.nodeType||n._isWindow(e))return!1;var t={}.hasOwnProperty;try{if(e.constructor&&!t.call(e,"constructor")&&!t.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}var a;for(a in e);return void 0===a||t.call(e,a)},n._isArraylike=function(e){if(n._isNullOrUndefined(e))return!1;var t=e.length,r=n._getType(e);return n._isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===r||"function"!==r&&(0===t||"number"==typeof t&&t>0&&t-1 in e)},n._makeArray=function(e,t){var r=t||[];return null!==e&&(n._isArraylike(Object(e))?n._merge(r,"string"==typeof e?[e]:e):[].push.call(r,e)),r},n._isType=function(e,t){return n._isNullOrUndefined(e)?"null"===t:t?t instanceof Function&&e instanceof t?!0:typeof e===t?!0:"function"===t&&/^\s*\bfunction\b/.test(""+e)?!0:Object.prototype.toString.call(e).slice(8,-1).toLowerCase()===t.toLowerCase()?!0:"DateTime"===t||"TimeSpan"===t?e instanceof Date:("string"==typeof t&&"undefined number boolean string".indexOf(t)>-1,!1):!1},n._isNullOrUndefined=function(e){return void 0===e||null===e},n._isNumber=function(e,t){return e=r(5)._replaceCultureSymbolToNormal(e,t),n._isType(e,"number")||n._isType(e,"DateTime")||n._isType(e,"TimeSpan")||e&&!n._isType(e,"boolean")&&!isNaN(e)&&!isNaN(parseFloat(e))&&!(e.length>=2&&"0"===e[0]&&"x"===e[1])},n._toDouble=function(e){var t=r(8);return n._isNullOrUndefined(e)||""===e?0:n._isType(e,"number")?e:n._isType(e,"string")&&!isNaN(e)?r(5)._parseLocale(e):n._isType(e,"boolean")?e?1:0:n._isType(e,"DateTime")?t._toOADate(e):n._isType(e,"TimeSpan")?Math.floor(t._toOADate(e)):parseFloat(e)},n._cloneObject=function(e){if(!e)return e;if("number"==typeof e||"string"==typeof e||"boolean"==typeof e||n._isNullOrUndefined(e))return e;if(e.clone)return e.clone();if(e instanceof Date)return new Date(e);var t,r,a;t=e instanceof Object?new e.constructor:new e.constructor(e.valueOf());for(r in e)e.hasOwnProperty(r)&&(a=e[r],e.hasOwnProperty(r)&&t[r]!==a&&("object"==typeof a?t[r]=n._cloneObject(a):t[r]=a));return t.toString=e.toString,t.valueOf=e.valueOf,t},e.exports=n},function(e,t,r){var n=r(2),a=r(4)._isNullOrUndefined,i=r(6),o=r(7),s=o._padZeroLeft,u=o._padZeroRight,l=r(3).CultureManager,f=null,c=void 0,m=parseInt,h=parseFloat,y=!1,d=!0,g=Math.floor,_=Math.abs,M=Math.pow;function v(e,t,r){return e.substr(t,r)}var p=function(){return n._getResource(n.SR)()},F=function(){var e="##################0",t="################",r={1:"+",0:"","-1":"-"},n=4294967295,i=["n %","n%","%n","% n"],F=["-n %","-n%","-%n","%-n","%n-","n-%","n%-","-% n","n %-","% n-","% -n","n- %"],b=["(n)","-n","- n","n-","n -"],D=["$n","n$","$ n","n $"],S=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];function w(e,t,r){return t&&0!==t.length&&"i"!==t?E().test(t)?I(e,t,r.NumberFormat):P(e,t,r.NumberFormat):r&&r.name.length>0?e.toLocaleString():""+e}function N(e,t,r,n,a,i){return r="n",t=W(_(e),n.charAt(0),-1===a?6:a,i.numberGroupSizes,i.numberGroupSeparator,i.numberDecimalSeparator,i.negativeSign),0>e&&(t="-"+t),[t,r]}function C(e,t,r,n,a,i){r=0>e?b[i.numberNegativePattern]:"n",-1===a&&(a=2);var o=h(t),s=g(o),u=o-s;return t=A(u,a,i.numberGroupSizes,i.numberGroupSeparator,i.numberDecimalSeparator,i.negativeSign),t=""+(s+(+t>=1?1:0))+t.substring(1),[t,r]}function I(e,t,r){var n=""+_(e);t||(t="D");var a=-1;t.length>1&&(a=m(t.slice(1),10));var o,u;switch(t.charAt(0)){case"d":case"D":o="n",-1!==a&&(n=s(""+n,a)),0>e&&(n="-"+n);break;case"c":case"C":o=0>e?S[r.currencyNegativePattern]:D[r.currencyPositivePattern],-1===a&&(a=r.currencyDecimalDigits),n=A(_(e),a,r.currencyGroupSizes,r.currencyGroupSeparator,r.currencyDecimalSeparator,r.negativeSign);break;case"n":case"N":o=0>e?b[r.numberNegativePattern]:"n",-1===a&&(a=r.numberDecimalDigits),n=A(_(e),a,r.numberGroupSizes,r.numberGroupSeparator,r.numberDecimalSeparator,r.negativeSign);break;case"p":case"P":o=0>e?F[r.percentNegativePattern]:i[r.percentPositivePattern],-1===a&&(a=r.percentDecimalDigits),n=A(100*_(e),a,r.percentGroupSizes,r.percentGroupSeparator,r.percentDecimalSeparator,r.negativeSign);break;case"F":case"f":u=C(e,n,o,t,a,r),n=u[0],o=u[1];break;case"e":case"E":u=N(e,n,o,t,a,r),n=u[0],o=u[1];break;case"x":case"X":o="n",n=B(e,"x"===t.charAt(0),-1===a?0:a);break;case"g":case"G":var l=""+e;u=[],u=-1===l.indexOf("e")&&-1===l.indexOf("E")?C(e,n,o,t,a,r):N(e,n,o,t.replace("g","e").replace("G","E"),a,r),n=u[0],o=u[1];break;default:throw Error(p().Exp_BadFormatSpecifier)}for(var f=/n|\$|-|%/g,c="";;){var h=f.lastIndex,y=f.exec(o);if(c+=o.slice(h,y?y.index:o.length),!y)break;switch(y[0]){case"n":c+=n;break;case"$":c+=r.currencySymbol;break;case"-":/[1-9]/.test(n)&&(c+=r.negativeSign);break;case"%":c+=r.percentSymbol;break;default:throw Error(p().Exp_InvalidNumberFormat)}}return c}function P(e,t,r){var n=k(t),a=f;0===e?a=n._zero:0>e&&(a=n._negative),a||(a=n._normal);var i=R(e,a,r)+"";return 1===i.indexOf(r.negativeSign)&&0===i.indexOf(r.currencySymbol)&&(i=i[1]+i[0]+i.substring(2)),i}function E(){return/^(C|c|D|d|E|e|F|f|G|g|N|n|P|p|R|r|X|x)(\d*)$/g}function H(e,t){for(var r=g(_(e)),n={_integer:1,_decimal:0};r>=10;)r/=10,n._integer++;var a=""+e,i=a.search(/e/gi),o=a.indexOf(t),s;if(-1!==i){var u=v(a,0,i),l=v(a,i+1),f=0;-1!==o&&(f=v(u,o+1).length);var c=h(l);s=f-c,0>s&&(s=0),n._decimal=s}else s=0,-1!==o&&(s=v(a,o+1).length),n._decimal=s;return n}function T(e){for(var t={_symbol:e.charAt(0),_sign:0,_exp:0},r="",n=1;n<e.length;n++)if(r=e.charAt(n),"+"===r)t._sign=1;else{if("-"!==r){if("0"===r){t._exp=e.length-n;break}throw Error(p().Exp_InvalidExponentFormat)}t._sign=-1}return t}function k(e){for(var t=f,r=f,n=f,i={_intPart:f,_decPart:f,_group:y,_scale:0,_percent:0,_permile:0,_exponent:f},o="",s=y,u=y,c=y,m=y,h=y,g=y,_=y,M=y,v=f,F=f,x=[],b=0;b<e.length;b++)if(v=e.charAt(b),s)"'"!==v?o+=v:(x.push(o),o="",s=y),F=v;else if(u)'"'!==v?o+=v:(x.push(o),o="",u=y),F=v;else if(c)x.push(o+v),o="",F=v;else{if(m){if("E"===F||"e"===F){if("+"===v||"-"===v||"0"===v){o+=v;continue}m=y}else if("+"===F||"-"===F){if("0"===v){o+=v;continue}m=y,x.push(o),o=""}else if("0"===F){if("0"===v){o+=v;continue}m=y,_||(_=d,i._exponent=T(o)),x.push(o),o=""}}else if("0"===v||"#"===v){if(M=d,"0"===F||"#"===F){o+=v,F=v;continue}""!==o&&(x.push(o),o="")}else"0"!==F&&"#"!==F||"0"===v||"#"===v||(x.push(o),o="");if(";"===v){if(""!==o&&(m&&!_&&(i._exponent=T(o)),x.push(o),o=""),h?i._decPart=v:i._intPart=x,x=[],a(t))t=i;else if(a(r))r=i;else{if(!a(n))throw Error(p().Exp_InvalidSemicolons);n=i}h=y,M=y,g&&(i._group=d,g=y),i={}}else if(h||"."!==v)if("'"===v)s=d;else if('"'===v)u=d;else if("%"===v)i._percent++,""!==o&&(x.push(o),o=""),x.push(v);else if(v===l._getCultureInfo().NumberFormat.perMilleSymbol)i._permile++,x.push(v);else if("0"===v||"#"===v)o+=v;else if(","===v)if(h)""!==o&&(x.push(o),o="");else{if(""!==o&&(x.push(o),o=""),!M)continue;for(var D=d,S="",w=b+1;w<e.length;w++){var N=e.charAt(w);if(""===S)if("'"===N||'"'===N)S=N;else{if("0"===N||"#"===N){D=y;break}if("."===N||";"===N)break}else"'"!==N&&'"'!==N||(S="")}D?i._scale++:g=d}else"E"===v||"e"===v?(m=d,""!==o&&x.push(o),o=v):o+=v;else"#"!==F&&"0"!==F&&(x.push(o),o="#"),""!==o&&(x.push(o),o=""),i._intPart=x,x=[],h=d,M=y,g&&(i._group=d,g=y);F=v}return""!==o&&(m&&!_&&(i._exponent=T(o)),x.push(o)),g&&(i._group=d),h?i._decPart=x:i._intPart=x,a(t)?t=i:a(r)?r=i:a(n)&&(n=i),{_normal:t,_negative:r,_zero:n}}function O(e,t,r){for(var n=t[0],a=1,i=e.length-1,o="",s=0,u=y;i>=0;){if(1>n||n>9)throw Error(p().Exp_InvalidNumberGroupSize);/\d/gi.test(e[i])?(u&&(o=r+o,u=y),s++):s=0,o=e[i]+o,s===n&&(u=d,s=0,a<t.length&&(n=t[a],a++)),i--}return o}function A(e,t,r,n,a,i,o){var l=z(e,-t);isFinite(l)||(l=e),e=l;var f=""+e,c,h,y=f.split(/e/i);return f=y[0],h=y.length>1?m(y[1],10):0,y=f.split("."),f=y[0],c=y.length>1?y[1]:"",h>0?(c=u(c,h),f+=c.slice(0,h),c=v(c,h)):0>h&&(h=-h,f=0>e?i+s(f.replace(i,""),h+1):s(f,h+1),c=f.slice(-h,f.length)+c,f=f.slice(0,-h)),t>0?(c=c.length>t?c.slice(0,t):u(c,t),c=a+c):c="",o===d?f+c:O(f,r,n,i)+c}function R(n,a,i){var o="";n*=M(100,a._percent),n*=M(1e3,a._permile),n/=M(10,3*a._scale);var u=a._intPart,l=a._decPart;if(!u&&!l)return"";var c=f,m=f,h,g,p,F,x;if(u)for(c="",h=0;h<u.length;h++)g=u[h],/^(0|#)+/g.test(g)&&(c+=g);if(l)for(m="",p=0;p<l.length;p++)F=l[p],/^(0|#)+/g.test(F)&&(m+=F);if(!c&&!m)return(u?u.join(""):"")+(l?l.join(""):"");m||(m="");var b=0,D=H(n,".");if(a._exponent){var S=_(n),w=c?c.length:1;if(S>=1)D._integer>w?(D._integer-=w,D._decimal+=w,n/=M(10,D._integer),b=D._integer):b=(D._integer<w,0),-1===a._exponent._sign&&(a._exponent._sign=0);else if(1>S&&S>0){a._exponent._sign=-1,D._integer=w,D._decimal-=w;for(var N=M(10,w);N>10*S;)S*=10,b++;n*=M(10,b)}}var C=m.lastIndexOf("0"),I=m.lastIndexOf("#"),P=D._decimal;C>=0&&(P=C+1),I>C&&I<D._decimal&&(P=I+1),l||(P=0);var E=A(n,P,i.numberGroupSizes,i.numberGroupSeparator,i.numberDecimalSeparator,i.negativeSign,d);if(""===E)return(u?u.join(""):"")+(l?l.join(""):"");var T=y;if(u){var k=E.split(".")[0],R=v(k,0,1);R===i.negativeSign&&(k=v(k,1));var L=0,G="",B=c.indexOf("0"),W=1===k.length&&"0"===k?0:k.length,z=-1===B?W:c.length-B;for(k=0===z?"":k,h=u.length-1;h>=0;h--)if(g=u[h],/^(0|#)+/g.test(g))if(G=g+G,G!==c){for(var $=g.length,V=k.length-L-1;V>=0&&$>0;V--){var Y=k.charAt(V);o=Y+o,$--,L++}L>=k.length&&z>L&&$>0&&(o=Array($+1).join("0")+o,L+=$)}else{var U=v(k,0,k.length-L);B>=0&&B<c.length-L-U.length&&(U=Array(c.length-L-B-U.length+1).join("0")+U),o=U+o}else a._exponent&&!T&&/^((E(\+|-)?|e(\+|-)?)\d+)/g.test(g)?(T=d,x="",x+=a._exponent._symbol,x+=r[a._exponent._sign],x+=s(""+b,a._exponent._exp),o=x+o):o=g+o;R===i.negativeSign&&(o=R+o),a._group===d&&(o=O(o,i.numberGroupSizes,i.numberGroupSeparator,i.negativeSign))}if(l){var j="";if(P>0){var K=E.indexOf(".");-1!==K&&(j=E.substring(K+1),""===c&&(o+=v(E,0,K)),o+=i.numberDecimalSeparator)}else/^(#+)$/gi.test(m)&&l.join("").length===m.length||(0>=C&&E.indexOf(".")<0&&c===e&&m===t||(o+="."),C>0&&(j=Array(C+1).join("0")));var J=0;for(p=0;p<l.length;p++)F=l[p],/^(0|#)+/g.test(F)?(o+=v(j,J,F.length),J+=F.length):a._exponent&&!T&&/^((E(\+|-)?|e(\+|-)?)\d+)/g.test(F)?(T=d,x="",x+=a._exponent._symbol,x+=r[a._exponent._sign],x+=s(""+b,a._exponent._exp),o+=x):o+=F}var X=o.indexOf("0.");return 0===X&&(X+2===o.length&&0===D._decimal?o=o.replace("0.","."):X+2<o.length&&(/[0-9]+/g.test(o.charAt(X+2))||(o=o.replace("0.",".")))),o}function L(e,t){if(e=a(e)?"":o._trimEnd(e,""),e.match(/^[+-]?infinity$/i))return h(e);if(e.match(/^0x[a-f0-9]+$/i))return m(e,10);var r=t.NumberFormat,n=r.numberNegativePattern,i=G(e,r,n),s=i[0],u=i[1];""===s&&1!==n&&(i=G(e,r,1),s=i[0],u=i[1]),""===s&&(s="+"),u[0]===r.currencySymbol&&(u=v(u,1));var l,c,y=u.indexOf("e");0>y&&(y=u.indexOf("E")),0>y?(c=u,l=f):(c=v(u,0,y),l=v(u,y+1));var d,g,_=c.indexOf(".");0>_?(d=c,g=f):(d=v(c,0,_),g=v(c,_+1)),d=d.split(",").join("");var M=",".replace(/\u00A0/g," ");","!==M&&(d=d.split(M).join(""));var p=s+d;g!==f&&(p+="."+g);var F=p[p.length-1];if(F===r.percentSymbol){p=v(p,0,p.length-1),p=o._trimEnd(p,"");var x=p.indexOf(".");-1===x&&(x=p.length);var b="";b+=v(p,0,x-2),b+=".",b+=v(p,x-2,2),b+=v(p,x+1),p=b}if(l!==f){var D=G(l,r,1);""===D[0]&&(D[0]="+"),p+="e"+D[0]+D[1]}return p.match(/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/)?h(p):NaN}function G(e,t,r){var n=t.negativeSign,a=t.positiveSign,i=o;if(4!==r&&2!==r||(n=" "+n,a=" "+a),4===r||3===r){if(i._endsWith(e,n))return["-",v(e,0,e.length-n.length)];if(i._endsWith(e,a))return["+",v(e,0,e.length-a.length)]}else if(2===r||1===r){if(i._startsWith(e,n))return["-",v(e,n.length)];if(i._startsWith(e,a))return["+",v(e,a.length)]}else{if(0!==r)throw Error("");if(i._startsWith(e,"(")&&i._endsWith(e,")"))return["-",v(e,1,e.length-2)]}return["",e]}function B(e,t,r){if(0!==_(g(e)-e))throw Error(p().Exp_BadFormatSpecifier);var i=e>=0?e.toString(16):(n+e+1).toString(16);return i=t?i.toLowerCase():i.toUpperCase(),!a(r)&&i.length<r?s(i,r):i}function W(e,t,r,n,a,i,o){for(var u=0,l=e>=1||0===e;1e3>u;){var f=M(10,u);if(l&&10>e/f||!l&&e*f>=1)break;u++}e=l?_(e)/M(10,u):_(e)*M(10,u);var c=A(e,r,n,a,i,o);return c+=t+(l?"+":"-")+s(""+u,3)}function z(e,t){return typeof t===c||0===+t?Math.round(e):(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!==0?NaN:(e=(""+e).split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=(""+e).split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}var $="#dot#",V="#group#";function Y(e){var t=l._getCultureInfo().NumberFormat;return"string"==typeof e&&(t=l._getCultureInfo(e).NumberFormat),t}return{_parseLocale:function(e){return L(e,l._getCultureInfo())},_parseInvariant:function(e){return L(e,l._getCultureInfo("invariant"))},_customCultureFormat:function(e,t,r){return r||(r=l._getCultureInfo()),w(e,t,r)},_replaceNormalToCultureSymbol:function(e,t){if("string"!=typeof e)return e;var r=Y(t),n=r.numberDecimalSeparator,a=r.numberGroupSeparator;return"."!==n&&(e=e.replace(x("[.]"),$)),","!==a&&(e=e.replace(x("[,]"),V)),"."!==n&&(e=e.replace(x($),n)),","!==a&&(e=e.replace(x(V),a)),e},_replaceCultureSymbolToNormal:function(e,t){if("string"!=typeof e)return e;var r=Y(t),n=r.numberDecimalSeparator,a=r.numberGroupSeparator;return"."!==n&&(e=e.replace(x("["+n+"]"),$)),","!==a&&(e=e.replace(x("["+a+"]"),V)),"."!==n&&(e=e.replace(x($),".")),","!==a&&(e=e.replace(x(V),",")),e},_parseFloat:function(e,t){return h(this._replaceCultureSymbolToNormal(e,t))},_toHexString:B}}();function x(e){return i._getReg(e)}e.exports=F},function(e,t,r){var n=r(7),a=function(){function e(){}return e._getReg=function(t){var r=e._regDict[t];return r||(r=e._regDict[t]=RegExp(t,"g")),r.lastIndex=0,r},e._getRegIgnoreCase=function(t){var r=e._regDictIgnoreCase[t];return r||(r=e._regDictIgnoreCase[t]=RegExp(t,"gi")),r.lastIndex=0,r},e._getWildcardCriteria=function(t,r){if(e._wildcardParseRecord[t])return e._wildcardParseResultBuffer[t];var n="[~?*]+";if(e._getReg(n).test(t)){for(var a=[],i=t.split(""),o,s=0;s<i.length;s++)o=i[s],"~"===o&&s<i.length-1?(s++,o=i[s],"*"===o||"?"===o?a.push("\\"):r&&a.push("~"),a.push(o)):"?"===o?a.push("."):"*"===o?(a.push("."),a.push("*")):a.push(o);return a.join("")}return null},e._getWildcardCriteriaFullMatch=function(t,r){var n=e._getWildcardCriteria(t,r);return n&&(n="^"+n+"$"),n},e._getReplaceSymbol=function(e,t){for(var r="#"+e+"0#",a=1;t.indexOf(r)>0;)r=n._join(r,"#"+e+(a-1)+"#","#"+e+a+"#"),a++;return r},e._regDict={},e._regDictIgnoreCase={},e._wildcardParseRecord={},e._wildcardParseResultBuffer={},e._replaceRegString2NormalString=function(e){return e.replace(/([\~\!\@\#\$\%\^\&\*\(\)\-\_\+\=\[\]\{\}\|\\\;\:\'\"\,\.\/\<\>\?])/,"\\$1")},e}();e.exports=a},function(e,t,r){var n=r(4)._isNullOrUndefined;function a(e,t,r){return e.substr(t,r)}var i={_contains:function(e,t,r){return r&&(e=e.toLowerCase(),t=t.toLowerCase()),""===t||e.indexOf(t)>=0},_indexOf:function(e,t,r){if(!r)return e.indexOf(t);if(r){var n=e.toLowerCase(),a=t.toLowerCase();return n.indexOf(a)}return e.indexOf(t)},_trimStart:function(e,t){if(!t)return e;for(var r=e;a(r,0,t.length)===t;)r=a(r,t.length);return r},_trimEnd:function(e,t){if(!t)return e;for(var r=e;a(r,r.length-t.length,t.length)===t;)r=a(r,0,r.length-t.length);return r},_insert:function(e,t,r){if(0>t||t>e.length||n(r))throw Error();var i=a(e,0,t),o=a(e,t,e.length-t);return i+r+o},_remove:function(e,t,r){if(n(r)&&(r=e.length-t),0>t||0>r||t+r>e.length)throw Error();var i=a(e,0,t),o=a(e,t+r,e.length-t-r);return i+o},_startsWith:function(e,t,r){return o(e,t,r,function(e,t){return e.slice(0,t.length)===t})},_endsWith:function(e,t,r){return o(e,t,r,function(e,t){return e.slice(-t.length)===t})},_replace:function(e,t,r,n){if(!t||""===t)throw Error();return r=(""+r).replace(/\$/g,"$$$$"),e.replace(RegExp(t,"g"+(n?"i":"")),r)},_replaceAllNoReg:function(e,t,n,a){return t=r(6)._replaceRegString2NormalString(t),this._replace(e,t,n,a)},_leftBefore:function(e,t){var r=e.indexOf(t);return 0>r||r>=e.length?e:a(e,0,r)},_count:function(e,t){for(var r=0,n=e.indexOf(t);n>=0;)r+=1,n=e.indexOf(t,n+1);return r},_join:function(e,t,r){return e.split(t).join(r)},_format:function(e,t){for(var r=e,n=0;n<t.length;n++){var a=RegExp("\\{"+n+"\\}","g");r=r.replace(a,t[n])}return r},_padZero:function(e,t,r){for(var n=""+e,a=n.length;t>a;a++)n=r?"0"+n:n+"0";return n},_padZeroLeft:function(e,t){return i._padZero(e,t,!0)},_padZeroRight:function(e,t){return i._padZero(e,t,!1)},_compareStringIgnoreCase:function(e,t){return e===t||!e&&!t||e&&t&&e.toLowerCase()===t.toLowerCase()},_toUpperCase:function(e){return e.toUpperCase()},_escapeHtml:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},n=r(6)._getReg("(?:&|<|>|\"|'|`)");return n.test(e)?e.replace(n,function(e){return t[e]}):e},_unescapeHtml:function(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x60;":"`"},n=r(6)._getReg("(?:&amp;|&lt;|&gt;|&quot;|&#x27;|&#x60;)");return n.test(e)?e.replace(n,function(e){
  2. return t[e]}):e}};function o(e,t,r,n){if(!t)throw Error();if(""===t)return!0;if(t.length>e.length)return!1;var a=e,i=t;return r&&(a=a.toLowerCase(),i=i.toLowerCase()),n(a,i)}e.exports=i},function(e,t,r){var n=r(2),a=r(7),i=r(9),o=r(3).CultureManager,s=r(4)._isNullOrUndefined,u=a._padZeroLeft,l=null,f=parseInt,c=!1,m=!0,h=Math.floor,y=Math.abs,d=function(){return n._getResource(n.SR)()},g={},_=function(){function e(e,t,r){var n,a,i,o,s,u=c;for(s=r,s.slice(1).forEach(function(e){e&&(u=!0)}),u||(s=s.concat(t._getDateTimePattern())),n=1,a=s.length;a>n;n++)if(o=s[n],o&&(u=m,i=p(e,o,t)))return i;return l}function t(e,n,a){var i=a.DateTimeFormat,o=i.Calendar.convert;if(!n||!n.length)return a&&a.name.length?o?t(e,i.fullDateTimePattern,a):e.toLocaleString():""+e;var s=i.eras,l="s"===n,f="",c,g,_,v=/([^d]|^)(d|dd)([^d]|$)/g;function p(){return g||_?g:(g=v.test(n),_=m,g)}var F=0,x=M(),b;!l&&o&&(b=o.fromGregorian(e));function D(e,t){if(b)return b[t];switch(t){case 0:return e.getFullYear();case 1:return e.getMonth();case 2:return e.getDate()}}for(var S=-2,w=-2,N={_value:""},C=0;;C++){var I=x.lastIndex,P=x.exec(n),E=n.slice(I,P?P.index:n.length);if(N._value="",F+=r(E,N),f+=N._value,!P)break;if(F%2!==1){var H=e.getFullYear(),T=e.getDay(),k=e.getHours(),O=e.getMinutes(),A=e.getSeconds(),R=e.getMilliseconds(),L=e.getTimezoneOffset();switch(P[0]){case"dddd":f+=i.dayNames[T];break;case"ddd":f+=i.abbreviatedDayNames[T];break;case"dd":g=m,f+=u(D(e,2),2);break;case"d":g=m,f+=D(e,2);break;case"MMMM":f+=i.monthGenitiveNames&&p()?i.monthGenitiveNames[D(e,1)]:i.monthNames[D(e,1)];break;case"MMM":f+=i.abbreviatedMonthGenitiveNames&&p()?i.abbreviatedMonthGenitiveNames[D(e,1)]:i.abbreviatedMonthNames[D(e,1)];break;case"MM":f+=u(D(e,1)+1,2);break;case"M":f+=D(e,1)+1;break;case"yyyy":case"yyy":f+=S>=0?s._formatEraPart("ee",e):u(b?b[0]:H,4);break;case"yy":f+=S>=0?s._formatEraPart("ee",e):u((b?b[0]:H)%100,2);break;case"y":f+=S>=0?s._formatEraPart("e",e):""+(b?b[0]:H)%100;break;case"hh":c=k%12,0===c&&(c=12),f+=u(c,2);break;case"h":c=k%12,0===c&&(c=12),f+=c;break;case"HH":f+=u(k,2);break;case"H":f+=""+k;break;case"mm":f+=u(O,2);break;case"m":f+=""+O;break;case"ss":f+=u(A,2);break;case"s":f+=""+A;break;case"tt":f+=12>k?i.amDesignator:i.pmDesignator;break;case"t":f+=(12>k?i.amDesignator:i.pmDesignator).charAt(0);break;case"f":f+=u(R,3).charAt(0);break;case"ff":f+=u(R,3).substr(0,2);break;case"fff":f+=u(R,3);break;case"z":c=L/60,f+=(0>=c?"+":"-")+h(y(c));break;case"zz":c=L/60,f+=(0>=c?"+":"-")+u(h(y(c)),2);break;case"zzz":c=L/60,f+=(0>=c?"+":"-")+u(h(y(c)),2)+":"+u(y(L%60),2);break;case"g":case"gg":case"ggg":if(!s)break;if(S===C-1){S=C;break}f+=s._formatEraPart(P[0],e),S=C;break;case"e":case"ee":if(!s){f+=u(b?b[0]:H,4);break}if(w===C-1){w=C;break}f+=s._formatEraPart(P[0],e),w=C;break;case"/":f+=i.dateSeparator;break;case"[h]":case"[hh]":case"[H]":case"[HH]":case"[mm]":case"[ss]":f+=P[0];break;default:throw Error(d().Exp_InvalidDateFormat)}}else f+=P[0]}return""+f}function r(e,t){for(var r=0,n=c,a=0,i=e.length;i>a;a++){var o=e.charAt(a);switch(o){case'"':n?t._value+="'":r++,n=c;break;case"\\":n&&(t._value+="\\"),n=!n;break;default:t._value+=o,n=c}}return r}function n(e,t){var r=new Date,n=e.DateTimeFormat.eras;if(n&&100>t){var a=n._getEraDate(r)._eraYear;t+=a-a%100,t>e.DateTimeFormat.Calendar.TwoDigitYearMax&&(t-=100)}return t}function M(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|ggg|gg|g|ee|e|\[H\]|\[HH\]|\[h\]|\[hh\]|\[mm\]|\[ss\]/g}function v(e,t){if(e._parseRegExp){if(e._parseRegExp[t])return e._parseRegExp[t]}else e._parseRegExp={};var n=t;n=n.replace("%M","M"),n=n.replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1");for(var a="^",o={_value:""},s=[],u=0,f=0,c=M(),m;(m=c.exec(n))!==l;){o._value="";var h=n.slice(u,m.index);if(u=c.lastIndex,f+=r(h,o),a+=o._value,f%2!==1){switch(m[0]){case"dddd":case"ddd":case"MMMM":case"MMM":case"gggg":case"ggg":case"gg":case"g":a+="(\\D+)";break;case"tt":case"t":a+="(\\D*)";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"eee":case"ee":case"e":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":a+="(\\d\\d?)";break;case"yyy":case"yyyy":a+="(\\d{2}|\\d{4})";break;case"fff":a+="(\\d{3})";break;case"ff":a+="(\\d{2})";break;case"f":a+="(\\d)";break;case"zzz":a+="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":a+="([+-]?\\d\\d?)";break;case"/":a+="(\\"+e.dateSeparator+")";break;default:throw Error(d().Exp_InvalidDateFormat)}i._add(s,m[0])}else a+=m[0]}o._value="",r(n.slice(u),o),a+=o._value,a+="$";var y=(""+a).replace(/\s+/g,"\\s+"),g={_regExp:y,_groups:s,_exp:RegExp(y)};return e._parseRegExp[t]=g,g}function p(e,t,r){e=e.trim();var i=r.DateTimeFormat,o=v(i,t),s=o._exp.exec(e);if(s===l)return l;for(var u=o._groups,m=l,h=l,y=l,d=l,g=l,_=0,M,p=0,F=0,x=0,b=l,D=c,S=0,w=u.length;w>S;S++){var N=s[S+1];if(N)switch(u[S]){case"dd":case"d":if(d=f(N,10),1>d||d>31)return l;break;case"MMMM":if(y=r._getMonthIndex(N),0>y||y>11)return l;break;case"MMM":if(y=r._getAbbrMonthIndex(N),0>y||y>11)return l;break;case"M":case"MM":case"%M":if(y=f(N,10)-1,0>y||y>11)return l;break;case"e":case"ee":if(h=n(r,f(N,10)),0>h||h>9999)return l;break;case"y":case"yy":case"yyy":case"yyyy":if(h=f(N,10),0>h||h>9999)return l;break;case"h":case"hh":case"H":case"HH":if(_=f(N,10),0>_)return l;break;case"m":case"mm":if(p=f(N,10),0>p||p>59)return l;break;case"s":case"ss":if(F=f(N,10),0>F||F>59)return l;break;case"tt":case"t":var C=N.toUpperCase();if(D=C===i.pmDesignator.toUpperCase(),!D&&C!==i.amDesignator.toUpperCase())return l;break;case"f":if(x=100*f(N,10),0>x||x>999)return l;break;case"ff":if(x=10*f(N,10),0>x||x>999)return l;break;case"fff":if(x=f(N,10),0>x||x>999)return l;break;case"dddd":if(g=r._getDayIndex(N),0>g||g>6)return l;break;case"ddd":if(g=r._getAbbrDayIndex(N),0>g||g>6)return l;break;case"zzz":var I=N.split(/:/);if(2!==I.length)return l;if(M=f(I[0],10),-12>M||M>13)return l;var P=f(I[1],10);if(0>P||P>59)return l;b=60*M+(a._startsWith(N,"-")?-P:P);break;case"z":case"zz":if(M=f(N,10),-12>M||M>13)return l;b=60*M;break;case"g":case"gg":case"ggg":var E=N;if(!E||!i.eras)return l;if(m=i.eras._parseEraPart(u[S],E),0>m)return l}}var H=/^(\d|\d\d):/.test(e),T=H?new Date(1899,11,30):new Date,k,O=i.Calendar.convert;if(O&&(k=O.fromGregorian(T)),O||(k=[T.getFullYear(),T.getMonth(),T.getDate()]),h===l?h=k[0]:100>h&&(i.eras?h=i.eras._getYearFromEra(m||0,h):h+=h>=30?1900:2e3),y===l&&(y=k[1]),d===l&&(d=k[2]),O){if(T=O.toGregorian(h,y,d),T===l)return l}else{if(T.setFullYear(h,y,d),T.getDate()!==d)return l;if(g!==l&&T.getDay()!==g)return l}if(D&&12>_&&(_+=12),T.setHours(_,p,F,x),b!==l){var A=T.getMinutes()-(b+T.getTimezoneOffset());T.setHours(T.getHours()+A/60,A%60)}return T}return{_customCultureFormat:function(e,r,n){return n||(n=o._getCultureInfo()),t(e,r,n)},_localeFormat:function(e,r,n){return t(e,r,n||o._getCultureInfo())},_parseLocale:function(t,r,n){var a,i;return r||n||(i=g[t],void 0===i)?(a=r?[t,r]:[t],i=e(t,n||o._getCultureInfo(),a),r||n||(g[t]=i),i?new Date(i):i):i?new Date(i):i},_parseInvariant:function(t,r){return e(t,o._getCultureInfo("invariant"),[t,r])},_parseExact:p,_fromOADate:function(e){var t=e-25569,r=new Date(864e5*t),n=t>=0?1:-1,a=r.getTimezoneOffset(),i=(864e5*e*1440+n-3181192704e6+864e5*a)/1440,o=new Date(i),s=a>=0?1:-1,u=new Date(i+36e5*s),l=u.getTimezoneOffset();if(a!==l){var f=new Date(i+60*(l-a)*1e3);if(a>l){if(-1===s||l===o.getTimezoneOffset())return f}else if(l>a&&(1===s||l===o.getTimezoneOffset()))return f}return o},_toOADate:function(e){return s(e)?0:("number"==typeof e&&(e=new Date(e)),(1440*e.getTime()+3181192704e6-864e5*e.getTimezoneOffset())/124416e6)},_DT:function(e){var t=l,r=m;if(s(e))t=this._fromOADate(0);else if(e instanceof Date)t=new Date(e);else if("string"==typeof e){var n=this._parseLocale(e);if(!n)if(isNaN(e)){n=new Date(e),isNaN(n.valueOf())&&(r=c);var a=/^[-+=\s]*(\d+)\W+(\d+)\W+(\d+)$/,i=a.exec(e.replace(/ |\n/g,"").trim());i&&4===i.length&&(-1!==i.indexOf(""+n.getFullYear())&&-1!==i.indexOf(""+(n.getMonth()+1))&&-1!==i.indexOf(""+n.getDate())||(r=c))}else n=_._fromOADate(parseFloat(e)),n||(r=c);t=n}else"number"==typeof e?t=this._fromOADate(e):r=c;if(r)return t;throw d().Exp_InvalidCast}}}();e.exports=_},function(e,t){var r=null,n=void 0,a=function(){function e(){}return e._insert=function(e,t,r){e.splice(t,0,r)},e._add=function(e,t){e.push(t)},e._contains=function(e,t){return e.indexOf(t)>-1},e._remove=function(e,t){var r=e.indexOf(t);r>-1&&e.splice(r,1)},e._removeByIndex=function(e,t){return e=e.slice(0,t).concat(e.slice(t+1))},e._indexOf=function(e,t,r){return e.indexOf(t,r)},e._clear=function(e,t,n){if(!(0>t))for(var a=0,i=0;n>a&&i<e.length;i++)e[t+i]=r,a++},e._nextNonEmptyIndex=function(e,t){0>t&&(t=-1);for(var a=t+1,i=a;i<e.length;i++)if(e[i]!==n&&e[i]!==r)return i;return-1},e._getLength=function(e){return e&&e.length},e}();e.exports=a},function(e,t,r){var n=r(2),a=r(5)._toHexString,i=Math.min,o=Math.max,s=Math.abs,u=parseInt,l=function(){function e(){}return e._toString=function(e){var t=e.a,r=e.r,n=e.g,i=e.b;return 3===arguments.length&&(t=255,r=arguments[0],n=arguments[1],i=arguments[2]),4===arguments.length&&(t=arguments[0],r=arguments[1],n=arguments[2],i=arguments[3]),255===t?"#"+a(r,!0,2)+a(n,!0,2)+a(i,!0,2):"rgba("+r+","+n+","+i+","+t+")"},e._compare=function(e,t){return e.a===t.a&&e.r===t.r&&e.g===t.g&&e.b===t.b},e._getBrightness=function(t){var r=e._fromString(t);return(299*r.r+587*r.g+114*r.b)/1e3},e._hueToRGB=function(e,t,r){return 0>r&&(r+=240),r>240&&(r-=240),40>r?e+((t-e)*r+20)/40:120>r?t:160>r?e+((t-e)*(160-r)+20)/40:e},e._fromHLS=function(t,r,n){function a(t,r,n){return parseInt((255*e._hueToRGB(t,r,n)+120)/240,10)}var i,o,s;if(0===n)i=o=s=u(255*r/240,10);else{var l,f;f=120>=r?(r*(240+n)+120)/240:r+n-(r*n+120)/240,l=2*r-f,i=a(l,f,t+80),o=a(l,f,t),s=a(l,f,t-80)}return{a:255,r:i,g:o,b:s}},e._isTwoColorSimilar=function(e,t){var r=255-s(e.r-t.r),n=255-s(e.g-t.g),a=255-s(e.b-t.b),i=s(e.a-t.a);r/=255,n/=255,a/=255;var o=(r+n+a)/3;return!!(o>=.9&&.05>=i)},e._invertColor=function(t){var r=255^t.r,n=255^t.g,a=255^t.b;return e._toString(t.a,r,n,a)},e._fromString=function(t){function r(t){var r=e._ctx;if(!r){var n=document.createElement("canvas");n&&n.getContext&&(r=e._ctx=n.getContext("2d"))}return r?(r.fillStyle=t,t=r.fillStyle):t}function n(e){var t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,n=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,a=/^rgb\(([\s\d]*),([\s\d]*),([\s\d]*)\)$/i,i=/^rgba\(([\s\d]*),([\s\d]*),([\s\d]*),([\s\d]*)\)$/i,o=function(e){return u(e,16)},s=function(e){return u(e+e,16)},l=function(e){return e.indexOf("%")>0?2.55*parseFloat(e):0|e},f=r(e),c=RegExp;if(t.test(f))return[c.$1,c.$2,c.$3].map(o);if(i.test(f)){var m=[c.$1,c.$2,c.$3].map(l);return m.splice(0,0,255*parseFloat(c.$4)),m}return a.test(f)?[c.$1,c.$2,c.$3].map(l):n.test(f)?[c.$1,c.$2,c.$3].map(s):null}if(t instanceof e)return t;var a=0,i=0,o=0,s=0;if(t&&""!==t){var l=n(t);l&&(3===l.length?(a=255,i=l[0],o=l[1],s=l[2]):4===l.length&&(a=l[0],i=l[1],o=l[2],s=l[3]))}return{a:a,r:i,g:o,b:s}},e._applyTint=function(t,r){if(0===r)return t;var n=new f(t),a=u(r>0?(240-n._luminosity)*r:n._luminosity*r,10);return e._fromHLS(n._hue,n._luminosity+a,n._saturation)},e._getLighterColor=function(t,r){var n=e._fromString(t),a=new f(n),i=a._getLighterColor(r);return e._toString(i)},e}(),f=function(){function e(e){var t=this,r=e.r,n=e.g,a=e.b,s=o(o(r,n),a),l=i(i(r,n),a),f=s+l;t._luminosity=u((240*f+255)/510,10);var c=s-l;if(0===c)t._saturation=0,t._hue=160;else{t._luminosity<=120?t._saturation=u((240*c+f/2)/f,10):t._saturation=u((240*c+(510-f)/2)/(510-f),10);var m=(40*(s-r)+c/2)/c,h=(40*(s-n)+c/2)/c,y=(40*(s-a)+c/2)/c;r===s?t._hue=u(y-h,10):n===s?t._hue=u(80+m-y,10):t._hue=u(160+h-m,10),t._hue<0&&(t._hue+=240),t._hue>240&&(t._hue-=240)}}return e.prototype={constructor:e,_getLighterColor:function(e){var t=this,r=t._luminosity,n=t._newLuma(t._luminosity,500,!0);return l._fromHLS(t._hue,r+(n-r)*e,t._saturation)},_newLuma:function(e,t,r){return 0===t?e:r?t>0?(e*(1e3-t)+241*t)/1e3:e*(t+1e3)/1e3:(e+=240*t/1e3,0>e&&(e=0),e>240&&(e=240),e)}},e}();n._ColorHelper=l,e.exports=n},function(e,t){var r=isNaN,n={},a="rowCount",i="colCount";function o(e){return e}function s(e,t,n,o,s,u,l,f,c,m,h){var y,d,g,_,M,v,p,F,x,b,D,S,w,N,C,I,P=n[a],E=n[i],H=t[a],T=t[i],k=o[a],O=o[i],A=1===E,R=1===T;if(H===P&&T===E){var L=0,G=0,B=0,W=0;for(p=P*E,y=0;P>y;y++)for(d=0;E>d;d++){if(_=u(n[y][d]),M=u(t[y][d]),e&&(r(_)||r(M)))return c;M=m(M),L+=_,G+=_*_,B+=M,W+=_*M}for(v=s?(p*W-L*B)/(p*G-L*L):W/G,F=s?(B*G-L*W)/(p*G-L*L):0,x=[],y=0;k>y;y++)for(x[y]=[],d=0;O>d;d++){if(_=u(o[y][d]),e&&r(_))return c;x[y][d]=h(v*_+F)}return l?new l(x):x}if(A&&H===P||1===H&&T===E){for(_=[],M=[],C=E+1,I=E+2,y=0;P>y;y++){if(D=A?t[y][0]:t[0][y],F=u(D),e&&r(F))return c;M[y]=A?m(F):F}for(y=0;P>y;y++)for(_[y]=[],d=0;E>d;d++){if(F=u(n[y][d]),e&&r(F))return c;_[y][d]=F}var z=[];for(v=0;C>v;v++)for(z[v]=[],p=0;I>p;p++)z[v][p]=0;for(g=0;P>g;g++)for(z[0][C]+=M[g],y=0;E>y;y++)for(D=y+1,z[0][D]+=_[g][y],z[D][0]=z[0][D],z[D][C]+=_[g][y]*M[g],d=y;E>d;d++)w=d+1,z[w][D]+=_[g][y]*_[g][d],z[D][w]=z[w][D];z[0][0]=P;var $=s?0:1;for(b=$;C>b;b++){if(e){if(0===z[y][y]){for(N=!1,d=y+1;!N&&C>d;d++)if(0!==z[d][y]){for(g=0;I>g;g++)w=z[y][g],z[y][g]=z[d][g],z[d][g]=w;N=!0}if(!N)return f}}else{for(y=b;C>y&&0===z[y][b];)y++;if(y>=C)return f;for(S=$;I>S;S++)D=z[b][S],z[b][S]=z[y][S],z[y][S]=D}for(D=1/z[b][b],S=$;I>S;S++)z[b][S]*=D;for(y=$;C>y;y++)if(y!==b)for(D=-z[y][b],S=0;I>S;S++)z[y][S]+=D*z[b][S];!s&&(z[0][C]=0)}for(x=[],!R&&(x[0]=[]),y=0;k>y;y++){for(R&&(x[y]=[]),D=z[0][C],d=0;E>d;d++){if(D=R?o[y][d]:o[d][y],F=u(D),e&&r(F))return c;D+=z[d+1][C]*F}R?x[y][0]=h(D):x[0][y]=h(D)}return l?new l(x):x}return f}function u(e,t,r,n,a,i,u,l){return s(!0,e,t,r,n,a,i,l,u,o,o)}function l(e,t,r,n,u,l,f){var c,m;for(c=0;c<e[a];c++)for(m=0;m<e[i];m++)if(e[c][m]<=0)return l;return s(!1,e,t,r,n,o,u,f,null,Math.log,Math.exp)}n._trend=u,n._growth=l,e.exports=n},function(e,t){e.exports={Exp_InvalidDateFormat:"Invalid date format pattern",Exp_InvalidExponentFormat:"invalid exponent format",Exp_InvalidSemicolons:"invalid format: too many semicolons",Exp_InvalidNumberGroupSize:"NumberGroupSize must be between 1 and 9.",Exp_BadFormatSpecifier:"Bad Format Specifier",Exp_InvalidNumberFormat:"Invalid number format pattern",Exp_InvalidCast:"InvalidCastException",Exp_Separator:"numberDecimalSeparator, listSeparator and arrayListSeparator should be different in cluture info."}},function(e,t,r){var t={};n(t,r(14)),n(t,r(15)),e.exports=t;function n(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}},function(e,t){var t={};t.Key={left:37,right:39,up:38,down:40,tab:9,enter:13,shift:16,ctrl:17,space:32,altkey:18,home:36,end:35,pup:33,pdn:34,backspace:8,del:46,esc:27,a:65,c:67,v:86,x:88,z:90,y:89};function r(e,t){var r=this;r._owner=e,r._cmdDef=t,Object.defineProperty(r,"shortcutKey",{get:function(){return r._shortcutKey},set:function(e){var t=r._shortcutKey;if(t!==e){var n=r._owner._shortcutKeys,a=n[t];if(a){var i=a.indexOf(r);i>=0&&a.splice(i,1)}r._shortcutKey=e,e&&(a=n[e],a||(n[e]=a=[]),a.splice(0,0,r))}}})}r.prototype={canUndo:function(){var e=this._cmdDef;return e.canUndo},execute:function(e,t,r){var n=this,a=!0;try{var i=n._cmdDef.execute||n._cmdDef,o=i(e,t,1===r);a=o!==!1}catch(s){a=!1}return t&&a&&n._owner._commandExecuted({command:t,result:o,_actionType:r}),o}};function n(e){var t=this;t._context=e,t._listeners={},t._shortcutKeys={}}n.prototype={register:function(e,t,n,a,i,o,s){var u=this,l=new r(u,t);u[e]=l,n&&(l.shortcutKey=u.getShortcutKey(n,a,i,o,s))},execute:function(e){var t=this[e.cmd];return t?t.execute(this._context,e,0):void 0},setShortcutKey:function(e,t,r,n,a,i){var o=this;if(e){var s=o[e];s&&(s.shortcutKey=o.getShortcutKey(t,r,n,a,i))}else{var u=o.getShortcutKey(t,r,n,a,i),l=o.getCommands(u);if(l)for(var f=l.length-1;f>=0;f--)l[f].shortcutKey=void 0}},getShortcutKey:function(e,r,n,a,i){if(e){var o="A".charCodeAt(0)<=e&&e<="Z".charCodeAt(0)?String.fromCharCode(e):t.Key[e];return o||(o=e),""+o+(r?"+ctrl":"")+(n?"+shift":"")+(a?"+alt":"")+(i?"+window":"")}},getCommands:function(e){return this._shortcutKeys[e]},addListener:function(e,t){this._listeners[e]=t},removeListener:function(e){delete this._listeners[e]},_commandExecuted:function(e){var t=this._listeners;for(var r in t)t.hasOwnProperty(r)&&t[r](e)}},t.CommandManager=n,e.exports=t},function(e,t){function r(e,t,r){var n=this;n._context=e,0>t&&(t=2147483647),n._maxLength=t,n._allowUndo=r,n._undoStack=[],n._redoStack=[]}r.prototype={_addCommand:function(e,t){var r=this;if(e)if(1===t)r._redoStack.push(e);else{var n=r._maxLength,a=r._undoStack.length;if(n>0&&a>=n)for(var i=0;a-n+1>i;i++)r._undoStack.shift();r._undoStack.push(e),0===t&&(r._redoStack=[])}},canUndo:function(){return this._undoStack.length>0},undo:function(){var e=this,t=e._undoStack,r=!0;if(e._allowUndo&&e.canUndo()){var n=t[t.length-1];try{var a=e._context.commandManager()[n.cmd];a&&(r=a.execute(e._context,n,1))}catch(i){r=!1}r!==!1&&t.pop()}return r},canRedo:function(){return this._redoStack.length>0},redo:function(){var e=this,t=e._redoStack,r=!0;if(e._allowUndo&&e.canRedo()){var n=t[t.length-1];try{var a=e._context.commandManager()[n.cmd];a&&(r=a.execute(e._context,n,2))}catch(i){r=!1}r!==!1&&t.pop()}return r},clear:function(){this._undoStack=[],this._redoStack=[]}},e.exports.UndoManager=r},function(e,t,r){var t={};n(t,r(17)),t.SR={},t.SR.en=r(18),e.exports=t;function n(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}},function(e,t,r){var n=null,a=void 0,i=Math.abs,o={},s=r(1),u=s._StringHelper,l=s._DateTimeHelper,f=s._Types,c=f._isType,m=s._NumberHelper,h=f._isNullOrUndefined,y=s.CultureManager,d="一十",g="十",_=function(){return s._getResource(o.SR)()},M=function(e){return y._getCultureInfo(e)},v=function(e){return M(e).DateTimeFormat},p=function(e){return M(e).NumberFormat},F=function(e){return e&&e.toLowerCase()},x=function(){throw Error(_().Exp_FormatIllegal)};function b(e,t,r){return e.substr(t,r)}function D(e){return f._isNullOrUndefined(e)?"":"boolean"==typeof e?e?"TRUE":"FALSE":"string"==typeof e?e:""+e}var S={_Empty:"",_format:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===arguments.length)return n;for(var r=e[0],a=1;a<arguments.length;a++){var i=RegExp("\\{"+(a-1)+"\\}","gm");r=r.replace(i,arguments[a])}return r},_isNullOrEmpty:function(e){return!e||e===S._Empty}},w={_isDigit:function(e){var t=e.charCodeAt(0);return t>=48&&57>=t},_isWhiteSpace:function(e){var t=e.charCodeAt(0);return t>=9&&13>=t||32===t||133===t||160===t}},N={_positive:0,_negative:1,_zero:2,_text:3},C=RegExp("([.+?*$^\\[\\](){}|/])","g");function I(e,t){if("\\"===e[t])throw Error(_().Exp_InvalidBackslash);if(t-1>0&&t-1<e.length&&"\\"===e[t-1]){if(0>t-2)return!0;if(t-2>0&&t-2<e.length)return"\\"!==e[t-2]}return!1}function P(e){if(!e)throw Error(_().Exp_TokenIsNull);return"["+e+"]"}function E(e){if(e===a||e===n||""===e)return e;for(var t="",r=0,i=0;i<e.length;i++){var o=e[i];"["===o?r++:"]"===o?(r--,0>r&&(r=0)):0===r&&(t+=o)}return""+t}function H(e){return e=T(e,"[",""),T(e,"]","")}function T(e,t,r){return!e||e===S._Empty||O(t,r,!0)?e:(t=t.replace(C,"\\$1"),e.replace(RegExp(t,"g"),r))}function k(e){for(var t=e.length,r=!1,n="",a=0;t>a;a++){var i=e.charAt(a);"\\"===i?(r=!r,r||(n+=i)):(r=!1,n+=i)}return n}function O(e,t,r){return r?F(e)===F(t):e===t}function A(e,t){1===arguments.length&&(t=!0);for(var r=!1,n="",a=0;a<e.length;a++){var i=e[a];if('"'===i)r=!r;else if(!r&&!((t||"?"!==i&&"/"!==i)&&"_"!==i&&"*"!==i||I(e,a))){"_"===i&&a++;continue}n+=i}return n}function R(e,t){if(!e||e===S._Empty)return!1;for(var r=A(e),n="",a=!1,i=0,o=r.length;o>i;i++){var s=r[i];'"'===s&&(a=!a),"E"===s||a||(n+=F(s))}for(var u=0;u<t.length;u++)if(n===t[u]||n.indexOf(t[u])>=0)return!0;return!1}var L=[["M/d","MMM/d","MMMM/d","d/M","d/MMM","d/MMMM","M-d","MMM-d","MMMM-d","d-M","d-MMM","d-MMMM"],["M/y","MMM/y","M/yyyy","MMM/yyyy","M-y","MMM-y","M-yyyy","MMM-yyyy"],["M/d/y","MMM/d/y","MMMM/d/y","M/d/yyyy","MMM/d/yyyy","MMMM/d/yyyy","d/M/y","d/MMM/y","d/MMMM/y","d/M/yyyy","d/MMM/yyyy","d/MMMM/yyyy","yyyy/M/d","M-d-y","MMM-d-y","MMMM-d-y","M-d-yyyy","MMM-d-yyyy","MMMM-d-yyyy","d-M-y","d-MMM-y","d-MMMM-y","d-M-yyyy","d-MMM-yyyy","d-MMMM-yyyy","yyyy-M-d"],["H:m","h:m tt"],["H:m:s","h:m:s tt","H:m:s","h:mm:ss tt"],["H:m:s.FFF","h:m:s.FFF tt"],["M/d H:m","MMM/d H:m","MMMM/d H:m","d/M H:m","d/MMM H:m","d/MMMM H:m","M/y H:m","MMM/y H:m","M/yyyy H:m","MMM/yyyy H:m","M/d/y H:m","MMM/d/y H:m","MMMM/d/y H:m","M/d/yyyy H:m","MMM/d/yyyy H:m","MMMM/d/yyyy H:m","M-d H:m","MMM-d H:m","MMMM-d H:m","d-M H:m","d-MMM H:m","d-MMMM H:m","M-y H:m","MMM-y H:m","M-yyyy H:m","MMM-yyyy H:m","M-d-y H:m","MMM-d-y H:m","MMMM-d-y H:m","M-d-yyyy H:m","MMM-d-yyyy H:m","MMMM-d-yyyy H:m","M/d h:m tt","MMM/d h:m tt","MMMM/d h:m tt","d/M h:m tt","d/MMM h:m tt","d/MMMM h:m tt","M/y h:m tt","MMM/y h:m tt","M/yyyy h:m tt","MMM/yyyy h:m tt","M/d/y h:m tt","MMM/d/y h:m tt","MMMM/d/y h:m tt","M/d/yyyy h:m tt","MMM/d/yyyy h:m tt","MMMM/d/yyyy h:m tt","M-d h:m tt","MMM-d h:m tt","MMMM-d h:m tt","d-M h:m tt","d-MMM h:m tt","d-MMMM h:m tt","M-y h:m tt","MMM-y h:m tt","M-yyyy h:m tt","MMM-yyyy h:m tt","M-d-y h:m tt","MMM-d-y h:m tt","MMMM-d-y h:m tt","M-d-yyyy h:m tt","MMM-d-yyyy h:m tt","MMMM-d-yyyy h:m tt"],["M/d H:m:s","MMM/d H:m:s","MMMM/d H:m:s","d/M H:m:s","d/MMM H:m:s","d/MMMM H:m:s","M/y H:m:s","MMM/y H:m:s","M/yyyy H:m:s","MMM/yyyy H:m:s","M/d/y H:m:s","MMM/d/y H:m:s","MMMM/d/y H:m:s","M/d/yyyy H:m:s","MMM/d/yyyy H:m:s","MMMM/d/yyyy H:m:s","d/M/y H:m:s","d/MMM/y H:m:s","d/MMMM/y H:m:s","d/M/yyyy H:m:s","d/MMM/yyyy H:m:s","d/MMMM/yyyy H:m:s","yyyy/M/d H:m:s","M-d H:m:s","MMM-d H:m:s","MMMM-d H:m:s","d-M H:m:s","d-MMM H:m:s","d-MMMM H:m:s","M-y H:m:s","MMM-y H:m:s","M-yyyy H:m:s","MMM-yyyy H:m:s","M-d-y H:m:s","MMM-d-y H:m:s","MMMM-d-y H:m:s","M-d-yyyy H:m:s","MMM-d-yyyy H:m:s","MMMM-d-yyyy H:m:s","d-M-y H:m:s","d-MMM-y H:m:s","d-MMMM-y H:m:s","d-M-yyyy H:m:s","d-MMM-yyyy H:m:s","d-MMMM-yyyy H:m:s","yyyy-M-d H:m:s","M/d h:m:s tt","MMM/d h:m:s tt","MMMM/d h:m:s tt","d/M h:m:s tt","d/MMM h:m:s tt","d/MMMM h:m:s tt","M/y h:m:s tt","MMM/y h:m:s tt","M/yyyy h:m:s tt","MMM/yyyy h:m:s tt","M/d/y h:m:s tt","MMM/d/y h:m:s tt","MMMM/d/y h:m:s tt","M/d/yyyy h:m:s tt","MMM/d/yyyy h:m:s tt","MMMM/d/yyyy h:m:s tt","d/M/y h:m:s tt","d/MMM/y h:m:s tt","d/MMMM/y h:m:s tt","d/M/yyyy h:m:s tt","d/MMM/yyyy h:m:s tt","d/MMMM/yyyy h:m:s tt","yyyy/M/d h:m:s tt","M/d/yyyy h:mm:ss tt","M-d h:m:s tt","MMM-d h:m:s tt","MMMM-d h:m:s tt","d-M h:m:s tt","d-MMM h:m:s tt","d-MMMM h:m:s tt","M-y h:m:s tt","MMM-y h:m:s tt","M-yyyy h:m:s tt","MMM-yyyy h:m:s tt","M-d-y h:m:s tt","MMM-d-y h:m:s tt","MMMM-d-y h:m:s tt","M-d-yyyy h:m:s tt","MMM-d-yyyy h:m:s tt","MMMM-d-yyyy h:m:s tt","d-M-y h:m:s tt","d-MMM-y h:m:s tt","d-MMMM-y h:m:s tt","d-M-yyyy h:m:s tt","d-MMM-yyyy h:m:s tt","d-MMMM-yyyy h:m:s tt","yyyy-M-d h:m:s tt"],["M/d H:m:s.FFF","MMM/d H:m:s.FFF","MMMM/d H:m:s.FFF","d/M H:m:s.FFF","d/MMM H:m:s.FFF","d/MMMM H:m:s.FFF","M/y H:m:s.FFF","MMM/y H:m:s.FFF","M/yyyy H:m:s.FFF","MMM/yyyy H:m:s.FFF","d/M/y H:m","d/MMM/y H:m","d/MMMM/y H:m","d/M/yyyy H:m","d/mmm/yyyy H:m","d/MMMM/yyyy H:m","yyyy/M/d H:m","M/d/y H:m:s.FFF","MMM/d/y H:m:s.FFF","MMMM/d/y H:m:s.FFF","M/d/yyyy H:m:s","MMM/d/yyyy H:m:s.FFF","MMMM/d/yyyy H:m:s.FFF","d/M/y H:m:s.FFF","d/MMM/y H:m:s.FFF","d/MMMM/y H:m:s.FFF","d/M/yyyy H:m:s.FFF","d/MMM/yyyy H:m:s.FFF","d/MMMM/yyyy H:m:s.FFF","yyyy/M/d H:m:s.FFF","M-d H:m:s.FFF","MMM-d H:m:s.FFF","MMMM-d H:m:s.FFF","d-M H:m:s.FFF","d-MMM H:m:s.FFF","d-MMMM H:m:s.FFF","M-y H:m:s.FFF","MMM-y H:m:s.FFF","M-yyyy H:m:s.FFF","MMM-Yyyy H:m:s.FFF","d-M-y H:m","d-MMM-y H:m","d-MMMM-y H:m","d-M-yyyy H:m","d-MMM-yyyy H:m","d-MMMM-yyyy H:m","yyyy-M-d H:m","M-d-y H:m:s.FFF","MMM-d-y H:m:s.FFF","MMMM-d-y H:m:s.FFF","M-d-yyyy H:m:s","MMM-d-yyyy H:m:s.FFF","MMMM-d-yyyy H:m:s.FFF","D-M-y H:m:s.FFF","d-MMM-y H:m:s.FFF","d-MMMM-y H:m:s.FFF","D-M-yyyy H:m:s.FFF","d-MMM-yyyy H:m:s.FFF","d-MMMM-yyyy H:m:s.FFF","yyyy-M-d H:m:s.FFF","M/d h:m:s.FFF tt","MMM/d h:m:s.FFF tt","MMMM/d h:m:s.FFF tt","d/M h:m:s.FFF tt","d/MMM h:m:s.FFF tt","d/MMMM h:m:s.FFF tt","M/y h:m:s.FFF tt","MMM/y h:m:s.FFF tt","M/yyyy h:m:s.FFF tt","MMM/yyyy h:m:s.FFF tt","d/M/y h:m tt","d/MMM/y h:m tt","d/MMMM/y h:m tt","d/M/yyyy h:m tt","d/mmm/yyyy h:m tt","d/MMMM/yyyy h:m tt","yyyy/M/d h:m tt","M/d/y h:m:s.FFF tt","MMM/d/y h:m:s.FFF tt","MMMM/d/y h:m:s.FFF tt","M/d/yyyy h:m:s tt","MMM/d/yyyy h:m:s.FFF tt","MMMM/d/yyyy h:m:s.FFF tt","d/M/y h:m:s.FFF tt","d/MMM/y h:m:s.FFF tt","d/MMMM/y h:m:s.FFF tt","d/M/yyyy h:m:s.FFF tt","d/MMM/yyyy h:m:s.FFF tt","d/MMMM/yyyy h:m:s.FFF tt","yyyy/M/d h:m:s.FFF tt","M-d h:m:s.FFF tt","MMM-d h:m:s.FFF tt","MMMM-d h:m:s.FFF tt","d-M h:m:s.FFF tt","d-MMM h:m:s.FFF tt","d-MMMM h:m:s.FFF tt","M-y h:m:s.FFF tt","MMM-y h:m:s.FFF tt","M-yyyy h:m:s.FFF tt","MMM-Yyyy h:m:s.FFF tt","d-M-y h:m tt","d-MMM-y h:m tt","d-MMMM-y h:m tt","d-M-yyyy h:m tt","d-MMM-yyyy h:m tt","d-MMMM-yyyy h:m tt","yyyy-M-d h:m tt","M-d-y h:m:s.FFF tt","MMM-d-y h:m:s.FFF tt","MMMM-d-y h:m:s.FFF tt","M-d-yyyy H:m:s tt","MMM-d-yyyy H:m:s.FFF tt","MMMM-d-yyyy h:m:s.FFF tt","d-M-y h:m:s.FFF tt","d-MMM-y h:m:s.FFF tt","d-MMMM-y h:m:s.FFF tt","d-M-yyyy h:m:s.FFF tt","d-MMM-yyyy h:m:s.FFF tt","d-MMMM-yyyy h:m:s.FFF tt","yyyy-M-d h:m:s.FFF tt"]],G=function(){return{pattern:L,formatter:["d-mmm","mmm-yy",v().shortDatePattern,"h:mm","h:mm:ss","h:mm:ss.0",v().shortDatePattern+" h:mm",v().shortDatePattern+" h:mm:ss",v().shortDatePattern+" h:mm:ss.0"]}};function B(e,t,r){this._partLocaleID=e,this._partDBNumberFormat=t,this.cultureName=r}function W(e){this._originalToken=e}function z(e){var t,r=H(e);if(!r||r===S._Empty)return t;var n=r[0];return["<",">","="].indexOf(n)>-1?(t=K,t.Name="ConditionalFormatPart"):u._startsWith(r,"DBNum",!0)?(t=q,t.Name="DBNumberFormatPart"):O(r[0],"$",!1)?(t=Z,t.Name="LocaleIDFormatPart"):V(r)?(t=X,t.Name="ABSTimeFormatPart"):r.length>=3&&(t=J,t.Name="ColorFormatPart"),t}function $(e){var t=!1,r;return e=e?""+e:S._Empty,R(e,["general"])?r=ie:ee._evaluateFormat(e)?r=ee:R(e,["E+","E-","#",".",",","%","0","/"])?(t=!0,r=ae):(t=!0,r=ne),{_isDigitalOrText:t,_type:r}}function V(e){var t=F(e),r=t[0];if("h"!==r&&"m"!==r&&"s"!==r)return!1;for(var n=1;n<t.length;n++)if(r!==t[n])return!1;return!0}function Y(e,t,r){var a;a=e?e.cultureInfo():M(r);var i=a.NumberFormat.dbNumber;return i?i[t]:n}function U(e,t,r,n,a){var i=e;if(!h(n)&&t instanceof Date){var o=Y(r,n.type,a);i=n._replaceNumberString(i,o,!0),1===n.type&&(i=i.replace(RegExp(d,"g"),g)),i=i.replace("@"+te._yearFourDigit,l._localeFormat(t,te._yearFourDigit)),i=i.replace("@"+te._yearTwoDigit,l._localeFormat(t,te._yearTwoDigit)),i=n._replaceNumberString(i,o,!1)}return i}function j(e,t,r,n,a){if(!h(n)){var i=Y(r,n.type,a);if(!h(i)){var o=n._replaceNumberString(e,i,t),s=M(a),u;return"ja-JP"===s.name()&&o.length>1&&("一千"===(u=o.substr(0,2))||"一百"===u||"一十"===u)&&(o=o.substr(1)),o}}return e}var K=function(){function e(e,r){W.call(this,r);for(var i=this,o,s,l,f=["<=","<>",">=",">","<","="],c=0,m=f.length;m>c;c++)if(o=f[c],u._startsWith(e,o,!0)){s=u._remove(e,0,o.length);var h=parseFloat(s);isNaN(h)||(l=h);break}if(l===n&&l===a)throw Error(_().Exp_TokenIllegal);i.value=l,i._compareOperator=o,i.isMeetCondition=t(i)}e.Name="ConditionalFormatPart",e.prototype={toString:function(){return P(this._compareOperator+(""+this.value))}};function t(e){var t="var self = this;",r=e._compareOperator;return r="<>"===r?"!=":r,r="="===r?"===":r,t+="return value "+r+" self.value;",Function(["value"],t)}return e}(),J=function(){function e(e,t){W.call(this,t),this.foreColor=e}return e.Name="ColorFormatPart",e.prototype.toString=function(){return P(this.foreColor)},e}(),X=function ue(e,t){W.call(this,t);var r=this,n=F(e)[0],a;if("h"===n)a=3600;else if("m"===n)a=60;else{if("s"!==n)throw Error(_().Exp_TokenIllegal);a=1}r._getTimeSpan=function(e){return Math.floor(e/1e3/a)}};X.Name="ABSTimeFormatPart";var q=function(){function e(e,t){W.call(this,t);var r=this;if(r.token=e,r.type=parseInt(u._remove(e,0,5),10),r.type<0||r.type>3)throw Error(_().Exp_TokenIllegal)}e.Name="DBNumberFormatPart",e.prototype={_replaceNumberString:function(e,r,a){if(!e||e===S._Empty)return e;for(var i=e,o=e,s=-1,l=-1,f=!1,c=n,m=n,h=n,y=e.length-1;y>=0;y--){var d=o[y];!isNaN(d)||O(d,".",!1)&&!f?(O(d,".",!1)&&(f=!0),-1===s&&(s=y),l=y):l>-1&&s>-1&&(c=b(o,l,s-l+1),m=parseFloat(c),isNaN(m)||(h=t(c,r,a),i=u._remove(i,l,s-l+1),i=u._insert(i,l,h)),s=-1,l=-1,f=!1)}return l>-1&&s>-1&&(c=b(o,l,s-l+1),m=parseFloat(c),isNaN(m)||(h=t(c,r,a),i=u._remove(i,l,s-l+1),i=u._insert(i,l,h)),s=-1,l=-1,f=!1),i},toString:function(){if(this.type>-1)return P("DBNum"+this.type);throw Error()}};function t(e,t,a){var i=e.split(".");if(i){if(1===i.length)return r(i[0],t.numbers,a?t.letters:n);if(2===i.length){var o=r(i[0],t.numbers,a?t.letters:n),s=r(i[1],t.numbers);return o+"."+s}}throw Error(_().Exp_ValueIllegal)}function r(e,t,a){var i=e,o=0,s=n,u=0;if(2===arguments.length){var l="";for(o=0;o<i.length;o++)s=b(i,o,1),u=parseInt(s,10),l+=t[u];return l}if(3===arguments.length){if(!a)return r(e,t);var f=0,c="",m=i.length,h=!1,y=[];for(o=0;m>o;o++){var d=a.length-1-o;d>-1?y.push(""+a[d]):y.push(S._Empty)}for(var g=[],_=y.length-1;_>=0;_--)g[y.length-_-1]=y[_];y=g;var M=!1;for(_=0;m>_;_++){s=b(i,_,1),u=parseInt(s,10);var v=S._Empty,p=S._Empty;m-_-16>0?(v=t[u],p="",M=!0):_!==m-1&&_!==m-5&&_!==m-9&&_!==m-13?"0"===s?(v="",p="",f+=1):"0"!==s&&0!==f?(v=t[0]+t[u],p=y[_],f=0):(v=t[u],p=y[_],f=0):"0"!==s&&0!==f?(v=t[0]+t[u],p=y[_],f=0):"0"!==s&&0===f||M?(v=t[u],p=y[_],f=0,M=!1):"0"===s&&f>=3?(v="",p="",f+=1):m>=11?(v="",f+=1):(v="",p=y[_],f+=1);var F=v+p===S._Empty;F||(h=!1),_!==m-13||h||(p=y[_],h=!0),_!==m-9||h||(p=y[_],h=!0),_===m-1&&(p=y[_],h=!0),c=c+v+p}var x=parseInt(e,10);return isNaN(x)||0!==x?c:t[0]}}return e}(),Z=function(){function e(e,t){W.call(this,t);var r=this;r._content=e;var n=r._content,a=O(n[0],"$",!1),i=n.indexOf("-");if(!(a&&i>-1))throw Error(_().Exp_TokenIllegal);r._currencySymbol=b(n,1,i-1),n=u._remove(n,0,i+1),n.length>0&&(r._locateID=parseInt(n,16))}return e.Name="LocaleIDFormatPart",e.prototype={cultureInfo:function(){var e=this;return e._cultureInfo||(e._cultureInfo=M(e._locateID),e._currencySymbol&&e._currencySymbol!==S._Empty&&(e._cultureInfo.NumberFormat.isReadOnly||(e._cultureInfo.NumberFormat.currencySymbol=e._currencySymbol))),e._cultureInfo},currencySymbol:function(){return this._currencySymbol?u._replace(this._currencySymbol,"\\.","'.'"):S._Empty},allowScience:function(){return this._cultureInfo?!(0===this._cultureInfo.name().indexOf("ja")||0===this._cultureInfo.name().indexOf("zh")):void 0},toString:function(){return this._content?P(this._content):S._Empty}},e}(),Q=function(){function e(e,t){this.formatCached=e,this.cultureName=t,this.typeName=""}return e.prototype={format:function(e,t){return n},parse:function(e){return n},formatString:function(){return this.formatCached},toJSON:function(){var e={};for(var t in this)this.hasOwnProperty(t)&&(e[t]=this[t]);return e},fromJSON:function(e){if(e)for(var t in e)e[t]!==a&&(this[t]=e[t])}},e}(),ee=function(){function e(e,t,r,n,a){B.call(this,t,r,n);var i=this;i._formatString=i._fixFormat(A(e)),i._absTimeParts=a,i._formatType=2,i._init()}e.prototype={_init:function(){var t=this,r={_value:t._formatString},n=e;if(n._evaluateFormat(r._value)){var a=t._processAMPM(r);if(t.hasJD=t._replace(r._value,te._monthJD,'"'+te._placeholderMonthJD+'"',!0,!1,r,!1),t._replace(r._value,te._monthUnabbreviated,"MMMM",!0,!1,r,!1),t._replace(r._value,te._monthAbbreviation,"MMM",!0,!1,r,!1),t._replace(r._value,te._monthTwoDigit,"MM",!0,!1,r,!1),t._replace(r._value,te._monthSingleDigit,"M",!0,!1,r,!1),t._replace(r._value,te._dayWeekDayAbbreviation,"ddd",!0,!0,r,!0),t._replace(r._value,te._dayWeekDayUnabbreviated,"dddd",!0,!0,r,!0),a||(t._replace(r._value,te._hoursSingleDigit,"H",!0,!0,r,!1),t._replace(r._value,te._hoursTwoDigit,"HH",!0,!0,r,!1)),t._partDBNumberFormat&&t._partLocaleID&&(t._hasYearDelay=t._hasYearDelay||t._replace(r._value,te._yearFourDigit,'"@'+te._yearFourDigit+'"',!0,!1,r,!0),
  3. t._hasYearDelay=t._hasYearDelay||t._replace(r._value,te._yearTwoDigit,'"@'+te._yearTwoDigit+'"',!0,!1,r,!0)),t._absTimeParts)for(var i=0;i<t._absTimeParts.length;i++){var o=t._absTimeParts[i];t._replace(r._value,o._originalToken,"@"+o._originalToken,!0,!0,r,!0)}t._validDateTimeFormatString=r._value}else x()},formatString:function(){return this._formatString},format:function(e){var t=this,r=S._Empty,a=n;try{if(a=l._DT(e),a?e=a:r=""+e,a){if(r=l._customCultureFormat(a,t._validDateTimeFormatString,t._partLocaleID&&t._partLocaleID.cultureInfo()||M(t.cultureName)),t.hasJD){var i=M(t.cultureName).DateTimeFormat.monthNames[a.getMonth()];r=u._replace(r,te._placeholderMonthJD,b(i,0,1))}if(t._absTimeParts)for(var o=24*(l._toOADate(a)-l._toOADate(te._defaultAbsoluteTime))*60*60*1e3,s=0;s<t._absTimeParts.length;s++){var f=t._absTimeParts[s],c=f._getTimeSpan(o);if(c){var m=f._originalToken.replace("[","\\[").replace("]","\\]");r=u._replace(r,"@"+m,c)}}}}catch(h){r=D(e)}return U(r,e,t._partLocaleID,t._partDBNumberFormat,t.cultureName)},parse:function(e){if(!e||e===S._Empty)return n;var t=this,r=e,a=F(r);if("true"===a)return!0;if("false"===a)return!1;if(t._validDateTimeFormatString){var i=l._parseExact(r,t._validDateTimeFormatString,M(t.cultureName));if(i)return i}try{var o=l._DT(r);return o&&!isNaN(o)?o:(o=new Date(r),isNaN(o.valueOf())?r:o)}catch(s){return r}},_fixFormat:function(e){for(var t=e,r="",n=!1,a=0;a<t.length;a++){var i=t[a];if('"'===i)n=!n;else if(!n)if("Y"===i||"D"===i||"S"===i||"E"===i||"G"===i)i=F(i);else if("M"===i){var o=t[a-1];O("A",o,!0)||O("P",o,!0)||(i=F(i))}r+=i}return r},_processAMPM:function(e){for(var t=[te._aMPMTwoDigit,v(this.cultureName).amDesignator+"/"+v(this.cultureName).pmDesignator,te._aMPMSingleDigit],r=["tt","tt","t"],n=0;3>n;n++)if(u._contains(e._value,t[n],1))return e._value=u._replace(e._value,t[n],r[n],!0),!0;return!1},_replace:function(e,n,a,i,o,s,l){if(i||o){var f=[],c=!0;!r(e)&&t(e)&&(c=!1);for(var m=!1,h=0;h<e.length;h++){var y=e[h];if(t(y)?c=!1:r(y)&&(c=!0),i&&O(y,n[0],l)&&c||o&&O(y,n[0],l)&&!c){for(var d=!0,g=0;g<n.length;g++)if(g+h>=e.length||!O(n[g],e[g+h],l)){d=!1;break}var _=h+n.length-1;if(d&&_+1<e.length){var M=e[_],v=-1;for(v=_+1;v<e.length&&O(M,e[v],l);v++);v>_+1&&(h=v,d=!1)}d&&!m&&f.splice(0,0,h)}'"'===y&&(m=!m)}if(s._value=e,f.length>0){for(h=0;h<f.length;h++){var p=f[h];s._value=u._remove(s._value,p,n.length),s._value=u._insert(s._value,p,a)}return!0}return!1}return!1}};function t(e){return u._indexOf(e,te._hoursSingleDigit[0],!0)>-1||u._indexOf(e,te._secondSingleDigit[0],!0)>-1}function r(e){return u._indexOf(e,te._yearTwoDigit[0],!0)>-1||u._indexOf(e,te._daySingleDigit[0],!0)>-1}return e._evaluateFormat=function(e){return R(e,re)},e}(),te={_yearTwoDigit:"yy",_yearSingleDigit:"y",_yearFourDigit:"yyyy",_monthSingleDigit:"m",_monthTwoDigit:"mm",_monthAbbreviation:"mmm",_monthUnabbreviated:"mmmm",_monthJD:"mmmmm",_daySingleDigit:"d",_dayTwoDigit:"dd",_dayWeekDayAbbreviation:"aaa",_dayWeekDayUnabbreviated:"aaaa",_hoursSingleDigit:"h",_hoursTwoDigit:"hh",_minuteSingleDigit:"m",_minuteTwoDigit:"mm",_secondSingleDigit:"s",_secondTwoDigit:"ss",_eraYear:"e",_aMPMTwoDigit:"AM/PM",_aMPMSingleDigit:"A/P",_placeholderMonthJD:"@mmmmm",_defaultAbsoluteTime:new Date(1899,11,30,0,0,0,0)},re=[te._yearSingleDigit,te._yearTwoDigit,te._yearFourDigit,te._monthSingleDigit,te._monthTwoDigit,te._monthAbbreviation,te._monthUnabbreviated,te._monthJD,te._daySingleDigit,te._dayTwoDigit,te._dayWeekDayAbbreviation,te._dayWeekDayUnabbreviated,te._hoursSingleDigit,te._hoursTwoDigit,te._minuteSingleDigit,te._minuteTwoDigit,te._secondSingleDigit,te._secondTwoDigit,"ggg","gg","g","ee","e"],ne=function(){function e(e,t,r,n){var a=this;B.call(a,t,r,n);var i=A(e,!1);t&&(i=T(i,a._partLocaleID._originalToken,a._partLocaleID.currencySymbol())),i=E(i),i=k(i),a._formatString=i,a._formatType=3}return e.prototype={format:function(e){try{var t;t=e instanceof Date?""+l._toOADate(e):D(e);var r=u._replace(this._formatString,'"',"");return r!==n&&r!==a&&(t=u._replace(r,"@",t)),t}catch(i){return""}},parse:function(e){return e?e:""},formatString:function(){return this._formatString}},e}(),ae=function(){function e(e,t,r,a){function i(e,t){var r=[],a='"';if(e===n||""===e)return r;var i=!1,o=[],s=!1,u,l;for(u=0;u<e.length;u++)l=e[u],l!==a||i||(s=!s),i||s||l!==t?o.push(l):(r.push(o.join("")),o=[]),i="\\"===l?!i:!1;return r.push(o.join("")),r}B.call(this,t,r,a);var o=this;o._isGeneralNumber=!1,o._formatType=1,o._fullFormatString=E(e);var s=A(e);t&&(s=T(s,o._partLocaleID._originalToken,o._partLocaleID.currencySymbol())),s=E(s);var u=s.indexOf("/");if(u>-1){var l=i(s,"/");if(l&&2===l.length){o._fractionDenominatorFormat=l[1];var f=l[0];if(f){var c=f.lastIndexOf(" ");c>-1?(o._fractionIntegerFormat=b(f,0,c),o._fractionNumeratorFormat=b(f,c+1,f.length-c-1)):o._fractionNumeratorFormat=f}}}o._numberFormatString=s}e.prototype={formatString:function(){return this._fullFormatString},format:function(e){if(c(e,"boolean"))return(""+e).toUpperCase();var a=this,i=f._toDouble(e);if(isNaN(i)||!isFinite(i)||isNaN(e))return"string"==typeof e?e:n;var o=M(a.cultureName),s,u,l,h,y,d=n;if(a._fractionNumeratorFormat&&a._fractionDenominatorFormat){var g={value:0},_={value:0},v={value:0},p=a._fractionDenominatorFormat.length;if(r(i,p,g,_,v)){var F=t(_.value,v.value);if(F>1&&(_.value/=F,v.value/=F),a._fractionIntegerFormat){d="",1===v.value&&(g.value+=_.value,_.value=0,v.value=0),0!==g.value&&(d+=m._customCultureFormat(g.value,a._encodeNumberFormat(a._fractionIntegerFormat),o),d+=" "),0===g.value&&0>i&&(d+=o.NumberFormat.negativeSign),0===i&&(d+="0"),u=a._fractionDenominatorFormat,l=parseFloat(u),isNaN(l)||l>0&&(_.value*=l/v.value,u="",v.value=l,h=Math.ceil(_.value),y=h-_.value,.5>=y&&y>=0?_.value=parseFloat(""+h):_.value=parseFloat(""+(h-1)));var x=a._fractionNumeratorFormat,b=parseFloat(x);if(!isNaN(b)&&0===b){var D=x.length,S=""+_.value,w=S.length;D>w?x=x.substr(0,D-(D-w)):w>D&&(S=S.substr(0,w-(w-D)),_.value=parseInt(S,10))}return 0!==_.value&&(d+=m._customCultureFormat(_.value,a._encodeNumberFormat(x),o).replace(/^0*/,""),d+="/",d+=m._customCultureFormat(v.value,a._encodeNumberFormat(u),o).replace(/^0*/,"")),""===d?"0":d}d="";var N=g.value*v.value+_.value;return u=a._fractionDenominatorFormat,l=parseFloat(u),l>0?(N*=l/v.value,v.value=l,h=Math.ceil(N),y=h-N,N=.5>=y&&y>=0?parseFloat(""+h):parseFloat(""+(h-1)),d+=N+"/"+v.value):(d+=m._customCultureFormat(N,a._encodeNumberFormat(a._fractionNumeratorFormat),o).replace(/^0*/,""),d+="/",d+=m._customCultureFormat(v.value,a._encodeNumberFormat(a._fractionDenominatorFormat),o).replace(/^0*/,"")),0===N?"0":d}return""+i}return s=m._customCultureFormat(i,a._encodeNumberFormat(a._numberFormatString),o),s=j(s,a._isGeneralNumber,a._partLocaleID,a._partDBNumberFormat,a.cultureName)},parse:function(e){var t=this;if(!e||e===S._Empty)return n;var r=F(e);if("true"===r)return!0;if("false"===r)return!1;e=t._trimSpecialSymbol(e),e=t._trimCurrencySymbol(e);var a=t._trimPercentSign(e),i=a._isPer,o=a._str;if(t._isValidaNumberString(o)){o=u._replaceAllNoReg(o,p(t.cultureName).numberGroupSeparator,"");var s=m._parseFloat(o,t.cultureName);if(!isNaN(s)&&isFinite(s))return i&&(s/=100),s}return n},_isValidaNumberString:function(e){for(var t="",r=0,n=0,a=0,i=!0,o=p(this.cultureName),s=e.length-1;s>-1;s--){if(e[s]===o.numberDecimalSeparator)r++,a>0&&(i=!1),t="";else if("e"===F(e[s]))n++,t="";else if(e[s]===o.numberGroupSeparator)i=3===t.length,a++,t="";else if("-"===e[s]||"+"===e[s]){if(s>0&&"e"!==F(e[s-1]))return!1}else{if(!w._isDigit(e[s]))return!1;t+=e[s]}if(r>1||n>1||!i)return!1}return!0},_encodeNumberFormat:function(e){if(e){for(var t=e.split(""),r="",n=0;n<t.length-1;)"\\"===t[n]?(r+=t[n+1],n+=2):(r+=t[n],n++);n===t.length-1&&"\\"!==t[n]&&(r+=t[n]),e=T(r,"?","0")}return e},_trimSpecialSymbol:function(e){for(var t=e,r=[],a=0;a<t.length;a++)w._isDigit(t[a])&&r.push(a);for(var i=p(this.cultureName),o=[i.currencyDecimalSeparator,i.currencyGroupSeparator,i.currencySymbol,i.nanSymbol,i.negativeInfinitySymbol,i.negativeSign,i.numberDecimalSeparator,i.numberGroupSeparator,i.percentDecimalSeparator,i.percentGroupSeparator,i.percentSymbol,i.perMilleSymbol,i.positiveInfinitySymbol,i.positiveSign],s=t.length-1;s>-1;s--){var l=t[s];if(!w._isWhiteSpace(l)||o.indexOf(""+l)>-1){if("-"===l||"+"===l){var f=s>0?""+t[s-1]:n,c=["e","E","(",p(this.cultureName).currencySymbol];if(c.indexOf(f)<0)break}}else(s<r[0]||r[r.length-1]<s)&&(t=u._remove(t,s,1))}return t},_trimCurrencySymbol:function(e){var t=p(this.cultureName).currencySymbol,r=u._startsWith(e,t)?u._remove(e,0,t.length):e;return r.indexOf(t)<0?r:e},_trimPercentSign:function(e){var t=p(this.cultureName).percentSymbol,r=!0,n=e;return u._startsWith(e,t)?n=u._remove(e,0,t.length):u._endsWith(e,t)?n=u._remove(e,e.length-t.length,t.length):r=!1,u._contains(n,t)&&(r=!1),{_str:n,_isPer:r}}};function t(e,t){if(0===e)return i(t);if(0===t)return i(e);for(var r=Math.max(e,t),n=Math.min(e,t),a=r%n;0!==a;)r=n,n=a,a=r%n;return i(n)}function r(e,t,r,n,a){var o=0,s=0,u=0,l=0,f=Math.ceil;e>0?(l=e-f(e)+1,1===l?(l=0,o=e):o=f(e)-1):0>e&&(o=f(e),l=f(e)-e);var c=Math.pow(10,t-1),m=Math.pow(10,t)-1;2>c&&(c=2),2>m&&(m=2);for(var h=!1,y=0,d=c;m>=d;d++){var g=d*l,_=Math.round(g),M=_/d,v=i(M-l);if((h?v<i(y-l):!0)&&(h=!0,y=M,s=_,u=d,1e-5>v))break}return r.value=o,n.value=s,a.value=u,h}return e}(),ie=function(){function e(e,t,r,n){B.call(this,t,r,n),arguments.length>0?((e.indexOf("0")>=0||e.indexOf("#")>=0||e.indexOf(".")>=0||e.indexOf("@")>=0)&&x(),this._fullFormatString=e):this._fullFormatString="General",this._formatType=0}return e.prototype={_getDigitalFormat:function(){var e=this;if(!e._digitalFormat){var t=e._fullFormatString;t=T(t,"General","##################0.################"),e._digitalFormat=new ae(t,e._partLocaleID,e._partDBNumberFormat,e.cultureName),e._digitalFormat._isGeneralNumber=!0}return e._digitalFormat},_getExponentialDigitalFormat:function(){var e=this;return e._exponentialDigitalFormat||(e._exponentialDigitalFormat=new ae("0.#####E+00",e._partLocaleID,e._partDBNumberFormat,e.cultureName),e._exponentialDigitalFormat._isGeneralNumber=!0),e._exponentialDigitalFormat},formatString:function(){return u._replace(this._fullFormatString,"@NumberFormat","General")},format:function(e){var t=this;if(f._isNumber(e,t.cultureName)){var r=t._partLocaleID?t._partLocaleID.allowScience():!0,o=f._toDouble(e);if(o!==a&&o!==n)return i(o)>99999999999&&r||i(o)<1e-11&&0!==o?t._getExponentialDigitalFormat().format(e):t._getDigitalFormat().format(e)}else{if(c(e,"string")){var s=u._replace(t.formatString(),'"',"");return s=k(s),s?u._replace(s,"General",e):e}if(c(e,"boolean"))return(""+e).toUpperCase()}return""},parse:function(e){if(S._isNullOrEmpty(e))return n;if("number"==typeof e)return e;var t=!1,r=u._indexOf(e,"-");if(r>0&&(O(e.charAt(r-1),"E",!0)||(t=!0)),u._contains(e,"/")||t||u._contains(e,":")||u._contains(e,"-")){var o=l._parseLocale(e);if(o)return o}var s,f="-"===e.charAt(0),m=f?u._remove(e,0,1):e,h="("===m.charAt(0)&&")"===e.charAt(e.length-1);return s=this._getDigitalFormat().parse(m),s!==n&&s!==a?(h||f)&&c(s,"number")?-1*i(s):s:e}},e}(),oe=function(){function e(e,t){var r=this;0===arguments.length?(r.formatCached="General",r._numberFormat=new ie):r._init(e,t)}var t=["colorFormatPart","conditionalFormatPart","dbNumberFormatPart","localeIDFormatPart"];function r(e){if(!e||e===S._Empty)throw Error(_().Exp_TokenIllegal)}function i(e){r(e);var t=H(e);return r(t),t}return e.prototype={_init:function(e,t){e!==n&&e!==a||x();var r=this;r.formatCached=e;for(var o="",s="",u=!1,l=[],f=0;f<e.length;f++){var c=e[f];if("["===c)u&&x(),s&&(o||(o=""),o+=s,s=""),s=""+c,u=!0;else if("]"===c){if(u||x(),s){s+=c;var m=""+s,h=z(""+s);h?"ABSTimeFormatPart"===h.Name?(l.push(new h(i(m),m)),o+=s):r.addPart(h,m):x(),s=""}else x();u=!1}else s+=c}s&&(u?x():o+=s),r.localeIDFormatPart&&(t=r.localeIDFormatPart.cultureInfo().name());var y=$(o),d=y._type,g=y._isDigitalOrText?e:o;d?r._numberFormat=new d(g,r.localeIDFormatPart,r.dbNumberFormatPart,t,l.length>0?l:n):x()},formatString:function(){for(var e=this,r="",n=0,a=t.length;a>n;n++){var i=t[n];e[i]&&(r+=""+e[i])}return r+=e._numberFormat.formatString()},addPart:function(e,r){for(var n=this,a=i(r),o=0,s=t.length;s>o;o++){var u=t[o];if(O(u,e.Name,!0)){if(n[u])throw Error(_().Exp_DuplicatedDescriptor);n[u]=new e(a,r)}}},format:function(e){return this._numberFormat.format(e)},parse:function(e){return this._numberFormat.parse(e)}},e}(),se=function(e){f._inherit(t,e);function t(e,t){var r=this;r._isSingleFormatterInfo=!0,r.PropertyChanged=[],S._isNullOrEmpty(e)&&(e="General"),r.formatCached=e,r.cultureName=t,r.init()}function r(e){var r=t[e];return r||(r=new t(e),t[e]=r),r}return t.prototype={toJSON:function(){var e=this,t={formatCached:e.formatCached};return e.cultureName&&(t.customerCultureName=e.cultureName),"general"===F(e.formatCached)&&delete t.formatCached,t},hasFormatedColor:function(){var e=this;for(var t in N)if(N.hasOwnProperty(t)){var r=e.getFormatter(N[t]);if(r&&r.colorFormatPart)return!0}return!1},formatString:function(e){var t=this;if(0===arguments.length){for(var r=S._Empty,a=0,i=t.formatters.length;i>a;a++){var o=t.formatters[a];r+=o.formatString(),a!==i-1&&(r+=";")}return r}if(!e)throw Error(_().Exp_ValueIsNull);return t.formatters=n,t.formatCached=e,t.init(),t._raisePropertyChanged("formatString"),t},getFormatter:function(e){var t=this;return t.formatters&&t.formatters[e]},getPreferredEditingFormatter:function(e){var t=v(this.cultureName);if(c(e,"DateTime")){var n=0===e.getHours()&&0===e.getMinutes()&&0===e.getSeconds()&&0===e.getMilliseconds()?"":" h:mm:ss";return r(t.shortDatePattern+n)}if(c(e,"TimeSpan"))return r(t.longTimePattern);if(f._isNumber(e,this.cultureName)){var a=f._toDouble(e);return r(a>1e20?"0.##E+00":"###################0.################")}return r("General")},getPreferredDisplayFormatter:function(e,a){var i=this;if(a||(a={value:n}),a.value=n,S._isNullOrEmpty(e))return new t;var o=e,s=a.value=i.parse(o);if(c(s,"DateTime")||c(s,"TimeSpan"))for(var m=G(),h=m.pattern,y=m.formatter,d=0;d<h.length;d++)for(var g=h[d],_=0;_<g.length;_++){var M=g[_],v=l._parseLocale(e,M);if(v&&v-s===0)return new t(y[d])}else if(f._isNumber(s,i.cultureName)){var F=p(i.cultureName),x=F.currencySymbol,b=F.numberDecimalSeparator,D=F.percentSymbol,w=F.numberGroupSeparator,N="E",C=u._contains,I=C(o,b),P=I?".00":"";if(o[0]===x)return r(S._format("{0}#,##0{1};[Red]({0}#,##0{1})",x,P));if(C(o,N,1))return r("0.00E+00");if(""+o[0]===D||""+o[o.length-1]===D)return r(S._format("0{0}%",P));if(C(o,w))return r(S._format("#,##0{0}",P))}return r("General")},format:function(e,t){if(c(e,"boolean"))return(""+e).toUpperCase();var r=this._getFormatInfo(e);if(r){var o=r.colorFormatPart;t&&o&&(t.value=o.foreColor);var s=0,u=f._isNumber(e,self.cultureName);u&&(s=f._toDouble(e));var l=S._Empty;if(u&&r===this.getFormatter(N._negative))l=r.format(i(s)),r&&r.conditionalFormatPart&&r.conditionalFormatPart.value>0&&0>s&&(l="-"+l);else try{l=r.format(e)}catch(m){c(e,"string")&&(l=""+e)}return l}return u&&0>s?"-":c(e,"string")?""+e:e===a||e===n?S._Empty:""+e},parse:function(e){var t=this;return t.formatters&&t.formatters.length>0?t.formatters[0].parse(e):n},init:function(){var e=this,t=e.formatCached;S._isNullOrEmpty(t)&&x(),e.formatters=[];var r=t.split(";");e._isSingleFormatterInfo=1===r.length,(!r||r.length<1||r.length>4)&&x();for(var n=0;n<r.length;n++){var a=new oe(r[n],e.cultureName);a&&e.formatters.push(a)}e.getFormatter(N._positive)||x()},_getFormatInfo:function(e){var t=this,r=t.getFormatter(N._positive),a=t.getFormatter(N._text);if("string"==typeof e&&isNaN(e))return a?a:r;if(f._isNumber(e,t.cultureName)||c(e,"boolean")){var i=t.getFormatter(N._negative),o=t.getFormatter(N._zero),s=f._toDouble(e),u=r&&r.conditionalFormatPart,l=u&&r.conditionalFormatPart.isMeetCondition(s),m=i&&i.conditionalFormatPart,h=m&&i.conditionalFormatPart.isMeetCondition(s),y;return t._isSingleFormatterInfo||(u?l:s>0)||0===s&&!t.getFormatter(N._zero)?y=r:(m?h:0>s)?y=i:o?y=o:i&&(y=i),y}return n},_raisePropertyChanged:function(e){var t=this;if(t.PropertyChanged)for(var r=0;r<t.PropertyChanged.length;r++){var n=t.PropertyChanged[r];"function"==typeof n&&n(t,e)}}},t}(Q);o.GeneralFormatter=se,o.FormatterBase=Q,e.exports=o},function(e,t){e.exports={Exp_TokenIsNull:"token is null",Exp_InvalidBackslash:"the '\\' cannot be evaluated",Exp_FormatIllegal:"format is illegal.",Exp_ValueIsNull:"value is null",Exp_DuplicatedDescriptor:"The type of descriptor was added.",Exp_TokenIllegal:"token is illegal.",Exp_ValueIllegal:"value is illegal.",Exp_InvalidCast:"InvalidCastException"}},function(e,t,r){e.exports=r(20)},function(e,t,r){var n=r(1),a=n._Types._isNullOrUndefined,i=n._ColorHelper,o=i._getLighterColor,s=i._fromString,u=n._ArrayHelper,l=u._indexOf,t={},f=t.__invalidValuePlaceHolder={},c=null,m=void 0,h=Math.floor,y=Math.PI,d=Math.sin,g=Math.cos,_=Math.min,M=Math.max,v=Math.round,p=Math.pow,F=Math.sqrt,x=Math.abs,b=Math.ceil,D="undefined",S="string",w=isNaN,N=parseFloat,C=Number.MAX_VALUE,I="#969696",P="#CB0000",E="#646464",H="#DCDCDC",T="white",k="black",O="blue",A="green",R="red",L="left",G="right",B="center",W="top",z="bottom",$="middle",V="px Arial";function Y(e,t){this.x=e,this.y=t}function U(e,t,r,n){var a=this;a.x=e,a.y=t,a.width=r,a.height=n}function j(e,t){for(var r=e[0],n=r&&r.value?r.value:r,a,i=1,o=e.length;o>i;i++)r=e[i],a=r&&r.value?r.value:r,n=(t?n>a:a>n)?a:n;return n}function K(e,t,r,n,a,i,o){i&&(e.strokeStyle=i),o&&(e.lineWidth=o),e.beginPath(),e.moveTo(t,r),e.lineTo(n,a),e.stroke()}function J(e,t,r,n,a,i,o,s,u,l,f,c){t?K(e,r,n,a,i,f,c):K(e,o,s,u,l,f,c)}function X(e){return i._getBrightness(e)<127.5?T:k}function q(e,t,r,n,a,i,o){var s={};return o?(s.left=t+a+i,s.width=n-2*a,s.top=e+a,s.height=r-2*a):(s.left=e+a,s.width=r-2*a,s.top=t+a,s.height=n-2*a),s}function Z(e,t){for(var r=0,n=0,a=e.length;a>n;n++)r+=t&&!t(e[n])?0:e[n];return r}function Q(e,t,r,n){for(var a=[],i,o=0,s=0,u=e.length;u>o;o++)t?t(e[o])?a[s++]=r?r(e[o]):e[o]:a[s++]=0:(i=N(e[o]),!w(i)&&isFinite(i)&&(a[s++]=i));return n&&n(a),a}function ee(e,t,r,n,a,i){var o=v(t+n),s=v(r+a);t=v(t),r=v(r),n=v(o-t),a=v(s-r),e.beginPath(),e.fillStyle=i,e.fillRect(t,r,n,a),e.fill()}function te(e,t,r){return e=_(e,t),e=M(e,r)}function re(e,t,r,n,a){e.save(),e.rect(t,r,n,a),e.clip()}function ne(e,t,r,n,i,o){var s=r+i/2,u=n+o/2,l=5,f=_(i,o)/2-l,c=-.5*y,m,h=s+f*g(c),M=u+f*d(c),v=[],p=[];if(!(0>=f)){var F=Q(t.values,function(e){return!a(e)&&!w(e)&&isFinite(e)},function(e){return x(e)},function(e){1===e.length&&(e[1]=1-e[0])}),b=F.length,D=ae(b,t.colors),S=Z(F),N;for(e.save(),N=0;b>N;N++)m=c+F[N]/S*2*y,e.beginPath(),e.moveTo(s,u),e.lineTo(h,M),e.arc(s,u,f,c,m,!1),e.lineTo(s,u),e.fillStyle=D[N],e.fill(),v.push(h),p.push(M),c=m,h=s+f*g(c),M=u+f*d(c);for(N=0;b>N;N++)K(e,s,u,v[N],p[N],T);e.restore()}}function ae(e,t){var r=[],n=t.length;if(n>=e)r=t.slice(0,e);else{0===n?(r.push("darkgray"),n=1):r=t.slice(0);var a=[],o,u=e-n+1,l;for(l=0;n>l;l++)a[l]=s(r[l]);for(l=n;e>l;l++){o=a[l%n];for(var f in o)if(o.hasOwnProperty(f)){var c=o[f];o[f]=h(c-c/u*(l/n))}o.a=255,r[l]=i._toString(o)}}return r}function ie(e,t,r){this.x=e,this.y=t,this.value=r}function oe(e,t,r,n,i,o){e.save();var s=t.points,u=t.mini,l=t.maxi,f=t.line1,m=t.line2,h=t.colorPositive,y=t.colorNegative,d=5,g,p,F,x,b,S,N,C,I,E;s=Q(s,function(e){return!a(e)&&!w(e)&&isFinite(e)}),h=a(h)?"#787878":h,y=a(y)?P:y;var H=j(s,!1);l=a(l)?H:l,p=M(l,H);var T=j(s,!0);u=a(u)?T:u,g=_(u,T),g=g>0?0:g,p=0>p?0:p,F=0,F=F>p?p:F,F=g>F?g-1:F,x=s.length;var k=q(r,n,i,o,d);b=k.left,S=k.top,N=k.width,C=k.height,I=N/(x-1),E=(p-g)/C;for(var A=[],R,L,G,B,W=S+(p-F)/E,z,$,V=0;x>V;V++)R=s[V],z=b+I*V,$=S+(p-R)/E,0===V&&A.push(new ie(z,W,F)),V>0&&R*s[V-1]<0&&(G=A[A.length-1],G&&(B=se(G.x,G.y,z,$,W),A.push(new ie(B,W,F)))),A.push(new ie(z,$,R)),V===x-1&&A.push(new ie(z,W,F));e.beginPath();for(var Y=0,U=A.length;U>Y;Y++)L=A[Y],L&&(e.lineTo(L.x,L.y),G=A[Y-1],L.value===F&&G&&(e.fillStyle=G.value>F?h:y,e.fill(),Y!==U-1&&(e.beginPath(),e.lineTo(L.x,L.y))));J(f),J(m),e.restore();function J(t){if(t!==c||typeof t===D){var r=te(t,p,g),n=0!==E?(p-r)/E:C/2,a=v(S+n)-.5;K(e,b,a,b+N,a,O)}}}function se(e,t,r,n,a){return((t-a)*r+(a-n)*e)/(t-n)}function ue(e,t,r,n,i,o){var s=t.points1,u=t.points2,l=t.minX,f=t.maxX,c=t.minY,m=t.maxY,h=t.hLine,d=t.vLine,g=t.xMinZone,p=t.xMaxZone,F=t.yMinZone,x=t.yMaxZone,b=t.tags,D=t.drawSymbol,S=t.drawLines,w=t.color1,N=t.color2,E=t.dash,T=4,k,O,A,R,L,G,B,W,z,$,V,Y,U,j,K,J,X,Z,Q,te,ne,ae,ie=q(r,n,i,o,5),oe=ie.left,se=ie.top,ue=ie.width,fe=ie.height;if(s&&!(s.length<=0)&&(k=me(s),!(k.length<=0||u&&u.length>0&&(O=me(u),O.length<=0)))){if(re(e,r,n,i,o),e.beginPath(),D=a(D)?!0:D,w=a(w)?I:w,N=a(N)?P:N,Me(k,c,m,l,f),!a(g)&&!a(p)&&!a(F)&&!a(x)&&g>=L&&G>=g&&p>=L&&G>=p&&F>=A&&R>=F&&x>=A&&R>=x){var he=M(L,g),ye=_(G,p),de=M(A,F),ge=_(R,x);he>=ye&&(ye=he+1),de>=ge&&(ge=de+1),ee(e,oe+(he-L)*ue/(G-L),se+(R-ge)*fe/(R-A),(ye-he)*ue/(G-L),(ge-de)*fe/(R-A),H)}for(Z=-C,Q=-C,te=C,ne=C,B=0,z=k.length;z-1>B;B++)_e(k,B,w,pe),b&&(0===B&&(K>Q&&(Z=j,Q=K),ne>K&&(te=j,ne=K)),X>Q&&(Z=J,Q=X),ne>X&&(te=J,ne=X));if(u&&u.length>0)for(Me(O,A,R,L,G),B=0,z=O.length;z-1>B;B++)_e(O,B,N,Fe);b&&(ve(Z,Q,P),ve(te,ne,"#0000FF")),a(h)||h>=A&&R>=h&&(ae=v(se+(R-h)*fe/(R-A))-.5,ce(e,oe,ae,oe+ue,ae,P)),a(d)||d>=L&&G>=d&&(ae=v(oe+(d-L)*ue/(G-L))-.5,ce(e,ae,se,ae,se+fe,P));function _e(t,r,n,a){W=t[r],$=W.x,V=W.y,W=t[r+1],Y=W.x,U=W.y,j=oe+($-L)*ue/(G-L),J=oe+(Y-L)*ue/(G-L),K=se+(R-V)*fe/(R-A),X=se+(R-U)*fe/(R-A),S&&ce(e,j,K,J,X,n,E),D&&(0===r&&a(j,K),a(J,X))}function Me(e,t,r,n,i){var o=le(e,!0),s=le(e,!1);A=a(c)?o.y:t,R=a(m)?s.y:r,L=a(l)?o.x:n,G=a(f)?s.x:i,G=L>=G?L+1:G,R=A>=R?A+1:R}function ve(t,r,n){e.beginPath(),e.arc(t-T/2,r-T/2,T/2,0,2*y,!1),e.fillStyle=n,e.fill()}function pe(t,r){e.beginPath(),e.strokeStyle=w,e.arc(t-T/2,r-T/2,T/2,0,2*y,!1),e.stroke()}function Fe(t,r){e.beginPath(),e.strokeStyle=N,e.strokeRect(t-T/2,r-T/2,T,T)}e.restore()}}function le(e,t){for(var r=t?1:-1,n=t?_:M,a=new Y(r*C,r*C),i=e.length,o,s=0;i>s;s++)o=e[s],a.x=n(a.x,o.x),a.y=n(a.y,o.y);return a}function fe(e,t,r,n){return r/n*(t-e)+e}function ce(e,t,r,n,a,i,o){if(o){var s=F(p(n-t,2)+p(a-r,2)),u=0,l=6,f=2,c=4,m=[],h,y,d,g;n>=t?(h=t,y=n,d=t,g=r):(h=n,y=t,d=n,g=a);var _=(a-r)/(n-t),M=r-_*t;m.push(new Y(d,g));for(var v=[l,c,f,c];s>u;)for(var x=0,b=v.length;b>x;x++)u+=v[x],s>=u&&(d=fe(h,y,u,s),g=_*d+M,m.push(new Y(d,g)));for(var D=0,S=m.length;S-1>D;D+=2)K(e,m[D].x,m[D].y,m[D+1].x,m[D+1].y,i)}else K(e,t,r,n,a,i)}function me(e){var t=[],r,n;if(r=e.length,r>0)if(n=e[0].length,n>r){if(r>=2)for(var a=0;n>a;a++)t.push(new Y(e[0][a],e[1][a]))}else if(n>=2)for(var i=0;r>i;i++)t.push(new Y(e[i][0],e[i][1]));return t}function he(e,t,r,n,i,s){var u=t.measure,l=t.target,f=t.maxi,c=t.good,m=t.bad,y=t.forecast,d=t.tickUnit,g=t.colorScheme,_=t.vertical,M=5;if(!(a(f)||0>f)){u=a(u)||0>u?0:u,c=a(c)||0>c?0:c,m=a(m)||0>m?0:m,l=a(l)?0:l,y=a(y)?0:y,d=a(d)?0:d,g=a(g)?"#A0A0A0":g;var p="#252525";u>f&&(u=f,p=P),c>f&&(c=f,p=P),m>f&&(m=f,p=P),l>f&&(l=0,p=P),y>f&&(y=f,p=P);var F=q(r,n,i,s,M,s-2*M,_),x=F.left,b=F.width;if(e.save(),H(o(g,1.66),1,1,.2,.6),H(o(g,1.33),c,f,.2,.6),H(g,m,f,.2,.6),H(p,u,f,.375,.25),y>0){var D=x,S=b*(y/f);S>b&&(S=b),J(e,_,r+.5*i,D,r+.5*i,D-S,D,n+.5*s,D+S,n+.5*s,"#3690BF",3)}if(l>0){var w=v(x-(_?1:-1)*b*(l/f))-.5;J(e,_,r+.2*i,w,r+.8*i,w,w,n+.2*s,w,n+.8*s,P,1)}if(d>0)for(var N=h(f/d),C,I=0;N>=I;I++)C=v(x-(_?1:-1)*(b/f*d)*I)-.5,J(e,_,r,C,r+.05*i,C,C,n+s,C,n+.95*s,E,1);e.restore();function H(t,a,o,u,l){e.fillStyle=t;var f=x,c=b*(a/o);c>b&&(c=b);var m=_?new U(r+i*u,f-c,i*l,c):new U(f,n+s*u,c,s*l);e.fillRect(m.x,m.y,m.width,m.height)}}}function ye(e,t,r,n,i,o){var s=t.spreadData,u=t.showAverage,l=t.scaleStart,f=t.scaleEnd,c=t.style,m=t.colorScheme,h=t.vertical,y=5,d=s.length;if(!(0>=d)){var g=s[0].key,p=s[d-1].key;l=a(l)?g:l,f=a(f)?p:f,c=a(c)?4:c,m=a(m)?E:m;var F=q(r,n,i,o,y,o-2*y,h),x=F.left,b=F.width,D=F.top,S=F.height;re(e,r,n,i,o),e.beginPath(),e.strokeStyle=m,e.fillStyle=m,e.lineWidth=2;for(var w,N,C=j(s,!1),I,H=0,T=s.length;T>H;H++){var k=s[H],O=k.key,A=k.value;if(w=x+(h?-1:1)*b*(O-l)/(f-l),h?(w=_(w,x),w=M(w,x-b)):(w=M(w,x),w=_(w,x+b)),w=v(w),1===c){I=A/2*S/C,I=.5>I?.5:I;var R=D+S/2-I,L=D+S/2+I;J(e,h,R,w,L,w,w,R,w,L)}else if(4===c)I=A*S/C,I=1>I?1:I,J(e,h,D,w,D+I,w,w,D+S,w,D+S-I);else if(6===c)J(e,h,D,w,D+S,w,w,D,w,D+S);else{var G=2,B;3===c&&(B=de(A,S,G+1,k.randomNumbers));for(var W=1;A>=W;W++){switch(c){case 2:N=D+S/2-y-(A/2-W)*S/C;break;case 3:N=D+S-y-B[W-1];break;case 5:default:N=D+S-W*S/C}N=v(N),e.beginPath(),e.fillRect(h?N:w,h?w:N,G,G)}}}if(u){var z=ge(s);w=x-(h?1:-1)*b*(z-l)/(f-l),J(e,h,D-y,w,D+S+y,w,w,D-y,w,D+S+y,P)}e.restore()}}function de(e,t,r,n){for(var a=[],i=M(100,10*e),o=0,s=[],u=0;a.length<e;){var l=h(n[u++]*t);(o>i||_e(l,s))&&(a.push(l),s.push([l-r,l+r])),o++}return a}function ge(e){for(var t=0,r=0,n=0,a=e.length;a>n;n++){var i=e[n];r+=i.value,t+=i.key*i.value}return 0===r?0:t/r}function _e(e,t){for(var r=0,n=t.length;n>r;r++){var a=t[r];if(a[0]<=e&&e<=a[1])return!1}return!0}function Me(e,t,r,n,i,s,u){var l,f=t.points,c=t.colorRange,m=t.labelRange,h=t.maximum,y=t.targetRed,d=t.targetGreen,g=t.targetBlue,_=t.targetYellow,M=t.color,p=t.highlightPosition,F=t.vertical,x=t.textOrientation,b=t.textSize,D=5;if(!(a(f)||(l=f.length)<=0)){if(M=a(M)?E:M,a(c)||c.length!==l||ve(c)){c=[];for(var S=0;l>S;S++)c.push(o(M,1+S/l))}var N=Z(f,function(e){return e>0});h=a(h)||N>h?N:h,x=a(x)?0:x,b=a(b)||0>=b?10:b,b=w(b)?b:b*u.zoomFactor;var C=q(r,n,i,s,D,s-2*D,F),I=C.left,H=C.width,T=C.top,k=C.height;e.save();for(var L=I,G,W,z,Y,U,j,J=0,Q=l;Q>J;J++)if(j=f[J],!(0>=j)){G=j/h*H,F?(W=r+.15*i,Y=.7*i,z=L-G,U=G):(W=L,Y=G,z=n+.15*s,U=.7*s);var ee=J+1===p?P:c[J];e.fillStyle=ee,e.beginPath(),e.fillRect(W,z,Y,U);var te=m&&m[J];te&&(e.save(),e.fillStyle=X(ee),e.textBaseline=$,e.textAlign=B,e.font=b+V,e.rect(W,z,Y,U),e.clip(),e.beginPath(),1===x?(e.translate(W+Y/2,z),e.rotate(Math.PI/2),e.fillText(te,U/2,0)):e.fillText(te,W+Y/2,z+U/2),e.restore()),L+=(F?-1:1)*G}re(R,y,function(e){return e>0}),re(A,d),re(O,g),re("yellow",_),e.restore();function re(t,r,n){if(r=r>h?h:r,!n||n(r)){r=0>r?0:r;var a,i=r/h*H;F?(a=v(I-i)-.5,K(e,T,a,T+k,a,t)):(a=v(I+i)-.5,K(e,a,T,a,T+k,t))}}}}function ve(e){for(var t=0,r=e.length;r>t;t++)if(a(e[t]))return!0;return!1}function pe(e,t,r,n,i,o){K(e,be(t),be(r),be(n),be(i),a(o)?k:o,1)}function Fe(e,t,r,n,a){var i=.4*n;t=be(t),r=be(r),e.beginPath(),e.moveTo(t,r);var o=i/2,s=F(3)*i/2,u=i/F(3),l,f;switch(a){case 0:l=[-o,0,o],f=[s,u,s];break;case 2:l=[-o,0,o],f=[-s,-u,-s];break;case 3:l=[s,u,s],f=[-o,0,o];break;case 1:l=[-s,-u,-s],f=[-o,0,o]}l.forEach(function(n,a){e.lineTo(be(t+n),be(r+f[a]))}),e.lineTo(t,r),e.closePath(),e.fillStyle=T,e.fill()}function xe(e,t,r,n,i,o,s){var u=r.value,l=r.colorScheme,f=5,c=5,m=.7,h=!1,y,d,g,_,M,v;if(u=N(u),!w(u)){if(u>1?(u=1,h=!0):-1>u&&(u=-1,h=!0),l=a(l)?"grey":l,t.save(),0===e){var p=o-2*f,F=s*m;if(u>=0)h&&(y=new Y(n+f+p-c,i+s/2)),d=new U(n+f,i+s*(1-m)/2,p*u,F),g=new Y(n+f,i+1),_=new Y(n+f,i+s),M=1;else{var b=x(p*u);h&&(y=new Y(n+f+c,i+s/2)),d=new U(n+o-f-b,i+s*(1-m)/2,b,F),g=new Y(n+o-f,i+1),_=new Y(n+o-f,i+s),M=3}v=s}else if(1===e){var D=s-2*f,S=o*m;if(u>=0){var C=D*u;d=new U(n+(1-m)/2*o,i+s-f-C,S,C),h&&(y=new Y(n+o/2,i+s-f-C+c),M=0),g=new Y(n+1,i+s-f),_=new Y(n+o,i+s-f)}else u=x(u),d=new U(n+(1-m)/2*o,i+f,S,D*u),h&&(y=new Y(n+o/2,i+f+D-c),M=2),g=new Y(n+1,i+f),_=new Y(n+o,i+f);v=o}t.beginPath(),ee(t,d.x,d.y,d.width,d.height,l),re(t,d.x,d.y,d.width,d.height),y&&Fe(t,y.x,y.y,v,M),t.restore(),pe(t,g.x,g.y,_.x,_.y),t.restore()}}function be(e){return v(e)-.5}function De(e,t,r,n,a,i){xe(0,e,t,r,n,a,i)}function Se(e,t,r,n,a,i){xe(1,e,t,r,n,a,i)}function we(e,t,r,n,i,o,s){var u=t.variance,l=t.reference,f=t.mini,c=t.maxi,m=t.mark,h=t.tickUnit,y=t.legend,d=t.colorPositive,g=t.colorNegative,_=t.vertical,M,v,p,b,D,S,C,E=.5,H=.5-E/2,T,O=5,Y=P,U=I,j=13*s.zoomFactor;if(u=N(u),!w(u)){if(g=a(g)?R:g,d=a(d)?A:d,h=a(h)?0:h,c=a(c)?1:c,f=a(f)?-1:f,C=!a(l),C||(l=0),_?(M=n+o-O,v=o-2*O,p=i-4*O,b=-1):(M=r+O,v=i-2*O,p=o-4*O,b=1),y){var K=N(t.variance);if(!w(K)){var J=""+K,q=J.substr(J.indexOf(".")+1).length;D=q>=2?(100*K).toFixed(q-2)+"%":(100*K).toFixed(0)+"%"}}u>c&&(u=c,T=!0),f>u&&(u=f,T=!0),l=te(l,c,f),T&&(S=te(p,60,15));var Z=x(c-f),Q=v/Z,ne=M+b*x(f-l)*Q,ae=x(u-l)*Q;ae>x(Z)*Q&&(ae=x(Z+f)*Q);var ie=M+b*v;if(!(_&&ie>ne||!_&&ne>ie)){if(re(e,r,n,i,o),u>l?ce(d,0,O-v,v-O,0,1,n-ne,z,W,ne-r-i,L,G,-1,x(c-u)*Q):(ae>x(Z)*Q&&(ae=x(Z+f)*Q,ne=M),ce(g,1,-O,O,2,3,ne-n-o,W,z,r-ne,G,L,1,x(f-u)*Q)),C){var oe=M+b*(Math.abs(f-l)*Q);he(r,oe,r+i,oe,oe,n,oe,n+o)}if(h>0){e.beginPath();for(var se=Z/h,ue=0;se>=ue;ue++){var le=M+v/se*ue*b;he(r,le,r+.1*i,le,le,n+.9*o,le,n+o,U,U)}}if(!a(m)&&m>=f&&c>=m){e.beginPath();var fe=M-(_?1:-1)*x(f-m)*Q;he(r,fe,r+.33*i,fe,fe,n+.66*o,fe,n+o,Y,Y),e.fill()}e.restore();function ce(t,a,s,u,l,f,c,m,h,d,g,v,p,x){var b,w,N,C;if(_?(b=r+H*i,w=0===a?ne-ae:ne,N=i*E,C=ae,ee(e,b,w,N,C,t)):(b=0===a?ne:ne-ae,w=n+H*o,N=ae,C=o*E,ee(e,b,w,N,C,t)),T&&(re(e,b,w,N,C),_?Fe(e,r+i/2,M+s,S,l):Fe(e,M+u,n+o/2,S,f),e.restore()),y){var I,P=0;T&&(P=.4*S*F(3)/2+O+2),e.save(),e.beginPath(),e.font=j+V,e.fillStyle=k,_?(e.textAlign=B,I=j+ae+c,me(I,x,t,m,h,b,w,N,C,_),e.fillText(D,r+i/2,ne+p*(ae-P))):(e.textBaseline=$,I=e.measureText(D).width+ae+d,me(I,x,t,g,v,b,w,N,C,_),e.fillText(D,ne+p*(P-ae),n+o/2)),e.restore()}}function me(t,r,n,a,i,o,s,u,l,f){f?e.textBaseline=a:e.textAlign=a,t>0&&ae>r&&(e.rect(o,s,u,l),e.clip(),f?e.textBaseline=i:e.textAlign=i,e.fillStyle=X(n))}function he(t,r,n,a,i,o,s,u,l,f){_?pe(e,t,r,n,a,l):pe(e,i,o,s,u,f)}}}}var Ne="7ns",Ce="5ns",Ie="tukey",Pe="bowley",Ee="sigma3";function He(e,t,r,n,i,o){var s=t.points,u=t.boxPlotClass,l=t.showAverage,f=t.scaleStart,m=t.scaleEnd,h=t.acceptableStart,y=t.acceptableEnd,d=t.style,g=t.colorScheme,v=t.vertical,p=5,F=j(s,!1),b=j(s,!0);if(!(a(s)||(s=Q(s),s.length<=0))){u=u===c||typeof u!==S?Ce:u.toLocaleLowerCase(),u!==Ce&&u!==Ne&&u!==Ie&&u!==Pe&&u!==Ee&&(u=Ce),f=N(f),f=w(f)?b:f,m=N(m),m=w(m)?F:m,h=N(h),y=N(y),g!==c&&typeof g===S||(g="#D2D2D2"),(d===c||0!==d&&1!==d)&&(d=0);var D=P;f>b&&(g=D,f=b),F>m&&(g=D,m=F),re(e,r,n,i,o),e.lineWidth=2;for(var C=q(r,n,i,o,p,o-2*p,v),H=C.left,T=C.width,k=C.top,O=C.height,A=v?-1:1,R=t.perc02,L=t.perc09,G=t.perc10,B=t.perc90,W=t.perc91,z=t.perc98,$=t.q1,V=t.q3,Y=V-$,U=b,K=F,X=1.5*Y,te=1.5*Y,ne=t.stDev,ae=Z(s)/M(1,s.length),ie=0,oe=0,se=k+.1*O,ue=.7*O,le=x(m-f),fe=0,ce=s.length;ce>fe;fe++){var me=s[fe];$>me&&me>=$-1.5*Y&&X>me-($-1.5*Y)&&(X=me-($-1.5*Y),U=me),me>V&&V+1.5*Y>=me&&te>V+1.5*Y-me&&(te=V+1.5*Y-me,K=me);var he=!1;ie=H+A*(T*((me-f)/le)),u===Ie&&($-1.5*Y>=me||me>=V+1.5*Y)&&(he=!0,oe=$-3*Y>=me||me>=V+3*Y?0:1),u===Ne&&(R>=me||me>=z)&&(he=!0,oe=1),u===Ee&&(ae-2*ne>=me||me>=ae+2*ne)&&(he=!0,oe=ae-3*ne>=me||me>=ae+3*ne?0:1);var ye=I;if(he)if(1===d)1===oe?Be(.2,.8,ie,ye):Be(.3,.7,ie,ye);else{var de=.1*O;2>de&&(de=2),e.beginPath(),e.strokeStyle=ye;var ge=k+.45*O,_e=ie;e.arc(v?ge:_e,v?_e:ge,de/2,0,2*Math.PI),e.stroke()}}if((f>h||y>m)&&(g="#C0FF00"),h=M(f,h),y=_(m,y),h>y)g=D;else if(y>h){var Me=H+A*(T*((h-f)/le)),ve=H+A*(T*((y-f)/le)),pe=k+.9*O;J(e,v,pe,Me,pe,ve,Me,pe,ve,pe,E)}var Fe=H+A*(T*(($-f)/le)),xe=x(H+A*(T*((V-f)/le))-Fe),be=t.median,De=H+A*(T*((be-f)/le)),Se,we,He,Te;switch(u){case Ne:He=R,Te=z;break;case Ie:He=U,Te=K;break;case Ee:Fe=H+A*(T*((ae-ne-f)/le)),xe=x(H+A*(T*((ae+ne-f)/le))-Fe),De=H+A*(T*((ae-f)/le));var ke=ae-2*ne;He=ke>f?ke:b,ke=ae+2*ne,Te=m>ke?ke:F,l=!1;break;case Ce:case Pe:default:He=b,Te=F}Se=H+A*(T*((He-f)/le)),we=H+A*(T*((Te-f)/le));var Oe=I;if(1===d)Ge("#F2F2F2",se,we,ue,Se-we,Se,se,we-Se,ue);else{var Ae=k+.45*O;J(e,v,Ae,Se,Ae,we,Se,Ae,we,Ae,Oe)}if(Ge(g,se,Fe-xe,ue,xe,Fe,se,xe,ue),J(e,v,se,De,se+ue,De,De,se,De,se+ue,Oe),0===d&&(J(e,v,se+.3*ue,we,se+.7*ue,we,we,se+.3*ue,we,se+.7*ue,Oe),J(e,v,se+.3*ue,Se,se+.7*ue,Se,Se,se+.3*ue,Se,se+.7*ue,Oe)),u===Ne||u===Pe){var Re,Le;u===Ne?(He=L,Te=W):(He=G,Te=B),Re=H+A*(T*((He-f)/le)),Le=H+A*(T*((Te-f)/le)),Be(.3,.7,Le,Oe),Be(.3,.7,Re,Oe)}l&&(ie=H+A*(T*((ae-f)/le)),Be(.2,.8,ie,D)),
  4. e.restore();function Ge(t,r,n,a,i,o,s,u,l){v?ee(e,r,n,a,i,t):ee(e,o,s,u,l,t)}function Be(t,r,n,a){J(e,v,se+ue*t,n,se+ue*r,n,n,se+ue*t,n,se+ue*r,a)}}}function Te(e,t,r,n,a){t=v(t),r=v(r),n=v(n),a=v(a),t===n&&(n-=.5,t=n),r===a&&(a-=.5,r=a),e.moveTo(t,r),e.lineTo(n,a)}function ke(e,t,r,n,a,i,o,s,u,l,f){e.beginPath(),e.strokeStyle=r,t?Te(e,n,a,i,o):Te(e,s,u,l,f),e.stroke()}function Oe(e,t,r,n,a,i){var o=i.labelText,s=i.fontSize,u=i.startBox,l=i.endBox,f=i.boxColor,c=i.isInRightOrTopOfBox;e.save(),e.beginPath(),e.font=s+V;var m,h,y,d=1,g,_,M=k;if(i.vertical)g=B,c?(m=s+l-(u-r),m>0&&l>u-l-r?(_=W,M=X(f),y=u-l+d,p(e,t,u-l,n,l)):(_=z,y=u-l-d)):(m=s-(r+a-u),m>0&&l>r+a-u?(p(e,t,u-l,n,l),_=z,M=X(f),y=u-d):(_=W,y=u+d)),e.textAlign=g,e.textBaseline=_,e.fillStyle=M,e.fillText(o,t+n/2,y);else{_=$;var v=e.measureText(o);c?(m=v.width+l-(t+n-u),m>0&&l>t+n-(u+l)?(p(e,u,r,l,a),g=G,M=X(f),h=u+l-d):(g=L,h=u+l+d)):(m=v.width-(u-t),m>0&&l>u-t?(p(e,u,r,l,a),h=u+d,g=L,M=X(f)):(g=G,h=u-d)),e.textAlign=g,e.textBaseline=_,e.fillStyle=M,e.fillText(o,h,r+a/2)}e.restore();function p(e,t,r,n,a){e.rect(t,r,n,a),e.clip()}}function Ae(e,t,r,n,i,s,u){var l=t.points,f=t.labels,m=t.pointIndex,h=t.minimum,y=t.maximum,d=t.colorPositive,g=t.colorNegative,v=t.vertical,p=5,F=13*u.zoomFactor;if(!a(l)){var b=l.length;if(!(0>=b||(m=parseInt(m),w(m)||0>=m||m>b))){f=a(f)?[]:f,d!==c&&typeof d===S||(d="#8CBF64"),g!==c&&typeof g===S||(g="#D6604D");for(var D=d,C=o(d,1.3),I=g,P=o(g,1.3),E=1,T=0,O=0,A=0,R=0,L=[],G=0,B=0,W=l.length;W>B;B++){var z=l[B];L[E]=[];var $=L[E];w(z)?($[0]=0,$[1]=T,$[2]=0):($[0]=x(z),T=z+T,$[1]=z>0?O:T,$[2]=z),$[3]=E,A=_(O,A),R=M(O,R),E===b&&(G=0>A?-A:0,$[1]=z>0?0:z),O=z+O,E++}T-=z;var V,Y;h=N(h),w(h)||h>0||h>A?(V=A,h=A):(V=h,G=-h),y=N(y),w(y)||0>y||R>y?Y=R:(Y=y,G=-h);var U=q(r,n,i,s,p,s-2*p,v),j=U.left,K=U.width,J=U.top,X=U.height,Z=v?-1:1,Q=Y-V,te=K/Q;re(e,r,n,i,s),e.beginPath(),e.lineWidth=1;var ne=L[m],ae=ne[2],ie=j+Z*(ne[1]+G)*te,oe=ne[0]*te,se;if(se=1===m||m===b?ae>=0?D:I:ae>=0?C:P,v?ee(e,J,ie-oe,X,oe,se):ee(e,ie,J,oe,X,se),v){if(1!==m)if(m!==b)ke(e,ae>0,H,r,ie,J+X,ie,r,ie-oe,J+X,ie-oe);else{var ue=j-(T+G)*te;ke(e,!0,H,r,ue,J+X,ue)}m!==b&&ke(e,ae>0,H,J,ie-oe,r+i,ie-oe,J,ie,r+i,ie)}else{if(1!==m)if(m!==b)ke(e,ae>0,H,ie,n,ie,J+X,ie+oe,n,ie+oe,J+X);else{var le=j+(T+G)*te;ke(e,!0,H,le,n,le,J+X)}m!==b&&ke(e,ae>0,H,ie+oe,J,ie+oe,n+s,ie,J,ie,n+s)}var fe=f[m-1];f.length>0&&!a(fe)&&""!==fe&&Oe(e,r,n,i,s,{labelText:fe,vertical:v,isInRightOrTopOfBox:ae>0,fontSize:F,startBox:ie,endBox:oe,boxColor:se}),ke(e,v,k,r,j-G*te,r+i,j-G*te,j+G*te,n,j+G*te,n+s),e.restore()}}}function Re(e,t,r,n,i,o,s){var u=t.points,l=t.pointIndex,f=t.colorRange,c=t.target,m=t.target2,h=t.highlightPosition,y=t.label,d=t.vertical,g=5,_=13*s.zoomFactor;if(!a(u)){var M=u.length;if(!(0>=M||(l=parseInt(l),w(l)||0>=l||l>M))){f=a(f)?[]:f,c=K(c),m=K(m),y=parseInt(y),y=w(y)?0:y;for(var p=1,F=0,x=[],D=0,C=u.length;C>D;D++){var E=u[D];x[p]=[];var H=x[p];0>E||w(E)||a(E)?(H[0]=1===p?0:F,H[1]=0):(F+=E,H[0]=1===p?0:F-E,H[1]=E),p++}var T=q(r,n,i,o,g,o-2*g,d),k=T.left,O=T.width,A=T.top,R=T.height,L=d?-1:1,G=O/F;re(e,r,n,i,o),e.beginPath(),e.lineWidth=1;var B=x[l],W=B[1],z=k+L*B[0]*G,$=B[1]*G,V;V=l===h?P:0===f.length||typeof f[l-1]!==S?I:f[l-1],d?ee(e,A,z-$,R,$,V):ee(e,z,A,$,R,V);var Y;1===y?Y=(B[0]+W)/F*1e3:2===y&&(Y=W/F*1e3);var U=v(Y)/10+"%";1!==y&&2!==y||""===U||Oe(e,r,n,i,o,{labelText:U,vertical:d,isInRightOrTopOfBox:(B[0]+B[1])*G<O/2,fontSize:_,startBox:z,endBox:$,boxColor:V});var j=["#8CBF64","#EE5D5D"];[c,m].forEach(function(t,a){var s=b(k+L*O*t);ke(e,d,j[a],r,s,r+i,s,s,n,s,n+o)}),e.restore();function K(e){return e=N(e),e=w(e)?0:e,e=0>e?0:e,e=e>1?1:e}}}}function Le(e,t){switch(t){case 2:var r=e%4===0&&e%100!==0||e%400===0;return r?29:28;case 4:case 6:case 9:case 11:return 30;default:return 31}}function Ge(e,t,r){0>e&&(e=0),e>1&&(e=1);var n=s(t),a=s(r),i=n.a*(1-e)+a.a*e,o=n.r*(1-e)+a.r*e,u=n.g*(1-e)+a.g*e,l=n.b*(1-e)+a.b*e;return"rgba("+parseInt(o,10)+","+parseInt(u,10)+","+parseInt(l,10)+","+N(i/255)+")"}function Be(e,t,r){return e===t&&e===r?1:t>=e?0:e>=r?1:(e-t)/(r-t)}function We(e,t,r,n,a,i){var o=(i+a)/2;return n>=a&&o>=n?Ge(Be(n,a,o),e,t):Ge(Be(n,o,i),t,r)}function ze(e){var t=C,r=-C;return e.forEach(function(e){e!==c&&e!==m&&(t>e&&(t=e),e>r&&(r=e))}),{min:t,max:r}}function $e(e,t,r,n,a,i,o){if(n)e.forEach(function(e,a){0!==e&&e!==c&&e!==m&&(t[r+a]=n[a])});else{var s=ze(e),u=s.min,l=s.max;e.forEach(function(e,n){0!==e&&e!==c&&e!==m&&(t[r+n]=We(a,i,o,e,u,l))})}}function Ve(e,t,r,n,a,i){for(var o=t.year,s=t.month,u=t.values,l=t.emptyColor||"lightgray",f=t.startColor,c=t.middleColor,m=t.endColor,h="white",y=6,d=7,g=2,_=(a-(y+1)*g)/y,M=(i-(d+1)*g)/d,v=[],p=new Date(o,s-1,1).getDay(),F=0;y*d>F;F++)p>F?v[F]=h:F<p+Le(o,s)?v[F]=l:v[F]=h;$e(u,v,p,t.colors,f,c,m),e.save(),e.rect(r,n,a,i),e.clip(),e.beginPath();for(var x=0,b=0;y>b;b++)for(var D=0;d>D;D++)e.fillStyle=v[x++],e.fillRect(r+b*_+(b+1)*g,n+D*M+(D+1)*g,_,M);e.restore()}function Ye(e){for(var t=e.getFullYear(),r=e.getMonth(),n=e.getDate(),a=1;r+1>a;a++)n+=Le(t,a);return n}function Ue(e,t,r,n,a,i,o){for(var s=t.year,u=t.values,l=t.emptyColor||"lightgray",f=t.startColor,c=t.middleColor,m=t.endColor,h="white",y=7,d=parseInt(366/y)+2,g=[],_=new Date(s,0,1).getDay(),M=Ye(new Date(s,11,31)),v=0;d*y>v;v++)_>v?g[v]=h:_+M>v?g[v]=l:g[v]=h;$e(u,g,_,t.colors,f,c,m),e.save(),e.rect(r,n,a,i),e.clip();var p=o.zoomFactor,F=15*p,x=r+F,b=n,D=a-F,S=i;e.save(),e.translate(r+F/2,b+S),e.rotate(-Math.PI/2),e.font=13*p+V,e.fillStyle="black",e.textBaseline="middle",e.textAlign="center",e.fillText(s,S/2,0),e.restore();var w=2,N=(D-(d+1)*w)/d,C=(S-(y+1)*w)/y,I=0,P,E,H,T=[];for(E=0;d>E;E++)for(P=0;y>P;P++)H={x:x+E*N+(E+1)*w,y:b+P*C+(P+1)*w,w:N,h:C},T[I]=H,e.fillStyle=g[I++],e.fillRect(H.x,H.y,H.w,H.h);for(var k=[],O={},A=0;12>A;A++)O[A]=Ye(new Date(s,A,1))-1+_;var R=O[11]+Le(s,12)-1;for(I=0,E=0;d>E;E++)for(P=0;y>P;P++){if(I>=_&&_+M>I){var L=new Date(s,0,I-_+1),G=L.getMonth(),B=O[G];H=T[I],I>=B&&7+B>I&&k.push({x1:H.x,y1:H.y-w/2,x2:H.x,y2:H.y+H.h+w/2}),I!==B&&0!==L.getDay()||k.push({x1:H.x-w/2,y1:H.y,x2:H.x+H.w+w/2+(I===B?w:0),y2:H.y}),I>R-7&&R>=I&&k.push({x1:H.x+H.w,y1:H.y-w/2,x2:H.x+H.w,y2:H.y+H.h+w/2}),I!==R&&6!==L.getDay()||k.push({x1:H.x-w/2-(I===R?w:0),y1:H.y+H.h,x2:H.x+H.w+w/2,y2:H.y+H.h})}I++}e.strokeStyle="black",e.lineWidth=2;for(var W=0;W<k.length;W++){var z=k[W];e.beginPath(),e.moveTo(z.x1,z.y1),e.lineTo(z.x2,z.y2),e.stroke()}e.restore()}var je=function(){function e(){var e=this;e._minItemHeight=2,e._cachedMinDatetime=C,e._cachedMaxDatetime=-C,e._cachedMinValue=C,e._cachedMaxValue=-C}e.prototype={constructor:e,paint:function(e,t,r,n,a,i){var o=this;o.options=t,o.setting=t.settings;var s=t.values,u=t.dateValues,l=t.zoomFactor;e.save(),e.rect(r,n,a,i),e.clip(),e.beginPath(),0===t.sparklineType&&o._paintLines(e,r,n,a,i,s,u,l),o._paintDataPoints(e,r,n,a,i,s,u,l),o._paintAxis(e,r,n,a,i,s,u,l),e.restore()},_getSpace:function(e){return 0===this.options.sparklineType?3+this._getLineWeight(e)+1:3},_getCachedIndexMaping:function(e,t){var r=this._cachedIndexMapping;if(r)return r;r=this._cachedIndexMapping=[];var n=e.length,a,i;if(this.options.displayDateAxis){var o=t.length,s=_(n,o),h=[];s>0&&(h=t.slice(0,s)),h.sort(function(e,t){return e===t?0:(e===f&&(e=0),t===f&&(t=0),e-t)});var y=h.length,d,g;for(a=0;y>a;a++)if(d=h[a],typeof d!==D&&d!==c){for(g=l(t,d);u._contains(r,g);)g=l(t,d,g+1);isNaN(d)||(i=e[g],i!==m&&i!==c&&isNaN(i)&&i!==f||r.push(g))}}else for(a=0;n>a;a++)i=e[a],typeof i!==D&&i!==c&&isNaN(i)&&i!==f||r.push(a);return r},_getValue:function(e,t){var r=t[e];return typeof r===D||r===c?1===this.setting.options.displayEmptyCellsAs&&(r=0):r===f&&(r=0),r},_paintLines:function(e,t,r,n,a,i,o,s){var u=this,l=u._getCachedIndexMaping(i,o),f,m,h,y=l.length-1;0>y&&(y=0);var d=u.setting.options,g=u.linePos=[],_,M,v,p,F,x=d.displayEmptyCellsAs,b,S;for(f=0;y>f;f++)if(_=u._getValue(l[f],i),typeof _!==D&&_!==c){if(v=f+1,M=u._getValue(l[v],i),typeof M===D||M===c)if(1===x)M=0;else if(2===x)for(v=f+2;y>=v;v++)if(b=i[l[v]],typeof b!==D&&b!==c){M=b;break}typeof M!==D&&M!==c?(p=u._getDataPointPosition(l[f],{Width:n,Height:a},i,o,s),F=u._getDataPointPosition(l[v],{Width:n,Height:a},i,o,s),S=p.Width/2,m={X:p.X+S,Y:p.Y+S},h={X:F.X+S,Y:F.Y+S},g[f]={P1:m,P2:h}):f++}var w=g.length,N;if(w>0)for(e.strokeStyle=u.options.getColor(d.seriesColor),e.lineCap="round",e.lineWidth=u._getLineWeight(s),f=0;w>f;f++)N=g[f],N&&(e.beginPath(),m=N.P1,h=N.P2,e.moveTo(t+m.X,r+m.Y),e.lineTo(t+h.X,r+h.Y),e.stroke(),e.closePath())},_getDataPointColor:function(e,t,r){var n=this,a=n.options,i=n.setting.options,o=c,s=n._getValue(e,t),u=n._getCachedIndexMaping(t,r),f=u.length,h=a.getColor.bind(n);if(typeof s!==D&&s!==c){if(n._cachedMinValue!==C&&n._cachedMaxValue!==-C||n._getMaxMinValue(t),s===n._cachedMinValue&&i.showLow&&(o=h(i.lowMarkerColor)),typeof o!==D&&o!==c||s===n._cachedMaxValue&&i.showHigh&&(o=h(i.highMarkerColor)),typeof o===D||o===c)if(a.displayDateAxis){var y=l(u,e);0===y&&i.showFirst&&(o=h(i.firstMarkerColor))}else 0===e&&i.showFirst&&(o=h(i.firstMarkerColor));if(typeof o===D||o===c)if(a.displayDateAxis){var d=l(u,e);d===f-1&&i.showLast&&(o=h(i.lastMarkerColor))}else e===f-1&&i.showLast&&(o=h(i.lastMarkerColor));if(typeof o!==D&&o!==c||0>s&&i.showNegative&&(o=h(i.negativeColor)),typeof o===D||o===c){var g=a.sparklineType;0===g?i.showMarkers&&(o=h(i.markersColor)):1===g?o=h(i.seriesColor):2===g&&(o=h(i.seriesColor))}}return o===m||o===c?"Transparent":o},_paintDataPoints:function(e,t,r,n,a,i,o,s){for(var u=this,l={Width:n,Height:a},f=u._getCachedIndexMaping(i,o),c=f.length,m=u.options.sparklineType,d,g,_,M,v,p,F,x,b,D=0;c>D;D++)d=f[D],g=u._getDataPointColor(d,i,o),_=u._getDataPointPosition(d,l,i,o,s),e.fillStyle!==g&&(e.fillStyle=g),0===m?(e.save(),M=t+_.X+_.Width/2,v=r+_.Y+_.Height/2,e.translate(M,v),e.rotate(45*y/180),e.fillRect(0-_.Width/2,0-_.Height/2,_.Width,_.Height),e.restore()):(p=t+_.X+_.Width/4,p=h(p),F=r+_.Y,x=_.Width/2,b=_.Height,e.fillRect(p,F,x,b))},_paintAxis:function(e,t,r,n,a,i,o,s){var u=this,l=u.setting&&u.setting.options;if(l&&l.displayXAxis&&u._hasAxis(i,o)){var f={Width:n,Height:a},c=u._getSpace(s),m=f.Width-u._getSpace(s),y=h(u._getAxisY(f,i,s))+.5,d=y,g=u.options.getColor(l.axisColor),_=s;1>_&&(_=1),e.strokeStyle!==g&&(e.strokeStyle=g),e.lineWidth!==_&&(e.lineWidth=_),e.beginPath(),e.moveTo(t+c,r+y),e.lineTo(t+m,r+d),e.stroke()}},_hasAxisNormal:function(e){var t=this._getActualMaxValue(e);if(t!==-C){var r=this._getActualMinValue(e);if(r!==C)return t===r||0>=t*r}return!0},_hasAxis:function(e,t){var r=this._hasAxisNormal(e);if(2!==this.options.sparklineType)return r;var n=this._getCachedIndexMaping(e,t),a=n.length,i,o;if(!r&&a>0)for(var s=0;a>s;s++)if(i=n[s],o=e[i],typeof o!==D&&o!==c)return!0;return r},_getMinDatetime:function(e,t){var r=this._cachedMinDatetime;return(isNaN(r)||r===C)&&this._getMaxMindatetimes(e,t),this._cachedMinDatetime},_getMaxDatetime:function(e,t){var r=this._cachedMaxDatetime;return(isNaN(r)||r===-C)&&this._getMaxMindatetimes(e,t),this._cachedMaxDatetime},_getMaxMindatetimes:function(e,t){for(var r=this,n=new Date(0,0,0),a=C,i=r._getCachedIndexMaping(e,t),o=i.length,s,u,l,f=0;o>f;f++)s=i[f],u=t[s],isNaN(u)||(l=r._getValue(s,e),l!==c&&typeof l===D||isNaN(l)||typeof u!==D&&u!==c&&(u>n&&(n=u),a>u&&(a=u)));r._cachedMaxDatetime=n,r._cachedMinDatetime=a},_calcItemWidth:function(e,t,r,n){var a=this,i=a._getMinDatetime(t,r),o=a._getMaxDatetime(t,r),s=[],u,l,f,m=a._getCachedIndexMaping(t,r),h=m.length;for(u=0;h>u;u++)f=m[u],l=r[f],typeof l===D||l===c||isNaN(l)||l&&s.push(l);s.sort(function(e,t){return e-t});var y=s.length;if(y>1&&i!==o){var d=C,g=0,_;for(u=1;y>u;u++)_=s[u],l=_-s[u-1],d>l&&l>0&&(d=l),g+=l;var M=(e.Width-a._getSpace(n)-a._getSpace(n))*d/g/2;return 2>M&&(M=2),M}return(e.Width-a._getSpace(n)-a._getSpace(n))/2},_getItemWidth:function(e,t,r,n){var a=this;if(a.options.displayDateAxis)return a._calcItemWidth(e,t,r,n);var i=a._getCachedIndexMaping(t,r).length;return(e.Width-a._getSpace(n)-a._getSpace(n))/i},_getItemX:function(e,t,r,n,a){var i=this,o,s=i._getSpace(a);if(i.options.displayDateAxis){o=i._getItemWidth(e,r,n,a);var u=i._getMaxDatetime(r,n),f=i._getMinDatetime(r,n);if(u===f)return s+o/2;var c=n[t];if(!c)return 0;var m=e.Width-s-i._getSpace(a);m-=o;var y=u-f;return s+h((c-f)/y*m)}o=i._getItemWidth(e,r,n,a);var d=l(i._getCachedIndexMaping(r,n),t),g=s+o*d;return h(g)},_getCanvasSize:function(e,t){var r=this,n=e.Width-r._getSpace(t)-r._getSpace(t);n=M(n,0);var a=e.Height-r._getSpace(t)-r._getSpace(t);return a=M(a,0),{Width:n,Height:a}},_getMaxMinValue:function(e){for(var t=this,r=e.length,n,a=0;r>a;a++)n=e[a],typeof n!==D&&n!==c&&("number"!=typeof n&&(n=0),n<t._cachedMinValue&&(t._cachedMinValue=n),n>t._cachedMaxValue&&(t._cachedMaxValue=n))},_getActualMaxValue:function(e){var t=this;t._cachedMaxValue!==-C&&t._cachedMaxValue||t._getMaxMinValue(e);var r=t.setting.options,n=r.maxAxisType;return 0===n?t._cachedMaxValue:1===n?r.groupMaxValue:2===n?r.manualMax:t._cachedMaxValue},_getActualMinValue:function(e){var t=this;t._cachedMinValue!==C&&t._cachedMinValue||t._getMaxMinValue(e);var r=t.setting.options,n=r.minAxisType;return 0===n?t._cachedMinValue:1===n?r.groupMinValue:2===n?r.manualMin:void 0},_getItemHeightNormal:function(e,t,r,n){var a=this._getCanvasSize(e,n),i=this._getActualMaxValue(r),o=this._getActualMinValue(r),s=i-o,u,l;if(i===o){if(0===i)return 0;s=x(i)}return u=r[t],u||(u=0),l=a.Height/s,u*l},_getItemHeight:function(e,t,r,n){var a=this,i=a.options.sparklineType,o;if(0===i)return a._getItemHeightNormal(e,t,r,n);if(1===i){if(o=r[t],(typeof o===D||o===c)&&1===a.setting.options.displayEmptyCellsAs)return 0;var s=a._getItemHeightNormal(e,t,r,n);if(s>-a._minItemHeight&&s<a._minItemHeight){if(o>0)return s+a._minItemHeight;if(0>o)return s-a._minItemHeight}return s}if(2===i){if(o=r[t],typeof o===D||o===c||0===o||isNaN(o))return 0;var u=a._getCanvasSize(e,n);return o>=0?u.Height/2:-u.Height/2}},_getAxisYNormal:function(e,t,r){var n=this,a=n._getCanvasSize(e,r),i=n._getActualMaxValue(t),o=n._getActualMinValue(t);if(i===-C||o===C)return e.Height/2;var s=i-o;if(i===o){if(0===i)return e.Height/2;s=i,0>i&&(i=0)}var u=a.Height/s;return n._getSpace(r)+i*u},_getAxisY:function(e,t,r){return 2===this.options.sparklineType?e.Height/2:this._getAxisYNormal(e,t,r)},_getItemVisibleHeightNormal:function(e,t,r,n){var a=this,i=a._getCanvasSize(e,n),o=a._getActualMaxValue(r),s=a._getActualMinValue(r),u=o-s,l,f;if(o===s){if(0===o)return 0;u=o}if(l=i.Height/u,f=a._getValue(t,r),typeof f!==D&&f!==c||(f=0),o!==s&&o*s>0){var m=0;return m=f>=0?(f-s)*l:(f-o)*l}return f*l},_getItemVisibleHeight:function(e,t,r,n){var a=this,i=a.options.sparklineType;if(0===i)return a._getItemVisibleHeightNormal(e,t,r,n);if(1===i){var o=a._getItemVisibleHeightNormal(e,t,r,n),s=a._minItemHeight;if(o>-s&&s>o){var u=a._getValue(t,r);if(typeof u!==D&&u!==c||(u=0),0!==u)return u>0?o+s:o-s}return o}return 2===i?a._getItemHeight(e,t,r,n):void 0},_getDataPointPositionNormal:function(e,r,n,a,i){var o=this,s=o._getItemWidth(r,n,a,i),u=o._getItemX(r,e,n,a,i);0>s&&(s=0),s=h(s),s%2===1&&(s+=1);var l=o._getItemHeight(r,e,n,i),f=o._getAxisY(r,n,i),c=o._getActualMaxValue(n),m=o._getActualMinValue(n),y=0;0>c&&0>m?y=M(o._getSpace(i),f):(y=f,l>=0&&(y=f-l));var d=o._getItemVisibleHeight(r,e,n,i),g=new t(u,y,s,x(d));if(0!==l){var _=o._getSpace(i);if(g.Y<_&&g.Bottom<_+1)g.Height=h(g.Height+1);else{var v=r.Height-o._getSpace(i);g.Bottom>v&&g.Y>v-1&&(g.Y=v-d,g.Height=d)}}return g},_getLineWeight:function(e){var t=this.setting.options.lineWeight*e;return 1>t&&(t=1),t},_getDataPointPosition:function(e,r,n,a,i){var o=this,s=o._getLineWeight(i);s++,2>s&&(s=2);var u=o._getDataPointPositionNormal(e,r,n,a,i);if(0===o.options.sparklineType){u.X=u.X+(u.Width-s)/2;var l=o._getValue(e,n);typeof l!==D&&l!==c?(l>=0?u.Y-=s/2:u.Y=u.Bottom-s/2,u.Width=s,u.Height=s):(u.Width=0,u.Height=0)}if(o.setting.options.rightToLeft){var f=u.X,m=r.Width-f,h=m-u.Width;u=new t(h,u.Y,u.Width,u.Height)}return u}};function t(e,t,r,n){var a=this;a.X=e,a.Y=t,a.Width=r,a.Height=n,a.Left=a.X,a.Right=a.Left+a.Width,a.Top=a.Y,a.Bottom=a.Y+a.Height}return e}();t.SparklineRender=je,t.SparklineExRenders={PIESPARKLINE:ne,AREASPARKLINE:oe,SCATTERSPARKLINE:ue,BULLETSPARKLINE:he,SPREADSPARKLINE:ye,STACKEDSPARKLINE:Me,HBARSPARKLINE:De,VBARSPARKLINE:Se,VARISPARKLINE:we,BOXPLOTSPARKLINE:He,CASCADESPARKLINE:Ae,PARETOSPARKLINE:Re,MONTHSPARKLINE:Ve,YEARSPARKLINE:Ue},e.exports=t},function(e,t,r){e.exports=r(22)},function(e,t){var r=void 0,n=null,a="number",i="string",o="boolean",s={all:0,byCurrentColumn:1,byOtherColumns:2},u={average:1,count:2,counta:3,max:4,min:5,product:6,stdev:7,stdevp:8,sum:9,vars:10,varp:11};function l(e){return e&&e.text!==r}function f(e,t){if(e===n||e===r)return!1;if(b(e)===a)t.value=e;else if(b(e)===o)t.value=e?1:0;else if(e instanceof Date)t.value=S._toOADate(e);else{if(b(e)!==i)return!1;if(e=e.trim(),0===D(e))return!1;var s=!1;if("%"===e.charAt(D(e)-1)&&(s=!0,e=e.substr(0,D(e)-1)),D(e)>=2&&"0"===e[0]&&"x"===e[1])return!1;var u=(+e).valueOf();if(isNaN(u)||!isFinite(u)){if(u=new Date(e),isNaN(u))return!1;u=S._toOADate(u)}s&&(u/=100),t.value=u}return!0}function c(e){for(var t=e._inPreview,r=t?e._filteredPreviewRowMap:e._filteredRowMap=[],n=e._filteredInfoByRangeSet,a=e._filteredInfoSet,i=t?e._filteredPreviewRowIndexes:e._filteredRowIndexes=[],o=e._filteredColumns,s=e._filteredPreviewColumnSet,u=e._filteredPreviewByRangColumnSet,l=D(e.data),f,c=0;l>c;c++){for(var m=!1,h=0;h<D(o);h++){var y=o[h];if((!t||y!==e._previewCol)&&(a[y]?(f=e.getExclusiveRowIndex(e.columnNames[y],c),m=!a[y][f]):n[y]&&(m=!n[y][c]),m))break}!m&&t&&(s?(f=e.getExclusiveRowIndex(e.columnNames[y],c),m=!s[f]):u&&(m=!u[c])),m||(r[c]=!0)}for(h=0;h<D(r);h++)r[h]&&i.push(h)}function m(e){var t=e._columnsSet={};e._columnDataCache=[],e._exclusiveDataCache=[],e._exclusiveToFullMap=[],e._fullToExclusivelMap=[];for(var r=e.columnNames,n=0;n<D(r);n++)t[(r[n]+"").toUpperCase()]=n}function h(e,t){var r=e._columnDataCache,n=e._exclusiveDataCache,a=e._exclusiveDataIndex,i=e._exclusiveToFullMap,o=e._fullToExclusivelMap,s=e.data,u=o[t]=[];e._sortedColumnDataCache=[],r[t]=[],n[t]=[],a[t]={},i[t]=[];for(var f=0;f<D(s);f++){var c=s[f][t],m=l(c)?c.text.trim():c;if(r[t].push(m),void 0===u[f]){var h=[f];n[t].push(m),i[t].push(h);var y=D(i[t])-1;a[t][m]=y,u[f]=y;for(var d=f+1;d<D(s);d++){var g=s[d][t],_=l(g)?g.text.trim():g;void 0===u[d]&&S.isEquals(_,m)&&(h.push(d),u[d]=y)}}}}function y(e,t,r){var n=e._data2SortedMapping,a=e.getColumnIndex(t),i=[];if(!a)return i;var o=e._inPreview?e._filteredPreviewByRangColumn:e._filteredInfoByRange[a],s=e._filteredRowMap;if(!o)return i;n[a]||e._sortOneCol(a);for(var u=[],f=n[a],c=0;c<D(f);c++){var m=e.data[c][a],h=l(m)?m.value:m;u[f[c]]=h}var y=e._sorted2DataMapping[a];for(c=0;c<D(o);c++){for(var d=o[c],g=!1,_=e._getStartEndIndex(u,d),M=_.start;M<=_.end;M++)if(s[y[M]]){g=!0;break}g!==r&&i.push(d)}return i}function d(e,t){var r=[],n=e.getColumnIndex(t);if(n>=0){for(var a=D(e.getData(t)),i=e._inPreview?e._filteredPreviewRowMap:e._filteredRowMap,o=0;a>o;o++)if(!i[o]){var s=e.getExclusiveRowIndex(t,o);-1===r.indexOf(s)&&r.push(s)}return r}}function g(e,t){var r=[],n=e.getColumnIndex(t);if(n>=0)for(var a=e._inPreview&&n===e._previewCol?e._filteredPreviewColumnSet||e._filteredPreviewByRangColumnSet:e._filteredInfoSet[n]||e._filteredInfoByRangeSet[n],i=!!e._filteredInfoByRangeSet[n],o=D(i?e.getData(t):e.getExclusiveData(t)),s=0;o>s;s++)if(a&&!a[s]){var u=i?e.getExclusiveRowIndex(t,s):s;-1===r.indexOf(u)&&r.push(u)}return r}function _(e,t){for(var r=[],n=e.columnNames,a=0,i=D(n);i>a;a++)if(n[a]!==t)for(var o=g(e,n[a]),s=0;s<D(o);s++)for(var u=e.getRowIndexes(n[a],o[s]),l=0;l<D(u);l++)-1===r.indexOf(u[l])&&r.push(u[l]);for(a=0,i=D(e.data);i>a;a++)-1!==r.indexOf(a)?r.splice(r.indexOf(a),1):r.push(a);var f=D(e.getExclusiveData(t)),c=[];for(a=0;f>a;a++)c.push(a);for(a=0,i=D(r);i>a;a++){var m=e.getExclusiveRowIndex(t,r[a]);-1!==c.indexOf(m)&&c.splice(c.indexOf(m),1)}return c}function M(e,t,r,n){var a=e.getColumnIndex(t),i=e._data2SortedMapping;i[a]||e._sortOneCol(a);for(var o=[],s=i[a],u=0;u<D(s);u++){var f=e.data[u][a],m=l(f)?f.value:f;o[s[u]]=m}var h={};for(u=0;u<D(r);u++)for(var y=e._getStartEndIndex(o,r[u]),d=0;d<D(s);d++)s[d]>=y.start&&s[d]<=y.end&&(h[d]=!0);n?(e._filteredPreviewByRangColumnSet=h,e._filteredPreviewByRangColumn=r):(e._filteredInfoByRange[a]=r,e._filteredInfoByRangeSet[a]=h,delete e._filteredInfoSet[a],delete e._filteredInfoIndexes[a]),c(e)}function v(e,t,r,n){for(var a=e.getColumnIndex(t),i={},o=0;o<D(r);o++)i[r[o]]=!0;n?e._filteredPreviewColumnSet=i:(e._filteredInfoSet[a]=i,e._filteredInfoIndexes[a]=r,delete e._filteredInfoByRange[a],delete e._filteredInfoByRangeSet[a]),c(e)}function p(e,t){e._inPreview=!1,e._filteredPreviewColumnSet={},e._filteredPreviewRowIndexes=[],e._filteredPreviewRowMap=[],e._filteredPreviewByRangColumnSet=[],t&&e.onFiltered()}var F=function(){function e(e,t){var r=this;r._columnsSet={},r._columnDataCache=[],r._exclusiveDataCache=[],r._exclusiveDataIndex=[],r._exclusiveToFullMap=[],r._fullToExclusivelMap=[],r._filteredInfoSet=[],r._filteredInfoIndexes=[],r._filteredInfoByRangeSet=[],r._filteredInfoByRange=[],r._filteredRowMap=[],r._filteredRowIndexes=[],r._filteredColumns=[],r._filteredPreviewRowIndexes=[],r._filteredPreviewRowMap=[],r._inPreview=!1,r._listeners=[],r._suspendCount=0,r._sortedColumnDataCache=[],r._sorted2DataMapping=[],r._data2SortedMapping=[],r._setDataSource(e,t);for(var n=0;n<D(r.data);n++)r._filteredRowMap[n]=!0,r._filteredRowIndexes.push(n)}return e.prototype={constructor:e,inPreview:function(){return this._inPreview},_setDataSource:function(e,t){var r=this;r.data=e,r.columnNames=t,m(r)},onDataChanged:function(e){for(var t=this,r=Array(D(t.columnNames)),n=t._filteredInfoIndexes,a=t._exclusiveDataCache,i=t._filteredInfoSet,o=t._columnDataCache,s=0;s<D(e);s++){var u=e[s],f=u.data,m=u.row,y=t.getColumnIndex(u.columnName);t.data[m][y]=f;var d=l(f)?f.text:f;o[y]&&(o[y][m]=d),r[y]=!0}for(var g=0;g<D(r);g++)if(r[g]){var _=n[g];n[g]=_?[]:void 0,i[g]=_?{}:void 0;var M=[];for(s=0;_&&s<D(_);s++)M.push(a[g][_[s]]);for(h(t,g),s=0;s<D(M);s++){var v=t._exclusiveDataIndex[g][M[s]];n[g].push(v),i[g][v]=!0}}c(t),t._notifyListeners(e,"onDataChanged")},_notifyListeners:function(){var e=arguments,t=e[D(e)-1];e.length-=1;for(var r=this._listeners||[],n=0;n<D(r);n++){var a=r[n];a[t]&&a[t].apply(a,e)}},onColumnNameChanged:function(e,t){var r=this,n=r._columnsSet,a=r.getColumnIndex(e);0>a||(r.columnNames[a]=t,delete n[e.toUpperCase()],n[t.toUpperCase()]=a,r._notifyListeners(e,t,"onColumnNameChanged"))},onRowsAdded:function(e,t,a){var i=this,o=D(i.columnNames),s=i.data,u=i._columnDataCache,l=i._exclusiveDataCache,f=i._exclusiveToFullMap,c=i._fullToExclusivelMap,m=i._filteredInfoSet,h=i._filteredInfoIndexes,y=i._filteredRowMap,d=i._filteredRowIndexes,g=i._filteredColumns;i._sortedColumnDataCache=[];for(var _=0;t>_;_++)s.splice(e,0,Array(o));for(var M=0;o>M;M++){for(_=0;t>_;_++)u[M]&&u[M].splice(e,0,r);var v=l[M],p;if(v){for(var F=n,x=0;x<D(v);x++){for(var b=f[M][x],w=0;w<D(b);w++)b[w]>=e&&(b[w]+=t);S.isEquals(v[x],n)&&(F=b,p=x)}F||(F=[],v.push(n),p=D(v)-1,i._exclusiveDataIndex[M][n]=p,f[M].push(F),m[M]&&-1===g.indexOf(M)&&(m[M][p]=!0,h[M].push(p)));for(var N=e;e+t>N;N++)F.push(N);for(var C=e;e+t>C;C++)c[M].splice(C,0,p)}}var I=!0;for(_=0;_<D(g);_++){M=g[_];var P=c[M][e];m[M][P]!==!0&&(I=!1)}for(_=0;_<D(d);_++)d[_]>=e&&(d[_]+=t);for(C=D(s)-1;C>=e+t;C--)y[C]=y[C-t];var E=D(g)>0;for(C=e;e+t>C;C++)I&&d.push(C),y[C]=!E;a||i._notifyListeners(e,t,!0,"onRowsChanged")},onRowsRemoved:function(e,t){this._onRowsRemovedCore(e,t,!0)},_onRowsRemovedCore:function(e,t,r){var n=this,a=n._filteredInfoIndexes,i=n._exclusiveDataCache,o=n._filteredInfoSet,s=n.data,u=D(n.columnNames),l=n._columnDataCache;s.splice(e,t);for(var f=0;u>f;f++){l[f]&&l[f].splice(e,t);var m=a[f],y=[];if(m&&r){for(var d=0;d<D(m);d++){for(var g=n.getRowIndexes(n.columnNames[f],m[d]),_=!0,M=0;M<D(g);M++)if(g[M]<e||g[M]>=e+t){_=!1;break}_||y.push(i[f][m[d]])}a[f]=[],o[f]={}}if(h(n,f),m&&r)for(d=0;d<D(y);d++){var v=n._exclusiveDataIndex[f][y[d]];a[f].push(v),o[f][v]=!0}}r&&c(n),n._notifyListeners(e,t,!1,"onRowsChanged")},onColumnsRemoved:function(e,t){for(var r=this,n=r.data,a=[],i=e;e+t>i;i++)a.push(r.columnNames[i]);var o=r._filteredColumns;for(i=0;i<D(a);i++){var s=a[i],u=r.getColumnIndex(s);-1!==o.indexOf(u)&&r.doUnfilter(s)}var l=r._filteredInfoSet||r._filteredInfoByRangeSet,f=r._filteredInfoIndexes||r._filteredInfoByRange,c=r._columnsSet;for(i=0;i<D(n);i++)n[i].splice(e,t);r._sortedColumnDataCache=[],r.columnNames.splice(e,t),r._columnDataCache.splice(e,t),r._exclusiveDataCache.splice(e,t),r._exclusiveDataIndex.splice(e,t),r._exclusiveToFullMap.splice(e,t),r._fullToExclusivelMap.splice(e,t),l.splice(e,t),f.splice(e,t);for(var m in c)c[m]>=e+t&&(c[m]-=t);for(i=0;i<D(a);i++){s=a[i],delete c[s.toUpperCase()],e=r.getColumnIndex(s);var h=o.indexOf(e);-1!==h&&o.splice(h,1),r._notifyListeners(a[i],"onColumnRemoved")}},_getSortedColumnDataCache:function(){return this._sortedColumnDataCache},_getSorted2DataMapping:function(){return this._sorted2DataMapping},_sortOneCol:function(e){var t=this,r=t.data;t._columnDataCache[e]||h(t,e);for(var n=D(r),a=[],i=0;n>i;i++){var o=r[i][e],s=l(o)?o.value:o;a.push(s)}for(var u=S.quickSort(a),f=t._sortedColumnDataCache[e]=[],c=t._sorted2DataMapping[e]=[],m=t._data2SortedMapping[e]=[],y=0;y<D(u);y++){var d=u[y];f.push(d.value),c.push(d.index),m[d.index]=y}},getColumnIndex:function(e){var t=this._columnsSet[e.toUpperCase()];return void 0===t?-1:t},getFilteredRowIndexes:function(){var e=this;return e._inPreview?e._filteredPreviewRowIndexes:e._filteredRowIndexes},getFilteredOutRowIndexes:function(){for(var e=this,t=D(e.data),r=e._inPreview?e._filteredPreviewRowMap:e._filteredRowMap,n=[],a=0;t>a;a++)r[a]||n.push(a);return n},getData:function(e,t){var r=this,n=r._columnDataCache,a=r.getColumnIndex(e);if(a>=0){if(t){r._sortedColumnDataCache[a]||r._sortOneCol(a);for(var i=n[a],o=r._sortedColumnDataCache[a],s=r._getStartEndIndex(o,t),u=s.start,l=s.end,f=[],c=u;l>=c;c++)f.push(i[r._sorted2DataMapping[a][c]]);return f}return n[a]||h(r,a),n[a]}return[]},aggregateData:function(e,t,a){var i=this,o=i.getColumnIndex(e),s,u;if(0>o)return r;i._sortedColumnDataCache[o]||i._sortOneCol(o);var l=i._sortedColumnDataCache[o],c=D(l),m=i._getStartEndIndex(l,a);if(s=m.start,u=m.end,5===t)return s>=c?r:l[s];if(4===t)return 0>u?r:l[u];if(3===t)return s>u?0:u-s+1;for(var h=6===t?1:0,y=0,d=0,g=s;u>=g;g++){var _=l[g];if(_!==n||_!==r){var M={value:n};3===t?h++:f(_,M)&&(_=M.value,1===t?(h+=_,y++):2===t?h++:9===t?h+=_:6===t?h*=_:7!==t&&8!==t&&10!==t&&11!==t||(h+=_,y+=_*_,d++))}}return 1===t?h/=y:7===t||10===t?(h=(d*y-h*h)/(d*(d-1)),h=7===t?Math.sqrt(h):h):8!==t&&11!==t||(h=(d*y-h*h)/(d*d),h=8===t?Math.sqrt(h):h),h},_getStartEndIndex:function(e,t){var n=D(e),a,i;if(t){if(t.min===-(1/0))a=0;else for(var o=0;n>o;o++){var s=e[o];if(S.isEquals(t.min,s)||S.isGreaterThan(s,t.min)){a=o;break}}if(a===r&&(a=n),i===1/0)i=n-1;else{for(o=n-1;o>=0;o--)if(s=e[o],S.isEquals(s,t.max)||S.isGreaterThan(t.max,s)){i=o;break}i===r&&(i=-1)}}else a=0,i=n-1;return{start:a,end:i}},getExclusiveData:function(e){var t=this,r=t._exclusiveDataCache,n=t.getColumnIndex(e);return n>=0?(r[n]||h(t,n),r[n]):[]},getRowIndexes:function(e,t){var r=this,n=r.getColumnIndex(e);return n>=0?(r._fullToExclusivelMap[n]||h(r,n),r._exclusiveToFullMap[n][t]):[]},getExclusiveRowIndex:function(e,t){var r=this,n=r._fullToExclusivelMap,a=r.getColumnIndex(e);return a>=0?(n[a]||h(r,a),n[a][t]):-1},getFilteredIndexes:function(e){var t=[],r={};return this._getFilteredExclusiveIndexes(e,t,r),t},_getFilteredExclusiveIndexes:function(e,t,r){for(var n=this,a=n._inPreview?n._filteredPreviewRowIndexes:n._filteredRowIndexes,i=0;i<D(a);i++){var o=a[i],s=n.getExclusiveRowIndex(e,o);r[s]?r[s]++:(r[s]=1,t.push(s))}},getFilteredRanges:function(e){return y(this,e,!1)},getFilteredOutRanges:function(e){return y(this,e,!0)},getFilteredOutIndexes:function(e,t){var r=this;return 0===t?d(r,e):1===t?g(r,e):_(r,e)},attachListener:function(e){this._listeners.push(e)},detachListener:function(e){for(var t=this._listeners||[],r=0;r<D(t);r++)if(t[r]===e){t.splice(r,1);break}},suspendFilteredEvents:function(){this._suspendCount++},resumeFilteredEvents:function(){var e=this;e._suspendCount--,0===e._suspendCount&&e.onFiltered()},doFilter:function(e,t,r){this._doFilterInternal(e,t,r),this.onFiltered()},_doFilterInternal:function(e,t,r){var n=this,a=n._filteredColumns,i=n.getColumnIndex(e);0>i||(r?(n._inPreview=!0,n._previewCol=i):n._inPreview&&p(n,!1),a.indexOf(i)<0&&a.push(i),t.ranges?M(n,e,t.ranges,r):v(n,e,t.exclusiveRowIndexes,r))},clearPreview:function(){p(this,!0)},doUnfilter:function(e){this._doUnfilterInternal(e),this.onFiltered()},_doUnfilterInternal:function(e){var t=this;t._inPreview&&p(t,!1);var r=t.getColumnIndex(e);if(!(0>r)){delete t._filteredInfoByRange[r],delete t._filteredInfoByRangeSet[r],delete t._filteredInfoSet[r],delete t._filteredInfoIndexes[r],c(t);var n=t._filteredColumns.indexOf(r);n>=0&&t._filteredColumns.splice(n,1)}},onFiltered:function(){var e=this;0===e._suspendCount&&e._notifyListeners({rowIndexes:e.getFilteredRowIndexes(),isPreview:e._inPreview},"onFiltered")},getListener:function(){return this._listeners}},e}();function x(e){return e===n||e===r}function b(e){return typeof e}function D(e){return e?e.length:0}var S=function(){function e(){}return e.quickSort=function(e){var t=D(e),r=[],n;for(n=0;t>n;n++)r[n]={index:n,value:e[n]};return this.quickSortImp(r)},e.quickSortImp=function(e){if(D(e)<=1)return e;for(var t=this,r=Math.floor(D(e)/2),n=e[r],a=[],i=[],o=[],s=0;s<D(e);s++){var u=t.sortCompare(e[s].value,n.value);0>u?a.push(e[s]):u>0?i.push(e[s]):o.push(e[s])}return t.quickSortImp(a).concat(o,t.quickSortImp(i))},e.isEquals=function(e,t){return!x(e)&&""!==e||!x(t)&&""!==t?e instanceof Date&&t instanceof Date?e.valueOf()===t.valueOf():b(e)===i&&b(t)===i?e.toLowerCase()===t.toLowerCase():e===t:!0},e._toOADate=function(e){return x(e)?0:(b(e)===a&&(e=new Date(e)),(1440*e.getTime()+3181192704e6-864e5*e.getTimezoneOffset())/124416e6)},e.isGreaterThan=function(e,t){var r=b(e),n=b(t);return r===o?e=e?1:0:e instanceof Date&&(e=this._toOADate(e)),n===o?t=t?1:0:t instanceof Date&&(t=this._toOADate(t)),r===n||r!==a&&n!==a?r===i&&n===i?e.toLowerCase()>t.toLowerCase():e>t:b(t)===a},e.sortCompare=function(e,t){var r=this,n=!0,i=0,o,s;return o=x(e)||""===e||b(e)===a&&isNaN(e),s=x(t)||""===t||b(t)===a&&isNaN(t),i=o&&s?0:o?1:s?-1:r.isEquals(e,t)?0:r.isGreaterThan(e,t)?n?1:-1:n?-1:1},e}();e.exports={FilteredOutDataType:s,SlicerAggregateType:u,GeneralSlicerData:F,_SortHelper:S}}])});