/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var wijmo;!function(t){"use strict";function e(t,e){return null==t?null:n(e)?s(t.implementsInterface)&&t.implementsInterface(e)?t:null:t instanceof e?t:null}function n(t){return"string"==typeof t}function r(t){return"number"==typeof t}function i(t){return r(t)&&t==Math.round(t)}function o(t){return"boolean"==typeof t}function s(t){return"function"==typeof t}function a(t){return(t instanceof Date||"[object Date]"===Object.prototype.toString.call(t))&&!isNaN(t.getTime())}function u(t){return t instanceof Array||Array.isArray(t)||"[object Array]"===Object.prototype.toString.call(t)}function c(t){return null!=t&&"object"==typeof t&&!a(t)&&!u(t)}function l(e,r,i){if(null!=e){if(n(e))switch(r){case T.Number:var o=t.Globalize.parseFloat(e,i);return isNaN(o)?e:o;case T.Date:var s=t.Globalize.parseDate(e,i);return s||i||!e||(s=new Date(e)),s&&isFinite(s.getTime())?s:e;case T.Boolean:switch(e.toLowerCase()){case"true":return!0;case"false":return!1}return e}if(r==T.String)return t.Globalize.format(e,i)}return e}function h(e,n){if(n)for(var r in n)if("_"!=r[0]){p(r in e,'Unknown property "'+r+'".');var i=n[r];e._copy&&e._copy(r,i)||(e[r]instanceof t.Event?s(i)&&e[r].addHandler(i):!c(i)||i instanceof Element||!e[r]||"itemsSource"==r?e[r]=i:h(e[r],i))}}function p(t,e){if(!t)throw e="** Assertion failed in Wijmo: "+e,console.error(e),e}function f(t,e){return void 0===e&&(e=!0),p(e&&null==t||n(t),"String expected."),t}function d(t,e,n){if(void 0===e&&(e=!1),void 0===n&&(n=!1),p(e&&null==t||r(t),"Number expected."),n&&t&&t<0)throw"Positive number expected.";return t}function g(t,e){return void 0===e&&(e=!1),p(e&&null==t||o(t),"Boolean expected."),t}function _(t,e){return void 0===e&&(e=!0),p(e&&null==t||s(t),"Function expected."),t}function m(t,e){if(t&&t.getAttribute){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");return t&&n.test(t.getAttribute("class"))}return!1}function v(t,e){if(t&&e&&t.setAttribute)for(var n=e.split(" "),r=0;r<n.length;r++){var i=n[r];if(m(t,i)){var o=new RegExp("((\\s|^)"+i+"(\\s|$))","g"),s=t.getAttribute("class");(s=s.replace(o," ").replace(/ +/g," ").trim())?t.setAttribute("class",s):t.removeAttribute("class")}}}function y(t,e){if(t&&e&&t.setAttribute)for(var n=e.split(" "),r=0;r<n.length;r++){var i=n[r];if(!m(t,i)){var o=t.getAttribute("class");t.setAttribute("class",o?o+" "+i:i)}}}function b(t,e,n){null==n&&(n=!m(t,e)),n?y(t,e):v(t,e)}function C(t,e,n,r){null!=n?r&&t.getAttribute(e)||t.setAttribute(e,n.toString()):t.removeAttribute(e)}function w(){var t=document.activeElement;if(t){var e=t.shadowRoot;e&&e.activeElement&&(t=e.activeElement)}return t}function E(e){for(var n=[],r=e.querySelectorAll("input,select,textarea,button,a,div"),i=0;i<r.length;i++){var o=r[i];if(o.offsetHeight>0&&o.tabIndex>-1&&!o.disabled&&!x(o,"[disabled],.wj-state-disabled")){if(o instanceof HTMLAnchorElement&&!o.hasAttribute("href"))continue;if(t.isIE()&&!o.hasAttribute("tabindex")){if(o instanceof HTMLDivElement)continue;var s=t.Control.getControl(x(o,".wj-flexgrid"));if(s&&0==s.keyActionTab)continue}!t.Control.getControl(o)&&E(o).length||n.push(o)}}return n}function A(t,e){for(var n=e;n&&t;){if(n===t)return!0;n=n.parentNode||n.host}return!1}function x(t,e){var n=t?t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector:null;if(n)for(;t;t=t.parentNode)if(t instanceof Element&&n.call(t,e))return t;return null}function M(t,e){if(t instanceof Array)for(var n=0;n<t.length;n++)M(t[n],e);else if(t&&t.style){var r=t.style;for(var i in e){var o=e[i];"number"==typeof o&&i.match(/width|height|left|top|right|bottom|size|padding|margin'/i)&&(o+="px"),r[i]!=o&&(r[i]=o.toString())}}}var O="5.20173.430";t.getVersion=function(){return O},t.setLicenseKey=function(e){t.Control._licKey=e};!function(t){t[t.Back=8]="Back",t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.Left=37]="Left",t[t.Up=38]="Up",t[t.Right=39]="Right",t[t.Down=40]="Down",t[t.Delete=46]="Delete",t[t.F1=112]="F1",t[t.F2=113]="F2",t[t.F3=114]="F3",t[t.F4=115]="F4",t[t.F5=116]="F5",t[t.F6=117]="F6",t[t.F7=118]="F7",t[t.F8=119]="F8",t[t.F9=120]="F9",t[t.F10=121]="F10",t[t.F11=122]="F11",t[t.F12=123]="F12"}(t.Key||(t.Key={}));var T;!function(t){t[t.Object=0]="Object",t[t.String=1]="String",t[t.Number=2]="Number",t[t.Boolean=3]="Boolean",t[t.Date=4]="Date",t[t.Array=5]="Array"}(T=t.DataType||(t.DataType={})),t.tryCast=e,t.isPrimitive=function(t){return n(t)||r(t)||o(t)||a(t)},t.isString=n,t.isNullOrWhiteSpace=function(t){return null==t||t.replace(/\s/g,"").length<1},t.isNumber=r,t.isInt=i,t.isBoolean=o,t.isFunction=s,t.isUndefined=function(t){return void 0===t},t.isDate=a,t.isArray=u,t.isObject=c,t.isEmpty=function(t){for(var e in t)return!1;return!0},t.getUniqueId=function(t){for(var e=t,n=0;null!=document.getElementById(e);n++)e=t+n;return e},t.mouseToPage=function(t){if(t instanceof P)return t;if(t.touches&&t.touches.length>0&&(t=t.touches[0]),r(t.clientX)&&r(t.clientY))return new P(t.clientX+pageXOffset,t.clientY+pageYOffset);throw"Mouse or touch event expected."},t.getType=function(t){return r(t)?T.Number:o(t)?T.Boolean:a(t)?T.Date:n(t)?T.String:u(t)?T.Array:T.Object},t.changeType=l,t.toFixed=function(t,e,n){if(n){var r=(i=t.toString()).indexOf(".");i.indexOf("e")<0&&r>-1&&(i=i.substr(0,r+1+e),t=parseFloat(i))}else{var i=t.toFixed(e);t=parseFloat(i)}return t},t.format=function(e,i,o){if((e=f(e)).match(/\{.*"count".*:.*"when".*:.*\}/))try{var s=JSON.parse(e);if(n(s.count)){var a=i[s.count],u=s.when;if(r(a)&&c(u)){var l=u[a]||u.other;n(l)&&(e=l)}}}catch(t){}return e.replace(/\{(.*?)(:(.*?))?\}/g,function(e,n,r,s){var a=e;return n&&"{"!=n[0]&&i&&(a=i[n],s&&(a=t.Globalize.format(a,s)),o&&(a=o(i,n,s,a))),null==a?"":a})},t.clamp=function(t,e,n){return null!=t&&(null!=n&&t>n&&(t=n),null!=e&&t<e&&(t=e)),t},t.copy=h,t.assert=p,t._deprecated=function(t,e){console.error('** WARNING: "'+t+'" has been deprecated; please use "'+e+'" instead.')},t.asString=f,t.asNumber=d,t.asInt=function(t,e,n){if(void 0===e&&(e=!1),void 0===n&&(n=!1),p(e&&null==t||i(t),"Integer expected."),n&&t&&t<0)throw"Positive integer expected.";return t},t.asBoolean=g,t.asDate=function(t,e){if(void 0===e&&(e=!1),n(t)){var r=l(t,T.Date,"r");a(r)&&(t=r)}return p(e&&null==t||a(t),"Date expected."),t},t.asFunction=_,t.asArray=function(t,e){return void 0===e&&(e=!0),p(e&&null==t||u(t),"Array expected."),t},t.asType=function(t,n,r){return void 0===r&&(r=!1),t=e(t,n),p(r||null!=t,n+" expected."),t},t.asEnum=function(t,e,n){if(void 0===n&&(n=!1),null==t&&n)return null;var i=e[t];return p(null!=i,"Invalid enum value."),r(i)?i:t},t.asCollectionView=function(n,r){if(void 0===r&&(r=!0),null==n&&r)return null;var i=e(n,"ICollectionView");return null!=i?i:(u(n)||p(!1,"Array or ICollectionView expected."),new t.collections.CollectionView(n))},t.hasItems=function(t){return null!=t&&null!=t.items&&t.items.length>0},t.toHeaderCase=function(t){return t&&t.length?t[0].toUpperCase()+t.substr(1).replace(/([a-z])([A-Z])/g,"$1 $2"):""},t.escapeHtml=function(t){return n(t)&&(t=t.replace(/[&<>"'\/]/g,function(t){return S[t]})),t};var S={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};t.hasClass=m,t.removeClass=v,t.addClass=y,t.toggleClass=b,t.setAttribute=C,t.setSelectionRange=function(e,n,r){if(void 0===r&&(r=n),p(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement,"INPUT or TEXTAREA element expected"),A(document.body,e)&&!e.disabled&&"none"!=e.style.display)try{return e.setSelectionRange(d(n),d(r),t.isIE()?null:"backward"),e.focus(),!0}catch(t){}return!1},t.disableAutoComplete=function(t){"autocomplete,autocorrect,autocapitalize,spellcheck".split(",").forEach(function(e){t.setAttribute(e,"spellcheck"==e?"false":"off")})},t.removeChild=function(t){return t&&t.parentNode?t.parentNode.removeChild(t):null},t.getActiveElement=w,t.moveFocus=function(t,e){var n=E(t),r=0;if(e){var i=n.indexOf(w());i>-1&&(r=(i+e+n.length)%n.length)}if(r<n.length){var o=n[r];o.focus(),o instanceof HTMLInputElement&&o.select()}},t.getElement=function(t){return t instanceof Element?t:n(t)?document.querySelector(t):t&&t.jquery?t[0]:null},t.createElement=function(t,e){var n=document.createElement("div");return n.innerHTML=t,1==n.children.length&&(n=n.children[0]),e&&e.appendChild(n),n},t.setText=function(t,e){t.textContent=e||""},t.contains=A,t.closest=x,t.closestClass=function(t,e){return x(t,"."+e)},t.enable=function(t,e){var n=!e;b(t,"wj-state-disabled",n),C(t,"disabled",n?"true":null);for(var r=t.querySelectorAll("input"),i=0;i<r.length;i++){var o=r[i];e?o.removeAttribute("disabled"):o.setAttribute("disabled","true")}},t.getElementRect=function(t){var e=t.getBoundingClientRect();return new I(e.left+pageXOffset,e.top+pageYOffset,e.width,e.height)},t.setCss=M,t.animate=function(e,n,r){void 0===n&&(n=t.Control._ANIM_DEF_DURATION),void 0===r&&(r=t.Control._ANIM_DEF_STEP),e=_(e),n=d(n,!1,!0),r=d(r,!1,!0);var i=Date.now(),o=setInterval(function(){var t=Math.min(1,(Date.now()-i)/n);t=Math.sin(t*Math.PI/2),t*=t,requestAnimationFrame(function(){e(t)}),t>=1&&clearInterval(o)},r);return o};var P=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=d(t),this.y=d(e)}return t.prototype.equals=function(e){return e instanceof t&&this.x==e.x&&this.y==e.y},t.prototype.clone=function(){return new t(this.x,this.y)},t}();t.Point=P;var F=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.width=d(t),this.height=d(e)}return t.prototype.equals=function(e){return e instanceof t&&this.width==e.width&&this.height==e.height},t.prototype.clone=function(){return new t(this.width,this.height)},t}();t.Size=F;var I=function(){function t(t,e,n,r){this.left=d(t),this.top=d(e),this.width=d(n),this.height=d(r)}return Object.defineProperty(t.prototype,"right",{get:function(){return this.left+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.top+this.height},enumerable:!0,configurable:!0}),t.prototype.equals=function(e){return e instanceof t&&this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height},t.prototype.clone=function(){return new t(this.left,this.top,this.width,this.height)},t.fromBoundingRect=function(e){return null!=e.left?new t(e.left,e.top,e.width,e.height):null!=e.x?new t(e.x,e.y,e.width,e.height):void p(!1,"Invalid source rectangle.")},t.union=function(e,n){var r=Math.min(e.left,n.left),i=Math.min(e.top,n.top);return new t(r,i,Math.max(e.right,n.right)-r,Math.max(e.bottom,n.bottom)-i)},t.intersection=function(e,n){var r=Math.max(e.left,n.left),i=Math.max(e.top,n.top);return new t(r,i,Math.min(e.right,n.right)-r,Math.min(e.bottom,n.bottom)-i)},t.prototype.contains=function(e){if(e instanceof P)return e.x>=this.left&&e.x<=this.right&&e.y>=this.top&&e.y<=this.bottom;if(e instanceof t){var n=e;return n.left>=this.left&&n.right<=this.right&&n.top>=this.top&&n.bottom<=this.bottom}p(!1,"Point or Rect expected.")},t.prototype.inflate=function(e,n){return new t(this.left-e,this.top-n,this.width+2*e,this.height+2*n)},t}();t.Rect=I;var D=function(){function e(){}return e.addDays=function(t,n){return e.newDate(t.getFullYear(),t.getMonth(),t.getDate()+n)},e.addMonths=function(t,n){return e.newDate(t.getFullYear(),t.getMonth()+n,t.getDate())},e.addYears=function(t,n){return e.newDate(t.getFullYear()+n,t.getMonth(),t.getDate())},e.addHours=function(t,n){return e.newDate(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours()+n)},e.addMinutes=function(t,n){return e.newDate(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes()+n)},e.addSeconds=function(t,n){return e.newDate(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()+n)},e.sameDate=function(t,e){return a(t)&&a(e)&&t.getFullYear()==e.getFullYear()&&t.getMonth()==e.getMonth()&&t.getDate()==e.getDate()},e.sameTime=function(t,e){return a(t)&&a(e)&&t.getHours()==e.getHours()&&t.getMinutes()==e.getMinutes()&&t.getSeconds()==e.getSeconds()},e.equals=function(t,e){return a(t)&&a(e)&&t.getTime()==e.getTime()},e.fromDateTime=function(t,n){return t||n?(t||(t=n),n||(n=t),e.newDate(t.getFullYear(),t.getMonth(),t.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())):null},e.toFiscal=function(n,r){var i=t.culture.Globalize.calendar;return u(i.fiscalYearOffsets)?e.addMonths(n,-i.fiscalYearOffsets[r?0:1]):n},e.fromFiscal=function(n,r){var i=t.culture.Globalize.calendar;return u(i.fiscalYearOffsets)?e.addMonths(n,+i.fiscalYearOffsets[r?0:1]):n},e.newDate=function(t,e,n,r,i,o,s){if(null==t||null==e||null==n){var a=new Date;null==t&&(t=a.getFullYear()),null==e&&(e=a.getMonth()),null==n&&(n=a.getDate())}null==r&&(r=0),null==i&&(i=0),null==o&&(o=0),null==s&&(s=0);var u=new Date(t,e,n,r,i,o,s),c=u.getFullYear();return t<100&&c>=1900&&u.setFullYear(u.getFullYear()-1900),u},e.clone=function(t){return e.fromDateTime(t,t)},e}();t.DateTime=D,t.httpRequest=function(t,e){e||(e={});var i=e.method?f(e.method).toUpperCase():"GET",o=null==e.async||g(e.async),u=e.data;if(null!=u&&"GET"==i){var l=[];for(var h in u){var p=u[h];a(p)&&(p=p.toJSON()),l.push(h+"="+p)}l.length&&(t+=(t.indexOf("?")<0?"?":"&")+l.join("&")),u=null}var d=new XMLHttpRequest;d.URL_DEBUG=t;var m=!1;if(null==u||n(u)||(m=c(u),u=JSON.stringify(u)),d.onload=function(){4==d.readyState&&(d.status<300?e.success&&_(e.success)(d):e.error&&_(e.error)(d),e.complete&&_(e.complete)(d))},d.onerror=function(){if(!s(e.error))throw"HttpRequest Error: "+d.status+" "+d.statusText;e.error(d)},d.open(i,t,o,e.user,e.password),e.user&&e.password&&d.setRequestHeader("Authorization","Basic "+btoa(e.user+":"+e.password)),m&&d.setRequestHeader("Content-Type","application/json"),e.requestHeaders)for(var v in e.requestHeaders)d.setRequestHeader(v,e.requestHeaders[v]);return r(e.timeout)&&(d.timeout=e.timeout),s(e.beforeSend)&&e.beforeSend(d),d.send(u),d}}(wijmo||(wijmo={}));var wijmo;!function(t){"use strict";t.culture=window.wijmo.culture||{Globalize:{numberFormat:{".":".",",":",","-":"-","+":"+","%":"%",percent:{pattern:["-n %","n %"]},currency:{decimals:2,symbol:"$",pattern:["($n)","$n"]}},calendar:{"/":"/",":":":",firstDay:0,days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],am:["AM","A"],pm:["PM","P"],eras:["A.D.","B.C."],patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",t:"h:mm tt",T:"h:mm:ss tt",M:"MMMM d",m:"MMMM d",Y:"MMMM, yyyy",y:"MMMM, yyyy",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt",s:'yyyy"-"MM"-"dd"T"HH":"mm":"ss',o:'yyyy"-"MM"-"dd"T"HH":"mm":"ss"."fffffffK',O:'yyyy"-"MM"-"dd"T"HH":"mm":"ss"."fffffffK',U:"dddd, MMMM dd, yyyy h:mm:ss tt"},fiscalYearOffsets:[-3,-3]}}};var e=function(){function e(){}return e.format=function(n,r,i,o){return t.isString(n)?n:t.isNumber(n)?(r=r||(n==Math.round(n)?"n0":"n2"),e.formatNumber(n,r,i,o)):t.isDate(n)?(r=r||"d",e.formatDate(n,r)):null!=n?n.toString():""},e.formatNumber=function(n,r,i,o){n=t.asNumber(n),r=t.asString(r);var s,a=t.culture.Globalize.numberFormat,u=r?r.match(/([a-z])(\d*)(,*)(.*)/i):null,c=u?u[1].toLowerCase():"n",l=u&&u[2]?parseInt(u[2]):"c"==c?a.currency.decimals:n==Math.round(n)?0:2,h=u&&u[3]?3*u[3].length:0,p=a["."]||".",f=a[","]||",",d=a["-"]||"-";if(h&&(n/=Math.pow(10,h)),"d"==c||"x"==c){for(s=Math.round(Math.abs(n)).toString("d"==c?10:16);s.length<l;)s="0"+s;return n<0&&(s=d+s),r&&"X"==r[0]&&(s=s.toUpperCase()),s}if("p"==c&&(n=e._mul100(n),n=t.toFixed(n,l,o)),o&&"p"!=c&&(n=t.toFixed(n,l,!0)),s=e._toFixedStr("c"==c||"p"==c?Math.abs(n):n,l),(i||"g"==c)&&s.indexOf(".")>-1&&(s=(s=s.replace(/(\.[0-9]*?)0+$/g,"$1")).replace(/\.$/,"")),"."!=p&&(s=s.replace(".",p)),"-"!=d&&(s=s.replace("-",d)),f&&("n"==c||"c"==c||"p"==c)){var g=s.indexOf(p),_=/\B(?=(\d\d\d)+(?!\d))/g;s=g>-1?s.substr(0,g).replace(_,f)+s.substr(g):s.replace(_,f)}if("c"==c){var m=a.currency.pattern[n<0?0:1],v=u&&u[4]?u[4]:a.currency.symbol;"​"==v&&(v=""),s=m.replace("n",s).replace("$",v)}if("p"==c){var m=a.percent.pattern[n<0?0:1],y=a["%"]||"%";s=m.replace("n",s),"%"!=y&&(s=s.replace("%",y)),"-"!=d&&n<0&&(s=s.replace("-",d))}return s},e.formatDate=function(n,r){switch(n=t.asDate(n),r){case"r":case"R":return n.toUTCString();case"u":return n.toISOString().replace(/\.\d{3}/,"")}r=e._expandFormat(r);for(var i=e._parseDateFormat(r),o="",s=0;s<i.length;s++)o+=e._formatDatePart(n,r,i[s]);return o},e.parseInt=function(t,n){return Math.round(e.parseFloat(t,n))},e.parseFloat=function(e,n){var r=t.culture.Globalize.numberFormat,i=r["-"]||"-",o=r["%"]||"%",s=e.indexOf(i)>-1||e.indexOf("(")>-1&&e.indexOf(")")>-1?-1:1,a=e.indexOf(o)>-1?.01:1,u=n?n.match(/,+/):null,c=u?3*u[0].length:0,l=0;if(!n||"x"!=n[0]&&"X"!=n[0]){var h=r["."]||".",p=new RegExp("[^\\d\\"+h+"]","g");e=e.replace(p,"").replace(h,"."),l=parseFloat(e)}else e=e.replace(/[^0-9a-f]+.*$/gi,""),l=parseInt(e,16);return l*s*a*Math.pow(10,c)},e.parseDate=function(n,r){if(!(n=t.asString(n)))return null;if("u"==r)return new Date(n);var i;if("R"==r||"r"==r){var o=/(([0-9]+)\-([0-9]+)\-([0-9]+))?\s?(([0-9]+):([0-9]+)(:([0-9]+))?)?/,s=n.match(o);return s[1]||s[5]?(i=s[1]?new Date(parseInt(s[2]),parseInt(s[3])-1,parseInt(s[4])):new Date,s[5]&&(i.setHours(parseInt(s[6])),i.setMinutes(parseInt(s[7])),i.setSeconds(s[8]?parseInt(s[9]):0))):i=new Date(n),isNaN(i.getTime())?null:i}r=e._expandFormat(r||"d");var a,u,c,l,h,p,f=t.culture.Globalize.calendar,d=e._CJK,g=new RegExp("(\\"+f["/"]+")|(\\"+f[":"]+")|(\\d+)|(["+d+"\\.]{2,})|(["+d+"]+)","gi"),_=n.match(g),m=e._parseDateFormat(r),v=0,y=-1,b=0,C=1,w=0,E=0,A=0,x=0,M=-1;if(!(_&&_.length&&m&&m.length))return null;for(var O=0;O<m.length&&_;O++){var T=O-v,S=T>-1&&T<_.length?_[T]:"",P=m[O].length;switch(m[O]){case"EEEE":case"EEE":case"EE":case"E":case"eeee":case"eee":case"ee":case"e":p=m[O];case"yyyy":case"yyy":case"yy":case"y":P>1&&S.length>P&&(_[T]=S.substr(P),S=S.substr(0,P),v++),y=parseInt(S),h=4==S.length;break;case"MMMM":case"MMM":l=!0;var F=S.toLowerCase();b=-1;for(var I=0;I<12;I++)if(0==f.months[I].toLowerCase().indexOf(F)){b=I;break}if(b>-1)break;case"MM":case"M":l=!0,P>1&&S.length>P&&(_[T]=S.substr(P),S=S.substr(0,P),v++),b=parseInt(S)-1;break;case"dddd":case"ddd":a=!0;break;case"dd":case"d":P>1&&S.length>P&&(_[T]=S.substr(P),S=S.substr(0,P),v++),C=parseInt(S),u=!0;break;case"hh":case"h":P>1&&S.length>P&&(_[T]=S.substr(P),S=S.substr(0,P),v++),w=12==(w=parseInt(S))?0:w;break;case"HH":P>1&&S.length>P&&(_[T]=S.substr(P),S=S.substr(0,P),v++),w=parseInt(S);break;case"H":w=parseInt(S);break;case"mm":case"m":P>1&&S.length>P&&(_[T]=S.substr(P),S=S.substr(0,P),v++),E=parseInt(S);break;case"ss":case"s":P>1&&S.length>P&&(_[T]=S.substr(P),S=S.substr(0,P),v++),A=parseInt(S);break;case"fffffff":case"FFFFFFF":case"ffffff":case"FFFFFF":case"fffff":case"FFFFF":case"ffff":case"FFFF":case"fff":case"FFF":case"ff":case"FF":case"f":case"F":x=parseInt(S)/Math.pow(10,P-3);break;case"tt":case"t":S=S.toUpperCase(),w<12&&f.pm.indexOf(S)>-1&&(w+=12);break;case"q":case"Q":case"u":case"U":c=!0;break;case"ggg":case"gg":case"g":M=f.eras.length>1?e._getEra(S,f):-1;break;case f["/"]:case f[":"]:if(S&&S!=m[O])return null;break;case"K":break;default:e._unquote(m[O]).trim()!=S.trim()&&v++}}if(l&&u&&(isNaN(w)&&(w=0),isNaN(E)&&(E=0),isNaN(A)&&(A=0)),b<0||b>11||isNaN(b)||C<1||C>31||isNaN(C)||w<0||w>24||isNaN(w)||E<0||E>60||isNaN(E)||A<0||A>60||isNaN(A))return null;if(p){if(!l)return null;var D=t.culture.Globalize.calendar;if(t.isArray(D.fiscalYearOffsets)){var j="E"==p[0],N=b-D.fiscalYearOffsets[j?0:1];y+=N>11?-1:N<0?1:0}}return a&&!u?null:c&&!l?null:(y<0&&(y=(new Date).getFullYear()),M>-1?y=y+f.eras[M].start.getFullYear()-1:y<100&&!h&&(y+=y+2e3<(t.isNumber(f.twoDigitYearMax)?f.twoDigitYearMax:2029)?2e3:1900),C>new Date(y,b+1,0).getDate()?null:(i=t.DateTime.newDate(y,b,C,w,E+0,A,x),isNaN(i.getTime())?null:i))},e.getFirstDayOfWeek=function(){var e=t.culture.Globalize.calendar.firstDay;return e||0},e.getNumberDecimalSeparator=function(){var e=t.culture.Globalize.numberFormat["."];return e||"."},e._toFixedStr=function(t,e){var n=t.toString(),r=n.indexOf("."),i=e-(n.length-r)+1;return n.indexOf("e")<0&&r>-1&&i>=0?n+Array(i+1).join("0"):t.toFixed(e)},e._unquote=function(t){return t.length>1&&t[0]==t[t.length-1]&&("'"==t[0]||'"'==t[0])?t.substr(1,t.length-2):t},e._parseDateFormat=function(t){if(t in e._dateFormatParts)return e._dateFormatParts[t];var n,r,i=[];if(t)for(n=0;n>-1&&n<t.length;n++){var o=t[n];if(("'"==o||'"'==o)&&(r=t.indexOf(o,n+1))>-1)i.push(t.substring(n,r+1)),n=r;else if("\\"==o&&n<t.length-1)n++,i.push('"'+t[n]+'"');else{for(r=n+1;r<t.length&&t[r]==o;r++);i.push(t.substring(n,r)),n=r-1}}return e._dateFormatParts[t]=i,i},e._formatDatePart=function(n,r,i){var o,s=t.culture.Globalize.calendar,a=0,u=0,c=0,l=i.length;switch(i){case"yyyy":case"yyy":case"yy":case"y":case"EEEE":case"EEE":case"EE":case"E":case"eeee":case"eee":case"ee":case"e":u=(o="E"==i[0]?t.DateTime.toFiscal(n,!0):"e"==i[0]?t.DateTime.toFiscal(n,!1):n).getFullYear(),s.eras.length>1&&r.indexOf("g")>-1&&(a=e._getEra(n,s))>-1&&(u=u-s.eras[a].start.getFullYear()+1);var h=i.length<3?u%100:3==i.length?u%1e3:u;return e._zeroPad(h,i.length);case"MMMMM":return s.monthsAbbr[n.getMonth()][0];case"MMMM":return s.months[n.getMonth()];case"MMM":return s.monthsAbbr[n.getMonth()];case"MM":case"M":return e._zeroPad(n.getMonth()+1,l);case"dddd":return s.days[n.getDay()];case"ddd":return s.daysAbbr[n.getDay()];case"dd":return e._zeroPad(n.getDate(),2);case"d":return n.getDate().toString();case"hh":case"h":return e._zeroPad(e._h12(n),l);case"HH":case"H":return e._zeroPad(n.getHours(),l);case"mm":case"m":return e._zeroPad(n.getMinutes(),l);case"ss":case"s":return e._zeroPad(n.getSeconds(),l);case"fffffff":case"FFFFFFF":case"ffffff":case"FFFFFF":case"fffff":case"FFFFF":case"ffff":case"FFFF":case"fff":case"FFF":case"ff":case"FF":case"f":case"F":return c=n.getMilliseconds()*Math.pow(10,l-3),"f"==i[0]?e._zeroPad(c,l):c.toFixed(0);case"tt":return n.getHours()<12?s.am[0]:s.pm[0];case"t":return n.getHours()<12?s.am[1]:s.pm[1];case"q":case"Q":return(Math.floor(n.getMonth()/3)+1).toString();case"u":case"U":return o=t.DateTime.toFiscal(n,"U"==i),(Math.floor(o.getMonth()/3)+1).toString();case"ggg":case"gg":case"g":return s.eras.length>1&&(a=e._getEra(n,s))>-1?"ggg"==i?s.eras[a].name:"gg"==i?s.eras[a].name[0]:s.eras[a].symbol:s.eras[0];case":":case"/":return s[i];case"K":var p=n.toString().match(/(\+|\-)(\d{2})(\d{2})/);return p?p[1]+p[2]+p[3]:"";case"zzz":case"zz":case"z":var f=-n.getTimezoneOffset(),d=void 0;switch(i){case"zzz":d=e.format(f/60,"d2",!1,!0)+s[":"]+e.format(f%60,"d2",!1,!0);break;case"zz":d=e.format(f/60,"d2",!1,!0);break;case"z":d=e.format(f/60,"d",!1,!0)}return f>=0?"+"+d:d}return l>1&&i[0]==i[l-1]&&('"'==i[0]||"'"==i[0])?i.substr(1,l-2):i},e._getEra=function(e,n){if(t.isDate(e)){for(r=0;r<n.eras.length;r++)if(e>=n.eras[r].start)return r}else if(t.isString(e))for(var r=0;r<n.eras.length;r++)if(n.eras[r].name&&(0==n.eras[r].name.indexOf(e)||0==n.eras[r].symbol.indexOf(e)))return r;return-1},e._expandFormat=function(e){var n=t.culture.Globalize.calendar.patterns[e];return n||e},e._zeroPad=function(t,e){var n=t.toFixed(0),r=e-n.length+1;return r>0?Array(r).join("0")+n:n},e._h12=function(e){var n=t.culture.Globalize.calendar,r=e.getHours();return n.am&&n.am[0]&&0==(r%=12)&&(r=12),r},e._mul100=function(t){var e=t.toString(),n=e.indexOf(".");return e.indexOf("e")>-1?100*t:(n<0?e+="00":(n+=2,e=(e=e.replace(".","")+"00").substr(0,n)+"."+e.substr(n)),parseFloat(e))},e._CJK="a-z"+"u00c0-u017fu3000-u30ffu4e00-u9faf".replace(/u/g,"\\u")+"u1100-u11ffu3130-u318fua960-ua97fuac00-ud7afud7b0-ud7ff".replace(/u/g,"\\u"),e._dateFormatParts={},e}();t.Globalize=e,t._updateCulture=function(){t.culture=window.wijmo.culture}}(wijmo||(wijmo={}));var wijmo;!function(t){"use strict";var e=function(){function t(t){this.path=t}return Object.defineProperty(t.prototype,"path",{get:function(){return this._path},set:function(t){this._path=t,this._parts=t?t.split("."):[];for(var e=0;e<this._parts.length;e++){var n=this._parts[e],r=n.indexOf("[");r>-1&&(this._parts[e]=n.substr(0,r),this._parts.splice(++e,0,parseInt(n.substr(r+1))))}this._key=1==this._parts.length?this._parts[0]:null},enumerable:!0,configurable:!0}),t.prototype.getValue=function(t){if(t){if(this._key)return t[this._key];if(this._path&&this._path in t)return t[this._path];for(var e=0;e<this._parts.length&&t;e++)t=t[this._parts[e]]}return t},t.prototype.setValue=function(t,e){if(t){if(this._path in t)return void(t[this._path]=e);for(var n=0;n<this._parts.length-1;n++)if(null==(t=t[this._parts[n]]))return;t[this._parts[this._parts.length-1]]=e}},t}();t.Binding=e}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wijmo;!function(t){"use strict";var e=function(){return function(t,e){this.handler=t,this.self=e}}(),n=function(){function n(){this._handlers=[]}return n.prototype.addHandler=function(n,r){n=t.asFunction(n),this._handlers.push(new e(n,r))},n.prototype.removeHandler=function(e,n){e=t.asFunction(e);for(var r=0;r<this._handlers.length;r++){var i=this._handlers[r];if((i.handler==e||null==e)&&(i.self==n||null==n)&&(this._handlers.splice(r,1),e&&n))break}},n.prototype.removeAllHandlers=function(){this._handlers.length=0},n.prototype.raise=function(t,e){void 0===e&&(e=r.empty);for(var n=0;n<this._handlers.length;n++){var i=this._handlers[n];i.handler.call(i.self,t,e)}},Object.defineProperty(n.prototype,"hasHandlers",{get:function(){return this._handlers.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"handlerCount",{get:function(){return this._handlers.length},enumerable:!0,configurable:!0}),n}();t.Event=n;var r=function(){function t(){}return t.empty=new t,t}();t.EventArgs=r;var i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cancel=!1,e}return __extends(e,t),e}(r);t.CancelEventArgs=i;var o=function(t){function e(e,n,r){var i=t.call(this)||this;return i._name=e,i._oldVal=n,i._newVal=r,i}return __extends(e,t),Object.defineProperty(e.prototype,"propertyName",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"oldValue",{get:function(){return this._oldVal},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"newValue",{get:function(){return this._newVal},enumerable:!0,configurable:!0}),e}(r);t.PropertyChangedEventArgs=o;var s=function(t){function e(e,n){var r=t.call(this)||this;return r._xhr=e,r._msg=n,r}return __extends(e,t),Object.defineProperty(e.prototype,"request",{get:function(){return this._xhr},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){return this._msg},set:function(t){this._msg=t},enumerable:!0,configurable:!0}),e}(i);t.RequestErrorEventArgs=s}(wijmo||(wijmo={}));var wijmo;!function(t){"use strict";var e=function(){function e(n,r,i){void 0===r&&(r=null),void 0===i&&(i=!1);var o=this;this._pristine=!0,this._focus=!1,this._updating=0,this._fullUpdate=!1,this.gotFocus=new t.Event,this.lostFocus=new t.Event,this.refreshing=new t.Event,this.refreshed=new t.Event,this._updateWme(),t.assert(null==e.getControl(n),"Element is already hosting a control.");var s=t.getElement(n);if(t.assert(null!=s,"Cannot find the host element."),this._orgOuter=s.outerHTML,this._orgTag=s.tagName,this._orgAtts=s.attributes,"INPUT"!=s.tagName&&"SELECT"!=s.tagName||(s=this._replaceWithDiv(s)),this._e=s,s[e._CTRL_KEY]=this,1==i){this._szCtl=new t.Size(s.offsetWidth,s.offsetHeight);var a=this._handleResize.bind(this);this.addEventListener(window,"resize",a)}var u;this.addEventListener(s,"focus",function(t){u&&clearTimeout(u),u=setTimeout(function(){u=null,o._updateFocusState()},e._FOCUS_INTERVAL)},!0),this.addEventListener(s,"blur",function(t){u&&clearTimeout(u),u=setTimeout(function(){u=null,o._updateFocusState()},e._FOCUS_INTERVAL)},!0);var c=this._handleDisabled.bind(this);if(this.addEventListener(s,"mousedown",c,!0),this.addEventListener(s,"mouseup",c,!0),this.addEventListener(s,"click",c,!0),this.addEventListener(s,"dblclick",c,!0),this.addEventListener(s,"keydown",c,!0),this.addEventListener(s,"wheel",c,t.getEventOptions(!0,!0)),null==e._touching&&(e._touching=!1,"ontouchstart"in window||"onpointerdown"in window)){var l=document.body,h=this._handleTouchStart,p=this._handleTouchEnd,f=t.getEventOptions(!0,!0);"ontouchstart"in window?(l.addEventListener("touchstart",h,f),l.addEventListener("touchend",p,f),l.addEventListener("touchcancel",p,f),l.addEventListener("touchleave",p,f)):"onpointerdown"in window&&(l.addEventListener("pointerdown",h,f),l.addEventListener("pointerup",p,f),l.addEventListener("pointerout",p,f),l.addEventListener("pointercancel",p,f),l.addEventListener("pointerleave",p,f))}}return e.prototype.getTemplate=function(){for(var t=Object.getPrototypeOf(this);t;t=Object.getPrototypeOf(t)){var e=t.constructor.controlTemplate;if(e)return e}return null},e.prototype.applyTemplate=function(n,r,i,o){var s=this,a=this._e;n&&t.addClass(a,n);var u=null;r&&(u=t.createElement(r,a));var c=a.querySelectorAll("input"),l=1==c.length?c[0]:null;if(l&&(this._copyAttributes(l,a.attributes,e._rxInputAtts),this._copyAttributes(l,this._orgAtts,e._rxInputAtts)),l&&a.id){for(var h=a;h.parentElement;)h=h.parentElement;var p=h.querySelector('label[for="'+a.id+'"]');if(p instanceof HTMLLabelElement){var f=t.getUniqueId(a.id+"_input");l.id=f,p.htmlFor=f}}if(l){var d=document.createEvent("HTMLEvents"),g=l.value;d.initEvent("change",!0,!1),this.addEventListener(l,"input",function(){s._pristine=!1,g=l.value},!0),this.gotFocus.addHandler(function(){g=l.value}),this.lostFocus.addHandler(function(){s._pristine&&(s._pristine=!1,s._updateState()),g!=l.value&&l.dispatchEvent(d)})}if(l?a.tabIndex=-1:a.getAttribute("tabindex")||(a.tabIndex=0),this._updateState(),i)for(var _ in i){var m=i[_];if(this[_]=u.querySelector('[wj-part="'+m+'"]'),null==this[_]&&u.getAttribute("wj-part")==m&&(this[_]=u),null==this[_])throw'Missing template part: "'+m+'"';if(m==o){var v="name",y=a.attributes[v];y&&y.value&&this[_].setAttribute(v,y.value),v="accesskey",(y=a.attributes[v])&&y.value&&(this[_].setAttribute(v,y.value),a.removeAttribute(v))}}return u},e.prototype.dispose=function(){for(var n=this._e.querySelectorAll(".wj-control"),r=0;r<n.length;r++){var i=e.getControl(n[r]);i&&i.dispose()}this._toInv&&(clearTimeout(this._toInv),this._toInv=null),this.removeEventListener();for(var o in this)o.length>2&&0==o.indexOf("on")&&(a=this[o[2].toLowerCase()+o.substr(3)])instanceof t.Event&&a.removeAllHandlers();var s=this.collectionView;if(s instanceof t.collections.CollectionView)for(var o in s){var a=s[o];a instanceof t.Event&&a.removeHandler(null,this)}this._e.parentNode&&(this._e.outerHTML=this._orgOuter),this._e[e._CTRL_KEY]=null,this._e=this._orgOuter=this._orgTag=null},e.getControl=function(n){var r=t.getElement(n);return r?t.asType(r[e._CTRL_KEY],e,!0):null},Object.defineProperty(e.prototype,"hostElement",{get:function(){return this._e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rightToLeft",{get:function(){return null==this._rtlDir&&(this._rtlDir=!!this._e&&"rtl"==getComputedStyle(this._e).direction),this._rtlDir},enumerable:!0,configurable:!0}),e.prototype.focus=function(){this._e&&this._e.focus()},e.prototype.containsFocus=function(){var n=this._e,r=t.getActiveElement();if(!n)return!1;for(var i=r;i;){if(i==n)return!0;i=i[e._OWNR_KEY]||i.parentElement}return!1},e.prototype.invalidate=function(t){var n=this;void 0===t&&(t=!0),this._rtlDir=null,this._fullUpdate=this._fullUpdate||t,this._toInv&&(clearTimeout(this._toInv),this._toInv=null),this.isUpdating||(this._toInv=setTimeout(function(){n.refresh(n._fullUpdate),n._toInv=null},e._REFRESH_INTERVAL))},e.prototype.refresh=function(t){var e=this;void 0===t&&(t=!0),this.isUpdating||(this.onRefreshing(),setTimeout(function(){e.onRefreshed()})),!this.isUpdating&&this._toInv&&(clearTimeout(this._toInv),this._toInv=null,this._rtlDir=null,this._fullUpdate=!1,this._updateWme())},e.invalidateAll=function(t){if(t||(t=document.body),t.children)for(var n=0;n<t.children.length;n++)e.invalidateAll(t.children[n]);var r=e.getControl(t);r&&r.invalidate()},e.refreshAll=function(t){if(t||(t=document.body),t.children)for(var n=0;n<t.children.length;n++)e.refreshAll(t.children[n]);var r=e.getControl(t);r&&r.refresh()},e.disposeAll=function(t){var n=e.getControl(t);if(n)n.dispose();else if(t.children)for(var r=0;r<t.children.length;r++)e.disposeAll(t.children[r])},e.prototype.beginUpdate=function(){this._updating++},e.prototype.endUpdate=function(){this._updating--,this._updating<=0&&this.invalidate()},Object.defineProperty(e.prototype,"isUpdating",{get:function(){return this._updating>0},enumerable:!0,configurable:!0}),e.prototype.deferUpdate=function(t){try{this.beginUpdate(),t()}finally{this.endUpdate()}},Object.defineProperty(e.prototype,"isTouching",{get:function(){return e._touching},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisabled",{get:function(){return this._e&&null!=this._e.getAttribute("disabled")},set:function(e){(e=t.asBoolean(e,!0))!=this.isDisabled&&t.enable(this._e,!e)},enumerable:!0,configurable:!0}),e.prototype.initialize=function(e){e&&t.copy(this,e)},e.prototype.addEventListener=function(t,e,n,r){void 0===r&&(r=!1),t&&(t.addEventListener(e,n,r),null==this._listeners&&(this._listeners=[]),this._listeners.push({target:t,type:e,fn:n,capture:r}))},e.prototype.removeEventListener=function(t,e,n,r){var i=0;if(this._listeners)for(var o=0;o<this._listeners.length;o++){var s=this._listeners[o];null!=t&&t!=s.target||null!=e&&e!=s.type||(null==n||n==s.fn||n&&s.fn&&n.toString()==s.fn.toString())&&(null!=r&&r!=s.capture||(s.target.removeEventListener(s.type,s.fn,s.capture),this._listeners.splice(o,1),o--,i++))}return i},e.prototype.onGotFocus=function(t){this.gotFocus.raise(this,t)},e.prototype.onLostFocus=function(t){this.lostFocus.raise(this,t)},e.prototype.onRefreshing=function(t){this.refreshing.raise(this,t)},e.prototype.onRefreshed=function(t){this.refreshed.raise(this,t)},e.prototype._getProductInfo=function(){return"B0C3,Control"},e.prototype._updateWme=function(){var n=window.wijmo._updateWme;t.isFunction(n)&&n(this,e._licKey)},e.prototype._hasPendingUpdates=function(){return null!=this._toInv},e.prototype._handleResize=function(){if(this._e.parentElement){var e=new t.Size(this._e.offsetWidth,this._e.offsetHeight);e.equals(this._szCtl)||(this._szCtl=e,this.invalidate())}},e.prototype._updateFocusState=function(){setTimeout(function(){for(var n=t.EventArgs.empty,r=document.body.querySelectorAll(".wj-state-focused"),i=0;i<r.length;i++)(a=e.getControl(r[i]))&&a._focus&&!a.containsFocus()&&(a._focus=!1,a._updateState(),a.onLostFocus(n));var o=t.getActiveElement();if(o)for(var s=o;s;){var a=e.getControl(s);a&&!a._focus&&a.containsFocus()&&(a._focus=!0,a._updateState(),a.onGotFocus(n)),s=s[e._OWNR_KEY]||s.parentElement}})},e.prototype._updateState=function(){var e=this.hostElement;if(e){t.toggleClass(e,"wj-state-focused",this._focus);var n=e.querySelector("input");if(n instanceof HTMLInputElement){t.toggleClass(e,"wj-state-empty",0==n.value.length),t.toggleClass(e,"wj-state-readonly",n.readOnly);var r=n.validationMessage;t.toggleClass(e,"wj-state-invalid",!this._pristine&&null!=r&&r.length>0)}}},e.prototype._handleTouchStart=function(t){null!=t.pointerType&&"touch"!=t.pointerType||(e._touching=!0)},e.prototype._handleTouchEnd=function(t){null!=t.pointerType&&"touch"!=t.pointerType||setTimeout(function(){e._touching=!1},800)},e.prototype._handleDisabled=function(t){this.isDisabled&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())},e.prototype._replaceWithDiv=function(t){var e=document.createElement("div");return t.parentElement.replaceChild(e,t),e.innerHTML=t.innerHTML,this._copyAttributes(e,t.attributes,/id|style|class/i),e},e.prototype._copyAttributes=function(t,e,n){if(t)for(var r=0;r<e.length;r++){var i=e[r].name;i.match(n)&&t.setAttribute(i,e[r].value)}},e._REFRESH_INTERVAL=10,e._FOCUS_INTERVAL=20,e._ANIM_DEF_DURATION=400,e._ANIM_DEF_STEP=35,e._CLICK_DELAY=800,e._CLICK_REPEAT=75,e._CLIPBOARD_DELAY=100,e._DRAG_SCROLL_EDGE=15,e._DRAG_SCROLL_STEP=10,e._CTRL_KEY="$WJ-CTRL",e._OWNR_KEY="$WJ-OWNR",e._SCRL_KEY="$WJ-SCRL",e._rxInputAtts=/name|tabindex|placeholder|autofocus|autocomplete|autocorrect|autocapitalize|spellcheck|readonly|minlength|maxlength|pattern|type/i,e}();t.Control=e}(wijmo||(wijmo={}));var wijmo;!function(t){"use strict";var e;!function(t){t[t.None=0]="None",t[t.Sum=1]="Sum",t[t.Cnt=2]="Cnt",t[t.Avg=3]="Avg",t[t.Max=4]="Max",t[t.Min=5]="Min",t[t.Rng=6]="Rng",t[t.Std=7]="Std",t[t.Var=8]="Var",t[t.StdPop=9]="StdPop",t[t.VarPop=10]="VarPop",t[t.CntAll=11]="CntAll",t[t.First=12]="First",t[t.Last=13]="Last"}(e=t.Aggregate||(t.Aggregate={})),t.getAggregate=function(n,r,i){var o=0,s=0,a=0,u=0,c=null,l=null,h=null,p=i?new t.Binding(i):null;if((n=t.asEnum(n,e))==e.CntAll)return r.length;for(var f=0;f<r.length;f++){var d=r[f];if(p&&(d=p.getValue(d)),n==e.First)return d;null!=d&&(o++,(null==c||d<c)&&(c=d),(null==l||d>l)&&(l=d),h=d,t.isNumber(d)&&!isNaN(d)?(s++,a+=d,u+=d*d):t.isBoolean(d)&&(s++,1==d&&(a++,u++)))}var g=0==s?0:a/s;switch(n){case e.Avg:return g;case e.Cnt:return o;case e.Max:return l;case e.Min:return c;case e.Rng:return l-c;case e.Sum:return a;case e.VarPop:return s<=1?0:u/s-g*g;case e.StdPop:return s<=1?0:Math.sqrt(u/s-g*g);case e.Var:return s<=1?0:(u/s-g*g)*s/(s-1);case e.Std:return s<=1?0:Math.sqrt((u/s-g*g)*s/(s-1));case e.Last:return h}throw"Invalid aggregate type."}}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wijmo;!function(t){!function(e){"use strict";var n;!function(t){t[t.Add=0]="Add",t[t.Remove=1]="Remove",t[t.Change=2]="Change",t[t.Reset=3]="Reset"}(n=e.NotifyCollectionChangedAction||(e.NotifyCollectionChangedAction={}));var r=function(t){function e(e,r,i){void 0===e&&(e=n.Reset),void 0===r&&(r=null),void 0===i&&(i=-1);var o=t.call(this)||this;return o.action=e,o.item=r,o.index=i,o}return __extends(e,t),e.reset=new e(n.Reset),e}(t.EventArgs);e.NotifyCollectionChangedEventArgs=r;var i=function(){function e(e,n){this._bnd=new t.Binding(e),this._asc=n}return Object.defineProperty(e.prototype,"property",{get:function(){return this._bnd.path},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ascending",{get:function(){return this._asc},enumerable:!0,configurable:!0}),e}();e.SortDescription=i;var o=function(t){function e(e){var n=t.call(this)||this;return n.newPageIndex=e,n}return __extends(e,t),e}(t.CancelEventArgs);e.PageChangingEventArgs=o;var s=function(){function t(){}return t.prototype.groupNameFromItem=function(t,e){return""},t.prototype.namesMatch=function(t,e){return t===e},t}();e.GroupDescription=s;var a=function(e){function n(n,r){var i=e.call(this)||this;return i._bnd=new t.Binding(n),i._converter=r,i}return __extends(n,e),Object.defineProperty(n.prototype,"propertyName",{get:function(){return this._bnd.path},enumerable:!0,configurable:!0}),n.prototype.groupNameFromItem=function(t,e){return this._converter?this._converter(t,this.propertyName):this._bnd.getValue(t)},n.prototype.namesMatch=function(t,e){return t===e},n}(s);e.PropertyGroupDescription=a}(t.collections||(t.collections={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wijmo;!function(t){!function(e){"use strict";var n=function(t){function e(){var e=this;return r?e.length=0:e=t.call(this)||this,e}return __extends(e,t),e}(Array);e.ArrayBase=n;var r=!0;try{n.prototype=Array.prototype,r=n.prototype===Array.prototype}catch(t){r=!1}var i=window.Symbol;!r&&i&&i.species&&Object.defineProperty(n,i.species,{get:function(){return Array},enumerable:!1,configurable:!1});var o=function(n){function r(e){var r=n.call(this)||this;if(r._updating=0,r.collectionChanged=new t.Event,e){e=t.asArray(e),r._updating++;for(var i=0;i<e.length;i++)r.push(e[i]);r._updating--}return r}return __extends(r,n),r.prototype.push=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var i=this.length,o=0;t&&o<t.length;o++)i=n.prototype.push.call(this,t[o]),this._updating||this._raiseCollectionChanged(e.NotifyCollectionChangedAction.Add,t[o],i-1);return i},r.prototype.pop=function(){var t=n.prototype.pop.call(this);return this._raiseCollectionChanged(e.NotifyCollectionChangedAction.Remove,t,this.length),t},r.prototype.splice=function(t,r,i){var o;return r&&i?(o=n.prototype.splice.call(this,t,r,i),1==r?this._raiseCollectionChanged(e.NotifyCollectionChangedAction.Change,i,t):this._raiseCollectionChanged(),o):i?(o=n.prototype.splice.call(this,t,0,i),this._raiseCollectionChanged(e.NotifyCollectionChangedAction.Add,i,t),o):(o=n.prototype.splice.call(this,t,r),1==r?this._raiseCollectionChanged(e.NotifyCollectionChangedAction.Remove,o[0],t):this._raiseCollectionChanged(),o)},r.prototype.slice=function(t,e){return n.prototype.slice.call(this,t,e)},r.prototype.indexOf=function(t,e){return n.prototype.indexOf.call(this,t,e)},r.prototype.sort=function(t){var e=n.prototype.sort.call(this,t);return this._raiseCollectionChanged(),e},r.prototype.insert=function(t,e){this.splice(t,0,e)},r.prototype.remove=function(t){var e=this.indexOf(t);return e>-1&&(this.removeAt(e),!0)},r.prototype.removeAt=function(t){this.splice(t,1)},r.prototype.setAt=function(t,e){t>this.length&&(this.length=t),this.splice(t,1,e)},r.prototype.clear=function(){0!==this.length&&(this.splice(0,this.length),this._raiseCollectionChanged())},r.prototype.beginUpdate=function(){this._updating++},r.prototype.endUpdate=function(){this._updating>0&&(this._updating--,0==this._updating&&this._raiseCollectionChanged())},Object.defineProperty(r.prototype,"isUpdating",{get:function(){return this._updating>0},enumerable:!0,configurable:!0}),r.prototype.deferUpdate=function(t){try{this.beginUpdate(),t()}finally{this.endUpdate()}},r.prototype.implementsInterface=function(t){return"INotifyCollectionChanged"==t},r.prototype.onCollectionChanged=function(t){void 0===t&&(t=e.NotifyCollectionChangedEventArgs.reset),this.isUpdating||this.collectionChanged.raise(this,t)},r.prototype._raiseCollectionChanged=function(t,n,r){if(void 0===t&&(t=e.NotifyCollectionChangedAction.Reset),!this.isUpdating){var i=new e.NotifyCollectionChangedEventArgs(t,n,r);this.onCollectionChanged(i)}},r}(n);e.ObservableArray=o}(t.collections||(t.collections={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var n=function(){function n(n,r){var i=this;this._idx=-1,this._srtDsc=new e.ObservableArray,this._grpDesc=new e.ObservableArray,this._newItem=null,this._edtItem=null,this._pgSz=0,this._pgIdx=0,this._updating=0,this._stableSort=!1,this._canFilter=!0,this._canGroup=!0,this._canSort=!0,this._canAddNew=!0,this._canCancelEdit=!0,this._canRemove=!0,this._canChangePage=!0,this._trackChanges=!1,this._chgAdded=new e.ObservableArray,this._chgRemoved=new e.ObservableArray,this._chgEdited=new e.ObservableArray,this.collectionChanged=new t.Event,this.sourceCollectionChanging=new t.Event,this.sourceCollectionChanged=new t.Event,this.currentChanged=new t.Event,this.currentChanging=new t.Event,this.pageChanged=new t.Event,this.pageChanging=new t.Event,this._srtDsc.collectionChanged.addHandler(function(){for(var n=i._srtDsc,r=0;r<n.length;r++)t.assert(n[r]instanceof e.SortDescription,"sortDescriptions array must contain SortDescription objects.");i.canSort&&i.refresh()}),this._grpDesc.collectionChanged.addHandler(function(){for(var n=i._grpDesc,r=0;r<n.length;r++)t.assert(n[r]instanceof e.GroupDescription,"groupDescriptions array must contain GroupDescription objects.");i.canGroup&&i.refresh()}),this.sourceCollection=n||new e.ObservableArray,r&&(this.beginUpdate(),t.copy(this,r),this.endUpdate())}return n.prototype._copy=function(n,r){if("sortDescriptions"==n){this.sortDescriptions.clear();for(var i=t.asArray(r),o=0;o<i.length;o++){s=i[o];t.isString(s)&&(s=new e.SortDescription(s,!0)),this.sortDescriptions.push(s)}return!0}if("groupDescriptions"==n){this.groupDescriptions.clear();for(var i=t.asArray(r),o=0;o<i.length;o++){var s=i[o];t.isString(s)&&(s=new e.PropertyGroupDescription(s)),this.groupDescriptions.push(s)}return!0}return!1},Object.defineProperty(n.prototype,"newItemCreator",{get:function(){return this._itemCreator},set:function(e){this._itemCreator=t.asFunction(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sortConverter",{get:function(){return this._srtCvt},set:function(e){e!=this._srtCvt&&(this._srtCvt=t.asFunction(e,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sortComparer",{get:function(){return this._srtCmp},set:function(e){e!=this._srtCmp&&(this._srtCmp=t.asFunction(e,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"useStableSort",{get:function(){return this._stableSort},set:function(e){this._stableSort=t.asBoolean(e)},enumerable:!0,configurable:!0}),n.prototype.getAggregate=function(e,n,r){var i=r?this._pgView:this._view;return t.getAggregate(e,i,n)},Object.defineProperty(n.prototype,"trackChanges",{get:function(){return this._trackChanges},set:function(e){this._trackChanges=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"itemsAdded",{get:function(){return this._chgAdded},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"itemsRemoved",{get:function(){return this._chgRemoved},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"itemsEdited",{get:function(){return this._chgEdited},enumerable:!0,configurable:!0}),n.prototype.clearChanges=function(){this._chgAdded.clear(),this._chgRemoved.clear(),this._chgEdited.clear()},n.prototype.implementsInterface=function(t){switch(t){case"ICollectionView":case"IEditableCollectionView":case"IPagedCollectionView":case"INotifyCollectionChanged":return!0}return!1},Object.defineProperty(n.prototype,"getError",{get:function(){return this._getError},set:function(e){this._getError=t.asFunction(e)},enumerable:!0,configurable:!0}),n.prototype.onCollectionChanged=function(t){void 0===t&&(t=e.NotifyCollectionChangedEventArgs.reset),t.action!=e.NotifyCollectionChangedAction.Change||this._committing||this._canceling||t.item==this.currentEditItem||t.item==this.currentAddItem||this._trackItemChanged(t.item),this.collectionChanged.raise(this,t)},n.prototype._raiseCollectionChanged=function(t,n,r){void 0===t&&(t=e.NotifyCollectionChangedAction.Reset);var i=new e.NotifyCollectionChangedEventArgs(t,n,r);this.onCollectionChanged(i)},n.prototype._notifyItemChanged=function(t){var n=new e.NotifyCollectionChangedEventArgs(e.NotifyCollectionChangedAction.Change,t,this.items.indexOf(t));this.onCollectionChanged(n)},n.prototype.onSourceCollectionChanging=function(t){return this.sourceCollectionChanging.raise(this,t),!t.cancel},n.prototype.onSourceCollectionChanged=function(t){this.sourceCollectionChanged.raise(this,t)},Object.defineProperty(n.prototype,"canFilter",{get:function(){return this._canFilter},set:function(e){this._canFilter=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"canGroup",{get:function(){return this._canGroup},set:function(e){this._canGroup=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"canSort",{get:function(){return this._canSort},set:function(e){this._canSort=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"currentItem",{get:function(){return this._pgView&&this._idx>-1&&this._idx<this._pgView.length?this._pgView[this._idx]:null},set:function(t){this.moveCurrentTo(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"currentPosition",{get:function(){return this._idx},set:function(e){this.moveCurrentToPosition(t.asNumber(e))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"filter",{get:function(){return this._filter},set:function(e){this._filter!=e&&(this._filter=t.asFunction(e),this.canFilter&&this.refresh())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"groupDescriptions",{get:function(){return this._grpDesc},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"groups",{get:function(){return this._groups},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isEmpty",{get:function(){return!this._pgView||!this._pgView.length},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sortDescriptions",{get:function(){return this._srtDsc},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sourceCollection",{get:function(){return this._src},set:function(e){if(e!=this._src){if(!this.onSourceCollectionChanging(new t.CancelEventArgs))return;var n=this.currentPosition;this.commitEdit(),this.commitNew(),null!=this._ncc&&this._ncc.collectionChanged.removeHandler(this._sourceChanged),this._src=t.asArray(e,!1),this._ncc=t.tryCast(this._src,"INotifyCollectionChanged"),this._ncc&&this._ncc.collectionChanged.addHandler(this._sourceChanged,this),this.clearChanges(),this.refresh(),this.moveCurrentToFirst(),this.onSourceCollectionChanged(),this.currentPosition<0&&n>-1&&this.onCurrentChanged()}},enumerable:!0,configurable:!0}),n.prototype._sourceChanged=function(t,e){this._updating<=0&&this.refresh()},n.prototype.contains=function(t){return this._pgView.indexOf(t)>-1},n.prototype.moveCurrentTo=function(t){return this.moveCurrentToPosition(this._pgView.indexOf(t))},n.prototype.moveCurrentToFirst=function(){return this.moveCurrentToPosition(0)},n.prototype.moveCurrentToLast=function(){return this.moveCurrentToPosition(this._pgView.length-1)},n.prototype.moveCurrentToPrevious=function(){return this._idx>0&&this.moveCurrentToPosition(this._idx-1)},n.prototype.moveCurrentToNext=function(){return this.moveCurrentToPosition(this._idx+1)},n.prototype.moveCurrentToPosition=function(e){if(e>=-1&&e<this._pgView.length&&e!=this._idx){var n=new t.CancelEventArgs;if(this.onCurrentChanging(n)){var r=this._pgView[e];this._edtItem&&r!=this._edtItem&&this.commitEdit(),this._newItem&&r!=this._newItem&&this.commitNew(),this._idx=e,this.onCurrentChanged()}}return this._idx==e},n.prototype.refresh=function(){this._newItem||this._edtItem?this._pendingRefresh=!0:this._updating<=0&&(this._performRefresh(),this.onCollectionChanged())},n.prototype._performRefresh=function(){if(!(this._updating>0)){this._pendingRefresh=!1;var e=this.currentItem;this._view=this._src?this._performFilter(this._src):[],this.canSort&&this._srtDsc.length>0&&(this._view==this._src&&(this._view=this._src.slice()),this._performSort(this._view)),this._groups=this.canGroup?this._createGroups(this._view):null,this._fullGroups=this._groups,this._groups&&(this._view=this._mergeGroupItems(this._groups)),this._pgIdx=t.clamp(this._pgIdx,0,this.pageCount-1),this._pgView=this._getPageView(),this._groups&&this.pageCount>1&&(this._groups=this._createGroups(this._pgView),this._mergeGroupItems(this._groups));var n=this._pgView.indexOf(e);n<0&&(n=Math.min(this._idx,this._pgView.length-1)),this._idx=n,this._digest=this._getGroupsDigest(this.groups),this.currentItem!==e&&this.onCurrentChanged()}},n.prototype._performSort=function(t){if(this._stableSort){var e=t.map(function(t,e){return{item:t,index:e}}),n=this._compareItems();e.sort(function(t,e){var r=n(t.item,e.item);return 0==r?t.index-e.index:r});for(var r=0;r<t.length;r++)t[r]=e[r].item}else t.sort(this._compareItems())},n.prototype._compareItems=function(){var t=this._srtDsc,e=this._srtCvt,n=this._srtCmp,r=!0,i=0;return function(o,s){for(var a=0;a<t.length;a++){var u=t[a],c=u._bnd.getValue(o),l=u._bnd.getValue(s);if(e&&(c=e(u,o,c,r),l=e(u,s,l,!1),r=!1),n&&null!=(i=n(c,l)))return u.ascending?+i:-i;if(c!==c&&(c=null),l!==l&&(l=null),"string"==typeof c&&"string"==typeof l){var h=c.toLowerCase(),p=l.toLowerCase();h!=p&&(c=h,l=p)}if(null!=c&&null==l)return-1;if(null==c&&null!=l)return 1;if(0!=(i=c<l?-1:c>l?1:0))return u.ascending?+i:-i}return 0}},n.prototype._performFilter=function(t){return this.canFilter&&this._filter?t.filter(this._filter,this):t},n.prototype.onCurrentChanged=function(e){void 0===e&&(e=t.EventArgs.empty),this.currentChanged.raise(this,e)},n.prototype.onCurrentChanging=function(t){return this.currentChanging.raise(this,t),!t.cancel},Object.defineProperty(n.prototype,"items",{get:function(){return this._pgView},enumerable:!0,configurable:!0}),n.prototype.beginUpdate=function(){this._updating++},n.prototype.endUpdate=function(){this._updating--,this._updating<=0&&this.refresh()},Object.defineProperty(n.prototype,"isUpdating",{get:function(){return this._updating>0},enumerable:!0,configurable:!0}),n.prototype.deferUpdate=function(t){try{this.beginUpdate(),t()}finally{this.endUpdate()}},Object.defineProperty(n.prototype,"canAddNew",{get:function(){return this._canAddNew},set:function(e){this._canAddNew=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"canCancelEdit",{get:function(){return this._canCancelEdit},set:function(e){this._canCancelEdit=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"canRemove",{get:function(){return this._canRemove},set:function(e){this._canRemove=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"currentAddItem",{get:function(){return this._newItem},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"currentEditItem",{get:function(){return this._edtItem},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isAddingNew",{get:function(){return null!=this._newItem},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isEditingItem",{get:function(){return null!=this._edtItem},enumerable:!0,configurable:!0}),n.prototype.editItem=function(t){t!=this._edtItem&&this.moveCurrentTo(t)&&(this.commitEdit(),this._edtItem=t,this._edtClone={},this._extend(this._edtClone,this._edtItem))},n.prototype.commitEdit=function(){var t=this._edtItem;if(null!=t){this._committing=!0;var n=this._sameContent(t,this._edtClone),r=this._pendingRefresh;this._edtItem=null,this._edtClone=null;var i=this._pgView.indexOf(t),o=this._digest;this._performRefresh(),n||this._trackItemChanged(t),this._pgView.indexOf(t)!=i||o!=this._digest||r?this._raiseCollectionChanged():this._raiseCollectionChanged(e.NotifyCollectionChangedAction.Change,t,i),this._committing=!1}},n.prototype.cancelEdit=function(){var n=this._edtItem;if(null!=n){if(this._edtItem=null,!this.canCancelEdit)return void t.assert(!1,"cannot cancel edits (canCancelEdit == false).");var r=this._src.indexOf(n);r>=0&&this._edtClone&&(this._extend(this._src[r],this._edtClone),this._edtClone=null,this._canceling=!0,this._raiseCollectionChanged(e.NotifyCollectionChangedAction.Change,n,r),this._canceling=!1,this._pendingRefresh&&(this._performRefresh(),this._raiseCollectionChanged()))}},n.prototype.addNew=function(){if(arguments.length>0&&t.assert(!1,"addNew does not take any parameters, it creates the new items."),this.commitEdit(),this.commitNew(),!this.canAddNew)return t.assert(!1,"cannot add items (canAddNew == false)."),null;var n=null,r=this.sourceCollection;if(null!=(n=this.newItemCreator?this.newItemCreator():r&&r.length?new r[0].constructor:{})){if(this._newItem=n,this._updating++,this._src.push(n),this._updating--,this._pgView!=this._src&&this._pgView.push(n),this.groups&&this.groups.length){var i=this.groups[this.groups.length-1];for(i.items.push(n);i.groups&&i.groups.length;)(i=i.groups[i.groups.length-1]).items.push(n)}this._raiseCollectionChanged(e.NotifyCollectionChangedAction.Add,n,this._pgView.length-1),this.moveCurrentTo(n)}return this._newItem},n.prototype.commitNew=function(){var t=this._newItem;if(null!=t){this._newItem=null;var n=this._pgView.indexOf(t),r=this._digest;if(this._performRefresh(),this._trackChanges){var i=this._chgEdited.indexOf(t);i>-1&&this._chgEdited.removeAt(i),this._chgAdded.indexOf(t)<0&&this._chgAdded.push(t)}this._pgView.indexOf(t)==n&&r==this._digest?this._raiseCollectionChanged(e.NotifyCollectionChangedAction.Change,t,n):this._raiseCollectionChanged()}},n.prototype.cancelNew=function(){var t=this._newItem;null!=t&&this.remove(t)},n.prototype.remove=function(n){var r=n==this._newItem;if(r&&(this._newItem=null),n==this._edtItem&&this.cancelEdit(),this.canRemove){var i=this._src.indexOf(n);if(i>-1){var o=this.currentItem;this._updating++,this._src.splice(i,1),this._updating--;var s=this._digest;if(this._performRefresh(),this._trackChanges){var a=this._chgAdded.indexOf(n);a>-1&&this._chgAdded.removeAt(a);var u=this._chgEdited.indexOf(n);u>-1&&this._chgEdited.removeAt(u),this._chgRemoved.indexOf(n)<0&&!r&&a<0&&this._chgRemoved.push(n)}var c=this.sortDescriptions.length>0,l=this.pageSize>0&&this._pgIdx>-1;c||l||s!=this._getGroupsDigest(this.groups)?this._raiseCollectionChanged():this._raiseCollectionChanged(e.NotifyCollectionChangedAction.Remove,n,i),this.currentItem!==o&&this.onCurrentChanged()}}else t.assert(!1,"cannot remove items (canRemove == false).")},n.prototype.removeAt=function(e){e=t.asInt(e),this.remove(this._pgView[e])},n.prototype._trackItemChanged=function(t){if(this._trackChanges){var n=this.sourceCollection;if(n&&n.indexOf(t)>-1){var r=this._chgEdited.indexOf(t),i=e.NotifyCollectionChangedAction.Change;if(r<0&&this._chgAdded.indexOf(t)<0)this._chgEdited.push(t);else if(r>-1){o=new e.NotifyCollectionChangedEventArgs(i,t,r);this._chgEdited.onCollectionChanged(o)}else if((r=this._chgAdded.indexOf(t))>-1){var o=new e.NotifyCollectionChangedEventArgs(i,t,r);this._chgAdded.onCollectionChanged(o)}}}},n.prototype._extend=function(t,e){for(var n in e)t[n]=e[n]},n.prototype._sameContent=function(t,e){for(var n in e)if(!this._sameValue(t[n],e[n]))return!1;for(var n in t)if(!this._sameValue(t[n],e[n]))return!1;return!0},n.prototype._sameValue=function(e,n){return e===n||t.DateTime.equals(e,n)},Object.defineProperty(n.prototype,"canChangePage",{get:function(){return this._canChangePage},set:function(e){this._canChangePage=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isPageChanging",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"itemCount",{get:function(){return this._pgView.length},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pageIndex",{get:function(){return this._pgIdx},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pageSize",{get:function(){return this._pgSz},set:function(e){e!=this._pgSz&&(this._pgSz=t.asInt(e),this.refresh())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"totalItemCount",{get:function(){return this._view.length},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pageCount",{get:function(){return this.pageSize?Math.ceil(this.totalItemCount/this.pageSize):1},enumerable:!0,configurable:!0}),n.prototype.moveToFirstPage=function(){return this.moveToPage(0)},n.prototype.moveToLastPage=function(){return this.moveToPage(this.pageCount-1)},n.prototype.moveToPreviousPage=function(){return this.moveToPage(this.pageIndex-1)},n.prototype.moveToNextPage=function(){return this.moveToPage(this.pageIndex+1)},n.prototype.moveToPage=function(n){var r=t.clamp(n,0,this.pageCount-1);if(r!=this._pgIdx){this.canChangePage||t.assert(!1,"cannot change pages (canChangePage == false).");var i=new e.PageChangingEventArgs(r);this.onPageChanging(i)&&(this._pgIdx=r,this._pgView=this._getPageView(),this._idx=0,this.groupDescriptions&&0!=this.groupDescriptions.length?this.refresh():this.onCollectionChanged(),this.onPageChanged())}return this._pgIdx==n},n.prototype.onPageChanged=function(e){void 0===e&&(e=t.EventArgs.empty),this.pageChanged.raise(this,e)},n.prototype.onPageChanging=function(t){return this.pageChanging.raise(this,t),!t.cancel},n.prototype._getFullGroup=function(t){var e=this._getGroupByPath(this._fullGroups,t.level,t._path);return null!=e&&(t=e),t},n.prototype._getGroupByPath=function(t,e,n){for(var r=0;r<t.length;r++){var i=t[r];if(i.level==e&&i._path==n)return i;if(i.level<e&&0==n.indexOf(i._path)&&null!=(i=this._getGroupByPath(i.groups,e,n)))return i}return null},n.prototype._getPageView=function(){if(this.pageSize<=0||this._pgIdx<0)return this._view;var t=this._pgSz*this._pgIdx,e=Math.min(t+this._pgSz,this._view.length);return this._view.slice(t,e)},n.prototype._createGroups=function(e){if(!this._grpDesc||!this._grpDesc.length)return null;for(var n=[],r={},i=null,o=0;o<e.length;o++)for(var s=e[o],a=n,u=this._grpDesc.length,c="",l=0;l<u;l++){var h=this._grpDesc[l],p=h.groupNameFromItem(s,l),f=l==u-1;!(i=r[c])&&t.isPrimitive(p)&&(i={},r[c]=i);var d=this._getGroup(h,a,i,p,l,f);c+="/"+p,d._path=c,f&&d.items.push(s),a=d.groups}return n},n.prototype._getGroupsDigest=function(t){for(var e="",n=0;null!=t&&n<t.length;n++){var r=t[n];e+="{"+r.name+":"+(r.items?r.items.length:"*"),r.groups.length>0&&(e+=",",e+=this._getGroupsDigest(r.groups)),e+="}"}return e},n.prototype._mergeGroupItems=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];if(!r._isBottomLevel)for(var i=this._mergeGroupItems(r.groups),o=0,s=i.length;o<s;o++)r._items.push(i[o]);for(var o=0,s=r._items.length;o<s;o++)e.push(r._items[o])}return e},n.prototype._getGroup=function(e,n,i,o,s,a){var u;if(i&&t.isPrimitive(o)){if(u=i[o])return u}else for(var c=0;c<n.length;c++)if(e.namesMatch(n[c].name,o))return n[c];var l=new r(e,o,s,a);return n.push(l),i&&(i[o]=l),l},n}();e.CollectionView=n;var r=function(){function e(t,e,n,r){this._gd=t,this._name=e,this._level=n,this._isBottomLevel=r,this._groups=[],this._items=[]}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"level",{get:function(){return this._level},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBottomLevel",{get:function(){return this._isBottomLevel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groups",{get:function(){return this._groups},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groupDescription",{get:function(){return this._gd},enumerable:!0,configurable:!0}),e.prototype.getAggregate=function(e,r,i){var o=t.tryCast(i,n),s=o?o._getFullGroup(this):this;return t.getAggregate(e,s.items,r)},e}();e.CollectionViewGroup=r}(t.collections||(t.collections={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wijmo;!function(t){"use strict";var e=function(){function e(e){this._showAutoTipBnd=this._showAutoTip.bind(this),this._hideAutoTipBnd=this._hideAutoTip.bind(this),this._html=!0,this._gap=6,this._showAtMouse=!1,this._showDelay=500,this._hideDelay=0,this._tips=[],this.popup=new t.Event,t.copy(this,e)}return e.prototype.setTooltip=function(e,n){e=t.getElement(e),n=this._getContent(n);var r=this._indexOf(e);r>-1&&(this._detach(e),this._tips.splice(r,1)),n&&(this._attach(e),this._tips.push({element:e,content:n}))},e.prototype.getTooltip=function(e){e=t.getElement(e);for(var n=this._tips,r=0;r<n.length;r++)if(n[r].element==e)return n[r].content;return null},e.prototype.show=function(r,i,o){r=t.getElement(r),i=this._getContent(i),o||(o=t.Rect.fromBoundingRect(r.getBoundingClientRect()));var s=e._eTip;s||(s=e._eTip=document.createElement("div"),t.addClass(s,"wj-tooltip"),s.style.visibility="none"),this._setContent(i);var a=new n(i);this.onPopup(a),a.content&&!a.cancel&&(document.body.appendChild(s),this._setContent(a.content),s.style.minWidth="",o=new t.Rect(o.left-(s.offsetWidth-o.width)/2,o.top-this.gap,s.offsetWidth,o.height+2*this.gap),t.showPopup(s,o,!0),document.addEventListener("mousedown",this._hideAutoTipBnd))},e.prototype.hide=function(){var n=e._eTip;n&&(t.removeChild(n),n.innerHTML=""),document.removeEventListener("mousedown",this._hideAutoTipBnd)},e.prototype.dispose=function(){var t=this;this._tips.forEach(function(e){t._detach(e.element)}),this._tips.splice(0,this._tips.length)},Object.defineProperty(e.prototype,"isVisible",{get:function(){var t=e._eTip;return null!=t&&null!=t.parentElement&&t.offsetWidth>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isContentHtml",{get:function(){return this._html},set:function(e){this._html=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gap",{get:function(){return this._gap},set:function(e){this._gap=t.asNumber(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showAtMouse",{get:function(){return this._showAtMouse},set:function(e){this._showAtMouse=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showDelay",{get:function(){return this._showDelay},set:function(e){this._showDelay=t.asInt(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hideDelay",{get:function(){return this._hideDelay},set:function(e){this._hideDelay=t.asInt(e)},enumerable:!0,configurable:!0}),e.prototype.onPopup=function(t){return this.popup&&this.popup.raise(this,t),!t.cancel},e.prototype._indexOf=function(t){for(var e=0;e<this._tips.length;e++)if(this._tips[e].element==t)return e;return-1},e.prototype._attach=function(t){t.addEventListener("mouseenter",this._showAutoTipBnd),t.addEventListener("mouseleave",this._hideAutoTipBnd),t.addEventListener("click",this._showAutoTipBnd)},e.prototype._detach=function(t){t.removeEventListener("mouseenter",this._showAutoTipBnd),t.removeEventListener("mouseleave",this._hideAutoTipBnd),t.removeEventListener("click",this._showAutoTipBnd)},e.prototype._showAutoTip=function(e){var n=this;if(!e.defaultPrevented)if("click"!=e.type||t.Control._touching){var r="mouseenter"==e.type?this._showDelay:0;this._clearTimeouts(),this._toShow=setTimeout(function(){var r=n._indexOf(e.target);if(r>-1){var i=n._tips[r],o=n._showAtMouse?new t.Rect(e.clientX,e.clientY,0,0):null;n.show(i.element,i.content,o),n._hideDelay>0&&(n._toHide=setTimeout(function(){n.hide()},n._hideDelay))}},r)}else this._hideAutoTip()},e.prototype._hideAutoTip=function(){this._clearTimeouts(),this.hide()},e.prototype._clearTimeouts=function(){this._toShow&&(clearTimeout(this._toShow),this._toShow=null),this._toHide&&(clearTimeout(this._toHide),this._toHide=null)},e.prototype._getContent=function(e){if((e=t.asString(e))&&"#"==e[0]){var n=t.getElement(e);n&&(e=n.innerHTML)}return e},e.prototype._setContent=function(t){var n=e._eTip;n&&(this.isContentHtml?n.innerHTML=t:n.textContent=t)},e}();t.Tooltip=e;var n=function(e){function n(n){var r=e.call(this)||this;return r._content=t.asString(n),r}return __extends(n,e),Object.defineProperty(n.prototype,"content",{get:function(){return this._content},set:function(e){this._content=t.asString(e)},enumerable:!0,configurable:!0}),n}(t.CancelEventArgs);t.TooltipEventArgs=n}(wijmo||(wijmo={}));var wijmo;!function(t){"use strict";var e=function(){function e(t){this._r=0,this._g=0,this._b=0,this._a=1,t&&this._parse(t)}return Object.defineProperty(e.prototype,"r",{get:function(){return this._r},set:function(e){this._r=t.clamp(t.asNumber(e),0,255)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"g",{get:function(){return this._g},set:function(e){this._g=t.clamp(t.asNumber(e),0,255)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"b",{get:function(){return this._b},set:function(e){this._b=t.clamp(t.asNumber(e),0,255)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"a",{get:function(){return this._a},set:function(e){this._a=t.clamp(t.asNumber(e),0,1)},enumerable:!0,configurable:!0}),e.prototype.equals=function(t){return t instanceof e&&this.r==t.r&&this.g==t.g&&this.b==t.b&&this.a==t.a},e.prototype.toString=function(){var t=Math.round(100*this.a);return t>99?"#"+((1<<24)+(this.r<<16)+(this.g<<8)+this.b).toString(16).slice(1):"rgba("+this.r+","+this.g+","+this.b+","+t/100+")"},e.fromRgba=function(n,r,i,o){void 0===o&&(o=1);var s=new e(null);return s.r=Math.round(t.clamp(t.asNumber(n),0,255)),s.g=Math.round(t.clamp(t.asNumber(r),0,255)),s.b=Math.round(t.clamp(t.asNumber(i),0,255)),s.a=t.clamp(t.asNumber(o),0,1),s},e.fromHsb=function(n,r,i,o){void 0===o&&(o=1);var s=e._hsbToRgb(t.clamp(t.asNumber(n),0,1),t.clamp(t.asNumber(r),0,1),t.clamp(t.asNumber(i),0,1));return e.fromRgba(s[0],s[1],s[2],o)},e.fromHsl=function(n,r,i,o){void 0===o&&(o=1);var s=e._hslToRgb(t.clamp(t.asNumber(n),0,1),t.clamp(t.asNumber(r),0,1),t.clamp(t.asNumber(i),0,1));return e.fromRgba(s[0],s[1],s[2],o)},e.fromString=function(n){var r=new e(null);return r._parse(t.asString(n))?r:null},e.prototype.getHsb=function(){return e._rgbToHsb(this.r,this.g,this.b)},e.prototype.getHsl=function(){return e._rgbToHsl(this.r,this.g,this.b)},e.interpolate=function(n,r,i){i=t.clamp(t.asNumber(i),0,1);var o=e._rgbToHsl(n.r,n.g,n.b),s=e._rgbToHsl(r.r,r.g,r.b),a=1-i,u=n.a*a+r.a*i,c=[o[0]*a+s[0]*i,o[1]*a+s[1]*i,o[2]*a+s[2]*i],l=e._hslToRgb(c[0],c[1],c[2]);return e.fromRgba(l[0],l[1],l[2],u)},e.toOpaque=function(n,r){if(1==(n=t.isString(n)?e.fromString(n):t.asType(n,e)).a)return n;r=null==r?e.fromRgba(255,255,255,1):t.isString(r)?e.fromString(r):t.asType(r,e);var i=n.a,o=1-i;return e.fromRgba(n.r*i+r.r*o,n.g*i+r.g*o,n.b*i+r.b*o)},e.prototype._parse=function(n){if("transparent"==(n=n.toLowerCase()))return this._r=this._g=this._b=this._a=0,!0;if(n&&0!=n.indexOf("#")&&0!=n.indexOf("rgb")&&0!=n.indexOf("hsl")){var r=document.createElement("div");r.style.color=n;var i=r.style.color;i==n&&((i=window.getComputedStyle(r).color)||(document.body.appendChild(r),i=window.getComputedStyle(r).color,t.removeChild(r))),n=i.toLowerCase()}if(0==n.indexOf("#"))return 4==n.length?(this.r=parseInt(n[1]+n[1],16),this.g=parseInt(n[2]+n[2],16),this.b=parseInt(n[3]+n[3],16),this.a=1,!0):7==n.length&&(this.r=parseInt(n.substr(1,2),16),this.g=parseInt(n.substr(3,2),16),this.b=parseInt(n.substr(5,2),16),this.a=1,!0);if(0==n.indexOf("rgb")){var o=n.indexOf("("),s=n.indexOf(")");if(o>-1&&s>-1&&(a=n.substr(o+1,s-(o+1)).split(",")).length>2)return this.r=parseInt(a[0]),this.g=parseInt(a[1]),this.b=parseInt(a[2]),this.a=a.length>3?parseFloat(a[3]):1,!0}if(0==n.indexOf("hsl")){var o=n.indexOf("("),s=n.indexOf(")");if(o>-1&&s>-1){var a=n.substr(o+1,s-(o+1)).split(",");if(a.length>2){var u=parseInt(a[0])/360,c=parseInt(a[1]),l=parseInt(a[2]);a[1].indexOf("%")>-1&&(c/=100),a[2].indexOf("%")>-1&&(l/=100);var h=e._hslToRgb(u,c,l);return this.r=h[0],this.g=h[1],this.b=h[2],this.a=a.length>3?parseFloat(a[3]):1,!0}}}return!1},e._hslToRgb=function(n,r,i){t.assert(n>=0&&n<=1&&r>=0&&r<=1&&i>=0&&i<=1,"bad HSL values");var o,s,a;if(0==r)o=s=a=i;else{var u=i<.5?i*(1+r):i+r-i*r,c=2*i-u;o=e._hue2rgb(c,u,n+1/3),s=e._hue2rgb(c,u,n),a=e._hue2rgb(c,u,n-1/3)}return[Math.round(255*o),Math.round(255*s),Math.round(255*a)]},e._hue2rgb=function(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},e._rgbToHsl=function(e,n,r){t.assert(e>=0&&e<=255&&n>=0&&n<=255&&r>=0&&r<=255,"bad RGB values"),e/=255,n/=255,r/=255;var i,o,s=Math.max(e,n,r),a=Math.min(e,n,r),u=(s+a)/2;if(s==a)i=o=0;else{var c=s-a;switch(o=u>.5?c/(2-s-a):c/(s+a),s){case e:i=(n-r)/c+(n<r?6:0);break;case n:i=(r-e)/c+2;break;case r:i=(e-n)/c+4}i/=6}return[i,o,u]},e._rgbToHsb=function(n,r,i){t.assert(n>=0&&n<=255&&r>=0&&r<=255&&i>=0&&i<=255,"bad RGB values");var o=e._rgbToHsl(n,r,i);return e._hslToHsb(o[0],o[1],o[2])},e._hsbToRgb=function(t,n,r){var i=e._hsbToHsl(t,n,r);return e._hslToRgb(i[0],i[1],i[2])},e._hsbToHsl=function(e,n,r){t.assert(e>=0&&e<=1&&n>=0&&n<=1&&r>=0&&r<=1,"bad HSB values");var i=t.clamp(r*(2-n)/2,0,1),o=1-Math.abs(2*i-1),s=t.clamp(o>0?r*n/o:n,0,1);return t.assert(!isNaN(i)&&!isNaN(s),"bad conversion to HSL"),[e,s,i]},e._hslToHsb=function(e,n,r){t.assert(e>=0&&e<=1&&n>=0&&n<=1&&r>=0&&r<=1,"bad HSL values");var i=t.clamp(1==r?1:(2*r+n*(1-Math.abs(2*r-1)))/2,0,1),o=t.clamp(i>0?2*(i-r)/i:n,0,1);return t.assert(!isNaN(i)&&!isNaN(o),"bad conversion to HSB"),[e,o,i]},e}();t.Color=e}(wijmo||(wijmo={}));var wijmo;!function(t){"use strict";var e=function(){function e(){}return e.copy=function(n){e._copyPaste(t.asString(n),null)},e.paste=function(n){e._copyPaste(null,t.asFunction(n))},e._copyPaste=function(e,n){for(var r=t.getActiveElement(),i=t.closest(r,".wj-control");i&&t.Control.getControl(i);)i=i.parentElement;if(i=i||document.body){var o=t.createElement('<textarea class="wj-clipboard" style="position:fixed;opacity:0"/>',i);t.isString(e)&&(o.value=e),o.select(),o.onkeydown=function(t){t.preventDefault()},setTimeout(function(){r.focus(),t.removeChild(o),t.isFunction(n)&&n(o.value)},t.Control._CLIPBOARD_DELAY)}},e}();t.Clipboard=e}(wijmo||(wijmo={}));var wijmo;!function(t){"use strict";function e(e,n){e.style.display="none",n&&e.parentElement&&setTimeout(function(){"none"==e.style.display&&(t.removeChild(e),t.isFunction(n)&&n())},2*t.Control._FOCUS_INTERVAL);var r=e[t.Control._SCRL_KEY];r instanceof t.Control&&r.dispose(),delete e[t.Control._SCRL_KEY],delete e[t.Control._OWNR_KEY]}function n(e){var n=window.jQuery,r=t.isFunction(n)?n(e):null;return r&&t.isFunction(r.dialog)&&null!=r.dialog("instance")}t.showPopup=function(r,i,o,s,a){void 0===a&&(a=!0);var u=document,c=u.body,l=u.documentElement,h=c;if(i instanceof HTMLElement){if(!t.contains(c,i))return;for(var p=i;p;p=p.parentElement)if("fixed"==getComputedStyle(p).position||n(p)){h=p;break}}r.offsetHeight&&r.offsetWidth&&t.contains(h,r)||h.lastChild!=r&&h.appendChild(r);var f=new t.Point(c.scrollLeft||pageXOffset,c.scrollTop||pageYOffset),d=l.clientWidth/window.innerWidth;if(h!=c||d>1.005){var g=h==c?l:r.offsetParent;if(g){var _=g.getBoundingClientRect();f=new t.Point(g.scrollLeft-_.left,g.scrollTop-_.top)}}if(i instanceof HTMLElement&&a){var m=getComputedStyle(i);new t.Color(m.backgroundColor).a&&t.setCss(r,{color:m.color,backgroundColor:m.backgroundColor,fontFamily:m.fontFamily,fontSize:m.fontSize,fontWeight:m.fontWeight,fontStyle:m.fontStyle})}t.setCss(r,{position:"fixed",display:""}),t.Control.refreshAll(r);var v=getComputedStyle(r),y=parseFloat(v.marginTop)+parseFloat(v.marginBottom),b=parseFloat(v.marginLeft)+parseFloat(v.marginRight),C=new t.Size(r.offsetWidth+b,r.offsetHeight+y),w=new t.Point,E=null,A=l.clientWidth,x=l.clientHeight;if(i&&null!=i.clientX&&null!=i.clientY&&null!=i.pageX&&null!=i.pageY)i.clientX<=0&&i.clientY<=0&&i.target?E=i.target.getBoundingClientRect():(w.x=Math.max(0,i.pageX-pageXOffset),w.y=Math.max(0,i.pageY-pageYOffset));else if(i instanceof t.Point)w=i;else if(i instanceof HTMLElement)E=i.getBoundingClientRect();else if(i&&null!=i.top&&null!=i.left)E=i;else{if(null!=i)throw"Invalid ref parameter.";w.x=Math.max(0,(A-C.width)/2),w.y=Math.max(0,Math.round((x-C.height)/2*.7))}var M=parseFloat(v.minWidth);if(E){var O=E.top,T=x-E.bottom,S="rtl"==getComputedStyle(r).direction;w.x=S?Math.max(0,E.right-C.width):Math.max(0,Math.min(E.left,A-C.width)),w.y=o?O>C.height||O>T?Math.max(0,E.top-C.height):E.bottom:T>C.height||T>O?E.bottom:Math.max(0,E.top-C.height),M=Math.max(M,E.width),t.isIE()&&(M-=r.offsetWidth-(r.clientWidth+parseInt(v.borderLeftWidth)+parseInt(v.borderRightWidth)))}else w.y+C.height>x-20&&(w.y=Math.max(0,x-20-C.height)),w.x+C.width>A-20&&(w.x=Math.max(0,A-20-C.width));var P={position:"absolute",left:w.x+f.x,top:w.y+f.y,minWidth:M,zIndex:1500},F=null;s&&(r.style.opacity="0",F=t.animate(function(t){r.style.opacity=1==t?"":t.toString()})),i instanceof HTMLElement&&(r[t.Control._OWNR_KEY]=i),t.setCss(r,P);var I=i instanceof MouseEvent?i.target:i;if(I instanceof HTMLElement&&I.parentElement!=document.body){var D=Date.now(),j=I.getBoundingClientRect(),N=new t.Control(document.createElement("div"));r[t.Control._SCRL_KEY]=N,N.addEventListener(document,"scroll",function(n){if(Date.now()-D>100&&t.contains(document,I)&&!t.contains(r,n.target)&&(n.target!=document||null!=i&&"fixed"==r.style.position)){var o=I.getBoundingClientRect(),s=Math.abs(o.left-j.left),a=Math.abs(o.top-j.top);(s>1||a>1)&&e(r,!0)}},!0)}return F},t.hidePopup=function(n,r,i){void 0===r&&(r=!0),void 0===i&&(i=!1);var o=null;return i?o=t.animate(function(t){n.style.opacity=(1-t).toString(),1==t&&(e(n,r),n.style.opacity="")}):e(n,r),o}}(wijmo||(wijmo={}));var wijmo;!function(t){"use strict";var e=function(){function e(e){this._copyCss=!0,null!=e&&t.copy(this,e)}return Object.defineProperty(e.prototype,"title",{get:function(){return this._title},set:function(e){this._title=t.asString(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"copyCss",{get:function(){return this._copyCss},set:function(e){this._copyCss=t.asBoolean(e)},enumerable:!0,configurable:!0}),e.prototype.addCSS=function(t){this._css||(this._css=[]),this._css.push(t)},e.prototype.append=function(e){var n=this._getDocument(),r=n.body,i=!1;if(r)if(t.isString(e))r.appendChild(t.createElement(e));else if(e instanceof Node){o=this._cloneNode(e);r.appendChild(o)}else i=!0;else if(t.isString(e))n.write(e);else if(e instanceof HTMLElement){var o=this._cloneNode(e);n.write(o.outerHTML)}else i=!0;i&&t.assert(!1,"child parameter should be an HTML node or an HTML string.")},e.prototype.print=function(){var e=this;this._iframe&&(this._close(),setTimeout(function(){var n=e._iframe.contentWindow,r="onafterprint"in n&&!t.isFirefox();r&&(n.onafterprint=function(){t.removeChild(e._iframe),e._iframe=null}),document.queryCommandSupported("print")?n.document.execCommand("print",!1,null):(n.focus(),n.print()),r||(t.removeChild(e._iframe),e._iframe=null)},100))},e.prototype._cloneNode=function(t){var e=t.cloneNode(!0);return t instanceof HTMLElement&&e instanceof HTMLElement&&["select","textarea"].forEach(function(n){for(var r=t.querySelectorAll(n),i=e.querySelectorAll(n),o=0;o<r.length;o++)i[o].value=r[o].value}),e},e.prototype._getDocument=function(){return this._iframe||(this._iframe=document.createElement("iframe"),t.addClass(this._iframe,"wj-printdocument"),t.setCss(this._iframe,{position:"fixed",left:1e4,top:1e4}),document.body.appendChild(this._iframe),this._iframe.contentDocument.write('<body style="position:static"/>')),this._iframe.contentDocument},e.prototype._close=function(){var e=this._getDocument();if(e.close(),e.title=null!=this.title?this.title:document.title,e.title&&e.title.trim()||(e.title=" "),this._copyCss){for(var n=document.head.querySelectorAll("link"),r=0;r<n.length;r++){var i=n[r];if(i.href.match(/\.css$/i)&&i.rel.match(/stylesheet/i)){a=t.httpRequest(i.href,{async:!1});this._addStyle(a.responseText)}}for(var o=document.head.querySelectorAll("STYLE"),r=0;r<o.length;r++)this._addStyle(o[r].textContent)}if(this._css)for(r=0;r<this._css.length;r++){var s=e.createElement("style"),a=t.httpRequest(this._css[r],{async:!1});s.textContent=a.responseText,e.head.appendChild(s)}},e.prototype._addStyle=function(t){var e=this._getDocument(),n=e.createElement("style");n.textContent=t,e.head.appendChild(n)},e}();t.PrintDocument=e}(wijmo||(wijmo={}));var wijmo;!function(t){"use strict";var e=function(){function e(e,n,r){void 0===n&&(n=null),void 0===r&&(r="_"),this._promptChar="_",this._mskArr=[],this._full=!0,this._hbInput=this._input.bind(this),this._hbKeyDown=this._keydown.bind(this),this._hbKeyPress=this._keypress.bind(this),this._hbCompositionStart=this._compositionstart.bind(this),this._hbCompositionEnd=this._compositionend.bind(this),this.mask=t.asString(n),this.input=e,this.promptChar=t.asString(r,!1),this._connect(!0),this._evtInput=document.createEvent("HTMLEvents"),this._evtInput.initEvent("input",!0,!1)}return Object.defineProperty(e.prototype,"input",{get:function(){return this._tbx},set:function(t){this._connect(!1),this._tbx=t,this._connect(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._msk},set:function(e){e!=this._msk&&(this._msk=t.asString(e,!0),this._parseMask(),this._valueChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"promptChar",{get:function(){return this._promptChar},set:function(e){e!=this._promptChar&&(this._promptChar=t.asString(e,!1),t.assert(1==this._promptChar.length,"promptChar must be a string with length 1."),this._valueChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maskFull",{get:function(){return this._full},enumerable:!0,configurable:!0}),e.prototype.getMaskRange=function(){return this._mskArr.length?[this._firstPos,this._lastPos]:[0,this._tbx.value.length-1]},e.prototype.getRawValue=function(){var t=this._tbx.value,e="";if(!this.mask)return t;for(var n=0;n<this._mskArr.length&&n<t.length;n++)this._mskArr[n].literal||t[n]==this._promptChar||(e+=t[n]);return e},e.prototype.refresh=function(){this._parseMask(),this._valueChanged()},e.prototype._input=function(t){var e=this;this._composing?t.stopImmediatePropagation():setTimeout(function(){e._valueChanged()})},e.prototype._keydown=function(e){if(e.keyCode==t.Key.Back){var n=this._tbx.selectionStart,r=this._tbx.selectionEnd;if(n<=this._firstPos&&r==n)return e.preventDefault(),void(this._backSpace=!1)}this._backSpace=e.keyCode==t.Key.Back},e.prototype._keypress=function(t){t.ctrlKey||t.metaKey||t.altKey||this._composing||!this._preventKey(t.charCode)||t.preventDefault()},e.prototype._compositionstart=function(t){this._composing=!0},e.prototype._compositionend=function(t){var e=this;this._composing&&(this._composing=!1,setTimeout(function(){e._valueChanged()&&e._tbx.dispatchEvent(e._evtInput)}))},e.prototype._preventKey=function(e){if(e&&this._mskArr.length){var n=this._tbx,r=n.selectionStart,i=String.fromCharCode(e);if(r<this._firstPos&&(r=this._firstPos,t.setSelectionRange(n,r)),r>=this._mskArr.length)return!0;var o=this._mskArr[r];if(o.literal)this._validatePosition(r);else if(o.wildCard!=i&&!this._isCharValid(o.wildCard,i))return!0}return!1},e.prototype._connect=function(e){var n=this._tbx;n&&(t.assert(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement,"INPUT or TEXTAREA element expected."),e?(this._autoComplete=n.autocomplete,this._spellCheck=n.spellcheck,n.autocomplete="off",n.spellcheck=!1,n.addEventListener("input",this._hbInput),n.addEventListener("keydown",this._hbKeyDown,!0),n.addEventListener("keypress",this._hbKeyPress,!0),n.addEventListener("compositionstart",this._hbCompositionStart,!0),n.addEventListener("compositionend",this._hbCompositionEnd,!0),n.addEventListener("blur",this._hbCompositionEnd,!0),this._valueChanged()):(n.autocomplete=this._autoComplete,n.spellcheck=this._spellCheck,n.removeEventListener("input",this._hbInput),n.removeEventListener("keydown",this._hbKeyDown,!0),n.removeEventListener("keypress",this._hbKeyPress,!0),n.removeEventListener("compositionstart",this._hbCompositionStart,!0),n.removeEventListener("compositionend",this._hbCompositionEnd,!0),n.removeEventListener("blur",this._hbCompositionEnd,!0)))},e.prototype._valueChanged=function(){if(!this._tbx||!this._msk)return!1;var t=this._tbx,e=t.value.length<2,n=t.selectionStart,r=n>0?t.value[n-1]:"",i=t.value;t.value=this._applyMask(),e&&(n=this._firstPos+1);var o=n>0?t.value[n-1]:"";return n>0&&o==this._promptChar&&r!=this.promptChar&&n--,n==i.length&&(n=this._matchEnd),this._validatePosition(n),i!=t.value},e.prototype._applyMask=function(){this._full=!0,this._matchEnd=0;var t=this._tbx.value;if(!this._msk)return t;if(!t&&!this._tbx.required)return t;var e="",n=0,r=this._promptChar;t=this._handleVagueLiterals(t);for(var i=0;i<this._mskArr.length;i++){var o=this._mskArr[i],s=o.literal;if(s&&s==t[n]&&n++,o.wildCard){if(s=r,t){for(var a=n;a<t.length;a++)if(this._isCharValid(o.wildCard,t[a])){switch(s=t[a],o.charCase){case">":s=s.toUpperCase();break;case"<":s=s.toLowerCase()}s!=r&&(this._matchEnd=e.length+1);break}n=a+1}s==r&&(this._full=!1)}e+=s}return e},e.prototype._handleVagueLiterals=function(t){if(t.length>this._mskArr.length+1)return t;var e=t.length-this._mskArr.length;if(0!=e&&t.length>1){for(var n=-1,r=Math.max(0,this._tbx.selectionStart-e);r<this._mskArr.length;r++)if(this._mskArr[r].vague){n=r;break}if(n>-1)if(e<0){var i=Array(1-e).join(this._promptChar),o=n+e;o>-1&&(t=t.substr(0,o)+i+t.substr(o))}else{for(;n>0&&this._mskArr[n-1].literal;)n--;t=t.substr(0,n)+t.substr(n+e)}}return t},e.prototype._isCharValid=function(t,n){var r=this._promptChar;switch(t){case"0":return n>="0"&&n<="9"||n==r;case"9":return n>="0"&&n<="9"||" "==n||n==r;case"#":return n>="0"&&n<="9"||" "==n||"+"==n||"-"==n||n==r;case"L":return n>="a"&&n<="z"||n>="A"&&n<="Z"||n==r;case"l":return n>="a"&&n<="z"||n>="A"&&n<="Z"||" "==n||n==r;case"A":return n>="0"&&n<="9"||n>="a"&&n<="z"||n>="A"&&n<="Z"||n==r;case"a":return n>="0"&&n<="9"||n>="a"&&n<="z"||n>="A"&&n<="Z"||" "==n||n==r;case"９":return n>="０"&&n<="９"||n==r;case"Ｊ":case"Ｇ":return!("Ｇ"==t&&e._X_DBCS_BIG_HIRA.indexOf(n)>-1)&&(n>="ぁ"&&n<="ゖ"||n==r);case"Ｋ":case"Ｎ":return!("Ｎ"==t&&e._X_DBCS_BIG_KATA.indexOf(n)>-1)&&(n>="ァ"&&n<="ヺ"||n==r);case"Ｚ":return n<="!"||n>="ÿ"||n==r;case"H":return n>="!"&&n<="ÿ"||n==r;case"K":case"N":return!("N"==t&&e._X_SBCS_BIG_KATA.indexOf(n)>-1)&&(n>="ｦ"&&n<="ﾟ"||n==r)}return!1},e.prototype._validatePosition=function(e){var n=this._mskArr;if(this._backSpace)for(;e>0&&e<n.length&&n[e-1].literal;)e--;if(0==e||!this._backSpace)for(;e<n.length&&n[e].literal;)e++;t.getActiveElement()==this._tbx&&t.setSelectionRange(this._tbx,e),this._backSpace=!1},e.prototype._parseMask=function(){this._mskArr=[],this._firstPos=-1,this._lastPos=-1;for(var e,r=this._msk,i="|",o=0;r&&o<r.length;o++)switch(r[o]){case"0":case"9":case"#":case"A":case"a":case"L":case"l":case"９":case"Ｊ":case"Ｇ":case"Ｋ":case"Ｎ":case"Ｚ":case"K":case"N":case"H":this._firstPos<0&&(this._firstPos=this._mskArr.length),this._lastPos=this._mskArr.length,this._mskArr.push(new n(r[o],i));break;case".":case",":case":":case"/":case"$":switch(r[o]){case".":case",":e=t.culture.Globalize.numberFormat[r[o]];break;case":":case"/":e=t.culture.Globalize.calendar[r[o]];break;case"$":e=t.culture.Globalize.numberFormat.currency.symbol}for(a=0;a<e.length;a++)this._mskArr.push(new n(e[a]));break;case"<":case">":case"|":i=r[o];break;case"\\":o<r.length-1&&o++,this._mskArr.push(new n(r[o]));break;default:this._mskArr.push(new n(r[o]))}for(o=0;o<this._mskArr.length;o++){var s=this._mskArr[o];if(s.literal)for(var a=0;a<o;a++){var u=this._mskArr[a];if(u.wildCard&&this._isCharValid(u.wildCard,s.literal)){s.vague=!0;break}}}},e._X_DBCS_BIG_HIRA="ぁぃぅぇぉっゃゅょゎゕゖ",e._X_DBCS_BIG_KATA="ァィゥェォッャュョヮヵヶ",e._X_SBCS_BIG_KATA="ｧｨｩｪｫｬｭｮｯ",e}();t._MaskProvider=e;var n=function(){return function(t,e){e?(this.wildCard=t,this.charCase=e):this.literal=t}}();t._MaskElement=n}(wijmo||(wijmo={}));var wijmo;!function(t){"use strict";var e=function(){function e(t){this._isDown=!1,this._mousedownBnd=this._mousedown.bind(this),this._mouseupBnd=this._mouseup.bind(this),this._onClickBnd=this._onClick.bind(this),this.element=t,this._connect(!0)}return Object.defineProperty(e.prototype,"element",{get:function(){return this._e},set:function(e){this._connect(!1),this._e=t.asType(e,HTMLElement,!0),this._connect(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=t.asBoolean(e)},enumerable:!0,configurable:!0}),e.prototype._connect=function(t){if(this._e){t?this._e.addEventListener("mousedown",this._mousedownBnd):this._e.removeEventListener("mousedown",this._mousedownBnd)}},e.prototype._clearTimeouts=function(){this._toRepeat&&(clearInterval(this._toRepeat),this._toRepeat=null),this._toDelay&&(clearInterval(this._toDelay),this._toDelay=null)},e.prototype._mousedown=function(n){var r=this;this._isDown&&this._mouseup(null),this._disabled||(this._isDown=!0,e._stopEvents.forEach(function(t){document.addEventListener(t,r._mouseupBnd)}),this._clearTimeouts(),this._toDelay=setTimeout(function(){r._isDown&&(r._onClick(),r._toRepeat=setTimeout(r._onClickBnd,t.Control._CLICK_REPEAT))},t.Control._CLICK_DELAY))},e.prototype._mouseup=function(t){var n=this;this._isDown&&t&&"mouseup"==t.type&&t.preventDefault(),e._stopEvents.forEach(function(t){document.removeEventListener(t,n._mouseupBnd)}),this._clearTimeouts(),this._isDown=!1},e.prototype._onClick=function(){this._clearTimeouts(),this._e&&(this._e.click(),this._isDown&&(this._toRepeat=setTimeout(this._onClickBnd,t.Control._CLICK_REPEAT)))},e._stopEvents=["mouseup","mouseout","keydown"],e}();t._ClickRepeater=e}(wijmo||(wijmo={}));var wijmo;!function(t){"use strict";function e(){return r}var n=null!=navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i);t.isMobile=function(){return n};var r=null!=navigator.userAgent.match(/Firefox\//);t.isFirefox=e;var i=null!=navigator.userAgent.match(/^((?!chrome|android).)*safari/i);t.isSafari=function(){return i};var o=null!=navigator.userAgent.match(/Edge\//);t.isEdge=function(){return o};var s=null!=navigator.userAgent.match(/MSIE |Trident\/|Edge\//);t.isIE=function(){return s};var a=!1;t.isIE9=function(){return a};var u=!1;document.addEventListener("test",function(t){},{get passive(){return u=!0,!0}}),t.getEventOptions=function(t,e){return u?{capture:t,passive:e}:t},t._startDrag=function(t,n){t.effectAllowed=n,e()&&t.setData("text","")},document.doctype&&navigator.appVersion.indexOf("MSIE 9")>-1&&(a=!0,document.addEventListener("mousemove",function(e){if(1==e.which){var n=t.closest(e.target,".wj-control");if(n&&!n.style.cursor)for(var r=e.target;r;r=r.parentNode)if(r.attributes&&r.attributes.draggable)return r.dragDrop(),!1}}));var c="requestAnimationFrame";if(!window[c]){var l=0;window[c]=function(t){var e=Date.now(),n=16-(e-l),r=n>0?n:0;return l=e+r,setTimeout(function(){t(l)},r)},window.cancelAnimationFrame=clearTimeout}if(!window.atob){var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",p=new RegExp("[^"+h+"]");window.atob=function(t){var e,n,r,i,o=[],s=0,a=t.length;if(p.test(t)||/=/.test(t)&&(/=[^=]/.test(t)||/={3}/.test(t)))throw new Error("Invalid base64 data");for(a%4>0&&(a=(t+=Array(4-a%4+1).join("=")).length);s<a;){for(n=[],i=s;s<i+4;)n.push(h.indexOf(t.charAt(s++)));for(r=[((e=(n[0]<<18)+(n[1]<<12)+((63&n[2])<<6)+(63&n[3]))&255<<16)>>16,64===n[2]?-1:(65280&e)>>8,64===n[3]?-1:255&e],i=0;i<3;++i)(r[i]>=0||0===i)&&o.push(String.fromCharCode(r[i]))}return o.join("")},window.btoa=function(t){for(var e,n,r=[],i=0,o=t.length;i<o;)e=((n=[t.charCodeAt(i++),t.charCodeAt(i++),t.charCodeAt(i++)])[0]<<16)+((n[1]||0)<<8)+(n[2]||0),r.push(h.charAt((e&63<<18)>>18),h.charAt((258048&e)>>12),h.charAt(isNaN(n[1])?64:(4032&e)>>6),h.charAt(isNaN(n[2])?64:63&e));return r.join("")}}}(wijmo||(wijmo={}));
var c1;(function(n){function f(n,i){if(!n||i==null)return null;var r=n[t];return r?r[i]:null}function e(n,i){var r,u=[],f,e;if(!n||(r=n[t],!r))return u;for(e in r)f=r[e],(!i||f instanceof i)&&u.push(f);return u}function o(n,i,r){if(n&&i!=null&&r){var u=n[t];u||(n[t]=u={});u[i]=r}}function r(n,t){return n&&t&&n instanceof wijmo.Event&&wijmo.isFunction(t)?(n.addHandler(t),!0):!1}function s(n){if(!n)return null;var t=window;return n.split(".").forEach(function(n){return t=t[n]}),t}function h(n){document.addEventListener("DOMContentLoaded",n.bind(window))}function c(n,t){var i,r;if(n&&n.extensions){i=n.extensions;for(r in i)if(i[r]instanceof t)return i[r]}}var t="_c1Extenders",i,u;n.getExtender=f;n.getExtenders=e;n._addExtender=o;n._addEvent=r;n._findFunction=s;n.documentReady=h;n._getExtension=c;i=function(){function n(n){if(n==null)throw"control should not be null or undefined.";this._control=n;this._override()}return Object.defineProperty(n.prototype,"control",{get:function(){return this._control},enumerable:!0,configurable:!0}),n.prototype._override=function(){n._overrideCopy(this.control)},n._overrideCopy=function(n){var t=Object.getPrototypeOf(n),i=t._copy;t._isCopyOverrided||(t._copy=function(n,t){var u=this[n];return r(u,t)?!0:i?i.call(this,n,t):!1},t._isCopyOverrided=!0)},n}();n._Initializer=i;u=function(){function n(n,t){var i=this;i._beforeCreateControl(t);i._createControl(n);i._bindControl();i._initExtensions()}return n.prototype._beforeCreateControl=function(){},n.prototype._createControl=function(n){var t=this,i=t._controlType;t._control=new i(n)},n.prototype._bindControl=function(){n.setWrapper(this.control,this)},n.setWrapper=function(t,i){t[n._DATA_KEY]=i},n.getWrapper=function(t){return t[n._DATA_KEY]},n.prototype._initExtensions=function(){var i=this,t=this._getExtensionTypes(),n;t&&(n=[],t.reverse().forEach(function(t){n.push(new t(i.control))}),this.control.extensions=n)},n.prototype.initialize=function(){this.control.initialize.apply(this.control,arguments)},n.prototype._getExtensionTypes=function(){return[this._initializerType]},Object.defineProperty(n.prototype,"_initializerType",{get:function(){return i},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_controlType",{get:function(){throw"Should implement this property getter in the leaf control wrapper.";},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"control",{get:function(){return this._control},enumerable:!0,configurable:!0}),n._DATA_KEY="_c1ControlWrapper",n}();n._ControlWrapper=u})(c1||(c1={}));
var c1;(function(n){function i(i,r,u){var f;if(arguments.length===1&&t[i]!=null)return t[i];if(i.length&&!r&&u==null){if(f=n._findFunction(i),f==null)throw"service is not registered.";return t[i]=f,f}if(!r)throw"serviceCtor is null";if(i.length&&typeof r=="object"&&u==null)return t[i]=r,r;if(typeof r!="function")throw"serviceCtor is not a service constructor.";try{f=new r;typeof f.initialize!="function"?f=new r(u):f.initialize.call(f,u)}catch(e){throw"service cannot be created.";}return i.length&&(t[i]=f),f}function r(n){delete t[n]}function u(n){return t[n]}var t={};n._registerService=i;n._disposeService=r;n.getService=u})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var i,t;(function(n){n[n.Unspecified=1]="Unspecified";n[n.Local=2]="Local";n[n.Utc=3]="Utc"})(i=n.DateKind||(n.DateKind={}));t=function(n){function t(t,i,r){var u=n.call(this)||this;return u._key=t,u._value=i,u._parent=r,u}return __extends(t,n),t.cast=function(n){return n},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"key",{get:function(){return this._key},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"result",{get:function(){return this._result},set:function(n){this._result=n},enumerable:!0,configurable:!0}),t}(wijmo.CancelEventArgs);n.JSONOperationEventArgs=t})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var c1;(function(n){var t;(function(t){var f=function(){function n(n){this.uniqueId=n;this._keyPrefix="wj-";this._keys={isCallback:this._keyPrefix+"cbk",uniqueId:this._keyPrefix+"id",data:this._keyPrefix+"data"}}return n.prototype.doCallback=function(n,t,r,u,f){var e={},o=this._keys;e[o.isCallback]="true";e[o.uniqueId]=this.uniqueId;e[o.data]=i.jsonStringify(n,u);i.ajaxPost({url:"",success:t,error:r,data:e,requestDataStringifying:u,responseTextParsing:f})},n}(),u,r,i;t.CallbackManager=f;u=function(){function t(){}return t._isRemoteSource=function(t){var i,r;return t?(i=wijmo.tryCast(t,n.mvc.collections.RemoteCollectionView),i)?i._isRemoteMode():(r=wijmo.tryCast(t,wijmo.odata.ODataCollectionView),!!r):!1},t._isQueringData=function(t){var i,r;return t?(i=wijmo.tryCast(t,n.mvc.collections.RemoteCollectionView),i)?i._isQuerying&&i._isQuerying():(r=wijmo.tryCast(t,wijmo.odata.ODataCollectionView),r&&r._loading):!1},t._isDynamicalLoading=function(t){var i,r;return t?(i=wijmo.tryCast(t,n.mvc.collections.RemoteCollectionView),i)?i._isDynamicalLoadingEnabled&&i._isDynamicalLoadingEnabled():(r=wijmo.tryCast(t,wijmo.odata.ODataVirtualCollectionView),!!r):!1},t}();t.DataSourceManager=u;r=wijmo.Binding.prototype.getValue;wijmo.Binding.prototype.getValue=function(n){return n==null?null:(r&&(n=r.call(this,n)),n)};i=function(){function i(){}return i.getType=function(n){var r,t;if(i.class2type==null)for(r="Boolean Number String Function Array Date RegExp Object Error".split(" "),i.class2type={},t=0;t<r.length;t++)i.class2type["[object "+r[t]+"]"]=r[t].toLowerCase();return n==null?n+"":typeof n=="object"||typeof n=="function"?i.class2type[{}.toString.call(n)]||"object":typeof n},i.isEmptyContent=function(n){return n==null||!n.length||!n.replace(/\s*/g,"").length?!0:!1},i.getService=function(n){return new Function("return "+n+";").call(window)},i.parseFunction=function(t){if(/function\(.*?\)/.test(t))return{value:eval(t),success:!0};var i=/^\/Function\((.*?)\)\/$/.exec(t);return i?{value:n._findFunction(i[1]),success:!0}:{success:!1}},i.parseService=function(n){var t=/^\/Service\((.*?)\)\/$/.exec(n);return t?{value:i.getService(t[1]),success:!0}:{success:!1}},i.tryDateJsonParse=function(n){var t=i.dateJsonRegx.exec(n),r;return t?(t[8]==""&&(n+=i._getLocalTimeZoneText()),r=new Date(n),r.dateKind=i.getDateKind(t[8]),r):null},i.getDateKind=function(n){var i=n.toLowerCase();return i=="z"?t.DateKind.Utc:i.length==0?t.DateKind.Unspecified:t.DateKind.Local},i.jsonParse=function(n,r,u){return JSON.parse(n,function(n,f){var o,s,h,e;if(r&&(o=new t.JSONOperationEventArgs(n,f,this),r(o)))return o.result;if(u&&(s=u.call(this,n,f),s!==f))return s;if(typeof f=="string"){if(h=i.tryDateJsonParse(f),h)return h;if((e=i.parseFunction(f),e&&e.success)||(e=i.parseService(f),e.success))return e.value}return f})},i.jsonStringify=function(n,r,u,f){return JSON.stringify(n,function(n,f){var e,o,s;return r&&(e=new t.JSONOperationEventArgs(n,f,this),r(e))?e.result:u&&(o=u.call(this,n,f),o!==f)?o:(s=i.tryGetDate(this,n,f),s)?i.dateToJson(s):typeof f=="function"?String(f):f},f)},i.tryGetDate=function(n,t,i){if(i instanceof Date)return i;if(typeof i=="string"){var r=t==null?n:n[t];if(r instanceof Date)return r}return null},i.dateToJson=function(n){var r=n.dateKind||t.DateKind.Unspecified;return i.formatNumber(r==t.DateKind.Utc?n.getUTCFullYear():n.getFullYear(),4)+"-"+i.formatNumber((r==t.DateKind.Utc?n.getUTCMonth():n.getMonth())+1,2)+"-"+i.formatNumber(r==t.DateKind.Utc?n.getUTCDate():n.getDate(),2)+"T"+i.formatNumber(r==t.DateKind.Utc?n.getUTCHours():n.getHours(),2)+":"+i.formatNumber(r==t.DateKind.Utc?n.getUTCMinutes():n.getMinutes(),2)+":"+i.formatNumber(r==t.DateKind.Utc?n.getUTCSeconds():n.getSeconds(),2)+"."+i.formatNumber(r==t.DateKind.Utc?n.getUTCMilliseconds():n.getMilliseconds(),3)+i._getTimeZoneText(r)},i._getTimeZoneText=function(n){switch(n){case t.DateKind.Local:return i._getLocalTimeZoneText();case t.DateKind.Utc:return"Z";case t.DateKind.Unspecified:default:return""}},i._getLocalTimeZoneText=function(){var u=new Date,t=u.getTimezoneOffset(),n="",r;return t>0?n+="-":(n+="+",t*=-1),r=Math.floor(t/60),n+=i.formatNumber(r,2),n+=":",n+i.formatNumber(t-r*60,2)},i.formatNumber=function(n,t){for(var i=n.toString();i.length<t;)i="0"+i;return i},i.random=function(n,t){var i=Math.random();return n+i*(t-n)},i.formatString=function(n){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];return n.replace(/{(\d+)}/g,function(n,t){return typeof i[t]!="undefined"?i[t]:n})},i.isObject=function(n){return n!=null&&typeof n=="object"&&i.getType(n)!=="date"},i.copy=function(n,t){var r,u;for(r in t)u=t[r],n._copy&&n._copy(r,u)||(i.isObject(u)&&n[r]?i.copy(n[r],u):n[r]=u);return n},i.extend=function(n){for(var r,u=[],t=1;t<arguments.length;t++)u[t-1]=arguments[t];return r=u.map(function(n){return i.copy({},n)}),r.unshift(n),r.reduceRight(function(n,t){return i.copy(t,n)})},i.formEncodedObject=function(n){var u=[],r,t;for(r in n)t=n[r],i.isObject(t)?t=encodeURIComponent(JSON.stringify(t)):t&&(t=encodeURIComponent(t.toString())),u.push(r+"="+t);return u.join("&")},i.ajax=function(n){var r=new XMLHttpRequest,t=i.copy({async:!0,cache:!1,type:"GET",postType:"form"},n),f,e,o,u=t.url,h,s;if(typeof t.data=="string"||t.data instanceof Document)f=t.data;else if(i.isObject(t.data))if(t.type==="GET")u+=u.indexOf("?")>=0?"&":"?",u+=i.formEncodedObject(t.data);else if(t.postType==="form")f=i.formEncodedObject(t.data),t.contentType="application/x-www-form-urlencoded";else if(t.postType==="json")f=i.jsonStringify(t.data,t.requestDataStringifying),t.contentType="application/json";else if(t.postType==="multipart"){f=new FormData;for(e in t.data)f.append(e,t.data[e])}if(r.onload=function(){var u=r.status>=200&&r.status<300||r.status===304,n;if(!u){t.error&&t.error.call(r,r,i.getTextStatus(r),"");return}t.dataType==="json"?n=i.jsonParse(r.responseText,t.responseTextParsing):t.dataType==="text"||t.dataType==="html"||t.dataType==="script"?n=r.responseText:t.dataType==="xml"&&(n=r.responseXML);t.success.bind(r)(n)},t.error&&(r.onerror=function(n){t.error.call(r,r,i.getTextStatus(r),n.message||"")}),t.cache||(h="_="+i.random(1e3,9999).toFixed(0),u+=u.indexOf("?")>=0?"&":"?",u+=h),r.open(t.type,u,t.async),t.headers)for(o in t.headers)r.setRequestHeader(o,t.headers[o]);return t.headers&&t.headers[i.requestVerificationTokenKey]||(s=document.querySelector("input[name=__RequestVerificationToken]"),s&&r.setRequestHeader(i.requestVerificationTokenKey,s.value)),t.contentType&&r.setRequestHeader("Content-Type",t.contentType),t.beforeSend&&t.beforeSend(r,t),r.send(f||null),r},i.getTextStatus=function(n){return n.status===0?"0 failed":n.status+" "+n.statusText},i.beginRequest=function(n){var t=i.copy({dataType:"json"},n);return i.ajax(t)},i.ajaxGet=function(n){var t=i.copy({type:"GET",dataType:"json"},n);return i.beginRequest(t)},i.ajaxPost=function(n){var t=i.copy({type:"POST",dataType:"json"},n);return i.beginRequest(t)},i.ajaxLoad=function(n,t){var r=i.copy({type:"GET",dataType:"html",success:function(t){var i=document.querySelector(n);i.innerHTML=t}},t);return i.beginRequest(r)},i.documentReady=function(t){n.documentReady(t)},i.tryCallJQuery=function(n){var t=window.jQuery;t&&typeof t=="function"&&n(t)},i.forwardValidationEvents=function(n,t,r,u){u===void 0&&(u=!1);u||n.gotFocus.addHandler(function(){setTimeout(function(){return i.tryCallJQuery(function(n){return n(r).focus()})})});n.addEventListener(n.hostElement,"keyup",function(n){i.tryCallJQuery(function(t){(n.which!==9||t(r).val()!=="")&&t(r).keyup()})});n.lostFocus.addHandler(function(){i.tryCallJQuery(function(n){return n(r).blur()})})},i.triggerValidationChangeEvent=function(n){i.tryCallJQuery(function(t){return t(n).keyup()})},i.dateJsonRegx=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)(:\d*)?(Z|[\+\-]\d{2}:\d{2}|)$/,i.requestVerificationTokenKey="RequestVerificationToken",i}();t.Utils=i})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var wijmo;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Control||(n.Control={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.CancelEventArgs||(n.CancelEventArgs={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.EventArgs||(n.EventArgs={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.PropertyChangedEventArgs||(n.PropertyChangedEventArgs={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.RequestErrorEventArgs||(n.RequestErrorEventArgs={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Tooltip||(n.Tooltip={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.TooltipEventArgs||(n.TooltipEventArgs={}))}(wijmo||(wijmo={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.CollectionView||(n.CollectionView={}))})(t=n.collections||(n.collections={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.NotifyCollectionChangedEventArgs||(n.NotifyCollectionChangedEventArgs={}))})(t=n.collections||(n.collections={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.PageChangingEventArgs||(n.PageChangingEventArgs={}))})(t=n.collections||(n.collections={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.PropertyGroupDescription||(n.PropertyGroupDescription={}))})(t=n.collections||(n.collections={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.SortDescription||(n.SortDescription={}))})(t=n.collections||(n.collections={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.GroupDescription||(n.GroupDescription={}))})(t=n.collections||(n.collections={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ICollectionView||(n.ICollectionView={}))})(t=n.collections||(n.collections={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.IEditableCollectionView||(n.IEditableCollectionView={}))})(t=n.collections||(n.collections={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.IPagedCollectionView||(n.IPagedCollectionView={}))})(t=n.collections||(n.collections={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),wijmo;!function(t){!function(e){"use strict";var r=function(e){function r(r,i,n){var o=e.call(this)||this;return o._count=0,o._sortOnServer=!0,o._pageOnServer=!0,o._filterOnServer=!0,o._showDatesAsGmt=!1,o._inferDataTypes=!0,o.loading=new t.Event,o.loaded=new t.Event,o.error=new t.Event,o._url=t.asString(r,!1),o._tbl=t.asString(i),n&&t.copy(o,n),o.sortDescriptions.collectionChanged.addHandler(function(){o.sortOnServer&&o._getData()}),o._getData(),o}return __extends(r,e),Object.defineProperty(r.prototype,"tableName",{get:function(){return this._tbl},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"fields",{get:function(){return this._fields},set:function(e){this._fields!=e&&(this._fields=t.asArray(e),this._getData())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"requestHeaders",{get:function(){return this._requestHeaders},set:function(t){this._requestHeaders=t},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"keys",{get:function(){return this._keys},set:function(e){this._keys=t.asArray(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"dataTypes",{get:function(){return this._dataTypes},set:function(t){this._dataTypes=t},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"inferDataTypes",{get:function(){return this._inferDataTypes},set:function(e){e!=this.inferDataTypes&&(this._inferDataTypes=t.asBoolean(e),this._getData())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"showDatesAsGmt",{get:function(){return this._showDatesAsGmt},set:function(e){e!=this.showDatesAsGmt&&(this._showDatesAsGmt=t.asBoolean(e),this._getData())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"sortOnServer",{get:function(){return this._sortOnServer},set:function(e){e!=this._sortOnServer&&(this._sortOnServer=t.asBoolean(e),this._getData())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pageOnServer",{get:function(){return this._pageOnServer},set:function(e){e!=this._pageOnServer&&(this._pageOnServer=t.asBoolean(e),this.pageSize&&this._getData())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"filterOnServer",{get:function(){return this._filterOnServer},set:function(e){e!=this._filterOnServer&&(this._filterOnServer=t.asBoolean(e),this._getData())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"filterDefinition",{get:function(){return this._filterDef},set:function(e){e!=this._filterDef&&(this._filterDef=t.asString(e),this._getData())},enumerable:!0,configurable:!0}),r.prototype.updateFilterDefinition=function(e){this.filterOnServer&&t.grid&&t.grid.filter&&e instanceof t.grid.filter.FlexGridFilter&&(this.filterDefinition=this._asODataFilter(e))},Object.defineProperty(r.prototype,"oDataVersion",{get:function(){return this._odv},set:function(e){this._odv=t.asNumber(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isLoading",{get:function(){return this._loading},enumerable:!0,configurable:!0}),r.prototype.onLoading=function(t){this.loading.raise(this,t)},r.prototype.onLoaded=function(t){this.loaded.raise(this,t)},r.prototype.load=function(){this._getData()},r.prototype.onError=function(t){return this.error.raise(this,t),!t.cancel},r.prototype.commitNew=function(){var r=this,i={Accept:"application/json"};if(this.requestHeaders)for(var n in this.requestHeaders)i[n]=this.requestHeaders[n];var o=this.currentAddItem;if(o){var a=this._getWriteUrl();t.httpRequest(a,{method:"POST",requestHeaders:i,data:this._convertToDbFormat(o),success:function(t){var e=JSON.parse(t.response);r.keys.forEach(function(t){o[t]=e[t]}),r.refresh()},error:this._error.bind(this)})}e.prototype.commitNew.call(this)},r.prototype.commitEdit=function(){var r=this.currentEditItem;if(r&&!this.currentAddItem&&!this._sameContent(r,this._edtClone)){var i=this._getWriteUrl(this._edtClone);t.httpRequest(i,{method:"PUT",requestHeaders:this.requestHeaders,data:this._convertToDbFormat(r),error:this._error.bind(this)})}e.prototype.commitEdit.call(this)},r.prototype.remove=function(r){if(r&&r!=this.currentAddItem&&this.items.indexOf(r)>-1){var i=this._getWriteUrl(r);t.httpRequest(i,{method:"DELETE",requestHeaders:this.requestHeaders,error:this._error.bind(this)})}e.prototype.remove.call(this,r)},Object.defineProperty(r.prototype,"totalItemCount",{get:function(){return this._count},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pageCount",{get:function(){return this.pageSize?Math.ceil(this.totalItemCount/this.pageSize):1},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pageSize",{get:function(){return this._pgSz},set:function(e){e!=this._pgSz&&(this._pgSz=t.asInt(e),this.pageOnServer?(this._pgIdx=t.clamp(this._pgIdx,0,this.pageCount-1),this._getData()):this.refresh())},enumerable:!0,configurable:!0}),r.prototype.onPageChanging=function(t){return e.prototype.onPageChanging.call(this,t),!t.cancel&&this.pageOnServer&&this._getData(),!t.cancel},r.prototype._getPageView=function(){return this.pageOnServer?this._view:e.prototype._getPageView.call(this)},r.prototype._performRefresh=function(){var t=this._canFilter,r=this._canSort;this._canFilter=!this._filterOnServer,this._canSort=!this._sortOnServer,e.prototype._performRefresh.call(this),this._canFilter=t,this._canSort=r},r.prototype._storeItems=function(t,e){e?Array.prototype.push.apply(this.sourceCollection,t):this.sourceCollection=t},r.prototype._getReadUrl=function(t){var e=this._url;return"/"!=e[e.length-1]&&(e+="/"),t?e=0==t.indexOf("http")?t:e+t:this._tbl&&(e+=this._tbl),e},r.prototype._getReadParams=function(t){var e={$format:"json"};if(this._tbl&&!t){if(this._odv<4?e.$inlinecount="allpages":e.$count=!0,this.fields&&(e.$select=this.fields.join(",")),this.sortOnServer&&this.sortDescriptions.length){for(var r="",i=0;i<this.sortDescriptions.length;i++){var n=this.sortDescriptions[i];r&&(r+=","),r+=n.property,n.ascending||(r+=" desc")}e.$orderby=r}this.pageOnServer&&this.pageSize>0&&(e.$skip=this.pageIndex*this.pageSize,e.$top=this.pageSize),this.filterDefinition&&(e.$filter=this.filterDefinition)}return e},r.prototype._getData=function(e){var r=this;this._toGetData&&clearTimeout(this._toGetData),this._toGetData=setTimeout(function(){if(null!=r._odv){r._loading=!0,r.onLoading();var i=r._getReadUrl(e);t.httpRequest(i,{requestHeaders:r.requestHeaders,data:r._getReadParams(e),success:function(t){var i=JSON.parse(t.response),n=i.d?i.d.results:i.value,o=i.d?i.d.__count:i["odata.count"]||i["@odata.count"];if(null!=o&&(r._count=parseInt(o)),r.pageIndex>0&&r.pageIndex>=r.pageCount){var a=r.pageIndex;if(r.moveToLastPage(),r.pageIndex!=a)return}e||r.inferDataTypes&&!r._dataTypesInferred&&(r._dataTypesInferred=r._getInferredDataTypes(n));var s=r.dataTypes?r.dataTypes:r._dataTypesInferred;if(s)for(var u=0;u<n.length;u++)r._convertItem(s,n[u]);r._storeItems(n,null!=e),r.refresh(),(e=i.d?i.d.__next:i["odata.nextLink"]||i["@odata.nextLink"])?r._getData(e):(r._loading=!1,r.onLoaded())},error:function(e){if(r._loading=!1,r.onLoaded(),r.onError(new t.RequestErrorEventArgs(e)))throw"HttpRequest Error: "+e.status+" "+e.statusText}})}else r._getSchema()},100)},r.prototype._convertToDbFormat=function(e){var r={};for(var i in e){var n=e[i];t.isDate(n)&&this._showDatesAsGmt?n=new Date(n.getTime()-6e4*n.getTimezoneOffset()):t.isNumber(n)&&this._odv<4&&(n=n.toString()),r[i]=n}return r},r.prototype._convertItem=function(e,r){for(var i in e){var n=e[i],o=r[i];null!=o&&(o=n==t.DataType.Date&&t.isString(o)&&0==o.indexOf("/Date(")?new Date(parseInt(o.substr(6))):t.changeType(o,n,null),t.isDate(o)&&this._showDatesAsGmt&&(o=new Date(o.getTime()+6e4*o.getTimezoneOffset())),r[i]=o)}},r.prototype._getInferredDataTypes=function(e){var i=null;if(e.length>0){for(var n={},o=0;o<e.length&&o<10;o++)this._extend(n,e[o]);for(var a in n){var s=n[a];t.isString(s)&&s.match(r._rxDate)&&(i||(i={}),i[a]=t.DataType.Date)}}return i},r.prototype._getServiceUrl=function(){var t=this._url;return"/"!=t[t.length-1]&&(t+="/"),t},r.prototype._getSchema=function(){var e=this,i=this._getServiceUrl()+"$metadata";this._odv=r._odvCache[i],this._odv?this._getData():t.httpRequest(i,{requestHeaders:this.requestHeaders,success:function(t){var n=t.response.match(/<.*Version\s*=\s*"(.*)"\s*>/i),o=n?parseFloat(n[1]):4;r._odvCache[i]=e._odv=o},error:function(t){r._odvCache[i]=e._odv=4},complete:function(t){e._getData()}})},r.prototype._getWriteUrl=function(e){var r=this._getServiceUrl();if(r+=this._tbl,e){t.assert(this.keys&&this.keys.length>0,"write operations require keys.");var i=[];this.keys.forEach(function(r){t.assert(null!=e[r],"key values cannot be null."),i.push(r+"="+e[r])}),r+="("+i.join(",")+")"}return r},r.prototype._asODataFilter=function(t){for(var e="",r=0;r<t.grid.columns.length;r++){var i=t.grid.columns[r],n=t.getColumnFilter(i,!1);n&&n.isActive&&(e&&(e+=" and "),n.conditionFilter&&n.conditionFilter.isActive?e+=this._asODataConditionFilter(n.conditionFilter):n.valueFilter&&n.valueFilter.isActive&&(e+=this._asODataValueFilter(n.valueFilter)))}return e},r.prototype._asODataValueFilter=function(e){var r=e.column,i=r.binding,n=r.dataMap,o=(e._getUniqueValues(r,!1),"");for(var a in e.showValues){var s=t.changeType(a,r.dataType,r.format);n&&t.isString(s)&&(s=n.getKeyValue(s)),o&&(o+=" or "),o+="("+i+" eq "+this._asODataValue(s,r.dataType)+")"}return o.length&&(o="("+o+")"),o},r.prototype._asODataConditionFilter=function(t){var e=this._asODataCondition(t,t.condition1),r=this._asODataCondition(t,t.condition2);return e&&r?"("+e+(t.and?" and ":" or ")+r+")":e?"("+e+")":r?"("+r+")":null},r.prototype._asODataCondition=function(t,e){var r=t.column.binding,i=this._asODataValue(e.value,t.column.dataType);switch(e.operator){case 0:return r+" eq "+i;case 1:return r+" ne "+i;case 2:return r+" gt "+i;case 3:return r+" ge "+i;case 4:return r+" lt "+i;case 5:return r+" le "+i;case 6:return"startswith("+r+","+i+")";case 7:return"endswith("+r+","+i+")";case 8:return this._odv>=4?"contains("+r+","+i+")":"substringof("+i.toLowerCase()+", tolower("+r+"))";case 9:return this._odv>=4?"not contains("+r+","+i+")":"not substringof("+i.toLowerCase()+", tolower("+r+"))"}},r.prototype._asODataValue=function(e,r){return t.isDate(e)?(this._showDatesAsGmt&&(e=new Date(e.getTime()-6e4*e.getTimezoneOffset())),e.toJSON()):t.isString(e)?"'"+e.replace(/'/g,"''")+"'":null!=e?e.toString():r==t.DataType.String?"''":null},r.prototype._error=function(e){if(this.onError(new t.RequestErrorEventArgs(e)))throw this._getData(),"HttpRequest Error: "+e.status+" "+e.statusText},r._odvCache={},r._rxDate=/^\d{4}\-\d{2}\-\d{2}T\d{2}\:\d{2}\:\d{2}|\/Date\([\d\-]*?\)/,r}(t.collections.CollectionView);e.ODataCollectionView=r}(t.odata||(t.odata={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),wijmo;!function(t){!function(e){"use strict";var r=function(e){function r(t,r,i){var n=this;return null==i&&(i={}),i.pageOnServer=!0,i.sortOnServer=!0,i.canGroup=!1,i.pageSize||(i.pageSize=100),n=e.call(this,t,r,i)||this,n._data=[],n.sourceCollection=n._data,n._skip=0,n.setWindow(0,n.pageSize),n}return __extends(r,e),r.prototype.setWindow=function(t,e){var r=this;this._toSetWindow&&clearTimeout(this._toSetWindow),this._toSetWindow=setTimeout(function(){r._toSetWindow=null,r._performSetWindow(t,e)},50)},Object.defineProperty(r.prototype,"pageOnServer",{get:function(){return!0},set:function(t){if(!t)throw"ODataVirtualCollectionView requires pageOnServer = true."},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"sortOnServer",{get:function(){return!0},set:function(e){if(!t.asBoolean(e))throw"ODataVirtualCollectionView requires sortOnServer = true."},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"filterOnServer",{get:function(){return!0},set:function(e){if(!t.asBoolean(e))throw"ODataVirtualCollectionView requires filterOnServer = true."},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"canGroup",{get:function(){return this._canGroup},set:function(e){if(t.asBoolean(e))throw"ODataVirtualCollectionView does not support grouping."},enumerable:!0,configurable:!0}),r.prototype._performRefresh=function(){this.isLoading||(this._refresh=!0),e.prototype._performRefresh.call(this)},r.prototype._getReadParams=function(t){var r=e.prototype._getReadParams.call(this,t);return r.$skip=this._skip||0,r.$top=this.pageSize,r},r.prototype._storeItems=function(t,e){if(this._refresh||this._data.length!=this.totalItemCount){this._data.length=this.totalItemCount;for(i=0;i<this._data.length;i++)this._data[i]=null;this._refresh=!1}e||(this.moveCurrentToFirst(),this._loadOffset=0);for(var r=this._loadOffset+(this._skip||0),i=0;i<t.length;i++)this._data[i+r]=t[i];this._loadOffset+=t.length},r.prototype._performSetWindow=function(e,r){e=t.asInt(e),r=t.asInt(r),t.assert(r>=e,"Start must be smaller than end.");var i=t.isNumber(this._start)&&e>this._start;this._start=e,this._end=r;for(var n=!1,o=e;o<r&&o<this._data.length&&!n;o++)n=null==this._data[o];if(n){for(var a=Math.max(0,i?e:r-this.pageSize),o=a;o<this._data.length&&null!=this._data[o];o++)a++;this._skip=a,this._getData()}},r}(e.ODataCollectionView);e.ODataVirtualCollectionView=r}(t.odata||(t.odata={}))}(wijmo||(wijmo={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(i){var o=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.cast=function(n){return n},t}(wijmo.EventArgs),u,f,e,s,r;i.QueryEventArgs=o;u=function(n){function t(t){var i=n.call(this)||this;return i._result=t,i}return __extends(t,n),t.cast=function(n){return n},Object.defineProperty(t.prototype,"result",{get:function(){return this._result},enumerable:!0,configurable:!0}),t}(wijmo.EventArgs);i.QueryCompleteEventArgs=u;f=function(n){function t(t){var i=n.call(this)||this;return i._errors=t,i}return __extends(t,n),t.cast=function(n){return n},Object.defineProperty(t.prototype,"errors",{get:function(){return this._errors},enumerable:!0,configurable:!0}),t}(wijmo.CancelEventArgs);i.ErrorEventArgs=f;e=function(i){function e(n){var t=i.call(this)||this,r;return t._disableServerRead=!1,t._batchEdit=!1,t._queryList=[],t._errors=[],t._skip=0,t._top=0,t._isInitializing=!1,t._isFillingData=!1,t._query=0,t._isUpdatingItem=!1,t._isGrouping=!1,t._needMoveCurrentToFirst=!0,t._nullCount=0,t.queryComplete=new wijmo.Event,t.beginQuery=new wijmo.Event,t.endQuery=new wijmo.Event,t.queryData=new wijmo.Event,t.error=new wijmo.Event,t.reponseTextParsing=new wijmo.Event,t.requestDataStringifying=new wijmo.Event,r=t,r._requestParams={},r._applySettings(n),r._batchEdit&&(r.trackChanges=!0),r.groupDescriptions.collectionChanged.removeAllHandlers(),r.groupDescriptions.collectionChanged.addHandler(function(){for(var i,t=r.groupDescriptions,n=0;n<t.length;n++)if(i=wijmo.tryCast(t[n],wijmo.collections.GroupDescription),!i)throw"groupDescriptions array must contain GroupDescription objects.";r.canGroup&&(r._isGrouping=!0,r.refresh(),r._isGrouping=!1)}),t}return __extends(e,i),e.cast=function(n){return n},e.prototype.onSourceCollectionChanged=function(n){this._dataInfo=null;this._nullCount=0;i.prototype.onSourceCollectionChanged.call(this,n)},e.prototype._ensureDataInfo=function(n){if(n&&n.length!==0&&(!this._dataInfo||this._nullCount>0)){this._dataInfo||(this._dataInfo={},this._nullCount=0);var t=0,i=n[t++];for(this._updateObjectInfo(i,this._dataInfo);this._nullCount>0&&t<n.length;)this._updateDataInfoForNull(this._dataInfo,n[t++])}},e.prototype._updateDataInfoForNull=function(n,t){var i,u,r;for(i in n)u=n[i],r=t[i],u==null?r!=null&&(this._nullCount--,this._updateDataInfo(n,i,r)):wijmo.isObject(u)&&this._updateDataInfoForNull(n[i],r)},e.prototype._updateDataInfo=function(n,i,r){r==null?(n[i]=null,this._nullCount++):wijmo.isDate(r)?n[i]=r.dateKind||t.DateKind.Unspecified:wijmo.isObject(r)?(n[i]={},this._updateObjectInfo(r,n[i])):typeof n[i]!="undefined"&&delete n[i]},e.prototype._updateObjectInfo=function(n,t){for(var i in n)this._updateDataInfo(t,i,n[i])},e._processRequestRowData=function(t,i){var r,u;for(r in t)(u=t[r],u!=null)&&(wijmo.isDate(u)?typeof u.dateKind=="undefined"&&(t[r].dateKind=i==null||i[r]==null?n.mvc.DateKind.Unspecified:i[r]):wijmo.isObject(u)&&e._processRequestRowData(u,i[r]))},e.prototype.onQueryComplete=function(n){this.queryComplete.raise(this,n)},e.prototype.onBeginQuery=function(){this._query++;this.beginQuery.raise(this)},e.prototype.onEndQuery=function(){this._query--;this.endQuery.raise(this)},e.prototype._isQuerying=function(){return this._query>0},e.prototype.onQueryData=function(n){this.queryData.raise(this,n)},e.prototype.onError=function(n){return this.error.raise(this,n),!n.cancel},e.prototype.onReponseTextParsing=function(n){return this.reponseTextParsing.raise(this,n),n.cancel},e.prototype.onRequestDataStringifying=function(n){return this.requestDataStringifying.raise(this,n),n.cancel},e.prototype.requireInitData=function(){var n=this;n._isDynamicalLoadingEnabled()?n._sendRequest(n._readActionUrl,{top:n._initialItemsCount}):n._sendRequest(n._readActionUrl)},e.prototype._applySettings=function(n){var t=this,r,i;n&&(t._initialize(function(){n.getError&&(t.getError=n.getError);t._disableServerRead=!!n.disableServerRead;t._pgIdx=n.pageIndex||0;t.pageSize=n.pageSize||0;n.sortDescriptions&&n.sortDescriptions.forEach(function(n){return t.sortDescriptions.push(new wijmo.collections.SortDescription(n.property,n.ascending))});n.groupDescriptions&&n.groupDescriptions.forEach(function(n){i=n.clientClass;r=i?new i(n.propertyName,n.converter):new wijmo.collections.PropertyGroupDescription(n.propertyName,n.converter);t.groupDescriptions.push(r)});t._readActionUrl=n.readActionUrl||"";t._createActionUrl=n.createActionUrl||"";t._updateActionUrl=n.updateActionUrl||"";t._deleteActionUrl=n.deleteActionUrl||"";t._batchEditActionUrl=n.batchEditActionUrl||"";t._batchEdit=!!n.batchEdit;t._initialItemsCount=n.initialItemsCount;t._initEventsOpts(n);n.newItemCreator&&(t.newItemCreator=n.newItemCreator);!t._disableServerRead&&t.pageSize>0&&!t._readActionUrl&&n.sourceCollection&&n.sourceCollection.length>t.pageSize&&(t._disableServerRead=!0)}),t.requireInitData(n))},e.prototype._initEventsOpts=function(n){var t,i;for(t in n)i=n[t],this[t]instanceof wijmo.Event&&i&&wijmo.isFunction(i)&&this[t].addHandler(i)},e.prototype._initialize=function(n){try{this._isInitializing=!0;n()}finally{this._isInitializing=!1}},e.prototype.forceRefresh=function(){this._requestRead()},e.prototype.refresh=function(){this._isInitializing||i.prototype.refresh.call(this)},e.prototype._performRefresh=function(){var n=this,r=n.canFilter,u=n.canSort,t=n._disableServerRead;if(t||!n.beginQuery||n._isUpdatingItem||n._isGrouping||n._isFillingData){t||(n.canFilter=!1,n.canSort=!1);i.prototype._performRefresh.call(this);t||(n.canFilter=r,n.canSort=u);return}n._requestRead()},e.prototype.onCollectionChanged=function(n){(!this._isQuerying()||n&&n.action==wijmo.collections.NotifyCollectionChangedAction.Add)&&i.prototype.onCollectionChanged.call(this,n)},e.prototype._getPageView=function(){var n=this;return n._disableServerRead?i.prototype._getPageView.call(this):n._view},Object.defineProperty(e.prototype,"pageCount",{get:function(){var n=this;return n.pageSize?Math.ceil(n.totalItemCount/n.pageSize):1},enumerable:!0,configurable:!0}),e.prototype.onPageChanging=function(n){var t=i.prototype.onPageChanging.call(this,n);return this._disableServerRead?t:(t&&(this._pgIdx=n.newPageIndex,this._idx=0,this._requestRead(),this.onPageChanged()),!1)},e.prototype.commitNew=function(){var n=this;n.currentAddItem&&n._createActionUrl&&n._requestWrite(r.Create,[n.currentAddItem]);n._isUpdatingItem=!0;i.prototype.commitNew.call(this);n._isUpdatingItem=!1},e.prototype.commitEdit=function(){var n=this,u=n._sameContent(n.currentEditItem,n._edtClone),t;!u&&n._updateActionUrl&&(t=n.currentEditItem&&n.currentEditItem!=n.currentAddItem&&n.items&&n.items.indexOf(n.currentEditItem)>-1,t&&n._requestWrite(r.Update,[n.currentEditItem]));n._isUpdatingItem=!0;i.prototype.commitEdit.call(this);n._isUpdatingItem=!1},e.prototype.remove=function(n){var t=this,u=this.sourceCollection.indexOf(n);u<0||(t._deleteActionUrl&&t._requestWrite(r.Delete,[n]),t._isUpdatingItem=!0,i.prototype.remove.call(this,n),t._isUpdatingItem=!1)},e.prototype.commit=function(){var n=this;n._batchEdit&&(n.commitEdit(),n.commitNew(),(n.itemsAdded&&n.itemsAdded.length||n.itemsRemoved&&n.itemsRemoved.length||n.itemsEdited&&n.itemsEdited.length)&&n._batchEditActionUrl&&n._requestWrite(r.BatchEdit))},e.prototype._processErrors=function(n){var t=this;n.success||this._errors.push(n.error);n.operatedItemResults&&n.operatedItemResults.forEach(function(n){n.success||t._errors.push(n.error)})},e.prototype._showErrors=function(){var n=this;n._errors&&n._errors.length&&n.onError(new f(n._errors))&&alert(n._errors.join(","))},e.prototype._success=function(n){var i=n.items||[],t=this,r=n.skip||0;if(this._ensureDataInfo(i),t._processErrors(n),t.onEndQuery(),t._queryList&&t._queryList.length){t._sendQuery();return}t._showErrors();t._reset();t._pgIdx=n.pageIndex||0;t._fillData(i,r,n.totalItemCount);t.onQueryComplete(new u(n))},e.prototype._isPartialDataLoaded=function(){return this._isDynamicalLoadingEnabled()||this.pageSize>0},e.prototype._isDynamicalLoadingEnabled=function(){return!this.pageSize&&!this._disableServerRead&&this._initialItemsCount!=null},e.prototype._isDisableServerRead=function(){return this._disableServerRead},e.prototype._fillData=function(n,t,i){var r=this,u=r._isDynamicalLoadingEnabled();n=n||[];t=t||0;r._totalItemCount=i||0;try{r._isFillingData=!0;r.deferUpdate(function(){r.sourceCollection.splice(0,r.sourceCollection.length);u?(r._skip=t,r._top=n.length,r.sourceCollection.length=r._totalItemCount,n.forEach(function(n,i){var u=i+t;if(u>=r._totalItemCount||u<0)throw"The index of item is out of range.";r.sourceCollection[u]=n})):n.forEach(function(n){r.sourceCollection.push(n)});r._needMoveCurrentToFirst&&r.currentPosition<0&&(r.moveCurrentToFirst(),r._needMoveCurrentToFirst=!1)})}finally{r._isFillingData=!1}},e.prototype._reset=function(){var n=this;n.trackChanges&&n.clearChanges();n._newItem=null;n._edtItem=null;n._edtClone=null;n._errors=[]},e.prototype._fail=function(n,t,i){this.onEndQuery();var r="("+t+") "+i;this.onQueryComplete(new u({success:!1,error:r}));throw r;},e.prototype._updateAjaxSettings=function(){this._updateSortAjaxSettings();this._upatePageAjaxSettings();this._updateQueryAjaxSettings()},e.prototype._upatePageAjaxSettings=function(){var n=this,t;n._requestParams||(n._requestParams={});t=n._requestParams;!n._disableServerRead&&n.pageSize?(t.pageIndex=n.pageIndex,t.pageSize=n.pageSize):(delete t.pageIndex,delete t.pageSize)},e.prototype._updateSortAjaxSettings=function(){var n=this,t;n._requestParams||(n._requestParams={});t=n._requestParams;n.canSort&&!n._disableServerRead&&n.sortDescriptions&&n.sortDescriptions.length?t.sortDescriptions=n._getSortDesByExpression():delete t.sortDescriptions},e.prototype._getSortDesByExpression=function(){for(var i=this.sortDescriptions,r=[],n=0,t;n<i.length;n++)t=i[n],r.push({property:t.property,ascending:t.ascending});return r},e.prototype._updateQueryAjaxSettings=function(){var n=this,t;n._requestParams||(n._requestParams={});t=n._requestParams;n._collectExtraRequestData(t);n._isDynamicalLoadingEnabled()?(t.skip=n._skip,t.top=n._top):(delete t.skip,delete t.top)},e.prototype._collectExtraRequestData=function(n){var t=new o;this.onQueryData(t);n.extraRequestData=t.extraRequestData},e.prototype._ajax=function(t){n.mvc.Utils.ajax(t)},e.prototype.getColumnData=function(t,i,r){var u=this,f;u._requestParams||(u._requestParams={});f=u._requestParams;u._collectExtraRequestData(f);f=n.mvc.Utils.extend({},f,{column:t,distinct:i});u._sendQueryWithoutUpdate(r,f)},e.prototype.getAllData=function(t){var i=this,r;i._updateAjaxSettings();i._requestParams.pageIndex=0;i._requestParams.pageSize=i.totalItemCount;r=n.mvc.Utils.extend({},i._requestParams);i._sendQueryWithoutUpdate(t,r)},e.prototype._sendQueryWithoutUpdate=function(n,t){var i=this,r={};r.url=i._readActionUrl;t&&(r.data=t);r.responseTextParsing=this.onReponseTextParsing.bind(this);r.requestDataStringifying=this.onRequestDataStringifying.bind(this);n&&(r.success=function(t){i._processErrors(t);i.onEndQuery();i._showErrors();n.call(i,t)});i._queryList.push(r);i._sendQuery(!1)},e.prototype._sendRequest=function(t,i,r){var u=this,f={};u._updateAjaxSettings();i=i==null?n.mvc.Utils.extend({},u._requestParams):n.mvc.Utils.extend({},u._requestParams,i);f.url=t;i&&(f.data=i);r&&(f.success=function(n){r.call(u,n)});f.responseTextParsing=this.onReponseTextParsing.bind(this);f.requestDataStringifying=this.onRequestDataStringifying.bind(this);u._queryList.push(f);u._sendQuery()},e.prototype._sendQuery=function(t){t===void 0&&(t=!0);var i=this,r,u;i._isQuerying()||i._queryList&&i._queryList.length&&(i.onBeginQuery(),r=i._queryList.shift(),r=n.mvc.Utils.extend({},{async:!0,type:"POST",dataType:"json",postType:"json",error:i._fail.bind(i)},r),u=r.success,r.success=function(n){t&&i._success(n);u&&u.call(i,n)},i._ajax(r))},e.prototype.requestItems=function(n,t){var i=this,u,r,f;i._isDynamicalLoadingEnabled()&&((u=Math.max(0,t-n+1),r=i._caculateRangeRow(n,t,u),f=i._skip+i._top-1,i._skip<=r.start&&f>=r.end)||(r=i._caculateRangeRow(r.start,r.end,u),i._skip=r.start,i._top=Math.max(0,r.end-r.start+1),i._sendRequest(i._readActionUrl)))},e.prototype._caculateRangeRow=function(n,t,i){return n=Math.max(0,n-i),t=t+i,t>=this.totalItemCount&&(t=this.totalItemCount-1),{start:n,end:t}},e.prototype._requestRead=function(){var n=this;n._batchEdit&&n.commit();n._sendRequest(n._readActionUrl)},e.prototype._getWriteUrl=function(n){return this["_"+this._toCamelCase(r[n])+"ActionUrl"]||""},e.prototype._toCamelCase=function(n){var t;return n?(t=n.charAt(0).toLowerCase(),n.length>1&&(t=t+n.substr(1)),t):n},e.prototype._updateOperatingItems=function(n,t,i){var u=this,r;return!i||!i.length?n:(r=i.map(function(n){return e._processRequestRowData(n,u._dataInfo),n}),t?(n||(n={}),n[t]=r):n=r,n)},e.prototype._requestWrite=function(n,t){var i=this,f,e,u;if(n===r.BatchEdit)u=i._updateOperatingItems(u,"itemsCreated",i.itemsAdded),u=i._updateOperatingItems(u,"itemsDeleted",i.itemsRemoved),u=i._updateOperatingItems(u,"itemsUpdated",i.itemsEdited);else{if(i._batchEdit)return;u=i._updateOperatingItems(u,null,t)}u&&(e={operatingItems:u,command:n});f=i._getWriteUrl(n);i._sendRequest(f,e)},Object.defineProperty(e.prototype,"totalItemCount",{get:function(){var n=this;return n._disableServerRead?n._view?n._view.length:0:n._totalItemCount||0},enumerable:!0,configurable:!0}),e.prototype._isRemoteMode=function(){return!!this._readActionUrl},e}(wijmo.collections.CollectionView);i.RemoteCollectionView=e;s=function(n){function i(t){var i=n.call(this,t)||this;return i._uniqueId=t.uniqueId,i}return __extends(i,n),i.cast=function(n){return n},i.prototype.requireInitData=function(i){var u=this,r;if(i.readActionUrl){n.prototype.requireInitData.call(this,i);return}r=i.sourceCollection||i.items||[];wijmo.isString(r)&&(r=t.Utils.jsonParse(r,this.onReponseTextParsing.bind(this)));this._ensureDataInfo(r);u._fillData(r,0,i.totalItemCount)},i.prototype.getCallbackManager=function(){var n=this;return n._cbk||(n._cbk=new t.CallbackManager(n._uniqueId))},i.prototype._ajax=function(t){if(t.url){n.prototype._ajax.call(this,t);return}this.getCallbackManager().doCallback(t.data,t.success,t.error,t.requestDataStringifying,t.responseTextParsing)},i}(e);i.CallbackCollectionView=s,function(n){n[n.Read=0]="Read";n[n.Create=1]="Create";n[n.Update=2]="Update";n[n.Delete=3]="Delete";n[n.BatchEdit=4]="BatchEdit"}(r=i.CommandType||(i.CommandType={}))})(i=t.collections||(t.collections={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var t;(function(n){var r=function(n){function i(t){return n.call(this,t.url,t.tableName,t.options)||this}return __extends(i,n),i.prototype._copy=function(i,r){return t._copy(i,r,this)||n.prototype._copy.call(this,i,r)},i}(wijmo.odata.ODataCollectionView),i,t;n.ODataCollectionView=r;i=function(n){function i(t){return n.call(this,t.url,t.tableName,t.options)||this}return __extends(i,n),i.prototype._copy=function(i,r){return t._copy(i,r,this)||n.prototype._copy.call(this,i,r)},i}(wijmo.odata.ODataVirtualCollectionView);n.ODataVirtualCollectionView=i;t=function(){function n(){}return n._copy=function(n,t,i){return n=="sortDescriptions"?(t&&t.forEach(function(n){return i.sortDescriptions.push(new wijmo.collections.SortDescription(n.property,n.ascending))}),!0):n=="groupDescriptions"?(t&&t.forEach(function(n){var t=n.clientClass,r=t?new t(n.propertyName,n.converter):new wijmo.collections.PropertyGroupDescription(n.propertyName,n.converter);i.groupDescriptions.push(r)}),!0):n=="pageIndex"?(i._pgIdx=Math.max(0,t),!0):!1},n._getCtorOptions=function(n){var t="",i="";return n&&(t=t||n.serviceUrl,delete n.serviceUrl,i=i||n.tableName,delete n.tableName),{url:t,tableName:i,options:n}},n}();n._ODataInitializer=t})(t=n.odata||(n.odata={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var c1;(function(n){var t;(function(n){var t=function(){function t(i){var r,u,f,e;if(this._symbolList={},this._sections=[],this._scripts=[],this._scriptSnippetsCount=0,u=!1,i!=null){if(f=n.Utils.getType(i),f==="array")r=i[0],u=!!i[1];else if(f==="string")r=i;else throw"Invalid parameter type.";(u?(e=document.getElementById(r),e!=null&&(r=e.innerHTML)):r=t._unwrap(r),n.Utils.isEmptyContent(r))||this._initContents(r)}}return t._unwrap=function(n){var i=n,r=n.indexOf(t.C1_TEMPLATE_START_TAG),u=n.lastIndexOf(t.C1_TEMPLATE_END_TAG);return r!=-1&&u!=-1&&(i=n.substring(r+t.C1_TEMPLATE_START_TAG.length,u)),i},t.prototype._initContents=function(n){var i=n,e=t.C1_TEMPLATE_START_TAG.length,o=t.C1_TEMPLATE_END_TAG.length,u=0,f=0,r;for(this._innerTemplatesContents=[],this._content="";i.length;){if(r=t._getFirstInnerTemplatePosition(i),!r){this._content+=i;return}this._content+=i.substring(0,r.startIndex);this._content+="<"+t.C1_INNER_TEMPLATE_PLACEHOLDER+" index="+f.toString()+" />";this._innerTemplatesContents.push(i.substring(r.startIndex+e,r.endIndex));u=r.endIndex+o;i=i.substr(u);f++}},t._getFirstInnerTemplatePosition=function(n){var u=n.indexOf(t.C1_TEMPLATE_START_TAG),i=n.indexOf(t.C1_TEMPLATE_END_TAG),o=t.C1_TEMPLATE_START_TAG.length,s=t.C1_TEMPLATE_END_TAG.length,f,r,e;if(u!=-1&&i!=-1){r=u+o;do{if(e=n.substring(r,i),f=e.indexOf(t.C1_TEMPLATE_START_TAG),f==-1)return{startIndex:u,endIndex:i};r=i+s;i=n.indexOf(t.C1_TEMPLATE_END_TAG,r)}while(i==-1)}},t.prototype.apply=function(n){var i,r;if(n=t._resolveData(n),this._sections.length||this._initialize(),this._scriptSnippetsCount>0)for(r=t.getGlobalContextName(n[t.UID]),window[r]={},i=0;i<this._scriptSnippetsCount;i++)window[r]["n"+i.toString()]=n[t.DATACONTEXT];return this._replaceSymbols(n)},t.prototype.applyTo=function(n,i){var r,u,f;for(i=t._resolveData(i),n.innerHTML=this.apply(i),r=0;r<this._scripts.length;r++)u=this._scripts[r],u.isSrc?t.excuteScriptSrc(u.data):(f=this._replaceSectionSymbols(i,u.data,!0),t.excuteScriptSnippets(f))},t._resolveData=function(n){return n=n||{},n[t.UID]==null&&(n[t.UID]="_"+(new Date).getTime()),n[t.DATACONTEXT]||(n[t.DATACONTEXT]={}),n},t.getGlobalContextName=function(n){return n==null&&(n=""),t.TEMPLATE_PREFIX+n},t.prototype._initialize=function(){this._content=this._content.replace(/<\\\/script>/g,"<\/script>");this._parseSymbols();this._parseContent()},t.prototype._parseSymbols=function(){var u=this._symbolList,r,f,i,e;if(!n.Utils.isEmptyContent(this._content)){if(r=this._content.match(t.ALL_SYMBOL),r!=null&&r.length)for(f=0;f<r.length;f++)i=t.getSymbol(r[f]),i&&typeof u[i.key]=="undefined"&&(u[i.key]={name:i.name,format:i.format});e=t.getSymbolRegStr(t.UID);typeof u[e]=="undefined"&&(u[e]={name:t.UID})}},t.prototype._parseContent=function(){var r=this._content,u=0,i,e,h,o,f,s;if(!n.Utils.isEmptyContent(r)){for(i=t.COMPLETE_SCRIPT.exec(r);i!=null;)this._updateContentSections(!1,i.input.substring(0,i.index)),e=n.Utils.isEmptyContent(i[1]),h=n.Utils.isEmptyContent(i[3]),e&&h?n.Utils.isEmptyContent(i[4])?this._updateContentSections(!1,i[0]):(f=i[2],s=t.processScriptCode(i[4],u),this._scripts.push({isSrc:!1,data:s}),f+=s,f+=i[5],this._updateContentSections(!0,f),u=u+1):(o=i[3],e||(o=i[1]),this._scripts.push({isSrc:!0,data:o}),this._updateContentSections(!1,i[0])),r=i.input.substr(i.index+i[0].length),i=t.COMPLETE_SCRIPT.exec(r);this._updateContentSections(!1,r);this._scriptSnippetsCount=u}},t.prototype._replaceSymbols=function(n){for(var t,r="",i=0;i<this._sections.length;i++)t=this._sections[i],r+=this._replaceSectionSymbols(n,t.data,t.isScriptCode);return r},t.prototype._updateContentSections=function(t,i){var r;n.Utils.isEmptyContent(i)||(r=this._sections.length,r&&!!this._sections[r-1].isScriptCode!=!!!t?this._sections[r-1].data+=i:this._sections.push({isScriptCode:t,data:i}))},t.excuteScriptSrc=function(t){return n.Utils.ajax({url:t,type:"GET",dataType:"script",async:!1})},t.excuteScriptSnippets=function(n){(window.execScript||function(n){window.eval.call(window,n)})(n)},t.getSymbol=function(n){var i=t.ONE_SYMBOL.exec(n);if(i!=null&&i.length&&i[1]!=null)return{key:t.getRegexText(t.getSymbolRegStr(i[1],i[2])),name:i[1],format:i[2]}},t.getRegexText=function(n){return n.replace(/\./g,"\\.").replace(/\[/g,"\\[")},t.getSymbolRegStr=function(t,i){var r;return n.Utils.isEmptyContent(t)?r:(r="{{\\s*?"+t+"\\s*?",i==null||i.length||(r+="\\|\\s*?"+i+"\\s*?"),r+"}}")},t.prototype._replaceSectionSymbols=function(i,r,u){var c=this,f,e,s,h,o;if(u===void 0&&(u=!1),f=r,!n.Utils.isEmptyContent(r)){for(e in this._symbolList)h=new RegExp(e,"g"),o=t.getValue(this._symbolList[e].name,i),s=this._symbolList[e].name===t.UID?String(o):t.getFormattedText(o,this._symbolList[e].format,u),f=f.replace(h,s),f=f.replace(t.C1_INNER_TEMPLATE_PLACEHOLDER_REGEXP,function(n,t){return c._innerTemplatesContents[t]});return f}},t.getFormattedText=function(i,r,u){u===void 0&&(u=!1);var f;return f=n.Utils.isEmptyContent(r)?i:wijmo.Globalize.format(i,r),t.getJsonText(f,!u)},t.getJsonText=function(i,r){r===void 0&&(r=!0);var u=t.c1Stringify(i,r),f=n.Utils.getType(i);return r&&(i===null||typeof i=="undefined")?"":((r&&f==="date"||f==="string")&&(u=u.substr(1,u.length-2),u=u.replace(/\\\\/g,"\\")),u)},t.c1Stringify=function(t,i){var r=this;return i===void 0&&(i=!0),n.Utils.jsonStringify(t,null,function(t,u){if(!i){var f=n.Utils.tryGetDate(r,t,u);if(f)return"new Date('"+f.toJSON()+"')"}return u})},t.getValue=function(n,i){if(i!=null&&n!=null&&n.length)return typeof i[n]!="undefined"?i[n]:i[t.DATACONTEXT]==null?void 0:t.getPropertyValue(n,i[t.DATACONTEXT])},t.getPropertyValue=function(n,t){var r,i,u,f,o,e;if(n&&n in t)return t[n];for(r=n?n.split("."):[],i=0,i=0;i<r.length;i++)u=r[i],f=u.indexOf("["),f>-1&&(o=u.indexOf("]",f),o>-1&&(r[i]=u.substr(0,f),r.splice(++i,0,u.substr(f+1,o))));for(e=t,i=0;i<r.length&&e;i++)e=e[r[i]];return e},t.processScriptCode=function(n,i){var r="window['"+t.getGlobalContextName("{{"+t.UID+"}}")+"']['n"+i+"']";return"(function($data){"+n+";delete "+r+";})("+r+");"},t.DATACONTEXT="dataContext",t.UID="uid",t.TEMPLATE_PREFIX="_c1Template_",t.C1_TEMPLATE_TAG="C1TemplateContent",t.C1_TEMPLATE_START_TAG="<"+t.C1_TEMPLATE_TAG+">",t.C1_TEMPLATE_END_TAG="<\/"+t.C1_TEMPLATE_TAG+">",t.C1_INNER_TEMPLATE_PLACEHOLDER="C1_INNER_TEMPLATE_PLACEHOLDER",t.ALL_SYMBOL=/{{\s*?([^\|\s\}]+?)\s*?(?:\|\s*?(\S+?))?\s*?}}/g,t.ONE_SYMBOL=/{{\s*?([^\|\s\}]+?)\s*?(?:\|\s*?(\S+?))?\s*?}}/,t.COMPLETE_SCRIPT=/<script(?:\s+[^>]+)*?\s+src\s*?=\s*?[\'\"]([^\'|\"]+?)[\'\"]\/>|(<script(?:\s+[^>]+)*?(?:\s+src\s*?=\s*?[\'\"]([^\'|\"]+?)[\'\"])?[^>]*?>)([\s\S]*?)(<\/script>)/,t.reISO=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?):(\d{3})Z$/,t.C1_INNER_TEMPLATE_PLACEHOLDER_REGEXP=new RegExp("<"+t.C1_INNER_TEMPLATE_PLACEHOLDER+" index=(\\d+) />","g"),t}();n.Template=t})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){function c(n){return n[r]}function f(n,t){n[r]=t}function l(n){return n[u]}function e(n,t){n[u]=t}function o(n,t,i,r,u){var f=n[t];n[t]=function(){var t=arguments,e;return i&&i.apply(u,t),f&&(e=f.apply(n,t)),r&&r.apply(u,t),e}}var r="_c1MvcOptions",u="_c1MvcUniqueId",s,i,h;t._getOptions=c;t._setOptions=f;t._getUniqueId=l;t._setUniqueId=e;t._overrideMethod=o;s=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_initializerType",{get:function(){return i},enumerable:!0,configurable:!0}),t}(n._ControlWrapper);t._ControlWrapper=s;i=function(n){function i(){return n!==null&&n.apply(this,arguments)||this}return __extends(i,n),i.prototype._beforeInitializeControl=function(){},i.prototype._afterInitializeControl=function(){},i.prototype._override=function(){var t=this,r=t.control;n.prototype._override.call(this);o(r,i._INITIAL_NAME,function(n,u){i.bindTemplateScope(n,u);f(r,n);e(r,n.uniqueId);delete n.uniqueId;t._beforeInitializeControl(n)},function(n){t._afterInitializeControl(n)})},i.bindTemplateScope=function(n,i){if(!n||!n.templateBindings||!i)return n;for(var r in n.templateBindings)n[r]=t.Template.getPropertyValue(n.templateBindings[r],i);return delete n.templateBindings,n},i._INITIAL_NAME="initialize",i}(n._Initializer);t._Initializer=i;h=function(i){function r(){return i!==null&&i.apply(this,arguments)||this}return __extends(r,i),r.prototype._beforeInitializeControl=function(n){i.prototype._beforeInitializeControl.call(this,n);n&&(this._initEventsOpts(n,["reponseTextParsing","requestDataStringifying"]),wijmo.isString(n.itemsSource)&&(n.itemsSource=t.Utils.jsonParse(n.itemsSource,this._onReponseTextParsing.bind(this))))},r.prototype._initEventsOpts=function(n,t){var i=this;t.forEach(function(t){var r=n[t];i.control[t]instanceof wijmo.Event&&r&&wijmo.isFunction(r)&&i.control[t].addHandler(r);delete n[t]})},r.prototype._onReponseTextParsing=function(n){var t=this.control.reponseTextParsing;if(t&&t instanceof wijmo.Event)return t.raise(this.control,n),n.cancel},r.prototype._onRequestDataStringifying=function(n){var t=this.control.requestDataStringifying;if(t&&t instanceof wijmo.Event)return t.raise(this.control,n),n.cancel},r.prototype._ajax=function(t){var i=t;return i.requestDataStringifying=this._onRequestDataStringifying.bind(this),i.responseTextParsing=this._onReponseTextParsing.bind(this),n.mvc.Utils.ajax(i)},r}(i);t._SourceInitializer=h})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(e){function i(i,n){var o=e.call(this,i,null,!0)||this;o._showBtn=!0,o._autoExpand=!0,o._animate=!1,o.textChanged=new t.Event,o.isDroppedDownChanging=new t.Event,o.isDroppedDownChanged=new t.Event;var s=o.getTemplate();o.applyTemplate("wj-control wj-content wj-dropdown",s,{_tbx:"input",_btn:"btn",_dropDown:"dropdown"},"input");var r=o._tbx;o._elRef=r,t.disableAutoComplete(r),o._createDropDown(),o._updateBtn(),t.removeChild(o._dropDown),t.addClass(o.hostElement,"wj-state-collapsed");var a=o._updateFocusState.bind(o);o.addEventListener(o.dropDown,"blur",a,!0),o.addEventListener(o.dropDown,"focus",a);var l=o._keydown.bind(o);return o.addEventListener(o.hostElement,"keydown",l),o.addEventListener(o.dropDown,"keydown",l),o.addEventListener(r,"keypress",function(t){9787==t.keyCode&&o._altDown&&t.preventDefault()}),o.addEventListener(r,"input",function(){o._setText(o.text,!1)}),o.addEventListener(r,"click",function(){o._autoExpand&&o._expandSelection()}),t.isIE9()&&o.addEventListener(r,"keyup",function(){o._setText(o.text,!1)}),o.addEventListener(o._btn,"mousedown",function(t){t.defaultPrevented||0!=t.button||setTimeout(function(){o._btnclick(t)})}),o.addEventListener(o._dropDown,"click",function(t){t.stopPropagation()}),o}return __extends(i,e),Object.defineProperty(i.prototype,"text",{get:function(){return this._tbx.value},set:function(t){t!=this.text&&this._setText(t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"inputElement",{get:function(){return this._tbx},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isReadOnly",{get:function(){return this._tbx.readOnly},set:function(e){this._tbx.readOnly=t.asBoolean(e),t.toggleClass(this.hostElement,"wj-state-readonly",this.isReadOnly)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isRequired",{get:function(){return this._tbx.required},set:function(e){this._tbx.required=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"placeholder",{get:function(){return this._tbx.placeholder},set:function(t){this._tbx.placeholder=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isDroppedDown",{get:function(){var t=this._dropDown;return t&&"none"!=t.style.display},set:function(e){if((e=t.asBoolean(e)&&!this.isDisabled&&!this.isReadOnly)!=this.isDroppedDown&&this.onIsDroppedDownChanging(new t.CancelEventArgs)){var i=this.hostElement,n=this._dropDown;if(e)n.style.minWidth||(n.style.minWidth=i.getBoundingClientRect().width+"px"),n.style.display="block",this._updateDropDown();else{var o=this.containsFocus();t.hidePopup(n),o&&(this.isTouching&&this.showDropDownButton?this.focus():this.selectAll())}this._updateFocusState(),t.toggleClass(i,"wj-state-collapsed",!this.isDroppedDown),this.onIsDroppedDownChanged()}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dropDown",{get:function(){return this._dropDown},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dropDownCssClass",{get:function(){return this._cssClass},set:function(e){e!=this._cssClass&&(t.removeClass(this._dropDown,this._cssClass),this._cssClass=t.asString(e),t.addClass(this._dropDown,this._cssClass))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showDropDownButton",{get:function(){return this._showBtn},set:function(e){this._showBtn=t.asBoolean(e),this._updateBtn()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"autoExpandSelection",{get:function(){return this._autoExpand},set:function(e){this._autoExpand=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAnimated",{get:function(){return this._animate},set:function(e){this._animate=t.asBoolean(e)},enumerable:!0,configurable:!0}),i.prototype.selectAll=function(){this._elRef==this._tbx?t.setSelectionRange(this._tbx,0,this.text.length):this.containsFocus()||this.focus()},i.prototype.onTextChanged=function(t){this.textChanged.raise(this,t),this._updateState()},i.prototype.onIsDroppedDownChanging=function(t){return this.isDroppedDownChanging.raise(this,t),!t.cancel},i.prototype.onIsDroppedDownChanged=function(t){this.isDroppedDownChanged.raise(this,t)},i.prototype.onGotFocus=function(i){this.isTouching||t.contains(this._dropDown,t.getActiveElement())||this.selectAll(),e.prototype.onGotFocus.call(this,i)},i.prototype.onLostFocus=function(t){this._commitText(),this.containsFocus()||(this.isDroppedDown=!1),e.prototype.onLostFocus.call(this,t)},i.prototype.containsFocus=function(){return e.prototype.containsFocus.call(this)||this.isDroppedDown&&t.contains(this._dropDown,t.getActiveElement())},i.prototype.dispose=function(){this.isDroppedDown=!1;var i=this.dropDown;if(i){var n=t.Control.getControl(i);n&&n.dispose(),t.removeChild(i)}e.prototype.dispose.call(this)},i.prototype.refresh=function(i){if(void 0===i&&(i=!0),e.prototype.refresh.call(this,i),this.isDroppedDown&&"none"!=getComputedStyle(this.hostElement).display){var n=t.getActiveElement();t.showPopup(this._dropDown,this.hostElement,!1,!1,null==this.dropDownCssClass),n instanceof HTMLElement&&n!=t.getActiveElement()&&n.focus()}},i.prototype._handleResize=function(){this.isDroppedDown&&this.refresh()},i.prototype._expandSelection=function(){var e=this._tbx,i=e.value,n=e.selectionStart,o=e.selectionEnd;if(i&&n==o){var s=this._getCharType(i,n);if(s>-1){for(;o<i.length&&this._getCharType(i,o)==s;o++);for(;n>0&&this._getCharType(i,n-1)==s;n--);n!=o&&t.setSelectionRange(e,n,o)}}},i.prototype._getCharType=function(t,e){var i=t[e];return i>="0"&&i<="9"?0:i>="a"&&i<="z"||i>="A"&&i<="Z"?1:-1},i.prototype._keydown=function(e){if(this._altDown=e.altKey,!e.defaultPrevented)switch(e.keyCode){case t.Key.Tab:case t.Key.Escape:case t.Key.Enter:this.isDroppedDown&&(this.isDroppedDown=!1,e.keyCode==t.Key.Tab||this.containsFocus()||this.focus(),e.preventDefault());break;case t.Key.F4:case t.Key.Up:case t.Key.Down:if((e.keyCode==t.Key.F4||e.altKey)&&t.contains(document.body,this.hostElement)){var i=this.isDroppedDown;this.isDroppedDown=!i,this.isDroppedDown==!i&&e.preventDefault()}}},i.prototype._btnclick=function(t){t.defaultPrevented||0!=t.button||(this.isDroppedDown=!this.isDroppedDown)},i.prototype._setText=function(t,e){null==t&&(t=""),(t=t.toString())!=this._tbx.value&&(this._tbx.value=t),t!=this._oldText&&(this._oldText=t,this.onTextChanged())},i.prototype._updateBtn=function(){this._btn.tabIndex=-1,this._btn.style.display=this._showBtn?"":"none"},i.prototype._createDropDown=function(){},i.prototype._commitText=function(){},i.prototype._updateDropDown=function(){this.isDroppedDown&&(this._commitText(),t.showPopup(this._dropDown,this.hostElement,!1,this._animate,null==this.dropDownCssClass))},i.controlTemplate='<div style="position:relative" class="wj-template"><div class="wj-input"><div class="wj-input-group wj-input-btn-visible"><input wj-part="input" type="text" class="wj-form-control" /><span wj-part="btn" class="wj-input-group-btn" tabindex="-1"><button class="wj-btn wj-btn-default" type="button" tabindex="-1"><span class="wj-glyph-down"></span></button></span></div></div><div wj-part="dropdown" class="wj-content wj-dropdown-panel" style="display:none"></div></div>',i}(t.Control);e.DropDown=i}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i;!function(t){t[t.None=0]="None",t[t.Day=1]="Day",t[t.Month=2]="Month"}(i=e.DateSelectionMode||(e.DateSelectionMode={}));var n=function(n){function o(e,o){var s=n.call(this,e)||this;return s._readOnly=!1,s._selMode=i.Day,s._fmtYrMo="y",s._fmtYr="yyyy",s._fmtDayHdr="ddd",s._fmtDay="d ",s._fmtMonths="MMM",s.valueChanged=new t.Event,s.displayMonthChanged=new t.Event,s.formatItem=new t.Event,s._value=t.DateTime.newDate(),s._currMonth=s._getMonth(s._value),s._createChildren(),s.addEventListener(s.hostElement,"mouseup",s._click.bind(s)),s.addEventListener(s.hostElement,"keydown",s._keydown.bind(s)),s.initialize(o),s.refresh(!0),s}return __extends(o,n),Object.defineProperty(o.prototype,"value",{get:function(){return this._value},set:function(e){e=t.asDate(e,!0),e=this._clamp(e),(this._valid(e)||null==e)&&(this.displayMonth=this._getMonth(e),t.DateTime.equals(this._value,e)||(this._value=e,this.invalidate(!1),this.onValueChanged()))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"min",{get:function(){return this._min},set:function(e){e!=this.min&&(this._min=t.asDate(e,!0),this.refresh())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"max",{get:function(){return this._max},set:function(e){e!=this.max&&(this._max=t.asDate(e,!0),this.refresh())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"selectionMode",{get:function(){return this._selMode},set:function(e){if((e=t.asEnum(e,i))!=this._selMode){this._selMode=e;var n=this._monthMode();n&&(this.monthView=!1);var o=this._btnMth.querySelector(".wj-glyph-down");o&&(o.style.display=n?"none":""),this.refresh()}},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isReadOnly",{get:function(){return this._readOnly},set:function(e){this._readOnly=t.asBoolean(e),t.toggleClass(this.hostElement,"wj-state-readonly",this.isReadOnly)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"firstDayOfWeek",{get:function(){return this._fdw},set:function(e){if(e!=this._fdw){if((e=t.asNumber(e,!0))&&(e>6||e<0))throw"firstDayOfWeek must be between 0 and 6 (Sunday to Saturday).";this._fdw=e,this.refresh()}},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"displayMonth",{get:function(){return this._currMonth},set:function(e){t.DateTime.equals(this.displayMonth,e)||(e=t.asDate(e),(this.monthView?this._monthInValidRange(e):this._yearInValidRange(e))&&(this._currMonth=this._getMonth(this._clamp(e)),this.invalidate(!0),this.onDisplayMonthChanged()))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"formatYearMonth",{get:function(){return this._fmtYrMo},set:function(e){e!=this._fmtYrMo&&(this._fmtYrMo=t.asString(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"formatDayHeaders",{get:function(){return this._fmtDayHdr},set:function(e){e!=this._fmtDayHdr&&(this._fmtDayHdr=t.asString(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"formatDays",{get:function(){return this._fmtDay},set:function(e){e!=this._fmtDay&&(this._fmtDay=t.asString(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"formatYear",{get:function(){return this._fmtYr},set:function(e){e!=this._fmtYr&&(this._fmtYr=t.asString(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"formatMonths",{get:function(){return this._fmtMonths},set:function(e){e!=this._fmtMonths&&(this._fmtMonths=t.asString(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"showHeader",{get:function(){return"none"!=this._tbHdr.style.display},set:function(e){this._tbHdr.style.display=t.asBoolean(e)?"":"none"},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"monthView",{get:function(){return"none"!=this._tbMth.style.display},set:function(t){t!=this.monthView&&(this._tbMth.style.display=t?"":"none",this._tbYr.style.display=t?"none":"")},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"itemFormatter",{get:function(){return this._itemFormatter},set:function(e){e!=this._itemFormatter&&(this._itemFormatter=t.asFunction(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"itemValidator",{get:function(){return this._itemValidator},set:function(e){e!=this._itemValidator&&(this._itemValidator=t.asFunction(e),this.invalidate())},enumerable:!0,configurable:!0}),o.prototype.onValueChanged=function(t){this.valueChanged.raise(this,t)},o.prototype.onDisplayMonthChanged=function(t){this.displayMonthChanged.raise(this,t)},o.prototype.onFormatItem=function(t){this.formatItem.raise(this,t)},o.prototype.refresh=function(i){void 0===i&&(i=!0);var o,s,r,a=this.displayMonth,l=null!=this.firstDayOfWeek?this.firstDayOfWeek:t.Globalize.getFirstDayOfWeek();n.prototype.refresh.call(this,i),this._firstDay=t.DateTime.addDays(a,-(a.getDay()-l+7)%7),t.setText(this._spMth,t.Globalize.format(a,this._fmtYrMo)),o=this._tbMth.querySelectorAll("td");for(p=0;p<7&&p<o.length;p++)r=t.DateTime.addDays(this._firstDay,p),t.setText(o[p],t.Globalize.format(r,this._fmtDayHdr));for(p=7;p<o.length;p++){s=o[p],r=t.DateTime.addDays(this._firstDay,p-7),t.setText(s,t.Globalize.format(r,this._fmtDay));var h=!this._valid(r);if(t.toggleClass(s,"wj-state-invalid",h),t.toggleClass(s,"wj-state-selected",this._selMode&&t.DateTime.sameDate(r,this.value)),t.toggleClass(s,"wj-day-today",t.DateTime.sameDate(r,t.DateTime.newDate())),t.toggleClass(s,"wj-day-othermonth",h||r.getMonth()!=a.getMonth()||!this._inValidRange(r)),this.itemFormatter&&this.itemFormatter(r,s),this.formatItem.hasHandlers){var c=new e.FormatItemEventArgs(p,r,s);this.onFormatItem(c)}}var u=this._tbMth.querySelectorAll("tr");u.length&&(r=t.DateTime.addDays(this._firstDay,28),u[u.length-2].style.display=r.getMonth()==a.getMonth()?"":"none",r=t.DateTime.addDays(this._firstDay,35),u[u.length-1].style.display=r.getMonth()==a.getMonth()?"":"none"),(o=this._tbYr.querySelectorAll("td")).length&&t.setText(o[0],t.Globalize.format(a,this._fmtYr));for(var p=1;p<o.length;p++)s=o[p],r=t.DateTime.newDate(a.getFullYear(),p-1,1),t.setText(s,t.Globalize.format(r,this._fmtMonths)),s.className="",t.toggleClass(s,"wj-state-disabled",!this._monthInValidRange(r)),t.toggleClass(s,"wj-state-selected",this._sameMonth(r,this.value))},o.prototype._canChangeValue=function(){return!this._readOnly&&this._selMode!=i.None},o.prototype._valid=function(e){return!!t.isDate(e)&&(!!t.DateTime.sameDate(e,this._clamp(e))&&(!t.isFunction(this.itemValidator)||this.itemValidator(e)))},o.prototype._inValidRange=function(e){return!(this.min&&e<t.DateTime.fromDateTime(this.min,e))&&!(this.max&&e>t.DateTime.fromDateTime(this.max,e))},o.prototype._monthInValidRange=function(e){if(this.min||this.max){var i=e.getFullYear(),n=e.getMonth(),o=t.DateTime.newDate(i,n,1),s=t.DateTime.newDate(i,n+1,0);if(this.min&&this.min>s)return!1;if(this.max&&this.max<o)return!1}return!0},o.prototype._yearInValidRange=function(e){if(this.min||this.max){var i=e.getFullYear(),n=t.DateTime.newDate(i,0),o=t.DateTime.newDate(i,11,31);if(this.min&&this.min>o)return!1;if(this.max&&this.max<n)return!1}return!0},o.prototype._sameMonth=function(e,i){return t.isDate(e)&&t.isDate(i)&&e.getMonth()==i.getMonth()&&e.getFullYear()==i.getFullYear()},o.prototype._getValidDate=function(e,i){if(t.isDate(e))for(var n=e.getFullYear(),o=e.getMonth()+(i?0:1),s=i?1:0,r=t.DateTime.newDate(n,o,s),a=i?1:-1,l=0;l<31;l++){if(this._valid(r))return r;r=t.DateTime.addDays(r,a)}return null},o.prototype._clamp=function(e){if(e){if(this.min){var i=t.DateTime.fromDateTime(this.min,e);e<i&&(e=i)}if(this.max){var n=t.DateTime.fromDateTime(this.max,e);e>n&&(e=n)}}return e},o.prototype._createChildren=function(){var t=this.getTemplate();this.applyTemplate("wj-control wj-calendar",t,{_tbHdr:"tbl-header",_btnMth:"btn-month",_spMth:"span-month",_btnPrv:"btn-prev",_btnTdy:"btn-today",_btnNxt:"btn-next",_tbMth:"tbl-month",_tbYr:"tbl-year"});for(var e=this._createElement("tr",this._tbMth,"wj-header"),i=0;i<7;i++)this._createElement("td",e);for(var n=0;n<6;n++){e=this._createElement("tr",this._tbMth);for(i=0;i<7;i++)this._createElement("td",e)}e=this._createElement("tr",this._tbYr,"wj-header"),this._createElement("td",e).setAttribute("colspan","4");for(var o=0;o<3;o++){e=this._createElement("tr",this._tbYr);for(var s=0;s<4;s++)this._createElement("td",e)}},o.prototype._createElement=function(e,i,n){var o=document.createElement(e);return i&&i.appendChild(o),n&&t.addClass(o,n),o},o.prototype._click=function(e){if(!e.defaultPrevented&&0==e.button){var i=!1,n=e.target;if(t.contains(this._btnMth,n)&&!this._monthMode()?(this.monthView=!this.monthView,i=!0):t.contains(this._btnPrv,n)?(this._navigate(-1),i=!0):t.contains(this._btnNxt,n)?(this._navigate(1),i=!0):t.contains(this._btnTdy,n)&&(this._navigate(0),i=!0),n&&!i&&(n=t.closest(n,"TD")))if(this.monthView){if((o=this._getCellIndex(this._tbMth,n))>6&&this._canChangeValue()){s=t.DateTime.fromDateTime(t.DateTime.addDays(this._firstDay,o-7),this.value);this._inValidRange(s)&&this._valid(s)&&(this.value=s),i=!0}}else{var o=this._getCellIndex(this._tbYr,n);if(o>0){if(this.displayMonth=t.DateTime.newDate(this.displayMonth.getFullYear(),o-1,1),this._monthMode()){if(this._canChangeValue()){var s=t.DateTime.fromDateTime(this.displayMonth,this.value);this._inValidRange(s)&&(this.value=s)}}else this.monthView=!0;i=!0}}i&&(e.preventDefault(),this.focus())}},o.prototype._getCellIndex=function(t,e){for(var i=t.querySelectorAll("TD"),n=0;n<i.length;n++)if(i[n]==e)return n;return-1},o.prototype._keydown=function(e){if(!e.defaultPrevented){if(e.altKey)switch(e.keyCode){case t.Key.Up:case t.Key.Down:return;case t.Key.End:return this._navigate(0),void e.preventDefault()}if(!(e.ctrlKey||e.metaKey||e.shiftKey)){var i=0,n=0,o=!0;if(this.monthView)switch(e.keyCode){case t.Key.Left:i=-1;break;case t.Key.Right:i=1;break;case t.Key.Up:i=-7;break;case t.Key.Down:i=7;break;case t.Key.PageDown:n=e.altKey?12:1;break;case t.Key.PageUp:n=e.altKey?-12:-1;break;case t.Key.Home:this._canChangeValue()&&(s=this._getValidDate(this.value,!0))&&(this.value=t.DateTime.fromDateTime(s,this.value));break;case t.Key.End:this._canChangeValue()&&(s=this._getValidDate(this.value,!1))&&(this.value=t.DateTime.fromDateTime(s,this.value));break;default:o=!1}else switch(e.keyCode){case t.Key.Left:n=-1;break;case t.Key.Right:n=1;break;case t.Key.Up:n=-4;break;case t.Key.Down:n=4;break;case t.Key.PageDown:n=e.altKey?120:12;break;case t.Key.PageUp:n=e.altKey?-120:-12;break;case t.Key.Home:n=this.value?-this.value.getMonth():0;break;case t.Key.End:n=this.value?11-this.value.getMonth():0;break;case t.Key.Enter:this._monthMode()?o=!1:this.monthView=!0;break;default:o=!1}if(this.value&&this._canChangeValue()&&(i||n)){var s=this.value;if(s=t.DateTime.addDays(s,i),s=t.DateTime.addMonths(s,n),n&&!this._valid(s))for(var r=s.getMonth(),a=1;a<31&&!this._valid(s);a++){var l=t.DateTime.addDays(s,+a),h=t.DateTime.addDays(s,-a);this._valid(l)&&l.getMonth()==r?s=l:this._valid(h)&&h.getMonth()==r&&(s=h)}for(a=0;a<31&&!this._valid(s);a++)s=t.DateTime.addDays(s,i>0||n>0?1:-1);this.value=s}o&&e.preventDefault()}}},o.prototype._getMonth=function(e){return e||(e=t.DateTime.newDate()),t.DateTime.newDate(e.getFullYear(),e.getMonth(),1)},o.prototype._monthMode=function(){return this.selectionMode==i.Month},o.prototype._navigate=function(e){var i=this.monthView,n=this.displayMonth;switch(e){case 0:var o=t.DateTime.newDate();this._canChangeValue()&&(this.value=i?t.DateTime.fromDateTime(o,this.value):this._getMonth(o)),n=this._getMonth(o);break;case 1:n=t.DateTime.addMonths(n,i?1:12);break;case-1:n=t.DateTime.addMonths(n,i?-1:-12)}this.displayMonth=n},o.controlTemplate='<div class="wj-content wj-calendar-outer"><div wj-part="tbl-header" class="wj-calendar-header"><div wj-part="btn-month" class="wj-month-select"><span wj-part="span-month"></span> <span class="wj-glyph-down"></span></div><div class="wj-btn-group"><button type="button" tabindex="-1" wj-part="btn-prev" class="wj-btn wj-btn-default"><span class="wj-glyph-left"></span></button><button type="button" tabindex="-1" wj-part="btn-today" class="wj-btn wj-btn-default"><span class="wj-glyph-circle"></span></button><button type="button" tabindex="-1" wj-part="btn-next" class="wj-btn wj-btn-default"><span class="wj-glyph-right"></span></button></div></div><table wj-part="tbl-month" class="wj-calendar-month"></table><table wj-part="tbl-year" class="wj-calendar-year" style="display:none"></table></div>',o}(t.Control);e.Calendar=n}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(e){function i(n,o){var s=e.call(this,n)||this;s._hsb=[.5,1,1],s._alpha=1,s.valueChanged=new t.Event;var r=s.getTemplate();s.applyTemplate("wj-control wj-content wj-colorpicker",r,{_eSB:"div-sb",_eHue:"div-hue",_eAlpha:"div-alpha",_ePreview:"div-pv",_ePal:"div-pal",_eText:"div-text"}),s._palette="#FFF,#000, #F00,#FFC000,#FFFF00,#92D050,#00B050,#00B0F0,#0070C0,#7030A0".split(","),s._updatePalette(),s._eHue.style.backgroundImage="url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAD4CAIAAACi6hsPAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuM4zml1AAAAGvSURBVDhPXdBPaM9xHMfxz4pWaxcmtoOhpdXSVpiyHWxqmVpDjaU5rK34XfypjTJ/p+ZPay6jhsOsRrKwaJElf9IQq03WIkv4FeMwMq221tfje1ByeFzfvd7PEKWGEKWTQRZLySWfVRRTQjmVbKWGOhLsZT+HaeY0bbTTQSfdXOcWffTzmAFeMcwoYyT5ygS/mA5hNgphip98J8kHRnnNSwZ4yH1uc4OrdHGR87RximYO0cgedlLLdqqoYAPrWMtKVrCcJSxiPmnMJUQp/Bsyk2xyyKOAQooopYwKtlDNDur5G7SBJo7RQiv/B+2hl3s84CkvGGKEOOYnxolj/mYmhBmDJ5ngCx95xxsGecYj4pB3iENeoZMO2mmlhaMcpIE4ZII6aqhmM3HMMkooopB88sghm0wySCeVlCjMCVFIYx4LWUwOeRSwhmLWU84mqqihll3sppEmjnOSs5zjEl1c4yZ99POE5wwxwns+840fTDFLFKaZZIJxkozxlmEGGSC+GF++Sy89dHOZC8Rr4lVnOMERDrCPBPXEX22jko2UEn+/mnxyWUYWC0gnNUQh/AEc0HJs6cex0gAAAABJRU5ErkJggg==)",s._eHue.style.backgroundSize="contain",navigator.appVersion.indexOf("MSIE 9")>-1&&(s._eSB.children[0].style.filter="progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffffff,endColorstr=#00ffffff,GradientType=1)",s._eSB.children[1].style.filter="progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000,endColorstr=#ff000000,GradientType=0)"),r=i._tplCursor,s._cSB=t.createElement(r),s._cHue=t.createElement(r),s._cHue.style.width="100%",s._cAlpha=t.createElement(r),s._cAlpha.style.height="100%",s._eSB.appendChild(s._cSB),s._eHue.appendChild(s._cHue),s._eAlpha.appendChild(s._cAlpha),s.addEventListener(s.hostElement,"mousedown",function(t){document.addEventListener("mousemove",a),document.addEventListener("mouseup",l),s._mouseDown(t)});var a=function(t){s._mouseMove(t)},l=function(t){document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",l),s._mouseUp(t)};return s.addEventListener(s.hostElement,"click",function(e){var i=e.target;if(i&&"DIV"==i.tagName&&t.contains(s._ePal,i)){var n=i.style.backgroundColor;n&&(s.value=new t.Color(n).toString())}}),s.value="#ffffff",s.initialize(o),s._updatePanels(),s}return __extends(i,e),Object.defineProperty(i.prototype,"showAlphaChannel",{get:function(){return"none"!=this._eAlpha.parentElement.style.display},set:function(e){this._eAlpha.parentElement.style.display=t.asBoolean(e)?"":"none"},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showColorString",{get:function(){return"none"!=this._eText.style.display},set:function(e){this._eText.style.display=t.asBoolean(e)?"":"none"},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){return this._value},set:function(e){if(e!=this.value){this._value=t.asString(e),this._eText.innerText=this._value;var i=new t.Color(this._value),n=i.getHsb();this._hsb[0]==n[0]&&this._hsb[1]==n[1]&&this._hsb[2]==n[2]&&this._alpha==i.a||(0==n[2]?(n[0]=this._hsb[0],n[1]=this._hsb[1]):0==n[1]&&(n[0]=this._hsb[0]),this._hsb=n,this._alpha=i.a,this.onValueChanged())}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"palette",{get:function(){return this._palette},set:function(e){e=t.asArray(e);for(var i=0;i<e.length&&i<this._palette.length;i++){var n=t.asString(e[i]);this._palette[i]=n}this._updatePalette()},enumerable:!0,configurable:!0}),i.prototype.onValueChanged=function(t){this._updatePanels(),this.valueChanged.raise(this,t)},i.prototype._mouseDown=function(t){this._htDown=this._getTargetPanel(t),this._htDown&&(t.preventDefault(),this.focus(),this._mouseMove(t))},i.prototype._mouseMove=function(e){if(this._htDown){var i=this._htDown.getBoundingClientRect();this._htDown==this._eHue?(this._hsb[0]=t.clamp((e.clientY-i.top)/i.height,0,.99),this._updateColor()):this._htDown==this._eSB?(this._hsb[1]=t.clamp((e.clientX-i.left)/i.width,0,1),this._hsb[2]=t.clamp(1-(e.clientY-i.top)/i.height,0,1),this._updateColor()):this._htDown==this._eAlpha&&(this._alpha=t.clamp((e.clientX-i.left)/i.width,0,1),this._updateColor())}},i.prototype._mouseUp=function(t){this._htDown=null},i.prototype._updateColor=function(){var e=t.Color.fromHsb(this._hsb[0],this._hsb[1],this._hsb[2],this._alpha);this.value=e.toString(),this._updatePanels()},i.prototype._updatePalette=function(){var e=new t.Color("#fff"),i=new t.Color("#000");this._ePal.innerHTML="";for(var n=0;n<this._palette.length;n++){var o=t.createElement('<div style="float:left;width:10%;box-sizing:border-box;padding:1px">'),s=new t.Color(this._palette[n]),r=s.getHsb();o.appendChild(this._makePalEntry(s,4));for(var a=0;a<5;a++){if(0==r[1]){var l=.1*a+(r[2]>.5?.05:.55);s=t.Color.interpolate(e,i,l)}else s=t.Color.fromHsb(r[0],.1+.2*a,1-.1*a);o.appendChild(this._makePalEntry(s,0))}this._ePal.appendChild(o)}},i.prototype._makePalEntry=function(e,i){var n=document.createElement("div");return t.setCss(n,{cursor:"pointer",backgroundColor:e.toString(),marginBottom:i||""}),n.innerHTML="&nbsp",n},i.prototype._updatePanels=function(){var e=t.Color.fromHsb(this._hsb[0],1,1,1),i=t.Color.fromHsb(this._hsb[0],this._hsb[1],this._hsb[2],1);this._eSB.style.backgroundColor=e.toString(),this._eAlpha.style.background="linear-gradient(to right, transparent 0%, "+i.toString()+" 100%)",navigator.appVersion.indexOf("MSIE 9")>-1&&(this._eAlpha.style.filter="progid:DXImageTransform.Microsoft.gradient(startColorstr=#00000000,endColorstr="+i.toString()+", GradientType = 1)"),this._ePreview.style.backgroundColor=this.value,this._cHue.style.top=(100*this._hsb[0]).toFixed(0)+"%",this._cSB.style.left=(100*this._hsb[1]).toFixed(0)+"%",this._cSB.style.top=(100-100*this._hsb[2]).toFixed(0)+"%",this._cAlpha.style.left=(100*this._alpha).toFixed(0)+"%"},i.prototype._getTargetPanel=function(e){var i=e.target;return t.contains(this._eSB,i)?this._eSB:t.contains(this._eHue,i)?this._eHue:t.contains(this._eAlpha,i)?this._eAlpha:null},i.controlTemplate='<div style="position:relative;width:100%;height:100%"><div style="float:left;width:50%;height:100%;box-sizing:border-box;padding:2px"><div wj-part="div-pal"><div style="float:left;width:10%;box-sizing:border-box;padding:2px"><div style="background-color:black;width:100%">&nbsp;</div><div style="height:6px"></div></div></div><div wj-part="div-text" style="position:absolute;bottom:0px;display:none"></div></div><div style="float:left;width:50%;height:100%;box-sizing:border-box;padding:2px"><div wj-part="div-sb" class="wj-colorbox" style="float:left;width:89%;height:89%"><div style="position:absolute;width:100%;height:100%;background:linear-gradient(to right, white 0%,transparent 100%)"></div><div style="position:absolute;width:100%;height:100%;background:linear-gradient(to top, black 0%,transparent 100%)"></div></div><div style="float:left;width:1%;height:89%"></div><div style="float:left;width:10%;height:89%"><div wj-part="div-hue" class="wj-colorbox"></div></div><div style="float:left;width:89%;height:1%"></div><div style="float:left;width:89%;height:10%"><div style="width:100%;height:100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuM4zml1AAAAAcSURBVBhXY/iPBBYgAWpKQGkwgMqDAdUk/v8HAM7Mm6GatDUYAAAAAElFTkSuQmCC)"><div wj-part="div-alpha" class="wj-colorbox"></div></div></div><div style="float:left;width:1%;height:10%"></div><div style="float:left;width:10%;height:10%"><div wj-part="div-pv" class="wj-colorbox" style="position:static"></div></div></div></div>',i._tplCursor='<div style="position:absolute;left:50%;top:50%;width:7px;height:7px;transform:translate(-50%,-50%);border:2px solid #f0f0f0;border-radius:50px;box-shadow:0px 0px 4px 2px #0f0f0f"></div>',i}(t.Control);e.ColorPicker=i}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(e){function i(i,n){var o=e.call(this,i)||this;o._pathDisplay=new t.Binding(null),o._pathValue=new t.Binding(null),o._pathChecked=new t.Binding(null),o._html=!1,o._checkedItems=[],o._itemRole="option",o._search="",o.selectedIndexChanged=new t.Event,o.itemsChanged=new t.Event,o.loadingItems=new t.Event,o.loadedItems=new t.Event,o.itemChecked=new t.Event,o.checkedItemsChanged=new t.Event,o.formatItem=new t.Event,o.applyTemplate("wj-control wj-content wj-listbox",null,null);var s=o.hostElement;return t.setAttribute(s,"role","listbox",!0),"SELECT"==o._orgTag&&o._initFromSelect(o.hostElement),o.addEventListener(s,"click",o._click.bind(o)),o.addEventListener(s,"keydown",o._keydown.bind(o)),o.addEventListener(s,"keypress",o._keypress.bind(o)),o.addEventListener(s,"wheel",function(t){s.scrollHeight>s.offsetHeight&&(t.deltaY<0&&0==s.scrollTop||t.deltaY>0&&s.scrollTop+s.offsetHeight>=s.scrollHeight)&&(t.preventDefault(),t.stopPropagation())}),o._tabIndex=s.tabIndex,o.initialize(n),o}return __extends(i,e),i.prototype.refresh=function(t){void 0===t&&(t=!0),e.prototype.refresh.call(this,t),!this.displayMemberPath&&this.checkedMemberPath||this._populateList()},Object.defineProperty(i.prototype,"itemsSource",{get:function(){return this._items},set:function(e){this._items!=e&&(this._cv&&(this._cv.currentChanged.removeHandler(this._cvCurrentChanged,this),this._cv.collectionChanged.removeHandler(this._cvCollectionChanged,this),this._cv=null),this._items=e,this._cv=t.asCollectionView(e),null!=this._cv&&(this._cv.currentChanged.addHandler(this._cvCurrentChanged,this),this._cv.collectionChanged.addHandler(this._cvCollectionChanged,this)),this._populateList(),this.onItemsChanged(),this.onSelectedIndexChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"collectionView",{get:function(){return this._cv},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isContentHtml",{get:function(){return this._html},set:function(e){e!=this._html&&(this._html=t.asBoolean(e),this._populateList())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemFormatter",{get:function(){return this._itemFormatter},set:function(e){e!=this._itemFormatter&&(this._itemFormatter=t.asFunction(e),this._populateList())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"displayMemberPath",{get:function(){return this._pathDisplay.path},set:function(e){e!=this.displayMemberPath&&(this._pathDisplay.path=t.asString(e),this._populateList())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedValuePath",{get:function(){return this._pathValue.path},set:function(e){this._pathValue.path=t.asString(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"checkedMemberPath",{get:function(){return this._pathChecked.path},set:function(e){e!=this.checkedMemberPath&&(this._pathChecked.path=t.asString(e),this._populateList())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemRole",{get:function(){return this._itemRole},set:function(e){e!=this.itemRole&&(this._itemRole=t.asString(e),this._populateList())},enumerable:!0,configurable:!0}),i.prototype.getDisplayValue=function(e){var i=null;e>-1&&t.hasItems(this._cv)&&(i=this._cv.items[e],this.displayMemberPath&&(i=this._pathDisplay.getValue(i)));var n=null!=i?i.toString():"";return this.itemFormatter&&(n=this.itemFormatter(e,n)),n},i.prototype.getDisplayText=function(t){var e=this.hostElement.children,i=t>-1&&t<e.length?e[t]:null;return null!=i?i.textContent:""},i.prototype.isItemEnabled=function(e){if(!this.getDisplayText(e))return!1;var i=this.hostElement.children[e];return!(!i||i.hasAttribute("disabled")||t.hasClass(i,"wj-state-disabled"))},Object.defineProperty(i.prototype,"selectedIndex",{get:function(){return this._cv?this._cv.currentPosition:-1},set:function(e){this._cv&&this._cv.moveCurrentToPosition(t.asNumber(e))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedItem",{get:function(){return this._cv?this._cv.currentItem:null},set:function(t){this._cv&&this._cv.moveCurrentTo(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedValue",{get:function(){var t=this.selectedItem;return t&&this.selectedValuePath&&(t=this._pathValue.getValue(t)),t},set:function(e){var i=this.selectedValuePath,n=-1;if(this._cv){for(var o=0;o<this._cv.items.length;o++){var s=this._cv.items[o],r=i?this._pathValue.getValue(s):s;if(r===e||t.DateTime.equals(r,e)){n=o;break}}this.selectedIndex=n}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxHeight",{get:function(){var t=this.hostElement;return t?parseFloat(t.style.maxHeight):null},set:function(e){var i=this.hostElement;i&&(i.style.maxHeight=t.asNumber(e)+"px")},enumerable:!0,configurable:!0}),i.prototype.showSelection=function(){for(var e,i=this.selectedIndex,n=this.hostElement,o=n.children,s=0;s<o.length;s++)e=o[s],t.toggleClass(e,"wj-state-selected",s==i),t.setAttribute(e,"tabindex",s==i?this._tabIndex:-1);if(i>-1&&i<o.length){var r=(e=o[i]).getBoundingClientRect(),a=n.getBoundingClientRect();r.bottom>a.bottom?n.scrollTop+=r.bottom-a.bottom:r.top<a.top&&(n.scrollTop-=a.top-r.top)}i>-1&&this.containsFocus()&&(e=o[i])instanceof HTMLElement&&!t.contains(e,t.getActiveElement())&&e.focus(),t.setAttribute(n,"tabindex",i<0?this._tabIndex:-1)},i.prototype.getItemChecked=function(e){var i=this._cv.items[e];if(t.isObject(i)&&this.checkedMemberPath)return this._pathChecked.getValue(i);var n=this._getCheckbox(e);return!!n&&n.checked},i.prototype.setItemChecked=function(t,e){this._setItemChecked(t,e,!0)},i.prototype.toggleItemChecked=function(t){this.setItemChecked(t,!this.getItemChecked(t))},Object.defineProperty(i.prototype,"checkedItems",{get:function(){if(this._checkedItems.splice(0,this._checkedItems.length),this._cv)for(var t=0;t<this._cv.items.length;t++)this.getItemChecked(t)&&this._checkedItems.push(this._cv.items[t]);return this._checkedItems},set:function(e){var i=this._cv,n=this.hostElement,o=t.asArray(e,!1);if(i&&o){for(var s=i.currentPosition,r=n.scrollTop,a=0;a<i.items.length;a++){var l=i.items[a];this._setItemChecked(a,o.indexOf(l)>-1,!1)}i.moveCurrentToPosition(s),n.scrollTop=r,this.onCheckedItemsChanged()}},enumerable:!0,configurable:!0}),i.prototype.onSelectedIndexChanged=function(t){this.selectedIndexChanged.raise(this,t)},i.prototype.onItemsChanged=function(t){this.itemsChanged.raise(this,t)},i.prototype.onLoadingItems=function(t){this.loadingItems.raise(this,t)},i.prototype.onLoadedItems=function(t){this.loadedItems.raise(this,t)},i.prototype.onItemChecked=function(t){this.itemChecked.raise(this,t)},i.prototype.onCheckedItemsChanged=function(t){this.checkedItemsChanged.raise(this,t)},i.prototype.onFormatItem=function(t){this.formatItem.raise(this,t)},i.prototype._setItemChecked=function(e,i,n){void 0===n&&(n=!0);var o=this._cv.items[e];if(t.isObject(o)){var s=t.tryCast(this._cv,"IEditableCollectionView");this._pathChecked.getValue(o)!=i&&(this._checking=!0,s?(s.editItem(o),this._pathChecked.setValue(o,i),s.commitEdit()):(this._pathChecked.setValue(o,i),this._cv.refresh()),this._checking=!1)}var r=this._getCheckbox(e);if(r){r.checked=i;var a=t.closest(r,".wj-listbox-item");a&&t.toggleClass(a,"wj-state-checked",i)}n&&(this.onItemChecked(),this.onCheckedItemsChanged())},i.prototype._cvCollectionChanged=function(t,e){this._checking||(this._populateList(),this.onItemsChanged())},i.prototype._cvCurrentChanged=function(t,e){this._checking||(this.showSelection(),this.onSelectedIndexChanged())},i.prototype._populateList=function(){var e=this.hostElement;if(e){var i=this.containsFocus();if(this.onLoadingItems(),e.innerHTML="",this._cv){for(var o=document.createDocumentFragment(),s=0;s<this._cv.items.length;s++){var r=this.getDisplayValue(s);1!=this._html&&(r=t.escapeHtml(r));var a=!1;this.checkedMemberPath&&(r='<label><input tabindex="-1" type="checkbox"'+((a=this._pathChecked.getValue(this._cv.items[s]))?" checked":"")+"> "+r+"</label>");var l=document.createElement("div"),h="wj-listbox-item";if(l.innerHTML=r,t.hasClass(l.firstChild,"wj-separator")&&(h+=" wj-separator"),a&&(h+=" wj-state-checked"),l.className=h,t.setAttribute(l,"role",this.itemRole?this.itemRole:null),this.formatItem.hasHandlers){var c=new n(s,this._cv.items[s],l);this.onFormatItem(c)}o.appendChild(l)}e.appendChild(o)}0==e.children.length&&e.appendChild(document.createElement("div")),i&&!this.containsFocus()&&this.focus(),this.showSelection(),this.onLoadedItems()}},i.prototype._click=function(e){if(!e.defaultPrevented){for(var i=this.hostElement.children,n=0;n<i.length;n++)if(t.contains(i[n],e.target)){this.selectedIndex=n;break}var o=this.selectedIndex;if(this.checkedMemberPath&&o>-1){var s=this._getCheckbox(o);s==e.target&&(i[o].focus(),this.setItemChecked(o,s.checked))}}},i.prototype._keydown=function(e){var i=this.selectedIndex;this.hostElement.children;if(!e.defaultPrevented){if(65==e.keyCode&&(e.ctrlKey||e.metaKey)&&this.checkedMemberPath&&t.hasItems(this.collectionView))return this.checkedItems=this.getItemChecked(0)?[]:this.collectionView.items,void e.preventDefault();if(!(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey))switch(e.keyCode){case t.Key.Down:e.preventDefault(),this._selectNext();break;case t.Key.Up:e.preventDefault(),this._selectPrev();break;case t.Key.Home:e.preventDefault(),this._selectFirst();break;case t.Key.End:e.preventDefault(),this._selectLast();break;case t.Key.PageDown:e.preventDefault(),this._selectNextPage();break;case t.Key.PageUp:e.preventDefault(),this._selectPrevPage();break;case t.Key.Space:if(this.checkedMemberPath&&i>-1){var n=this._getCheckbox(i);n&&this.isItemEnabled(i)&&(this.setItemChecked(i,!n.checked),e.preventDefault())}}}},i.prototype._keypress=function(t){var e=this;if(!t.defaultPrevented&&!(t.target instanceof HTMLInputElement)&&(t.charCode>32||32==t.charCode&&this._search)){t.preventDefault(),this._search+=String.fromCharCode(t.charCode).toLowerCase(),this._toSearch&&clearTimeout(this._toSearch),this._toSearch=setTimeout(function(){e._toSearch=null,e._search=""},i._AUTOSEARCH_DELAY);var n=this._findNext();n<0&&this._search.length>1&&(this._search=this._search[this._search.length-1],n=this._findNext()),n>-1&&(this.selectedIndex=n)}},i.prototype._selectNext=function(){for(var t=this.hostElement.children.length,e=this.selectedIndex+1;e<t;e++)if(this.isItemEnabled(e))return this.selectedIndex=e,!0;return!1},i.prototype._selectPrev=function(){for(var t=this.selectedIndex-1;t>=0;t--)if(this.isItemEnabled(t))return this.selectedIndex=t,!0;return!1},i.prototype._selectFirst=function(){for(var t=this.hostElement.children.length,e=0;e<t;e++)if(this.isItemEnabled(e))return this.selectedIndex=e,!0;return!1},i.prototype._selectLast=function(){for(var t=this.hostElement.children.length-1;t>=0;t--)if(this.isItemEnabled(t))return this.selectedIndex=t,!0;return!1},i.prototype._selectNextPage=function(){for(var t=this.hostElement,e=t.offsetHeight,i=t.children,n=0,o=this.selectedIndex+1;o<this._cv.items.length;o++){var s=i[o].scrollHeight;if(n+s>e&&this.isItemEnabled(o))return this.selectedIndex=o,!0;n+=s}return this._selectLast()},i.prototype._selectPrevPage=function(){for(var t=this.hostElement,e=t.offsetHeight,i=t.children,n=0,o=this.selectedIndex-1;o>0;o--){var s=i[o].scrollHeight;if(n+s>e&&this.isItemEnabled(o))return this.selectedIndex=o,!0;n+=s}return this._selectFirst()},i.prototype._findNext=function(){if(this.hostElement){var t=this.hostElement.childElementCount,e=this.selectedIndex;(e<0||1==this._search.length)&&e++;for(var i=0;i<t;i++){var n=(e+i)%t;if(0==this.getDisplayText(n).trim().toLowerCase().indexOf(this._search)&&this.isItemEnabled(n))return n}}return-1},i.prototype._getCheckbox=function(t){var e=this.hostElement;return e&&t>-1&&t<e.children.length?e.children[t].querySelector("input[type=checkbox]"):null},i.prototype._initFromSelect=function(t){for(var e=t.children,i=[],n=-1,o=0;o<e.length;o++){var s=e[o];"OPTION"==s.tagName&&(s.hasAttribute("selected")&&(n=i.length),s.innerHTML?i.push({hdr:s.innerHTML,val:s.getAttribute("value"),cmdParam:s.getAttribute("cmd-param")}):i.push({hdr:'<div class="wj-separator"/>'}),t.removeChild(s),o--)}i&&(this.displayMemberPath="hdr",this.selectedValuePath="val",this.itemsSource=i,this.selectedIndex=n)},i._AUTOSEARCH_DELAY=600,i}(t.Control);e.ListBox=i;var n=function(e){function i(i,n,o){var s=e.call(this)||this;return s._index=t.asNumber(i),s._data=n,s._item=t.asType(o,HTMLElement),s}return __extends(i,e),Object.defineProperty(i.prototype,"index",{get:function(){return this._index},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"data",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),i}(t.EventArgs);e.FormatItemEventArgs=n}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(i){function n(e,n){var o=i.call(this,e)||this;o._editable=!1,o._delKey=0,o._composing=!1,o._pathHdr=new t.Binding(null),o._bsCollapse=!0,o.itemsSourceChanged=new t.Event,o.selectedIndexChanged=new t.Event;var s=o.hostElement;t.addClass(s,"wj-combobox");var r=o._tbx,a=t.getUniqueId(s.id+"_dropdown");return o.dropDown.id=a,t.setAttribute(r,"role","combobox"),t.setAttribute(r,"aria-autocomplete","both"),t.setAttribute(r,"aria-owns",a),t.setAttribute(o._btn,"aria-controls",a),t.setAttribute(o.dropDown,"aria-expanded",!1),o.autoExpandSelection=!1,o.addEventListener(o._tbx,"compositionstart",function(){o._composing=!0}),o.addEventListener(o._tbx,"compositionend",function(){o._composing=!1,setTimeout(function(){o._setText(o.text,!0)})}),o.addEventListener(s,"wheel",function(e){if(!e.defaultPrevented&&!o.isDroppedDown&&!o.isReadOnly&&o.containsFocus()&&o.selectedIndex>-1){var i=t.clamp(-e.deltaY,-1,1);o.selectedIndex=t.clamp(o.selectedIndex-i,0,o.collectionView.items.length-1),e.preventDefault()}}),"SELECT"==o._orgTag&&o._lbx._initFromSelect(s),o._lbx.loadedItems.addHandler(function(){o.selectedIndex>-1&&(o.selectedIndex=o._lbx.selectedIndex)}),o.isRequired=!0,o.initialize(n),o}return __extends(n,i),Object.defineProperty(n.prototype,"itemsSource",{get:function(){return this._lbx.itemsSource},set:function(t){this._lbx.itemsSource!=t&&(this._lbx.itemsSource=t,this.onItemsSourceChanged()),this._updateBtn()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"collectionView",{get:function(){return this._lbx.collectionView},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"displayMemberPath",{get:function(){return this._lbx.displayMemberPath},set:function(t){this._lbx.displayMemberPath=t;var e=this.getDisplayText();this.text!=e&&this._setText(e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"headerPath",{get:function(){return this._pathHdr.path},set:function(e){this._pathHdr.path=t.asString(e);var i=this.getDisplayText();this.text!=i&&this._setText(i,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectedValuePath",{get:function(){return this._lbx.selectedValuePath},set:function(t){this._lbx.selectedValuePath=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isContentHtml",{get:function(){return this._lbx.isContentHtml},set:function(e){if(e!=this.isContentHtml){this._lbx.isContentHtml=t.asBoolean(e);var i=this.getDisplayText();this.text!=i&&this._setText(i,!0)}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"itemFormatter",{get:function(){return this._lbx.itemFormatter},set:function(e){this._lbx.itemFormatter=t.asFunction(e),this.selectedIndex=this._lbx.selectedIndex},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"formatItem",{get:function(){return this.listBox.formatItem},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectedIndex",{get:function(){return this._lbx.selectedIndex},set:function(t){t!=this.selectedIndex&&(this._lbx.selectedIndex=t),t=this.selectedIndex;var e=this.getDisplayText(t);this.text!=e&&this._setText(e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectedItem",{get:function(){return this._lbx.selectedItem},set:function(t){this._lbx.selectedItem=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectedValue",{get:function(){return this._lbx.selectedValue},set:function(t){this._lbx.selectedValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isEditable",{get:function(){return this._editable},set:function(e){this._editable=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxDropDownHeight",{get:function(){return this._lbx.maxHeight},set:function(e){this._lbx.maxHeight=t.asNumber(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxDropDownWidth",{get:function(){var t=this._dropDown;return parseInt(t.style.maxWidth)},set:function(e){this._dropDown.style.maxWidth=t.asNumber(e)+"px"},enumerable:!0,configurable:!0}),n.prototype.getDisplayText=function(e){if(void 0===e&&(e=this.selectedIndex),this.headerPath&&e>-1&&t.hasItems(this.collectionView)){var i=this.collectionView.items[e],n=i?this._pathHdr.getValue(i):null;return n=null!=n?n.toString():"",this.isContentHtml&&(this._cvt||(this._cvt=document.createElement("div")),this._cvt.innerHTML=n,n=this._cvt.textContent),n.trim()}return this._lbx.getDisplayText(e).trim()},n.prototype.indexOf=function(e,i){var n=this.collectionView;if(t.hasItems(n)&&null!=e){var o=this.selectedIndex;if(i&&e==this.getDisplayText(o))return o;e=e.toString().toLowerCase();for(var s=0;s<n.items.length;s++)if(this.listBox.isItemEnabled(s)){var r=this.getDisplayText(s).toLowerCase();if(i){if(r==e)return s}else if(e&&0==r.indexOf(e))return s}}return-1},Object.defineProperty(n.prototype,"listBox",{get:function(){return this._lbx},enumerable:!0,configurable:!0}),n.prototype.onItemsSourceChanged=function(t){this.itemsSourceChanged.raise(this,t)},n.prototype.onSelectedIndexChanged=function(t){this._updateBtn(),this.selectedIndexChanged.raise(this,t)},n.prototype.refresh=function(e){void 0===e&&(e=!0),i.prototype.refresh.call(this,e),t.hasItems(this.collectionView)&&(this._lbx.refresh(),this.selectedIndex>-1&&(this.selectedIndex=this._lbx.selectedIndex))},n.prototype.onLostFocus=function(e){this._composing&&(this._composing=!1,this._setText(this.text,!0)),this.isEditable&&this.isRequired&&!this.text&&t.hasItems(this.collectionView)&&(this.selectedIndex=0),i.prototype.onLostFocus.call(this,e)},n.prototype.onIsDroppedDownChanging=function(e){return this.isDroppedDown||t.hasItems(this.collectionView)?i.prototype.onIsDroppedDownChanging.call(this,e):(e.cancel=!0,!1)},n.prototype.onIsDroppedDownChanged=function(e){i.prototype.onIsDroppedDownChanged.call(this,e),this.isDroppedDown&&(this._lbx.showSelection(),this.isTouching||this.selectAll()),t.setAttribute(this.dropDown,"aria-expanded",this.isDroppedDown)},n.prototype._updateBtn=function(){var e=this.collectionView;this._btn.style.display=this._showBtn&&null!=e?"":"none",t.enable(this._btn,t.hasItems(e))},n.prototype._btnclick=function(t){i.prototype._btnclick.call(this,t),this.isTouching||this._elRef!=this._tbx||this.selectAll()},n.prototype._createDropDown=function(){var i=this;this._lbx||(this._lbx=new e.ListBox(this._dropDown)),this._lbx.maxHeight=200,this._lbx.selectedIndexChanged.addHandler(function(){i._updateBtn();var e=i._lbx.selectedIndex,n=i._lbx.hostElement.children,o=e>-1&&e<n.length?n[e].id:null;t.setAttribute(i._tbx,"aria-activedescendant",o&&o.length?o:null),i.selectedIndex=e,i.onSelectedIndexChanged()}),this._lbx.itemsChanged.addHandler(function(){i._updateBtn()}),this.addEventListener(this._dropDown,"click",this._dropDownClick.bind(this))},n.prototype._dropDownClick=function(t){t.defaultPrevented||t.target!=this._dropDown&&(this.isDroppedDown=!1)},n.prototype._setText=function(e,n){if(!this._composing&&!this._settingText){this._settingText=!0,null==e&&(e=""),e=e.toString();var o=this.selectedIndex,s=this.collectionView,r=this._getSelStart(),a=-1,l=!0;if(this._delKey&&this.isEditable&&(n=!0,l=!1),o=this.indexOf(e,n),l&&(o<0&&n&&(o=this.indexOf(e,!1)),o<0&&r>0&&(o=this.indexOf(e.substr(0,r),!1))),o<0&&!this.isEditable&&t.hasItems(s)&&(this.isRequired||e)){var h=this._oldText||"";o=Math.max(0,this.indexOf(h,!1));for(var c=0;c<e.length&&c<h.length;c++)if(e[c]!=h[c]){r=c;break}}o>-1&&(a=r,e=this.getDisplayText(o)),e!=this._tbx.value&&(this._tbx.value=e),a>-1&&this.containsFocus()&&!this.isTouching&&this._updateInputSelection(a),s&&s.moveCurrentToPosition(o),i.prototype._setText.call(this,e,n),this._delKey=0,this._settingText=!1}},n.prototype._findNext=function(t,e){if(this.collectionView){t=t.toLowerCase();for(var i=this.collectionView.items.length,n=void 0,o=void 0,s=1;s<=i;s++)if(n=(this.selectedIndex+s*e+i)%i,(o=this.getDisplayText(n).toLowerCase())&&0==o.indexOf(t)&&(!this.dropDown.children[n]||this.listBox.isItemEnabled(n)))return n}return this.selectedIndex},n.prototype._keydown=function(e){if(i.prototype._keydown.call(this,e),!e.defaultPrevented&&!this.isReadOnly&&!e.altKey&&t.hasItems(this.collectionView)&&this._elRef==this._tbx){this._delKey=0;var n=this._getSelStart();switch(e.keyCode){case t.Key.Back:if(this._bsCollapse&&!this.isEditable){var o=this._getSelEnd();n>0&&o==this._tbx.value.length&&t.hasItems(this.collectionView)&&this._setSelRange(n-1,o)}this._delKey=e.keyCode;break;case t.Key.Delete:this._delKey=e.keyCode;break;case t.Key.Up:case t.Key.Down:n==this.text.length&&(n=0),this.selectedIndex=this._findNext(this.text.substr(0,n),e.keyCode==t.Key.Up?-1:1),this._setSelRange(n,this.text.length),e.preventDefault()}}},n.prototype._updateInputSelection=function(t){this._elRef==this._tbx&&this._setSelRange(t,this._tbx.value.length)},n.prototype._getSelStart=function(){return this._tbx&&this._tbx.value?this._tbx.selectionStart:0},n.prototype._getSelEnd=function(){return this._tbx&&this._tbx.value?this._tbx.selectionEnd:0},n.prototype._setSelRange=function(e,i){var n=this._tbx;this._elRef==n&&t.setSelectionRange(n,e,i)},n}(e.DropDown);e.ComboBox=i}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(e){function i(i,n){var o=e.call(this,i)||this;return o._cssMatch="wj-autocomplete-match",o._minLength=2,o._maxItems=6,o._itemCount=0,o._delay=500,o._query="",o._inCallback=!1,o._srchProps=[],t.addClass(o.hostElement,"wj-autocomplete"),o._bsCollapse=!1,o.isEditable=!0,o.isRequired=!1,o.isContentHtml=!0,o.listBox.formatItem.addHandler(o._formatListItem,o),o._itemsSourceFnCallBackBnd=o._itemSourceFunctionCallback.bind(o),o.initialize(n),o}return __extends(i,e),Object.defineProperty(i.prototype,"minLength",{get:function(){return this._minLength},set:function(e){this._minLength=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxItems",{get:function(){return this._maxItems},set:function(e){this._maxItems=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"delay",{get:function(){return this._delay},set:function(e){this._delay=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"searchMemberPath",{get:function(){return this._srchProp},set:function(e){this._srchProp=t.asString(e),this._srchProps=e?e.trim().split(/\s*,\s*/):[]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemsSourceFunction",{get:function(){return this._itemsSourceFn},set:function(e){this._itemsSourceFn=t.asFunction(e),t.isFunction(this._itemsSourceFn)&&this.itemsSourceFunction(this.text,this.maxItems,this._itemsSourceFnCallBackBnd)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cssMatch",{get:function(){return this._cssMatch},set:function(e){this._cssMatch=t.asString(e)},enumerable:!0,configurable:!0}),i.prototype._keydown=function(i){if(!i.defaultPrevented&&this.isDroppedDown)switch(i.keyCode){case t.Key.Up:case t.Key.Down:this.selectAll()}e.prototype._keydown.call(this,i)},i.prototype._setText=function(e){var i=this;if(!this._inCallback){if(!e&&this.selectedIndex>-1&&(this.selectedIndex=-1),e!=this._oldText&&(this._tbx.value!=e&&(this._tbx.value=e),this._oldText=e,this.onTextChanged(),!e&&this.collectionView))return this._rxHighlight=null,this.collectionView.filter=this._query=null,void(this.isDroppedDown=!1);this._toSearch&&clearTimeout(this._toSearch),e!=this.getDisplayText()&&(this._toSearch=setTimeout(function(){i._toSearch=null;var e=i.text.trim().toLowerCase();if(e.length>=i._minLength&&e!=i._query){i._query=e,e=e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var n=t.escapeHtml(e);i._rxMatch=new RegExp("(?=.*"+e.replace(/ /g,")(?=.*")+")","ig"),i._rxHighlight=i.isContentHtml?new RegExp("("+n.replace(/ /g,"|")+")(?![^<]*>|[^<>]* </)","ig"):new RegExp("("+n.replace(/ /g,"|")+")","ig"),i.itemsSourceFunction?i.itemsSourceFunction(e,i.maxItems,i._itemsSourceFnCallBackBnd):i._updateItems()}},this._delay))}},i.prototype._itemSourceFunctionCallback=function(e){this._inCallback=!0;var i=t.asCollectionView(e);i&&i.moveCurrentToPosition(-1),this.itemsSource=i,this._inCallback=!1,this.containsFocus()&&(this.isDroppedDown=!0,this.refresh())},i.prototype.onIsDroppedDownChanged=function(e){if(this.isDroppedDownChanged.raise(this,e),this.containsFocus()&&!this.isDroppedDown&&!this.isTouching&&null==this.selectedItem){var i=this.text.length;t.setSelectionRange(this._tbx,i)}this._query=""},i.prototype._updateItems=function(){var t=this.collectionView;if(t){this._inCallback=!0,t.beginUpdate(),this._itemCount=0,t.filter=this._filter.bind(this),t.moveCurrentToPosition(-1),t.endUpdate(),this._inCallback=!1;var e=t.items.length;this.isDroppedDown=e>0&&this.containsFocus(),0!=e||this.isEditable||(this.selectedIndex=-1),this.refresh()}},i.prototype._filter=function(t){if(this._itemCount>=this._maxItems)return!1;var e=this._getItemText(t,!1);if(this._srchProps)for(var i=0;i<this._srchProps.length;i++)e+="\0"+t[this._srchProps[i]];return this.isContentHtml&&(e=e.replace(/<[^>]*>/g,"")),!!e.match(this._rxMatch)&&(this._itemCount++,!0)},i.prototype._getItemText=function(t,e){var i=t?t.toString():"",n=e&&this.headerPath?this._pathHdr:this._lbx._pathDisplay;return n&&(i=null!=(i=n.getValue(t))?i.toString():""),i},i.prototype._formatListItem=function(t,e){if(this._cssMatch&&this._rxHighlight){var i='<span class="'+this._cssMatch+'">$1</span>';e.item.innerHTML=e.item.innerHTML.replace(this._rxHighlight,i)}},i}(e.ComboBox);e.AutoComplete=i}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(e){function i(i,n){var o=e.call(this,i)||this;o.itemClicked=new t.Event;var s=o.hostElement,r=o._tbx;t.addClass(s,"wj-menu"),r.style.display="none";o._hdr=o._elRef=t.createElement('<div wj-part="header" class="wj-form-control" style="cursor:default"/>'),r.parentElement.insertBefore(o._hdr,o._tbx);var a=o._orgOuter.match(/tabindex="?(-?\d+)"?/i);return a&&(s.tabIndex=parseInt(a[1])),o.isRequired=!1,t.setAttribute(s,"role","menubar",!0),t.setAttribute(r,"role",null),t.setAttribute(r,"aria-autocomplete",null),t.setAttribute(r,"aria-owns",null),t.setAttribute(o.dropDown,"role","menu"),o.listBox.itemRole="menuitem","SELECT"==o._orgTag&&(o.header=s.getAttribute("header"),o._lbx.itemsSource&&(o.commandParameterPath="cmdParam")),o.isContentHtml=!0,o.maxDropDownHeight=500,o.addEventListener(o._hdr,"click",function(t){t.defaultPrevented||(o._isButton?(o.isDroppedDown=!1,o._raiseCommand()):o.isDroppedDown=!o.isDroppedDown)}),o.listBox.lostFocus.addHandler(function(){o.containsFocus()||(o.isDroppedDown=!1)}),o.initialize(n),o}return __extends(i,e),Object.defineProperty(i.prototype,"header",{get:function(){return this._hdr.innerHTML},set:function(e){this._hdr.innerHTML=t.asString(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"command",{get:function(){return this._command},set:function(t){this._command=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"commandPath",{get:function(){return this._cmdPath},set:function(e){this._cmdPath=t.asString(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"commandParameterPath",{get:function(){return this._cmdParamPath},set:function(e){this._cmdParamPath=t.asString(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isButton",{get:function(){return this._isButton},set:function(e){this._isButton=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"owner",{get:function(){return this._owner},set:function(e){this._owner=t.asType(e,HTMLElement,!0),this._enableDisableItems()},enumerable:!0,configurable:!0}),i.prototype.show=function(e){if(!this.isDroppedDown){var i=this.dropDown;this.selectedIndex=-1,this.onIsDroppedDownChanging(new t.CancelEventArgs)&&(this.owner&&(i[t.Control._OWNR_KEY]=this.owner),t.showPopup(i,e),this.onIsDroppedDownChanged(),i.focus())}},i.prototype.hide=function(){this.isDroppedDown&&this.onIsDroppedDownChanging(new t.CancelEventArgs)&&(t.hidePopup(this.dropDown),this.onIsDroppedDownChanged())},i.prototype.onItemClicked=function(t){this.itemClicked.raise(this,t)},i.prototype.refresh=function(t){void 0===t&&(t=!0),e.prototype.refresh.call(this,t),this._enableDisableItems()},i.prototype.onIsDroppedDownChanged=function(t){e.prototype.onIsDroppedDownChanged.call(this,t),this.isDroppedDown?(this._closing=!0,this._defaultItem=this.selectedItem,this.isRequired=!1,this.selectedIndex=-1,this._enableDisableItems(),this._closing=!1,this.dropDown.focus()):this.selectedItem||(this.selectedItem=this._defaultItem)},i.prototype._keydown=function(i){i.defaultPrevented||i.keyCode==t.Key.Enter&&(this.isDroppedDown?this.getDisplayText(this.selectedIndex)&&this._raiseCommand():(this.isDroppedDown=!0,i.preventDefault())),e.prototype._keydown.call(this,i)},i.prototype._dropDownClick=function(t){t.defaultPrevented||t.target==this.dropDown||this.getDisplayText(this.selectedIndex)&&this._raiseCommand(),e.prototype._dropDownClick.call(this,t)},i.prototype._raiseCommand=function(t){var e=this.selectedItem,i=this._getCommand(e);if(i){var n=this._cmdParamPath?e[this._cmdParamPath]:null;if(!this._canExecuteCommand(i,n))return;this._executeCommand(i,n)}this.onItemClicked(t)},i.prototype._getCommand=function(t){var e=t&&this.commandPath?t[this.commandPath]:null;return e||this.command},i.prototype._executeCommand=function(e,i){e&&!t.isFunction(e)&&(e=e.executeCommand),t.isFunction(e)&&e(i)},i.prototype._canExecuteCommand=function(e,i){if(e){var n=e.canExecuteCommand;if(t.isFunction(n))return n(i)}return!0},i.prototype._enableDisableItems=function(){if(this.collectionView&&(this.command||this.commandPath))for(var e=this.collectionView.items,i=0;i<e.length;i++){var n=this._getCommand(e[i]),o=this.commandParameterPath?e[i][this.commandParameterPath]:null;if(n){var s=this._lbx.hostElement.children[i];t.toggleClass(s,"wj-state-disabled",!this._canExecuteCommand(n,o))}}},i}(e.ComboBox);e.Menu=i}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();wijmo.culture.MultiSelect=window.wijmo.culture.MultiSelect||{itemsSelected:"{count:n0} items selected",selectAll:"Select All"};var wijmo;!function(t){!function(e){"use strict";var i=function(e){function i(i,n){var o=e.call(this,i)||this;return o._maxHdrItems=2,o._readOnly=!1,o._hdrFmt=t.culture.MultiSelect.itemsSelected,o.checkedItemsChanged=new t.Event,t.addClass(o.hostElement,"wj-multiselect"),o._tbx.readOnly=!0,o.checkedMemberPath=null,o.addEventListener(o.inputElement,"click",function(){o.isDroppedDown=!o.isDroppedDown}),o.addEventListener(o._selectAll,"click",function(e){t.hasItems(o.collectionView)&&e.target==o._selectAllCheckbox&&(o.checkedItems=e.target.checked?o.collectionView.items:[])}),o.removeEventListener(o.dropDown,"click"),o._updateHeader(),o.listBox.itemsChanged.addHandler(function(){o._updateHeader()}),o.listBox.checkedItemsChanged.addHandler(function(){o._updateHeader(),o.onCheckedItemsChanged()}),o.initialize(n),o}return __extends(i,e),Object.defineProperty(i.prototype,"showSelectAllCheckbox",{get:function(){return""==this._selectAll.style.display},set:function(e){this._selectAll.style.display=t.asBoolean(e)?"":"none"},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectAllLabel",{get:function(){return this._selectAllLabel},set:function(e){e!=this._selectAllLabel&&(this._selectAllLabel=t.asString(e),this.refresh())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"checkedMemberPath",{get:function(){var t=this.listBox.checkedMemberPath;return t!=i._DEF_CHECKED_PATH?t:null},set:function(e){e=t.asString(e),this.listBox.checkedMemberPath=e||i._DEF_CHECKED_PATH},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxHeaderItems",{get:function(){return this._maxHdrItems},set:function(e){this._maxHdrItems!=e&&(this._maxHdrItems=t.asNumber(e),this._updateHeader())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"headerFormat",{get:function(){return this._hdrFmt},set:function(e){e!=this._hdrFmt&&(this._hdrFmt=t.asString(e),this._updateHeader())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"headerFormatter",{get:function(){return this._hdrFormatter},set:function(e){e!=this._hdrFormatter&&(this._hdrFormatter=t.asFunction(e),this._updateHeader())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"checkedItems",{get:function(){return this.listBox.checkedItems},set:function(e){this.listBox.checkedItems=t.asArray(e)},enumerable:!0,configurable:!0}),i.prototype.onCheckedItemsChanged=function(t){this.checkedItemsChanged.raise(this,t)},i.prototype._createDropDown=function(){this._selectAll=t.createElement('<div class="wj-listbox-item wj-header wj-select-all" tabindex="0" style="display:none"><label><input type="checkbox"> <span></span></label></div>',this._dropDown),this._selectAllCheckbox=this._selectAll.querySelector("input[type=checkbox]"),this._selectAllSpan=this._selectAll.querySelector("label>span"),t.setText(this._selectAllSpan,t.culture.MultiSelect.selectAll);var i=t.createElement('<div style="width:100%;border:none"></div>',this._dropDown);this._lbx=new t.input.ListBox(i),e.prototype._createDropDown.call(this)},Object.defineProperty(i.prototype,"isReadOnly",{get:function(){return this._readOnly},set:function(e){this._readOnly=t.asBoolean(e),t.toggleClass(this.hostElement,"wj-state-readonly",this.isReadOnly)},enumerable:!0,configurable:!0}),i.prototype.refresh=function(i){void 0===i&&(i=!0),e.prototype.refresh.call(this,i),this._updateHeader(),this._selectAllSpan&&t.setText(this._selectAllSpan,this._selectAllLabel||t.culture.MultiSelect.selectAll)},i.prototype.onIsDroppedDownChanged=function(t){var i=this;e.prototype.onIsDroppedDownChanged.call(this,t),this.isDroppedDown&&this.containsFocus()&&setTimeout(function(){i.listBox.focus()},200)},i.prototype._setText=function(t,e){},i.prototype._keydown=function(i){e.prototype._keydown.call(this,i),!i.defaultPrevented&&t.hasItems(this.collectionView)&&i.keyCode>32&&(this.isDroppedDown=!0)},i.prototype._updateHeader=function(){var e=this.checkedItems;if(t.isFunction(this._hdrFormatter))this.inputElement.value=this._hdrFormatter();else{var i="";if(e.length>0)if(e.length<=this._maxHdrItems){if(this.displayMemberPath){var n=new t.Binding(this.displayMemberPath);e=e.map(function(t){return n.getValue(t)})}i=e.join(", ")}else i=t.format(this.headerFormat,{count:e.length});this.inputElement.value=i}var o=null,s=this.collectionView;t.hasItems(s)&&(0==e.length?o=!1:e.length==s.items.length&&(o=!0)),this._selectAllCheckbox.indeterminate=null==o,null!=o&&(this._selectAllCheckbox.checked=o),this._updateState()},i._DEF_CHECKED_PATH="$checked",i}(e.ComboBox);e.MultiSelect=i}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(e){function i(i,n){var o=e.call(this,i)||this;return o._selItems=[],o._lastInputValue="",o._selPath=new t.Binding(null),o._notAddItm=!1,o.selectedItemsChanged=new t.Event,t.addClass(o.hostElement,"wj-multi-autocomplete"),o.showDropDownButton=!1,o.initialize(n),o._wjTpl=o.hostElement.querySelector(".wj-template"),o._wjInput=o.hostElement.querySelector(".wj-input"),o.addEventListener(o.hostElement,"keyup",o._keyup.bind(o),!0),o.addEventListener(window,"resize",o._adjustInputWidth.bind(o)),o.addEventListener(o._tbx,"focus",function(){o._itemOff()}),o._addHelperInput(),o._initSeltems(),o.listBox.itemsChanged.addHandler(function(){return o.selectedIndex=-1}),o._refreshHeader(),o}return __extends(i,e),Object.defineProperty(i.prototype,"showDropDownButton",{set:function(t){this._showBtn=!1},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxSelectedItems",{get:function(){return this._maxtems},set:function(e){this._maxtems!=e&&(this._maxtems=t.asNumber(e,!0),this._updateMaxItems(),this._refreshHeader(),this._clearSelIndex())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedMemberPath",{get:function(){return this._selPath.path},set:function(e){(e=t.asString(e))!==this.selectedMemberPath&&(this._selPath.path=e,this._initSeltems(),this._refreshHeader(),this.onSelectedItemsChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedItems",{get:function(){return this._selItems},set:function(e){if(this._selItems=t.asArray(e),this.selectedMemberPath&&""!==this.selectedMemberPath&&this._selItems)for(var i=0;i<this._selItems.length;i++){var n=this._selItems[i];this._setSelItem(n,!1)}this._updateMaxItems(),this.onSelectedItemsChanged(),this._refreshHeader(),this._clearSelIndex()},enumerable:!0,configurable:!0}),i.prototype.onSelectedItemsChanged=function(t){this.selectedItemsChanged.raise(this,t)},i.prototype.onIsDroppedDownChanged=function(t){!this.isDroppedDown&&this.selectedIndex>-1&&!this._notAddItm&&this._addItem(!0),this._notAddItm=!1,e.prototype.onIsDroppedDownChanged.call(this,t)},i.prototype.refresh=function(t){void 0===t&&(t=!0),e.prototype.refresh.call(this,t),this._initSeltems(),this.isDroppedDown||this._refreshHeader()},i.prototype._keydown=function(i){if(!this.isReadOnly){if(!i.defaultPrevented)switch(i.keyCode){case t.Key.Back:this._lastInputValue=this._tbx.value;break;case t.Key.Enter:this._itemOff(),this._addItem(!0),t.isIE&&t.setSelectionRange(this._tbx,0,0);break;case t.Key.Tab:this.isDroppedDown?(this._addItem(!1),this._tbx.value="",this._lbx.selectedIndex=-1,i.preventDefault()):this._updateFocus();break;case t.Key.Space:if(""!==this._tbx.value)return;this.isDroppedDown||this._tbx.disabled||(this.isDroppedDown=!0,this._clearSelIndex());break;case t.Key.Escape:this.isDroppedDown&&(this._notAddItm=!0);break;case t.Key.Left:this._itemOn(!this.rightToLeft);break;case t.Key.Right:this._itemOn(!!this.rightToLeft);break;case t.Key.Up:case t.Key.Down:var n=t.getActiveElement();if(i.altKey){if(this._tbx==n)return this.isDroppedDown=!this.isDroppedDown,this.isDroppedDown||this._tbx.focus(),void i.preventDefault()}else if(this._tbx!==n)return;default:if(i.keyCode===t.Key.Back||i.keyCode===t.Key.Delete)return;this._itemOff(),null!=this._maxtems&&this._selItems.length>=this._maxtems&&i.preventDefault()}this._tbx.disabled||e.prototype._keydown.call(this,i)}},i.prototype._updateState=function(){e.prototype._updateState.call(this),this._wjTpl&&(t.hasClass(this.hostElement,"wj-state-focused")||this._itemOff())},i.prototype._keyup=function(e){if(!this.isReadOnly&&!e.defaultPrevented)switch(e.keyCode){case t.Key.Back:0===this._tbx.value.length&&0===this._lastInputValue.length&&this._delItem(!1);break;case t.Key.Delete:this._delItem(!0)}},i.prototype._addHelperInput=function(){var t=document.createElement("input");t.type="text",t.tabIndex=-1,t.className="wj-token-helper",t.readOnly=!0,this._wjTpl.insertBefore(t,this._wjInput),this._helperInput=t},i.prototype._refreshHeader=function(){for(var t=this.hostElement.querySelectorAll(".wj-token"),e=0;e<t.length;e++)this._wjTpl.removeChild(t[e]);var i=this.selectedItems;if(i&&0!==i.length){for(e=0;e<i.length;e++)this._insertToken(i[e]);this._wjInput.style.cssFloat=this.rightToLeft?"right":"left",this._adjustInputWidth()}},i.prototype._insertToken=function(e){var i=this._getItemText(e,!0);this.isContentHtml?(this._cvt||(this._cvt=document.createElement("div")),this._cvt.innerHTML=i,i=this._cvt.textContent.trim()):i=t.escapeHtml(i),this._wjTpl.insertBefore(this._createItem(i),this._wjInput)},i.prototype._updateMaxItems=function(){null!=this._maxtems&&this._selItems&&this._selItems.length>this._maxtems&&(this._selItems=this._selItems.slice(0,this._maxtems))},i.prototype._updateFocus=function(){var e=this,n=this._wjTpl.querySelector("."+i._clsActive);n?(t.removeClass(n,i._clsActive),setTimeout(function(){e._tbx.focus()})):(this._clearSelIndex(),t.removeClass(this.hostElement,"wj-state-focused"))},i.prototype._addItem=function(t){this.selectedItems.indexOf(this.selectedItem)>-1?this._clearSelIndex():this.selectedIndex>-1&&(this._updateSelItems(this.selectedItem,!0),this._refreshHeader(),t&&this._clearSelIndex(),this._disableInput(!0))},i.prototype._delItem=function(t){var e,n,o=this._wjTpl.querySelector("."+i._clsActive),s=!1;t&&!o||(o?(n=this._getItemIndex(o))>-1&&(e=this._selItems[n],s=!0):this._selItems.length>0&&(e=this._selItems[this._selItems.length-1],s=!0),s&&(this._updateSelItems(e,!1),this._refreshHeader(),this._clearSelIndex(),this._disableInput(!1)),this._tbx.focus())},i.prototype._updateSelItems=function(t,e){if(e){if(this._selItems&&0!==this._selItems.length||(this._selItems=[]),null!=this._maxtems&&this._selItems.length>=this._maxtems)return;this._selItems.push(t)}else{var i=this._selItems.indexOf(t);this._selItems.splice(i,1)}this._hasSelectedMemeberPath()&&this._setSelItem(t,e),this.onSelectedItemsChanged()},i.prototype._createItem=function(e){var n=this,o=document.createElement("div"),s=document.createElement("span"),r=document.createElement("a");return o.appendChild(s),o.appendChild(r),o.className="wj-token",s.className="wj-token-label",s.innerHTML=e,r.className="wj-token-close",r.href="#",r.tabIndex=-1,r.text="×",o.style.cssFloat=this.rightToLeft?"right":"left",this.addEventListener(o,"click",function(e){n._helperInput.focus();var s=n._wjTpl.querySelector("."+i._clsActive);s&&t.removeClass(s,i._clsActive),t.addClass(o,i._clsActive),e.stopPropagation(),e.preventDefault()}),this.addEventListener(r,"click",function(t){if(!n.isReadOnly){var e=n._getItemIndex(o);if(e>-1){var i=n._selItems[e];n._updateSelItems(i,!1)}n._wjTpl.removeChild(o),n._adjustInputWidth(),n._disableInput(!1),n._tbx.focus(),t.stopPropagation(),t.preventDefault()}}),o},i.prototype._itemOn=function(e){var n,o,s,r=t.getActiveElement();if((this._tbx!=r||0===this._tbx.value.length)&&0!==(n=this._wjTpl.querySelectorAll(".wj-token")).length)if(o=this._wjTpl.querySelector("."+i._clsActive),s=this._getItemIndex(o),e){if(0===s)return;-1===s?(t.addClass(n[n.length-1],i._clsActive),this._helperInput.focus()):(t.removeClass(o,i._clsActive),t.addClass(n[s-1],i._clsActive),this._helperInput.focus())}else if(!e){if(-1===s)return;s!==n.length-1?(t.removeClass(o,i._clsActive),t.addClass(n[s+1],i._clsActive),this._helperInput.focus()):(t.removeClass(o,i._clsActive),this._tbx.focus())}},i.prototype._itemOff=function(){var e=this._wjTpl.querySelector("."+i._clsActive);e&&t.removeClass(e,i._clsActive)},i.prototype._initSeltems=function(){if(this.selectedMemberPath&&""!==this.selectedMemberPath){var t=this.itemsSource;if(this._selItems.splice(0,this._selItems.length),t)for(var e=0;e<t.sourceCollection.length;e++)this._getSelItem(e)&&this._selItems.push(t.sourceCollection[e])}},i.prototype._getSelItem=function(e){var i=this.itemsSource.sourceCollection[e];return!(!t.isObject(i)||!this.selectedMemberPath)&&this._selPath.getValue(i)},i.prototype._setSelItem=function(e,i){this.itemsSource;t.isObject(e)&&this._selPath.getValue(e)!=i&&this._selPath.setValue(e,i)},i.prototype._clearSelIndex=function(){this.selectedIndex=-1},i.prototype._hasSelectedMemeberPath=function(){return this.selectedMemberPath&&""!==this.selectedMemberPath},i.prototype._disableInput=function(t){null!=this._maxtems&&(this._selItems.length<this._maxtems?(this._tbx.disabled=!1,this._tbx.focus()):(this._tbx.disabled=!0,this.hostElement.focus()))},i.prototype._adjustInputWidth=function(){this._tbx.style.width="60px";var e,i=t.getElementRect(this.hostElement),n=t.getElementRect(this._tbx),o=getComputedStyle(this._tbx),s=parseInt(o.paddingLeft,10),r=parseInt(o.paddingRight,10);e=this.rightToLeft?n.left+n.width-i.left-s-r-8:i.left+i.width-n.left-s-r-8,this._tbx.style.width=e+"px"},i.prototype._getItemIndex=function(t){for(var e=this.hostElement.querySelectorAll(".wj-token"),i=0;i<e.length;i++)if(t===e[i])return i;return-1},i._clsActive="wj-token-active",i}(e.AutoComplete);e.MultiAutoComplete=i}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i;!function(t){t[t.None=0]="None",t[t.Click=1]="Click",t[t.Blur=2]="Blur",t[t.ClickOrBlur=3]="ClickOrBlur"}(i=e.PopupTrigger||(e.PopupTrigger={}));var n=function(n){function o(e,o){var s=n.call(this,e,null,!0)||this;s._showTrigger=i.Click,s._hideTrigger=i.Blur,s._fadeIn=!0,s._fadeOut=!0,s._removeOnHide=!0,s._visible=!1,s._ownerClickBnd=s._ownerClick.bind(s),s._ownerMousedownBnd=s._ownerMouseDown.bind(s),s.showing=new t.Event,s.shown=new t.Event,s.hiding=new t.Event,s.hidden=new t.Event;var r=s.hostElement;return t.addClass(r,"wj-control wj-content wj-popup"),r.getAttribute("tabindex")||(r.tabIndex=0),t.hidePopup(r,!1),s.addEventListener(r,"compositionstart",function(t){s._composing=!0}),s.addEventListener(r,"compositionend",function(t){s._composing=!1}),s.addEventListener(r,"keydown",function(e){if(!e.defaultPrevented){if(e.keyCode!=t.Key.Escape||s._composing||(e.preventDefault(),s.hide()),e.keyCode==t.Key.Enter){var i=s.dialogResultEnter;i&&(e.preventDefault(),s._validateAndHide(i))}e.keyCode==t.Key.Tab&&s.modal&&(e.preventDefault(),t.moveFocus(r,e.shiftKey?-1:1))}}),s.addEventListener(r,"click",function(t){if(t.target instanceof HTMLElement){var e=t.target.className.match(/\bwj-hide[\S]*\b/);e&&e.length>0&&(t.preventDefault(),t.stopPropagation(),s.hide(e[0]))}}),s.addEventListener(document,"wheel",function(t){if(s.isVisible&&s._modal){for(var e=t.target;e&&e!=document.body;e=e.parentElement)if(e.scrollHeight>e.clientHeight)return;t.preventDefault(),t.stopPropagation()}}),s.initialize(o),s}return __extends(o,n),Object.defineProperty(o.prototype,"owner",{get:function(){return this._owner},set:function(e){var i=this._owner;i&&(this.removeEventListener(i,"mousedown"),this.removeEventListener(i,"click")),(i=this._owner=null!=e?t.getElement(e):null)&&(this.addEventListener(i,"mousedown",this._ownerMousedownBnd,!0),this.addEventListener(i,"click",this._ownerClickBnd,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"content",{get:function(){return this.hostElement.firstElementChild},set:function(t){t!=this.content&&(this.hostElement.innerHTML="",t instanceof HTMLElement&&this.hostElement.appendChild(t))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"showTrigger",{get:function(){return this._showTrigger},set:function(e){this._showTrigger=t.asEnum(e,i)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hideTrigger",{get:function(){return this._hideTrigger},set:function(e){this._hideTrigger=t.asEnum(e,i)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"fadeIn",{get:function(){return this._fadeIn},set:function(e){this._fadeIn=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"fadeOut",{get:function(){return this._fadeOut},set:function(e){this._fadeOut=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"removeOnHide",{get:function(){return this._removeOnHide},set:function(e){this._removeOnHide=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"modal",{get:function(){return this._modal},set:function(e){this._modal=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isDraggable",{get:function(){return this._draggable},set:function(e){this._draggable=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"dialogResult",{get:function(){return this._result},set:function(t){this._result=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"dialogResultEnter",{get:function(){return this._resultEnter},set:function(t){this._resultEnter=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isVisible",{get:function(){var t=this.hostElement;return this._visible&&null!=t&&t.offsetHeight>0},enumerable:!0,configurable:!0}),o.prototype.show=function(e,i){var n=this;if(!this.isVisible){var o=this.hostElement;this.dialogResult=null,this._callback=null,this._hideAnim&&(clearInterval(this._hideAnim),this._hideAnim=null);var s=new t.CancelEventArgs;this.onShowing(s)&&(null!=e&&(this.modal=t.asBoolean(e)),null!=i&&(this._callback=t.asFunction(i)),t.showPopup(o,this._owner,!1,this._fadeIn,!1),this._modal&&this._showBackdrop(),this._composing=!1,this._visible=!0,this.onShown(s),this.modal&&this.addEventListener(window,"focus",function(){n.containsFocus()||t.moveFocus(o,0)}),this._makeDraggable(this._draggable),setTimeout(function(){if(!n.isTouching){var e=o.querySelector("input[autofocus]");e&&e.clientHeight>0&&!e.disabled&&e.tabIndex>-1&&!t.closest(e,"[disabled],.wj-state-disabled")?(e.focus(),e.select()):t.moveFocus(o,0)}n.containsFocus()||(o.tabIndex=0,o.focus())},200))}},o.prototype.hide=function(i){var n=this;if(this._makeDraggable(!1),this.isVisible){t.isUndefined(i)||(this.dialogResult=i);var o=new t.CancelEventArgs;if(this.onHiding(o)){for(var s=this.hostElement.querySelectorAll(".wj-control.wj-dropdown"),r=0;r<s.length;r++){var a=t.Control.getControl(s[r]);a instanceof e.DropDown&&(a.isDroppedDown=!1)}this._bkdrop&&t.hidePopup(this._bkdrop,this.removeOnHide,this.fadeOut),this._hideAnim=t.hidePopup(this.hostElement,this.removeOnHide,this.fadeOut),this._visible=!1,this.removeEventListener(window,"focus"),this.containsFocus()&&t.getActiveElement().blur(),setTimeout(function(){n._updateState(),n.onHidden(o),n._callback&&n._callback(n)})}}},o.prototype.onShowing=function(t){return this.showing.raise(this,t),!t.cancel},o.prototype.onShown=function(t){this.shown.raise(this,t)},o.prototype.onHiding=function(t){return this.hiding.raise(this,t),!t.cancel},o.prototype.onHidden=function(t){this.hidden.raise(this,t)},o.prototype.dispose=function(){this.owner=null,n.prototype.dispose.call(this)},o.prototype.onLostFocus=function(t){this.isVisible&&this._hideTrigger&i.Blur&&(this.containsFocus()||this.hide()),n.prototype.onLostFocus.call(this,t)},o.prototype.refresh=function(e){if(void 0===e&&(e=!0),n.prototype.refresh.call(this,e),this.isVisible&&!this._refreshing){this._refreshing=!0;var i=t.getActiveElement(),o=this._owner?this._owner.getBoundingClientRect():null;t.showPopup(this.hostElement,o),this._modal&&i instanceof HTMLElement&&i!=t.getActiveElement()&&i.focus(),this._refreshing=!1}},o.prototype._makeDraggable=function(e){var i,n,o=this,s=this.hostElement,r=s?s.querySelector(".wj-dialog-header"):null,a=document,l="mouseup",h="touchend",c=function(e){s&&t.contains(r,e.target)&&(i=new t.Point(s.offsetLeft,s.offsetTop),n=t.mouseToPage(e),["mousemove",l,"touchmove",h].forEach(function(t){o.removeEventListener(a,t)}),["mousemove","touchmove"].forEach(function(t){o.addEventListener(a,t,u)}),[l,h].forEach(function(t){o.addEventListener(a,t,p)}))},u=function(e){var r=t.mouseToPage(e);t.setCss(s,{left:Math.max(i.x+(r.x-n.x),50-s.offsetWidth),top:Math.max(i.y+(r.y-n.y),0)}),o._dragged=!0},p=function(t){["mousemove",l,"touchmove",h].forEach(function(t){o.removeEventListener(a,t)})};["mousedown","touchstart"].forEach(function(t){o.removeEventListener(a,t)}),this._dragged=!1,r&&(t.setCss(r,{touchAction:e?"none":""}),e&&["mousedown","touchstart"].forEach(function(t){o.addEventListener(a,t,c)}))},o.prototype._handleResize=function(){this.isVisible&&!this._dragged&&this.refresh()},o.prototype._ownerClick=function(t){this.isVisible?this._hideTrigger&i.Click&&this.hide():this._showTrigger&i.Click&&(this._wasVisible||this.show())},o.prototype._ownerMouseDown=function(t){this._wasVisible=this.isVisible},o.prototype._showBackdrop=function(){var e=this;this._bkdrop||(this._bkdrop=document.createElement("div"),this._bkdrop.tabIndex=-1,t.addClass(this._bkdrop,"wj-popup-backdrop"),this.addEventListener(this._bkdrop,"mousedown",function(t){t.preventDefault(),t.stopPropagation(),e.hostElement.focus(),e.hideTrigger&i.Blur&&e.hide()})),this._bkdrop.style.display="";var n=this.hostElement;n.parentElement.insertBefore(this._bkdrop,n)},o.prototype._validateAndHide=function(t){var e=this.hostElement.querySelector(":invalid");e?e.focus():this.hide(t)},o}(t.Control);e.Popup=n}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(i){function n(n,o){var s=i.call(this,n)||this;if(s._format="d",s.valueChanged=new t.Event,t.addClass(s.hostElement,"wj-inputdate"),s._msk=new t._MaskProvider(s._tbx),t.isIE9()||(s.inputType="tel"),s._tbx.type.match(/date/i)&&(s.inputType=""),s.addEventListener(s.hostElement,"wheel",function(i){if(!i.defaultPrevented&&!s.isDroppedDown&&s.containsFocus()&&null!=s.value&&s._canChangeValue()){var n=t.clamp(-i.deltaY,-1,1);s.value=s.selectionMode==e.DateSelectionMode.Month?t.DateTime.addMonths(s.value,n):t.DateTime.addDays(s.value,n),s.selectAll(),i.preventDefault()}}),s.value=t.DateTime.newDate(),"INPUT"==s._orgTag){var r=s._tbx.getAttribute("value");r&&(s.value=t.Globalize.parseDate(r,"yyyy-MM-dd"))}return s.isRequired=!0,s.initialize(o),s}return __extends(n,i),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(e){if(t.DateTime.equals(this._value,e))this._tbx.value=t.Globalize.format(e,this.format);else{var i=!this.isRequired||null==e&&null==this.value;e=t.asDate(e,i),e=this._clamp(e),this._isValidDate(e)?(this._tbx.value=e?t.Globalize.format(e,this.format):"",e==this._value||t.DateTime.equals(this._value,e)||(this._value=e,this.onValueChanged())):this._tbx.value=e?t.Globalize.format(this.value,this.format):"",this.text!=this._oldText&&(this._oldText=this.text,this.onTextChanged())}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"text",{get:function(){return this._tbx.value},set:function(t){t!=this.text&&(this._setText(t,!0),this._commitText())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectionMode",{get:function(){return this.calendar.selectionMode},set:function(t){this.calendar.selectionMode=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"min",{get:function(){return this._calendar.min},set:function(e){this._calendar.min=t.asDate(e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"max",{get:function(){return this._calendar.max},set:function(e){this._calendar.max=t.asDate(e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"format",{get:function(){return this._format},set:function(e){e!=this.format&&(this._format=t.asString(e),this._tbx.value=t.Globalize.format(this.value,this.format))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mask",{get:function(){return this._msk.mask},set:function(e){this._msk.mask=t.asString(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"calendar",{get:function(){return this._calendar},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputElement",{get:function(){return this._tbx},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputType",{get:function(){return this._tbx.type},set:function(e){this._tbx.type=t.asString(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"itemValidator",{get:function(){return this._calendar.itemValidator},set:function(e){e!=this.itemValidator&&(this._calendar.itemValidator=t.asFunction(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"itemFormatter",{get:function(){return this.calendar.itemFormatter},set:function(e){e!=this.itemFormatter&&(this.calendar.itemFormatter=t.asFunction(e))},enumerable:!0,configurable:!0}),n.prototype.onValueChanged=function(t){this.valueChanged.raise(this,t)},n.prototype.refresh=function(e){void 0===e&&(e=!0),i.prototype.refresh.call(this,e),this.isDroppedDown=!1,this._msk&&this._msk.refresh(),this._calendar&&this._calendar.refresh(),this._tbx.value=t.Globalize.format(this.value,this.format)},n.prototype.onIsDroppedDownChanged=function(t){i.prototype.onIsDroppedDownChanged.call(this,t),this.isDroppedDown&&(this._calChanged=!1,this.dropDown.focus())},n.prototype._createDropDown=function(){var i=this;this._calendar=new e.Calendar(this._dropDown),this._calendar.valueChanged.addHandler(function(){i.value=t.DateTime.fromDateTime(i._calendar.value,i.value),i._calChanged=!0}),this.addEventListener(this._dropDown,"mouseup",function(e){i._calChanged&&!t.closest(e.target,".wj-calendar-header")?i.isDroppedDown=!1:"btn-today"==e.target.getAttribute("wj-part")&&(i.isDroppedDown=!1)})},n.prototype._updateDropDown=function(){this._commitText();var t=this._calendar;t.value=this.value,t.min=this.min,t.max=this.max,this.selectionMode!=e.DateSelectionMode.Month&&(t.monthView=!0);var n=getComputedStyle(this.hostElement);this._dropDown.style.minWidth=18*parseFloat(n.fontSize)+"px",this._calendar.refresh(),i.prototype._updateDropDown.call(this)},n.prototype._keydown=function(n){if(!(n.defaultPrevented||n.altKey||n.ctrlKey||n.metaKey))switch(n.keyCode){case t.Key.Enter:this._commitText(),this.selectAll();break;case t.Key.Escape:this.text=t.Globalize.format(this.value,this.format),this.selectAll();break;case t.Key.Up:case t.Key.Down:if(!this.isDroppedDown&&this.value&&this._canChangeValue()){var o=n.keyCode==t.Key.Up?1:-1,s=this.selectionMode==e.DateSelectionMode.Month?t.DateTime.addMonths(this.value,o):t.DateTime.addDays(this.value,o);this.value=t.DateTime.fromDateTime(s,this.value),this.selectAll(),n.preventDefault()}}i.prototype._keydown.call(this,n)},n.prototype._canChangeValue=function(){return!this.isReadOnly&&this.selectionMode!=e.DateSelectionMode.None},n.prototype._clamp=function(t){return this.calendar._clamp(t)},n.prototype._commitText=function(){var e=this._tbx.value;if(e||this.isRequired){var i=t.Globalize.parseDate(e,this.format);i?this.value=t.DateTime.fromDateTime(i,this.value):this._tbx.value=t.Globalize.format(this.value,this.format)}else this.value=null},n.prototype._isValidDate=function(t){if(t){if(this._clamp(t)!=t)return!1;if(this.itemValidator&&!this.itemValidator(t))return!1}return!0},n}(e.DropDown);e.InputDate=i}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(e){function i(i,n){var o=e.call(this,i)||this;if(o._format="t",o.valueChanged=new t.Event,t.addClass(o.hostElement,"wj-inputtime"),o._value=t.DateTime.newDate(),o._msk=new t._MaskProvider(o._tbx),t.isIE9()||(o._tbx.type="tel"),"INPUT"==o._orgTag){var s=o._tbx.getAttribute("value");s&&(o.value=t.Globalize.parseDate(s,"HH:mm:ss"))}return o.step=15,o.autoExpandSelection=!0,o.initialize(n),o}return __extends(i,e),Object.defineProperty(i.prototype,"inputElement",{get:function(){return this._tbx},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"inputType",{get:function(){return this._tbx.type},set:function(e){this._tbx.type=t.asString(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){return this._value},set:function(e){(e=t.asDate(e,!this.isRequired))&&(null!=this._min&&this._getTime(e)<this._getTime(this._min)&&(e=t.DateTime.fromDateTime(e,this._min)),null!=this._max&&this._getTime(e)>this._getTime(this._max)&&(e=t.DateTime.fromDateTime(e,this._max))),this._setText(e?t.Globalize.format(e,this.format):"",!0),this.selectedItem&&this.selectedItem.value&&(e=t.DateTime.fromDateTime(e,this.selectedItem.value)),e==this._value||t.DateTime.equals(e,this._value)||(this._value=e,this.onValueChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"text",{get:function(){return this._tbx.value},set:function(t){t!=this.text&&(this._setText(t,!0),this._commitText())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"min",{get:function(){return this._min},set:function(e){this._min=t.asDate(e,!0),this.isDroppedDown=!1,this._updateItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"max",{get:function(){return this._max},set:function(e){this._max=t.asDate(e,!0),this.isDroppedDown=!1,this._updateItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"step",{get:function(){return this._step},set:function(e){this._step=t.asNumber(e,!0),this.isDroppedDown=!1,this._updateItems()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"format",{get:function(){return this._format},set:function(e){e!=this.format&&(this._format=t.asString(e),this._tbx.value=t.Globalize.format(this.value,this.format),t.hasItems(this.collectionView)&&this._updateItems())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"mask",{get:function(){return this._msk.mask},set:function(e){this._msk.mask=t.asString(e)},enumerable:!0,configurable:!0}),i.prototype.onValueChanged=function(t){this.valueChanged.raise(this,t)},i.prototype.onItemsSourceChanged=function(t){e.prototype.onItemsSourceChanged.call(this,t),this._hasCustomItems=null!=this.itemsSource},i.prototype._updateInputSelection=function(i){if(this._delKey)e.prototype._updateInputSelection.call(this,i);else{for(var n=this._tbx.value;i<n.length&&!n[i].match(/[a-z0-9]/i);)i++;t.setSelectionRange(this._tbx,i,this._tbx.value.length)}},i.prototype.refresh=function(i){void 0===i&&(i=!0),e.prototype.refresh.call(this,i),this.isDroppedDown=!1,this._msk.refresh(),this._tbx.value=t.Globalize.format(this.value,this.format),this._updateItems()},i.prototype.onSelectedIndexChanged=function(i){if(this.selectedIndex>-1&&!this._settingText){var n=this.value?this.value:t.DateTime.newDate(),o=null!=this.selectedItem.value?this.selectedItem.value:t.Globalize.parseDate(this.text,this.format);this.value=t.DateTime.fromDateTime(n,o)}e.prototype.onSelectedIndexChanged.call(this,i)},i.prototype._updateItems=function(){if(!this._hasCustomItems){var e=[],i=t.DateTime.newDate(0,0,0,0,0),n=t.DateTime.newDate(0,0,0,23,59,59);if(this.min&&i.setHours(this.min.getHours(),this.min.getMinutes(),this.min.getSeconds()),this.max&&n.setHours(this.max.getHours(),this.max.getMinutes(),this.max.getSeconds()),t.isNumber(this.step)&&this.step>0)for(var o=i;o<=n;o=t.DateTime.addMinutes(o,this.step))e.push({value:o,text:t.Globalize.format(o,this.format)});var s=this.value;this._settingText=!0,this.displayMemberPath="text",this.selectedValuePath="text",this.itemsSource=e,this._hasCustomItems=!1,this._settingText=!1,this.value=s}},i.prototype._getTime=function(t){return 3600*t.getHours()+60*t.getMinutes()+t.getSeconds()},i.prototype._keydown=function(i){if(e.prototype._keydown.call(this,i),!i.defaultPrevented)switch(i.keyCode){case t.Key.Enter:this.isDroppedDown||(this._commitText(),this.selectAll());break;case t.Key.Escape:this.text=t.Globalize.format(this.value,this.format),this.selectAll()}},i.prototype._commitText=function(){if(this.text||this.isRequired){var e=this.value?t.Globalize.format(this.value,this.format):null;if(this.text!=e){var i=this.selectedItem&&this.selectedItem.value?this.selectedItem.value:t.Globalize.parseDate(this.text,this.format);i?this.value=t.DateTime.fromDateTime(this.value,i):this._tbx.value=e}}else this.value=null},i}(e.ComboBox);e.InputTime=i}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(i){function n(n,o){var s=i.call(this,n)||this;t.addClass(s.hostElement,"wj-inputdatetime"),s._btnTm=s.hostElement.querySelector('[wj-part="btn-tm"]'),s._format="g",s._inputTime=new e.InputTime(document.createElement("div")),s._inputTime.valueChanged.addHandler(function(){s.value=t.DateTime.fromDateTime(s.value,s._inputTime.value)});var r=s._inputTime.dropDown,a=s._keydown.bind(s);return s.addEventListener(r,"keydown",a,!0),s.addEventListener(r,"blur",function(){s._updateFocusState()},!0),s.addEventListener(s._btn,"mousedown",function(t){s._setDropdown(s.calendar.hostElement)}),s.addEventListener(s._btnTm,"mousedown",function(t){s._inputTime.dropDownCssClass=s.dropDownCssClass,s._setDropdown(r),setTimeout(function(){s._btnclick(t)})}),s.initialize(o),s}return __extends(n,i),Object.defineProperty(n.prototype,"timeMin",{get:function(){return this._inputTime.min},set:function(t){this._inputTime.min=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"timeMax",{get:function(){return this._inputTime.max},set:function(t){this._inputTime.max=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"timeFormat",{get:function(){return this._inputTime.format},set:function(t){this._inputTime.format=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"timeStep",{get:function(){return this._inputTime.step},set:function(t){this._inputTime.step=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputTime",{get:function(){return this._inputTime},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){this._setDropdown(this.calendar.hostElement),i.prototype.dispose.call(this),this._inputTime.dispose()},n.prototype.refresh=function(t){void 0===t&&(t=!0),this._setDropdown(this.calendar.hostElement),this._inputTime.refresh(),i.prototype.refresh.call(this,t)},n.prototype._updateBtn=function(){i.prototype._updateBtn.call(this),this._btnTm&&(this._btnTm.tabIndex=this._btn.tabIndex,this._btnTm.parentElement.style.display=this._btn.style.display)},n.prototype._clamp=function(t){return t&&(this.min&&t<this.min&&(t=this.min),this.max&&t>this.max&&(t=this.max)),t},n.prototype._commitText=function(){var e=this._tbx.value;if(e||this.isRequired){var i=t.Globalize.parseDate(e,this.format);i?this.value=i:this._tbx.value=t.Globalize.format(this.value,this.format)}else this.value=null},n.prototype._setDropdown=function(t){this._dropDown!=t&&(this.isDroppedDown&&(this.isDroppedDown=!1),this._dropDown=t)},n.prototype._updateDropDown=function(){var t=this._inputTime;this._dropDown==t.dropDown?(this._commitText(),i.prototype._updateDropDown.call(this),t.isRequired=this.isRequired,t.value=this.value,this.isDroppedDown&&t.listBox.showSelection()):i.prototype._updateDropDown.call(this)},n.controlTemplate='<div style="position:relative" class="wj-template"><div class="wj-input"><div class="wj-input-group wj-input-btn-visible"><input wj-part="input" type="text" class="wj-form-control" /><span class="wj-input-group-btn" tabindex="-1"><button wj-part="btn" class="wj-btn wj-btn-default" type="button" tabindex="-1"><span class="wj-glyph-calendar"></span></button><button wj-part="btn-tm" class="wj-btn wj-btn-default" type="button" tabindex="-1"><span class="wj-glyph-clock"></span></button></span></div></div><div wj-part="dropdown" class="wj-content wj-dropdown-panel" style="display:none;position:absolute;z-index:100;width:auto"></div></div>',n}(e.InputDate);e.InputDateTime=i}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(e){function i(i,n){var o=e.call(this,i)||this;o._showBtn=!0,o._readOnly=!1,o.textChanged=new t.Event,o.valueChanged=new t.Event;var s=o.hostElement;t.setAttribute(s,"role","spinbutton",!0);var r=o.getTemplate();o.applyTemplate("wj-control wj-content wj-inputnumber",r,{_tbx:"input",_btnUp:"btn-inc",_btnDn:"btn-dec"},"input"),o._tbx.type.match(/number/i)&&(o.inputType="");var a=o._tbx;a.autocomplete="off",a.spellcheck=!1,o._updateSymbols(),o.addEventListener(o._tbx,"compositionstart",function(){o._composing=!0}),o.addEventListener(o._tbx,"compositionend",function(){o._composing=!1,setTimeout(function(){var t=o.text;o._oldText.indexOf(o._chrPct)>-1&&t.indexOf(o._chrPct)<0&&(t+=o._chrPct),o._setText(t)})}),o.addEventListener(a,"keypress",o._keypress.bind(o)),o.addEventListener(a,"keydown",o._keydown.bind(o)),o.addEventListener(a,"input",o._input.bind(o));var l=o._clickSpinner.bind(o);return o.addEventListener(o._btnUp,"click",l),o.addEventListener(o._btnDn,"click",l),o._rptUp=new t._ClickRepeater(o._btnUp.querySelector("button")),o._rptDn=new t._ClickRepeater(o._btnDn.querySelector("button")),o.addEventListener(s,"wheel",function(e){if(!e.defaultPrevented&&!o.isReadOnly&&o.containsFocus()){var i=t.clamp(-e.deltaY,-1,1);o._increment((o.step||1)*i),setTimeout(function(){return o.selectAll()}),e.preventDefault()}}),o.value=0,o.isRequired=!0,o.initialize(n),o}return __extends(i,e),Object.defineProperty(i.prototype,"inputElement",{get:function(){return this._tbx},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"inputType",{get:function(){return this._tbx.type},set:function(e){this._tbx.type=t.asString(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){return this._value},set:function(e){if(e!=this._value)if(null==(e=t.asNumber(e,!this.isRequired||null==e&&null==this._value)))this._setText("");else if(!isNaN(e)){var i=t.Globalize.format(e,this.format);this._setText(i)}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isRequired",{get:function(){return this._tbx.required},set:function(e){this._tbx.required=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isReadOnly",{get:function(){return this._readOnly},set:function(e){this._readOnly=t.asBoolean(e),this.inputElement.readOnly=this._readOnly,t.toggleClass(this.hostElement,"wj-state-readonly",this.isReadOnly)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"min",{get:function(){return this._min},set:function(e){this._min=t.asNumber(e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"max",{get:function(){return this._max},set:function(e){this._max=t.asNumber(e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"step",{get:function(){return this._step},set:function(e){this._step=t.asNumber(e,!0),this._updateBtn()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"format",{get:function(){return this._format},set:function(e){e!=this.format&&(this._format=t.asString(e),this.refresh())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"text",{get:function(){return this._tbx.value},set:function(t){t!=this.text&&(this._oldText=null,this._setText(t))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"placeholder",{get:function(){return this._tbx.placeholder},set:function(t){this._tbx.placeholder=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showSpinner",{get:function(){return this._showBtn},set:function(e){this._showBtn=t.asBoolean(e),this._updateBtn()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"repeatButtons",{get:function(){return!this._rptUp.disabled},set:function(e){this._rptUp.disabled=this._rptDn.disabled=!t.asBoolean(e)},enumerable:!0,configurable:!0}),i.prototype.selectAll=function(){var e=this._tbx;t.setSelectionRange(e,0,e.value.length)},i.prototype.onTextChanged=function(t){this.textChanged.raise(this,t),this._updateState()},i.prototype.onValueChanged=function(t){this._updateAria(),this.valueChanged.raise(this,t)},i.prototype.dispose=function(){this._rptUp.element=null,this._rptDn.element=null,e.prototype.dispose.call(this)},i.prototype.onGotFocus=function(t){this.isTouching||(this._tbx.focus(),this.selectAll()),e.prototype.onGotFocus.call(this,t)},i.prototype.onLostFocus=function(i){this._composing&&(this._composing=!1,this._setText(this.text));var n=this._clamp(this.value),o=t.Globalize.format(n,this.format);this._setText(o),e.prototype.onLostFocus.call(this,i)},i.prototype.refresh=function(i){void 0===i&&(i=!0),e.prototype.refresh.call(this,i),this._updateSymbols();var n=t.Globalize.format(this.value,this.format);this._setText(n)},i.prototype._updateSymbols=function(){var e=t.culture.Globalize.numberFormat,i=this.format?this.format.match(/([a-z])(\d*)(,*)(.*)/i):null;this._chrDec=e["."]||".",this._chrNeg=e["-"]||"-",this._chrPls=e["+"]||"+",this._chrPct=e["%"]||"%",this._chrCur=i&&i[4]?i[4]:e.currency.symbol||"$",this._fmtSpc=i&&i[1]?i[1].toLowerCase():"n",this._fmtPrc=i&&i[2]?parseInt(i[2]):null,this._rxSym=new RegExp("^[%+\\-() \\"+this._chrDec+"\\"+this._chrCur+"\\"+this._chrNeg+"\\"+this._chrPls+"\\"+this._chrPct+"]*$"),this._rxNeg=new RegExp("(\\-|\\(|\\"+this._chrNeg+")")},i.prototype._clamp=function(e){return t.clamp(e,this.min,this.max)},i.prototype._isNumeric=function(t,e){var i=t==this._chrDec||t>="0"&&t<="9",n="x"==this._fmtSpc;return!i&&n&&(i=t>="a"&&t<="f"||t>="A"&&t<="F"),i||e||n||(i=t==this._chrPls||t==this._chrNeg||"("==t||")"==t),i},i.prototype._getInputRange=function(t){for(var e=[0,0],i=this.text,n=!1,o=0;o<i.length;o++)this._isNumeric(i[o],t)&&(n||(e[0]=o,n=!0),e[1]=o+1);return e},i.prototype._flipSign=function(){var t=this._getSelStartDigits();this.value*=-1,this._setSelStartDigits(t)},i.prototype._getSelStartDigits=function(){for(var t=0,e=this._tbx.selectionStart,i=this._tbx.value,n=0;n<i.length&&n<e;n++)this._isNumeric(i[n],!0)&&t++;return t},i.prototype._setSelStartDigits=function(e){for(var i=this._tbx.value,n=0;n<i.length&&e>=0;n++)if(this._isNumeric(i[n],!0)){if(!e){t.setSelectionRange(this._tbx,n);break}e--}else if(!e){t.setSelectionRange(this._tbx,n);break}},i.prototype._increment=function(e){if(e){var i=this._clamp(t.isNumber(this.value)?this.value+e:0),n=t.Globalize.format(i,this.format,!1,!1);this._setText(n)}},i.prototype._updateBtn=function(){var e=this.showSpinner&&!!this.step,i=e;t.setCss([this._btnUp,this._btnDn],{display:e?"":"none"}),t.toggleClass(this.hostElement,"wj-input-show-spinner",e),t.enable(this._btnUp,i),t.enable(this._btnDn,i),this._updateAria()},i.prototype._setText=function(e){if(!this._composing){var i=this._tbx,n=this._rxNeg.test(e),o=this._delKey;if(e&&this._rxSym.test(e)&&(e=this.isRequired||!o?"0":""),this._delKey=!1,o&&0==this.value&&!this.isRequired&&(e=""),!e){if(!this.isRequired)return i.value="",null!=this._value&&(this._value=null,this.onValueChanged()),this._oldText&&(this._oldText=e,this.onTextChanged()),void this._updateBtn();e="0"}var s=this._format||(e.indexOf(this._chrDec)>-1?"n2":"n0"),r=t.Globalize.parseFloat(e,s);if(isNaN(r))i.value=this._oldText;else{var a=t.Globalize.format(r,s,!1);n&&r>=0&&!o&&(a=this._chrNeg+a),null!=this._fmtPrc&&"g"!=this._fmtSpc||!o&&i.value.match(/\.0?$/)&&(a=e+("0"==e?this._chrDec:"")),i.value!=a&&(i.value=a,r=t.Globalize.parseFloat(a,this.format)),r!=this._value&&(this._value=r,this.onValueChanged()),this.text!=this._oldText&&(this._oldText=this.text,this.onTextChanged()),this._updateBtn()}}},i.prototype._keypress=function(e){if(!(e.defaultPrevented||this._composing||this.isReadOnly)&&e.charCode&&!e.ctrlKey&&!e.metaKey){var i=this._tbx,n=String.fromCharCode(e.charCode);if(this._isNumeric(n,!1)){var o=this._getInputRange(!0),s=i.selectionStart,r=i.selectionEnd;if(s<o[0]&&r<i.value.length&&t.setSelectionRange(i,o[0],r),s>=o[1]){var a=null!=this._fmtPrc?this._fmtPrc:2,l=i.value.indexOf(this._chrDec);l>-1&&s-l>a&&e.preventDefault()}}else e.preventDefault();switch(n){case"-":case this._chrNeg:this.min>=0?this.value<0&&this._flipSign():this.value&&i.selectionStart==i.selectionEnd?this._flipSign():this._clamp(-1)<0&&(i.value=this._chrNeg,t.setSelectionRange(i,1)),e.preventDefault();break;case"+":case this._chrPls:this.value<0&&this._flipSign(),e.preventDefault();break;case this._chrDec:if(0==this._fmtPrc)e.preventDefault();else{var h=i.value.indexOf(n);h>-1&&(i.selectionStart<=h&&h++,t.setSelectionRange(i,h),e.preventDefault())}}}},i.prototype._keydown=function(e){var i=this;if(this._delKey=!1,!e.defaultPrevented&&!this._composing){var n=this._tbx,o=n.value,s=n.selectionStart,r=n.selectionEnd;switch(e.keyCode){case 65:e.ctrlKey&&(setTimeout(function(){i.selectAll()}),e.preventDefault());break;case t.Key.Up:case t.Key.Down:this.step&&!this.isReadOnly&&(this._increment(this.step*(e.keyCode==t.Key.Up?1:-1)),setTimeout(function(){i.selectAll()}),e.preventDefault());break;case t.Key.Back:if(this._delKey=!0,r-s<2&&!this.isReadOnly){var a=o[r-1];a!=this._chrDec&&a!=this._chrPct&&")"!=a||(setTimeout(function(){r=a==i._chrPct?i._getInputRange(!0)[1]:r-1,t.setSelectionRange(n,r)}),e.preventDefault())}break;case t.Key.Delete:if(this._delKey=!0,r-s<2&&!this.isReadOnly)if("0"==o&&1==s)t.setSelectionRange(n,0);else{var l=o[s];l!=this._chrDec&&l!=this._chrPct||(setTimeout(function(){t.setSelectionRange(n,s+1)}),e.preventDefault())}}}},i.prototype._input=function(e){var i=this;this._composing||setTimeout(function(){var e=i._tbx,n=e.value,o=n.indexOf(i._chrDec),s=e.selectionStart,r=i._getSelStartDigits();if("p"==i._fmtSpc&&n.length&&n.indexOf(i._chrPct)<0&&(n+=i._chrPct),i._setText(n),i.containsFocus()){var a=e.value,l=a.indexOf(i._chrDec),h=i._getInputRange(!0);if(n==i._chrNeg+i._chrDec&&l>-1)return void t.setSelectionRange(e,l+1);if(n[0]==i._chrNeg&&a[0]!=i._chrNeg)return void(1==a.length?t.setSelectionRange(e,1):i._setSelStartDigits(r));n?n==i._chrDec&&l>-1?s=l+1:s<=o&&l>-1||o<0&&l<0?s+=a.length-n.length:o<0&&l>-1&&(s=l):s=l>-1?l:h[1],s=t.clamp(s,h[0],h[1]),t.setSelectionRange(e,s)}})},i.prototype._clickSpinner=function(e){var i=this;e.defaultPrevented||this.isReadOnly||!this.step||(this._increment(this.step*(t.contains(this._btnUp,e.target)?1:-1)),this.isTouching||setTimeout(function(){return i.selectAll()}))},i.prototype._updateAria=function(){var e=this.hostElement;e&&(t.setAttribute(e,"aria-valuemin",this.min),t.setAttribute(e,"aria-valuemax",this.max),t.setAttribute(e,"aria-valuenow",this.value))},i.controlTemplate='<div class="wj-input"><div class="wj-input-group"><span wj-part="btn-dec" class="wj-input-group-btn" tabindex="-1"><button class="wj-btn wj-btn-default" type="button" tabindex="-1">-</button></span><input type="tel" wj-part="input" class="wj-form-control wj-numeric"/><span wj-part="btn-inc" class="wj-input-group-btn" tabindex="-1"><button class="wj-btn wj-btn-default" type="button" tabindex="-1">+</button></span></div></div>',i}(t.Control);e.InputNumber=i}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(e){function i(i,n){var o=e.call(this,i)||this;o.valueChanged=new t.Event;var s=o.getTemplate();if(o.applyTemplate("wj-control wj-content wj-inputmask",s,{_tbx:"input"},"input"),"INPUT"==o._orgTag){var r=o._tbx.getAttribute("value");r&&(o.value=r)}return o._msk=new t._MaskProvider(o._tbx),o.isRequired=!0,o.initialize(n),o.addEventListener(o._tbx,"input",function(){setTimeout(function(){o.onValueChanged()})}),o}return __extends(i,e),Object.defineProperty(i.prototype,"inputElement",{get:function(){return this._tbx},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){return this._tbx.value},set:function(e){if(e!=this.value){this._tbx.value=t.asString(e);var i=t.getActiveElement();this._tbx.selectionStart=this._tbx.value.length,i&&i!=t.getActiveElement()&&i.focus(),e=this._msk._applyMask(),this._tbx.value=e,this.onValueChanged()}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"rawValue",{get:function(){return this._msk.getRawValue()},set:function(e){e!=this.rawValue&&(this.value=t.asString(e))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"mask",{get:function(){return this._msk.mask},set:function(e){var i=this.value;this._msk.mask=t.asString(e),this.value!=i&&this.onValueChanged()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"promptChar",{get:function(){return this._msk.promptChar},set:function(t){var e=this.value;this._msk.promptChar=t,this.value!=e&&this.onValueChanged()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"placeholder",{get:function(){return this._tbx.placeholder},set:function(t){this._tbx.placeholder=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maskFull",{get:function(){return this._msk.maskFull},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isRequired",{get:function(){return this._tbx.required},set:function(e){this._tbx.required=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isReadOnly",{get:function(){return this._tbx.readOnly},set:function(e){this._tbx.readOnly=t.asBoolean(e),t.toggleClass(this.hostElement,"wj-state-readonly",this.isReadOnly)},enumerable:!0,configurable:!0}),i.prototype.selectAll=function(){var e=this._msk.getMaskRange();t.setSelectionRange(this._tbx,e[0],e[1]+1)},i.prototype.onValueChanged=function(t){this.value!=this._oldValue&&(this._oldValue=this.value,this.valueChanged.raise(this,t)),this._updateState()},i.prototype._updateState=function(){e.prototype._updateState.call(this);var i=!this._pristine&&this._tbx.value&&!this.maskFull;t.toggleClass(this.hostElement,"wj-state-invalid",i)},i.prototype.dispose=function(){this._msk.input=null,e.prototype.dispose.call(this)},i.prototype.refresh=function(t){void 0===t&&(t=!0),e.prototype.refresh.call(this,t),this._msk.refresh()},i.prototype.onGotFocus=function(t){e.prototype.onGotFocus.call(this,t),this.selectAll()},i.controlTemplate='<div class="wj-input"><div class="wj-input-group"><input wj-part="input" class="wj-form-control"/></div></div>',i}(t.Control);e.InputMask=i}(t.input||(t.input={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(i){function n(e,n){var o=i.call(this,e)||this;return o.valueChanged=new t.Event,t.addClass(o.hostElement,"wj-inputcolor"),o._tbx.style.paddingLeft="24px",o._ePreview=t.createElement('<div class="wj-inputcolorbox" style="position:absolute;left:6px;top:6px;width:12px;bottom:6px;border:1px solid black"></div>'),o.hostElement.style.position="relative",o.hostElement.appendChild(o._ePreview),"INPUT"==o._orgTag&&(o._tbx.type="",o._commitText()),o.value="#ffffff",o.isRequired=!0,o.initialize(n),o.addEventListener(o._colorPicker.hostElement,"click",function(e){var i=e.target;i&&"DIV"==i.tagName&&(t.closest(i,'[wj-part="div-pal"]')||t.closest(i,'[wj-part="div-pv"]'))&&i.style.backgroundColor&&(o.isDroppedDown=!1)}),o}return __extends(n,i),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(e){e!=this.value&&(!e&&this.isRequired||(this.text=t.asString(e)))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"text",{get:function(){return this._tbx.value},set:function(e){e!=this.text&&(this._setText(t.asString(e),!0),this._commitText())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showAlphaChannel",{get:function(){return this._colorPicker.showAlphaChannel},set:function(t){this._colorPicker.showAlphaChannel=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"palette",{get:function(){return this._colorPicker.palette},set:function(t){this._colorPicker.palette=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"colorPicker",{get:function(){return this._colorPicker},enumerable:!0,configurable:!0}),n.prototype.onValueChanged=function(t){this.valueChanged.raise(this,t)},n.prototype._createDropDown=function(){var i=this;this._colorPicker=new e.ColorPicker(this._dropDown),t.setCss(this._dropDown,{minWidth:420,minHeight:200}),this._colorPicker.valueChanged.addHandler(function(){i.value=i._colorPicker.value})},n.prototype._keydown=function(e){if(!e.defaultPrevented)switch(e.keyCode){case t.Key.Enter:this._commitText(),this.selectAll();break;case t.Key.Escape:this.text=this.value,this.selectAll()}i.prototype._keydown.call(this,e)},n.prototype._commitText=function(){if(this.value!=this.text){if(!this.isRequired&&!this.text)return this._value=this.text,void(this._ePreview.style.backgroundColor="");t.Color.fromString(this.text)?(this._colorPicker.value=this.text,this._value=this._colorPicker.value,this._ePreview.style.backgroundColor=this.value,this.onValueChanged()):this.text=this._value?this._value:""}},n}(e.DropDown);e.InputColor=i}(t.input||(t.input={}))}(wijmo||(wijmo={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var w=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.input.AutoComplete),t,i,r,u,f,e,o,s,h,c,l,a,v,y,p;n.AutoComplete=w;t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.input.Calendar);n.Calendar=t;i=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.input.ColorPicker);n.ColorPicker=i;r=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.getDisplayText=function(t){return n.prototype.getDisplayText.call(this,t).trim()},t}(wijmo.input.ComboBox);n.ComboBox=r;u=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.input.InputColor);n.InputColor=u;f=function(n){function t(t){var i=n.call(this,t)||this;return i._dropDown&&i._dropDown.addEventListener("mousedown",function(n){n.stopPropagation()}),i}return __extends(t,n),t}(wijmo.input.InputDate);n.InputDate=f;e=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.input.InputDateTime);n.InputDateTime=e;o=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.input.InputMask);n.InputMask=o;s=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.input.InputNumber);n.InputNumber=s;h=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.input.InputTime);n.InputTime=h;c=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.input.ListBox);n.ListBox=c;l=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.input.Menu);n.Menu=l;a=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.input.Popup);n.Popup=a;v=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.input.MultiSelect);n.MultiSelect=v;y=function(n){function t(t,i){var r=n.call(this,t)||this;return r._initElements(),r.initialize(i),r}return __extends(t,n),Object.defineProperty(t.prototype,"collectionView",{get:function(){return this._collectionView},set:function(n){var i=wijmo.tryCast(n,wijmo.collections.CollectionView),t=this;i&&i!==t._collectionView&&(t._collectionView&&t._collectionView.collectionChanged.removeHandler(t._updatePager,t),t._collectionView=i,t._collectionView.collectionChanged.addHandler(t._updatePager,t),t._updatePager())},enumerable:!0,configurable:!0}),t.prototype._initElements=function(){var n=this,i=n.getTemplate(),t=[];n.applyTemplate("wj-control wj-content wj-pager",i,{_btnFirst:"btn-first",_btnPrev:"btn-prev",_btnNext:"btn-next",_btnLast:"btn-last",_inputPages:"pages"});t.push(n._btnFirst,n._btnPrev,n._btnNext,n._btnLast);t.forEach(function(t){return t.addEventListener("click",function(){n._movePage(t.getAttribute("data-action"))})})},t.prototype._movePage=function(n){var i=this,t=i.collectionView;if(t)switch(n){case"first":t.moveToFirstPage();break;case"prev":t.moveToPreviousPage();break;case"next":t.moveToNextPage();break;case"last":t.moveToLastPage()}},t.prototype._updatePager=function(){var n=this,t=n.collectionView,i,r;t&&(n._inputPages.value=t.pageIndex+1+" / "+t.pageCount,i=t.pageIndex<=0,r=t.pageIndex>=t.pageCount-1,n._btnFirst.disabled=i,n._btnPrev.disabled=i,n._btnNext.disabled=r,n._btnLast.disabled=r)},t.controlTemplate='<div class="wj-input-group">        <span class="wj-input-group-btn" >            <button wj-part="btn-first" data-action="first" class="wj-btn wj-btn-default" type="button">                <span class="wj-glyph-left" style="margin-right: -4px;"><\/span>                <span class="wj-glyph-left"><\/span>            <\/button>        <\/span>        <span class="wj-input-group-btn" >            <button wj-part="btn-prev" data-action="prev" class="wj-btn wj-btn-default" type="button">                <span class="wj-glyph-left"><\/span>            <\/button>        <\/span>        <input wj-part="pages" type="text" class="wj-form-control" disabled />        <span class="wj-input-group-btn" >            <button wj-part="btn-next" data-action="next" class="wj-btn wj-btn-default" type="button">                <span class="wj-glyph-right"><\/span>            <\/button>        <\/span>        <span class="wj-input-group-btn" >            <button wj-part="btn-last" data-action="last" class="wj-btn wj-btn-default" type="button">                <span class="wj-glyph-right"><\/span>                <span class="wj-glyph-right" style="margin-left: -4px;"><\/span>            <\/button>        <\/span>    <\/div>',t}(wijmo.Control);n.Pager=y;p=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.input.MultiAutoComplete);n.MultiAutoComplete=p})(t=n.input||(n.input={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(i){var gt=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_controlType",{get:function(){return h},enumerable:!0,configurable:!0}),t}(t._ControlWrapper),h,r,e,o,f,c,l,s,a,st,v,ht,y,ct,p,w,b,k,lt,d,g,at,nt,vt,tt,yt,it,pt,u,wt,rt,bt,ut,kt,ft,dt,et,ot;i._PagerWrapper=gt;h=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),i.cast=function(n){return n},i.prototype.initialize=function(i){var r,u,f;if(i)r=i.owner;else return;r&&(u=wijmo.Control.getControl("#"+r),u&&u.collectionView?i.collectionView=u.collectionView:(f=wijmo.tryCast(n.getService(r),wijmo.collections.CollectionView),f&&(i.collectionView=f)));delete i.owner;t.prototype.initialize.call(this,i)},i}(n.input.Pager);i.Pager=h;r=function(n){function i(){return n!==null&&n.apply(this,arguments)||this}return __extends(i,n),i.prototype._beforeInitializeControl=function(n){var e=this,u=e.control,r=u._tbx,o=r.getAttribute("wj-name"),i=e._hidden=document.createElement("input"),f;if(i.name=o,i.type="text",i.style.visibility="hidden",i.style.position="absolute",n.validationAttributes){for(f in n.validationAttributes)i.setAttribute(f,n.validationAttributes[f]);delete n.validationAttributes}r.parentNode.insertBefore(i,r);t.Utils.forwardValidationEvents(u,r,i);n.isRequired!=null&&(u.isRequired=n.isRequired,delete n.isRequired)},i.prototype._afterInitializeControl=function(n,i,r){i===void 0&&(i="value");r===void 0&&(r="valueChanged");var u=this,e=u.control,f=u._hidden;f&&(f.value=u._processInputValue(e[i]),e[r].addHandler(function(){f.value=u._processInputValue(e[i]);t.Utils.triggerValidationChangeEvent(f)}))},i.prototype._processInputValue=function(n){return wijmo.isDate(n)?wijmo.Globalize.formatDate(n,"yyyy/MM/dd HH:mm:ss"):n},i}(n.mvc._Initializer);i._FormInputInitializer=r;e=function(n){function i(){return n!==null&&n.apply(this,arguments)||this}return __extends(i,n),i.prototype._beforeInitializeControl=function(n){this._template=n.itemTemplateId||n.itemTemplateContent;delete n.itemTemplateId;delete n.itemTemplateContent},i.prototype._afterInitializeControl=function(){var t=this,n=t.control,r=n.itemsChanged?n:n._lbx,i=this._template;i&&(r.isContentHtml=!0,r.itemsChanged.addHandler(function(){t._transformItems(i)}),t._transformItems(i),setTimeout(function(){t._transformItems(i)},15),n instanceof wijmo.input.ComboBox&&n.isDroppedDownChanged.addHandler(function(){n.isDroppedDown&&t._transformItems(i)}))},i.prototype._transformItems=function(n){for(var e=this,u=e.control,f=u.itemsChanged?u:u._lbx,o,r,i=0;i<f.hostElement.childElementCount;i++)o=f.hostElement.children.item(i),r={},r[t.Template.UID]=t._getUniqueId(e)+"_item"+i,r[t.Template.DATACONTEXT]=f.collectionView.items[i],n.applyTo(o,r)},i}(n.mvc._Initializer);i._ItemsInputInitializer=e;o=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(t._ControlWrapper);i._DropDownWrapper=o;f=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_initializerType",{get:function(){return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_controlType",{get:function(){return c},enumerable:!0,configurable:!0}),t}(o);i._ComboBoxWrapper=f;c=function(n){function i(){return n!==null&&n.apply(this,arguments)||this}return __extends(i,n),i.prototype.initialize=function(i){var f=this,u,e,o,s,r,h;i&&(i.validationAttributes&&(this._validationAttributes=i.validationAttributes,delete i.validationAttributes),u=i.itemsSource instanceof wijmo.collections.CollectionView?i.itemsSource:null,t.DataSourceManager._isRemoteSource(u)&&(r=!1,typeof i.selectedValue!="undefined"&&(e=i.selectedValue,delete i.selectedValue,r=!0),typeof i.selectedItem!="undefined"&&(s=i.selectedItem,delete i.selectedItem,r=!0),typeof i.selectedIndex!="undefined"&&(o=i.selectedIndex,delete i.selectedIndex,r=!0),r&&(h=function(){typeof e!="undefined"&&(f.selectedValue=e);typeof s!="undefined"&&(f.selectedItem=s);typeof o!="undefined"&&(f.selectedIndex=o);setTimeout(function(){u.collectionChanged.removeHandler(h)},0)},u.collectionChanged.addHandler(h))));n.prototype.initialize.call(this,i);this._handleHiddenField()},Object.defineProperty(i.prototype,"isEditable",{get:function(){return this._editable},set:function(n){n!==this._editable&&(this._editable=wijmo.asBoolean(n),this._updateHiddenInput())},enumerable:!0,configurable:!0}),i.prototype._handleHiddenField=function(){var n=this,u=n.hostElement.getAttribute("wj-name"),i=n._hiddenInput,r;if(i||(i=document.createElement("input"),i.type="text",i.name=u,i.style.visibility="hidden",i.style.position="absolute",n._tbx.parentNode.insertBefore(i,n._tbx),t.Utils.forwardValidationEvents(n,n._tbx,i,!0),n._hiddenInput=i),n._validationAttributes)for(r in n._validationAttributes)i.setAttribute(r,n._validationAttributes[r]);n._updateHiddenInput()},i.prototype._onTextchanged=function(){var n=this;n._hiddenInput&&(n._hiddenInput.value=n.text,n.isEditable&&t.Utils.triggerValidationChangeEvent(n._hiddenInput))},i.prototype._onSelectedIndexChanged=function(){var n=this;n._hiddenInput&&(n._hiddenInput.value=n.selectedValue,t.Utils.triggerValidationChangeEvent(n._hiddenInput))},i.prototype._updateHiddenInput=function(){var n=this,t=n._hiddenInput;t&&(n.isEditable?(t.value=n.text,n.selectedIndexChanged.hasHandlers&&n.selectedIndexChanged.removeHandler(n._onSelectedIndexChanged,n),n.textChanged.addHandler(n._onTextchanged,n)):(t.value=n.selectedValue,n.textChanged.hasHandlers&&n.textChanged.removeHandler(n._onTextchanged,n),n.selectedIndexChanged.addHandler(n._onSelectedIndexChanged,n)))},i}(n.input.ComboBox);i.ComboBox=c;l=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_controlType",{get:function(){return a},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_initializerType",{get:function(){return s},enumerable:!0,configurable:!0}),t}(f);i._AutoCompleteWrapper=l;s=function(n){function i(){return n!==null&&n.apply(this,arguments)||this}return __extends(i,n),i.prototype._beforeInitializeControl=function(t){(n.prototype._beforeInitializeControl.call(this,t),t)&&(this._processOptions(t),this._handleHiddenElement())},i.prototype._processOptions=function(n){var i=n.itemsSourceAction;i&&(n.itemsSourceFunction=function(n,r,u){t.Utils.ajaxGet({url:i,success:function(n){u(n)},data:{query:n,max:r}})},delete n.itemsSourceAction);n.validationAttributes&&(this._validationAttributes=n.validationAttributes,delete n.validationAttributes)},i.prototype._createHiddenElement=function(){var n=document.createElement("input");return n.type="text",n.name=this.control.hostElement.getAttribute("wj-name"),n.style.visibility="hidden",n.style.position="absolute",n},i.prototype._handleHiddenElement=function(){var r=this.control,n=r._tbx,i;if(!this._hiddenElement){if(this._hiddenElement=this._createHiddenElement(),this._validationAttributes)for(i in this._validationAttributes)this._hiddenElement.setAttribute(i,this._validationAttributes[i]);n.parentNode.insertBefore(this._hiddenElement,n);t.Utils.forwardValidationEvents(r,n,this._hiddenElement)}},i.prototype._updateHiddenField=function(){var n=this._hiddenElement,i=this.control;n.value=i.text;i.textChanged.addHandler(function(){n.value=i.text;t.Utils.triggerValidationChangeEvent(n)})},i.prototype._afterInitializeControl=function(t){n.prototype._afterInitializeControl.call(this,t);this._hiddenElement&&this._updateHiddenField()},i}(e);i._AutoCompleteInitializer=s;a=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.input.AutoComplete);i.AutoComplete=a;st=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_controlType",{get:function(){return v},enumerable:!0,configurable:!0}),t}(t._ControlWrapper);i._CalendarWrapper=st;v=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.input.Calendar);i.Calendar=v;ht=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_controlType",{get:function(){return y},enumerable:!0,configurable:!0}),t}(t._ControlWrapper);i._ColorPickerWrapper=ht;y=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.initialize=function(t){if(t){var i=t.palette;!i||delete t.palette;n.prototype.initialize.call(this,t);!i||(this.palette=i)}},t}(n.input.ColorPicker);i.ColorPicker=y;ct=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_initializerType",{get:function(){return r},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_controlType",{get:function(){return p},enumerable:!0,configurable:!0}),t}(o);i._InputColorWrapper=ct;p=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.initialize=function(t){if(t){var i=!1;t.isDroppedDown&&(i=t.isDroppedDown,delete t.isDroppedDown);n.prototype.initialize.call(this,t);i&&(this.isDroppedDown=i)}},t}(n.input.InputColor);i.InputColor=p;w=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype._beforeInitializeControl=function(t){var i,r;t.value&&t.min&&t.max&&(i=wijmo.DateTime.fromDateTime(t.min,t.value),t.value<i&&(t.value=i),r=wijmo.DateTime.fromDateTime(t.max,t.value),t.value>r&&(t.value=r));n.prototype._beforeInitializeControl.call(this,t)},t.prototype._afterInitializeControl=function(t,i,r){var u=this;i===void 0&&(i="value");r===void 0&&(r="valueChanged");n.prototype._afterInitializeControl.call(this,t,i,r);t.isDroppedDown&&setTimeout(function(){u.control.isDroppedDown=!0},15)},t}(r);i._InputDateInitializer=w;b=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_initializerType",{get:function(){return w},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_controlType",{get:function(){return k},enumerable:!0,configurable:!0}),t}(o);i._InputDateWrapper=b;k=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.initialize=function(t){var r=this,i;t&&(i=15,n.prototype.initialize.call(this,t),t.isDroppedDown&&setTimeout(function(){r.isDroppedDown=!0},i))},t}(n.input.InputDate);i.InputDate=k;lt=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_controlType",{get:function(){return d},enumerable:!0,configurable:!0}),t}(b);i._InputDateTimeWrapper=lt;d=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.input.InputDateTime);i.InputDateTime=d;g=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype._afterInitializeControl=function(t){n.prototype._afterInitializeControl.call(this,t,"rawValue")},t}(r);i._InputMaskInitializer=g;at=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_initializerType",{get:function(){return g},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_controlType",{get:function(){return nt},enumerable:!0,configurable:!0}),t}(t._ControlWrapper);i._InputMaskWrapper=at;nt=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.input.InputMask);i.InputMask=nt;vt=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_initializerType",{get:function(){return r},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_controlType",{get:function(){return tt},enumerable:!0,configurable:!0}),t}(t._ControlWrapper);i._InputNumberWrapper=vt;tt=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.input.InputNumber);i.InputNumber=tt;yt=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_initializerType",{get:function(){return r},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_controlType",{get:function(){return it},enumerable:!0,configurable:!0}),t}(f);i._InputTimeWrapper=yt;it=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.initialize=function(t){if(t){var i=this,u=15,r=t.itemsSource,f=t.value;r&&(delete t.itemsSource,(r.length||r.itemCount||!r._disableServerRead)&&setTimeout(function(){i.displayMemberPath=null;i.selectedValuePath=null;i.itemsSource=r;f&&(i.value=f)},u));n.prototype.initialize.call(this,t);t.isDroppedDown===!0&&setTimeout(function(){i.isDroppedDown=!0},u)}},t}(n.input.InputTime);i.InputTime=it;pt=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_initializerType",{get:function(){return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_controlType",{get:function(){return u},enumerable:!0,configurable:!0}),t}(t._ControlWrapper);i._ListBoxWrapper=pt;u=function(n){function i(){return n!==null&&n.apply(this,arguments)||this}return __extends(i,n),i.prototype.initialize=function(t){t&&(i._processCheckedFields(t,this,this),n.prototype.initialize.call(this,t))},i._processCheckedFields=function(n,t,r){var u=n.checkedValues,f=n.checkedIndexes,e;(u||f)&&n.itemsSource&&(delete n.checkedValues,delete n.checkedIndexes,n.itemsSource.items.length?n.checkedItems=u?i._valuesToItems(n,u):i._indexesToItems(n.itemsSource.items,f):n.itemsSource._readActionUrl&&(e=function(o){o.itemsSource.items.length&&(t.checkedItems=u?i._valuesToItems(n,u):i._indexesToItems(n.itemsSource.items,f),setTimeout(function(){r.itemsChanged.removeHandler(e)}))},r.itemsChanged.addHandler(e)))},i._valuesToItems=function(n,t){for(var u,f=[],e=n.itemsSource.items,o=i._getValues(e,n),r=0;r<t.length;r++)u=o.indexOf(t[r]),u!=-1&&f.push(e[u]);return f},i._indexesToItems=function(n,t){var i=[];return t.forEach(function(t){return i.push(n[t])}),i},i._getValues=function(n,i){var r=[],u=i.selectedValuePath||i.displayMemberPath;return t.Utils.isObject(n[0])?n.forEach(function(n){return r.push(n[u])}):r=n.slice(),r},i}(n.input.ListBox);i.ListBox=u;wt=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_controlType",{get:function(){return rt},enumerable:!0,configurable:!0}),t}(f);i._MenuWrapper=wt;rt=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.initialize=function(t){if(t){var i=t.owner,r;i&&(r=document.querySelectorAll(i),this._ValidateOwner(r),delete t.owner);n.prototype.initialize.call(this,t)}},t.prototype._ValidateOwner=function(n){for(var t=this,r=t.dropDown,i=0;i<n.length;i++)n[i].addEventListener("contextmenu",function(n){t&&r&&!wijmo.closest(n.target,"[disabled]")&&(n.preventDefault(),t.owner=n.target,t.selectedIndex=-1,t.onIsDroppedDownChanging(new wijmo.CancelEventArgs)&&(wijmo.showPopup(r,n),t.onIsDroppedDownChanged(),r.focus()))})},t}(n.input.Menu);i.Menu=rt;bt=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_controlType",{get:function(){return ut},enumerable:!0,configurable:!0}),t}(t._ControlWrapper);i._PopupWrapper=bt;ut=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.input.Popup);i.Popup=ut;kt=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_controlType",{get:function(){return ft},enumerable:!0,configurable:!0}),t}(f);i._MultiSelectWrapper=kt;ft=function(n){function i(){return n!==null&&n.apply(this,arguments)||this}return __extends(i,n),i.prototype.initialize=function(t){var r,i;t&&(t.validationAttributes&&(this._validationAttributes=t.validationAttributes,delete t.validationAttributes),u._processCheckedFields(t,this,this.listBox),r=t.itemsSource,delete t.itemsSource,i=!1,t.isDroppedDown&&(i=t.isDroppedDown,delete t.isDroppedDown),n.prototype.initialize.call(this,t),r&&(this.itemsSource=r,t.checkedItems&&(this.checkedItems=t.checkedItems),i&&(this.isDroppedDown=i)),this._handleHiddenField())},i.prototype._handleHiddenField=function(){var n=this;n._updateHiddenField();n.checkedItemsChanged.addHandler(function(){n._updateHiddenField();t.Utils.triggerValidationChangeEvent(n._hiddenSelect)})},i.prototype._updateHiddenField=function(){var n=this,t,i,f,e,r=n.itemsSource.items,s=n.checkedItems,h=n._tbx.parentElement,o=n.hostElement.getAttribute("wj-name");if(o&&r&&r.length)for(e=u._getValues(r,n),f=u._getValues(s,n),n._hiddenSelect=h.querySelector("select"),n._hiddenSelect||(n._hiddenSelect=n._createSelect(e,o,n._tbx)),i=n._hiddenSelect.querySelectorAll("option"),t=0;t<i.length;t++)f.indexOf(i[t].value)!=-1?(i[t].setAttribute("selected","selected"),i[t].selected=!0):(i[t].removeAttribute("selected"),i[t].selected=!1)},i.prototype._createSelect=function(n,i,r){var f=this,u,e,o,s;for(u=document.createElement("select"),u.name=i,u.multiple=!0,u.style.visibility="hidden",u.style.position="absolute",e=0;e<n.length;e++)o=document.createElement("option"),o.value=n[e],u.appendChild(o);if(f._validationAttributes)for(s in f._validationAttributes)u.setAttribute(s,f._validationAttributes[s]);return r.parentNode.insertBefore(u,r),t.Utils.forwardValidationEvents(f,r,u),u},i}(n.input.MultiSelect);i.MultiSelect=ft;dt=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_controlType",{get:function(){return ot},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_initializerType",{get:function(){return et},enumerable:!0,configurable:!0}),t}(l);i._MultiAutoCompleteWrapper=dt;et=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype._createHiddenElement=function(){var n=document.createElement("select");return n.name=this.control.hostElement.getAttribute("wj-name"),n.multiple=!0,n.style.visibility="hidden",n.style.position="absolute",n},t.prototype._processOptions=function(i){n.prototype._processOptions.call(this,i);t._processSelectedFields(i,this.control);i.isDroppedDown&&(this._isDroppedDown=i.isDroppedDown,delete i.isDroppedDown)},t.prototype._afterInitializeControl=function(t){n.prototype._afterInitializeControl.call(this,t);var i=this.control;this._isDroppedDown&&(i.isDroppedDown=!0)},t.prototype._updateHiddenField=function(){this._updateHiddenElement();this.control.selectedItemsChanged.addHandler(this._updateHiddenElement.bind(this))},t.prototype._updateHiddenElement=function(){var u=this.control,n=u.selectedItems,r=this._hiddenElement,t,i;if(r.innerHTML="",n&&n.length)for(t=0;t<n.length;t++)i=document.createElement("option"),i.value=n[t],i.setAttribute("selected","selected"),r.appendChild(i)},t._getDisplayText=function(n,t){var i=n;return t&&(i=n[t]),i},t._processSelectedFields=function(n,i){var r=n.selectedValues,u=n.selectedIndexes,f;(r||u)&&n.itemsSource&&(delete n.selectedValues,delete n.selectedIndexes,n.itemsSource.items.length?n.selectedItems=r?t._valuesToItems(n,r):t._indexesToItems(n.itemsSource.items,u):n.itemsSourceFunction&&(f=function(e){e.itemsSource.items.length&&(r||u)&&(i.selectedItems=r?t._valuesToItems(n,r):t._indexesToItems(n.itemsSource.items,u),u=null,r=null,i._lbx.itemsChanged.removeHandler(f))},i._lbx.itemsChanged.addHandler(f)))},t._valuesToItems=function(n,t){for(var f=[],e=n.itemsSource.items,o=u._getValues(e,n),r,i=0;i<t.length;i++)r=o.indexOf(t[i]),r!=-1&&f.push(e[r]);return f},t._indexesToItems=function(n,t){var i=[];return t.forEach(function(t){return i.push(n[t])}),i},t}(s);i._MultiAutoCompleteInitializer=et;ot=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),i.prototype._updateItems=function(){if(this._isFilterOnClient()){t.prototype._updateItems.call(this);return}var i=wijmo.tryCast(this.collectionView,n.mvc.collections.RemoteCollectionView);i&&(this._times=i._queryList.length,i._batchEdit&&i._batchEditActionUrl&&(i.itemsAdded&&i.itemsAdded.length||i.itemsEdited&&i.itemsEdited.length||i.itemsRemoved&&i.itemsRemoved.length)&&this._times++,i.beginQuery.addHandler(this._cvQueryBegin,this),this.collectionView.refresh())},i.prototype._isFilterOnClient=function(){var i=wijmo.tryCast(this.collectionView,n.mvc.collections.RemoteCollectionView),t;return i?i._isDisableServerRead():(t=wijmo.tryCast(this.collectionView,wijmo.odata.ODataCollectionView),t)?!t.filterOnServer:!0},i.prototype._cvQueryBegin=function(){var t=this,n;this._times==0?(n=this.collectionView,window.setTimeout(function(){n.beginQuery.removeHandler(t._cvQueryBegin,t)}),this._isFiltering=!0,n.queryComplete.addHandler(this._cvQueryComplete,this)):this._times>0?this._times--:wijmo.assert(!1,"this handler should be removed.")},i.prototype._cvQueryComplete=function(){var t=this,n=this.collectionView;window.setTimeout(function(){n.queryComplete.removeHandler(t._cvQueryComplete,t)});n.moveCurrentToPosition(-1);this._isFiltering=!1;this.isDroppedDown=n.items.length>0&&this.containsFocus();n.items.length!=0||this.isEditable||(this.selectedIndex=-1);this.refresh()},i.prototype._setText=function(n){this._isFiltering||t.prototype._setText.call(this,n)},i}(n.input.MultiAutoComplete);i.MultiAutoComplete=ot})(i=t.input||(t.input={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.AutoComplete||(n.AutoComplete={}))})(t=n.input||(n.input={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Calendar||(n.Calendar={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ColorPicker||(n.ColorPicker={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ComboBox||(n.ComboBox={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.DropDown||(n.DropDown={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.InputColor||(n.InputColor={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.InputDate||(n.InputDate={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.InputDateTime||(n.InputDateTime={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.InputMask||(n.InputMask={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.InputNumber||(n.InputNumber={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.InputTime||(n.InputTime={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ListBox||(n.ListBox={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Menu||(n.Menu={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.MultiAutoComplete||(n.MultiAutoComplete={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.MultiSelect||(n.MultiSelect={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Popup||(n.Popup={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FormatItemEventArgs||(n.FormatItemEventArgs={}))})(t=n.input||(n.input={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i;!function(t){t[t.None=0]="None",t[t.Value=1]="Value",t[t.MinMax=2]="MinMax",t[t.All=3]="All"}(i=e.ShowText||(e.ShowText={}));var n=function(n){function s(r,o){var a=n.call(this,r,null,!0)||this;a._ranges=new t.collections.ObservableArray,a._rngElements=[],a._format="n0",a._showRanges=!0,a._shadow=!0,a._animated=!0,a._readOnly=!0,a._step=1,a._showText=i.None,a._showTicks=!1,a._thickness=.8,a._initialized=!1,a.valueChanged=new t.Event,a._getPercent=function(t){var e=this.max>this.min?(t-this.min)/(this.max-this.min):0;return Math.max(0,Math.min(1,e))},s._ctr++;var h=a.hostElement;t.setAttribute(h,"role","slider",!0);var u=a.getTemplate();return a.applyTemplate("wj-control wj-gauge",u,{_dSvg:"dsvg",_svg:"svg",_filter:"filter",_gFace:"gface",_gRanges:"granges",_gPointer:"gpointer",_gCover:"gcover",_pFace:"pface",_pPointer:"ppointer",_cValue:"cvalue",_tValue:"value",_tMin:"min",_tMax:"max",_pTicks:"pticks"}),a._filterID="wj-gauge-filter-"+s._ctr.toString(36),a._filter.setAttribute("id",a._filterID),a.face=new e.Range,a.pointer=new e.Range,a._ranges.collectionChanged.addHandler(function(){for(var i=a._ranges,n=0;n<i.length;n++)if(!t.tryCast(i[n],e.Range))throw"ranges array must contain Range objects.";a._rangesDirty=!0,a.invalidate()}),a.addEventListener(h,"keydown",a._keydown.bind(a)),a.addEventListener(h,"click",function(t){0==t.button&&(a.focus(),a._applyMouseValue(t))}),a.addEventListener(h,"mousedown",function(t){0==t.button&&(a.focus(),a._dragging=!0,a._applyMouseValue(t))}),a.addEventListener(h,"mousemove",function(t){a._dragging&&a.containsFocus()&&a._applyMouseValue(t,!0)}),a.addEventListener(h,"mouseup",function(t){a._dragging=!1}),a.addEventListener(h,"mouseleave",function(t){t.target==h&&(a._dragging=!1)}),"ontouchstart"in window&&(a.addEventListener(h,"touchstart",function(t){a.focus(),!t.defaultPrevented&&a._applyMouseValue(t,!0)&&t.preventDefault()}),a.addEventListener(h,"touchmove",function(t){!t.defaultPrevented&&a._applyMouseValue(t,!0)&&t.preventDefault()})),a.addEventListener(h,"wheel",function(e){if(!e.defaultPrevented&&!a.isReadOnly&&a.containsFocus()&&null!=a.value&&a.hitTest(e)){var i=t.clamp(-e.deltaY,-1,1);a.value=t.clamp(a.value+(a.step||1)*i,a.min,a.max),e.preventDefault()}}),a.initialize(o),a.invalidate(),a}return __extends(s,n),Object.defineProperty(s.prototype,"value",{get:function(){return this._pointer.max},set:function(e){e!=this.value&&(this._pointer.max=t.asNumber(e,!0),this._updateAria())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"min",{get:function(){return this._face.min},set:function(e){e!=this.min&&(this._face.min=t.asNumber(e),this._updateAria())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"max",{get:function(){return this._face.max},set:function(e){e!=this.max&&(this._face.max=t.asNumber(e),this._updateAria())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"origin",{get:function(){return this._origin},set:function(e){e!=this._origin&&(this._origin=t.asNumber(e,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isReadOnly",{get:function(){return this._readOnly},set:function(e){this._readOnly=t.asBoolean(e),this._setAttribute(this._svg,"cursor",this._readOnly?null:"pointer"),t.toggleClass(this.hostElement,"wj-state-readonly",this.isReadOnly)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"step",{get:function(){return this._step},set:function(e){e!=this._step&&(this._step=t.asNumber(e,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"format",{get:function(){return this._format},set:function(e){e!=this._format&&(this._format=t.asString(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"getText",{get:function(){return this._getText},set:function(e){e!=this._getText&&(this._getText=t.asFunction(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"thickness",{get:function(){return this._thickness},set:function(e){e!=this._thickness&&(this._thickness=t.clamp(t.asNumber(e,!1),0,1),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"face",{get:function(){return this._face},set:function(i){i!=this._face&&(this._face&&this._face.propertyChanged.removeHandler(this._rangeChanged),this._face=t.asType(i,e.Range),this._face&&this._face.propertyChanged.addHandler(this._rangeChanged,this),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"pointer",{get:function(){return this._pointer},set:function(i){if(i!=this._pointer){var n=null;this._pointer&&(n=this.value,this._pointer.propertyChanged.removeHandler(this._rangeChanged)),this._pointer=t.asType(i,e.Range),this._pointer&&(n&&(this.value=n),this._pointer.propertyChanged.addHandler(this._rangeChanged,this)),this.invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"showText",{get:function(){return this._showText},set:function(e){(e=t.asEnum(e,i))!=this._showText&&(this._showText=e,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"showTicks",{get:function(){return this._showTicks},set:function(e){e!=this._showTicks&&(this._showTicks=t.asBoolean(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"tickSpacing",{get:function(){return this._tickSpacing},set:function(e){e!=this._tickSpacing&&(this._tickSpacing=t.asNumber(e,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"thumbSize",{get:function(){return this._thumbSize},set:function(e){e!=this._thumbSize&&(this._thumbSize=t.asNumber(e,!0,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"showRanges",{get:function(){return this._showRanges},set:function(e){e!=this._showRanges&&(this._showRanges=t.asBoolean(e),this._animColor=null,this._rangesDirty=!0,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasShadow",{get:function(){return this._shadow},set:function(e){e!=this._shadow&&(this._shadow=t.asBoolean(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isAnimated",{get:function(){return this._animated},set:function(e){this._animated=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"ranges",{get:function(){return this._ranges},enumerable:!0,configurable:!0}),s.prototype.onValueChanged=function(t){this.valueChanged.raise(this,t)},s.prototype.refresh=function(t){if(void 0===t&&(t=!0),n.prototype.refresh.call(this,t),this._rangesDirty){this._rangesDirty=!1;for(var e=this._gRanges,s=0;s<this._rngElements.length;s++)this._rngElements[s].rng.propertyChanged.removeHandler(this._rangeChanged);for(;e.lastChild;)e.removeChild(e.lastChild);if(this._rngElements=[],this._showRanges)for(s=0;s<this.ranges.length;s++){var r=this.ranges[s];r.propertyChanged.addHandler(this._rangeChanged,this),this._rngElements.push({rng:r,el:this._createElement("path",e)})}}this._showElement(this._tValue,0!=(this.showText&i.Value)),this._showElement(this._tMin,0!=(this.showText&i.MinMax)),this._showElement(this._tMax,0!=(this.showText&i.MinMax)),this._showElement(this._cValue,0!=(this.showText&i.Value)||this._thumbSize>0),this._updateText();var o=this._getFilterUrl();this._setAttribute(this._pFace,"filter",o),this._setAttribute(this._pPointer,"filter",o),this._updateRange(this._face),this._updateRange(this._pointer),this._updateTicks();for(s=0;s<this.ranges.length;s++)this._updateRange(this.ranges[s]);this._initialized=!0},s.prototype.hitTest=function(e,i){t.isNumber(e)&&t.isNumber(i)?e=new t.Point(e,i):e instanceof t.Point||(e=t.mouseToPage(e)),e=t.asType(e,t.Point);var n=t.Rect.fromBoundingRect(this._dSvg.getBoundingClientRect());return e.x-=n.left+pageXOffset,e.y-=n.top+pageYOffset,this._getValueFromPoint(e)},s._getBBox=function(t){try{return t.getBBox()}catch(t){return{x:0,y:0,width:0,height:0}}},s.prototype._getFilterUrl=function(){return this.hasShadow?"url(#"+this._filterID+")":null},s.prototype._getRangeElement=function(t){if(t==this._face)return this._pFace;if(t==this._pointer)return this._pPointer;for(var e=0;e<this._rngElements.length;e++){var i=this._rngElements[e];if(i.rng==t)return i.el}return null},s.prototype._rangeChanged=function(e,i){var n=this;if(e==this._pointer&&"max"==i.propertyName&&(this.onValueChanged(),this._updateText()),e!=this._face)if(e==this._pointer&&"max"==i.propertyName&&(this._animInterval&&clearInterval(this._animInterval),this.isAnimated&&!this.isUpdating&&this._initialized)){var s=this._getPointerColor(i.oldValue),r=this._getPointerColor(i.newValue),o=s?new t.Color(s):null,a=r?new t.Color(r):null;this._animInterval=t.animate(function(s){n._animColor=o&&a?t.Color.interpolate(o,a,s).toString():null,n._updateRange(e,i.oldValue+s*(i.newValue-i.oldValue)),s>=1&&(n._animColor=null,n._animInterval=null,n._updateRange(e),n._updateText())})}else this._updateRange(e);else this.invalidate()},s.prototype._createElement=function(t,e,i){var n=document.createElementNS(s._SVGNS,t);return i&&n.setAttribute("class",i),e.appendChild(n),n},s.prototype._centerText=function(e,i,n){if("none"!=e.getAttribute("display")){var r=t.Globalize.format(i,this.format);if(t.isFunction(this.getText)){var o=e==this._tValue?"value":e==this._tMin?"min":e==this._tMax?"max":null;t.assert(null!=o,"unknown element"),r=this.getText(this,o,i,r)}e.textContent=r;var a=t.Rect.fromBoundingRect(s._getBBox(e)),h=n.x-a.width/2,u=n.y+a.height/4;e.setAttribute("x",this._fix(h)),e.setAttribute("y",this._fix(u))}},s.prototype._copy=function(i,n){if("ranges"==i){for(var s=t.asArray(n),r=0;r<s.length;r++){var o=new e.Range;t.copy(o,s[r]),this.ranges.push(o)}return!0}return"pointer"==i&&(t.copy(this.pointer,n),!0)},s.prototype._showElement=function(t,e){this._setAttribute(t,"display",e?"":"none")},s.prototype._setAttribute=function(t,e,i){i?t.setAttribute(e,i):t.removeAttribute(e)},s.prototype._updateRange=function(t,e){void 0===e&&(e=t.max),t==this._pointer&&(t.min=null!=this.origin?this.origin:this.min<0&&this.max>0?0:this.min);var i=this._getRangeElement(t);if(i){this._updateRangeElement(i,t,e);var n=t.color;t==this._pointer&&(n=this._animColor?this._animColor:this._getPointerColor(t.max)),this._setAttribute(i,"style",n?"fill:"+n:null)}},s.prototype._getPointerColor=function(t){if(!this._showRanges){for(var e,i=0;i<this._ranges.length;i++){var n=this._ranges[i];if(t>=n.min&&t<=n.max){e=n;break}}if(e)return e.color}return this._pointer.color},s.prototype._keydown=function(e){if(!this._readOnly&&this._step){var i=!0;switch(this._getKey(e.keyCode)){case t.Key.Left:case t.Key.Down:this.value=t.clamp(this.value-this.step,this.min,this.max);break;case t.Key.Right:case t.Key.Up:this.value=t.clamp(this.value+this.step,this.min,this.max);break;case t.Key.Home:this.value=this.min;break;case t.Key.End:this.value=this.max;break;default:i=!1}i&&e.preventDefault()}},s.prototype._getKey=function(t){return t},s.prototype._applyMouseValue=function(e,i){if(!this.isReadOnly&&this.containsFocus()){var n=this.hitTest(e);if(null!=n){var s=this._animated;return i&&(this._animated=!1),null!=this._step&&(n=Math.round(n/this._step)*this._step),this.value=t.clamp(n,this.min,this.max),this._animated=s,!0}}return!1},s.prototype._updateRangeElement=function(e,i,n){t.assert(!1,"Gauge is an abstract class.")},s.prototype._updateText=function(){t.assert(!1,"Gauge is an abstract class.")},s.prototype._updateTicks=function(){t.assert(!1,"Gauge is an abstract class.")},s.prototype._getValueFromPoint=function(t){return null},s.prototype._fix=function(e){return t.isNumber(e)?parseFloat(e.toFixed(4)).toString():this._fix(e.x)+" "+this._fix(e.y)},s.prototype._updateAria=function(){var e=this.hostElement;e&&(t.setAttribute(e,"aria-valuemin",this.min),t.setAttribute(e,"aria-valuemax",this.max),t.setAttribute(e,"aria-valuenow",this.value))},s._SVGNS="http://www.w3.org/2000/svg",s._ctr=0,s.controlTemplate='<div wj-part="dsvg" style="width:100%;height:100%"><svg wj-part="svg" width="100%" height="100%" style="overflow:visible"><defs><filter wj-part="filter"><feOffset dx="3" dy="3"></feOffset><feGaussianBlur result="offset-blur" stdDeviation="5"></feGaussianBlur><feComposite operator="out" in="SourceGraphic" in2="offset-blur" result="inverse"></feComposite><feFlood flood-color="black" flood-opacity="0.2" result="color"></feFlood><feComposite operator="in" in="color" in2="inverse" result="shadow"></feComposite><feComposite operator="over" in="shadow" in2="SourceGraphic"></feComposite></filter></defs><g wj-part="gface" class="wj-face" style="cursor:inherit"><path wj-part="pface"/></g><g wj-part="granges" class="wj-ranges" style="cursor:inherit"/><g wj-part="gpointer" class="wj-pointer" style="cursor:inherit"><path wj-part="ppointer"/></g><g wj-part="gcover" class="wj-cover" style="cursor:inherit"><path wj-part="pticks" class="wj-ticks"/><circle wj-part="cvalue" class="wj-pointer wj-thumb"/><text wj-part="value" class="wj-value"/><text wj-part="min" class="wj-min" aria-hidden="true"/><text wj-part="max" class="wj-max" aria-hidden="true"/></g></svg></div>',s}(t.Control);e.Gauge=n}(t.gauge||(t.gauge={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i;!function(t){t[t.Right=0]="Right",t[t.Left=1]="Left",t[t.Up=2]="Up",t[t.Down=3]="Down"}(i=e.GaugeDirection||(e.GaugeDirection={}));var n=function(n){function s(e,s){var r=n.call(this,e,null)||this;return r._direction=i.Right,t.addClass(r.hostElement,"wj-lineargauge"),r.initialize(s),r}return __extends(s,n),Object.defineProperty(s.prototype,"direction",{get:function(){return this._direction},set:function(e){(e=t.asEnum(e,i))!=this._direction&&(this._direction=e,this.invalidate())},enumerable:!0,configurable:!0}),s.prototype._updateRangeElement=function(n,s,r){var o=this._getRangeRect(s,r);this._updateSegment(n,o);var a=s==this._pointer&&0!=(this.showText&e.ShowText.Value),h=a||s==this._pointer&&this.thumbSize>0,u=o.left+o.width/2,c=o.top+o.height/2;switch(this._getDirection()){case i.Right:u=o.right;break;case i.Left:u=o.left;break;case i.Up:c=o.top;break;case i.Down:c=o.bottom}if(a&&this._centerText(this._tValue,r,new t.Point(u,c)),a||h){o=t.Rect.fromBoundingRect(e.Gauge._getBBox(this._tValue));var l=this._animColor?this._animColor:this._getPointerColor(s.max),g=null!=this.thumbSize?this.thumbSize/2:.8*Math.max(o.width,o.height),_=this._cValue;this._setAttribute(_,"cx",this._fix(u)),this._setAttribute(_,"cy",this._fix(c)),this._setAttribute(_,"style",l?"fill:"+l:null),this._setAttribute(_,"r",this._fix(g))}},s.prototype._updateText=function(){var t=this._getRangeRect(this._face);switch(this._getDirection()){case i.Right:this._setText(this._tMin,this.min,t,"left"),this._setText(this._tMax,this.max,t,"right");break;case i.Left:this._setText(this._tMin,this.min,t,"right"),this._setText(this._tMax,this.max,t,"left");break;case i.Up:this._setText(this._tMin,this.min,t,"bottom"),this._setText(this._tMax,this.max,t,"top");break;case i.Down:this._setText(this._tMin,this.min,t,"top"),this._setText(this._tMax,this.max,t,"bottom")}},s.prototype._updateTicks=function(){var t=this.tickSpacing&&this.tickSpacing>0?this.tickSpacing:this.step,e="";if(this.showTicks&&t>0)for(var n=this._getRangeRect(this._face),s=void 0,r=this.min+t;r<this.max;r+=t)switch(this._getDirection()){case i.Right:e+="M "+(s=this._fix(n.left+n.width*this._getPercent(r)))+" "+this._fix(n.top)+" L "+s+" "+this._fix(n.bottom)+" ";break;case i.Left:e+="M "+(s=this._fix(n.right-n.width*this._getPercent(r)))+" "+n.top.toFixed(2)+" L "+s+" "+n.bottom.toFixed(2)+" ";break;case i.Up:s=(n.bottom-n.height*this._getPercent(r)).toFixed(2),e+="M "+this._fix(n.left)+" "+s+" L "+this._fix(n.right)+" "+s+" ";break;case i.Down:s=(n.top+n.height*this._getPercent(r)).toFixed(2),e+="M "+n.left.toFixed(2)+" "+s+" L "+n.right.toFixed(2)+" "+s+" "}this._pTicks.setAttribute("d",e)},s.prototype._updateSegment=function(e,i){var n={p1:this._fix(new t.Point(i.left,i.top)),p2:this._fix(new t.Point(i.right,i.top)),p3:this._fix(new t.Point(i.right,i.bottom)),p4:this._fix(new t.Point(i.left,i.bottom))},s=t.format("M {p1} L {p2} L {p3} L {p4} Z",n);e.setAttribute("d",s)},s.prototype._setText=function(i,n,s,r){if("none"!=i.getAttribute("display")){var o=t.Globalize.format(n,this.format);if(t.isFunction(this.getText)){var a=i==this._tValue?"value":i==this._tMin?"min":i==this._tMax?"max":null;t.assert(null!=a,"unknown element"),o=this.getText(this,a,n,o)}i.textContent=o;var h=t.Rect.fromBoundingRect(e.Gauge._getBBox(i)),u=new t.Point(s.left+s.width/2-h.width/2,s.top+s.height/2+h.height/2);switch(r){case"top":u.y=s.top-4;break;case"left":u.x=s.left-4-h.width;break;case"right":u.x=s.right+4;break;case"bottom":u.y=s.bottom+4+h.height}i.setAttribute("x",this._fix(u.x)),i.setAttribute("y",this._fix(u.y))}},s.prototype._getRangeRect=function(n,s){void 0===s&&(s=n.max);var r=new t.Rect(0,0,this.hostElement.clientWidth,this.hostElement.clientHeight),o=this.thumbSize?Math.ceil(this.thumbSize/2):0;if(this.showText!=e.ShowText.None){var a=parseInt(getComputedStyle(this.hostElement).fontSize);isNaN(a)||(o=Math.max(o,3*a))}switch(this._getDirection()){case i.Right:case i.Left:r=r.inflate(-o,-r.height*(1-this.thickness*n.thickness)/2);break;case i.Up:case i.Down:r=r.inflate(-r.width*(1-this.thickness*n.thickness)/2,-o)}var h=n==this._face,u=h?0:this._getPercent(n.min),c=h?1:this._getPercent(s);switch(this._getDirection()){case i.Right:r.left+=r.width*u,r.width*=c-u;break;case i.Left:r.left=r.right-r.width*c,r.width=r.width*(c-u);break;case i.Down:r.top+=r.height*u,r.height*=c-u;break;case i.Up:r.top=r.bottom-r.height*c,r.height=r.height*(c-u)}return r},s.prototype._getValueFromPoint=function(t){var e=this._getRangeRect(this._face),n=0;switch(this._getDirection()){case i.Right:n=e.width>0?(t.x-e.left)/e.width:0;break;case i.Left:n=e.width>0?(e.right-t.x)/e.width:0;break;case i.Up:n=e.height>0?(e.bottom-t.y)/e.height:0;break;case i.Down:n=e.height>0?(t.y-e.top)/e.height:0}return this.min+n*(this.max-this.min)},s.prototype._getDirection=function(){var t=this._direction;if(this.rightToLeft)switch(t){case i.Left:t=i.Right;break;case i.Right:t=i.Left}return t},s.prototype._getKey=function(e){switch(this._getDirection()){case i.Left:switch(e){case t.Key.Left:e=t.Key.Right;break;case t.Key.Right:e=t.Key.Left}break;case i.Down:switch(e){case t.Key.Up:e=t.Key.Down;break;case t.Key.Down:e=t.Key.Up}}return e},s}(e.Gauge);e.LinearGauge=n}(t.gauge||(t.gauge={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(i){function n(n,s){var r=i.call(this,n,null)||this;return r._startAngle=0,r._sweepAngle=180,r._autoScale=!0,t.addClass(r.hostElement,"wj-radialgauge"),r._thickness=.4,r.showText=e.ShowText.All,r.initialize(s),r}return __extends(n,i),Object.defineProperty(n.prototype,"startAngle",{get:function(){return this._startAngle},set:function(e){e!=this._startAngle&&(this._startAngle=t.clamp(t.asNumber(e,!1),-360,360),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sweepAngle",{get:function(){return this._sweepAngle},set:function(e){e!=this._sweepAngle&&(this._sweepAngle=t.clamp(t.asNumber(e,!1),-360,360),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"autoScale",{get:function(){return this._autoScale},set:function(e){e!=this._autoScale&&(this._autoScale=t.asBoolean(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"clientSize",{get:function(){var e=this._rcSvg;return e?new t.Size(e.width,e.height):null},enumerable:!0,configurable:!0}),n.prototype.refresh=function(n){if(void 0===n&&(n=!0),this._setAttribute(this._svg,"viewBox",null),this._rcSvg=t.Rect.fromBoundingRect(this._dSvg.getBoundingClientRect()),i.prototype.refresh.call(this,n),this._ctmInv=null,this._ptSvg=null,this._autoScale){this._setAttribute(this._svg,"viewBox","");var s=t.Rect.fromBoundingRect(e.Gauge._getBBox(this._pFace));0!=(this.showText&e.ShowText.Value)&&(s=t.Rect.union(s,t.Rect.fromBoundingRect(e.Gauge._getBBox(this._tValue)))),0!=(this.showText&e.ShowText.MinMax)&&(s=t.Rect.union(s,t.Rect.fromBoundingRect(e.Gauge._getBBox(this._tMin))),s=t.Rect.union(s,t.Rect.fromBoundingRect(e.Gauge._getBBox(this._tMax))));var r=[this._fix(s.left),this._fix(s.top),this._fix(s.width),this._fix(s.height)].join(" ");this._setAttribute(this._svg,"viewBox",r);var o=this._pFace.getCTM();this._ctmInv=o?o.inverse():null,this._ptSvg=this._svg.createSVGPoint()}},n.prototype._updateRangeElement=function(e,i,n){if(this._rcSvg){var s=this._rcSvg,r=new t.Point(s.width/2,s.height/2),o=Math.min(s.width,s.height)/2,a=o*this.thickness,h=a*i.thickness,u=o-(a-h)/2,c=u-h,l=this.startAngle+180,g=this.sweepAngle,_=i==this._face,p=_?0:this._getPercent(i.min),f=l+g*p,d=g*((_?1:this._getPercent(n))-p);if(this._updateSegment(e,r,u,c,f,d),i==this._pointer&&this.thumbSize>0){var m=this._animColor?this._animColor:this._getPointerColor(i.max),b=this._getPoint(r,l+g*this._getPercent(n),(u+c)/2),y=this._cValue;this._setAttribute(y,"cx",this._fix(b.x)),this._setAttribute(y,"cy",this._fix(b.y)),this._setAttribute(y,"style",m?"fill:"+m:null),this._setAttribute(y,"r",this._fix(this.thumbSize/2))}}},n.prototype._updateText=function(){if(this._rcSvg){var i=this._rcSvg,n=new t.Point(i.width/2,i.height/2),s=Math.min(i.width,i.height)/2,r=Math.max(0,s*(1-this.thickness)),o=this.startAngle+180,a=this.sweepAngle;this._showElement(this._cValue,this.thumbSize>0);var h=0!=(this.showText&e.ShowText.MinMax)&&Math.abs(a)<=300;this._showElement(this._tMin,h),this._showElement(this._tMax,h),this._centerText(this._tValue,this.value,n);var u=10*(this.sweepAngle<0?-1:1);this._centerText(this._tMin,this.min,this._getPoint(n,o-u,(s+r)/2)),this._centerText(this._tMax,this.max,this._getPoint(n,o+a+u,(s+r)/2))}},n.prototype._updateTicks=function(){var e=this.tickSpacing&&this.tickSpacing>0?this.tickSpacing:this.step,i="";if(this.showTicks&&e>0)for(var n=this._rcSvg,s=new t.Point(n.width/2,n.height/2),r=Math.min(n.width,n.height)/2,o=r*this.thickness,a=o*this._face.thickness,h=r-(o-a)/2,u=h-a,c=this.min+e;c<this.max;c+=e){var l=this.startAngle+180+this.sweepAngle*this._getPercent(c);i+="M "+this._fix(this._getPoint(s,l,u))+" L "+this._fix(this._getPoint(s,l,h))+" "}this._pTicks.setAttribute("d",i)},n.prototype._updateSegment=function(e,i,n,s,r,o){o=Math.min(Math.max(o,-359.99),359.99);var a=this._getPoint(i,r,s),h=this._getPoint(i,r,n),u=this._getPoint(i,r+o,n),c=this._getPoint(i,r+o,s),l={large:Math.abs(o)>180?1:0,cw:o>0?1:0,ccw:o>0?0:1,or:this._fix(n),ir:this._fix(s),p1:this._fix(a),p2:this._fix(h),p3:this._fix(u),p4:this._fix(c)},g=t.format("M {p1} L {p2} A {or} {or} 0 {large} {cw} {p3} L {p4} A {ir} {ir} 0 {large} {ccw} {p1} Z",l);e.setAttribute("d",g)},n.prototype._getPoint=function(e,i,n){return i=i*Math.PI/180,new t.Point(e.x+n*Math.cos(i),e.y+n*Math.sin(i))},n.prototype._getValueFromPoint=function(e){if(this.autoScale&&this._ctmInv&&(this._ptSvg.x=e.x,this._ptSvg.y=e.y,this._ptSvg=this._ptSvg.matrixTransform(this._ctmInv),e.x=this._ptSvg.x,e.y=this._ptSvg.y),!this._rcSvg)return null;var i=this._rcSvg,n=new t.Point(i.width/2,i.height/2),s=Math.min(i.width,i.height)/2,r=s*(1-this.thickness),o=e.x-n.x,a=e.y-n.y,h=a*a+o*o;if(h>s*s+16||h<r*r-16)return null;var u=180*(Math.PI-Math.atan2(-a,o))/Math.PI,c=this.startAngle,l=this.sweepAngle;if(l>0){for(;u<c;)u+=360;for(;u>c+l;)u-=360}else{for(;u<c+l;)u+=360;for(;u>c;)u-=360}var g=Math.abs(u-c)/Math.abs(l);return this.min+g*(this.max-this.min)},n}(e.Gauge);e.RadialGauge=i}(t.gauge||(t.gauge={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(i){function n(n,s){var r=i.call(this,n,null)||this;return t.addClass(r.hostElement,"wj-bulletgraph"),r._pointer.thickness=.35,r._rngTarget=new e.Range("target"),r._rngTarget.thickness=.8,r._rngTarget.color="black",r._rngGood=new e.Range("good"),r._rngGood.color="rgba(0,0,0,.15)",r._rngBad=new e.Range("bad"),r._rngBad.color="rgba(0,0,0,.3)",r.ranges.push(r._rngBad),r.ranges.push(r._rngGood),r.ranges.push(r._rngTarget),r.initialize(s),r}return __extends(n,i),Object.defineProperty(n.prototype,"target",{get:function(){return this._rngTarget.max},set:function(t){this._rngTarget.max=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"good",{get:function(){return this._rngGood.max},set:function(t){this._rngGood.max=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bad",{get:function(){return this._rngBad.max},set:function(t){this._rngBad.max=t},enumerable:!0,configurable:!0}),n.prototype._getRangeRect=function(t,n){void 0===n&&(n=t.max);var s=i.prototype._getRangeRect.call(this,t,n);if(t==this._rngTarget)switch(this.direction){case e.GaugeDirection.Right:s.left=s.right-1,s.width=3;break;case e.GaugeDirection.Left:s.width=3;break;case e.GaugeDirection.Up:s.height=3;break;case e.GaugeDirection.Down:s.top=s.bottom-1,s.height=3}return s},n}(e.LinearGauge);e.BulletGraph=i}(t.gauge||(t.gauge={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var i=function(){function e(e){this._min=0,this._max=100,this._thickness=1,this.propertyChanged=new t.Event,t.isString(e)?this._name=e:e&&t.copy(this,e)}return Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(e){this._setProp("_min",t.asNumber(e,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(e){this._setProp("_max",t.asNumber(e,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){this._setProp("_color",t.asString(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"thickness",{get:function(){return this._thickness},set:function(e){this._setProp("_thickness",t.clamp(t.asNumber(e),0,1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._setProp("_name",t.asString(e))},enumerable:!0,configurable:!0}),e.prototype.onPropertyChanged=function(t){this.propertyChanged.raise(this,t)},e.prototype._setProp=function(e,i){var n=this[e];if(i!=n){this[e]=i;var s=new t.PropertyChangedEventArgs(e.substr(1),n,i);this.onPropertyChanged(s)}},e._ctr=0,e}();e.Range=i}(t.gauge||(t.gauge={}))}(wijmo||(wijmo={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var r=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.gauge.BulletGraph),t,i;n.BulletGraph=r;t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.gauge.LinearGauge);n.LinearGauge=t;i=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.gauge.RadialGauge);n.RadialGauge=i})(t=n.gauge||(n.gauge={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(i){var s=function(t){function i(){var n=t!==null&&t.apply(this,arguments)||this;return n._rangesProps=[],n}return __extends(i,t),i.prototype._beforeInitializeControl=function(t){var f=this,r,s,i="propertyChanged",e=t.pointer,o=t.face,u=t.ranges;for(e&&(n._addEvent(f.control.pointer[i],e[i]),delete e[i]),o&&(n._addEvent(f.control.face[i],o[i]),delete o[i]),s=u?u.length:0,r=0;r<s;r++)u&&(f._rangesProps.push(u[r][i]),delete u[r][i])},i.prototype._afterInitializeControl=function(){for(var i=this,r=i._rangesProps,u=r.length,t=0;t<u;t++)n._addEvent(i.control.ranges[t]["propertyChanged"],r[t])},i}(n.mvc._Initializer),r,u,f,h,e,c,o;i._Initializer=s;r=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_initializerType",{get:function(){return s},enumerable:!0,configurable:!0}),t}(t._ControlWrapper);i._GaugeWrapper=r;u=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_controlType",{get:function(){return f},enumerable:!0,configurable:!0}),t}(r);i._LinearGaugeWrapper=u;f=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.gauge.LinearGauge);i.LinearGauge=f;h=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_controlType",{get:function(){return e},enumerable:!0,configurable:!0}),t}(u);i._BulletGraphWrapper=h;e=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.gauge.BulletGraph);i.BulletGraph=e;c=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_controlType",{get:function(){return o},enumerable:!0,configurable:!0}),t}(r);i._RadialGaugeWrapper=c;o=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.gauge.RadialGauge);i.RadialGauge=o})(i=t.gauge||(t.gauge={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.BulletGraph||(n.BulletGraph={}))})(t=n.gauge||(n.gauge={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Gauge||(n.Gauge={}))})(t=n.gauge||(n.gauge={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.LinearGauge||(n.LinearGauge={}))})(t=n.gauge||(n.gauge={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.RadialGauge||(n.RadialGauge={}))})(t=n.gauge||(n.gauge={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Range||(n.Range={}))})(t=n.gauge||(n.gauge={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}();wijmo.culture.FlexGrid=window.wijmo.culture.FlexGrid||{groupHeaderFormat:"{name}: <b>{value}</b> ({count:n0} items)"};var wijmo;!function(e){!function(t){"use strict";var i;!function(e){e[e.None=0]="None",e[e.Column=1]="Column",e[e.Row=2]="Row",e[e.All=3]="All"}(i=t.HeadersVisibility||(t.HeadersVisibility={}));var o=function(o){function n(n,r){var s=o.call(this,n,null,!0)||this;s._szClient=new e.Size(0,0),s._ptScrl=new e.Point(0,0),s._cellPadding=3,s._clipToScreen=!1,s._autoGenCols=!0,s._autoClipboard=!0,s._autoScroll=!0,s._readOnly=!1,s._indent=14,s._autoSizeMode=t.AutoSizeMode.Both,s._hdrVis=i.All,s._alSorting=!0,s._alAddNew=!1,s._alDelete=!1,s._alResizing=t.AllowResizing.Columns,s._alDragging=t.AllowDragging.Columns,s._alMerging=t.AllowMerging.None,s._ssHdr=i.None,s._shSort=!0,s._shGroups=!0,s._shAlt=!0,s._shErr=!0,s._shDropDown=!0,s._valEdt=!0,s._deferResizing=!1,s._pSel=!0,s._pOutline=!0,s._vt=0,s.itemsSourceChanging=new e.Event,s.itemsSourceChanged=new e.Event,s.scrollPositionChanged=new e.Event,s.selectionChanging=new e.Event,s.selectionChanged=new e.Event,s.loadingRows=new e.Event,s.loadedRows=new e.Event,s.updatingLayout=new e.Event,s.updatedLayout=new e.Event,s.resizingColumn=new e.Event,s.resizedColumn=new e.Event,s.autoSizingColumn=new e.Event,s.autoSizedColumn=new e.Event,s.draggingColumn=new e.Event,s.draggingColumnOver=new e.Event,s.draggedColumn=new e.Event,s.resizingRow=new e.Event,s.resizedRow=new e.Event,s.autoSizingRow=new e.Event,s.autoSizedRow=new e.Event,s.draggingRow=new e.Event,s.draggingRowOver=new e.Event,s.draggedRow=new e.Event,s.groupCollapsedChanging=new e.Event,s.groupCollapsedChanged=new e.Event,s.sortingColumn=new e.Event,s.sortedColumn=new e.Event,s.beginningEdit=new e.Event,s.prepareCellForEdit=new e.Event,s.cellEditEnding=new e.Event,s.cellEditEnded=new e.Event,s.rowEditStarting=new e.Event,s.rowEditStarted=new e.Event,s.rowEditEnding=new e.Event,s.rowEditEnded=new e.Event,s.rowAdded=new e.Event,s.deletingRow=new e.Event,s.deletedRow=new e.Event,s.copying=new e.Event,s.copied=new e.Event,s.pasting=new e.Event,s.pasted=new e.Event,s.pastingCell=new e.Event,s.pastedCell=new e.Event,s.formatItem=new e.Event,s.updatingView=new e.Event,s.updatedView=new e.Event,s._mappedColumns=null;var l=s.hostElement;e.isIE()&&(l.style.borderRadius="0px");var a=s.getTemplate();s.applyTemplate("wj-control wj-content wj-flexgrid",a,{_root:"root",_eSz:"sz",_eCt:"cells",_fCt:"fcells",_eTL:"tl",_eBL:"bl",_eCHdr:"ch",_eRHdr:"rh",_eCFtr:"cf",_eTLCt:"tlcells",_eBLCt:"blcells",_eCHdrCt:"chcells",_eCFtrCt:"cfcells",_eRHdrCt:"rhcells",_eMarquee:"marquee",_eFocus:"focus"}),s._tabIndex=l.tabIndex,l.tabIndex=-1;var c=s._getDefaultRowHeight();return s.deferUpdate(function(){s._rows=new t.RowCollection(s,c),s._cols=new t.ColumnCollection(s,4*c),s._hdrRows=new t.RowCollection(s,c),s._hdrCols=new t.ColumnCollection(s,Math.round(1.25*c)),s._ftrRows=new t.RowCollection(s,c),s._gpTL=new t.GridPanel(s,t.CellType.TopLeft,s._hdrRows,s._hdrCols,s._eTLCt),s._gpCHdr=new t.GridPanel(s,t.CellType.ColumnHeader,s._hdrRows,s._cols,s._eCHdrCt),s._gpRHdr=new t.GridPanel(s,t.CellType.RowHeader,s._rows,s._hdrCols,s._eRHdrCt),s._gpCells=new t.GridPanel(s,t.CellType.Cell,s._rows,s._cols,s._eCt),s._gpBL=new t.GridPanel(s,t.CellType.BottomLeft,s._ftrRows,s._hdrCols,s._eBLCt),s._gpCFtr=new t.GridPanel(s,t.CellType.ColumnFooter,s._ftrRows,s._cols,s._eCFtrCt),s._hdrRows.push(new t.Row),s._hdrCols.push(new t.Column),s._hdrCols[0].align="center",s._cf=new t.CellFactory,s._keyHdl=new t._KeyboardHandler(s),s._mouseHdl=new t._MouseHandler(s),s._edtHdl=new t._EditHandler(s),s._selHdl=new t._SelectionHandler(s),s._addHdl=new t._AddNewHandler(s),s._mrgMgr=new t.MergeManager(s),s._bndSortConverter=s._sortConverter.bind(s),s._bndScroll=s._scroll.bind(s),e.setAttribute(s.cells.hostElement,"role","grid"),s.selectionMode=t.SelectionMode.CellRange,s.initialize(r)}),s.addEventListener(s._root,"scroll",function(e){s._updateScrollPosition()&&(s.finishEditing(),s._updateContent(!0))}),s.addEventListener(l,"focus",function(e){if(l.tabIndex>-1){var t=e.target;if(t instanceof HTMLElement&&t.tabIndex<0)return void s._setFocus(!0)}},!0),s}return __extends(n,o),n.prototype._handleResize=function(){this._rcBounds=null,o.prototype._handleResize.call(this)},Object.defineProperty(n.prototype,"headersVisibility",{get:function(){return this._hdrVis},set:function(t){(t=e.asEnum(t,i))!=this._hdrVis&&(this._hdrVis=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"stickyHeaders",{get:function(){return this._stickyHdr},set:function(t){t!=this._stickyHdr&&(this._stickyHdr=e.asBoolean(t),this._updateStickyHeaders(),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"preserveSelectedState",{get:function(){return this._pSel},set:function(t){this._pSel=e.asBoolean(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"preserveOutlineState",{get:function(){return this._pOutline},set:function(t){this._pOutline=e.asBoolean(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"virtualizationThreshold",{get:function(){return this._vt},set:function(t){this._vt=e.asNumber(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"autoGenerateColumns",{get:function(){return this._autoGenCols},set:function(t){this._autoGenCols=e.asBoolean(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"autoClipboard",{get:function(){return this._autoClipboard},set:function(t){this._autoClipboard=e.asBoolean(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"autoScroll",{get:function(){return this._autoScroll},set:function(t){this._autoScroll=e.asBoolean(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"columnLayout",{get:function(){for(var i=n._getSerializableProperties(t.Column),o=new t.Column,r=[],s=0;s<this.columns.length;s++){for(var l=this.columns[s],a={},c=0;c<i.length;c++){var h=i[c],u=l[h];u!=o[h]&&e.isPrimitive(u)&&"size"!=h&&(a[h]=u)}r.push(a)}return JSON.stringify({columns:r})},set:function(t){var i=JSON.parse(e.asString(t));if(!i||null==i.columns)throw"Invalid columnLayout data.";this.columns.clear(),this.initialize(i)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isReadOnly",{get:function(){return this._readOnly},set:function(t){t!=this._readOnly&&(this._readOnly=e.asBoolean(t),this.finishEditing(),this.invalidate(!0),this._addHdl.updateNewRowTemplate(),e.toggleClass(this.hostElement,"wj-state-readonly",this.isReadOnly),this._setAria("readonly",this.isReadOnly?"true":null))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imeEnabled",{get:function(){return null!=this._imeHdl},set:function(e){e!=this.imeEnabled&&(this._imeHdl&&(this._imeHdl.dispose(),this._imeHdl=null),e&&(this._imeHdl=new t._ImeHandler(this)))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"allowResizing",{get:function(){return this._alResizing},set:function(i){this._alResizing=e.asEnum(i,t.AllowResizing)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"deferResizing",{get:function(){return this._deferResizing},set:function(t){this._deferResizing=e.asBoolean(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"autoSizeMode",{get:function(){return this._autoSizeMode},set:function(i){this._autoSizeMode=e.asEnum(i,t.AutoSizeMode)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"quickAutoSize",{get:function(){return this._quickSize},set:function(t){this._quickSize=e.asBoolean(t,!0)},enumerable:!0,configurable:!0}),n.prototype._getQuickAutoSize=function(){return e.isBoolean(this._quickSize)?this._quickSize:!this.formatItem.hasHandlers&&null==this.itemFormatter},Object.defineProperty(n.prototype,"allowSorting",{get:function(){return this._alSorting},set:function(t){this._alSorting=e.asBoolean(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"allowAddNew",{get:function(){return this._alAddNew},set:function(t){t!=this._alAddNew&&(this._alAddNew=e.asBoolean(t),this._addHdl.updateNewRowTemplate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"newRowAtTop",{get:function(){return this._addHdl.newRowAtTop},set:function(t){this._addHdl.newRowAtTop=e.asBoolean(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"allowDelete",{get:function(){return this._alDelete},set:function(t){t!=this._alDelete&&(this._alDelete=e.asBoolean(t))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"allowMerging",{get:function(){return this._alMerging},set:function(i){(i=e.asEnum(i,t.AllowMerging))!=this._alMerging&&(this._alMerging=i,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showSelectedHeaders",{get:function(){return this._ssHdr},set:function(t){(t=e.asEnum(t,i))!=this._ssHdr&&(this._ssHdr=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showMarquee",{get:function(){return!this._eMarquee.style.display},set:function(t){if(t!=this.showMarquee){var i=this._eMarquee.style;i.visibility="collapse",i.display=e.asBoolean(t)?"":"none",this.invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showSort",{get:function(){return this._shSort},set:function(t){t!=this._shSort&&(this._shSort=e.asBoolean(t),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showGroups",{get:function(){return this._shGroups},set:function(t){t!=this._shGroups&&(this._shGroups=e.asBoolean(t),this._bindGrid(!1))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showAlternatingRows",{get:function(){return this._shAlt},set:function(t){t!=this._shAlt&&(this._shAlt=e.asBoolean(t),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showErrors",{get:function(){return this._shErr},set:function(t){t!=this._shErr&&(this._clearCells(),this._shErr=e.asBoolean(t))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"itemValidator",{get:function(){return this._itemValidator},set:function(t){t!=this.itemValidator&&(this._itemValidator=e.asFunction(t),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"validateEdits",{get:function(){return this._valEdt},set:function(t){this._valEdt=e.asBoolean(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"groupHeaderFormat",{get:function(){return this._gHdrFmt},set:function(t){t!=this._gHdrFmt&&(this._gHdrFmt=e.asString(t),this._bindGrid(!1))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"allowDragging",{get:function(){return this._alDragging},set:function(i){(i=e.asEnum(i,t.AllowDragging))!=this._alDragging&&(this._alDragging=i,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"itemsSource",{get:function(){return this._items},set:function(i){if(i!=this._items){var o=new e.CancelEventArgs;if(this.onItemsSourceChanging(o)){if(this._cv&&((n=e.tryCast(this._cv,e.collections.CollectionView))&&n.sortConverter==this._bndSortConverter&&(n.sortConverter=null),this._cv.currentChanged.removeHandler(this._cvCurrentChanged,this),this._cv.collectionChanged.removeHandler(this._cvCollectionChanged,this),this._cv=null),this._items=i,this._cv=this._getCollectionView(i),this._lastCount=0,this._cv){this._cv.currentChanged.addHandler(this._cvCurrentChanged,this),this._cv.collectionChanged.addHandler(this._cvCollectionChanged,this);var n=e.tryCast(this._cv,e.collections.CollectionView);n&&!n.sortConverter&&(n.sortConverter=this._bndSortConverter)}this._bindGrid(!0);var r=t.SelectionMode;this.selectionMode==r.ListBox&&(this.selectionMode=r.CellRange,this.selectionMode=r.ListBox),this.onItemsSourceChanged(o)}}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"collectionView",{get:function(){return this._cv},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"editableCollectionView",{get:function(){return e.tryCast(this._cv,"IEditableCollectionView")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"childItemsPath",{get:function(){return this._childItemsPath},set:function(t){t!=this._childItemsPath&&(e.assert(null==t||e.isArray(t)||e.isString(t),"childItemsPath should be an array or a string."),this._childItemsPath=t,this._bindGrid(!0))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rowHeaderPath",{get:function(){return this._rowHdrPath?this._rowHdrPath.path:null},set:function(t){t!=this.rowHeaderPath&&(t=e.asString(t),this._rowHdrPath=t?new e.Binding(t):null,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cells",{get:function(){return this._gpCells},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"columnHeaders",{get:function(){return this._gpCHdr},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"columnFooters",{get:function(){return this._gpCFtr},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rowHeaders",{get:function(){return this._gpRHdr},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"topLeftCells",{get:function(){return this._gpTL},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bottomLeftCells",{get:function(){return this._gpBL},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rows",{get:function(){return this._rows},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"columns",{get:function(){return this._cols},enumerable:!0,configurable:!0}),n.prototype.getColumn=function(e){return this.columns.getColumn(e)},Object.defineProperty(n.prototype,"frozenRows",{get:function(){return this.rows.frozen},set:function(e){this.rows.frozen=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"frozenColumns",{get:function(){return this.columns.frozen},set:function(e){this.columns.frozen=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cloneFrozenCells",{get:function(){return this._fzClone},set:function(t){t!=this.cloneFrozenCells&&(this._fzClone=e.asBoolean(t,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sortRowIndex",{get:function(){return this._sortRowIndex},set:function(t){t!=this._sortRowIndex&&(this._sortRowIndex=e.asNumber(t,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scrollPosition",{get:function(){return this._ptScrl.clone()},set:function(e){var t=this._root,i=-e.x;if(this.rightToLeft)switch(n._getRtlMode()){case"rev":i=t.scrollWidth-t.clientWidth+e.x;break;case"neg":i=e.x;break;default:i=-e.x}t.scrollLeft=i,t.scrollTop=-e.y},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"clientSize",{get:function(){return this._szClient},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"controlRect",{get:function(){return this._rcBounds||(this._rcBounds=e.getElementRect(this._root)),this._rcBounds},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scrollSize",{get:function(){return new e.Size(this._gpCells.width,this._heightBrowser)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"viewRange",{get:function(){return this._gpCells.viewRange},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cellFactory",{get:function(){return this._cf},set:function(i){i!=this._cf&&(this._clearCells(),this._cf=e.asType(i,t.CellFactory,!1))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"itemFormatter",{get:function(){return this._itemFormatter},set:function(t){t!=this._itemFormatter&&(this._clearCells(),this._itemFormatter=e.asFunction(t))},enumerable:!0,configurable:!0}),n.prototype.canEditCell=function(e,t){return this._edtHdl._allowEditing(e,t)},n.prototype.getCellData=function(e,t,i){return this.cells.getCellData(e,t,i)},n.prototype.getCellBoundingRect=function(e,t,i){return this.cells.getCellBoundingRect(e,t,i)},n.prototype.setCellData=function(e,t,i,o,n){return void 0===o&&(o=!0),void 0===n&&(n=!0),this.cells.setCellData(e,t,i,o,n)},n.prototype.hitTest=function(i,o){return e.isNumber(i)&&e.isNumber(o)&&(i=new e.Point(i,o)),e.isBoolean(o)&&o&&(this._rcBounds=null),new t.HitTestInfo(this,i)},n.prototype.getClipString=function(e){return this._edtHdl.getClipString(e)},n.prototype.setClipString=function(e,t){this._edtHdl.setClipString(e,t)},n.prototype.focus=function(){this._setFocus(!1)},n.prototype.dispose=function(){this.finishEditing(!0),this.itemsSource=null,o.prototype.dispose.call(this)},n.prototype.refresh=function(e){void 0===e&&(e=!0),o.prototype.refresh.call(this,e),this.finishEditing(),e&&(this._updateColumnTypes(),this.scrollPosition=this._ptScrl),this.refreshCells(e)},n.prototype.refreshCells=function(e,t,i){this.isUpdating||(e?this._updateLayout():this._updateContent(t,i))},n.prototype.autoSizeColumn=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=4),this.autoSizeColumns(e,e,t,i)},n.prototype.autoSizeColumns=function(i,o,r,s){var l=this;void 0===r&&(r=!1),void 0===s&&(s=4);var a=0,c=r?this.topLeftCells:this.columnHeaders,h=r?this.bottomLeftCells:this.columnFooters,u=r?this.rowHeaders:this.cells,d=this.viewRange;i=null==i?0:e.asInt(i),o=null==o?u.columns.length-1:e.asInt(o),d.row=Math.max(0,d.row-1e3),d.row2=Math.min(d.row2+1e3,this.rows.length-1),this.finishEditing()&&this.columns.deferUpdate(function(){e.setCss(l._eCt,{width:l._gpCells.width});var r=document.createElement("div");r.setAttribute(n._WJS_MEASURE,"true"),r.style.visibility="hidden",u.hostElement.parentElement.appendChild(r);for(var g=l._getCanvasContext(),p=i;p<=o&&p>-1&&p<u.columns.length;p++){var f=u.columns[p];if(f.isVisible){if(a=0,l.autoSizeMode&t.AutoSizeMode.Headers){for(_=0;_<c.rows.length;_++)if(c.rows[_].isVisible){w=l._getDesiredWidth(c,_,p,r);a=Math.max(a,w)}for(_=0;_<h.rows.length;_++)if(h.rows[_].isVisible){w=l._getDesiredWidth(h,_,p,r);a=Math.max(a,w)}}if(l.autoSizeMode&t.AutoSizeMode.Cells&&d.isValid)if(f._getQuickAutoSize()){var _=l._getWidestRow(u,d,p,g),w=l._getDesiredWidth(u,_,p,r);a=Math.max(a,w)}else for(_=d.row;_<=d.row2&&_<u.rows.length;_++)if(u.rows[_].isVisible){w=l._getDesiredWidth(u,_,p,r);a=Math.max(a,w)}f.width=a+s+2}}l.cellFactory.disposeCell(r),e.removeChild(r)})},n.prototype.autoSizeRow=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=0),this.autoSizeRows(e,e,t,i)},n.prototype.autoSizeRows=function(i,o,r,s){var l=this;void 0===r&&(r=!1),void 0===s&&(s=0);var a=0,c=r?this.topLeftCells:this.rowHeaders,h=r?this.columnHeaders:this.cells;r=e.asBoolean(r),s=e.asNumber(s),i=null==i?0:e.asInt(i),o=null==o?h.rows.length-1:e.asInt(o),this.finishEditing()&&this.rows.deferUpdate(function(){e.setCss(l._eCt,{width:l._gpCells.width});var r=document.createElement("div");r.setAttribute(n._WJS_MEASURE,"true"),r.style.visibility="hidden",h.hostElement.appendChild(r);for(var u={},d=i;d<=o&&d>-1&&d<h.rows.length;d++)if(h.rows[d].isVisible){if(a=0,l.autoSizeMode&t.AutoSizeMode.Headers)for(p=0;p<c.columns.length;p++)if(c.columns[p].isVisible>0){w=l._getDesiredHeight(c,d,p,r);a=Math.max(a,w)}if(l.autoSizeMode&t.AutoSizeMode.Cells)for(var g=!0,p=0;p<h.columns.length;p++){var f=h.columns[p],_=f._getQuickAutoSize();if(f.isVisible&&(g||f.wordWrap||f.cssClass||f.dataType==e.DataType.Boolean||!_)){var w=void 0;if(_){var m={col:p,content:f.dataType==e.DataType.Number?"1":h.getCellData(d,p,!0)},y=JSON.stringify(m);null==(w=u[y])&&(w=l._getDesiredHeight(h,d,p,r),u[y]=w)}else w=l._getDesiredHeight(h,d,p,r);a=Math.max(a,w),g=!1}}h.rows[d].height=a+s}l.cellFactory.disposeCell(r),e.removeChild(r)})},Object.defineProperty(n.prototype,"treeIndent",{get:function(){return this._indent},set:function(t){t!=this._indent&&(this._indent=e.asNumber(t,!1,!0),this.columns.onCollectionChanged())},enumerable:!0,configurable:!0}),n.prototype.collapseGroupsToLevel=function(i){if(this.finishEditing()){var o=this.rows;o.deferUpdate(function(){for(var n=0;n<o.length;n++){var r=e.tryCast(o[n],t.GroupRow);r&&(r.isCollapsed=r.level>=i)}})}},Object.defineProperty(n.prototype,"selectionMode",{get:function(){return this._selHdl.selectionMode},set:function(i){(i=e.asEnum(i,t.SelectionMode))!=this.selectionMode&&(this._clearCells(),this._selHdl.selectionMode=i)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selection",{get:function(){return this._selHdl.selection.clone()},set:function(e){this._selHdl.selection=e},enumerable:!0,configurable:!0}),n.prototype.select=function(e,t){void 0===t&&(t=!0),this._selHdl.select(e,t)},n.prototype.getSelectedState=function(e,t){return this.cells.getSelectedState(e,t,null)},Object.defineProperty(n.prototype,"selectedRows",{get:function(){var e=[];if(this.selectionMode==t.SelectionMode.ListBox)for(o=0;o<this.rows.length;o++)this.rows[o].isSelected&&e.push(this.rows[o]);else if(this.rows.length)for(var i=this.selection,o=i.topRow;o>-1&&o<=i.bottomRow;o++)e.push(this.rows[o]);return e},set:function(i){var o=this;e.assert(this.selectionMode==t.SelectionMode.ListBox,"This property can be set only in ListBox mode."),i=e.asArray(i),this.deferUpdate(function(){for(var e=0,t=!0;e<o.rows.length;e++){var n=o.rows[e],r=i&&i.indexOf(n)>-1;r&&t&&(t=!1,o.select(e,o.selection.col)),n.isSelected=r}})},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectedItems",{get:function(){for(var e=this.selectedRows,t=0;t<e.length;t++)e[t]=e[t].dataItem;return e},set:function(i){var o=this;e.assert(this.selectionMode==t.SelectionMode.ListBox,"This property can be set only in ListBox mode."),i=e.asArray(i),this.deferUpdate(function(){for(var e=0,t=!0;e<o.rows.length;e++){var n=o.rows[e],r=i&&i.indexOf(n.dataItem)>-1;r&&t&&(t=!1,o.select(e,o.selection.col)),n.isSelected=r}})},enumerable:!0,configurable:!0}),n.prototype.scrollIntoView=function(t,i,o){null==this._maxOffsetY&&this._updateLayout();var n=this.scrollPosition,r=this._szClient.width,s=this._szClient.height-this._gpCFtr.rows.getTotalSize(),l=this.cells._getFrozenPos();if((t=e.asInt(t))>-1&&t<this._rows.length&&t>=this._rows.frozen){var a=this._rows[t],c=this.cells.height>s?Math.round(a.pos/(this.cells.height-s)*100)/100:0,h=Math.round(this._maxOffsetY*c),u=a.pos-h,d=u+a.renderSize;d>s-n.y&&(n.y=Math.max(-u,s-d)),u-l.y<-n.y&&(n.y=-(u-l.y))}if((i=e.asInt(i))>-1&&i<this._cols.length&&i>=this._cols.frozen){var g=this._cols[i],p=g.pos+g.renderSize;p>-n.x+r&&(n.x=Math.max(-g.pos,r-p)),g.pos-l.x<-n.x&&(n.x=-(g.pos-l.x))}return!n.equals(this._ptScrl)&&(this.scrollPosition=n,o&&(this._updateScrollPosition(),this.refresh()),!0)},n.prototype.isRangeValid=function(e){return e.isValid&&e.bottomRow<this.rows.length&&e.rightCol<this.columns.length},n.prototype.startEditing=function(e,t,i,o){return void 0===e&&(e=!0),this._edtHdl.startEditing(e,t,i,o)},n.prototype.finishEditing=function(e){return this._edtHdl.finishEditing(e)},Object.defineProperty(n.prototype,"activeEditor",{get:function(){return this._edtHdl.activeEditor},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"editRange",{get:function(){return this._edtHdl.editRange},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mergeManager",{get:function(){return this._mrgMgr},set:function(i){i!=this._mrgMgr&&(this._mrgMgr=e.asType(i,t.MergeManager,!0),this.invalidate())},enumerable:!0,configurable:!0}),n.prototype.getMergedRange=function(e,t,i,o){return void 0===o&&(o=!0),this._mrgMgr?this._mrgMgr.getMergedRange(e,t,i,o):null},Object.defineProperty(n.prototype,"keyActionTab",{get:function(){return this._keyHdl._kaTab},set:function(i){this._keyHdl._kaTab=e.asEnum(i,t.KeyAction)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"keyActionEnter",{get:function(){return this._keyHdl._kaEnter},set:function(i){this._keyHdl._kaEnter=e.asEnum(i,t.KeyAction)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showDropDown",{get:function(){return this._shDropDown},set:function(t){t!=this._shDropDown&&(this._shDropDown=e.asBoolean(t,!0),this.invalidate())},enumerable:!0,configurable:!0}),n.prototype.toggleDropDownList=function(){this._tglDropDown||(this._tglDropDown=!0,this._edtHdl._toggleListBox(null),this._tglDropDown=!1)},n.prototype.onItemsSourceChanging=function(e){return this.itemsSourceChanging.raise(this,e),!e.cancel},n.prototype.onItemsSourceChanged=function(e){this.itemsSourceChanged.raise(this,e)},n.prototype.onScrollPositionChanged=function(e){this.scrollPositionChanged.raise(this,e)},n.prototype.onSelectionChanging=function(e){return this.selectionChanging.raise(this,e),!e.cancel},n.prototype.onSelectionChanged=function(e){this.selectionChanged.raise(this,e)},n.prototype.onLoadingRows=function(e){return this.loadingRows.raise(this,e),!e.cancel},n.prototype.onLoadedRows=function(e){this.loadedRows.raise(this,e)},n.prototype.onUpdatingLayout=function(e){return this.updatingLayout.raise(this,e),!e.cancel},n.prototype.onUpdatedLayout=function(e){this.updatedLayout.raise(this,e)},n.prototype.onResizingColumn=function(e){return this.resizingColumn.raise(this,e),!e.cancel},n.prototype.onResizedColumn=function(e){this.resizedColumn.raise(this,e)},n.prototype.onAutoSizingColumn=function(e){return this.autoSizingColumn.raise(this,e),!e.cancel},n.prototype.onAutoSizedColumn=function(e){this.autoSizedColumn.raise(this,e)},n.prototype.onDraggingColumn=function(e){return this.draggingColumn.raise(this,e),!e.cancel},n.prototype.onDraggingColumnOver=function(e){return this.draggingColumnOver.raise(this,e),!e.cancel},n.prototype.onDraggedColumn=function(e){this.draggedColumn.raise(this,e)},n.prototype.onResizingRow=function(e){return this.resizingRow.raise(this,e),!e.cancel},n.prototype.onResizedRow=function(e){this.resizedRow.raise(this,e)},n.prototype.onAutoSizingRow=function(e){return this.autoSizingRow.raise(this,e),!e.cancel},n.prototype.onAutoSizedRow=function(e){this.autoSizedRow.raise(this,e)},n.prototype.onDraggingRow=function(e){return this.draggingRow.raise(this,e),!e.cancel},n.prototype.onDraggingRowOver=function(e){return this.draggingRowOver.raise(this,e),!e.cancel},n.prototype.onDraggedRow=function(e){this.draggedRow.raise(this,e)},n.prototype.onGroupCollapsedChanging=function(e){return this.groupCollapsedChanging.raise(this,e),!e.cancel},n.prototype.onGroupCollapsedChanged=function(e){this.groupCollapsedChanged.raise(this,e)},n.prototype.onSortingColumn=function(e){return this.sortingColumn.raise(this,e),!e.cancel},n.prototype.onSortedColumn=function(e){this.sortedColumn.raise(this,e)},n.prototype.onBeginningEdit=function(e){return this.beginningEdit.raise(this,e),!e.cancel},n.prototype.onPrepareCellForEdit=function(e){this.prepareCellForEdit.raise(this,e)},n.prototype.onCellEditEnding=function(e){return this.cellEditEnding.raise(this,e),!e.cancel&&!e.stayInEditMode},n.prototype.onCellEditEnded=function(e){this.cellEditEnded.raise(this,e)},n.prototype.onRowEditStarting=function(e){this.rowEditStarting.raise(this,e)},n.prototype.onRowEditStarted=function(e){this.rowEditStarted.raise(this,e)},n.prototype.onRowEditEnding=function(e){this.rowEditEnding.raise(this,e)},n.prototype.onRowEditEnded=function(e){this.rowEditEnded.raise(this,e)},n.prototype.onRowAdded=function(e){return this.rowAdded.raise(this,e),!e.cancel},n.prototype.onDeletingRow=function(e){return this.deletingRow.raise(this,e),!e.cancel},n.prototype.onDeletedRow=function(e){this.deletedRow.raise(this,e)},n.prototype.onCopying=function(e){return this.copying.raise(this,e),!e.cancel},n.prototype.onCopied=function(e){this.copied.raise(this,e)},n.prototype.onPasting=function(e){return this.pasting.raise(this,e),!e.cancel},n.prototype.onPasted=function(e){this.pasted.raise(this,e)},n.prototype.onPastingCell=function(e){return this.pastingCell.raise(this,e),!e.cancel},n.prototype.onPastedCell=function(e){this.pastedCell.raise(this,e)},n.prototype.onFormatItem=function(e){this.formatItem.raise(this,e)},n.prototype.onUpdatingView=function(e){return this.updatingView.raise(this,e),!e.cancel},n.prototype.onUpdatedView=function(e){this.updatedView.raise(this,e)},n.prototype._getShowErrors=function(){return this.showErrors&&this._hasValidation},n.prototype._getHasValidation=function(){return this._hasValidation},n.prototype._getError=function(t,i,o){if(e.isFunction(this.itemValidator)){if(t==this.cells)return this.itemValidator(i,o);if(t==this.rowHeaders)for(o=0;o<this.columns.length;o++)if(h=this.itemValidator(i,o))return h}var n=this._cv,r=n?n.getError:null;if(e.isFunction(r)){var s=t.rows,l=this.columns,a=s[i].dataItem;if(a)for(;i<s.length&&s[i].dataItem==a;i++){if(t==this.cells)return r(a,(c=this._getBindingColumn(this.cells,i,l[o])).binding);if(t==this.rowHeaders)for(o=0;o<l.length;o++){var c=this._getBindingColumn(this.cells,i,l[o]),h=r(a,c.binding);if(h)return h}}}return null},n.prototype._setAria=function(t,i){e.setAttribute(this.cells.hostElement,"aria-"+t,i)},n.prototype._setFocus=function(t){if(this.hostElement&&(t||!this.containsFocus())){var i=e.getActiveElement(),o=this.activeEditor,n=this._activeCell,r=this._eFocus,s="tabindex";if(o)e.contains(o,i)||(o.focus(),r.removeAttribute(s));else if(n){if(!e.contains(n,i)&&i!=this._root){var l=!1;if(e.isIE){var a=n.getBoundingClientRect(),c=this._root.getBoundingClientRect();a.right>c.right&&(this._setFocusNoScroll(n),l=!0)}l||n.focus(),r.removeAttribute(s)}}else e.contains(r,i)||(r.tabIndex=this._tabIndex,r.focus());this.containsFocus()||(r.tabIndex=this._tabIndex,r.focus())}},n.prototype._setFocusNoScroll=function(e){var t=this.scrollPosition,i=e.style,o=i.position;i.position="fixed",e.tabIndex=this._tabIndex,e.focus(),i.position=o,this.scrollPosition=t,this._fixScroll()},n.prototype._getDefaultRowHeight=function(){var t=this.hostElement,i=document.body,o=null;if(i&&!e.contains(i,t)){for(var n=t;n;n=n.parentElement)o=n;o&&i.appendChild(o)}var r=this._eFocus.scrollHeight+2;return(r<=6||isNaN(r))&&(r=28),o&&e.removeChild(o),r},n.prototype._getDefaultCellPadding=function(){var e=getComputedStyle(this._eFocus);return parseInt(this.rightToLeft?e.paddingRight:e.paddingLeft)},n.prototype._getCollectionView=function(t){return e.asCollectionView(t)},n.prototype._getCanvasContext=function(){var e=document.createElement("canvas").getContext("2d"),t=getComputedStyle(this.hostElement);return e.font=t.fontSize+" "+t.fontFamily.split(",")[0],e},n.prototype._getWidestRow=function(t,i,o,n){for(var r=0,s=0,l=t.columns[o].dataType==e.DataType.Boolean,a=i.row;a<=i.row2;a++)if(t.rows[a].isVisible){var c=t.getCellData(a,o,!0),h=n.measureText(c).width;if(h>s&&(s=h,r=a),l)break}return r},n.prototype._getDesiredWidth=function(e,t,i,o){var n=this.getMergedRange(e,t,i),r=o.style;return this.cellFactory.updateCell(e,t,i,o,n),r.width=r.top=r.left="",o.offsetWidth/(n&&n.columnSpan>1?n.columnSpan:1)},n.prototype._getDesiredHeight=function(e,t,i,o){var n=this.getMergedRange(e,t,i),r=o.style;return this.cellFactory.updateCell(e,t,i,o,n),r.height=r.top=r.left="",o.offsetHeight/(n&&n.rowSpan>1?n.rowSpan:1)},n.prototype._getSortRowIndex=function(){return null!=this._sortRowIndex?this._sortRowIndex:this.columnHeaders.rows.length-1},n.prototype._sortConverter=function(e,t,i,o){var n;if(o){if(this._mappedColumns=null,this._cv)for(var r=this._cv.sortDescriptions,s=0;s<r.length;s++)(n=this.getColumn(r[s].property))&&n.dataMap&&(this._mappedColumns||(this._mappedColumns={}),this._mappedColumns[n.binding]=n.dataMap);this._mouseHdl._htDown&&this._mouseHdl._htDown.col>-1&&(n=this.columns[this._mouseHdl._htDown.col],this._mappedColumns&&n.dataMap&&(this._mappedColumns[n.binding]=n.dataMap))}if(this._mappedColumns){var l=this._mappedColumns[e.property];l&&l.sortByDisplayValues&&(i=l.getDisplayValue(i))}return i},n.prototype._bindGrid=function(i){var o=this;if(this.deferUpdate(function(){0==o._lastCount&&e.hasItems(o._cv)&&(i=!0);var n,r=o.selectionMode==t.SelectionMode.ListBox;o.preserveSelectedState&&r&&!o.childItemsPath&&(n=o.selectedItems);var s;if(o.preserveOutlineState&&e.isFunction(window.Map)&&o.rows.maxGroupLevel>-1){s=new Map;for(d=0;d<o.rows.length;d++){var l=o.rows[d];if(l instanceof t.GroupRow&&l.isCollapsed&&l.dataItem){var a=l.dataItem;a instanceof e.collections.CollectionViewGroup&&(a=a._path),s.set(a,!0)}}}i&&o.columns.deferUpdate(function(){o._bindColumns()});var c=new e.CancelEventArgs;o.onLoadingRows(c)&&(o.rows.deferUpdate(function(){o._bindRows()}),o.onLoadedRows(c));var h=0;if(n&&n.length)for(d=0;d<o.rows.length&&h<n.length;d++)n.indexOf(o.rows[d].dataItem)>-1&&(o.rows[d].isSelected=!0,h++);if(r&&0==h&&o._lastCount>0)for(var u=o.selection,d=u.topRow;d<=u.bottomRow&&d>-1&&d<o.rows.length;d++)o.rows[d].isSelected=!0;s&&o.rows.deferUpdate(function(){for(var i=0;i<o.rows.length;i++){var n=o.rows[i];if(n instanceof t.GroupRow){var r=n.dataItem;r instanceof e.collections.CollectionViewGroup&&(r=r._path),s.get(r)&&(n.isCollapsed=!0)}}}),!o._lastCount&&o._cv&&o._cv.items&&(o._lastCount=o._cv.items.length)}),!this.rows.length){var n=this._selHdl.selection;n.row=n.row2=-1}this._cv&&this._syncSelection(i)},n.prototype._cvCollectionChanged=function(i,o){if(this.autoGenerateColumns&&0==this.columns.length)this._bindGrid(!0);else if(this.childItemsPath&&o.action!=e.collections.NotifyCollectionChangedAction.Change)this._bindGrid(!1);else{switch(o.action){case e.collections.NotifyCollectionChangedAction.Change:return void this.invalidate();case e.collections.NotifyCollectionChangedAction.Add:if(o.index==this._cv.items.length-1){var n=this.rows.length;return this.rows[n-1]instanceof t._NewRowTemplate&&n--,void this.rows.insert(n,new t.Row(o.item))}e.assert(!1,"added item should be the last one.");break;case e.collections.NotifyCollectionChangedAction.Remove:var r=this._findRow(o.item);if(r>-1)return this.rows.removeAt(r),void this._syncSelection(!1);e.assert(!1,"removed item not found on grid.")}this._bindGrid(!1)}},n.prototype._cvCurrentChanged=function(e,t){this._syncSelection(!1)},n.prototype._syncSelection=function(i){if(this._cv&&this.selectionMode!=t.SelectionMode.None){var o=this.selection,n=o.row>-1&&o.row<this.rows.length?this.rows[o.row].dataItem:null;if(n instanceof e.collections.CollectionViewGroup&&(n=null),(n!=this._cv.currentItem||i)&&(!this.childItemsPath||!this.editableCollectionView||!this.editableCollectionView.currentAddItem)){var r=this._getRowIndex(this._cv.currentPosition);r==o.row&&this.childItemsPath||(o.row=o.row2=r,this.select(o,!1),this.selectionMode&&this.scrollIntoView(o.row,-1))}}},n.prototype._getRowIndex=function(e){if(this._cv){if(e>-1){for(var i=this._cv.items[e];e<this.rows.length;e++)if(this.rows[e].dataItem===i)return e;return-1}if(1==this.rows.length&&this.rows[0]instanceof t._NewRowTemplate)return 0;var o=this.selection.row,n=o>-1?this.rows[o]:null;return n&&(n instanceof t.GroupRow||null==n.dataItem)?o:-1}return this.selection.row},n.prototype._getCvIndex=function(e){if(this._cv&&e>-1&&e<this.rows.length){var t=this._cv.items,i=this.rows[e].dataItem;for(e=Math.min(e,t.length-1);e>-1;e--)if(t[e]===i)return e}return-1},n.prototype._findRow=function(e){for(var t=0;t<this.rows.length;t++)if(this.rows[t].dataItem==e)return t;return-1},n.prototype._updateLayout=function(){var t=new e.CancelEventArgs;if(this.onUpdatingLayout(t)){this._hasValidation=e.isFunction(this._itemValidator)||this._cv&&e.isFunction(this._cv.getError);var o=this._hdrVis&i.Row?this._hdrCols.getTotalSize():0,r=this._hdrVis&i.Column?this._hdrRows.getTotalSize():0,s=this._ftrRows.getTotalSize(),l=this._rows.getTotalSize()+s;l<1&&(l=1),this._heightBrowser=Math.min(l,n._getMaxSupportedCssHeight()),this._maxOffsetY=Math.max(0,l-this._heightBrowser),this._cellPadding=this._getDefaultCellPadding();var a=this._heightBrowser+r-s,c=this._gpCells.width,h=this._heightBrowser;!c&&this.rows.length&&(c=.1),!h&&this.columns.length&&(h=.1),this.rightToLeft?(e.setCss(this._eTL,{right:0,top:0,width:o,height:r}),e.setCss(this._eCHdr,{right:o,top:0,height:r}),e.setCss(this._eRHdr,{right:0,top:r,width:o}),e.setCss(this._eCt,{right:o,top:r,width:c,height:h}),e.setCss(this._fCt,{right:o,top:r}),e.setCss(this._eBL,{right:0,top:a,width:o,height:s}),e.setCss(this._eCFtr,{right:o,top:a,height:s})):(e.setCss(this._eTL,{left:0,top:0,width:o,height:r}),e.setCss(this._eCHdr,{left:o,top:0,height:r}),e.setCss(this._eRHdr,{left:0,top:r,width:o}),e.setCss(this._eCt,{left:o,top:r,width:c,height:h}),e.setCss(this._fCt,{left:o,top:r}),e.setCss(this._eBL,{left:0,top:a,width:o,height:s}),e.setCss(this._eCFtr,{left:o,top:a,height:s})),this._stickyHdr&&this._updateStickyHeaders();var u=this.frozenRows||this.frozenColumns?"3":"";e.setCss([this._eTL,this._eBL,this._eCHdr,this._eCFtr,this._eRHdr,this._eMarquee],{zIndex:u});var d=this._root,g=d.offsetWidth-d.clientWidth,p=d.offsetHeight-d.clientHeight;e.setCss(this._eSz,{width:o+g+this._gpCells.width,height:r+p+this._heightBrowser});var f=null;this.columns._updateStarSizes(d.clientWidth-o)&&(f=d.clientWidth,e.setCss(this._eCt,{width:this._gpCells.width})),this._szClient=new e.Size(d.clientWidth-o,d.clientHeight-r),this._rcBounds=null,this._updateScrollHandler(),this._updateContent(!1),g=d.offsetWidth-d.clientWidth,p=d.offsetHeight-d.clientHeight,e.setCss(this._eSz,{width:o+g+this._gpCells.width,height:r+p+this._heightBrowser}),this._szClient=new e.Size(d.clientWidth-o,d.clientHeight-r),f&&f!=d.clientWidth&&this.columns._updateStarSizes(d.clientWidth-o)&&(e.setCss(this._eCt,{width:this._gpCells.width}),this._updateContent(!1)),e.setCss([this._eCHdr,this._eCFtr,this._fCt],{width:this._szClient.width}),e.setCss([this._eRHdr,this._fCt],{height:this._szClient.height}),s&&(a=Math.min(a,this._szClient.height+r-s),e.setCss([this._eBL,this._eCFtr],{top:a})),this.onUpdatedLayout(t)}},n.prototype._updateStickyHeaders=function(){var t=!1,i=0;if(this._stickyHdr){for(var o=0,r=null,s=this.hostElement;s;s=s.parentElement){var l=s.getBoundingClientRect();null==r&&(r=l.top),o=Math.max(o,l.top)}i=-(r=Math.max(0,o-r-1)),t=r>0,this._rcBounds=null}this._eTL.style.top=this._eCHdr.style.top=t?-i+"px":"",e.toggleClass(this._eTL,n._WJS_STICKY,t),e.toggleClass(this._eCHdr,n._WJS_STICKY,t)},n.prototype._updateScrollHandler=function(){this._clipToScreen=this._getClipToScreen();var e=this._stickyHdr||this._clipToScreen;e!=this._scrollHandlerAttached&&(this._scrollHandlerAttached=e,e?this.addEventListener(window,"scroll",this._bndScroll,!0):this.removeEventListener(window,"scroll",this._bndScroll,!0))},n.prototype._getClipToScreen=function(){if(this.rows.length<=n._MIN_VIRT_ROWS)return!1;if(this._root.clientHeight!=this._root.scrollHeight)return!1;for(var e=this.hostElement;e&&e!=document.documentElement;e=e.parentElement)if("auto"==getComputedStyle(e).overflow)return!1;return!0},n.prototype._scroll=function(t){var i=this;e.contains(t.target,this.hostElement)&&(this._clipToScreen&&(this._afScrl&&cancelAnimationFrame(this._afScrl),this._afScrl=requestAnimationFrame(function(){i._afScrl=null,i.finishEditing(),i._updateContent(!0)})),this._stickyHdr&&(this._afSticky&&cancelAnimationFrame(this._afSticky),this._afSticky=requestAnimationFrame(function(){i._afSticky=null;var t=new e.CancelEventArgs;i.onUpdatingLayout(t)&&(i._updateStickyHeaders(),i.onUpdatedLayout(t))})))},n.prototype._updateScrollPosition=function(){var t=this._root,i=t.scrollTop,o=t.scrollLeft;this.rightToLeft&&"rev"==n._getRtlMode()&&(o=t.scrollWidth-t.clientWidth-o);var r=new e.Point(-Math.abs(o),-i);return!this._ptScrl.equals(r)&&(this._ptScrl=r,this.onScrollPositionChanged(),!0)},n.prototype._updateContent=function(t,o){var n=this._root,r=this.hostElement,s=this.cells.hostElement,l=e.getActiveElement(),a=e.contains(r,l)?l:null,c=this._activeCell,h=new e.CancelEventArgs;if(this.onUpdatingView(h)){if(e.setAttribute(s,"role",this.rows.maxGroupLevel<0?"grid":"treegrid"),this._offsetY=0,this._heightBrowser>this._szClient.height){var u=Math.round(-this._ptScrl.y/(this._heightBrowser-this._szClient.height)*100)/100;this._offsetY=Math.round(this._maxOffsetY*u)}this._updateScrollPosition();var d=this._gpCells._updateContent(t,o,this._offsetY);if(this._hdrVis&i.Column&&(!o||this._ssHdr&i.Column)&&this._gpCHdr._updateContent(t,o,0),this._hdrVis&i.Row&&(!o||this._ssHdr&i.Row)&&this._gpRHdr._updateContent(t,o,this._offsetY),this._hdrVis&&!o&&this._gpTL._updateContent(t,o,0),this._gpCFtr.rows.length&&(this._gpBL._updateContent(t,o,0),this._gpCFtr._updateContent(t,o,0)),this.showMarquee){var g=this._selHdl.selection,p=this._eMarquee;if(this.isRangeValid(g)){var f=this._getMarqueeRect(g),_=p.firstChild,w=p.offsetWidth-_.offsetWidth,m=p.offsetHeight-_.offsetHeight;e.setCss(p,{left:f.left+s.offsetLeft-w/2,top:f.top+s.offsetTop-m/2,width:f.width+w,height:f.height+m,visibility:f.width>0&&f.height>0?"":"collapse"})}else e.setCss(p,{left:0,top:0,width:0,height:0,visibility:"collapse"})}if(this._useFrozenDiv()&&(this._updateFrozenCells(o),d&&e.hasClass(d,"wj-frozen")&&(d=null)),this._activeCell=d,a)if(a!=n&&a!=this._eFocus&&e.contains(r,a)&&!e.contains(s,a)){if(e.getActiveElement()!=a&&a.focus(),e.isIE()&&a instanceof HTMLInputElement&&!a.type.match(/checkbox|radio|range/i)){var y=a.selectionStart,v=a.selectionEnd;a.setSelectionRange(y,v)}}else{var C=d!=c;this._setFocus(C)}!a&&d&&(d.tabIndex=this._tabIndex),c&&c!=d&&c.removeAttribute("tabindex"),this._fixScroll(),this._rcBounds=null,this.onUpdatedView(h)}},n.prototype._fixScroll=function(){[this.hostElement,this._root?this._root.parentElement:null].forEach(function(e){e&&(e.scrollTop&&(e.scrollTop=0),e.scrollLeft&&(e.scrollLeft=0))})},n.prototype._clearCells=function(){for(var e in this)if("_"==e[0]){var i=this[e];i instanceof t.GridPanel&&i._clearCells()}this.invalidate()},n.prototype._useFrozenDiv=function(){return e.isBoolean(this._fzClone)?this._fzClone:e.isIE()||e.isFirefox()||e.isMobile()},n.prototype._updateFrozenCells=function(t){if(this.frozenRows||this.frozenColumns){var i=this._eCt.querySelectorAll(".wj-frozen");if(t&&this._fCt.children.length==i.length){for(o=0;o<i.length;o++)this._fCt.children[o].className=i[o].className;return}if(e.setText(this._fCt,null),!this.activeEditor)for(var o=0;o<i.length;o++){var n=i[o].cloneNode(!0);n.style.pointerEvents="auto",this._fCt.appendChild(n)}}else e.setText(this._fCt,null)},n.prototype._getMarqueeRect=function(i){var o=this.getMergedRange(this.cells,i.topRow,i.leftCol)||new t.CellRange(i.topRow,i.leftCol),n=this.getMergedRange(this.cells,i.bottomRow,i.rightCol)||new t.CellRange(i.bottomRow,i.rightCol),r=this.cells.getCellBoundingRect(o.topRow,o.leftCol,!0),s=this.cells.getCellBoundingRect(n.bottomRow,n.rightCol,!0);if(this.rows.frozen){var l=Math.min(this.rows.length,this.rows.frozen),a=this.cells.getCellBoundingRect(l-1,0,!0);i.topRow>=l&&r.top<a.bottom&&(r.top=a.bottom),i.bottomRow>=l&&s.bottom<a.bottom&&(s.height=a.bottom-s.top)}if(this.columns.frozen){var c=Math.min(this.columns.length,this.columns.frozen),a=this.cells.getCellBoundingRect(0,c-1,!0);this.rightToLeft?(i.leftCol>=c&&r.right>a.left&&(r.left=a.left-r.width),i.rightCol>=c&&s.left>a.left&&(s.left=a.left)):(i.leftCol>=c&&r.left<a.right&&(r.left=a.right),i.rightCol>=c&&s.right<a.right&&(s.width=a.right-s.left))}return this.rightToLeft?new e.Rect(s.left,r.top,r.right-s.left,s.bottom-r.top):new e.Rect(r.left,r.top,s.right-r.left,s.bottom-r.top)},n.prototype._bindColumns=function(){for(var i=0;i<this.columns.length;i++)(c=this.columns[i])._getFlag(t.RowColFlags.AutoGenerated)&&(this.columns.removeAt(i),i--);var o=this._cv,n=o?o.sourceCollection:null,r=n&&n.length?n[0]:null;if(r&&this.autoGenerateColumns)for(var s in r)for(var l=null,a=0;a<n.length&&a<1e3&&null==l;a++)if(l=n[a][s],e.isPrimitive(l)){var c=new t.Column;c._setFlag(t.RowColFlags.AutoGenerated,!0),c.binding=c.name=s,c.header=e.toHeaderCase(s),c.dataType=e.getType(l),c.dataType==e.DataType.Number&&(c.width=80);var h=Object.getOwnPropertyDescriptor(r,s);!h||h.writable||e.isFunction(h.set)||c._setFlag(t.RowColFlags.ReadOnly,!0),this.columns.push(c)}this._updateColumnTypes()},n.prototype._updateColumnTypes=function(){var t=this._cv;if(e.hasItems(t))for(var i=t.items[0],o=this.columns,n=0;n<o.length;n++){var r=o[n];null==r.dataType&&r._binding&&(r.dataType=e.getType(r._binding.getValue(i)))}},n.prototype._getBindingColumn=function(e,t,i){return i},n.prototype._getRowHeaderPath=function(){return this._rowHdrPath},n.prototype._bindRows=function(){this.rows.clear();var e=this._cv;if(e&&e.items){var t=e.items,i=e.groups;if(this.childItemsPath)for(o=0;o<t.length;o++)this._addNode(t,o,0);else if(null!=i&&i.length>0&&this.showGroups)for(o=0;o<i.length;o++)this._addGroup(i[o]);else for(var o=0;o<t.length;o++)this._addBoundRow(t,o)}},n.prototype._addBoundRow=function(e,i){this.rows.push(new t.Row(e[i]))},n.prototype._addNode=function(i,o,n){var r=new t.GroupRow,s=this.childItemsPath,l=e.isArray(s)?s[n]:s,a=i[o],c=a[l];if(r.dataItem=a,r.level=n,this.rows.push(r),e.isArray(c))for(var h=0;h<c.length;h++)this._addNode(c,h,n+1)},n.prototype._addGroup=function(e){var i=new t.GroupRow;if(i.level=e.level,i.dataItem=e,this.rows.push(i),e.isBottomLevel)for(var o=e.items,n=0;n<o.length;n++)this._addBoundRow(o,n);else for(n=0;n<e.groups.length;n++)this._addGroup(e.groups[n])},n._getSerializableProperties=function(e){var t=[];for(e=e.prototype;e!=Object.prototype;e=Object.getPrototypeOf(e))for(var i=Object.getOwnPropertyNames(e),o=0;o<i.length;o++){var n=i[o],r=Object.getOwnPropertyDescriptor(e,n);r&&r.set&&r.get&&"_"!=n[0]&&!n.match(/disabled|required/)&&t.push(n)}return t},n.prototype._copy=function(i,o){if("columns"==i){this.columns.clear();for(var n=e.asArray(o),r=0;r<n.length;r++){var s=new t.Column;e.copy(s,n[r]),this.columns.push(s)}return!0}return!1},n.prototype._isInputElement=function(e){if(e instanceof HTMLElement){if("true"==e.contentEditable)return!0;var t=e.tagName.match(/^(BUTTON|A|INPUT|TEXTAREA|SELECT|OPTION)$/i);return t&&t.length>0}return!1},n.prototype._wantsInput=function(t){return this._isInputElement(t)&&!this.activeEditor&&!this._edtHdl._isNativeCheckbox(t)&&!e.hasClass(t,"wj-grid-ime")&&e.contains(document.body,t)},n._getMaxSupportedCssHeight=function(){if(!n._maxCssHeight){var t=335e5;e.isIE()?t=15e5:e.isFirefox()&&(t=175e5),n._maxCssHeight=t}return n._maxCssHeight},n._getRtlMode=function(){if(!n._rtlMode){var t=e.createElement('<div dir="rtl" style="visibility:hidden;width:100px;height:100px;overflow:auto"><div style="width:2000px;height:2000px"></div></div>');document.body.appendChild(t);var i=t.scrollLeft;t.scrollLeft=-1e3;var o=t.scrollLeft;e.removeChild(t),n._rtlMode=o<0?"neg":i>0?"rev":"std"}return n._rtlMode},n._WJS_STICKY="wj-state-sticky",n._WJS_MEASURE="wj-state-measuring",n._WJS_UPDATING="wj-state-updating",n._MIN_VIRT_ROWS=200,n.controlTemplate='<div style="position:relative;width:100%;height:100%;overflow:hidden;max-width:inherit;max-height:inherit"><div wj-part="focus" aria-hidden="true" class="wj-cell" style="position:fixed;opacity:0;pointer-events:none;left:-10px;top:-10px">0</div><div wj-part="root" style="position:absolute;width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch;max-width:inherit;max-height:inherit"><div wj-part="cells" class="wj-cells" style="position:absolute"></div><div wj-part="marquee" aria-hidden="true" class="wj-marquee" style="display:none;pointer-events:none;"><div style="width:100%;height:100%"></div></div></div><div wj-part="fcells" aria-hidden="true" class="wj-cells" style="position:absolute;pointer-events:none;overflow:hidden"></div><div wj-part="rh" aria-hidden="true" style="position:absolute;overflow:hidden;outline:none"><div wj-part="rhcells" class="wj-rowheaders" style="position:relative"></div></div><div wj-part="cf" aria-hidden="true" style="position:absolute;overflow:hidden;outline:none"><div wj-part="cfcells" class="wj-colfooters" style="position:relative"></div></div><div wj-part="ch" aria-hidden="true" style="position:absolute;overflow:hidden;outline:none"><div wj-part="chcells" class="wj-colheaders" style="position:relative"></div></div><div wj-part="bl" aria-hidden="true" style="position:absolute;overflow:hidden;outline:none"><div wj-part="blcells" class="wj-bottomleft" style="position:relative"></div></div><div wj-part="tl" aria-hidden="true" style="position:absolute;overflow:hidden;outline:none"><div wj-part="tlcells" class="wj-topleft" style="position:relative"></div></div><div wj-part="sz" aria-hidden="true" style="position:relative;visibility:hidden"></div></div>',n}(e.Control);t.FlexGrid=o}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),wijmo;!function(e){!function(t){"use strict";var i=function(i){function o(o,n,r){var s=i.call(this)||this;return s._p=e.asType(o,t.GridPanel),s._rng=e.asType(n,t.CellRange),s._data=r,s}return __extends(o,i),Object.defineProperty(o.prototype,"panel",{get:function(){return this._p},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"range",{get:function(){return this._rng.clone()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"row",{get:function(){return this._rng.row},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"col",{get:function(){return this._rng.col},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e},enumerable:!0,configurable:!0}),o}(e.CancelEventArgs);t.CellRangeEventArgs=i;var o=function(t){function i(i,o,n){var r=t.call(this,i,o)||this;return r._cell=e.asType(n,HTMLElement),r}return __extends(i,t),Object.defineProperty(i.prototype,"cell",{get:function(){return this._cell},enumerable:!0,configurable:!0}),i}(i);t.FormatItemEventArgs=o;var n=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e._stayInEditMode=!1,e._refresh=!0,e}return __extends(i,t),Object.defineProperty(i.prototype,"stayInEditMode",{get:function(){return this._stayInEditMode},set:function(t){this._stayInEditMode=e.asBoolean(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"refresh",{get:function(){return this._refresh},set:function(t){this._refresh=e.asBoolean(t)},enumerable:!0,configurable:!0}),i}(i);t.CellEditEndingEventArgs=n}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(e){!function(t){"use strict";var i;!function(e){e[e.None=0]="None",e[e.Cell=1]="Cell",e[e.ColumnHeader=2]="ColumnHeader",e[e.RowHeader=3]="RowHeader",e[e.TopLeft=4]="TopLeft",e[e.ColumnFooter=5]="ColumnFooter",e[e.BottomLeft=6]="BottomLeft"}(i=t.CellType||(t.CellType={}));var o=function(){function o(i,o,n,r,s){this._offsetY=0,this._g=e.asType(i,t.FlexGrid),this._ct=e.asInt(o),this._rows=e.asType(n,t.RowCollection),this._cols=e.asType(r,t.ColumnCollection),this._e=e.asType(s,HTMLElement),this._vrb=new t.CellRange}return Object.defineProperty(o.prototype,"grid",{get:function(){return this._g},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"cellType",{get:function(){return this._ct},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"viewRange",{get:function(){return this._getViewRange()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"width",{get:function(){return this._cols.getTotalSize()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"height",{get:function(){return this._rows.getTotalSize()},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"rows",{get:function(){return this._rows},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"columns",{get:function(){return this._cols},enumerable:!0,configurable:!0}),o.prototype.getCellData=function(o,n,r){var s,l=this._rows[e.asNumber(o,!1,!0)],a=null;if(e.isString(n)&&(n=this._cols.indexOf(n))<0)throw"Invalid column name or binding.";s=this._cols[e.asNumber(n,!1,!0)];var c=this._g?this._g._getBindingColumn(this,o,s):s;if(!c.binding||!l.dataItem||l.dataItem instanceof e.collections.CollectionViewGroup?l._ubv&&(a=l._ubv[s._hash]):a=c._binding.getValue(l.dataItem),null==a)switch(this._ct){case i.ColumnHeader:o!=this._rows.length-1&&c==s||(a=c.header);break;case i.ColumnFooter:if(c.aggregate!=e.Aggregate.None&&l instanceof t.GroupRow){var h=this._g.collectionView;if(h){var u=e.tryCast(h,e.collections.CollectionView);a=u?u.getAggregate(c.aggregate,c.binding):e.getAggregate(c.aggregate,h.items,c.binding)}}break;case i.Cell:if(c.aggregate!=e.Aggregate.None&&l instanceof t.GroupRow){var d=e.tryCast(l.dataItem,e.collections.CollectionViewGroup);d&&(a=d.getAggregate(c.aggregate,c.binding,this._g.collectionView))}}return r&&(this.cellType==i.Cell&&c.dataMap&&(a=c.dataMap.getDisplayValue(a)),a=null!=a?e.Globalize.format(a,c.format):""),a},o.prototype.setCellData=function(t,o,n,r,s){void 0===r&&(r=!0),void 0===s&&(s=!0);var l,a=this._rows[e.asNumber(t,!1,!0)];if(e.isString(o)&&(o=this._cols.indexOf(o))<0)throw"Invalid column name or binding.";l=this._cols[e.asNumber(o,!1,!0)];var c=this._g?this._g._getBindingColumn(this,t,l):l;if(this._ct==i.Cell){if(c.dataMap&&null!=n&&(c.isRequired||""!=n)){var h=c.dataMap,u=h.getKeyValue(n);if(null==u&&null==h.getDisplayValue(null)){if(!h.isEditable||h.displayMemberPath!=h.selectedValuePath)return!1}else n=u}var d=e.DataType.Object;if(c.dataType)d=c.dataType;else{var g=this.getCellData(t,o,!1);d=e.getType(g)}if(e.isBoolean(c.isRequired))if(c.isRequired||""!==n&&null!==n){if(c.isRequired&&(""===n||null===n))return!1}else n=null,r=!1;if(r&&(n=e.changeType(n,d,c.format),d!=e.DataType.Object&&e.getType(n)!=d))return!1}if(a.dataItem&&c.binding){var p=c._binding,f=a.dataItem,_=p.getValue(f);if(n!==_&&!e.DateTime.equals(n,_)){p.setValue(f,n);var w=this._g.collectionView;if(w instanceof e.collections.CollectionView&&f!=w.currentEditItem){var m=new e.collections.NotifyCollectionChangedEventArgs(e.collections.NotifyCollectionChangedAction.Change,f,w.items.indexOf(f));w.onCollectionChanged(m)}}}else a._ubv||(a._ubv={}),a._ubv[l._hash]=n;return s&&this._g&&this._g.invalidate(),!0},o.prototype.getCellBoundingRect=function(t,i,o){var n=this.rows[t],r=this.columns[i],s=new e.Rect(r.pos,n.pos,r.renderSize,n.renderSize);if(this._g.rightToLeft&&(s.left=this.hostElement.clientWidth-s.right,!e.isIE()&&!e.isFirefox())){var l=this.hostElement.parentElement;s.left-=l.offsetWidth-l.clientWidth}if(!o){var a=this.hostElement.getBoundingClientRect();s.left+=a.left,s.top+=a.top-this._offsetY}return t<this.rows.frozen&&(s.top-=this._g.scrollPosition.y),i<this.columns.frozen&&(s.left-=this._g.scrollPosition.x*(this._g.rightToLeft?-1:1)),s},o.prototype.getCellElement=function(e,t){for(var i=this.hostElement.children,n=Math.min(e+2,i.length),r=0;r<n;r++)for(var s=i[r].children,l=Math.min(t+2,s.length),a=0;a<l;a++){var c=s[a],h=c[o._INDEX_KEY];if(h&&(h.row==e&&h.col==t||h.rng&&h.rng.contains(e,t)))return c}return null},o.prototype.getSelectedState=function(e,o,n){var r=this._g,s=r.selectionMode,l=r._selHdl.selection,a=t.SelectionMode,c=t.SelectedState;if(s!=a.None)switch(this._ct){case i.Cell:if(n||(n=r.getMergedRange(this,e,o)),n){if(n.contains(l.row,l.col))return r.showMarquee?c.None:c.Cursor;if(n.intersects(l))return c.Selected}if(l.row==e&&l.col==o)return r.showMarquee?c.Active:c.Cursor;if(r.rows[e].isSelected||r.columns[o].isSelected)return c.Selected;if(n)switch(s){case a.Row:case a.RowRange:case a.ListBox:if(n.containsRow(l.row))return c.Selected}return l=r._selHdl._adjustSelection(l),s==t.SelectionMode.ListBox?c.None:l.containsRow(e)&&l.containsColumn(o)?c.Selected:c.None;case i.ColumnHeader:if(r.showSelectedHeaders&t.HeadersVisibility.Column&&(r.columns[o].isSelected||l.containsColumn(o)||l.intersectsColumn(n))&&(n&&(e=n.bottomRow),e==this.rows.length-1))return c.Selected;break;case i.RowHeader:if(r.showSelectedHeaders&t.HeadersVisibility.Row&&(r.rows[e].isSelected||l.containsRow(e)||l.intersectsRow(n))&&(n&&(o=n.rightCol),o==this.columns.length-1))return c.Selected}return c.None},Object.defineProperty(o.prototype,"hostElement",{get:function(){return this._e},enumerable:!0,configurable:!0}),o.prototype._getOffsetY=function(){return this._offsetY},o.prototype._updateContent=function(e,o,n){var r=this._g,s=this._e,l=this._rows,a=this._cols,c=this._ct;if(c==i.ColumnHeader||c==i.ColumnFooter||c==i.RowHeader){var h=r._ptScrl,u=s.style;c==i.RowHeader?u.top=h.y+"px":r.rightToLeft?u.right=h.x+"px":u.left=h.x+"px"}this._offsetY!=n&&(e=!1,this._offsetY=n);var d=this._getViewRange(),g=d;if(l.length<=r.virtualizationThreshold)g=new t.CellRange(0,0,l.length-1,a.length-1);else if(g.isValid&&r.isTouching){g=new t.CellRange(Math.max(d.row-6,l.frozen),Math.max(d.col-1,a.frozen),Math.min(d.row2+6,l.length-1),Math.min(d.col2+1,a.length-1))}if(e&&!o&&this._vrb.contains(d)&&!l.frozen&&!a.frozen)return this._activeCell;e&&g.equals(this._vrb)||(o=!1),e&&!o&&this._ct!=i.TopLeft&&this._reorderCells(g,this._vrb),this._activeCell=null,this._vru=d,this._vrb=g,this._cf=r.cellFactory;var p=0;this._ct==i.Cell&&(p=this._renderColHdrRow(g,o));for(f=0;f<l.frozen&&f<l.length;f++)p=this._renderRow(f,g,o,p);for(var f=g.topRow;f<=g.bottomRow&&f>-1;f++)p=this._renderRow(f,g,o,p);for(;s.childElementCount>p;){var _=s.lastElementChild;s.removeChild(_),this._removeExtraCells(_,0)}return this._activeCell},o.prototype._updateScrollPosition=function(){var e=this._g,t=e._ptScrl,o=this.hostElement.style;this.cellType==i.RowHeader?o.top=t.y+"px":e.rightToLeft?o.right=t.x+"px":o.left=t.x+"px"},o.prototype._clearCells=function(){for(var e=this.hostElement,t=e.childElementCount-1;t>=0;t--){var i=e.children[t];e.removeChild(i);for(var o=i.childElementCount-1;o>=0;o--)this._cf.disposeCell(i.children[o])}},o.prototype._reorderCells=function(e,t){if(!(this._rows.frozen>0||this._cols.frozen>0||e.columnSpan!=t.columnSpan||e.rowSpan!=t.rowSpan)&&t.isValid&&e.isValid&&e.intersects(t)&&e.row!=t.row){var o=e.row-t.row,n=Math.max(1,e.rowSpan-1),r=this._e;if(0!=o&&Math.abs(o)<n){var s=this._ct==i.Cell?1:0,l=r.childElementCount;if(o>0){var a=s,c=Math.min(s+o,l-1);(h=this._createRange(a,c))&&c<l-1&&r.appendChild(h.extractContents())}if(o<0){var c=l,a=Math.max(s,c+o),h=this._createRange(a,c);if(h&&a>s){var u=r.children[s];r.insertBefore(h.extractContents(),u)}}}}},o.prototype._createRange=function(e,t){var i,o=this._e.childElementCount;return t>e&&t<=o&&e>-1&&((i=document.createRange()).setStart(this._e,e),i.setEnd(this._e,t)),i},o.prototype._renderColHdrRow=function(t,i){var o=this._e.children[0];o||(o=e.createElement('<div class="wj-row" tabindex="-1" role="row"></div>',this._e)),e.setAttribute(o,"aria-selected",null);var n=0,r=this._g._getRowHeaderPath();r&&(n=this._renderRowHdrCell(o,-1,r.path));for(s=0;s<this.columns.frozen&&s<this.columns.length;s++)n=this._renderColHdrCell(o,s,t,i,n);for(var s=t.leftCol;s<=t.rightCol&&s>-1;s++)n=this._renderColHdrCell(o,s,t,i,n);return this._removeExtraCells(o,n),1},o.prototype._renderColHdrCell=function(t,i,n,r,s){var l=this.columns[i];if(l.renderSize<=0)return s;var a=t.children[s];a||(a=e.createElement('<div class="wj-cell" tabindex="-1" role="columnheader"></div>',t)),r||(a.textContent=this.columns[i].header,e.setCss(a,{position:"fixed",top:-32e3,height:.1,left:l.pos,width:l.renderWidth,overflow:"hidden",opacity:"0",pointerEvents:"none"}));var c=this.grid;if(c.allowSorting){var h="none";switch(c._getBindingColumn(this,0,l).currentSort){case"+":h="ascending";break;case"-":h="descending"}e.setAttribute(a,"aria-sort",h)}return c.isReadOnly||(e.setAttribute(a,"aria-readonly",l.isReadOnly),e.setAttribute(a,"aria-required",l.getIsRequired())),a[o._INDEX_KEY]={row:-1,col:i,panel:this},s+1},o.prototype._renderRowHdrCell=function(t,i,n){var r=t.children[0];return r||(r=e.createElement('<div class="wj-cell" tabindex="-1"></div>',t)),r.setAttribute("role",i<0?"columnheader":"rowheader"),r.textContent=n?n.toString():"",e.setCss(r,{position:"fixed",left:-32e3,top:-32e3,width:.1,height:.1,overflow:"hidden",opacity:"0"}),r[o._INDEX_KEY]={row:i,col:-1,panel:this},1},o.prototype._renderRow=function(o,n,r,s){var l=this._g,a=this.rows[o];if(a.renderSize<=0)return s;var c=this._e.children[s];if(c||(c=e.createElement('<div class="wj-row" tabindex="-1"></div>',this._e),this._ct==i.Cell&&c.setAttribute("role","row")),this._ct==i.Cell){var h=t.SelectionMode;switch(l.selectionMode){case h.Row:case h.RowRange:case h.ListBox:var u=a.isSelected||this._g._selHdl.selection.containsRow(o);e.setAttribute(c,"aria-selected",!!u)}e.setAttribute(c,"aria-level",a instanceof t.GroupRow?a.level+1:null),e.setAttribute(c,"aria-expanded",a instanceof t.GroupRow?!a.isCollapsed:null)}var d=0;if(this._ct==i.Cell){var g=this._g._getRowHeaderPath();g&&(d=this._renderRowHdrCell(c,o,g.getValue(a.dataItem)))}for(p=0;p<this.columns.frozen&&p<this.columns.length;p++)d=this._renderCell(c,o,p,n,r,d);for(var p=n.leftCol;p<=n.rightCol&&p>-1;p++)d=this._renderCell(c,o,p,n,r,d);return this._removeExtraCells(c,d),s+1},o.prototype._renderCell=function(n,r,s,l,a,c){var h=this._g,u=h.getMergedRange(this,r,s);if(u){for(d=Math.max(l.row,u.row);d<r;d++)if(this.rows[d].isVisible)return c;for(var d=Math.max(l.col,u.col);d<s;d++)if(this.columns[d].isVisible)return c}var g=this.columns[s];if(g.renderSize<=0&&(!u||u.getRenderSize(this).width<=0))return c;var p=n.children[c],f=t.SelectedState,_=this.getSelectedState(r,s,u),w=_==f.Cursor||_==f.Active;return p&&a?(e.toggleClass(p,"wj-state-active",w),e.toggleClass(p,"wj-state-selected",_==f.Cursor),e.toggleClass(p,"wj-state-multi-selected",_==f.Selected),w&&(this._activeCell=p),c+1):(p||((p=document.createElement("div")).tabIndex=-1,this._ct==i.Cell&&p.setAttribute("role","gridcell"),n.appendChild(p)),w&&(this._activeCell=p),h.cellFactory.updateCell(this,r,s,p,u),p[o._INDEX_KEY]={row:r,col:s,rng:u,panel:this},this._ct==i.Cell&&(e.setAttribute(p,"aria-selected",_!=f.None),e.setAttribute(p,"aria-readonly",!h.canEditCell(r,s)||null),e.setAttribute(p,"aria-required",g.getIsRequired())),c+1)},o.prototype._removeExtraCells=function(e,t){for(;e.childElementCount>t;){var i=e.lastElementChild;e.removeChild(i),this._cf.disposeCell(i)}},o.prototype._getViewRange=function(){var e=this._g,o=e._ptScrl,n=this._rows,r=this._cols,s=new t.CellRange(0,0,n.length-1,r.length-1);if(this._ct==i.Cell||this._ct==i.RowHeader){var l=-o.y+this._offsetY,a=e._szClient.height;if((d=Math.min(n.frozen,n.length-1))>0&&(l+=g=n[d-1].pos,a-=g),s.row=Math.min(n.length-1,Math.max(n.frozen,n.getItemAt(l+1))),s.row2=n.getItemAt(l+a+1),e._clipToScreen){var c=e.hostElement.getBoundingClientRect();c.top<0&&(s.row=Math.max(s.row,n.getItemAt(-c.top-e._ptScrl.y)-1)),c.bottom>innerHeight&&(s.row2=Math.min(s.row2,n.getItemAt(-c.top-e._ptScrl.y+innerHeight)+1))}}if(this._ct==i.Cell||this._ct==i.ColumnHeader){var h=-o.x,u=e._szClient.width,d=Math.min(r.frozen,r.length-1);if(d>0){var g=r[d-1].pos;h+=g,u-=g}s.col=Math.min(r.length-1,Math.max(r.frozen,r.getItemAt(h+1))),s.col2=r.getItemAt(h+u+1)}return n.length<=n.frozen&&(s.row=s.row2=-1),r.length<=r.frozen&&(s.col=s.col2=-1),s},o.prototype._getFrozenPos=function(){var t=this._rows.frozen,i=this._cols.frozen,o=t>0?this._rows[t-1]:null,n=i>0?this._cols[i-1]:null,r=o?o.pos+o.renderSize:0,s=n?n.pos+n.renderSize:0;return new e.Point(s,r)},o._INDEX_KEY="wj-cell-index",o}();t.GridPanel=o}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(e){!function(t){"use strict";var i=function(){function i(){}return i.prototype.updateCell=function(o,n,r,s,l,a){var c=o.grid,h=c.rightToLeft,u=t.CellType,d=o.rows,g=o.columns,p=d[n],f=g[r],_=n,w=r,m=p instanceof t.GroupRow?p:null,y=p instanceof t._NewRowTemplate?p:null,v=f.renderWidth,C=p.renderHeight,b=o.cellType,R="wj-cell",E={display:""};if(0!=a&&s.firstElementChild&&(1==s.childNodes.length&&"checkbox"==s.firstElementChild.type||(s.textContent="")),l&&!l.isSingleCell){n=l.row,r=l.col,_=l.row2,w=l.col2,p=d[n],f=g[r],m=p instanceof t.GroupRow?p:null;var S=l.getRenderSize(o);C=S.height,v=S.width}var x=c._getBindingColumn(o,n,f),z=x.dataType==e.DataType.Boolean&&!x.dataMap,T=f.pos,H=p.pos;if(c._useFrozenDiv()&&b==u.Cell&&!c.editRange?(n<d.frozen&&r>=g.frozen&&(T+=c._ptScrl.x),r<g.frozen&&n>=d.frozen&&(H+=c._ptScrl.y)):(n<d.frozen&&(H-=c._ptScrl.y),r<g.frozen&&(T-=c._ptScrl.x)),h?E.right=T+"px":E.left=T+"px",E.top=H-o._getOffsetY()+"px",E.width=v+"px",E.height=C+"px",E.zIndex="",(n<d.frozen||r<g.frozen)&&(E.zIndex=n<d.frozen&&r<g.frozen?2:1),b==u.Cell?(m&&(R+=" wj-group"),c.showAlternatingRows&&p.visibleIndex%2!=0&&(l&&l.row!=l.row2||(R+=" wj-alt")),(n<d.frozen||r<g.frozen)&&(R+=" wj-frozen"),y&&(R+=" wj-new"),p.cssClass&&(R+=" "+p.cssClass),x.cssClass&&(R+=" "+x.cssClass)):(R+=" wj-header",c.showAlternatingRows&&n%2!=0&&(R+=" wj-header-alt")),(b==u.Cell||b==u.RowHeader)&&c._getShowErrors()){var P=c._getError(o,n,r);e.setAttribute(s,"title",P),P&&(R+=" wj-state-invalid")}var M=t.SelectedState,j=o.getSelectedState(n,r,l);switch(j!=M.None&&b==u.Cell&&!z&&c.editRange&&c.editRange.contains(n,r)&&(j=M.None),j){case M.Active:R+=" wj-state-active";break;case M.Cursor:R+=" wj-state-selected wj-state-active";break;case M.Selected:R+=" wj-state-multi-selected"}if(_==d.frozen-1&&(R+=" wj-frozen-row"),w==g.frozen-1&&(R+=" wj-frozen-col"),(x.wordWrap||p.wordWrap)&&(R+=" wj-wrap"),(x.multiLine||p.multiLine)&&(R+=" wj-multiline"),E.textAlign=x.getAlignment(),E.textAlignLast=E.textJustify="","justify-all"==E.textAlign&&(E.textAlign=E.textAlignLast="justify",E.textJustify="distribute"),E.paddingLeft=E.paddingRight=E.paddingTop=E.paddingBottom="",b==u.Cell&&c.rows.maxGroupLevel>-1&&r==c.columns.firstVisibleIndex&&c.treeIndent){var A=m?Math.max(0,m.level):c.rows.maxGroupLevel+1,L=c.treeIndent*A+c._cellPadding;h?E.paddingRight=L+"px":E.paddingLeft=L+"px"}if(0!=a){var D=o.getCellData(n,r,!1),O=o.getCellData(n,r,!0);if(b==u.Cell&&r==c.columns.firstVisibleIndex&&m&&m.hasChildren&&!this._isEditingCell(c,n,r))O||(O=m.getGroupHeader()),s.innerHTML=this._getTreeIcon(m)+" "+O,E.textAlign="";else if(b==u.ColumnHeader&&x.currentSort&&c.showSort&&(_==c._getSortRowIndex()||x!=f))R+=" wj-sort-"+("+"==x.currentSort?"asc":"desc"),s.innerHTML=e.escapeHtml(O)+"&nbsp;"+this._getSortIcon(x);else if(b!=u.RowHeader||r!=c.rowHeaders.columns.length-1||O)if(b!=u.Cell||x.dataType!=e.DataType.Boolean||x.dataMap||m&&!e.isBoolean(D))if(b==u.Cell&&this._isEditingCell(c,n,r)){var I=x.inputType;if(x.inputType||(I=x.dataType!=e.DataType.Number||x.dataMap?"text":"tel"),!x.dataMap&&!x.mask){var N=o.getCellData(n,r,!1);if(e.isNumber(N)){var k=N.toString(),B=x.format;if(B&&N!=Math.round(N)){var F=k.match(/\.(\d+)/)[1].length;B=B.replace(/([a-z])(\d*)(.*)/gi,"$01"+F+"$3")}O=e.Globalize.formatNumber(N,B,!0)}}s.innerHTML=(x.multiLine||p.multiLine)&&"checkbox"!=I?"<textarea></textarea>":'<input type="'+I+'"/>';var V=s.children[0];e.addClass(V,"wj-grid-editor wj-form-control"),e.disableAutoComplete(V),V.value=O,V.required=x.getIsRequired(),x.maxLength&&(V.maxLength=x.maxLength),V.style.textAlign=x.getAlignment(),E.paddingTop=E.paddingBottom="0px",x.mask&&new e._MaskProvider(V,x.mask),c._edtHdl._edt=V}else b==u.Cell&&(p.isContentHtml||x.isContentHtml)?s.innerHTML=O:s.textContent=O||"";else{var G=s.firstChild;G instanceof HTMLInputElement&&"checkbox"==G.type||(s.innerHTML='<input type="checkbox" class="wj-cell-check" tabindex="-1"/>',G=s.firstChild),G.checked=1==D,G.indeterminate=null==D,G.disabled=!c.canEditCell(n,r),G.disabled&&(G.style.cursor="default"),c.editRange&&c.editRange.contains(n,r)&&(c._edtHdl._edt=G)}else{var K=c.editableCollectionView,W=K?K.currentEditItem:null;W&&p.dataItem==W?s.innerHTML='<span class="wj-glyph-pencil"></span>':p instanceof t._NewRowTemplate&&(s.innerHTML='<span class="wj-glyph-asterisk"></span>')}if(b==u.Cell&&e.input&&x.dataMap&&c.showDropDown&&0!=x.showDropDown&&c.canEditCell(n,r)){i._ddIcon||(i._ddIcon=e.createElement('<div role="button" class="'+i._WJC_DROPDOWN+'"><span class="wj-glyph-down"></span></div>'));var q=i._ddIcon.cloneNode(!0);s.appendChild(q)}}var U=!1;switch(b){case u.RowHeader:U=!m&&!y&&p.allowDragging&&0!=(c.allowDragging&t.AllowDragging.Rows),e.setAttribute(s,"draggable",U?"true":null);break;case u.ColumnHeader:U=f.allowDragging&&0!=(c.allowDragging&t.AllowDragging.Columns),e.setAttribute(s,"draggable",U?"true":null)}s.className!=R&&(s.className=R);var Y=s.style;for(var J in E)Y[J]=E[J];if(c._edtHdl._edt&&c._edtHdl._edt.parentElement==s){var X=c._root,Z=X.getBoundingClientRect(),Q=s.getBoundingClientRect(),$=Z.top+X.clientHeight-Q.top,ee=Z.left+X.clientWidth-Q.left;Q.height>$&&(s.style.height=$+"px"),Q.width>ee&&(s.style.width=ee+"px")}if(c.itemFormatter&&c.itemFormatter(o,n,r,s),c.formatItem.hasHandlers){var te=i._fmtRng;te?te.setRange(n,r,_,w):te=i._fmtRng=new t.CellRange(n,r,_,w);var ie=new t.FormatItemEventArgs(o,te,s);c.onFormatItem(ie)}},i.prototype.disposeCell=function(e){},i.prototype.getEditorValue=function(t){var i=t._edtHdl._edt;if(i instanceof HTMLInputElement&&"checkbox"==i.type)return i.checked;if(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement){var o=i.maxLength;return e.isNumber(o)&&o>-1&&i.value.length>o?i.value.substr(0,o):i.value}return null},i.prototype._isEditingCell=function(e,t,i){return e.editRange&&e.editRange.contains(t,i)},i.prototype._getTreeIcon=function(e){var t="wj-glyph-"+(e.isCollapsed?"":"down-")+(e.grid.rightToLeft?"left":"right");return'<span role="button" class="'+i._WJC_COLLAPSE+" "+t+'"></span>'},i.prototype._getSortIcon=function(e){return'<span class="wj-glyph-'+("+"==e.currentSort?"up":"down")+'"></span>'},i._WJC_COLLAPSE="wj-elem-collapse",i._WJC_DROPDOWN="wj-elem-dropdown",i}();t.CellFactory=i}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(e){!function(t){"use strict";var i=function(){function t(e,t,i,o){void 0===e&&(e=-1),void 0===t&&(t=-1),void 0===i&&(i=e),void 0===o&&(o=t),this.setRange(e,t,i,o)}return t.prototype.setRange=function(t,i,o,n){void 0===t&&(t=-1),void 0===i&&(i=-1),void 0===o&&(o=t),void 0===n&&(n=i),this._row=e.asInt(t),this._col=e.asInt(i),this._row2=e.asInt(o),this._col2=e.asInt(n)},Object.defineProperty(t.prototype,"row",{get:function(){return this._row},set:function(t){this._row=e.asInt(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"col",{get:function(){return this._col},set:function(t){this._col=e.asInt(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"row2",{get:function(){return this._row2},set:function(t){this._row2=e.asInt(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"col2",{get:function(){return this._col2},set:function(t){this._col2=e.asInt(t)},enumerable:!0,configurable:!0}),t.prototype.clone=function(){return new t(this._row,this._col,this._row2,this._col2)},Object.defineProperty(t.prototype,"rowSpan",{get:function(){return Math.abs(this._row2-this._row)+1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnSpan",{get:function(){return Math.abs(this._col2-this._col)+1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topRow",{get:function(){return Math.min(this._row,this._row2)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottomRow",{get:function(){return Math.max(this._row,this._row2)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"leftCol",{get:function(){return Math.min(this._col,this._col2)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rightCol",{get:function(){return Math.max(this._col,this._col2)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this._row>-1&&this._col>-1&&this._row2>-1&&this._col2>-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSingleCell",{get:function(){return this._row==this._row2&&this._col==this._col2},enumerable:!0,configurable:!0}),t.prototype.contains=function(i,o){var n=e.tryCast(i,t);if(n)return n.topRow>=this.topRow&&n.bottomRow<=this.bottomRow&&n.leftCol>=this.leftCol&&n.rightCol<=this.rightCol;if(e.isInt(i)&&e.isInt(o))return i>=this.topRow&&i<=this.bottomRow&&o>=this.leftCol&&o<=this.rightCol;throw"contains expects a CellRange or row/column indices."},t.prototype.containsRow=function(t){return e.asInt(t)>=this.topRow&&t<=this.bottomRow},t.prototype.containsColumn=function(t){return e.asInt(t)>=this.leftCol&&t<=this.rightCol},t.prototype.intersects=function(e){return this.intersectsRow(e)&&this.intersectsColumn(e)},t.prototype.intersectsRow=function(e){return e&&!(this.bottomRow<e.topRow||this.topRow>e.bottomRow)},t.prototype.intersectsColumn=function(e){return e&&!(this.rightCol<e.leftCol||this.leftCol>e.rightCol)},t.prototype.getRenderSize=function(t){var i=new e.Size(0,0);if(this.isValid){for(var o=this.topRow;o<=this.bottomRow;o++)i.height+=t.rows[o].renderSize;for(var n=this.leftCol;n<=this.rightCol;n++)i.width+=t.columns[n].renderSize}return i},t.prototype.equals=function(e){return e instanceof t&&this._row==e._row&&this._col==e._col&&this._row2==e._row2&&this._col2==e._col2},t}();t.CellRange=i}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),wijmo;!function(e){!function(t){"use strict";var i;!function(e){e[e.Visible=1]="Visible",e[e.AllowResizing=2]="AllowResizing",e[e.AllowDragging=4]="AllowDragging",e[e.AllowMerging=8]="AllowMerging",e[e.AllowSorting=16]="AllowSorting",e[e.AutoGenerated=32]="AutoGenerated",e[e.Collapsed=64]="Collapsed",e[e.ParentCollapsed=128]="ParentCollapsed",e[e.Selected=256]="Selected",e[e.ReadOnly=512]="ReadOnly",e[e.HtmlContent=1024]="HtmlContent",e[e.WordWrap=2048]="WordWrap",e[e.MultiLine=4096]="MultiLine",e[e.HasTemplate=8192]="HasTemplate",e[e.RowDefault=3]="RowDefault",e[e.ColumnDefault=23]="ColumnDefault"}(i=t.RowColFlags||(t.RowColFlags={}));var o=function(){function o(){this._list=null,this._pos=0,this._idx=-1,this._vidx=-1}return Object.defineProperty(o.prototype,"visible",{get:function(){return this._getFlag(i.Visible)},set:function(e){this._setFlag(i.Visible,e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isVisible",{get:function(){return!!this._getFlag(i.Visible)&&(!this._getFlag(i.ParentCollapsed)||this instanceof t._NewRowTemplate)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"pos",{get:function(){return this._list&&this._list._dirty&&this._list._update(),this._pos},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"index",{get:function(){return this._list&&this._list._dirty&&this._list._update(),this._idx},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"visibleIndex",{get:function(){return this._list&&this._list._dirty&&this._list._update(),this.isVisible?this._vidx:-1},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"size",{get:function(){return this._sz},set:function(t){t!=this._sz&&(this._sz=e.asNumber(t,!0),this.onPropertyChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"renderSize",{get:function(){if(!this.isVisible)return 0;var e=this._sz,t=this._list;return t&&((null==e||e<0)&&(e=Math.round(t.defaultSize)),null!=t.minSize&&e<t.minSize&&(e=t.minSize),null!=t.maxSize&&e>t.maxSize&&(e=t.maxSize)),null!=this._szMin&&e<this._szMin&&(e=this._szMin),null!=this._szMax&&e>this._szMax&&(e=this._szMax),Math.round(e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"allowResizing",{get:function(){return this._getFlag(i.AllowResizing)},set:function(e){this._setFlag(i.AllowResizing,e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"allowDragging",{get:function(){return this._getFlag(i.AllowDragging)},set:function(e){this._setFlag(i.AllowDragging,e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"allowMerging",{get:function(){return this._getFlag(i.AllowMerging)},set:function(e){this._setFlag(i.AllowMerging,e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isSelected",{get:function(){return this._getFlag(i.Selected)},set:function(e){if(this._setFlag(i.Selected,e,!0)){var t=this.grid;t&&t.refreshCells(!1,!0,!0)}},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isReadOnly",{get:function(){return this._getFlag(i.ReadOnly)},set:function(e){this._setFlag(i.ReadOnly,e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isContentHtml",{get:function(){return this._getFlag(i.HtmlContent)},set:function(e){this.isContentHtml!=e&&(this._setFlag(i.HtmlContent,e),this.grid&&this.grid.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"wordWrap",{get:function(){return this._getFlag(i.WordWrap)},set:function(e){this._setFlag(i.WordWrap,e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"multiLine",{get:function(){return this._getFlag(i.MultiLine)},set:function(e){this._setFlag(i.MultiLine,e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"cssClass",{get:function(){return this._cssClass},set:function(t){t!=this._cssClass&&(this._cssClass=e.asString(t),this.grid&&this.grid.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"grid",{get:function(){return this._list?this._list._g:null},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"collectionView",{get:function(){return this.grid?this.grid.collectionView:null},enumerable:!0,configurable:!0}),o.prototype.onPropertyChanged=function(){this._list&&(this._list._dirty=!0,this.grid.invalidate())},o.prototype._getFlag=function(e){return 0!=(this._f&e)},o.prototype._setFlag=function(e,t,i){return t!=this._getFlag(e)&&(this._f=t?this._f|e:this._f&~e,i||this.onPropertyChanged(),!0)},o}();t.RowCol=o;var n=function(o){function n(t){var r=o.call(this)||this;return r._f=i.ColumnDefault,r._hash=n._ctr.toString(36),n._ctr++,t&&e.copy(r,t),r}return __extends(n,o),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dataType",{get:function(){return this._type},set:function(t){t=e.asEnum(t,e.DataType),this._type!=t&&(this._type=t,this.grid&&this.grid.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isRequired",{get:function(){return this._required},set:function(t){this._required=e.asBoolean(t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showDropDown",{get:function(){return this._showDropDown},set:function(t){t!=this._showDropDown&&(this._showDropDown=e.asBoolean(t,!0),this.grid&&this.grid.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dropDownCssClass",{get:function(){return this._ddCssClass},set:function(t){this._ddCssClass=e.asString(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputType",{get:function(){return this._inpType},set:function(t){this._inpType=e.asString(t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"mask",{get:function(){return this._mask},set:function(t){this._mask=e.asString(t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxLength",{get:function(){return this._maxLen},set:function(t){this._maxLen=e.asNumber(t,!0,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"binding",{get:function(){return this._binding?this._binding.path:null},set:function(t){if(t!=this.binding){var i=e.asString(t);if(this._binding=i?new e.Binding(i):null,!this._type&&this.grid&&this._binding){var o=this.grid.collectionView;if(o&&o.sourceCollection&&o.sourceCollection.length){var n=o.sourceCollection[0];this._type=e.getType(this._binding.getValue(n))}}this.onPropertyChanged()}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"sortMemberPath",{get:function(){return this._bindingSort?this._bindingSort.path:null},set:function(t){if(t!=this.sortMemberPath){var i=e.asString(t);this._bindingSort=i?new e.Binding(i):null,this.onPropertyChanged()}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"width",{get:function(){return null!=this._szStar?this._szStar:this.size},set:function(t){null!=n._parseStarSize(t)?(this._szStar=t,this.onPropertyChanged()):(this._szStar=null,this.size=e.asNumber(t,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"minWidth",{get:function(){return this._szMin},set:function(t){t!=this._szMin&&(this._szMin=e.asNumber(t,!0,!0),this.onPropertyChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxWidth",{get:function(){return this._szMax},set:function(t){t!=this._szMax&&(this._szMax=e.asNumber(t,!0,!0),this.onPropertyChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"quickAutoSize",{get:function(){return this._quickSize},set:function(t){this._quickSize=e.asBoolean(t,!0)},enumerable:!0,configurable:!0}),n.prototype._getQuickAutoSize=function(){return!!this.grid._getQuickAutoSize()&&(e.isBoolean(this._quickSize)?this._quickSize:!(this.isContentHtml||this.wordWrap||this.multiLine||this._getFlag(i.HasTemplate)))},Object.defineProperty(n.prototype,"renderWidth",{get:function(){return this.renderSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"align",{get:function(){return this._align},set:function(e){this._align!=e&&(this._align=e,this.onPropertyChanged())},enumerable:!0,configurable:!0}),n.prototype.getAlignment=function(){var t=this._align;if(null==t&&(t="",!this._map))switch(this._type){case e.DataType.Boolean:t="center";break;case e.DataType.Number:t="right"}return t},n.prototype.getIsRequired=function(){return null!=this._required?this._required:this.dataType!=e.DataType.String||(null!=this.dataMap||null!=this._mask&&this._mask.length>0)},Object.defineProperty(n.prototype,"header",{get:function(){return this._hdr?this._hdr:this.binding},set:function(e){this._hdr!=e&&(this._hdr=e,this.onPropertyChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dataMap",{get:function(){return this._map},set:function(i){this._map!=i&&(this._map&&this._map.mapChanged.removeHandler(this.onPropertyChanged,this),e.isArray(i)&&(i=new t.DataMap(i,null,null)),this._map=e.asType(i,t.DataMap,!0),this._map&&this._map.mapChanged.addHandler(this.onPropertyChanged,this),this.onPropertyChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"format",{get:function(){return this._fmt},set:function(e){this._fmt!=e&&(this._fmt=e,this.onPropertyChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"allowSorting",{get:function(){return this._getFlag(i.AllowSorting)},set:function(e){this._setFlag(i.AllowSorting,e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"currentSort",{get:function(){var e=this.grid?this.grid.collectionView:null,t=e?e.sortDescriptions:null,i=t&&t.length?this._getBindingSort():null;if(i)for(var o=0;o<t.length;o++)if(t[o].property==i)return t[o].ascending?"+":"-";return null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"aggregate",{get:function(){return null!=this._agg?this._agg:e.Aggregate.None},set:function(t){(t=e.asEnum(t,e.Aggregate))!=this._agg&&(this._agg=t,this.onPropertyChanged())},enumerable:!0,configurable:!0}),n.prototype._getBindingSort=function(){return this.sortMemberPath?this.sortMemberPath:this.binding?this.binding:null},n._parseStarSize=function(t){if(e.isString(t)&&t.length>0&&"*"==t[t.length-1]){var i=1==t.length?1:1*t.substr(0,t.length-1);if(i>0&&!isNaN(i))return i}return null},n._ctr=0,n}(o);t.Column=n;var r=function(e){function t(t){var o=e.call(this)||this;return o._f=i.ColumnDefault,o._data=t,o}return __extends(t,e),Object.defineProperty(t.prototype,"dataItem",{get:function(){return this._data},set:function(e){this._data=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.size},set:function(e){this.size=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderHeight",{get:function(){return this.renderSize},enumerable:!0,configurable:!0}),t}(o);t.Row=r;var s=function(o){function n(){var e=o.call(this)||this;return e._level=-1,e.isReadOnly=!0,e}return __extends(n,o),Object.defineProperty(n.prototype,"level",{get:function(){return this._level},set:function(t){e.asInt(t),t!=this._level&&(this._level=t,this.onPropertyChanged())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hasChildren",{get:function(){if(null!=this.grid&&null!=this._list){this._list._update();var i=this.index<this._list.length-1?this._list[this.index+1]:null,o=e.tryCast(i,n),r=e.tryCast(i,t._NewRowTemplate);return null!=i&&null==r&&(null==o||o.level>this.level)}return!0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isCollapsed",{get:function(){return this._getFlag(i.Collapsed)},set:function(t){e.asBoolean(t),t!=this.isCollapsed&&null!=this._list&&this._setCollapsed(t)},enumerable:!0,configurable:!0}),n.prototype.getGroupHeader=function(){var t=this.grid,i=t.groupHeaderFormat?t.groupHeaderFormat:e.culture.FlexGrid.groupHeaderFormat,o=e.tryCast(this.dataItem,e.collections.CollectionViewGroup);if(o&&i){var n=o.groupDescription.propertyName,r=o.name,s=t.getColumn(n),l=this.isContentHtml;s&&(l=l||s.isContentHtml,s.header&&(n=s.header),s.dataMap?r=s.dataMap.getDisplayValue(r):s.format&&(r=e.Globalize.format(r,s.format)));var a=o.getAggregate(e.Aggregate.CntAll,null,t.collectionView);return e.format(i,{name:e.escapeHtml(n),value:l?r:e.escapeHtml(r),level:o.level,count:a})}return""},n.prototype._setCollapsed=function(o){var r,s=this,l=this.grid,a=l.rows,c=this.getCellRange(),h=new t.CellRangeEventArgs(l.cells,new t.CellRange(this.index,-1));l.onGroupCollapsedChanging(h),h.cancel||(l.deferUpdate(function(){s._setFlag(i.Collapsed,o);for(var t=c.topRow+1;t<=c.bottomRow&&t>-1&&t<a.length;t++)a[t]._setFlag(i.ParentCollapsed,o),null!=(r=e.tryCast(a[t],n))&&r.isCollapsed&&(t=r.getCellRange().bottomRow)}),l.onGroupCollapsedChanged(h))},n.prototype.getCellRange=function(){for(var i=this._list,o=this.index,r=i.length-1,s=o+1;s<=r;s++){var l=e.tryCast(i[s],n);if(null!=l&&l.level<=this.level){r=s-1;break}}return new t.CellRange(o,0,r,this.grid.columns.length-1)},n}(r);t.GroupRow=s;var l=function(i){function o(o,n){var r=i.call(this)||this;return r._frozen=0,r._vlen=0,r._szDef=28,r._szTot=0,r._dirty=!1,r._g=e.asType(o,t.FlexGrid),r._szDef=e.asNumber(n,!1,!0),r}return __extends(o,i),Object.defineProperty(o.prototype,"defaultSize",{get:function(){return this._szDef},set:function(t){this._szDef!=t&&(this._szDef=e.asNumber(t,!1,!0),this._dirty=!0,this._g.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"frozen",{get:function(){return this._frozen},set:function(t){t!=this._frozen&&(this._frozen=e.asNumber(t,!1,!0),this._dirty=!0,this._g.invalidate())},enumerable:!0,configurable:!0}),o.prototype.isFrozen=function(e){return e<this.frozen},Object.defineProperty(o.prototype,"minSize",{get:function(){return this._szMin},set:function(t){t!=this._szMin&&(this._szMin=e.asNumber(t,!0,!0),this._dirty=!0,this._g.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"maxSize",{get:function(){return this._szMax},set:function(t){t!=this._szMax&&(this._szMax=e.asNumber(t,!0,!0),this._dirty=!0,this._g.invalidate())},enumerable:!0,configurable:!0}),o.prototype.getTotalSize=function(){return this._dirty&&this._update(),this._szTot},Object.defineProperty(o.prototype,"visibleLength",{get:function(){return this._dirty&&this._update(),this._vlen},enumerable:!0,configurable:!0}),o.prototype.getItemAt=function(e){if(this._dirty&&this._update(),e<=0&&this.length>0)return 0;e=Math.round(e);for(var t,i,o=this.length,n=0,r=o-1;n<=r;)if(t=n+r>>>1,(i=this[t])._pos>e&&t>0)r=t-1;else{if(!(i._pos+i.renderSize<=e&&t<o-1)){for(;t>0&&!this[t].visible;)t--;for(;t<o-1&&!this[t].visible;)t++;return t}n=t+1}return r},o.prototype.getNextCell=function(e,i,o){var n;switch(i){case t.SelMove.Next:for(n=e+1;n<this.length;n++)if(this[n].renderSize>0)return n;break;case t.SelMove.Prev:for(n=e-1;n>=0;n--)if(this[n].renderSize>0)return n;break;case t.SelMove.End:for(n=this.length-1;n>=0;n--)if(this[n].renderSize>0)return n;break;case t.SelMove.Home:for(n=0;n<this.length;n++)if(this[n].renderSize>0)return n;break;case t.SelMove.NextPage:return(n=this.getItemAt(this[e].pos+o))<0?this.getNextCell(e,t.SelMove.End,o):n==e&&n<this.length-1?n+1:n;case t.SelMove.PrevPage:return(n=this.getItemAt(this[e].pos-o))<0?this.getNextCell(e,t.SelMove.Home,o):n==e&&n>0?n-1:n}return e},o.prototype.canMoveElement=function(e,i){if(i==e)return!1;if(e<0||e>=this.length||i>=this.length)return!1;i<0&&(i=this.length-1);for(var o=Math.min(e,i),n=Math.max(e,i),r=o;r<=n;r++)if(!this[r].allowDragging)return!1;return!(this[i]instanceof t._NewRowTemplate)},o.prototype.moveElement=function(e,t){if(this.canMoveElement(e,t)){var i=this[e];this.removeAt(e),t<0&&(t=this.length),this.insert(t,i)}},o.prototype.onCollectionChanged=function(t){void 0===t&&(t=e.collections.NotifyCollectionChangedEventArgs.reset),this._dirty=!0,this._g.invalidate(),i.prototype.onCollectionChanged.call(this,t)},o.prototype.push=function(e){return e._list=this,i.prototype.push.call(this,e)},o.prototype.splice=function(e,t,o){return o&&(o._list=this),i.prototype.splice.call(this,e,t,o)},o.prototype.beginUpdate=function(){this._update(),i.prototype.beginUpdate.call(this)},o.prototype._update=function(){if(this._dirty&&!this.isUpdating){this._dirty=!1;for(var e=0,t=0,i=void 0,o=void 0,n=0;n<this.length;n++)(o=this[n])._idx=n,o._vidx=e,o._list=this,o._pos=t,(i=o.renderSize)>0&&(t+=i,e++);return this._vlen=e,this._szTot=t,!0}return!1},o}(e.collections.ObservableArray);t.RowColCollection=l;var a=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e._firstVisible=-1,e}return __extends(i,t),i.prototype.getColumn=function(t){var i=e.isNumber(t)?t:this.indexOf(t);return i>-1?this[i]:null},i.prototype.indexOf=function(e){if(e instanceof n)return t.prototype.indexOf.call(this,e);for(i=0;i<this.length;i++)if(this[i].name==e)return i;for(var i=0;i<this.length;i++)if(this[i].binding==e)return i;return-1},Object.defineProperty(i.prototype,"firstVisibleIndex",{get:function(){return this._dirty&&this._update(),this._firstVisible},enumerable:!0,configurable:!0}),i.prototype._update=function(){if(t.prototype._update.call(this)){this._firstVisible=-1;for(var e=0;e<this.length;e++)if(this[e].visible){this._firstVisible=e;break}return!0}return!1},i.prototype._updateStarSizes=function(e){for(var t,i=0,o=0;o<this.length;o++)(s=this[o]).isVisible&&(s._szStar?(i+=n._parseStarSize(s._szStar),t=s):e-=s.renderWidth);if(t){for(var r=e,o=0;o<this.length;o++){var s=this[o];s.isVisible&&s._szStar&&(s==t&&r>0?s._sz=r:(s._sz=Math.max(0,Math.round(n._parseStarSize(s._szStar)/i*e)),r-=s.renderWidth))}return this._dirty=!0,this._update(),!0}return!1},i}(l);t.ColumnCollection=a;var c=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e._maxLevel=-1,e}return __extends(i,t),Object.defineProperty(i.prototype,"maxGroupLevel",{get:function(){return this._dirty&&this._update(),this._maxLevel},enumerable:!0,configurable:!0}),i.prototype._update=function(){if(t.prototype._update.call(this)){this._maxLevel=-1;for(var i=0;i<this.length;i++){var o=e.tryCast(this[i],s);o&&o.level>this._maxLevel&&(this._maxLevel=o.level)}return!0}return!1},i}(l);t.RowCollection=c}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(e){var t;!function(i){"use strict";var o=function(){function o(t,n){this._row=-1,this._col=-1,this._edge=0;var r;if(t instanceof Element)(H=(T=e.closest(t,".wj-cell"))?T[i.GridPanel._INDEX_KEY]:null)&&(this._row=H.row,this._col=H.col,this._rng=H.rng,this._p=H.panel,this._g=H.panel.grid);else{if(t instanceof i.FlexGrid)r=this._g=t;else{if(!(t instanceof i.GridPanel))throw"First parameter should be a FlexGrid or GridPanel.";this._p=t,r=this._g=this._p.grid}var s;n instanceof MouseEvent&&(s=n,"mousedown"==n.type&&(r._rcBounds=null)),n=e.mouseToPage(n),this._pt=n.clone();var l=r.controlRect,a=r._szClient,c=r.topLeftCells,h=r._eTL,u=r.headersVisibility,d=i.HeadersVisibility,g=u&d.Row?c.columns.getTotalSize():0,p=u&d.Column?c.rows.getTotalSize():0,f=u&d.Column?p+h.offsetTop:0,_=r._eBL,w=_.offsetHeight;if(n.x-=l.left,n.y-=l.top,this._g.rightToLeft&&(n.x=l.width-n.x),!this._p&&n.x>=0&&n.y>=h.offsetTop&&a&&n.x<=a.width+g&&n.y<=a.height+f&&(n.y<f?this._p=n.x<g?r.topLeftCells:r.columnHeaders:n.y<_.offsetTop?this._p=n.x<g?r.rowHeaders:r.cells:this._p=n.x<g?r.bottomLeftCells:r.columnFooters),null!=this._p){var m=this._p.rows,y=this._p.columns,v=this._p.cellType,C=i.CellType,b=this._p._getFrozenPos(),R=v==C.TopLeft||v==C.ColumnHeader?p:v==C.BottomLeft||v==C.ColumnFooter?w:m.getTotalSize(),E=v==C.TopLeft||v==C.BottomLeft||v==C.RowHeader?g:y.getTotalSize();v==C.RowHeader||v==C.Cell?(n.y-=p,(n.y>b.y||b.y<=0)&&(n.y-=r._ptScrl.y,n.y+=this._p._getOffsetY())):v!=C.BottomLeft&&v!=C.ColumnFooter||(n.y-=_.offsetTop),v!=C.ColumnHeader&&v!=C.Cell&&v!=C.ColumnFooter||(n.x-=g,(n.x>b.x||b.x<=0)&&(n.x-=r._ptScrl.x)),v!=C.ColumnHeader&&v!=C.TopLeft||(n.y-=f-p),this._edge=0;var S=o._SZEDGE[this._g.isTouching?1:0];if(this._g.isTouching&&(S=o._SZEDGE[1],n.x-=S/2),this._row=n.y>R?-1:m.getItemAt(n.y),this._col=n.x>E?-1:y.getItemAt(n.x),this._row<0||this._col<0)return void(this._p=null);if(this._col>-1){var x=y[this._col];n.x-x.pos<=S&&(this._edge|=1),x.pos+x.renderSize-n.x<=S&&(this._edge|=4)}if(this._row>-1){var z=m[this._row];n.y-z.pos<=S&&(this._edge|=2),z.pos+z.renderSize-n.y<=S&&(this._edge|=8)}}if(!(8&this._edge)&&s instanceof MouseEvent){var T=e.closest(s.target,".wj-cell"),H=T?T[i.GridPanel._INDEX_KEY]:null;H&&!H.rng&&H.panel==this._p&&this._row!=H.row&&(this._row=H.row)}}}return Object.defineProperty(o.prototype,"point",{get:function(){return this._pt},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"cellType",{get:function(){return this._p?this._p.cellType:t.CellType.None},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"panel",{get:function(){return this._p},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"grid",{get:function(){return this._p?this._p.grid:null},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"row",{get:function(){return this._row},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"col",{get:function(){return this._col},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"range",{get:function(){return this._rng||(this._rng=new i.CellRange(this._row,this._col)),this._rng},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"edgeLeft",{get:function(){return 0!=(1&this._edge)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"edgeTop",{get:function(){return 0!=(2&this._edge)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"edgeRight",{get:function(){return 0!=(4&this._edge)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"edgeBottom",{get:function(){return 0!=(8&this._edge)},enumerable:!0,configurable:!0}),o._SZEDGE=[5,30],o}();i.HitTestInfo=o}(t=e.grid||(e.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(e){!function(t){"use strict";var i;!function(e){e[e.None=0]="None",e[e.Cells=1]="Cells",e[e.ColumnHeaders=2]="ColumnHeaders",e[e.RowHeaders=4]="RowHeaders",e[e.AllHeaders=6]="AllHeaders",e[e.All=7]="All"}(i=t.AllowMerging||(t.AllowMerging={}));var o=function(){function o(e){this._g=e}return o.prototype.getMergedRange=function(o,n,r,s){void 0===s&&(s=!0);var l,a,c=o.cellType,h=o.columns,u=o.rows,d=u[n],g=h[r];if(d instanceof t._NewRowTemplate)return null;if(d instanceof t.GroupRow&&d.dataItem instanceof e.collections.CollectionViewGroup){if(l=new t.CellRange(n,r),g.aggregate==e.Aggregate.None){for(;l.col>0&&h[l.col-1].aggregate==e.Aggregate.None&&l.col!=h.frozen;)l.col--;for(;l.col2<h.length-1&&h[l.col2+1].aggregate==e.Aggregate.None&&l.col2+1!=h.frozen;)l.col2++}for(;l.col<r&&!h[l.col].visible;)l.col++;return l.isSingleCell?null:l}var p=!1;switch(this._g.allowMerging){case i.None:p=!0;break;case i.Cells:p=c!=t.CellType.Cell;break;case i.ColumnHeaders:p=c!=t.CellType.ColumnHeader&&c!=t.CellType.TopLeft;break;case i.RowHeaders:p=c!=t.CellType.RowHeader&&c!=t.CellType.TopLeft;break;case i.AllHeaders:p=c==t.CellType.Cell}if(p)return null;if(h[r].allowMerging){l=new t.CellRange(n,r);var f=0,_=u.length-1;n>=u.frozen?!s||c!=t.CellType.Cell&&c!=t.CellType.RowHeader||(f=(a=o._getViewRange()).topRow,_=a.bottomRow):_=u.frozen-1;for(var w=n-1;w>=f&&this._mergeCell(o,w,r,n,r);w--)l.row=w;for(var m=n+1;m<=_&&this._mergeCell(o,n,r,m,r);m++)l.row2=m;for(;l.row<n&&!u[l.row].visible;)l.row++;if(!l.isSingleCell)return l}if(u[n].allowMerging){l=new t.CellRange(n,r);var y=0,v=h.length-1;r>=h.frozen?!s||c!=t.CellType.Cell&&c!=t.CellType.ColumnHeader||(y=(a=o._getViewRange()).leftCol,v=a.rightCol):v=h.frozen-1;for(var C=r-1;C>=y&&this._mergeCell(o,n,C,n,r);C--)l.col=C;for(var b=r+1;b<=v&&this._mergeCell(o,n,r,n,b);b++)l.col2=b;for(;l.col<r&&!h[l.col].visible;)l.col++;if(!l.isSingleCell)return l}return null},o.prototype._mergeCell=function(e,i,o,n,r){var s=e.rows[i],l=e.rows[n];if(s instanceof t.GroupRow||s instanceof t._NewRowTemplate||l instanceof t.GroupRow||l instanceof t._NewRowTemplate)return!1;if(i!=n&&e.rows.isFrozen(i)!=e.rows.isFrozen(n))return!1;if(o!=r&&e.columns.isFrozen(o)!=e.columns.isFrozen(r))return!1;if(i!=n){if(o>0&&(s.allowMerging&&this._mergeCell(e,i,o-1,i,o)||l.allowMerging&&this._mergeCell(e,n,o-1,n,o)))return!1;if(r<e.columns.length-1&&(s.allowMerging&&this._mergeCell(e,i,r,i,r+1)||l.allowMerging&&this._mergeCell(e,n,r,n,r+1)))return!1}return e.getCellData(i,o,!0)==e.getCellData(n,r,!0)},o}();t.MergeManager=o}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(e){!function(t){"use strict";var i=function(){function t(t,i,o){if(this.mapChanged=new e.Event,e.isArray(t)&&!i&&!o){for(var n=[],r=0;r<t.length;r++)n.push({value:t[r]});t=n,i=o="value"}this._cv=e.asCollectionView(t),this._keyPath=e.asString(i,!1),this._displayPath=e.asString(o,!1),this._cv.collectionChanged.addHandler(this.onMapChanged,this)}return Object.defineProperty(t.prototype,"sortByDisplayValues",{get:function(){return 1!=this._sortByKey},set:function(t){this._sortByKey=!e.asBoolean(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"collectionView",{get:function(){return this._cv},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedValuePath",{get:function(){return this._keyPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"displayMemberPath",{get:function(){return this._displayPath},enumerable:!0,configurable:!0}),t.prototype.getKeyValue=function(e){var t=this._displayPath,i=this._indexOf(e,t,!0);return i<0&&(i=this._indexOf(e,t,!1)),i>-1?this._cv.sourceCollection[i][this._keyPath]:null},t.prototype.getDisplayValue=function(e){if(!this._hash){this._hash={};var t=this._cv.sourceCollection;if(t&&this._keyPath&&this._displayPath)for(var i=t.length-1;i>=0;i--){var o=t[i],n=o[this._keyPath],r=o[this._displayPath];this._hash[n]=r}}var s=this._hash[e];return null!=s?s:e},t.prototype.getDisplayValues=function(e){var t=[];if(this._cv&&this._displayPath)for(var i=this._cv.items,o=0;o<i.length;o++)t.push(i[o][this._displayPath]);return t},t.prototype.getKeyValues=function(){var e=[];if(this._cv&&this._keyPath)for(var t=this._cv.items,i=0;i<t.length;i++)e.push(t[i][this._keyPath]);return e},Object.defineProperty(t.prototype,"isEditable",{get:function(){return this._editable},set:function(t){this._editable=e.asBoolean(t)},enumerable:!0,configurable:!0}),t.prototype.onMapChanged=function(e){this._hash=null,this.mapChanged.raise(this,e)},t.prototype._indexOf=function(e,t,i){var o=-1,n=-1;if(this._cv&&t)for(var r=null!=e?e.toString():"",s=i?r:r.toLowerCase(),l=this._cv.sourceCollection,a=0;a<l.length;a++){var c=l[a],h=c[t];if(h==e?o=a:i||h.length!=s.length||h.toLowerCase()!=s?null!=h&&h.toString()==r&&(o=a):o=a,o==a){if(!this._cv.filter||this._cv.filter(c))return o;n<0&&(n=o)}}return n},t}();t.DataMap=i}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(e){!function(t){"use strict";var i;!function(e){e[e.None=0]="None",e[e.Cell=1]="Cell",e[e.CellRange=2]="CellRange",e[e.Row=3]="Row",e[e.RowRange=4]="RowRange",e[e.ListBox=5]="ListBox"}(i=t.SelectionMode||(t.SelectionMode={}));!function(e){e[e.None=0]="None",e[e.Selected=1]="Selected",e[e.Cursor=2]="Cursor",e[e.Active=3]="Active"}(t.SelectedState||(t.SelectedState={}));var o;!function(e){e[e.None=0]="None",e[e.Next=1]="Next",e[e.Prev=2]="Prev",e[e.NextPage=3]="NextPage",e[e.PrevPage=4]="PrevPage",e[e.Home=5]="Home",e[e.End=6]="End",e[e.NextCell=7]="NextCell",e[e.PrevCell=8]="PrevCell"}(o=t.SelMove||(t.SelMove={}));var n=function(){function n(e){this._sel=new t.CellRange(0,0),this._mode=i.CellRange,this._g=e}return Object.defineProperty(n.prototype,"selectionMode",{get:function(){return this._mode},set:function(e){if(e!=this._mode){var o=i;if(e==o.ListBox||this._mode==o.ListBox)for(var n=this._g.rows,r=0;r<n.length;r++){var s=n[r],l=e==i.ListBox&&this._sel.containsRow(r);s._setFlag(t.RowColFlags.Selected,l,!0)}switch(e){case o.None:this._sel.setRange(-1,-1);break;case o.Cell:this._sel.row2=this._sel.row,this._sel.col2=this._sel.col;break;case o.Row:this._sel.row2=this._sel.row}this._mode=e,this._g.invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selection",{get:function(){return this._sel},set:function(e){this.select(e)},enumerable:!0,configurable:!0}),n.prototype.select=function(o,n){void 0===n&&(n=!0),e.isNumber(o)&&e.isNumber(n)&&(o=new t.CellRange(o,n),n=!0),o=e.asType(o,t.CellRange);var r=this._g,s=this._sel,l=o,a=!1,c=i;switch(r.selectionMode){case c.Cell:o.row2=o.row,o.col2=o.col;break;case c.Row:o.row2=o.row;break;case c.ListBox:a=!0}var h=l.equals(s);if(a&&l.row>-1&&!r.rows[l.row].isSelected&&(h=!1),h)n&&r.scrollIntoView(l.row,l.col);else{var u=new t.CellRangeEventArgs(r.cells,l);if(r.onSelectionChanging(u)){if(a&&(l.row!=s.row||l.rowSpan>1||s.rowSpan>1)){for(var d=0;d<r.rows.length;d++)r.rows[d]._setFlag(t.RowColFlags.Selected,l.containsRow(d),!0);r.refreshCells(!1,!0,!0)}if(l.row=Math.min(l.row,r.rows.length-1),l.row2=Math.min(l.row2,r.rows.length-1),this._sel=l,r.refreshCells(!1,!0,!0),n&&r.scrollIntoView(l.row,l.col),r.collectionView){var g=r._getCvIndex(l.row);r.collectionView.moveCurrentToPosition(g)}r.onSelectionChanged(u)}}},n.prototype.moveSelection=function(e,i,n){var r,s,l=this._g,a=l.rows,c=l.columns,h=this._getReferenceCell(e,i,n),u=Math.max(0,l._szClient.height-l.columnHeaders.height);if(i==o.NextCell)s=c.getNextCell(h.col,o.Next,u),r=h.row,s==h.col&&(r=a.getNextCell(r,o.Next,u))>h.row&&(s=c.getNextCell(0,o.Next,u),s=c.getNextCell(s,o.Prev,u)),l.select(r,s);else if(i==o.PrevCell)s=c.getNextCell(h.col,o.Prev,u),r=h.row,s==h.col&&(r=a.getNextCell(r,o.Prev,u))<h.row&&(s=c.getNextCell(c.length-1,o.Prev,u),s=c.getNextCell(s,o.Next,u)),l.select(r,s);else if(r=a.getNextCell(h.row,e,u),s=c.getNextCell(h.col,i,u),n){var d=l._selHdl._sel;l.select(new t.CellRange(r,s,d.row2,d.col2))}else l.select(r,s)},n.prototype._getReferenceCell=function(e,t,i){var n=this._g,r=n._selHdl._sel,s=n.getMergedRange(n.cells,r.row,r.col);if(!s||s.isSingleCell)return r;switch(s=s.clone(),e){case o.Next:case o.NextCell:s.row=s.bottomRow;break;case o.None:s.row=r.row}switch(t){case o.Next:case o.NextCell:s.col=s.rightCol;break;case o.None:s.col=r.col}return s},n.prototype._adjustSelection=function(e){switch(this._mode){case i.Cell:return new t.CellRange(e.row,e.col,e.row,e.col);case i.Row:return new t.CellRange(e.row,0,e.row,this._g.columns.length-1);case i.RowRange:case i.ListBox:return new t.CellRange(e.row,0,e.row2,this._g.columns.length-1)}return e},n}();t._SelectionHandler=n}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(e){!function(t){"use strict";var i;!function(e){e[e.None=0]="None",e[e.MoveDown=1]="MoveDown",e[e.MoveAcross=2]="MoveAcross",e[e.Cycle=3]="Cycle",e[e.CycleOut=4]="CycleOut"}(i=t.KeyAction||(t.KeyAction={}));var o=function(){function o(e){this._kaTab=i.None,this._kaEnter=i.MoveDown,this._g=e;var t=e.hostElement;e.addEventListener(t,"keypress",this._keypress.bind(this)),e.addEventListener(t,"keydown",this._keydown.bind(this))}return o.prototype._keydown=function(i){var o=this._g,n=o.selection,r=i.ctrlKey||i.metaKey,s=i.shiftKey,l=(i.target,!0);if(this._altDown=!1,!o._wantsInput(i.target)){var a=i.defaultPrevented&&!(i.target instanceof HTMLInputElement);if(o.isRangeValid(n)&&!a&&(!o.activeEditor||!o._edtHdl._keydown(i))){var c=e.tryCast(o.rows[n.row],t.GroupRow),h=o.editableCollectionView,u=i.keyCode;if(o.autoClipboard){if(r&&(67==u||45==u)){var d=new t.CellRangeEventArgs(o.cells,n);if(o.onCopying(d)){var g=o.getClipString()+"\r\n";e.Clipboard.copy(g),o.onCopied(d)}return void i.stopPropagation()}if(r&&86==u||s&&45==u){if(!o.isReadOnly){var p=new t.CellRangeEventArgs(o.cells,n);o.onPasting(p)&&e.Clipboard.paste(function(e){o.setClipString(e),o.onPasted(p)})}return void i.stopPropagation()}}if(o.rightToLeft)switch(u){case e.Key.Left:u=e.Key.Right;break;case e.Key.Right:u=e.Key.Left}var f=t.SelMove,_=t.SelectionMode;switch(u){case e.Key.Space:if(s&&n.isValid)switch(o.selectionMode){case _.CellRange:case _.Row:case _.RowRange:case _.ListBox:o.select(new t.CellRange(n.row,0,n.row,o.columns.length-1))}else if(r&&n.isValid)switch(o.selectionMode){case _.CellRange:o.select(new t.CellRange(0,n.col,o.rows.length-1,n.col))}else(l=this._startEditing(!0,i))&&setTimeout(function(){var t=o.activeEditor;t&&(t.disabled||t.readOnly?o.finishEditing():"checkbox"==t.type?(t.checked=!t.checked,o.finishEditing()):e.setSelectionRange(t,t.value.length))});break;case 65:if(r)switch(o.selectionMode){case _.CellRange:case _.Row:case _.RowRange:case _.ListBox:o.select(new t.CellRange(0,0,o.rows.length-1,o.columns.length-1))}else l=!1;break;case e.Key.Left:r||i.altKey?l=!1:n.isValid&&0==n.col&&null!=c&&!c.isCollapsed&&c.hasChildren?c.isCollapsed=!0:this._moveSel(f.None,r?f.Home:f.Prev,s);break;case e.Key.Right:r||i.altKey?l=!1:n.isValid&&0==n.col&&null!=c&&c.isCollapsed?c.isCollapsed=!1:this._moveSel(f.None,r?f.End:f.Next,s);break;case e.Key.Up:r?l=!1:(this._altDown=i.altKey,i.altKey?l=o._edtHdl._toggleListBox(i):this._moveSel(f.Prev,f.None,s));break;case e.Key.Down:r?l=!1:(this._altDown=i.altKey,i.altKey?l=o._edtHdl._toggleListBox(i):this._moveSel(f.Next,f.None,s));break;case e.Key.PageUp:this._altDown=i.altKey,this._moveSel(i.altKey?f.Home:f.PrevPage,f.None,s);break;case e.Key.PageDown:this._altDown=i.altKey,this._moveSel(i.altKey?f.End:f.NextPage,f.None,s);break;case e.Key.Home:this._moveSel(r?f.Home:f.None,f.Home,s);break;case e.Key.End:this._moveSel(r?f.End:f.None,f.End,s);break;case e.Key.Tab:l=this._performKeyAction(o.keyActionTab,s);break;case e.Key.Enter:l=this._performKeyAction(o.keyActionEnter,s),!s&&h&&null!=h.currentEditItem&&o._edtHdl._commitRowEdits();break;case e.Key.Escape:if(l=!1,h&&(h.currentAddItem||h.currentEditItem)){var w=new t.CellRangeEventArgs(o.cells,o.selection);w.cancel=!0,o.onRowEditEnding(w),h.currentAddItem&&h.cancelNew(),h.currentEditItem&&h.cancelEdit(),o.onRowEditEnded(w),l=!0}o._mouseHdl.resetMouseState();break;case e.Key.Delete:case e.Key.Back:l=this._deleteSel(i);break;case e.Key.F2:l=this._startEditing(!0,i);break;case e.Key.F4:l=o._edtHdl._toggleListBox(i);break;default:l=!1}l&&(o.containsFocus()||o.focus(),i.preventDefault(),i.stopPropagation())}}},o.prototype._performKeyAction=function(e,o){var n=i,r=t.SelMove;switch(e){case n.MoveDown:return this._moveSel(o?r.Prev:r.Next,r.None,!1),!0;case n.MoveAcross:return this._moveSel(r.None,o?r.Prev:r.Next,!1),!0;case n.Cycle:return this._moveSel(r.None,o?r.PrevCell:r.NextCell,!1),!0;case n.CycleOut:var s=this._g.selection;return this._moveSel(r.None,o?r.PrevCell:r.NextCell,!1),!s.equals(this._g.selection)}return!1},o.prototype._keypress=function(t){var i=this._g;if(!i._wantsInput(t.target)&&!t.defaultPrevented)if(this._altDown)t.preventDefault();else if(i.activeEditor)i._edtHdl._keypress(t);else if(t.charCode>e.Key.Space&&this._startEditing(!1,t)&&i.activeEditor){var o=e.getActiveElement();if(o instanceof HTMLInputElement&&"checkbox"!=o.type){var n=i._selHdl.selection,r=i.getCellData(n.row,n.col,!0),s=i.getCellData(n.row,n.col,!1);o.value=String.fromCharCode(t.charCode),e.isNumber(s)&&r.indexOf("%")>-1&&(o.value+="%"),e.setSelectionRange(o,1),o.dispatchEvent(i._edtHdl._evtInput),i._edtHdl._keypress(t),t.preventDefault()}}},o.prototype._moveSel=function(e,i,o){this._g.selectionMode!=t.SelectionMode.None&&this._g._selHdl.moveSelection(e,i,o)},o.prototype._deleteSel=function(e){var i=this._g,o=i.editableCollectionView,n=i.selection,r=i.rows,s=[],l=new t.CellRange,a=new t.CellEditEndingEventArgs(i.cells,l,e),c=t.SelectionMode;if(i.allowDelete&&!i.isReadOnly&&(null==o||o.canRemove&&!o.isAddingNew&&!o.isEditingItem))switch(i.selectionMode){case c.CellRange:if(0==n.leftCol&&n.rightCol==i.columns.length-1)for(h=n.topRow;h>-1&&h<=n.bottomRow;h++)s.push(r[h]);break;case c.ListBox:for(h=0;h<r.length;h++)r[h].isSelected&&s.push(r[h]);break;case c.Row:n.topRow>-1&&s.push(r[n.topRow]);break;case c.RowRange:for(var h=n.topRow;h>-1&&h<=n.bottomRow;h++)s.push(r[h])}if(s.length>0){if(i.deferUpdate(function(){o&&o.beginUpdate();for(var e=s.length-1;e>=0;e--){var t=s[e];l.setRange(t.index,-1),i.onDeletingRow(a)&&(o&&t.dataItem?o.remove(t.dataItem):i.rows.removeAt(t.index),i.onDeletedRow(a))}o&&o.endUpdate()}),i.selectionMode==c.ListBox){var u=i.selection.row;u>-1&&u<i.rows.length&&(i.rows[u].isSelected=!0)}return i.childItemsPath&&i.collectionView&&i.collectionView.refresh(),!0}if(!i.isReadOnly&&0==s.length){var d=!1,g=i.scrollPosition;return i.deferUpdate(function(){for(var e=n.topRow;e<=n.bottomRow;e++){var t=i.rows[e];if(!t.isReadOnly)for(var r=n.leftCol;r<=n.rightCol;r++){var s=i._getBindingColumn(i.cells,e,i.columns[r]);s.getIsRequired()||s.isReadOnly||i.getCellData(e,r,!0)&&(l.setRange(e,r),a.cancel=!1,i.onBeginningEdit(a)&&(o&&(d||(d=!0,o.beginUpdate()),o.editItem(t.dataItem),i._edtHdl._edItem=o.currentEditItem),i.setCellData(e,r,"",!0,!1),i.onCellEditEnding(a),i.onCellEditEnded(a)))}}i.selection=n,i.scrollPosition=g,d&&o.endUpdate()}),!0}return!1},o.prototype._startEditing=function(e,t,i,o){return this._g._edtHdl.startEditing(e,i,o,!0,t)},o}();t._KeyboardHandler=o}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(e){!function(t){"use strict";var i;!function(e){e[e.None=0]="None",e[e.Columns=1]="Columns",e[e.Rows=2]="Rows",e[e.Both=3]="Both",e[e.ColumnsAllCells=4|e.Columns]="ColumnsAllCells",e[e.RowsAllCells=4|e.Rows]="RowsAllCells",e[e.BothAllCells=4|e.Both]="BothAllCells"}(i=t.AllowResizing||(t.AllowResizing={}));!function(e){e[e.None=0]="None",e[e.Headers=1]="Headers",e[e.Cells=2]="Cells",e[e.Both=3]="Both"}(t.AutoSizeMode||(t.AutoSizeMode={}));var o;!function(e){e[e.None=0]="None",e[e.Columns=1]="Columns",e[e.Rows=2]="Rows",e[e.Both=3]="Both"}(o=t.AllowDragging||(t.AllowDragging={}));var n=function(){function n(i){var o=this;this._tsLast=0;var n=i.hostElement;this._g=i,this._dvMarker=e.createElement('<div class="wj-marker">&nbsp;</div>'),i.addEventListener(n,"mousedown",function(n){if(i._rcBounds=null,!n.defaultPrevented&&0==n.button){var l=n.target;if(!i.containsFocus()){var a=l instanceof HTMLElement&&l.tabIndex>-1?l:i._eFocus;i._setFocusNoScroll(a)}if(setTimeout(function(){n.defaultPrevented||i.focus()}),e.closest(n.target,".wj-flexgrid")!=i.hostElement||!i.activeEditor&&i._isInputElement(l)){var c=i.hitTest(n);switch(c.cellType){case t.CellType.Cell:i.select(c.range);break;case t.CellType.ColumnHeader:case t.CellType.ColumnFooter:i.scrollIntoView(-1,c.col);break;case t.CellType.RowHeader:i.scrollIntoView(c.row,-1)}return}var h=document;i.removeEventListener(h,"mousemove"),i.removeEventListener(h,"mouseup"),i.addEventListener(h,"mousemove",r),i.addEventListener(h,"mouseup",s),o._isDown=!0,o._mousedown(n)}});var r=function(e){o._mousemove(e)},s=function(e){o._isDown=!1,i.removeEventListener(document,"mousemove"),i.removeEventListener(document,"mouseup"),o._mouseup(e)};i.addEventListener(n,"mouseup",function(e){o._tsLast=Date.now()}),i.addEventListener(n,"mouseenter",function(e){i._rcBounds=null}),i.addEventListener(n,"mousemove",this._hover.bind(this)),i.addEventListener(n,"dblclick",this._dblclick.bind(this)),i.addEventListener(n,"click",this._click.bind(this)),i.addEventListener(n,"selectstart",function(e){i._isInputElement(e.target)||e.preventDefault()}),i.addEventListener(n,"wheel",function(t){var o=i.cells.hostElement.parentElement,n=t.deltaY;if(n&&!t.ctrlKey&&!t.metaKey&&o.scrollHeight>o.offsetHeight&&e.closest(t.target,".wj-flexgrid")==i.hostElement){switch(t.deltaMode){case 1:o.scrollTop+=i.rows.defaultSize*(n<0?-1:1);break;case 2:o.scrollTop+=o.clientHeight*(n<0?-1:1);break;case 0:default:e.isSafari()&&(n=e.clamp(n,-150,150)),o.scrollTop+=n}t.preventDefault(),t.stopImmediatePropagation()}}),i.addEventListener(n,"dragstart",this._dragstart.bind(this)),i.addEventListener(n,"dragover",this._dragover.bind(this)),i.addEventListener(n,"dragleave",this._dragover.bind(this)),i.addEventListener(n,"drop",this._drop.bind(this)),i.addEventListener(n,"dragend",this._dragend.bind(this)),this._enableTouchResizing()}return n.prototype.resetMouseState=function(){this._dragSource&&e.removeClass(this._dragSource,"wj-state-dragsrc"),this._showDragMarker(null);var t=this._g.hostElement;t&&(t.style.cursor="");var i=this._g;i.removeEventListener(document,"mousemove"),i.removeEventListener(document,"mouseup"),this._tsLast=Date.now(),this._eMouse=null,this._isDown=null,this._htDown=null,this._lbSelRows=null,this._szRowCol=null,this._szArgs=null,this._dragSource=null},n.prototype._enableTouchResizing=function(){var t=this,i=this._g,o=i.hostElement,n="ontouchstart"in window?["touchstart","touchmove","touchend"]:"onpointerdown"in window?["pointerdown","pointermove","pointerup"]:null;n&&(i.addEventListener(o,n[0],function(n){if((null==n.pointerType||"touch"==n.pointerType)&&!e.closest(n.target,".wj-elem-filter")){var r=e.closest(n.target,".wj-cell");r instanceof HTMLElement&&(i._rcBounds=null,t._htDown=null,t._hover(n),t._szRowCol&&(r.removeAttribute("draggable"),o.style.touchAction="none",t._mousedown(n),n.preventDefault()))}}),i.addEventListener(o,n[1],function(e){null!=e.pointerType&&"touch"!=e.pointerType||t._szRowCol&&(t._mousemove(e),e.preventDefault())}),i.addEventListener(o,n[2],function(i){if(e.Control._touching=!1,(null==i.pointerType||"touch"==i.pointerType)&&t._szRowCol){if(t._szArgs)t._finishResizing(t._eMouse);else{var n=e.closest(i.target,".wj-cell");n instanceof HTMLElement&&n.click()}t.resetMouseState(),o.style.touchAction=""}}))},n.prototype._mousedown=function(i){var n=this._g,r=n.hitTest(i),s=r.cellType,l=i.ctrlKey||i.metaKey;if(this._selDown=n.selection,r.panel==n.cells){if(e.closestClass(i.target,t.CellFactory._WJC_DROPDOWN))return n._edtHdl._toggleListBox(i,r.range),void i.preventDefault();if(n.editRange&&n.editRange.contains(r.range))return}var a=e.getActiveElement();if(i.target!=a||!n._isInputElement(i.target)){if(s==t.CellType.None)return n.finishEditing(),void(i.target!=n._root&&n._edtHdl._commitRowEdits());if(this._htDown=r,this._eMouse=i,null!=this._szRowCol)return a!=n._eFocus&&(n._eFocus.tabIndex=0,n._eFocus.focus()),void this._handleResizing(i);switch(s){case t.CellType.Cell:l&&n.selectionMode==t.SelectionMode.ListBox&&this._startListBoxSelection(r.row),this._mouseSelect(i,i.shiftKey);break;case t.CellType.RowHeader:0==(this._g.allowDragging&o.Rows)&&(l&&n.selectionMode==t.SelectionMode.ListBox&&this._startListBoxSelection(r.row),this._mouseSelect(i,i.shiftKey),i.preventDefault())}if(s==t.CellType.Cell&&n.rows.maxGroupLevel>-1&&e.closestClass(i.target,t.CellFactory._WJC_COLLAPSE)){var c=e.tryCast(n.rows[r.row],t.GroupRow);if(c)return l?n.collapseGroupsToLevel(c.isCollapsed?c.level+1:c.level):c.isCollapsed=!c.isCollapsed,void this.resetMouseState()}}},n.prototype._mousemove=function(e){if(null!=this._htDown){if(0==e.buttons&&this._eMouse&&e.timeStamp-this._eMouse.timeStamp>600)return void this.resetMouseState();if(this._eMouse=e,this._szRowCol)this._handleResizing(e);else switch(this._htDown.cellType){case t.CellType.Cell:this._mouseSelect(e,!0);break;case t.CellType.RowHeader:0==(this._g.allowDragging&o.Rows)&&this._mouseSelect(e,!0)}}},n.prototype._mouseup=function(e){if(!this._g.isTouching||!(this._dragSource||e.target instanceof HTMLHtmlElement)){var i=this._g,o=i.hitTest(e),n=this._htDown,r=t.SelectionMode;if(n&&!e.defaultPrevented)if(this._szArgs)this._finishResizing(e);else if(n.panel!=i.topLeftCells||this._szArgs)n.panel!=i.columnHeaders||e.dataTransfer?n.panel==i.cells&&(e.ctrlKey||e.metaKey||e.shiftKey||o.panel==n.panel&&o.range.equals(n.range)&&i.selection.equals(this._selDown)&&i._edtHdl.startEditing(!0,o.row,o.col,!0,e)):o.panel==n.panel&&o.col==n.col&&!o.edgeRight&&o.col>-1&&this._clickSort(e,o);else if(o.panel==n.panel&&o.row==n.row&&o.col==n.col&&i.rows.length&&i.columns.length)switch(i.selectionMode){case r.CellRange:case r.RowRange:case r.ListBox:i.select(new t.CellRange(0,0,i.rows.length-1,i.columns.length-1))}this.resetMouseState()}},n.prototype._click=function(e){Date.now()-this._tsLast>50&&!e.pointerType&&this._handleClick(e)},n.prototype._handleClick=function(i){var o=this._g,n=i.target,r=new t.HitTestInfo(n,null);if(!i.defaultPrevented&&r.grid==o&&!o._isInputElement(n))if(r.panel==o.topLeftCells)o.select(new t.CellRange(0,0,o.rows.length-1,o.columns.length-1));else if(r.panel==o.columnHeaders)this._clickSort(i,r);else if(r.panel==o.rowHeaders)o.select(new t.CellRange(r.row,0,r.row,o.columns.length-1));else if(r.panel==o.cells)if(r.row<0)this._clickSort(i,r);else if(e.closestClass(n,t.CellFactory._WJC_COLLAPSE)){var s=o.rows[r.row];s instanceof e.grid.GroupRow&&(i.ctrlKey?o.collapseGroupsToLevel(s.isCollapsed?s.level+1:s.level):s.isCollapsed=!s.isCollapsed)}else e.closestClass(n,t.CellFactory._WJC_DROPDOWN)?o._edtHdl._toggleListBox(i,r.range):o.select(r.range)},n.prototype._clickSort=function(i,o){var n=this._g,r=n.collectionView,s=i.ctrlKey||i.metaKey;if(r&&r.canSort&&n.allowSorting){o.range.bottomRow;var l=o.panel.columns[o.col],a=n._getBindingColumn(o.panel,o.row,l),c=a?a._getBindingSort():null;if(a.allowSorting&&c){for(var h=o.grid.collectionView.sortDescriptions,u=null,d=0;d<h.length;d++)if(h[d].property==c){u=!h[d].ascending;break}if(null==u){if(s)return;u=!0}var g=new t.CellRangeEventArgs(o.panel,o.range);n.onSortingColumn(g)&&(n._edtHdl._commitRowEdits(),s?h.clear():h.splice(0,h.length,new e.collections.SortDescription(c,u)),n.onSortedColumn(g))}}},n.prototype._dblclick=function(e){var o,n=this._g,r=n.hitTest(e),s=r.cellType,l=n.selection,a=r.range;if(!e.defaultPrevented)if(r.edgeRight&&n.allowResizing&i.Columns){if(s==t.CellType.ColumnHeader||s==t.CellType.Cell&&4&n.allowResizing){e.preventDefault(),e.ctrlKey&&l.containsColumn(r.col)&&(a=l);for(var c=a.leftCol;c<=a.rightCol;c++)n.columns[c].allowResizing&&(o=new t.CellRangeEventArgs(n.cells,new t.CellRange(-1,c)),n.onAutoSizingColumn(o)&&n.onResizingColumn(o)&&(n.autoSizeColumn(c),n.onResizedColumn(o),n.onAutoSizedColumn(o)))}else s==t.CellType.TopLeft&&r.panel.columns[r.col].allowResizing&&(e.preventDefault(),o=new t.CellRangeEventArgs(r.panel,new t.CellRange(-1,r.col)),n.onAutoSizingColumn(o)&&n.onResizingColumn(o)&&(n.autoSizeColumn(r.col,!0),n.onAutoSizedColumn(o),n.onResizedColumn(o)));this.resetMouseState()}else if(r.edgeBottom&&n.allowResizing&i.Rows){if(s==t.CellType.RowHeader||s==t.CellType.Cell&&4&n.allowResizing){e.ctrlKey&&l.containsRow(r.row)&&(a=l);for(var h=a.topRow;h<=a.bottomRow;h++)n.rows[h].allowResizing&&(o=new t.CellRangeEventArgs(n.cells,new t.CellRange(h,-1)),n.onAutoSizingRow(o)&&n.onResizingRow(o)&&(n.autoSizeRow(h),n.onResizedRow(o),n.onAutoSizedRow(o)))}else s==t.CellType.TopLeft&&r.panel.rows[r.row].allowResizing&&(o=new t.CellRangeEventArgs(r.panel,new t.CellRange(r.row,-1)),n.onAutoSizingRow(o)&&n.onResizingRow(o)&&(n.autoSizeRow(r.row,!0),n.onResizedRow(o),n.onAutoSizedRow(o)));this.resetMouseState()}else;},n.prototype._hover=function(e){if(null==this._htDown){var o=this._g,n=o.hitTest(e),r=(n.panel,n.cellType),s="";return this._szRowCol=null,(r==t.CellType.ColumnHeader||r==t.CellType.TopLeft||r==t.CellType.Cell&&4&o.allowResizing)&&n.edgeRight&&0!=(o.allowResizing&i.Columns)&&(this._szRowCol=this._getResizeCol(n)),(r==t.CellType.RowHeader||r==t.CellType.TopLeft||r==t.CellType.Cell&&4&o.allowResizing)&&n.edgeBottom&&0!=(o.allowResizing&i.Rows)&&(this._szRowCol=this._getResizeRow(n)),this._szRowCol instanceof t.Column?s="col-resize":this._szRowCol instanceof t.Row&&(s="row-resize"),this._szStart=this._szRowCol?this._szRowCol.renderSize:0,o.hostElement.style.cursor=s,n}return null},n.prototype._getResizeCol=function(e){for(var i=e.panel.columns,o=i[e.col],n=e.col+1;n<i.length;n++)if((r=i[n]).visible){r.size<1&&(o=r);break}if(e.col==i.length-1&&(e.cellType==t.CellType.TopLeft||e.cellType==t.CellType.RowHeader)){i=this._g.columns;for(n=0;n<i.length;n++){var r=i[n];if(r.visible){r.size<1&&(o=r);break}}}return o.allowResizing?o:null},n.prototype._getResizeRow=function(e){for(var i=e.panel.rows,o=i[e.row],n=e.row+1;n<i.length;n++)if((r=i[n]).visible){r.size<1&&(o=r);break}if(e.row==i.length-1&&(e.cellType==t.CellType.TopLeft||e.cellType==t.CellType.ColumnHeader)){i=this._g.rows;for(n=0;n<i.length;n++){var r=i[n];if(r.visible){r.size<1&&(o=r);break}}}return o.allowResizing?o:null},n.prototype._mouseSelect=function(i,o){var n=this,r=this._g;if(this._htDown&&this._htDown.panel&&r.selectionMode!=t.SelectionMode.None){var s=new t.HitTestInfo(this._htDown.panel,i);this._handleSelection(s,o),!e.isIE9()&&i.button>=0&&i.target!=r._root&&(s=new t.HitTestInfo(r,i)).cellType!=t.CellType.Cell&&s.cellType!=t.CellType.RowHeader&&setTimeout(function(){n._mouseSelect(n._eMouse,o)},100)}},n.prototype._handleResizing=function(i){if(i.preventDefault(),this._szRowCol instanceof t.Column){var o=this._g,r=e.mouseToPage(i).x,s=Math.round(Math.max(n._SZ_MIN,this._szStart+(r-this._htDown.point.x)*(o.rightToLeft?-1:1)));if(this._szRowCol.renderSize!=s){if(null==this._szArgs){a=o.rowHeaders.columns.indexOf(this._szRowCol)>-1?o.rowHeaders:o.cells;this._szArgs=new t.CellRangeEventArgs(a,new t.CellRange(-1,this._szRowCol.index))}this._szArgs.cancel=!1,o.onResizingColumn(this._szArgs)&&(o.deferResizing?this._showResizeMarker(s):this._szRowCol.width=s)}}if(this._szRowCol instanceof t.Row){var o=this._g,l=e.mouseToPage(i).y,s=Math.round(Math.max(n._SZ_MIN,this._szStart+(l-this._htDown.point.y)));if(this._szRowCol.renderSize!=s){if(null==this._szArgs){var a=o.columnHeaders.rows.indexOf(this._szRowCol)>-1?o.columnHeaders:o.cells;this._szArgs=new t.CellRangeEventArgs(a,new t.CellRange(this._szRowCol.index,-1))}this._szArgs.cancel=!1,o.onResizingRow(this._szArgs)&&(o.deferResizing?this._showResizeMarker(s):this._szRowCol.height=s)}}},n.prototype._dragstart=function(i){var n=this._g,r=this._htDown;if(r){if(this._dragSource=null,!this._szRowCol){var s=new t.CellRangeEventArgs(r.panel,r.range);if(r.cellType==t.CellType.ColumnHeader&&n.allowDragging&o.Columns&&r.col>-1&&n.columns[r.col].allowDragging)n.onDraggingColumn(s)?this._dragSource=i.target:i.preventDefault();else if(r.cellType==t.CellType.RowHeader&&n.allowDragging&o.Rows&&r.row>-1&&n.rows[r.row].allowDragging){var l=n.rows[r.row];l instanceof t.GroupRow||l instanceof t._NewRowTemplate||(n.onDraggingRow(s)?this._dragSource=i.target:i.preventDefault())}}this._dragSource&&i.dataTransfer&&!i.defaultPrevented&&(e._startDrag(i.dataTransfer,"move"),i.stopPropagation(),e.addClass(this._dragSource,"wj-state-dragsrc"),n.beginUpdate(),this._updating=!0)}},n.prototype._dragend=function(e){this._updating&&(this._g.endUpdate(),this._updating=!1),this.resetMouseState()},n.prototype._dragover=function(i){var o=this._g,n=o.hitTest(i),r=!1,s=new t.CellRangeEventArgs(o.cells,n.range);if(this._htDown&&n.cellType==this._htDown.cellType&&(n.cellType==t.CellType.ColumnHeader?(s.cancel=!o.columns.canMoveElement(this._htDown.col,n.col),r=o.onDraggingColumnOver(s)):n.cellType==t.CellType.RowHeader&&(s.cancel=!o.rows.canMoveElement(this._htDown.row,n.row),r=o.onDraggingRowOver(s))),r?(i.dataTransfer.dropEffect="move",this._showDragMarker(n),i.preventDefault(),i.stopPropagation()):this._showDragMarker(null),this._htDown&&o.autoScroll){var l=o._rcBounds,a=o.scrollPosition,c=e.Control._DRAG_SCROLL_EDGE,h=e.Control._DRAG_SCROLL_STEP;this._htDown.panel==o.columnHeaders?(i.pageX-l.left<c&&(a.x+=h),l.right-i.pageX<c&&(a.x-=h)):this._htDown.panel==o.rowHeaders&&(i.pageY-l.top<c&&(a.y+=h),l.bottom-i.pageY<c&&(a.y-=h)),a.equals(o._ptScrl)||(o.scrollPosition=a)}},n.prototype._drop=function(e){var i=this._g,o=i.hitTest(e);if(this._htDown&&o.cellType==this._htDown.cellType){var n=i.selection,r=new t.CellRangeEventArgs(i.cells,o.range,this._htDown);o.cellType==t.CellType.ColumnHeader?(i.columns.moveElement(this._htDown.col,o.col),i.select(n.row,o.col),i.onDraggedColumn(r)):o.cellType==t.CellType.RowHeader&&(i.rows.moveElement(this._htDown.row,o.row),i.select(o.row,n.col),i.onDraggedRow(r))}this.resetMouseState()},n.prototype._showResizeMarker=function(i){var o=this._g,n=this._dvMarker,r=o.cells.hostElement;n.parentElement!=r&&r.appendChild(n);var s,l=this._szArgs.panel.cellType;this._szRowCol instanceof t.Column?(s={left:this._szRowCol.pos+i-1,top:-1e3,right:"",bottom:0,width:3,height:""},o.rightToLeft&&(s.left=r.clientWidth-s.left-s.width),l!=t.CellType.TopLeft&&l!=t.CellType.RowHeader||(s.left-=o.topLeftCells.hostElement.offsetWidth)):(s={left:-1e3,top:this._szRowCol.pos+i-1,right:0,bottom:"",width:"",height:3},l!=t.CellType.TopLeft&&l!=t.CellType.ColumnHeader||(s.top-=o.topLeftCells.hostElement.offsetHeight)),e.setCss(n,s)},n.prototype._showDragMarker=function(i){var o=this._g,n=this._dvMarker;if(!i||!i.panel)return e.removeChild(n),void(this._rngTarget=null);if(!i.range.equals(this._rngTarget)){this._rngTarget=i.range;var r=i.panel.hostElement;n.parentElement!=r&&r.appendChild(n);var s={left:0,top:0,width:6,height:6,right:"",bottom:""};switch(i.cellType){case t.CellType.ColumnHeader:s.height=i.panel.height;var l=o.columns[i.col];s.left=l.pos-s.width/2,i.col>this._htDown.col&&(s.left+=l.renderWidth),o.rightToLeft&&(s.left=n.parentElement.clientWidth-s.left-s.width);break;case t.CellType.RowHeader:s.width=i.panel.width;var a=o.rows[i.row];s.top=a.pos-s.height/2,i.row>this._htDown.row&&(s.top+=a.renderHeight)}e.setCss(n,s)}},n.prototype._finishResizing=function(i){var o=this._g,r=o.selection,s=this._szArgs,l=this._eMouse&&this._eMouse.ctrlKey;if(s&&!s.cancel){if(s.col>-1){var a=s.col,c=e.mouseToPage(i).x,h=Math.round(Math.max(n._SZ_MIN,this._szStart+(c-this._htDown.point.x)*(this._g.rightToLeft?-1:1)));if(s.panel.columns[a].width=Math.round(h),o.onResizedColumn(s),l&&this._htDown.cellType==t.CellType.ColumnHeader&&r.containsColumn(a))for(var u=r.leftCol;u<=r.rightCol;u++)o.columns[u].allowResizing&&u!=a&&(s=new t.CellRangeEventArgs(o.cells,new t.CellRange(-1,u)),o.onResizingColumn(s)&&(o.columns[u].size=o.columns[a].size,o.onResizedColumn(s)))}if(s.row>-1){var a=s.row,d=e.mouseToPage(i).y,h=Math.round(Math.max(n._SZ_MIN,this._szStart+(d-this._htDown.point.y)));if(s.panel.rows[a].height=Math.round(h),o.onResizedRow(s),l&&this._htDown.cellType==t.CellType.RowHeader&&r.containsRow(a))for(var g=r.topRow;g<=r.bottomRow;g++)o.rows[g].allowResizing&&g!=a&&(s=new t.CellRangeEventArgs(o.cells,new t.CellRange(g,-1)),o.onResizingRow(s)&&(o.rows[g].size=o.rows[a].size,o.onResizedRow(s)))}}},n.prototype._startListBoxSelection=function(e){var t=this._g.rows;this._lbSelState=!t[e].isSelected,this._lbSelRows={};for(var i=0;i<t.length;i++)t[i].isSelected&&(this._lbSelRows[i]=!0)},n.prototype._handleSelection=function(e,i){var o=this._g,n=o.rows,r=o._selHdl.selection,s=new t.CellRange(e.row,e.col);if(e.row>-1&&e.col>-1)if(null!=this._lbSelRows){var l=!1;s=new t.CellRange(e.row,e.col,this._htDown.row,this._htDown.col);for(var a=0;a<n.length;a++){var c=s.containsRow(a)?this._lbSelState:null!=this._lbSelRows[a];if(c!=n[a].isSelected){var h=new t.CellRangeEventArgs(o.cells,new t.CellRange(a,r.col,a,r.col2));o.onSelectionChanging(h)&&(n[a]._setFlag(t.RowColFlags.Selected,c,!0),l=!0,o.onSelectionChanged(h))}}l&&o.refreshCells(!1,!0,!0),o.scrollIntoView(e.row,e.col)}else e.cellType==t.CellType.RowHeader&&(s.col=0,s.col2=o.columns.length-1),i&&(s.row2=r.row2,s.col2=r.col2),o.select(s)},n._SZ_MIN=0,n}();t._MouseHandler=n}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(e){!function(t){"use strict";var i=function(){function i(i){var o=this;this._fullEdit=!1,this._list=null,this._g=i,this._evtInput=document.createEvent("HTMLEvents"),this._evtInput.initEvent("input",!0,!1),i.selectionChanging.addHandler(function(e,t){if(o.finishEditing()){var n=i._selHdl.selection.row;if(n!=t.row){var r=i.rows.length;(n>-1&&n<r?i.rows[n].dataItem:null)!=(t.row>-1&&t.row<r?i.rows[t.row].dataItem:null)&&o._commitRowEdits()}}else t.cancel=!0}),i.lostFocus.addHandler(function(){if(!i.containsFocus()){var t=e.getActiveElement();t&&"fixed"==getComputedStyle(t).position||o._commitRowEdits()}}),i.addEventListener(i.hostElement,"mousedown",function(n){if(!n.defaultPrevented&&0==n.button&&!i._mouseHdl._szRowCol){i.selection;var r=i.hitTest(n);if(r.cellType!=t.CellType.Cell&&r.cellType!=t.CellType.None)o.finishEditing();else if(r.cellType!=t.CellType.None){var s=e.tryCast(n.target,HTMLInputElement);o._isNativeCheckbox(s)&&(s!=o.activeEditor&&(n.preventDefault(),o.startEditing(!1,r.row,r.col,!0,n)&&(s=o.activeEditor)),!s||"checkbox"!=s.type||s.disabled||s.readOnly||(s.checked=!s.checked,s.focus(),o.finishEditing()))}}},!0),i.addEventListener(i.hostElement,"click",function(e){o._isNativeCheckbox(e.target)&&e.preventDefault()})}return i.prototype.startEditing=function(i,o,n,r,s){void 0===i&&(i=!0);var l=this._g;if(o=e.asNumber(o,!0,!0),n=e.asNumber(n,!0,!0),null==o&&(o=l.selection.row),null==n&&(n=l.selection.col),null==r&&(r=!0),!this._allowEditing(o,n))return!1;var a=l.getMergedRange(l.cells,o,n,!1);a||(a=new t.CellRange(o,n));var c=l.rows[o].dataItem;if(l.select(a,!0),!l.rows[o]||c!=l.rows[o].dataItem)return!1;if(a.equals(this._rng))return!0;if(this.activeEditor&&!this.finishEditing())return!1;var h=new t.CellRangeEventArgs(l.cells,a,s);if(!l.onBeginningEdit(h))return!1;var u=l.editableCollectionView,d=!1;u&&((d=(c=l.rows[o].dataItem)!=u.currentEditItem)&&l.onRowEditStarting(h),u.editItem(c),d&&(l.onRowEditStarted(h),this._edItem=c)),this._fullEdit=e.asBoolean(i),this._rng=a,this._list=null;var g=l.columns[n].dataMap;g&&(this._list=g.getDisplayValues(c)),a.isSingleCell?this._updateEditorCell(o,n,d):l.refresh(!1);var p=this._edt;if(p){if("checkbox"==p.type)this._fullEdit=!1;else if(r){var f=e.culture.Globalize.numberFormat["%"]||"%";if(e.isNumber(l.getCellData(o,n,!1))&&p.value.indexOf(f)>-1){for(var _=p.value,w=0,m=_.length;m>0&&_[m-1]==f;)m--;for(;w<m&&_[w]==f;)w++;e.setSelectionRange(p,w,m)}else e.setSelectionRange(p,0,p.value.length);l._setFocusNoScroll(p)}if(l.onPrepareCellForEdit(h),p.disabled||p.readOnly)return!1}return null!=p&&!p.disabled&&!p.readOnly},i.prototype.finishEditing=function(i){var o=this._edt;if(!o)return this._removeListBox(),!0;var n=this._g,r=this._rng,s=new t.CellEditEndingEventArgs(n.cells,r),l=n.containsFocus(),a=n.hostElement.querySelector(".wj-control.wj-state-focused");if(a){var c=e.Control.getControl(a);c&&c.onLostFocus(s)}if(s.cancel=i,!i&&n.validateEdits){var h=this._getValidationError();if(h){s.cancel=!0;var u=o.parentElement;u&&(e.toggleClass(u,"wj-state-invalid",!0),u.title=h,s.stayInEditMode=!0)}}if(!n.onCellEditEnding(s)&&s.stayInEditMode)return l?setTimeout(function(){o.select()}):o.select(),!1;if(!s.cancel){s.data=n.cells.getCellData(r.topRow,r.leftCol,!1);for(var d=n.cellFactory.getEditorValue(n),g=r.topRow;g<=r.bottomRow&&g<n.rows.length;g++)for(var p=r.leftCol;p<=r.rightCol&&p<n.columns.length;p++)n.cells.setCellData(g,p,d,!0,!1)}this._edt=null,this._rng=null,this._list=null,this._removeListBox();var f=e.closest(o,".wj-cell");return e.contains(f,e.getActiveElement())&&f.focus(),s.cancel||!s.refresh?this._updateEditorCell(r.row,r.col,!1):n.refresh(!1),l&&n.focus(),n.onCellEditEnded(s),!0},Object.defineProperty(i.prototype,"activeEditor",{get:function(){return this._edt},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"editRange",{get:function(){return this._rng},enumerable:!0,configurable:!0}),i.prototype.getClipString=function(i){var o=this._g,n="",r=!0,s=t.SelectionMode;if(!i)switch(i=o.selection,o.selectionMode){case s.Row:case s.RowRange:i.col=0,i.col2=o.columns.length-1;break;case s.ListBox:i.col=0,i.col2=o.columns.length-1;for(var l=0;l<o.rows.length;l++)o.rows[l].isSelected&&o.rows[l].isVisible&&(i.row=i.row2=l,n&&(n+="\n"),n+=this.getClipString(i));return n}for(var a=(i=e.asType(i,t.CellRange)).topRow;a<=i.bottomRow;a++)if(o.rows[a].isVisible){r||(n+="\n"),r=!1;for(var c=i.leftCol,h=!0;c<=i.rightCol;c++)if(o.columns[c].isVisible){h||(n+="\t"),h=!1;var u=o.cells.getCellData(a,c,!0).toString();(u=u.replace(/\t/g," ")).indexOf("\n")>-1&&(u='"'+u.replace(/"/g,'""')+'"'),n+=u}}return n},i.prototype.setClipString=function(i,o){var n=this,r=this._g,s=null==o,l=t.SelectionMode;if(!o)switch(o=r.selection,r.selectionMode){case l.Row:case l.RowRange:case l.ListBox:o.col=0,o.col2=r.columns.length-1}o=e.asType(o,t.CellRange);var a=this._parseClipString(e.asString(i));s&&!o.isSingleCell&&a.length&&this._expandClipRows(a,o);var c,h=new t.CellRange(o.topRow,o.leftCol),u=r.editableCollectionView,d=o.topRow,g=!1;r.deferUpdate(function(){u&&u.beginUpdate();for(var e=0;e<a.length&&d<r.rows.length;e++,d++)if(r.rows[d].isVisible)for(var i=a[e],s=o.leftCol,l=0;l<i.length&&s<r.columns.length;l++,s++)r.columns[s].isVisible?n._allowEditing(d,s)&&(c=new t.CellRangeEventArgs(r.cells,new t.CellRange(d,s),i[l]),r.onPastingCell(c)&&(u&&(u.editItem(r.rows[d].dataItem),n._edItem=u.currentEditItem),r.cells.setCellData(d,s,c.data)&&(r.onPastedCell(c),g=!0)),h.row2=Math.max(h.row2,d),h.col2=Math.max(h.col2,s)):l--;else e--;u&&u.endUpdate(),r.select(h)})},i.prototype._isNativeCheckbox=function(t){return t instanceof HTMLInputElement&&"checkbox"==t.type&&!t.disabled&&!t.readOnly&&e.hasClass(t,"wj-cell-check")&&e.closest(t,".wj-flexgrid")==this._g.hostElement},i.prototype._parseClipString=function(e){var t=[];e=(e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n")).replace(/\n+$/g,"");var i=0,o=0;for(i=0;i<e.length;i++){var n='"'==e[i]&&e[i+1]>=" ",r=!1,s=!1;for(o=i;o<e.length&&!s;o++){var l=e[o];switch(l){case'"':n&&(r=!r);break;case"\t":case"\n":r||(this._parseClipCell(t,e,i,o,"\n"==l),i=o,s=!0)}}if(o==e.length){this._parseClipCell(t,e,i,e.length,!1);break}}return 0==t.length&&t.push([""]),t},i.prototype._parseClipCell=function(e,t,i,o,n){e.length||e.push([]);var r=t.substr(i,o-i),s=r.length;s>1&&'"'==r[0]&&'"'==r[s-1]&&(r=(r=r.substr(1,s-2)).replace(/""/g,'"')),e[e.length-1].push(r),n&&e.push([])},i.prototype._expandClipRows=function(e,t){for(var i=e.length,o=0,n=0;n<i;n++)o=Math.max(o,e[n].length);for(var r=this._g,s=0,l=0,a=t.topRow;a<=t.bottomRow;a++)r.rows[a].isVisible&&s++;for(c=t.leftCol;c<=t.rightCol;c++)r.columns[c].isVisible&&l++;if((s>1||l>1)&&(1==s&&(s=i),1==l&&(l=o),l%o==0&&s%i==0)){for(var c=o;c<l;c++)for(a=0;a<i;a++)e[a].push(e[a%i][c%o]);for(a=i;a<s;a++)e.push(e[a%i])}},i.prototype._updateEditorCell=function(e,i,o){var n=this._g,r=n.cells.getCellElement(e,i),s=n._useFrozenDiv()&&(e<n.frozenRows||i<n.frozenColumns);if(!r||s||n._hasPendingUpdates())n.refresh(!1);else if(this._updateCell(r),(o=o||n._getHasValidation())&&n.headersVisibility&t.HeadersVisibility.Row){var l=n.rowHeaders,a=l.columns.length-1,c=l.getCellElement(e,a);c&&this._updateCell(c)}},i.prototype._updateCell=function(i){var o=new t.HitTestInfo(i,null),n=t.FlexGrid._WJS_UPDATING;o.panel&&(e.addClass(i,n),o.grid.cellFactory.updateCell(o.panel,o.row,o.col,i,o.range),e.removeClass(i,n))},i.prototype._getValidationError=function(){var e=this._g;if(e._getHasValidation()){var t=this._rng.row,i=this._rng.col,o=e.cellFactory.getEditorValue(e),n=e.getCellData(t,i,!1);if(e.setCellData(t,i,o,!0,!1)){var r=e._getError(e.cells,t,i);return e.setCellData(t,i,n,!0,!1),r}}return null},i.prototype._allowEditing=function(e,i){var o=this._g;if(o.isReadOnly||o.selectionMode==t.SelectionMode.None)return!1;if(e<0||e>=o.rows.length||o.rows[e].isReadOnly||!o.rows[e].isVisible)return!1;if(i<0||i>=o.columns.length)return!1;var n=o._getBindingColumn(o.cells,e,o.columns[i]);return!(!n||n.isReadOnly||!n.isVisible)},i.prototype._commitRowEdits=function(){var e=this._g;if(this.finishEditing()&&this._edItem){var i=e.editableCollectionView;if(i&&i.currentEditItem){var o=new t.CellRangeEventArgs(e.cells,e.selection);e.onRowEditEnding(o),i.commitEdit(),e.onRowEditEnded(o)}this._edItem=null}},i.prototype._keydown=function(t){var i=this._edt;switch(t.keyCode){case e.Key.F2:return this._fullEdit=!this._fullEdit,t.preventDefault(),!0;case e.Key.F4:return this._toggleListBox(t),t.preventDefault(),!0;case e.Key.Space:return!i||"checkbox"!=i.type||i.disabled||i.readOnly||(i.checked=!i.checked,this.finishEditing(),t.preventDefault()),!0;case e.Key.Enter:if(t.preventDefault(),i&&t.altKey){var o=t.target;if(o instanceof HTMLTextAreaElement){var n=o.value,r=o.selectionStart,s=o.selectionEnd;return o.value=n.substr(0,r)+"\n"+n.substr(s),e.setSelectionRange(o,r+1),!0}}return!this.finishEditing();case e.Key.Tab:return t.preventDefault(),!this.finishEditing();case e.Key.Escape:return t.preventDefault(),this.finishEditing(!0),!0;case e.Key.Up:case e.Key.Down:case e.Key.Left:case e.Key.Right:case e.Key.PageUp:case e.Key.PageDown:case e.Key.Home:case e.Key.End:if(this._lbx)return this._keydownListBox(t);if(t.altKey)switch(t.keyCode){case e.Key.Up:case e.Key.Down:return this._toggleListBox(t),t.preventDefault(),!0}if(!this._fullEdit&&this.finishEditing())return!1}return!0},i.prototype._keydownListBox=function(t){var i=!0;if(this._lbx)switch(t.keyCode){case e.Key.Up:t.altKey?this._toggleListBox(t):this._lbx.selectedIndex>0&&this._lbx.selectedIndex--;break;case e.Key.Down:t.altKey?this._toggleListBox(t):this._lbx.selectedIndex++;break;case e.Key.Home:case e.Key.PageUp:this._lbx.selectedIndex=0;break;case e.Key.End:case e.Key.PageDown:this._lbx.selectedIndex=this._lbx.collectionView.items.length-1;break;default:i=!1}return!!i&&(t.preventDefault(),!0)},i.prototype._keypress=function(t){var i=this._edt;if(i&&"checkbox"!=i.type&&this._list&&this._list.length>0&&t.charCode>=32){var o=i.selectionStart,n=i.value.substr(0,o);t.target==i&&(o++,n+=String.fromCharCode(t.charCode));var r=this._findString(this._list,n,!0);r<0&&(r=this._findString(this._list,n,!1)),r>-1&&(i.value=this._list[r],e.setSelectionRange(i,o,i.value.length),i.dispatchEvent(this._evtInput),t.preventDefault())}},i.prototype._findString=function(e,t,i){i||(t=t.toLowerCase());for(var o=0;o<e.length;o++){var n=e[o];if(i||(n=n.toLowerCase()),0==n.indexOf(t))return o}return-1},i.prototype._toggleListBox=function(t,i){var o=this._g,n=o._selHdl.selection;if(i||(i=n),this._lbx&&(this._removeListBox(),n.contains(i)))return o.activeEditor?o.activeEditor.focus():o.containsFocus()||o.focus(),!0;var r=o.isTouching,s=o._getBindingColumn(o.cells,i.row,o.columns[i.col]);return!(!e.input||!s.dataMap||!1===s.showDropDown)&&(!(!e.input||!this.startEditing(!0,i.row,i.col,!r,t))&&(this._lbx=this._createListBox(),this._lbx.showSelection(),r&&this._lbx.focus(),!0))},i.prototype._createListBox=function(){var t=this,i=this._g,o=this._rng,n=i.rows[o.row],r=i._getBindingColumn(i.cells,o.row,i.columns[o.col]),s=document.createElement("div"),l=new e.input.ListBox(s);this._removeListBox(),e.addClass(s,"wj-dropdown-panel wj-grid-listbox"),l.maxHeight=4*n.renderHeight,l.isContentHtml=r.isContentHtml,l.itemsSource=r.dataMap.getDisplayValues(n.dataItem),l.selectedValue=i.activeEditor?i.activeEditor.value:i.getCellData(o.row,o.col,!0),e.addClass(s,r.dropDownCssClass),l.addEventListener(l.hostElement,"click",function(){t._removeListBox(),i.focus(),t.finishEditing()}),l.lostFocus.addHandler(function(){t._removeListBox()}),l.selectedIndexChanged.addHandler(function(){var o=i.activeEditor;o&&(o.value=t._lbx.selectedValue,o.dispatchEvent(t._evtInput),e.setSelectionRange(o,0,o.value.length))});var a=i.cells.getCellElement(o.row,o.col);return a?e.showPopup(s,a,!1,!1,!1):(e.showPopup(s,i.getCellBoundingRect(o.row,o.col)),s[e.Control._OWNR_KEY]=i.hostElement),l},i.prototype._removeListBox=function(){var t=this._lbx;t&&(this._lbx=null,e.hidePopup(t.hostElement,function(){t.dispose()}))},i}();t._EditHandler=i}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),wijmo;!function(e){!function(t){"use strict";var i=function(){function i(e){this._nrt=new o,this._g=e,this._keydownBnd=this._keydown.bind(this),this._attach()}return Object.defineProperty(i.prototype,"newRowAtTop",{get:function(){return this._top},set:function(t){t!=this.newRowAtTop&&(this._top=e.asBoolean(t),this.updateNewRowTemplate())},enumerable:!0,configurable:!0}),i.prototype.updateNewRowTemplate=function(){var e=this._g,i=e.editableCollectionView,o=e.rows,n=i&&i.canAddNew&&e.allowAddNew&&!e.isReadOnly,r=o.indexOf(this._nrt),s=this._top?0:o.length-1,l=!1;if(!n&&r>-1){var a=e.selection;a.row==r&&e.select(a.row-1,a.col),o.removeAt(r)}else n&&(r<0?l=!0:r!=s&&(o.removeAt(r),l=!0),l&&(this._top?o.insert(0,this._nrt):o.push(this._nrt)),this._nrt&&this._nrt._setFlag(t.RowColFlags.ParentCollapsed,!1))},i.prototype._attach=function(){var e=this._g;e&&(e.beginningEdit.addHandler(this._beginningEdit,this),e.pastingCell.addHandler(this._beginningEdit,this),e.rowEditEnded.addHandler(this._rowEditEnded,this),e.loadedRows.addHandler(this.updateNewRowTemplate,this),e.hostElement.addEventListener("keydown",this._keydownBnd,!0))},i.prototype._detach=function(){var e=this._g;e&&(e.beginningEdit.removeHandler(this._beginningEdit),e.pastingCell.removeHandler(this._beginningEdit),e.rowEditEnded.removeHandler(this._rowEditEnded),e.loadedRows.removeHandler(this.updateNewRowTemplate),e.hostElement.removeEventListener("keydown",this._keydownBnd,!0))},i.prototype._keydown=function(t){t.defaultPrevented||t.keyCode!=e.Key.Escape||null==this._g.activeEditor&&this._top&&this._nrt.dataItem&&(this._nrt.dataItem=null,this._g.invalidate())},i.prototype._beginningEdit=function(t,i){if(!i.cancel){var n=this._g.rows[i.row];if(e.tryCast(n,o)){var r=this._g.editableCollectionView;if(r&&r.canAddNew)if(this._top){if(null==this._nrt.dataItem){var s=null,l=r.sourceCollection,a=r.newItemCreator;s=e.isFunction(a)?a():l&&l.length?new l[0].constructor:{},this._nrt.dataItem=s}}else{s=r.currentAddItem&&r.currentAddItem==n.dataItem?r.currentAddItem:r.addNew();r.moveCurrentTo(s),this.updateNewRowTemplate(),this._g.refresh(!0),this._g.onRowAdded(i),i.cancel&&r.cancelNew()}}}},i.prototype._rowEditEnded=function(e,t){var i=this,o=this._g.editableCollectionView,n=this._nrt.dataItem;if(o)if(o.isAddingNew)o.commitNew();else if(n&&!t.cancel){this._nrt.dataItem=null;var r=o.addNew();for(var s in n)r[s]=n[s];this._g.onRowAdded(t),t.cancel?o.cancelNew():o.commitNew(),setTimeout(function(){i._g.select(0,i._g.columns.firstVisibleIndex),i.updateNewRowTemplate()},20)}},i}();t._AddNewHandler=i;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t}(t.Row);t._NewRowTemplate=o}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(e){!function(t){"use strict";var i=function(){function t(i){this._g=i,this._tbx=e.createElement('<input class="wj-grid-editor wj-form-control wj-grid-ime"/>'),e.disableAutoComplete(this._tbx),e.setCss(this._tbx,t._cssHidden),i.cells.hostElement.parentElement.appendChild(this._tbx),this._updateImeFocus();var o=i.hostElement;i.addEventListener(this._tbx,"compositionstart",this._compositionstart.bind(this)),i.addEventListener(o,"blur",this._updateImeFocus.bind(this),!0),i.addEventListener(o,"focus",this._updateImeFocus.bind(this),!0),i.addEventListener(o,"mousedown",this._mousedown.bind(this),!0),i.addEventListener(o,"mouseup",this._mouseup.bind(this),!0),i.cellEditEnded.addHandler(this._cellEditEnded,this),i.selectionChanged.addHandler(this._updateImeFocus,this)}return t.prototype.dispose=function(){var t=this._g,i=t.hostElement;t.removeEventListener(this._tbx,"compositionstart"),t.removeEventListener(i,"blur"),t.removeEventListener(i,"focus"),t.removeEventListener(i,"mousedown"),t.removeEventListener(i,"mouseup"),t.cellEditEnded.removeHandler(this._cellEditEnded),t.selectionChanged.removeHandler(this._updateImeFocus),e.removeChild(this._tbx)},t.prototype._cellEditEnded=function(){e.setCss(this._tbx,t._cssHidden),this._tbx.value=""},t.prototype._compositionstart=function(){var t=this,i=this._g;if(null==i.activeEditor){var o=i._selHdl.selection;if(i.startEditing(!1,o.row,o.col,!1)){o=i.editRange;var n=i.cells.hostElement,r=i.columns[o.col].pos+n.offsetLeft,s=i.rows[o.row].pos+n.offsetTop,l=i.getCellBoundingRect(o.row,o.col);if(!o.isSingleCell){var a=i.cells.getCellElement(o.row,o.col);l.width=a.offsetWidth,l.height=a.offsetHeight}o.row<i.frozenRows&&(s+=n.parentElement.scrollTop),o.col<i.frozenColumns&&(r+=n.parentElement.scrollLeft);var c=i.activeEditor,h=c&&c.parentElement?c.parentElement.style.zIndex:"";e.setCss(this._tbx,{position:"absolute",pointerEvents:"",opacity:"",left:r,top:s,width:l.width-1,height:l.height-1,zIndex:h}),c instanceof HTMLInputElement&&"minLength,maxLength,pattern".split(",").forEach(function(i){e.setAttribute(t._tbx,i,c.getAttribute(i))}),i._edtHdl._edt=this._tbx}}},t.prototype._mousedown=function(e){this._mouseDown=!0,this._updateImeFocus()},t.prototype._mouseup=function(e){this._mouseDown=!1,this._updateImeFocus()},t.prototype._updateImeFocus=function(){var t=this._g,i=e.getActiveElement();if(!t.activeEditor&&!t.isTouching&&!this._mouseDown&&e.contains(t.hostElement,i)){var o=this._tbx;this._enableIme()?i!=o&&(o.disabled=!1,o.select()):o.disabled=!0}},t.prototype._enableIme=function(){var t=this._g,i=t.selection,o=i.isValid?t._getBindingColumn(t.cells,i.row,t.columns[i.col]):null;return!!t.canEditCell(i.row,i.col)&&!(!o||o.dataType==e.DataType.Boolean)},t._cssHidden={position:"fixed",pointerEvents:"none",opacity:0,left:-10,top:-10,width:0},t}();t._ImeHandler=i}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var JSZip=window.JSZip;void 0!==JSZip&&JSZip||"function"!=typeof window.require||(JSZip=window.require("node-zip"));var wijmo;!function(e){!function(t){"use strict";t.useJSZip=function(e){JSZip=e};var s=function(){function s(){}return s.load=function(t){var s=new JSZip;e.assert(null==s.loadAsync,"Please use JSZip 2.5 to load excel files synchronously.");var l,r=new i(s);return this._loadImpl(r,t).then(function(e){return l=e}),l},s.loadAsync=function(t){var s=new JSZip;return e.assert(null!=s.loadAsync,"Please use JSZip 3.0 to load excel files asynchrounously."),this._loadImpl(s,t)},s.save=function(e){var t=Date.now(),s=this._saveWorkbookToZip(e);t=Date.now()-t;var l="";l=this._macroEnabled?"application/vnd.ms-excel.sheet.macroEnabled.12;":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;";var i=Date.now(),r=s.generate({compression:"DEFLATE"});return{base64:r,zipTime:Date.now()-i,processTime:t,href:function(){return"data:"+l+"base64,"+r}}},s.saveAsync=function(e,t){var s=this._saveWorkbookToZip(e,!0).generateAsync({type:"base64",compression:"DEFLATE"});return t&&s.catch(t),s},s._loadImpl=function(e,t){var s,l=this,i=Date.now(),r={sheets:[]},n=e.loadAsync(t,{base64:!0}).then(function(e){return s=e});t=null;var o=n.constructor;return n=n.then(function(){var e=s.file("xl/theme/theme1.xml");if(e)return e.async("string").then(function(e){l._getTheme(e),r.colorThemes=l._colorThemes}).then(function(){var e=o.resolve();return e=l._getZipStyle(s,e,r),e=l._getZipSharedString(s,e,r)});var t=o.resolve();return t=l._getZipStyle(s,t,r),t=l._getZipSharedString(s,t,r)}),n=n.then(function(){var e=s.file("xl/workbook.xml");if(e)return e.async("string").then(function(e){l._getWorkbook(e,r)})}),n=n.then(function(){l._tables=null;var e=o.resolve();return s.folder("xl/tables").forEach(function(t,s){null==l._tables&&(l._tables=[]),e=e.then(function(){return s.async("string").then(function(e){var t=l._getTable(e);t.fileName=s.name.substring(s.name.lastIndexOf("/")+1),l._tables.push(t)})})}),e}),n=n.then(function(){var e=s.file("docProps/core.xml");if(e)return e.async("string").then(function(e){l._getCoreSetting(e,r)})}),n=n.then(function(){var e=s.file("xl/vbaProject.bin");if(e)return e.async("uint8array").then(function(e){null==r.reservedContent&&(r.reservedContent={}),r.reservedContent.macros=e})}),(n=n.then(function(){var e=o.resolve();return s.folder("xl/worksheets").forEach(function(t,i){if(t&&-1===t.indexOf("/")){var n=l._getSheetIndex(i.name);e=e.then(function(){return i.async("string").then(function(e){if(l._getSheet(e,n-1,r),null!=r.sheets[n-1].tableRIds||null!=r.sheets[n-1].hyperlinkRIds){var t=s.file("xl/worksheets/_rels/sheet"+n+".xml.rels");if(t)return t.async("string").then(function(e){for(var t=e.split("<Relationship "),s=t.length;--s;){var i=t[s],o=l._getAttr(i,"Id");r.sheets[n-1].tableRIds&&-1!==r.sheets[n-1].tableRIds.indexOf(o)?(null==r.sheets[n-1].tables&&(r.sheets[n-1].tables=[]),r.sheets[n-1].tables.push(l._getSheetRelatedTable(i))):r.sheets[n-1].hyperlinkRIds&&l._getSheetRelatedHyperlink(i,o,r.sheets[n-1])}})}})})}}),e})).then(function(){return r.processTime=Date.now()-i,s=null,r})},s._getZipStyle=function(e,t,s){var l=this,i=e.file("xl/styles.xml");return i&&(t=t.then(function(){return i.async("string").then(function(e){l._getStyle(e),s.styles=l._styles,null!=l._tableStyles&&(s.tableStyles=l._tableStyles)})})),t},s._getZipSharedString=function(e,t,s){var l=this,i=e.file("xl/sharedStrings.xml");return i&&t.then(function(){return i.async("string").then(function(e){l._getSharedString(e)})}),t},s._saveWorkbookToZip=function(t,s){void 0===s&&(s=!1);Date.now();var l=new JSZip;s?e.assert(null!=l.generateAsync,"Please use JSZip 3.0 to save excel files asynchrounously."):e.assert(null==l.generateAsync,"Please use JSZip 2.5 to save excel files synchronously."),l.folder("_rels").file(".rels",this._xmlDescription+this._generateRelsDoc());var i=l.folder("docProps"),r=l.folder("xl");this._colorThemes=t.colorThemes,r.folder("theme").file("theme1.xml",this._xmlDescription+this._generateThemeDoc()),this._macroEnabled=!(!t.reservedContent||!t.reservedContent.macros),this._macroEnabled&&r.file("vbaProject.bin",t.reservedContent.macros);var n=r.folder("worksheets");i.file("core.xml",this._xmlDescription+this._generateCoreDoc(t)),this._sharedStrings=[[],0],this._styles=new Array(1),this._borders=new Array(1),this._fonts=new Array(1),this._fills=new Array(2),this._tableStyles=new Array,this._dxfs=new Array,this._contentTypes=[],this._props=[],this._xlRels=[],this._worksheets=[],this._tables=[],this._tableStyles=[];for(var o,a=t.sheets.length;a--;)if(this._generateWorkSheet(a,t,n),t.sheets[a]&&(t.sheets[a].tables&&t.sheets[a].tables.length>0||t.sheets[a].externalLinks&&t.sheets[a].externalLinks.length>0)){var h=0,u='<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">';if(t.sheets[a].externalLinks&&t.sheets[a].externalLinks.length>0&&(u+=this._generateHyperlinkRel(t.sheets[a].externalLinks),h=t.sheets[a].externalLinks.length),t.sheets[a].tables&&t.sheets[a].tables.length>0){null==o&&(o=r.folder("tables"));for(var c=0;c<t.sheets[a].tables.length;c++){var f=t.sheets[a].tables[c];this._generateTable(f,o),u+='<Relationship Target="../tables/'+f.fileName+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" Id="rId'+(c+1+h)+'"/>'}}u+="</Relationships>",n.folder("_rels").file("sheet"+(a+1)+".xml.rels",this._xmlDescription+u)}r.file("styles.xml",this._xmlDescription+this._generateStyleDoc()),l.file("[Content_Types].xml",this._xmlDescription+this._generateContentTypesDoc()),i.file("app.xml",this._xmlDescription+this._generateAppDoc(t)),r.folder("_rels").file("workbook.xml.rels",this._xmlDescription+this._generateWorkbookRels());var d=this._xmlDescription+this._generateSharedStringsDoc();return this._sharedStrings=[[],0],r.file("sharedStrings.xml",d),d=null,r.file("workbook.xml",this._xmlDescription+this._generateWorkbook(t)),l},s._getSharedString=function(e){var s,l,i,r,n,o,a,h=e.split(/<si.*?>/g),u=h.length;for(this._sharedStrings=[];--u;)for(s=1,r=!1,h[u].search(/<r>/gi)>-1?(r=!0,l=h[u].split(/<r>/g)):(h[u]=h[u].substring(0,h[u].indexOf("</t>")),l=h[u].split(/<t.*?>/g));s<l.length;)o=null,r?(-1!==l[s].indexOf("<rPr>")&&(o=this._getTextRunFont(l[s])),(i=l[s].match(/(<t.*?>)(.*)/))&&3===i.length&&null!=i[2]&&(a=i[2].substring(0,i[2].indexOf("</t>"))),n={font:o,text:t.Workbook._unescapeXML(a)},null==this._sharedStrings[u-1]?this._sharedStrings[u-1]=[n]:this._sharedStrings[u-1].push(n)):this._sharedStrings[u-1]=t.Workbook._unescapeXML(l[s]),s++},s._getInlineString=function(e){for(var t=e.split("<t>"),s=t.length,l="";--s;)l+=t[s].substring(0,t[s].indexOf("</t>"));return l},s._getCoreSetting=function(e,t){var s,l;(l=e.indexOf("<dc:creator>"))>=0&&(s=e.substr(l+12),t.creator=s.substring(0,s.indexOf("</dc:creator>"))),(l=e.indexOf("<cp:lastModifiedBy>"))>=0&&(s=e.substr(l+19),t.lastModifiedBy=s.substring(0,s.indexOf("</cp:lastModifiedBy>"))),(l=e.indexOf('<dcterms:created xsi:type="dcterms:W3CDTF">'))>=0&&(s=e.substr(l+43),t.created=new Date(s.substring(0,s.indexOf("</dcterms:created>")))),(l=e.indexOf('<dcterms:modified xsi:type="dcterms:W3CDTF">'))>=0&&(s=e.substr(l+44),t.modified=new Date(s.substring(0,s.indexOf("</dcterms:modified>"))))},s._getWorkbook=function(e,t){var s,l,i,r,n,o,a,h,u=e.substring(e.indexOf("<bookViews>"),e.indexOf("</bookViews>")),c="",f=e.indexOf("<definedNames>");for(u&&(c=this._getAttr(u,"activeTab")),t.activeWorksheet=+c,o=(n=e.split("<sheet ")).length;--o;)a=this._getAttr(n[o],"name"),h="hidden"!==this._getAttr(n[o],"state"),t.sheets.unshift({name:a,visible:h,columns:[],rows:[]});if(f>-1)for(t.definedNames=[],o=(n=e.substring(f,e.indexOf("</definedNames>")).split("<definedName ")).length;--o;)a=this._getAttr(n[o],"name"),(l=n[o].match(/.*>.+(?=<\/definedName>)/))&&(l=l[0].replace(/(.*>)(.+)/,"$2"),l=isNaN(+l)?l:+l),s={name:a,value:l},""!==(i=this._getAttr(n[o],"localSheetId"))&&(r=t.sheets[+i])&&(s.sheetName=r.name),t.definedNames.unshift(s)},s._getTheme=function(e){e=e.substring(e.indexOf("<a:clrScheme"),e.indexOf("</a:clrScheme>")),this._colorThemes=this._defaultColorThemes.slice(),this._colorThemes[0]=this._getAttr(e.substring(e.indexOf("a:lt1"),e.indexOf("</a:lt1>")),"lastClr")||this._getAttr(e.substring(e.indexOf("a:lt1"),e.indexOf("</a:lt1>")),"val"),this._colorThemes[1]=this._getAttr(e.substring(e.indexOf("a:dk1"),e.indexOf("</a:dk1>")),"lastClr")||this._getAttr(e.substring(e.indexOf("a:dk1"),e.indexOf("</a:dk1>")),"val"),this._colorThemes[2]=this._getAttr(e.substring(e.indexOf("a:lt2"),e.indexOf("</a:lt2>")),"val"),this._colorThemes[3]=this._getAttr(e.substring(e.indexOf("a:dk2"),e.indexOf("</a:dk2>")),"val");for(var t=e.substring(e.indexOf("<a:accent1"),e.indexOf("</a:accent6>")).split("<a:accent"),s=t.length;--s;)this._colorThemes[s+3]=this._getAttr(t[s],"val")},s._getStyle=function(e){var s,l,i,r,n,o=[],a=[],h=[],u=this._numFmts.slice();if(this._styles=[],(i=e.indexOf("<numFmts"))>=0){var c=e.substring(i+8,e.indexOf("</numFmts>")).split("<numFmt");for(s=c.length;--s;)l=c[s],u[+this._getAttr(l,"numFmtId")]=this._getAttr(l,"formatCode")}if((i=e.indexOf("<fonts"))>=0){var f=e.substring(i,e.indexOf("</fonts>")).split("<font>");for(s=f.length;--s;)l=f[s],r=this._getChildNodeValue(l,"sz"),o[s-1]={bold:l.indexOf("<b/>")>=0,italic:l.indexOf("<i/>")>=0,underline:l.indexOf("<u/>")>=0,size:Math.round(r?96*+r/72:14),family:this._getChildNodeValue(l,"name"),color:this._getColor(l,!1)},r=null}if((i=e.indexOf("<fills"))>=0){var d=e.substring(i,e.indexOf("</fills>")).split("<fill>");for(s=d.length;--s;)a[s-1]=this._getColor(d[s],!0)}if((i=e.indexOf("<borders"))>=0){var p=e.substring(i,e.indexOf("</borders>")).split("<border>");for(s=p.length;--s;)l=p[s],h[s-1]={left:this._getEdgeBorder(l,"left"),right:this._getEdgeBorder(l,"right"),top:this._getEdgeBorder(l,"top"),bottom:this._getEdgeBorder(l,"bottom")}}if((i=e.indexOf("<cellXfs"))>=0){var m=e.substring(i,e.indexOf("</cellXfs>")).split("<xf");s=m.length;for(var g,_,y,b,v,S;--s;)l=m[s],_=(g=u[y=+this._getAttr(l,"numFmtId")])?/[hsmy\:]/i.test(g)?"date":g.indexOf("0")>-1?"number":"@"===g?"string":"unknown":"unknown",b=(y=+this._getAttr(l,"fontId"))>0?o[y]:null,v=(y=+this._getAttr(l,"fillId"))>1?a[y]:null,S=(y=+this._getAttr(l,"borderId"))>0?h[y]:null,i=l.indexOf("<alignment"),n=+this._getAttr(l,"quotePrefix"),this._styles.unshift({formatCode:g,type:_,font:b,fillColor:v,borders:S,hAlign:i>=0?t.Workbook._parseStringToHAlign(this._getAttr(l,"horizontal")):null,vAlign:i>=0?t.Workbook._parseStringToVAlign(this._getAttr(l,"vertical")):null,wordWrap:i>=0?"1"===this._getAttr(l,"wrapText"):null,quotePrefix:1===n})}if(e.indexOf("<tableStyle ")>-1){this._tableStyles=[];var w=e.substring(e.indexOf("<tableStyles "),e.indexOf("</tableStyles>")),x=e.substring(e.indexOf("<dxfs "),e.indexOf("</dxfs>"));this._getTableStyles(w,x.split("<dxf>"))}},s._getEdgeBorder=function(e,s){var l,i,r,n,o=e.indexOf("<"+s),a=e.indexOf("</"+s+">");if(o>=0){i=e.substring(o),i=a>=0?i.substring(0,a):i.substring(0,i.indexOf("/>"));var h=this._getAttr(i,"style");h&&(r=t.Workbook._parseStringToBorderType(h),n=this._getColor(i,!1),r===t.BorderStyle.Thin&&n&&"#c6c6c6"===n.toLowerCase()||((l={}).style=r,l.color=n))}return l},s._getSheet=function(s,l,i){var r,n=[];if(s.indexOf("<mergeCells")>-1)for(var o=s.substring(s.indexOf("<mergeCells"),s.indexOf("</mergeCells>")).split("<mergeCell "),a=o.length;--a;)2===(r=this._getAttr(o[a],"ref").split(":")).length&&n.unshift({topRow:+r[0].match(/\d*/g).join("")-1,leftCol:this._alphaNum(r[0].match(/[a-zA-Z]*/g)[0]),bottomRow:+r[1].match(/\d*/g).join("")-1,rightCol:this._alphaNum(r[1].match(/[a-zA-Z]*/g)[0])});this._getsBaseSharedFormulas(s);var h=s.split("<row "),u=i.sheets[l];if(h[0].indexOf("<dimension")>=0){var c=this._getAttr(h[0].substr(h[0].indexOf("<dimension")),"ref");c&&(c=c.substr(c.indexOf(":")+1),u.maxCol=this._alphaNum(c.match(/[a-zA-Z]*/g)[0])+1,u.maxRow=+c.match(/\d*/g).join(""))}var f=s.indexOf("<tableParts");if(f>-1){var d=s.substring(f,s.indexOf("</tableParts>")).split("<tablePart "),p=d.length;for(u.tableRIds=[];--p;)u.tableRIds.unshift(this._getAttr(d[p],"r:id"))}var m=[],g=[],_=[],y=null,b=null;if(h.length>0&&h[0].indexOf("<cols>")>-1)for(var v=(m=h[0].substring(h[0].indexOf("<cols>")+6,h[0].indexOf("</cols>")).split("<col ")).length-1;v>0;v--){var S=this._parseCharWidthToPixel(+this._getAttr(m[v],"width"));b=null,m[v].indexOf("style")>-1&&(b=this._styles[+this._getAttr(m[v],"style")]||{type:"General",formatCode:null}),y=null,b&&(b.font||b.fillColor||b.hAlign||b.vAlign||b.wordWrap||b.borders||b.formatCode&&"General"!==b.formatCode)&&(y={format:b.formatCode&&"General"!==b.formatCode?b.formatCode:null,font:b.font,fill:{color:b.fillColor},borders:b.borders,hAlign:b.hAlign,vAlign:b.vAlign,wordWrap:b.wordWrap});for(var w=+this._getAttr(m[v],"min")-1;w<+this._getAttr(m[v],"max");w++)g[w]={visible:"1"!==this._getAttr(m[v],"hidden"),autoWidth:"1"===this._getAttr(m[v],"bestFit"),width:S,style:y}}if(u.columns=g,h.length>0&&h[0].indexOf("<pane")>-1&&"frozen"===this._getAttr(h[0].substr(h[0].indexOf("<pane")),"state")){var x=this._getAttr(h[0].substr(h[0].indexOf("<pane")),"ySplit"),C=this._getAttr(h[0].substr(h[0].indexOf("<pane")),"xSplit");u.frozenPane={rows:x?+x:NaN,columns:C?+C:NaN}}for(u.summaryBelow="0"!==this._getAttr(h[0],"summaryBelow"),a=h.length;--a;){var k=u.rows[+this._getAttr(h[a],"r")-1]={visible:!0,groupLevel:NaN,cells:[]};if(h[a].substring(0,h[a].indexOf(">")).indexOf("hidden")>-1&&"1"===this._getAttr(h[a],"hidden")&&(k.visible=!1),"1"===this._getAttr(h[a],"customHeight")){var F=+this._getAttr(h[a].substring(0,h[a].indexOf(">")).replace("customHeight",""),"ht");k.height=96*F/72}y=null,b=null,"1"===this._getAttr(h[a],"customFormat")&&(y=(b=this._styles[+this._getAttr(h[a].substring(h[a].indexOf(" s=")),"s")]||{type:"General",formatCode:null}).font||b.fillColor||b.hAlign||b.vAlign||b.wordWrap||b.borders||b.formatCode&&"General"!==b.formatCode?{format:b.formatCode&&"General"!==b.formatCode?b.formatCode:null,font:b.font,fill:{color:b.fillColor},borders:b.borders,hAlign:b.hAlign,vAlign:b.vAlign,wordWrap:b.wordWrap}:null),k.style=y;var T=this._getAttr(h[a],"outlineLevel");k.groupLevel=T&&""!==T?+T:NaN,k.collapsed="1"===this._getAttr(h[a],"collapsed");for(var z=h[a].split("<c "),A=z.length;--A;){var O=z[A];y=(b=this._styles[+this._getAttr(O,"s")]||{type:"General",formatCode:null}).font||b.fillColor||b.hAlign||b.vAlign||b.wordWrap||b.borders||b.formatCode&&"General"!==b.formatCode?{format:b.formatCode&&"General"!==b.formatCode?b.formatCode:null,font:b.font,fill:{color:b.fillColor},borders:b.borders,hAlign:b.hAlign,vAlign:b.vAlign,wordWrap:b.wordWrap}:null;var R=this._getAttr(O.substring(0,O.indexOf(">")),"t")||b.type,D=null,N="inlineStr"===R||O.indexOf("<is>")>=0;N?D=this._getInlineString(O):O.indexOf("<v>")>-1&&(D=O.substring(O.indexOf("<v>")+3,O.indexOf("</v>")));var B=null,W=null,P=null;O.indexOf("<f")>-1&&(O.indexOf("</f>")>-1?(B=O.match(/<f.*>.+(?=<\/f>)/))&&(B=B[0].replace(/(\<f.*>)(.+)/,"$2")):(W=this._getAttr(O,"si"))&&(P=this._getAttr(O,"r"),B=this._getSharedFormula(W,P))),null!=B&&(B=B.replace(/\[\#This Row\]\s*,\s*/gi,"@")),"str"===R||"e"===R||N||(D=D?+D:""),w=this._alphaNum(this._getAttr(O,"r").match(/[a-zA-Z]*/g)[0]);var L=null;switch(R){case"s":null!=(D=this._sharedStrings[D])&&(e.isString(D)?b&&b.quotePrefix&&"'"!==D[0]&&(D="'"+D):(L=D.slice(),D=this._getTextOfTextRuns(L)));break;case"b":D=1===D;break;case"date":D=D?this._convertDate(D):""}e.isNumber(D)&&(null==y&&(y={format:""}),e.isInt(D)?y.format=y.format||"#,##0":y.format=y.format||"#,##0.00"),k.cells[w]={value:D,textRuns:L,isDate:"date"===R,formula:t.Workbook._unescapeXML(B),style:y,visible:-1===_.indexOf(w)}}}var M=s.indexOf("<hyperlinks");if(M>-1)for(var E=s.substring(M,s.indexOf("</hyperlinks>")).split("<hyperlink "),I=E.length;--I;)this._getHyperlink(u,E[I]);if(u.frozenPane){if(!isNaN(u.frozenPane.rows))for(a=0;a<u.rows.length&&a<u.frozenPane.rows;a++)u.rows[a]&&!u.rows[a].visible&&u.frozenPane.rows++;if(!isNaN(u.frozenPane.columns))for(a=0;a<g.length&&a<u.frozenPane.columns;a++)g[a]&&!g[a].visible&&u.frozenPane.columns++}var H;for(A=0;A<n.length;A++)H=n[A],u.rows[H.topRow].cells[H.leftCol].rowSpan=H.bottomRow-H.topRow+1,u.rows[H.topRow].cells[H.leftCol].colSpan=H.rightCol-H.leftCol+1},s._getTable=function(e){var t={};t.name=this._getAttr(e,"name"),t.range=this._getAttr(e,"ref");var s=this._getAttr(e,"headerRowCount");t.showHeaderRow=""==s||"1"===s;var l=this._getAttr(e,"totalsRowCount");t.showTotalRow="1"===l;var i=e.substring(e.indexOf("<tableStyleInfo")),r=this._getAttr(i,"name");this._isBuiltInStyleName(r)?t.style={name:r}:t.style=this._getTableStyleByName(r),t.showBandedColumns="1"===this._getAttr(i,"showColumnStripes"),t.showBandedRows="1"===this._getAttr(i,"showRowStripes"),t.alterFirstColumn="1"===this._getAttr(i,"showFirstColumn"),t.alterLastColumn="1"===this._getAttr(i,"showLastColumn");var n=e.split("<tableColumn ");t.columns=[];for(var o=1;o<n.length;o++){var a=n[o];t.columns.push(this._getTableColumn(a))}if(e.indexOf("filterColumn")>-1)for(var h=e.substring(e.indexOf("<autoFilter"),e.indexOf("</autoFilter>")).split("<filterColumn"),u=1;u<h.length;u++){var c=h[u],f=+this._getAttr(c,"colId");t.columns[f].showFilterButton="1"!==this._getAttr(c,"hiddenButton")}return t},s._getTableColumn=function(e){var t={};t.name=this._getAttr(e,"name");var s=this._getAttr(e,"totalsRowLabel");if(s)t.totalRowLabel=s;else{var l=this._getAttr(e,"totalsRowFunction");"custom"===l&&(l=e.substring(e.indexOf("<totalsRowFormula>")+2+"totalsRowFormula".length,e.indexOf("</totalsRowFormula>"))),t.totalRowFunction=l}return t},s._getSheetRelatedTable=function(e){var t=this._getAttr(e,"Target");t=t.substring(t.lastIndexOf("/")+1);for(var s=0;s<this._tables.length;s++){var l=this._tables[s];if(t===l.fileName)return l}return null},s._getSheetRelatedHyperlink=function(e,t,s){for(var l=0;l<s.hyperlinkRIds.length;l++){var i=s.hyperlinkRIds[l];if(i.rId===t){var r=this._getAttr(e,"Target");s.rows[i.ref.row]&&s.rows[i.ref.row].cells[i.ref.col]&&(s.rows[i.ref.row].cells[i.ref.col].link=r)}}},s._getTableStyles=function(e,t){for(var s=e.split("<tableStyle "),l=s.length;--l;){var i={},r=s[l];i.name=this._getAttr(r,"name");for(var n=r.split("<tableStyleElement "),o=n.length;--o;){var a=n[o],h=this._getAttr(a,"type");switch(h){case"firstRowStripe":h="firstBandedRowStyle";break;case"secondRowStripe":h="secondBandedRowStyle";break;case"firstColumnStripe":h="firstBandedColumnStyle";break;case"secondColumnStripe":h="secondBandedColumnStyle";break;default:h+="Style"}var u=this._getAttr(a,"dxfId");""!==u&&(i[h]=this._getTableStyleElement(t[+u+1]));var c=this._getAttr(a,"size");c&&(null==i[h]&&(i[h]={}),i[h].size=+c)}this._tableStyles.push(i)}},s._getTableStyleElement=function(e){var t=null,s=null,l=null,i=null,r=e.indexOf("<font>");if(r>=0){t=e.substring(r,e.indexOf("</font>"));var n=this._getChildNodeValue(t,"sz");s={bold:"1"===this._getChildNodeValue(t,"b"),italic:"1"===this._getChildNodeValue(t,"i"),underline:"1"===this._getChildNodeValue(t,"u"),size:Math.round(n?96*+n/72:14),family:this._getChildNodeValue(t,"name"),color:this._getColor(t,!1)}}return t=null,(r=e.indexOf("<fill>"))>=0&&(t=e.substring(r,e.indexOf("</fill>")),l={color:this._getColor(t,!0)}),t=null,(r=e.indexOf("<border>"))>=0&&(t=e.substring(r,e.indexOf("</border>")),i={left:this._getEdgeBorder(t,"left"),right:this._getEdgeBorder(t,"right"),top:this._getEdgeBorder(t,"top"),bottom:this._getEdgeBorder(t,"bottom"),vertical:this._getEdgeBorder(t,"vertical"),horizontal:this._getEdgeBorder(t,"horizontal")}),{font:s,fill:l,borders:i}},s._getTableStyleByName=function(e){var t,s;if(null==this._tableStyles||0===this._tableStyles.length)return null;for(t=0;t<this._tableStyles.length;t++)if((s=this._tableStyles[t])&&s.name.toLowerCase()===e.toLowerCase())return s;return null},s._getHyperlink=function(e,s){var l,i,r,n,o,a;if(null!=(l=this._getAttr(s,"ref"))){r=l.split(":"),null==(o=this._getAttr(s,"r:id"))&&(a=this._getAttr(s,"location"));for(var h=0;h<r.length;h++)i=r[h],n=t.Workbook.tableAddress(i),o?(null==e.hyperlinkRIds&&(e.hyperlinkRIds=[]),e.hyperlinkRIds.push({ref:n,rId:o})):a&&e.rows[n.row]&&e.rows[n.row].cells[n.col]&&(e.rows[n.row].cells[n.col].link=a)}},s._getTextRunFont=function(e){var t=this._getChildNodeValue(e,"sz");return{bold:e.indexOf("<b/>")>=0,italic:e.indexOf("<i/>")>=0,underline:e.indexOf("<u/>")>=0,size:Math.round(t?96*+t/72:14),family:this._getChildNodeValue(e,"name"),color:this._getColor(e,!1)}},s._getTextOfTextRuns=function(e){var t,s,l="";for(t=0;t<e.length;t++)(s=e[t])&&(l+=s.text);return l},s._isBuiltInStyleName=function(e){var t;if(0===e.search(/TableStyleLight/i)){if(t=+e.substring(15),!isNaN(t)&&t>=1&&t<=21)return!0}else if(0===e.search(/TableStyleMedium/i)){if(t=+e.substring(16),!isNaN(t)&&t>=1&&t<=28)return!0}else if(0===e.search(/TableStyleDark/i)&&(t=+e.substring(14),!isNaN(t)&&t>=1&&t<=11))return!0;return!1},s._generateRelsDoc=function(){return'<Relationships xmlns="'+this._relationshipsNS+'"><Relationship Target="docProps/app.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Id="rId3"/><Relationship Target="docProps/core.xml" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Id="rId2"/><Relationship Target="xl/workbook.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Id="rId1"/></Relationships>'},s._generateThemeDoc=function(){return'<a:theme name="Office Theme" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:themeElements>'+this._generateClrScheme()+this._generateFontScheme()+this._generateFmtScheme()+"</a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/></a:theme>"},s._generateClrScheme=function(){return null===this._colorThemes&&(this._colorThemes=[]),'<a:clrScheme name="Office"><a:dk1><a:sysClr lastClr="'+(this._colorThemes[1]||"000000")+'" val="windowText"/></a:dk1><a:lt1><a:sysClr lastClr="'+(this._colorThemes[0]||"FFFFFF")+'" val="window"/></a:lt1><a:dk2><a:srgbClr val="'+(this._colorThemes[3]||"1F497D")+'"/></a:dk2><a:lt2><a:srgbClr val="'+(this._colorThemes[2]||"EEECE1")+'"/></a:lt2><a:accent1><a:srgbClr val="'+(this._colorThemes[4]||"4F81BD")+'"/></a:accent1><a:accent2><a:srgbClr val="'+(this._colorThemes[5]||"C0504D")+'"/></a:accent2><a:accent3><a:srgbClr val="'+(this._colorThemes[6]||"9BBB59")+'"/></a:accent3><a:accent4><a:srgbClr val="'+(this._colorThemes[7]||"8064A2")+'"/></a:accent4><a:accent5><a:srgbClr val="'+(this._colorThemes[8]||"4BACC6")+'"/></a:accent5><a:accent6><a:srgbClr val="'+(this._colorThemes[9]||"F79646")+'"/></a:accent6><a:hlink><a:srgbClr val="0000FF"/></a:hlink><a:folHlink><a:srgbClr val="800080"/></a:folHlink></a:clrScheme>'},s._generateFontScheme=function(){return'<a:fontScheme name="Office"><a:majorFont><a:latin typeface="Cambria"/><a:ea typeface=""/><a:cs typeface=""/><a:font typeface="ＭＳ Ｐゴシック" script="Jpan"/><a:font typeface="맑은 고딕" script="Hang"/><a:font typeface="宋体" script="Hans"/><a:font typeface="新細明體" script="Hant"/><a:font typeface="Times New Roman" script="Arab"/><a:font typeface="Times New Roman" script="Hebr"/><a:font typeface="Tahoma" script="Thai"/><a:font typeface="Nyala" script="Ethi"/><a:font typeface="Vrinda" script="Beng"/><a:font typeface="Shruti" script="Gujr"/><a:font typeface="MoolBoran" script="Khmr"/><a:font typeface="Tunga" script="Knda"/><a:font typeface="Raavi" script="Guru"/><a:font typeface="Euphemia" script="Cans"/><a:font typeface="Plantagenet Cherokee" script="Cher"/><a:font typeface="Microsoft Yi Baiti" script="Yiii"/><a:font typeface="Microsoft Himalaya" script="Tibt"/><a:font typeface="MV Boli" script="Thaa"/><a:font typeface="Mangal" script="Deva"/><a:font typeface="Gautami" script="Telu"/><a:font typeface="Latha" script="Taml"/><a:font typeface="Estrangelo Edessa" script="Syrc"/><a:font typeface="Kalinga" script="Orya"/><a:font typeface="Kartika" script="Mlym"/><a:font typeface="DokChampa" script="Laoo"/><a:font typeface="Iskoola Pota" script="Sinh"/><a:font typeface="Mongolian Baiti" script="Mong"/><a:font typeface="Times New Roman" script="Viet"/><a:font typeface="Microsoft Uighur" script="Uigh"/><a:font typeface="Sylfaen" script="Geor"/></a:majorFont><a:minorFont><a:latin typeface="Calibri"/><a:ea typeface=""/><a:cs typeface=""/><a:font typeface="ＭＳ Ｐゴシック" script="Jpan"/><a:font typeface="맑은 고딕" script="Hang"/><a:font typeface="宋体" script="Hans"/><a:font typeface="新細明體" script="Hant"/><a:font typeface="Arial" script="Arab"/><a:font typeface="Arial" script="Hebr"/><a:font typeface="Tahoma" script="Thai"/><a:font typeface="Nyala" script="Ethi"/><a:font typeface="Vrinda" script="Beng"/><a:font typeface="Shruti" script="Gujr"/><a:font typeface="DaunPenh" script="Khmr"/><a:font typeface="Tunga" script="Knda"/><a:font typeface="Raavi" script="Guru"/><a:font typeface="Euphemia" script="Cans"/><a:font typeface="Plantagenet Cherokee" script="Cher"/><a:font typeface="Microsoft Yi Baiti" script="Yiii"/><a:font typeface="Microsoft Himalaya" script="Tibt"/><a:font typeface="MV Boli" script="Thaa"/><a:font typeface="Mangal" script="Deva"/><a:font typeface="Gautami" script="Telu"/><a:font typeface="Latha" script="Taml"/><a:font typeface="Estrangelo Edessa" script="Syrc"/><a:font typeface="Kalinga" script="Orya"/><a:font typeface="Kartika" script="Mlym"/><a:font typeface="DokChampa" script="Laoo"/><a:font typeface="Iskoola Pota" script="Sinh"/><a:font typeface="Mongolian Baiti" script="Mong"/><a:font typeface="Arial" script="Viet"/><a:font typeface="Microsoft Uighur" script="Uigh"/><a:font typeface="Sylfaen" script="Geor"/></a:minorFont></a:fontScheme>'},s._generateFmtScheme=function(){return'<a:fmtScheme name="Office">'+this._generateFillScheme()+this._generateLineStyles()+this._generateEffectScheme()+this._generateBgFillScheme()+"</a:fmtScheme>"},s._generateFillScheme=function(){return'<a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:satMod val="350000"/></a:schemeClr></a:gs></a:gsLst><a:lin scaled="1" ang="16200000"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="51000"/><a:satMod val="130000"/></a:schemeClr></a:gs><a:gs pos="80000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="130000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="94000"/><a:satMod val="135000"/></a:schemeClr></a:gs></a:gsLst><a:lin scaled="1" ang="16200000"/></a:gradFill></a:fillStyleLst>'},s._generateLineStyles=function(){return'<a:lnStyleLst><a:ln algn="ctr" cmpd="sng" cap="flat" w="9525"><a:solidFill><a:schemeClr val="phClr"><a:shade val="9500"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln><a:ln algn="ctr" cmpd="sng" cap="flat" w="25400"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln><a:ln algn="ctr" cmpd="sng" cap="flat" w="38100"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln></a:lnStyleLst>'},s._generateEffectScheme=function(){return'<a:effectStyleLst><a:effectStyle><a:effectLst><a:outerShdw dir="5400000" rotWithShape="0" dist="23000" blurRad="40000"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw dir="5400000" rotWithShape="0" dist="23000" blurRad="40000"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw dir="5400000" rotWithShape="0" dist="23000" blurRad="40000"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw></a:effectLst><a:scene3d><a:camera prst="orthographicFront"><a:rot rev="0" lon="0" lat="0"/></a:camera><a:lightRig dir="t" rig="threePt"><a:rot rev="1200000" lon="0" lat="0"/></a:lightRig></a:scene3d><a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d></a:effectStyle></a:effectStyleLst>'},s._generateBgFillScheme=function(){return'<a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs><a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs></a:gsLst><a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="200000"/></a:schemeClr></a:gs></a:gsLst><a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path></a:gradFill></a:bgFillStyleLst>'},s._generateCoreDoc=function(e){var t='<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">';return e.creator?t+="<dc:creator>"+e.creator+"</dc:creator>":t+="<dc:creator/>",e.lastModifiedBy?t+="<cp:lastModifiedBy>"+e.lastModifiedBy+"</cp:lastModifiedBy>":t+="<cp:lastModifiedBy/>",t+='<dcterms:created xsi:type="dcterms:W3CDTF">'+(e.created||new Date).toISOString()+'</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">'+(e.modified||new Date).toISOString()+"</dcterms:modified></cp:coreProperties>"},s._generateSheetGlobalSetting=function(e,t,s){var l=t.rows&&t.rows[0]&&t.rows[0].cells?t.rows[0].cells.length:0,i=' xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">';return i+='<sheetPr><outlinePr summaryBelow="0"/></sheetPr>',i+='<dimension ref="A1'+(l>0?":"+this._numAlpha(l-1)+t.rows.length:"")+'"/>',i+='<sheetViews><sheetView workbookViewId="0"',e===s.activeWorksheet&&(i+=' tabSelected="1"'),!t.frozenPane||0===t.frozenPane.rows&&0===t.frozenPane.columns?i+="/>":(i+=">",i+='<pane state="frozen" activePane="'+(0!==t.frozenPane.rows&&0!==t.frozenPane.columns?"bottomRight":0!==t.frozenPane.rows?"bottomLeft":"topRight")+'" topLeftCell="'+(this._numAlpha(t.frozenPane.columns)+(t.frozenPane.rows+1))+'" ySplit="'+t.frozenPane.rows.toString()+'" xSplit="'+t.frozenPane.columns.toString()+'"/>',i+="</sheetView>"),i+="</sheetViews>",i+='<sheetFormatPr defaultRowHeight="15" x14ac:dyDescent="0.25"/>'},s._generateCell=function(e,s,l,i,r,n){var o='<c r="'+this._numAlpha(s)+(e+1)+'" s="'+l.toString()+'"';i&&(o+=' t="'+i+'"');var a="";return n&&("="===n[0]&&(n=n.substring(1)),n=n.replace(/\@\s*/gi,"[#This Row], "),a+="<f>"+t.Workbook._escapeXML(n)+"</f>"),null!=r&&""!==r&&(a+="<v>"+r+"</v>"),o+(a?">"+a+"</c>":"/>")},s._generateMergeSetting=function(e){for(var t='<mergeCells count="'+e.length.toString()+'">',s=0;s<e.length;s++)t+='<mergeCell ref="'+e[s].join(":")+'"/>';return t+"</mergeCells>"},s._generateStyleDoc=function(){var e='<styleSheet xmlns="'+this._workbookNS+'" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac">',t="",s="",l=[],i=0,r=0,n="",o="";o=this._generateFontStyle({},!0);var a="",h="";h+=this._generateFillStyle("none",null),h+=this._generateFillStyle("gray125",null);var u="",c="";c+=this._generateBorderStyle({});var f="",d="";for(d+=this._generateCellXfs(0,0,0,0,{});i<this._styles.length;){var p=this._styles[i];if(p){var m=0;if((p=JSON.parse(p)).format&&"General"!==p.format&&(m=this._numFmts.indexOf(p.format))<0){var g=l.indexOf(p.format);-1===g?(l.push(p.format),s+='<numFmt numFmtId="'+(m=164+r).toString()+'" formatCode="'+p.format+'"/>',r++):m=164+g}var _=0;if(p.borders){var y=JSON.stringify(p.borders);(_=this._borders.indexOf(y))<0&&(_=this._borders.push(y)-1,c+=this._generateBorderStyle(p.borders))}var b=0;if(p.font){var v=JSON.stringify(p.font);(b=this._fonts.indexOf(v))<0&&(b=this._fonts.push(v)-1,o+=this._generateFontStyle(p.font))}var S=0;if(p.fill&&p.fill.color){var w=JSON.stringify(p.fill);(S=this._fills.indexOf(w))<0&&(S=this._fills.push(w)-1,h+=this._generateFillStyle("solid",p.fill.color))}d+=this._generateCellXfs(m,_,b,S,p)}i++}l=null,r>0?(t='<numFmts count="'+r+'">',t+=s,t+="</numFmts>"):t='<numFmts count="0"/>',e+=t,n='<fonts count="'+this._fonts.length+'" x14ac:knownFonts="1">',n+=o,e+=n+="</fonts>",a='<fills count="'+this._fills.length+'">',a+=h,e+=a+="</fills>",u='<borders count="'+this._borders.length+'">',u+=c,e+=u+="</borders>",e+='<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>',f='<cellXfs count="'+this._styles.length+'">',f+=d,f+="</cellXfs>";var x="",C="";return this._tableStyles.length>0&&(this._getDxfs(),this._dxfs.length>0&&(x=this._generateDxfs()),C=this._generateTableStyles()),e+=f+'<cellStyles count="1"><cellStyle xfId="0" builtinId="0" name="Normal"/></cellStyles>'+(""===x?'<dxfs count="0"/>':x)+(""===C?'<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleLight16"/>':C)+'<extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}"><x14ac:slicerStyles defaultSlicerStyle="SlicerStyleLight1" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"/></ext></extLst></styleSheet>'},s._generateBorderStyle=function(e,t){void 0===t&&(t=!1);var s,l,i="<border>";for(var r in{left:0,right:0,top:0,bottom:0,diagonal:0,vertical:0,horizontal:0})(t||"vertical"!==r&&"horizontal"!==r)&&(e[r]?(s="<"+r+' style="'+e[r].style+'">',"",6===(l=(l=e[r].color)?"#"===l[0]?l.substring(1):l:"").length&&(l="FF"+l),l||(l="FF000000"),s+='<color rgb="'+l+'"/>',s+="</"+r+">"):s="<"+r+"/>",i+=s);return i+="</border>"},s._generateFontStyle=function(e,t){void 0===t&&(t=!1);var s="<font>";return e.bold&&(s+="<b/>"),e.italic&&(s+="<i/>"),e.underline&&(s+="<u/>"),s+='<sz val="'+(e.size?Math.round(72*e.size/96):this._defaultFontSize)+'"/>',e.color?s+='<color rgb="FF'+("#"===e.color[0]?e.color.substring(1):e.color)+'"/>':s+='<color theme="1"/>',s+='<name val="'+(e.family||this._defaultFontName)+'"/>',s+='<family val="2"/>',t&&(s+='<scheme val="minor"/>'),s+="</font>"},s._generateFillStyle=function(e,t,s){void 0===s&&(s=!1);var l,i='<fill><patternFill patternType="'+e+'">';return t&&(l=s?"<bgColor ":"<fgColor ",i+=l+='rgb="FF'+("#"===t[0]?t.substring(1):t)+'"/>'),i+="</patternFill></fill>"},s._generateCellXfs=function(e,t,s,l,i){var r='<xf xfId="0" ';if(r+='numFmtId="'+e.toString()+'" ',e>0&&(r+='applyNumberFormat="1" '),r+='borderId="'+t.toString()+'" ',t>0&&(r+='applyBorder="1" '),r+='fontId="'+s.toString()+'" ',s>0&&(r+='applyFont="1" '),r+='fillId="'+l.toString()+'" ',l>0&&(r+='applyFill="1" '),i.quotePrefix&&(r+='quotePrefix="1" '),i.hAlign||i.vAlign||i.indent||i.wordWrap){r+='applyAlignment="1">';var n="<alignment ";i.hAlign&&(n+='horizontal="'+i.hAlign+'" '),i.vAlign&&(n+='vertical="'+i.vAlign+'" '),i.indent&&(n+='indent="'+i.indent+'" '),i.wordWrap&&(n+='wrapText="1"'),r+=n+="/>",r+="</xf>"}else r+="/>";return r},s._generateContentTypesDoc=function(){var e,t='<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">';for(this._macroEnabled&&(t+='<Default ContentType="application/vnd.ms-office.vbaProject" Extension="bin"/>'),t+='<Default ContentType="application/vnd.openxmlformats-package.relationships+xml" Extension="rels"/><Default ContentType="application/xml" Extension="xml"/><Override ContentType="'+(this._macroEnabled?"application/vnd.ms-excel.sheet.macroEnabled.main+xml":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml")+'" PartName="/xl/workbook.xml"/>',e=0;e<this._contentTypes.length;e++)t+=this._contentTypes[e];for(t+='<Override ContentType="application/vnd.openxmlformats-officedocument.theme+xml" PartName="/xl/theme/theme1.xml"/><Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" PartName="/xl/styles.xml"/><Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" PartName="/xl/sharedStrings.xml"/><Override ContentType="application/vnd.openxmlformats-package.core-properties+xml" PartName="/docProps/core.xml"/><Override ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" PartName="/docProps/app.xml"/>',e=0;e<this._tables.length;e++)t+='<Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml" PartName="/xl/tables/'+this._tables[e]+'"/>';return t+="</Types>"},s._generateAppDoc=function(e){for(var t='<Properties xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes" xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"><Application>'+(e.application||"wijmo.xlsx")+'</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector baseType="variant" size="2"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>'+this._props.length+'</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector baseType="lpstr" size="'+this._props.length+'">',s=0;s<this._props.length;s++)t+="<vt:lpstr>"+this._props[s]+"</vt:lpstr>";return t+="</vt:vector></TitlesOfParts><Manager/><Company>"+(e.company||"GrapeCity, Inc.")+"</Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>1.0</AppVersion></Properties>"},s._generateWorkbookRels=function(){for(var e='<Relationships xmlns="'+this._relationshipsNS+'">',t=0;t<this._xlRels.length;t++)e+=this._xlRels[t];return e+='<Relationship Target="sharedStrings.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Id="rId'+(this._xlRels.length+1)+'"/><Relationship Target="styles.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Id="rId'+(this._xlRels.length+2)+'"/><Relationship Target="theme/theme1.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Id="rId'+(this._xlRels.length+3)+'"/>',this._macroEnabled&&(e+='<Relationship Target="vbaProject.bin" Type="http://schemas.microsoft.com/office/2006/relationships/vbaProject" Id="rId'+(this._xlRels.length+4)+'"/>'),e+="</Relationships>"},s._generateWorkbook=function(e){for(var t='<workbook xmlns="'+this._workbookNS+'" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><fileVersion rupBuild="9303" lowestEdited="5" lastEdited="5" appName="xl"/><workbookPr/><bookViews><workbookView xWindow="480" yWindow="60" windowWidth="18195" windowHeight="8505"'+(null!=e.activeWorksheet?' activeTab="'+e.activeWorksheet.toString()+'"':"")+"/></bookViews><sheets>",s=0;s<this._worksheets.length;s++)t+=this._worksheets[s];if(t+="</sheets>",e.definedNames&&e.definedNames.length>0){for(t+="<definedNames>",s=0;s<e.definedNames.length;s++){var l=-1;e.definedNames[s].sheetName&&(l=this._getSheetIndexBySheetName(e,e.definedNames[s].sheetName)),t+='<definedName name="'+e.definedNames[s].name+'" '+(l>-1?'localSheetId="'+l+'"':"")+">"+e.definedNames[s].value+"</definedName>"}t+="</definedNames>"}return t+='<calcPr fullCalcOnLoad="1"/></workbook>'},s._generateWorkSheet=function(s,l,i){var r,n,o,a,h,u,c,f,d,p,m,g,_,y,b,v,S,w,x,C,k,F,T,z=1;if(r=s+1,n=l.sheets[s],o=n.columns,a=this._cloneColumnsStyle(o),!n)throw"Worksheet should not be empty!";var A='<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"';A+=this._generateSheetGlobalSetting(s,n,l);var O="<sheetData>";for(h=n.style?this._cloneStyle(n.style):null,"",[],c=[],f=-1,d=(u=n.rows)?u.length:0;++f<d;){for(p=-1,m=u[f]&&u[f].cells?u[f].cells.length:0,g=null,O+='<row x14ac:dyDescent="0.25" r="'+(f+1).toString()+'"',u[f]&&(u[f].height&&(O+=' customHeight="1" ht="'+(72*+u[f].height/96).toString()+'"'),u[f].groupLevel&&(O+=' outlineLevel="'+u[f].groupLevel.toString()+'"'),(g=u[f].style?this._cloneStyle(u[f].style):null)&&((g=this._resolveStyleInheritance(g)).font&&g.font.color&&(g.font.color=this._parseColor(g.font.color)),g.fill&&g.fill.color&&(g.fill.color=this._parseColor(g.fill.color)),null==g.hAlign||e.isString(g.hAlign)||(g.hAlign=t.Workbook._parseHAlignToString(e.asEnum(g.hAlign,t.HAlign))),null==g.vAlign||e.isString(g.vAlign)||(g.vAlign=t.Workbook._parseVAlignToString(e.asEnum(g.vAlign,t.VAlign))),_=JSON.stringify(g),(y=this._styles.indexOf(_))<0&&(y=this._styles.push(_)-1),O+=' customFormat="1" s="'+y.toString()+'"')),u[f]&&!1===u[f].visible&&(O+=' hidden="1"'),u[f]&&!0===u[f].collapsed&&(O+=' collapsed="1"'),O+=">";++p<m;)v=null,S=null,w="",x=-1,T=(b=u[f].cells[p])?b.textRuns:null,v=b&&b.hasOwnProperty("value")?b.value:b,S=b&&b.style?this._cloneStyle(b.style):{},S=this._resolveStyleInheritance(S),(C=a[p])&&(C=this._resolveStyleInheritance(C),S=this._extend(S,C)),g&&(S=this._extend(S,g)),h&&(h=this._resolveStyleInheritance(h),S=this._extend(S,h)),null==S.hAlign||e.isString(S.hAlign)||(S.hAlign=t.Workbook._parseHAlignToString(e.asEnum(S.hAlign,t.HAlign))),null==S.vAlign||e.isString(S.vAlign)||(S.vAlign=t.Workbook._parseVAlignToString(e.asEnum(S.vAlign,t.VAlign))),S.font&&S.font.color&&(S.font.color=this._parseColor(S.font.color)),S.fill&&S.fill.color&&(S.fill.color=this._parseColor(S.fill.color)),this._applyDefaultBorder(S),S.borders&&(S.borders=this._extend({},S.borders),this._parseBorder(S.borders,!!S.fill&&!!S.fill.color)),!e.isNumber(v)||!isNaN(v)&&isFinite(v)||(v=v.toString()),T||v&&e.isString(v)&&("@"===S.format||(+v).toString()!==v||!isFinite(+v))?(this._sharedStrings[1]++,"'"===(v=T?"{RichTextMark}"+JSON.stringify(T):t.Workbook._unescapeXML(v))[0]&&(S.quotePrefix=!0,v=v.substring(1)),(x=this._sharedStrings[0].indexOf(v))<0&&(x=this._sharedStrings[0].push(v)-1),v=x,w="s"):"boolean"==typeof v?(v=v?1:0,w="b"):"date"===this._typeOf(v)||b&&b.isDate?(v=this._convertDate(v),S.format=S.format||"mm-dd-yy"):"object"==typeof v&&(v=null),S=JSON.stringify(S),(y=this._styles.indexOf(S))<0&&(y=this._styles.push(S)-1),b&&(null!=b.colSpan&&b.colSpan>1||null!=b.rowSpan&&b.rowSpan>1)&&(b.colSpan=b.colSpan||1,b.rowSpan=b.rowSpan||1,this._checkValidMergeCell(c,f,b.rowSpan,p,b.colSpan)&&c.push([this._numAlpha(p)+(f+1),this._numAlpha(p+b.colSpan-1)+(f+b.rowSpan)])),b&&b.link&&(null==F&&(F=[]),F.push({ref:t.Workbook.xlsxAddress(f,p),value:v,href:b.link})),S=null,O+=this._generateCell(f,p,y,w,v,b&&b.formula?b.formula:null);O+="</row>"}if(O+="</sheetData>",o&&o.length>0){for(A+="<cols>",f=0;f<o.length;f++)if(y=-1,!this._isEmpty(o[f])){(C=o[f].style)&&((C=this._resolveStyleInheritance(C)).font&&C.font.color&&(C.font.color=this._parseColor(C.font.color)),C.fill&&C.fill.color&&(C.fill.color=this._parseColor(C.fill.color)),null==C.hAlign||e.isString(C.hAlign)||(C.hAlign=t.Workbook._parseHAlignToString(e.asEnum(C.hAlign,t.HAlign))),null==C.vAlign||e.isString(C.vAlign)||(C.vAlign=t.Workbook._parseVAlignToString(e.asEnum(C.vAlign,t.VAlign))),C=JSON.stringify(C),(y=this._styles.indexOf(C))<0&&(y=this._styles.push(C)-1)),k=null!=(k=o[f].width)?"string"==typeof k&&k.indexOf("ch")>-1?this._parseCharCountToCharWidth(k.substring(0,k.indexOf("ch"))):this._parsePixelToCharWidth(k):8.43;var R=(f+1).toString();A+='<col min="'+R+'" max="'+R+'"',y>=0&&(A+=' style="'+y.toString()+'"'),k&&(A+=' width="'+k+'" customWidth="1"'),!1!==o[f].autoWidth&&(A+=' bestFit="1"'),!1===o[f].visible&&(A+=' hidden="1"'),A+="/>"}A+="</cols>"}if(O=A+O,A=O,O=null,c.length>0&&(A+=this._generateMergeSetting(c)),F&&F.length>0){for(A+="<hyperlinks>",f=0;f<F.length;f++)/\'?(\w+)\'?\!\$?[A-Za-z]{1,2}\$?\d+(:\$?[A-Za-z]{1,2}\$?\d+)?/.test(F[f].href)||/^\$?[A-Za-z]{1,2}\$?\d+(:\$?[A-Za-z]{1,2}\$?\d+)?$/.test(F[f].href)?A+='<hyperlink ref="'+F[f].ref+'" display="'+F[f].value+'" location="'+F[f].href+'"/>':(null==n.externalLinks&&(n.externalLinks=[]),n.externalLinks.push(F[f].href),A+='<hyperlink ref="'+F[f].ref+'" r:id="rId'+z+'"/>',z++);A+="</hyperlinks>"}if(A+='<pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>',n.tables&&n.tables.length>0){for(A+='<tableParts count="'+n.tables.length+'">',f=0;f<n.tables.length;f++)A+='<tablePart r:id="rId'+z+'"/>',z++;A+="</tableParts>"}A+="</worksheet>",i.file("sheet"+r+".xml",this._xmlDescription+A),A=null;var D='<Override ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" PartName="/xl/worksheets/sheet'+r+'.xml"/>';this._contentTypes.unshift(D),this._props.unshift(t.Workbook._escapeXML(n.name)||"Sheet"+r);var N='<Relationship Target="worksheets/sheet'+r+'.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Id="rId'+r+'"/>';this._xlRels.unshift(N);var B='<sheet r:id="rId'+r+'" sheetId="'+r+'" name="'+(t.Workbook._escapeXML(n.name)||"Sheet"+r)+'"'+(!1===n.visible?' state="hidden"':"")+"/>";this._worksheets.unshift(B)},s._generateSharedStringsDoc=function(){var e,t='<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="'+this._sharedStrings[1]+'" uniqueCount="'+this._sharedStrings[0].length+'">';for(e=0;e<this._sharedStrings[0].length;e++){t+="<si>";var s=this._sharedStrings[0][e];if(s&&0===s.indexOf("{RichTextMark}"))try{var l=JSON.parse(s.substring(14));if(l&&l.length>0){for(var i=0;i<l.length;i++){t+="<r>";var r=l[i];r.font&&(t+=this._generateFontStyle(r.font,!0).replace(/font/g,"rPr")),t+=this._generatePlainText(r.text),t+="</r>"}t+="</si>"}}catch(e){t+=this._generatePlainText(s)+"</si>"}else t+=this._generatePlainText(s)+"</si>"}return t+"</sst>"},s._generatePlainText=function(s){var l="<t";return(e.isNullOrWhiteSpace(s)||/^\s+\w*|\w*\s+$/.test(s))&&(l+=' xml:space="preserve"'),l+=">"+t.Workbook._escapeXML(s)+"</t>"},s._generateTable=function(e,t){var s=this._tables.length+1,l="table"+s+".xml";e.fileName=l,this._tables.push(l);var i='<table ref="'+e.range+'" displayName="'+e.name+'" name="'+e.name+'" id="'+s+'" '+(!1===e.showHeaderRow?'headerRowCount="0" ':"")+(!0===e.showTotalRow?'totalsRowCount="1" ':'totalsRowShown="0" ')+' xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';!1!==e.showHeaderRow&&(i+=this._generateTableFilterSetting(e.range,e.showTotalRow,e.columns)),i+='<tableColumns count="'+e.columns.length+'">';for(var r="",n=0;n<e.columns.length;n++){var o=e.columns[n];r+='<tableColumn name="'+o.name+'" id="'+(n+1)+'" ',o.totalRowFunction?this._tableColumnFunctions.indexOf(o.totalRowFunction)>-1?r+='totalsRowFunction="'+o.totalRowFunction+'"/>':r+='totalsRowFunction="custom"><totalsRowFormula>'+o.totalRowFunction+"</totalsRowFormula></tableColumn>":r+=(o.totalRowLabel?'totalsRowLabel="'+o.totalRowLabel+'"':"")+"/>"}if(i+=r+"</tableColumns>",i+='<tableStyleInfo name="'+e.style.name+'" showColumnStripes="'+(e.showBandedColumns?"1":"0")+'" showRowStripes="'+(e.showBandedRows?"1":"0")+'" showLastColumn="'+(e.alterLastColumn?"1":"0")+'" showFirstColumn="'+(e.alterFirstColumn?"1":"0")+'"/></table>',!this._isBuiltInStyleName(e.style.name)){var a=JSON.stringify(e.style);-1===this._tableStyles.indexOf(a)&&this._tableStyles.push(a)}t.file(l,this._xmlDescription+i),i=null},s._generateTableFilterSetting=function(e,s,l){var i=e;if(s){var r=i.indexOf(":")+1,n=t.Workbook.tableAddress(i.substring(i.indexOf(":")+1));n.row-=1,i=i.substring(0,r)+t.Workbook.xlsxAddress(n.row,n.col)}for(var o='<autoFilter ref="'+i+'"',a="",h=0;h<l.length;h++)!1===l[h].showFilterButton&&(a+='<filterColumn hiddenButton="1" colId="'+h+'"/>');return o+=""===a?"/>":">"+a+"</autoFilter>"},s._generateHyperlinkRel=function(e){for(var t="",s=0;s<e.length;s++)t+='<Relationship TargetMode="External" Target="'+e[s]+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Id="rId'+(s+1)+'"/>';return t},s._getDxfs=function(){for(var t,s=this,l=0;l<this._tableStyles.length;l++)t=JSON.parse(this._tableStyles[l]),Object.keys(t).forEach(function(l){var i,r,n=t[l];n&&!e.isString(n)&&(s._isEmptyStyleEle(n)||(i=JSON.stringify(n),-1===(r=s._dxfs.indexOf(i))&&(r=s._dxfs.push(i)-1,n.styleIndex=r)))}),this._tableStyles[l]=t},s._generateDxfs=function(){for(var e,t='<dxfs count="'+this._dxfs.length+'">',s=0;s<this._dxfs.length;s++)t+="<dxf>",(e=JSON.parse(this._dxfs[s])).font&&(t+=this._generateFontStyle(e.font)),e.fill&&e.fill.color&&(t+=this._generateFillStyle("solid",e.fill.color,!0)),e.borders&&!this._isEmpty(e.borders)&&(e.borders=this._extend({},e.borders),this._parseBorder(e.borders,!1),t+=this._generateBorderStyle(e.borders,!0)),t+="</dxf>";return t+="</dxfs>"},s._generateTableStyles=function(){for(var t,s,l,i,r,n,o='<tableStyles count="'+this._tableStyles.length+'" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleLight16">',a=0;a<this._tableStyles.length;a++){t=this._tableStyles[a],s=Object.keys(t),r="",n=0;for(var h=0;h<s.length;h++)if(l=s[h],i=t[l],!e.isString(i)){switch(n++,r+="<tableStyleElement",null!=i.styleIndex&&(r+=' dxfId="'+i.styleIndex+'"'),l){case"firstBandedColumnStyle":r+=' type="firstColumnStripe"',null!=i.size&&(r+=' size="'+i.size+'"');break;case"secondBandedColumnStyle":r+=' type="secondColumnStripe"',null!=i.size&&(r+=' size="'+i.size+'"');break;case"firstBandedRowStyle":r+=' type="firstRowStripe"',null!=i.size&&(r+=' size="'+i.size+'"');break;case"secondBandedRowStyle":r+=' type="secondRowStripe"',null!=i.size&&(r+=' size="'+i.size+'"');break;default:r+=' type="'+l.substring(0,l.length-5)+'"'}r+="/>"}n>0&&(o+='<tableStyle count="'+n+'" name="'+t.name+'" pivot="0">',o+=r+"</tableStyle>")}return o+="</tableStyles>"},s._isEmptyStyleEle=function(t){return this._isEmpty(t.borders)&&(this._isEmpty(t.fill)||e.isNullOrWhiteSpace(t.fill.color))&&(this._isEmpty(t.font)||!0!==t.font.bold&&e.isNullOrWhiteSpace(t.font.color)&&e.isNullOrWhiteSpace(t.font.family)&&!0!==t.font.italic&&null==t.font.size&&!0!==t.font.underline)},s._getTableFileName=function(e,t){for(var s="",l=0;l<e.length;l++){var i=e[l];if(i.name===t){s=i.fileName;break}}return s},s._getColor=function(e,t){var s,l,i,r,n;return-1===e.search(/fgcolor/i)&&-1===e.search(/bgcolor/i)&&t||-1===e.search(/color/i)&&!t?null:(-1===(s=e.indexOf("<fgColor"))&&(s=e.indexOf("<bgColor")),-1!==(e=t?e.substring(s,e.indexOf("/>")):e.substring(e.indexOf("<color"))).indexOf("rgb=")?(r=this._getAttr(e,"rgb"))&&8===r.length&&(r=r.substring(2)):-1!==e.indexOf("indexed")?(i=+this._getAttr(e,"indexed"),r=this._indexedColors[i]||""):(l=+this._getAttr(e,"theme"),-1!==e.indexOf("tint")&&(n=+this._getAttr(e,"tint")),r=this._getThemeColor(l,n)),r&&"#"===r[0]?r:"#"+r)},s._getThemeColor=function(t,s){var l,i,r=this._colorThemes[t];return null!=s?(l=new e.Color("#"+r),i=l.getHsl(),i[2]=s<0?i[2]*(1+s):i[2]*(1-s)+(1-1*(1-s)),(l=e.Color.fromHsl(i[0],i[1],i[2])).toString().substring(1)):r},s._parseColor=function(t){var s=new e.Color(t);return s.a<1&&(s=e.Color.toOpaque(s)),s.toString()},s._getsBaseSharedFormulas=function(e){var t,s,l,i=e.match(/\<f[^<]*ref[^<]*>[^<]+(?=\<\/f>)/g);if(this._sharedFormulas=[],i&&i.length>0)for(var r=0;r<i.length;r++)t=i[r],s=this._getAttr(t,"si"),l=(l=this._getAttr(t,"ref"))?l.substring(0,l.indexOf(":")):"",t=t.replace(/(\<f.*>)(.+)/,"$2"),this._sharedFormulas[+s]=this._parseSharedFormulaInfo(l,t)},s._parseSharedFormulaInfo=function(e,s){var l,i,r,n,o,a=s.match(/(\'?\w+\'?\!)?(\$?[A-Za-z]+)(\$?\d+)/g);if(n=t.Workbook.tableAddress(e),a&&a.length>0){o=[];for(var h=0;h<a.length;h++)l=a[h],s=s.replace(l,"{"+h+"}"),(i=l.indexOf("!"))>0&&(r=l.substring(0,i),l=l.substring(i+1)),o[h]={cellAddress:t.Workbook.tableAddress(l),sheetRef:r}}return{cellRef:n,formula:s,formulaRefs:o}},s._getSharedFormula=function(e,s){var l,i,r,n,o,a,h,u,c,f,d,p;if(this._sharedFormulas&&this._sharedFormulas.length>0&&(l=this._sharedFormulas[+e])){if(c=l.formula,(f=l.formulaRefs)&&f.length>0){i=t.Workbook.tableAddress(s),h=l.cellRef?l.cellRef.row:0,u=l.cellRef?l.cellRef.col:0,r=i.row-h,n=i.col-u;for(var m=0;m<f.length;m++)o=(d=f[m]).cellAddress.row+(d.cellAddress.absRow?0:r),a=d.cellAddress.col+(d.cellAddress.absCol?0:n),p=t.Workbook.xlsxAddress(o,a,d.cellAddress.absRow,d.cellAddress.absCol),null!=d.sheetRef&&""!==d.sheetRef&&(p=d.sheetRef+"!"+p),c=c.replace("{"+m+"}",p)}return c}return""},s._convertDate=function(t){var s,l,i=new Date(1900,0,0),r="[object Date]"===Object.prototype.toString.call(t),n=6e4*((r?t.getTimezoneOffset():(new Date).getTimezoneOffset())-i.getTimezoneOffset());return r?(t.getTime()-i.getTime()-n)/864e5+1:e.isNumber(t)?(s=t>59?1:0,l=new Date(1e3*Math.round((+i+864e5*(t-s))/1e3)),0!==(n=6e4*(l.getTimezoneOffset()-i.getTimezoneOffset()))?new Date(1e3*Math.round((+i+n+864e5*(t-s))/1e3)):l):null},s._parseBorder=function(s,l){for(var i in{left:0,right:0,top:0,bottom:0,diagonal:0}){var r=s[i];r&&(e.isString(r.color)&&(r.color=this._parseColor(r.color)),null==r.style||e.isString(r.style)||(r.style=t.Workbook._parseBorderTypeToString(e.asEnum(r.style,t.BorderStyle,!1))),!l&&r.color&&"#c6c6c6"===r.color.toLowerCase()&&"thin"===r.style&&(s[i]=null))}},s._applyDefaultBorder=function(t){if(t.fill&&t.fill.color){null==t.borders&&(t.borders={});for(var s in{left:0,right:0,top:0,bottom:0})null==t.borders[s]&&(t.borders[s]={style:e.xlsx.BorderStyle.Thin,color:"#C6C6C6"})}},s._resolveStyleInheritance=function(e){var t;if(!e.basedOn)return e;for(var s in e.basedOn)if("basedOn"===s){t=this._resolveStyleInheritance(e.basedOn);for(s in t){l=t[s];e[s]=null==e[s]?l:this._extend(e[s],l)}}else{var l=e.basedOn[s];e[s]=null==e[s]?l:this._extend(e[s],l)}return delete e.basedOn,e},s._parsePixelToCharWidth=function(e){return null==e||isNaN(+e)?null:((+e-5)/7*100+.5)/100},s._parseCharWidthToPixel=function(e){return null==e||isNaN(+e)?null:Math.floor((256*+e+128/7)/256*7)+5},s._parseCharCountToCharWidth=function(e){return null==e||isNaN(+e)?null:(7*+e+5)/7*256/256},s._numAlpha=function(e){var t=Math.floor(e/26)-1;return(t>-1?this._numAlpha(t):"")+this._alphabet.charAt(e%26)},s._alphaNum=function(e){var t=0;return 2===e.length&&(t=this._alphaNum(e.charAt(0))+1),26*t+this._alphabet.indexOf(e.substr(-1))},s._typeOf=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()},s._extend=function(t,s){if(e.isObject(t)&&e.isObject(s)){for(var l in s){var i=s[l];e.isObject(i)&&null!=t[l]?this._extend(t[l],i):null!=i&&null==t[l]&&(t[l]=i)}return t}return s},s._isEmpty=function(e){var t=Object.prototype.hasOwnProperty;if(null==e)return!0;if(e.length>0)return!1;if(0===e.length)return!0;for(var s in e)if(t.call(e,s))return!1;return!0},s._cloneStyle=function(e){var t;if(null==e||"object"!=typeof e)return e;t={};for(var s in e)e.hasOwnProperty(s)&&(t[s]=this._cloneStyle(e[s]));return t},s._cloneColumnsStyle=function(e){for(var t,s=[],l=0;l<e.length;l++)(t=e[l])&&t.style&&(s[l]=this._cloneStyle(t.style));return s},s._getSheetIndex=function(e){return e=e.substring(0,e.lastIndexOf(".xml")),+e.substring(e.lastIndexOf("sheet")+5)},s._checkValidMergeCell=function(e,t,s,l,i){for(var r=0;r<e.length;r++){var n=e[r],o=+n[0].match(/\d*/g).join("")-1,a=this._alphaNum(n[0].match(/[a-zA-Z]*/g)[0]),h=+n[1].match(/\d*/g).join("")-1,u=this._alphaNum(n[1].match(/[a-zA-Z]*/g)[0]);if(!(t>h||t+s-1<o||l>u||l+i-1<a))return!1}return!0},s._getAttr=function(e,t){var s=e.indexOf(t+'="');return s>=0?(e=e.substr(s+t.length+2)).substring(0,e.indexOf('"')):""},s._getChildNodeValue=function(e,t){var s=e.indexOf(t+' val="');return s>=0?(e=e.substr(s+t.length+6)).substring(0,e.indexOf('"')):""},s._getSheetIndexBySheetName=function(e,t){for(var s=0;s<e.sheets.length;s++)if(e.sheets[s].name===t)return s;return-1},s._alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s._indexedColors=["000000","FFFFFF","FF0000","00FF00","0000FF","FFFF00","FF00FF","00FFFF","000000","FFFFFF","FF0000","00FF00","0000FF","FFFF00","FF00FF","00FFFF","800000","008000","000080","808000","800080","008080","C0C0C0","808080","9999FF","993366","FFFFCC","CCFFFF","660066","FF8080","0066CC","CCCCFF","000080","FF00FF","FFFF00","00FFFF","800080","800000","008080","0000FF","00CCFF","CCFFFF","CCFFCC","FFFF99","99CCFF","FF99CC","CC99FF","FFCC99","3366FF","33CCCC","99CC00","FFCC00","FF9900","FF6600","666699","969696","003366","339966","003300","333300","993300","993366","333399","333333","000000","FFFFFF"],s._numFmts=["General","0","0.00","#,##0","#,##0.00",,,"$#,##0.00_);($#,##0.00)",,"0%","0.00%","0.00E+00","# ?/?","# ??/??","m/d/yyyy","d-mmm-yy","d-mmm","mmm-yy","h:mm AM/PM","h:mm:ss AM/PM","h:mm","h:mm:ss","m/d/yy h:mm",,,,,,,,,,,,,,,"#,##0 ;(#,##0)","#,##0 ;[Red](#,##0)","#,##0.00;(#,##0.00)","#,##0.00;[Red](#,##0.00)",,,,,"mm:ss","[h]:mm:ss","mmss.0","##0.0E+0","@"],s._tableColumnFunctions="average, count, countNums, max, min, stdDev, sum, var",s._xmlDescription='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>',s._workbookNS="http://schemas.openxmlformats.org/spreadsheetml/2006/main",s._relationshipsNS="http://schemas.openxmlformats.org/package/2006/relationships",s._defaultFontName="Calibri",s._defaultFontSize=11,s._macroEnabled=!1,s._defaultColorThemes=["FFFFFF","000000","EEECE1","1F497D","4F818D","C0504D","9BBB59","8064A2","4BACC6","F79646"],s}();t._xlsx=s;var l=function(){function e(e){this.value=e}return e.prototype.then=function(t,s){return new e(t?t(this.value):null)},e.prototype.catch=function(e){return this.then(null,e)},e.resolve=function(){return new e},e}(),i=function(){function e(e){this._obj=e}return e.prototype.loadAsync=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var s=(i=this._obj).load.apply(i,e);return new l(this._wrapOrNull(s));var i},e.prototype.file=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var s=(l=this._obj).file.apply(l,e);return this._wrapOrNull(s);var l},Object.defineProperty(e.prototype,"name",{get:function(){return this._obj.name},enumerable:!0,configurable:!0}),e.prototype.async=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var s;return s=e&&e.length>0&&"uint8array"===e[0].toLowerCase()?this._obj.asUint8Array():this._obj.asText(),new l(s)},e.prototype.folder=function(e){var t=this._obj.folder(e);return this._wrapOrNull(t)},e.prototype.forEach=function(t){var s=this._obj.root,l=s.length,i=this._obj.files;for(var r in i)r.length>l&&r.substr(0,l).toLowerCase()===s&&t(r.substr(l),new e(i[r]))},e.prototype._wrapOrNull=function(t){return null!=t?new e(t):null},e}()}(e.xlsx||(e.xlsx={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])};return function(t,s){function l(){this.constructor=t}e(t,s),t.prototype=null===s?Object.create(s):(l.prototype=s.prototype,new l)}}(),wijmo;!function(e){!function(t){"use strict";var s=function(){function s(){}return Object.defineProperty(s.prototype,"sheets",{get:function(){return null==this._sheets&&(this._sheets=[]),this._sheets},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"styles",{get:function(){return null==this._styles&&(this._styles=[]),this._styles},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"definedNames",{get:function(){return null==this._definedNames&&(this._definedNames=[]),this._definedNames},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"colorThemes",{get:function(){return null==this._colorThemes&&(this._colorThemes=[]),this._colorThemes},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"reservedContent",{get:function(){return null==this._reservedContent&&(this._reservedContent={}),this._reservedContent},set:function(e){this._reservedContent=e},enumerable:!0,configurable:!0}),s.prototype.save=function(e){var s=t._xlsx.save(this);return e&&this._saveToFile(s.base64,e),s.base64},s.prototype.saveAsync=function(e,s,l){var i=this;t._xlsx.saveAsync(i,l).then(function(t){e&&i._saveToFile(t,e),s&&s(t)})},s.prototype.load=function(e){var s=t._xlsx.load(this._getBase64String(e));this._deserialize(s),s=null},s.prototype.loadAsync=function(e,s,l){var i=this;t._xlsx.loadAsync(i._getBase64String(e)).then(function(e){i._deserialize(e),e=null,s(i)}).catch(l)},s.prototype._serialize=function(){var e={sheets:[]};return e.sheets=this._serializeWorkSheets(),this._styles&&this._styles.length>0&&(e.styles=this._serializeWorkbookStyles()),this._reservedContent&&(e.reservedContent=this._reservedContent),null!=this.activeWorksheet&&!isNaN(this.activeWorksheet)&&this.activeWorksheet>=0&&(e.activeWorksheet=this.activeWorksheet),this.application&&(e.application=this.application),this.company&&(e.company=this.company),null!=this.created&&(e.created=this.created),this.creator&&(e.creator=this.creator),this.lastModifiedBy&&(e.lastModifiedBy=this.lastModifiedBy),null!=this.modified&&(e.modified=this.modified),this._definedNames&&this._definedNames.length>0&&(e.definedNames=this._serializeDefinedNames()),this._colorThemes&&this._colorThemes.length>0&&(e.colorThemes=this._colorThemes.slice()),e},s.prototype._deserialize=function(e){this._deserializeWorkSheets(e.sheets),e.styles&&e.styles.length>0&&this._deserializeWorkbookStyles(e.styles),this.activeWorksheet=e.activeWorksheet,this.application=e.application,this.company=e.company,this.created=e.created,this.creator=e.creator,this.lastModifiedBy=e.lastModifiedBy,this.modified=e.modified,this.reservedContent=e.reservedContent,e.definedNames&&e.definedNames.length>0&&this._deserializeDefinedNames(e.definedNames),e.colorThemes&&e.colorThemes.length>0&&(this._colorThemes=e.colorThemes.slice())},s.prototype._addWorkSheet=function(e,t){null==this._sheets&&(this._sheets=[]),null==t||isNaN(t)?this._sheets.push(e):this._sheets[t]=e},s.prototype._saveToFile=function(e,t){var l,i,r,n,o,a,h=window.document,u=this._reservedContent&&this._reservedContent.macros?"xlsm":"xlsx",c="xlsm"===u?"application/vnd.ms-excel.sheet.macroEnabled.12":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";if((i=t.lastIndexOf("."))<0)t+="."+u;else{if(0===i)throw"Invalid file name.";""===(l=t.substring(i+1))?t+="."+u:l!==u&&(t+="."+u)}r=new Blob([s._base64DecToArr(e)],{type:c}),navigator.msSaveBlob?navigator.msSaveBlob(r,t):URL.createObjectURL?(o=h.createElement("a"),a=function(e){var t=h.createEvent("MouseEvents");t.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(t)},o.download=t,o.href=URL.createObjectURL(r),a(o),o=null):(n=new FileReader,o=h.createElement("a"),a=function(e){var t=h.createEvent("MouseEvents");t.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(t)},n.onload=function(){o.download=t,o.href=n.result,a(o),o=null},n.readAsDataURL(r))},s.prototype._getBase64String=function(e){var t;if(null==e||0===e.length)throw"Invalid xlsx file content.";return-1!==(t=e.search(/base64,/i))&&(e=e.substring(t+7)),e},s.toXlsxDateFormat=function(t){var s;if(1===t.length)switch(t){case"r":case"R":return"ddd, dd MMM yyyy HH:mm:ss &quot;GMT&quot;";case"u":return"yyyy-MM-dd&quot;T&quot;HH:mm:ss&quot;Z&quot;";case"o":case"O":s=(s=e.culture.Globalize.calendar.patterns[t]).replace(/f+k/gi,"000");break;default:s=e.culture.Globalize.calendar.patterns[t]}return s||(s=t),s=s.replace(/"/g,"").replace(/tt/,"AM/PM").replace(/t/,"A/P").replace(/M+/gi,function(e){return e.toLowerCase()}).replace(/g+y+/gi,function(e){return e.substring(0,e.indexOf("y"))+"e"}),/FY|Q/i.test(s)?"General":s},s.toXlsxNumberFormat=function(t){var s,l,i,r,n,o,a=-1,h=t?t.toLowerCase():"",u=[];if(/^[ncpfdg]\d*,*$/.test(h)&&(s=h[0],l=this._formatMap[s]),l){if(i=e.culture.Globalize.numberFormat.currency.symbol,r=h.split(","),"c"===s&&(l=l.replace(/\{1\}/g,i)),h.length>1?a=parseInt(r[0].substr(1)):"d"!==s&&(a=2),!isNaN(a))for(o=0;o<a;o++)u.push(0);for(o=0;o<r.length-1;o++)u.push(",");n=u.length>0?"d"===s?l.replace(/\{0\}/g,u.join("")):l.replace(/\{0\}/g,(!isNaN(a)&&a>0?".":"")+u.join("")):"d"===s?l.replace(/\{0\}/g,"0"):l.replace(/\{0\}/g,"")}else n=h;return n},s.fromXlsxFormat=function(t){var s,l,i,r,n,o,a,h,u,c=[],f=e.culture.Globalize.numberFormat.currency.symbol;if(!t||"General"===t)return[""];for(l=(t=t.replace(/;@/g,"").replace(/&quot;?/g,"")).split(";"),r=0;r<l.length;r++){if(i=l[r],/[hsmy\:]/i.test(i))s=i.replace(/\[\$\-.+\]/g,"").replace(/(\\)(.)/g,"$2").replace(/H+/g,function(e){return e.toLowerCase()}).replace(/m+/g,function(e){return e.toUpperCase()}).replace(/S+/g,function(e){return e.toLowerCase()}).replace(/AM\/PM/gi,"tt").replace(/A\/P/gi,"t").replace(/\.000/g,".fff").replace(/\.00/g,".ff").replace(/\.0/g,".f").replace(/\\[\-\s,]/g,function(e){return e.substring(1)}).replace(/Y+/g,function(e){return e.toLowerCase()}).replace(/D+/g,function(e){return e.toLowerCase()}).replace(/M+:?|:?M+/gi,function(e){return e.indexOf(":")>-1?e.toLowerCase():e}).replace(/g+e/gi,function(e){return e.substring(0,e.length-1)+"yy"});else if(o=i.lastIndexOf("."),a=i.lastIndexOf("0"),h=i.lastIndexOf(","),s=i.search(/\[\$([^\-\]]+)[^\]]*\]/)>-1||i.indexOf(f)>-1&&-1===i.search(/\[\$([\-\]]+)[^\]]*\]/)?"c":"%"===i[t.length-1]?"p":"n",s+=o>-1&&o<a?i.substring(o,a).length:"0",/^0+,*$/.test(i)&&(s="d"+((a=i.lastIndexOf("0"))+1)),h>-1&&a>-1&&a<h)for(u=i.substring(a+1,h+1).split(""),n=0;n<u.length;n++)s+=",";c.push(s)}return c},s._parseCellFormat=function(e,t){return t?this.toXlsxDateFormat(e):this.toXlsxNumberFormat(e)},s._parseExcelFormat=function(t){if(void 0!==t&&null!==t&&void 0!==t.value&&null!==t.value&&!isNaN(t.value)){var s=t.style&&t.style.format?t.style.format:"";return t.isDate||e.isDate(t.value)?this.fromXlsxFormat(s)[0]:!e.isNumber(t.value)||s&&"General"!==s?e.isNumber(t.value)||""===t.value?this.fromXlsxFormat(s)[0]:s:e.isInt(t.value)?"d":"f2"}},s.xlsxAddress=function(e,t,s,l){var i=s?"$":"",r=null==l?i:l?"$":"";return(isNaN(t)?"":r+this._numAlpha(t))+(isNaN(e)?"":i+(e+1).toString())},s.tableAddress=function(e){var t=/^((\$?)([A-Za-z]+))?((\$?)(\d+))?$/,s=e&&t.exec(e),l={};return s?(s[3]&&(l.col=this._alphaNum(s[3]),l.absCol=!!s[2]),s[6]&&(l.row=+s[6]-1,l.absRow=!!s[5]),l):null},s._parseHAlignToString=function(e){switch(e){case S.Left:return"left";case S.Center:return"center";case S.Right:return"right";case S.Justify:return"justify";default:return"general"}},s._parseStringToHAlign=function(e){var t=e?e.toLowerCase():"";return"left"===t?S.Left:"center"===t?S.Center:"right"===t?S.Right:"justify"===t?S.Justify:S.General},s._parseVAlignToString=function(e){switch(e){case w.Bottom:return"bottom";case w.Center:return"center";case w.Top:return"top";default:return null}},s._parseStringToVAlign=function(e){var t=e?e.toLowerCase():"";return"top"===t?w.Top:"center"===t?w.Center:"bottom"===t?w.Bottom:null},s._parseBorderTypeToString=function(e){switch(e){case x.Dashed:return"dashed";case x.Dotted:return"dotted";case x.Double:return"double";case x.Hair:return"hair";case x.Medium:return"medium";case x.MediumDashDotDotted:return"mediumDashDotDot";case x.MediumDashDotted:return"mediumDashDot";case x.MediumDashed:return"mediumDashed";case x.SlantedMediumDashDotted:return"slantDashDot";case x.Thick:return"thick";case x.Thin:return"thin";case x.ThinDashDotDotted:return"dashDotDot";case x.ThinDashDotted:return"dashDot";case x.None:default:return"none"}},s._parseStringToBorderType=function(e){return"dashed"===e?x.Dashed:"dotted"===e?x.Dotted:"double"===e?x.Double:"hair"===e?x.Hair:"medium"===e?x.Medium:"mediumDashDotDot"===e?x.MediumDashDotDotted:"mediumDashDot"===e?x.MediumDashDotted:"mediumDashed"===e?x.MediumDashed:"slantDashDot"===e?x.SlantedMediumDashDotted:"thick"===e?x.Thick:"thin"===e?x.Thin:"dashDotDot"===e?x.ThinDashDotDotted:"dashDot"===e?x.ThinDashDotted:null},s._escapeXML=function(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""},s._unescapeXML=function(e){return"string"==typeof e?e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&#x2F;/g,"/"):""},s._numAlpha=function(e){var t=Math.floor(e/26)-1;return(t>-1?this._numAlpha(t):"")+this._alphabet.charAt(e%26)},s._alphaNum=function(e){var t=0;return e&&(e=e.toUpperCase()),2===e.length&&(t=this._alphaNum(e.charAt(0))+1),26*t+this._alphabet.indexOf(e.substr(-1))},s._b64ToUint6=function(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:43===e?62:47===e?63:0},s._base64DecToArr=function(e,t){for(var s,l,i=e.replace(/[^A-Za-z0-9\+\/]/g,""),r=i.length,n=t?Math.ceil((3*r+1>>2)/t)*t:3*r+1>>2,o=new Uint8Array(n),a=0,h=0,u=0;u<r;u++)if(l=3&u,a|=this._b64ToUint6(i.charCodeAt(u))<<18-6*l,3===l||r-u==1){for(s=0;s<3&&h<n;s++,h++)o[h]=a>>>(16>>>s&24)&255;a=0}return o},s._uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:62===e?43:63===e?47:65},s._base64EncArr=function(e){for(var t=2,s="",l=e.length,i=0,r=0;r<l;r++)t=r%3,r>0&&4*r/3%76==0&&(s+="\r\n"),i|=e[r]<<(16>>>t&24),2!==t&&e.length-r!=1||(s+=String.fromCharCode(this._uint6ToB64(i>>>18&63),this._uint6ToB64(i>>>12&63),this._uint6ToB64(i>>>6&63),this._uint6ToB64(63&i)),i=0);return s.substr(0,s.length-2+t)+(2===t?"":1===t?"=":"==")},s.prototype._serializeWorkSheets=function(){var e,t,s=[];for(t=0;t<this._sheets.length;t++)(e=this._sheets[t])&&(s[t]=e._serialize());return s},s.prototype._serializeWorkbookStyles=function(){var e,t,s=[];for(t=0;t<this._styles.length;t++)(e=this._styles[t])&&(s[t]=e._serialize());return s},s.prototype._serializeDefinedNames=function(){var e,t,s=[];for(t=0;t<this._definedNames.length;t++)(e=this._definedNames[t])&&(s[t]=e._serialize());return s},s.prototype._serializeTableStyles=function(){var e,t,s=[];for(t=0;t<this._tableStyles.length;t++)(e=this._tableStyles[t])&&(s[t]=e._serialize());return s},s.prototype._deserializeWorkSheets=function(t){var s,i,r;for(this._sheets=[],e.assert(null!=t,"workSheets should not be null."),r=0;r<t.length;r++)(i=t[r])&&((s=new l)._deserialize(i),this._sheets[r]=s)},s.prototype._deserializeWorkbookStyles=function(e){var t,s,l;for(this._styles=[],l=0;l<e.length;l++)(s=e[l])&&((t=new a)._deserialize(s),this._styles[l]=t)},s.prototype._deserializeDefinedNames=function(e){var t,s,l;for(this._definedNames=[],l=0;l<e.length;l++)(s=e[l])&&((t=new d)._deserialize(s),this._definedNames[l]=t)},s.prototype._deserializeTableStyles=function(e){var t,s,l;for(this._tableStyles=[],l=0;l<e.length;l++)(s=e[l])&&((t=new g)._deserialize(s),this._tableStyles[l]=t)},s._alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s._formatMap={n:"#,##0{0}",c:"{1}#,##0{0}_);({1}#,##0{0})",p:"#,##0{0}%",f:"0{0}",d:"{0}",g:"0{0}"},s}();t.Workbook=s;var l=function(){function e(){}return Object.defineProperty(e.prototype,"columns",{get:function(){return null==this._columns&&(this._columns=[]),this._columns},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return null==this._rows&&(this._rows=[]),this._rows},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tables",{get:function(){return null==this._tables&&(this._tables=[]),this._tables},enumerable:!0,configurable:!0}),e.prototype._serialize=function(){var e;return this._checkEmptyWorkSheet()?null:(e={},this.style&&(e.style=this.style._serialize()),this._columns&&this._columns.length>0&&(e.columns=this._serializeWorkbookColumns()),this._rows&&this._rows.length>0&&(e.rows=this._serializeWorkbookRows()),this.frozenPane&&(e.frozenPane=this.frozenPane._serialize()),this.name&&(e.name=this.name),null!=this.summaryBelow&&(e.summaryBelow=this.summaryBelow),null!=this.visible&&(e.visible=this.visible),this._tables&&this._tables.length>0&&(e.tables=this._serializeTables()),e)},e.prototype._deserialize=function(e){var t,s;e.style&&((s=new a)._deserialize(e.style),this.style=s),e.columns&&e.columns.length>0&&this._deserializeWorkbookColumns(e.columns),e.rows&&e.rows.length>0&&this._deserializeWorkbookRows(e.rows),e.frozenPane&&((t=new o)._deserialize(e.frozenPane),this.frozenPane=t),this.name=e.name,this.summaryBelow=e.summaryBelow,this.visible=e.visible,e.tables&&e.tables.length>0&&this._deserializeTables(e.tables)},e.prototype._addWorkbookColumn=function(e,t){null==this._columns&&(this._columns=[]),null==t||isNaN(t)?this._columns.push(e):this._columns[t]=e},e.prototype._addWorkbookRow=function(e,t){null==this._rows&&(this._rows=[]),null==t||isNaN(t)?this._rows.push(e):this._rows[t]=e},e.prototype._serializeWorkbookColumns=function(){var e,t,s=[];for(t=0;t<this._columns.length;t++)(e=this._columns[t])&&(s[t]=e._serialize());return s},e.prototype._serializeWorkbookRows=function(){var e,t,s=[];for(t=0;t<this._rows.length;t++)(e=this._rows[t])&&(s[t]=e._serialize());return s},e.prototype._serializeTables=function(){var e,t,s=[];for(t=0;t<this._tables.length;t++)(e=this._tables[t])&&(s[t]=e._serialize());return s},e.prototype._deserializeWorkbookColumns=function(e){var t,s,l;for(this._columns=[],l=0;l<e.length;l++)(t=e[l])&&((s=new i)._deserialize(t),this._columns[l]=s)},e.prototype._deserializeWorkbookRows=function(e){var t,s,l;for(this._rows=[],l=0;l<e.length;l++)(t=e[l])&&((s=new r)._deserialize(t),this._rows[l]=s)},e.prototype._deserializeTables=function(e){var t,s,l;for(this._tables=[],l=0;l<e.length;l++)(s=e[l])&&((t=new p)._deserialize(s),this._tables[l]=t)},e.prototype._checkEmptyWorkSheet=function(){return!(null!=this._rows||null!=this._columns||null!=this.visible||null!=this.summaryBelow||null!=this.frozenPane||null!=this.style||null!=this.name&&""!==this.name||null!=this._tables&&0!=this._tables.length)},e}();t.WorkSheet=l;var i=function(){function e(){}return e.prototype._serialize=function(){var e;return this._checkEmptyWorkbookColumn()?null:(e={},this.style&&(e.style=this.style._serialize()),null!=this.autoWidth&&(e.autoWidth=this.autoWidth),null!=this.width&&(e.width=this.width),null!=this.visible&&(e.visible=this.visible),e)},e.prototype._deserialize=function(e){var t;e.style&&((t=new a)._deserialize(e.style),this.style=t),this.autoWidth=e.autoWidth,this.visible=e.visible,this.width=e.width},e.prototype._checkEmptyWorkbookColumn=function(){return null==this.style&&null==this.width&&null==this.autoWidth&&null==this.visible},e}();t.WorkbookColumn=i;var r=function(){function e(){}return Object.defineProperty(e.prototype,"cells",{get:function(){return null==this._cells&&(this._cells=[]),this._cells},enumerable:!0,configurable:!0}),e.prototype._serialize=function(){var e;return this._checkEmptyWorkbookRow()?null:(e={},this._cells&&this._cells.length>0&&(e.cells=this._serializeWorkbookCells()),this.style&&(e.style=this.style._serialize()),null!=this.collapsed&&(e.collapsed=this.collapsed),null==this.groupLevel||isNaN(this.groupLevel)||(e.groupLevel=this.groupLevel),null==this.height||isNaN(this.height)||(e.height=this.height),null!=this.visible&&(e.visible=this.visible),e)},e.prototype._deserialize=function(e){var t;e.cells&&e.cells.length>0&&this._deserializeWorkbookCells(e.cells),e.style&&((t=new a)._deserialize(e.style),this.style=t),this.collapsed=e.collapsed,this.groupLevel=e.groupLevel,this.height=e.height,this.visible=e.visible},e.prototype._addWorkbookCell=function(e,t){null==this._cells&&(this._cells=[]),null==t||isNaN(t)?this._cells.push(e):this._cells[t]=e},e.prototype._serializeWorkbookCells=function(){var e,t,s=[];for(t=0;t<this._cells.length;t++)(e=this._cells[t])&&(s[t]=e._serialize());return s},e.prototype._deserializeWorkbookCells=function(e){var t,s,l;for(this._cells=[],l=0;l<e.length;l++)(t=e[l])&&((s=new n)._deserialize(t),this._cells[l]=s)},e.prototype._checkEmptyWorkbookRow=function(){return null==this._cells&&null==this.style&&null==this.collapsed&&null==this.visible&&(null==this.height||isNaN(this.height))&&(null==this.groupLevel||isNaN(this.groupLevel))},e}();t.WorkbookRow=r;var n=function(){function e(){}return e.prototype._serialize=function(){var e;return this._checkEmptyWorkbookCell()?null:(e={},this.style&&(e.style=this.style._serialize()),null!=this.value&&(e.value=this.value),this.formula&&(e.formula=this.formula),null!=this.isDate&&(e.isDate=this.isDate),null!=this.colSpan&&!isNaN(this.colSpan)&&this.colSpan>1&&(e.colSpan=this.colSpan),null!=this.rowSpan&&!isNaN(this.rowSpan)&&this.rowSpan>1&&(e.rowSpan=this.rowSpan),this.link&&(e.link=this.link),this.textRuns&&this.textRuns.length>0&&(e.textRuns=this._serializeTextRuns()),e)},e.prototype._deserialize=function(e){var t;e.style&&((t=new a)._deserialize(e.style),this.style=t),this.value=e.value,this.formula=e.formula,this.isDate=e.isDate,this.colSpan=e.colSpan,this.rowSpan=e.rowSpan,this.link=e.link,e.textRuns&&e.textRuns.length>0&&this._deserializeTextRuns(e.textRuns)},e.prototype._serializeTextRuns=function(){var e,t,s=[];for(t=0;t<this.textRuns.length;t++)e=this.textRuns[t],s.push(e._serialize());return s},e.prototype._deserializeTextRuns=function(e){var t,s,l;for(this.textRuns=[],l=0;l<e.length;l++)s=new v,t=e[l],s._deserialize(t),this.textRuns.push(s)},e.prototype._checkEmptyWorkbookCell=function(){return null==this.style&&null==this.value&&null==this.isDate&&(null==this.formula||""===this.formula)&&(null==this.colSpan||isNaN(this.colSpan)||this.colSpan<=1)&&(null==this.rowSpan||isNaN(this.rowSpan)||this.rowSpan<=1)&&(null==this.link||""===this.link)},e}();t.WorkbookCell=n;var o=function(){function e(){}return e.prototype._serialize=function(){return null!=this.columns&&!isNaN(this.columns)&&0!==this.columns||null!=this.rows&&!isNaN(this.rows)&&0!==this.rows?{columns:this.columns,rows:this.rows}:null},e.prototype._deserialize=function(e){this.columns=e.columns,this.rows=e.rows},e}();t.WorkbookFrozenPane=o;var a=function(){function t(){}return t.prototype._serialize=function(){var t;return this._checkEmptyWorkbookStyle()?null:(t={},this.basedOn&&(t.basedOn=this.basedOn._serialize()),this.fill&&(t.fill=this.fill._serialize()),this.font&&(t.font=this.font._serialize()),this.borders&&(t.borders=this.borders._serialize()),this.format&&(t.format=this.format),null!=this.hAlign&&(t.hAlign=e.asEnum(this.hAlign,S,!1)),null!=this.vAlign&&(t.vAlign=e.asEnum(this.vAlign,w,!1)),null==this.indent||isNaN(this.indent)||(t.indent=this.indent),this.wordWrap&&(t.wordWrap=this.wordWrap),t)},t.prototype._deserialize=function(s){var l,i,r,n;s.basedOn&&((l=new t)._deserialize(s.basedOn),this.basedOn=l),s.fill&&((i=new u)._deserialize(s.fill),this.fill=i),s.font&&((r=new h)._deserialize(s.font),this.font=r),s.borders&&((n=new c)._deserialize(s.borders),this.borders=n),this.format=s.format,null!=s.hAlign&&(this.hAlign=e.asEnum(s.hAlign,S,!1)),null!=s.vAlign&&(this.vAlign=e.asEnum(s.vAlign,w,!1)),null==s.indent||isNaN(s.indent)||(this.indent=s.indent),s.wordWrap&&(this.wordWrap=s.wordWrap)},t.prototype._checkEmptyWorkbookStyle=function(){return null==this.basedOn&&null==this.fill&&null==this.font&&null==this.borders&&(null==this.format||""===this.format)&&null==this.hAlign&&null==this.vAlign&&null==this.wordWrap},t}();t.WorkbookStyle=a;var h=function(){function e(){}return e.prototype._serialize=function(){var e;return this._checkEmptyWorkbookFont()?null:(e={},null!=this.bold&&(e.bold=this.bold),null!=this.italic&&(e.italic=this.italic),null!=this.underline&&(e.underline=this.underline),this.color&&(e.color=this.color),this.family&&(e.family=this.family),null==this.size||isNaN(this.size)||(e.size=this.size),e)},e.prototype._deserialize=function(e){this.bold=e.bold,null!=e.color&&(this.color=e.color),this.family=e.family,this.italic=e.italic,this.size=e.size,this.underline=e.underline},e.prototype._checkEmptyWorkbookFont=function(){return null==this.bold&&null==this.italic&&null==this.underline&&(null==this.color||""===this.color)&&(null==this.family||""===this.family)&&(null==this.size||isNaN(this.size))},e}();t.WorkbookFont=h;var u=function(){function e(){}return e.prototype._serialize=function(){return this.color?{color:this.color}:null},e.prototype._deserialize=function(e){null!=e.color&&(this.color=e.color)},e}();t.WorkbookFill=u;var c=function(){function e(){}return e.prototype._serialize=function(){var e;return this._checkEmptyWorkbookBorder()?null:(e={},this.top&&(e.top=this.top._serialize()),this.bottom&&(e.bottom=this.bottom._serialize()),this.left&&(e.left=this.left._serialize()),this.right&&(e.right=this.right._serialize()),this.diagonal&&(e.diagonal=this.diagonal._serialize()),e)},e.prototype._deserialize=function(e){var t,s,l,i,r;e.top&&((t=new f)._deserialize(e.top),this.top=t),e.bottom&&((s=new f)._deserialize(e.bottom),this.bottom=s),e.left&&((l=new f)._deserialize(e.left),this.left=l),e.right&&((i=new f)._deserialize(e.right),this.right=i),e.diagonal&&((r=new f)._deserialize(e.diagonal),this.diagonal=r)},e.prototype._checkEmptyWorkbookBorder=function(){return null==this.top&&null==this.bottom&&null==this.left&&null==this.right&&null==this.diagonal},e}();t.WorkbookBorder=c;var f=function(){function t(){}return t.prototype._serialize=function(){var t;return null!=this.color&&""!==this.color||null!=this.style?(t={},this.color&&(t.color=this.color),null!=this.style&&(t.style=e.asEnum(this.style,x,!1)),t):null},t.prototype._deserialize=function(t){null!=t.color&&(this.color=t.color,null!=t.style&&(this.style=e.asEnum(t.style,x,!1)))},t}();t.WorkbookBorderSetting=f;var d=function(){function e(){}return e.prototype._serialize=function(){var e;return null==this.name?null:(e={name:this.name,value:this.value},null!=this.sheetName&&(e.sheetName=this.sheetName),e)},e.prototype._deserialize=function(e){this.name=e.name,this.value=e.value,this.sheetName=e.sheetName},e}();t.DefinedName=d;var p=function(){function t(){}return Object.defineProperty(t.prototype,"columns",{get:function(){return null==this._columns&&(this._columns=[]),this._columns},enumerable:!0,configurable:!0}),t.prototype._serialize=function(){var e,t;return null==this.name||null==this.range||null==this._columns?null:(null!=this.style&&(t=this.style._serialize()),e={name:this.name,range:this.range,showHeaderRow:this.showHeaderRow,showTotalRow:this.showTotalRow,style:t,showBandedColumns:this.showBandedColumns,showBandedRows:this.showBandedRows,alterFirstColumn:this.alterFirstColumn,alterLastColumn:this.alterLastColumn,columns:[]},e.columns=this._serializeTableColumns(),e)},t.prototype._deserialize=function(e){var t;this.name=e.name,this.range=e.range,this.showHeaderRow=e.showHeaderRow,this.showTotalRow=e.showTotalRow,null!=e.style&&((t=new g)._deserialize(e.style),this.style=t),this.showBandedColumns=e.showBandedColumns,this.showBandedRows=e.showBandedRows,this.alterFirstColumn=e.alterFirstColumn,this.alterLastColumn=e.alterLastColumn,this._deserializeTableColumns(e.columns)},t.prototype._serializeTableColumns=function(){var e,t,s=[];for(t=0;t<this._columns.length;t++)(e=this._columns[t])&&(s[t]=e._serialize());return s},t.prototype._deserializeTableColumns=function(t){var s,l,i;for(e.assert(null!=t,"table Columns should not be null."),this._columns=[],i=0;i<t.length;i++)(l=t[i])&&((s=new m)._deserialize(l),this._columns[i]=s)},t}();t.WorkbookTable=p;var m=function(){function e(){}return e.prototype._serialize=function(){return null==this.name?null:{name:this.name,totalRowLabel:this.totalRowLabel,totalRowFunction:this.totalRowFunction,showFilterButton:this.showFilterButton}},e.prototype._deserialize=function(e){this.name=e.name,this.totalRowLabel=e.totalRowLabel,this.totalRowFunction=e.totalRowFunction,this.showFilterButton=e.showFilterButton},e}();t.WorkbookTableColumn=m;var g=function(){function e(){}return e.prototype._serialize=function(){var e;return this._checkEmptyWorkbookTableStyle()?null:(e={name:this.name},this.wholeTableStyle&&(e.wholeTableStyle=this.wholeTableStyle._serialize()),this.firstBandedColumnStyle&&(e.firstBandedColumnStyle=this.firstBandedColumnStyle._serialize()),this.firstBandedRowStyle&&(e.firstBandedRowStyle=this.firstBandedRowStyle._serialize()),this.secondBandedColumnStyle&&(e.secondBandedColumnStyle=this.secondBandedColumnStyle._serialize()),this.secondBandedRowStyle&&(e.secondBandedRowStyle=this.secondBandedRowStyle._serialize()),this.headerRowStyle&&(e.headerRowStyle=this.headerRowStyle._serialize()),this.totalRowStyle&&(e.totalRowStyle=this.totalRowStyle._serialize()),this.firstColumnStyle&&(e.firstColumnStyle=this.firstColumnStyle._serialize()),this.lastColumnStyle&&(e.lastColumnStyle=this.lastColumnStyle._serialize()),this.firstHeaderCellStyle&&(e.firstHeaderCellStyle=this.firstHeaderCellStyle._serialize()),this.lastHeaderCellStyle&&(e.lastHeaderCellStyle=this.lastHeaderCellStyle._serialize()),this.firstTotalCellStyle&&(e.firstTotalCellStyle=this.firstTotalCellStyle._serialize()),this.lastTotalCellStyle&&(e.lastTotalCellStyle=this.lastTotalCellStyle._serialize()),e)},e.prototype._deserialize=function(e){this.name=e.name,e.wholeTableStyle&&(this.wholeTableStyle=new _,this.wholeTableStyle._deserialize(e.wholeTableStyle)),e.firstBandedColumnStyle&&(this.firstBandedColumnStyle=new y,this.firstBandedColumnStyle._deserialize(e.firstBandedColumnStyle)),e.firstBandedRowStyle&&(this.firstBandedRowStyle=new y,this.firstBandedRowStyle._deserialize(e.firstBandedRowStyle)),e.secondBandedColumnStyle&&(this.secondBandedColumnStyle=new y,this.secondBandedColumnStyle._deserialize(e.secondBandedColumnStyle)),e.secondBandedRowStyle&&(this.secondBandedRowStyle=new y,this.secondBandedRowStyle._deserialize(e.secondBandedRowStyle)),e.headerRowStyle&&(this.headerRowStyle=new _,this.headerRowStyle._deserialize(e.headerRowStyle)),e.totalRowStyle&&(this.totalRowStyle=new _,this.totalRowStyle._deserialize(e.totalRowStyle)),e.firstColumnStyle&&(this.firstColumnStyle=new _,this.firstColumnStyle._deserialize(e.firstColumnStyle)),e.lastColumnStyle&&(this.lastColumnStyle=new _,this.lastColumnStyle._deserialize(e.lastColumnStyle)),e.firstHeaderCellStyle&&(this.firstHeaderCellStyle=new _,this.firstHeaderCellStyle._deserialize(e.firstHeaderCellStyle)),e.lastHeaderCellStyle&&(this.lastHeaderCellStyle=new _,this.lastHeaderCellStyle._deserialize(e.lastHeaderCellStyle)),e.firstTotalCellStyle&&(this.firstTotalCellStyle=new _,this.firstTotalCellStyle._deserialize(e.firstTotalCellStyle)),e.lastTotalCellStyle&&(this.lastTotalCellStyle=new _,this.lastTotalCellStyle._deserialize(e.lastTotalCellStyle))},e.prototype._checkEmptyWorkbookTableStyle=function(){return null==this.name||null==this.wholeTableStyle&&null==this.firstBandedColumnStyle&&null==this.firstBandedRowStyle&&null==this.secondBandedColumnStyle&&null==this.secondBandedRowStyle&&null==this.headerRowStyle&&null==this.totalRowStyle&&null==this.firstColumnStyle&&null==this.lastColumnStyle&&null==this.firstHeaderCellStyle&&null==this.lastHeaderCellStyle&&null==this.firstTotalCellStyle&&null==this.lastTotalCellStyle},e}();t.WorkbookTableStyle=g;var _=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype._deserialize=function(t){var s;e.prototype._deserialize.call(this,t),t.borders&&((s=new b)._deserialize(t.borders),this.borders=s)},t}(a);t.WorkbookTableCommonStyle=_;var y=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype._serialize=function(){var t;return t=e.prototype._serialize.call(this),t.size=this.size,t},t.prototype._deserialize=function(t){e.prototype._deserialize.call(this,t),null!=t.size&&(this.size=t.size)},t}(_);t.WorkbookTableBandedStyle=y;var b=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype._serialize=function(){var t;return null!=(t=e.prototype._serialize.call(this))||this.vertical&&this.horizontal||(t={}),this.vertical&&(t.vertical=this.vertical._serialize()),this.horizontal&&(t.horizontal=this.horizontal._serialize()),t},t.prototype._deserialize=function(t){var s,l;e.prototype._deserialize.call(this,t),t.vertical&&((s=new f)._deserialize(t.vertical),this.vertical=s),t.horizontal&&((l=new f)._deserialize(t.horizontal),this.horizontal=l)},t}(c);t.WorkbookTableBorder=b;var v=function(){function e(){}return e.prototype._serialize=function(){var e={text:this.text};return this.font&&(e.font=this.font._serialize()),e},e.prototype._deserialize=function(e){e.font&&(this.font=new h,this.font._deserialize(e.font)),this.text=e.text},e}();t.WorkbookTextRun=v;var S;!function(e){e[e.General=0]="General",e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right",e[e.Fill=4]="Fill",e[e.Justify=5]="Justify"}(S=t.HAlign||(t.HAlign={}));var w;!function(e){e[e.Top=0]="Top",e[e.Center=1]="Center",e[e.Bottom=2]="Bottom",e[e.Justify=3]="Justify"}(w=t.VAlign||(t.VAlign={}));var x;!function(e){e[e.None=0]="None",e[e.Thin=1]="Thin",e[e.Medium=2]="Medium",e[e.Dashed=3]="Dashed",e[e.Dotted=4]="Dotted",e[e.Thick=5]="Thick",e[e.Double=6]="Double",e[e.Hair=7]="Hair",e[e.MediumDashed=8]="MediumDashed",e[e.ThinDashDotted=9]="ThinDashDotted",e[e.MediumDashDotted=10]="MediumDashDotted",e[e.ThinDashDotDotted=11]="ThinDashDotDotted",e[e.MediumDashDotDotted=12]="MediumDashDotDotted",e[e.SlantedMediumDashDotted=13]="SlantedMediumDashDotted"}(x=t.BorderStyle||(t.BorderStyle={}))}(e.xlsx||(e.xlsx={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,l){e.__proto__=l}||function(e,l){for(var o in l)l.hasOwnProperty(o)&&(e[o]=l[o])};return function(l,o){function t(){this.constructor=l}e(l,o),l.prototype=null===o?Object.create(o):(t.prototype=o.prototype,new t)}}(),wijmo;!function(e){!function(l){!function(o){"use strict";var t=function(){function o(){}return o.save=function(e,l,o){var t=this._saveFlexGridToWorkbook(e,l);return o&&t.save(o),t},o.saveAsync=function(e,l,o,t,r){var n=this._saveFlexGridToWorkbook(e,l);return n.saveAsync(o,t,r),n},o.load=function(l,o,t){var r=this;if(o instanceof Blob){var n=new FileReader;n.onload=function(){var o=e.xlsx.Workbook._base64EncArr(new Uint8Array(n.result)),s=new e.xlsx.Workbook;s.load(o),o=null,l.deferUpdate(function(){r._loadToFlexGrid(l,s,t),s=null})},n.readAsArrayBuffer(o)}else if(o instanceof e.xlsx.Workbook)l.deferUpdate(function(){r._loadToFlexGrid(l,o,t),o=null});else{if(o instanceof ArrayBuffer)o=e.xlsx.Workbook._base64EncArr(new Uint8Array(o));else if(!e.isString(o))throw"Invalid workbook.";var s=new e.xlsx.Workbook;s.load(o),o=null,l.deferUpdate(function(){r._loadToFlexGrid(l,s,t),s=null})}},o.loadAsync=function(l,o,t,r,n){var s=this;if(o instanceof Blob){var a=new FileReader;a.onload=function(){var o=e.xlsx.Workbook._base64EncArr(new Uint8Array(a.result)),i=new e.xlsx.Workbook;i.loadAsync(o,function(e){o=null,i=null,l.deferUpdate(function(){s._loadToFlexGrid(l,e,t),r&&r(e),e=null})},n)},a.readAsArrayBuffer(o)}else if(o instanceof e.xlsx.Workbook)l.deferUpdate(function(){s._loadToFlexGrid(l,o,t),r&&r(o),o=null});else{if(o instanceof ArrayBuffer)o=e.xlsx.Workbook._base64EncArr(new Uint8Array(o));else if(!e.isString(o))throw"Invalid workbook.";(new e.xlsx.Workbook).loadAsync(o,function(e){o=null,l.deferUpdate(function(){s._loadToFlexGrid(l,e,t),r&&r(e),e=null})},n)}},o._saveFlexGridToWorkbook=function(o,t){var r,n,s,a,i,d,u,c,f,h,p,x,m,g=new e.xlsx.Workbook,w=new e.xlsx.WorkSheet,b=(new e.xlsx.WorkbookStyle,new e.xlsx.WorkbookFrozenPane),y=!t||null==t.includeColumnHeaders||t.includeColumnHeaders,_=!(!t||null==t.includeRowHeaders)&&t.includeRowHeaders,k=!t||null==t.includeCellStyles||t.includeCellStyles,C=t?t.activeWorksheet:null,v=t?t.includeColumns:null,S=t?t.formatItem:null,T=0,W=0,R=0,A=0,F=[];if(null==this.hasCssText&&(this.hasCssText="cssText"in document.body.style),h=o.wj_sheetInfo,w.name=t?t.sheetName:"",w.visible=!t||!1!==t.sheetVisible,h&&h.tables&&h.tables.length>0)for(var H=0;H<h.tables.length;H++)w.tables.push(h.tables[H]);if(d=[],h||!k&&!S||((p=document.createElement("div")).style.visibility="hidden",p.setAttribute(l.FlexGrid._WJS_MEASURE,"true"),o.hostElement.appendChild(p)),_){for(c=0,u=0;u<o.rowHeaders.rows.length;u++)if(!(o.rowHeaders.rows[u].renderSize<=0)){for(d[c]=[],f=0;f<o.rowHeaders.columns.length;f++)s=o._getBindingColumn(o.rowHeaders,u,o.rowHeaders.columns[f]),a=this._getColumnSetting(s,o.columnHeaders.columns.defaultSize),d[c][f]=a,0===c&&((i=new e.xlsx.WorkbookColumn)._deserialize(a),w._addWorkbookColumn(i,f));c++}A=f}if(y&&o.columnHeaders.rows.length>0){for(c=0,u=0;u<o.columnHeaders.rows.length;u++)if(!(o.columnHeaders.rows[u].renderSize<=0)){for(d[c]||(d[c]=[]),f=0;f<o.columnHeaders.columns.length;f++)s=o._getBindingColumn(o.columnHeaders,u,o.columnHeaders.columns[f]),a=this._getColumnSetting(s,o.columnHeaders.columns.defaultSize),d[c][A+f]=a,0===c&&(v&&!v(s)||((i=new e.xlsx.WorkbookColumn)._deserialize(a),w._addWorkbookColumn(i)));A=0,r={},n=new e.xlsx.WorkbookRow,_&&(A=this._parseFlexGridRowToSheetRow(o.topLeftCells,r,u,0,d,k,p,F,!1,0,v,S)),this._parseFlexGridRowToSheetRow(o.columnHeaders,r,u,A,d,k,p,F,!1,0,v,S),r.cells.length>0&&(n._deserialize(r),w._addWorkbookRow(n,c)),c++}W=c}else for(d[0]||(d[0]=[]),f=0;f<o.columnHeaders.columns.length;f++)s=o._getBindingColumn(o.columnHeaders,0,o.columnHeaders.columns[f]),a=this._getColumnSetting(s,o.columnHeaders.columns.defaultSize),d[0][A+f]=a,v&&!v(s)||((i=new e.xlsx.WorkbookColumn)._deserialize(a),w._addWorkbookColumn(i));for(u=0;u<o.cells.rows.length;u++)A=0,r={},n=new e.xlsx.WorkbookRow,(x=o.rows[u])instanceof l._NewRowTemplate||((m=x instanceof l.GroupRow)?T=e.tryCast(x,l.GroupRow).level:o.rows.maxGroupLevel>-1&&(T=o.rows.maxGroupLevel+1),_&&(A=this._parseFlexGridRowToSheetRow(o.rowHeaders,r,u,0,d,k,p,F,m,T,v,S)),this._parseFlexGridRowToSheetRow(o.cells,r,u,A,d,k,p,F,m,T,v,S),r.cells.length>0&&(n._deserialize(r),w._addWorkbookRow(n,W+u)));for(R=o.cells.rows.length,u=0;u<o.columnFooters.rows.length;u++)A=0,r={},n=new e.xlsx.WorkbookRow,m=(x=o.columnFooters.rows[u])instanceof l.GroupRow,_&&(A=this._parseFlexGridRowToSheetRow(o.rowHeaders,r,u,0,d,k,p,F,m,0,v,S)),this._parseFlexGridRowToSheetRow(o.columnFooters,r,u,A,d,k,p,F,m,0,v,S),r.cells.length>0&&(n._deserialize(r),w._addWorkbookRow(n,W+R+u));return b.rows=y?o.frozenRows+W:o.frozenRows,b.columns=_?o.frozenColumns+A:o.frozenColumns,w.frozenPane=b,g._addWorkSheet(w),h||!k&&!S||(o.hostElement.removeChild(p),F.forEach(function(e){return e.forEach(function(e){e&&e.parentElement&&e.parentElement.removeChild(e)})})),g.activeWorksheet=C,g},o._loadToFlexGrid=function(o,t,r){var n,s,a,i,d,u,c,f,h,p,x,m,g,w,b,y,_,k,C,v,S,T,W,R,A,F,H,B,N,D,E,z,I,G=!r||null==r.includeColumnHeaders||r.includeColumnHeaders,L=!r||null==r.includeColumnHeaders||r.includeColumnHeaders,O=r&&null!=r.sheetIndex&&!isNaN(r.sheetIndex)?r.sheetIndex:0,M=r?r.sheetName:null,j=!r||r.sheetVisible,P=null!=o.wj_sheetInfo,V=0,U=0,X=!1,q={};if(o.itemsSource=null,o.columns.clear(),o.rows.clear(),o.frozenColumns=0,o.frozenRows=0,H={},B={},U=0,i=[],N=[],O<0||O>=t.sheets.length)throw"The sheet index option is out of the sheet range of current workbook.";if(null!=M)for(n=0;n<t.sheets.length;n++)if(M===t.sheets[n].name){m=t.sheets[n];break}if(null!=(m=m||t.sheets[O]).rows){for(G&&(U=1,m.rows.length<=1&&(L=!1,U=0),f=m.rows[0]),w=this._getColumnCount(m.rows),g=this._getRowCount(m.rows,w),C=m.summaryBelow,a=m.columns,V=0;V<w;V++)o.columns.push(new l.Column),a[V]&&(isNaN(+a[V].width)||(o.columns[V].width=+a[V].width),a[V].visible||null==a[V].visible||(o.columns[V].visible=!!a[V].visible),a[V].style&&a[V].style.wordWrap&&(o.columns[V].wordWrap=a[V].style.wordWrap));for(;U<g;U++){if(b=!1,I=null,x=m.rows[U])for(_=U+1;_<m.rows.length;){if(k=m.rows[_]){(isNaN(x.groupLevel)&&!isNaN(k.groupLevel)||!isNaN(x.groupLevel)&&x.groupLevel<k.groupLevel)&&(b=!0);break}_++}for(b&&!C?(S&&(S.isCollapsed=X),(S=new l.GroupRow).isReadOnly=!1,X=null!=x.collapsed&&x.collapsed,S.level=isNaN(x.groupLevel)?0:x.groupLevel,q[S.level]=X,this._checkParentCollapsed(q,S.level)&&S._setFlag(l.RowColFlags.ParentCollapsed,!0),o.rows.push(S)):(v=new l.Row,x&&this._checkParentCollapsed(q,x.groupLevel)&&v._setFlag(l.RowColFlags.ParentCollapsed,!0),o.rows.push(v)),x&&x.height&&!isNaN(x.height)&&(o.rows[L?U-1:U].height=x.height),V=0;V<w;V++)if(x){if(y=x.cells[V],(R=y?y.formula:null)&&"="!==R[0]&&(R="="+R),y&&y.textRuns&&y.textRuns.length>0?(o.rows[L?U-1:U].isContentHtml=!0,o.setCellData(L?U-1:U,V,this._parseTextRunsToHTML(y.textRuns))):o.setCellData(L?U-1:U,V,R&&P?R:this._getItemValue(y)),b||this._setColumn(i,V,y),A=U*w+V,F=y?y.style:null,D=e.xlsx.Workbook._parseExcelFormat(y),F){if(I=null==I?!!F.wordWrap:I&&!!F.wordWrap,E=this._getItemType(y),F.hAlign)z=e.xlsx.Workbook._parseHAlignToString(e.asEnum(F.hAlign,e.xlsx.HAlign));else switch(E){case e.DataType.Number:z="right";break;case e.DataType.Boolean:z="center";break;default:z=D&&0===D.search(/[n,c,p]/i)?"right":"left"}H[A]={fontWeight:F.font&&F.font.bold?"bold":"none",fontStyle:F.font&&F.font.italic?"italic":"none",textDecoration:F.font&&F.font.underline?"underline":"none",textAlign:z,fontFamily:F.font&&F.font.family?F.font.family:"",fontSize:F.font&&F.font.size?F.font.size+"px":"",color:F.font&&F.font.color?F.font.color:"",backgroundColor:F.fill&&F.fill.color?F.fill.color:"",whiteSpace:F.wordWrap?"pre-wrap":"normal",format:D},F.borders&&(F.borders.left&&(this._parseBorderStyle(F.borders.left.style,"Left",H[A]),H[A].borderLeftColor=F.borders.left.color),F.borders.right&&(this._parseBorderStyle(F.borders.right.style,"Right",H[A]),H[A].borderRightColor=F.borders.right.color),F.borders.top&&(this._parseBorderStyle(F.borders.top.style,"Top",H[A]),H[A].borderTopColor=F.borders.top.color),F.borders.bottom&&(this._parseBorderStyle(F.borders.bottom.style,"Bottom",H[A]),H[A].borderBottomColor=F.borders.bottom.color)),F.font&&-1===N.indexOf(F.font.family)&&N.push(F.font.family)}if(y&&e.isNumber(y.rowSpan)&&y.rowSpan>0&&e.isNumber(y.colSpan)&&y.colSpan>0&&(y.rowSpan>1||y.colSpan>1))for(n=U;n<U+y.rowSpan;n++)for(s=V;s<V+y.colSpan;s++)B[A=n*w+s]=new l.CellRange(U,V,U+y.rowSpan-1,V+y.colSpan-1)}else o.setCellData(L?U-1:U,V,""),this._setColumn(i,V,null);x&&(this._checkParentCollapsed(q,x.groupLevel)||x.visible||null==x.visible||(o.rows[L?U-1:U].visible=x.visible),o.rows[L?U-1:U].wordWrap=!!x.style&&!!x.style.wordWrap||!!I)}for(S&&(S.isCollapsed=X),m.frozenPane&&(T=m.frozenPane.columns,e.isNumber(T)&&!isNaN(T)&&(o.frozenColumns=T),W=m.frozenPane.rows,e.isNumber(W)&&!isNaN(W)&&(o.frozenRows=L&&W>0?W-1:W)),V=0;V<o.columnHeaders.columns.length;V++)d=i[V],(u=o.columns[V]).isRequired=!1,L&&(h=f?f.cells[V]:null)&&h.value?(p=e.xlsx.Workbook._parseExcelFormat(h),c=e.Globalize.format(h.value,p)):c=this._numAlpha(V),u.header=c,d&&(d.dataType===e.DataType.Boolean&&(u.dataType=d.dataType),u.format=d.format,u.align=d.hAlign,u.wordWrap=u.wordWrap||!!d.wordWrap);P&&(o.wj_sheetInfo.name=m.name,o.wj_sheetInfo.visible=!0===j||!1!==m.visible,o.wj_sheetInfo.styledCells=H,o.wj_sheetInfo.mergedRanges=B,o.wj_sheetInfo.fonts=N,o.wj_sheetInfo.tables=m.tables)}},o._parseFlexGridRowToSheetRow=function(o,t,n,s,a,i,d,u,c,f,h,p){var x,m,g,w,b,y,_,k,C,v,S,T,W,R,A,F,H,B,N,D,E,z,I,G,L,O,M,j=!1;for(B=(x=o.grid).wj_sheetInfo,z=null!=(m=o.rows[n]).recordIndex?m.recordIndex:0,t.cells||(t.cells=[]),t.visible=m.isVisible,t.height=m.renderHeight||o.rows.defaultSize,t.groupLevel=f,c&&(t.collapsed=m.isCollapsed),m.wordWrap&&(t.style={wordWrap:m.wordWrap}),(m.constructor===e.grid.Row||m.constructor===e.grid._NewRowTemplate||e.grid.detail&&m.constructor===e.grid.detail.DetailRow||e.grid.multirow&&m.constructor===e.grid.multirow._MultiRow)&&(j=!0),w=0;w<o.columns.length;w++)if(b=null,H=1,F=1,M=0,E=!1,R=null,L=null,G=null,k=null,D=x._getBindingColumn(o,n,o.columns[w]),A=null,B&&o===x.cells?(W=n*o.columns.length+w,B.mergedRanges&&(A=B.mergedRanges[W]),B.styledCells&&(R=B.styledCells[W])):i&&(G=this._getMeasureCell(o,w,d,u),R=(A=x.getMergedRange(o,n,w,!1))?this._getCellStyle(o,G,A.bottomRow,A.rightCol)||{}:this._getCellStyle(o,G,n,w)||{}),A||(A=x.getMergedRange(o,n,w,!1)),A?n===A.topRow&&w===A.leftCol&&(F=A.bottomRow-A.topRow+1,H=this._getColSpan(o,A,h),E=!0):E=!0,!h||h(D)){if(g=a[z][w+s],j||c?(_=E?o.getCellData(n,w,!0):null,C=E?o.getCellData(n,w,!1):null,S=!1,_&&e.isString(_)&&_.length>1&&"="===_[0]&&(S=!0),N=e.isDate(C),R&&R.format?(b=R.format,/[hsmyt\:]/i.test(b)&&(N=!0),y=e.xlsx.Workbook._parseCellFormat(R.format,N)):g&&g.style&&g.style.format?(b=D.format,y=g.style.format):y=null,y||(N?y="m/d/yyyy":e.isNumber(C)&&!D.dataMap?y=e.isInt(C)?"#,##0":"#,##0.00":S?(T=_.toLowerCase()).indexOf("now()")>-1?(y="m/d/yyyy h:mm",N=!0):T.indexOf("today()")>-1||T.indexOf("date(")>-1?(y="m/d/yyyy",N=!0):T.indexOf("time(")>-1&&(y="h:mm AM/PM",N=!0):y="General")):(_=E?x.columnHeaders.getCellData(0,w,!0):null,y="General"),e.isString(_)&&-1!==_.indexOf("<span")&&(k=this._parseToTextRuns(_),_=null),L=this._parseCellStyle(R)||{},o===x.cells&&c&&m.hasChildren&&w===x.columns.firstVisibleIndex){if(_?v=_:E&&(v=m.getGroupHeader().replace(/<\/?\w+>/g,"").replace(/&#39;/g,"'")),null==v&&!R)continue;!(N=e.isDate(v))&&b&&"d"===b.toLowerCase()&&e.isInt(v)&&(y="0"),v=e.isString(v)?e.xlsx.Workbook._unescapeXML(v):v,w===x.columns.firstVisibleIndex&&x.treeIndent&&(M=f),I={value:v,isDate:N,formula:S?this._parseToExcelFormula(_,N):null,colSpan:H,rowSpan:F,style:this._extend(L,{format:y,font:{bold:!0},hAlign:e.xlsx.HAlign.Left,indent:M}),textRuns:k}}else _=e.isString(_)?e.xlsx.Workbook._unescapeXML(_):_,C=e.isString(C)?e.xlsx.Workbook._unescapeXML(C):C,!N&&b&&"d"===b.toLowerCase()&&e.isInt(C)&&(y="0"),O=L&&L.hAlign?L.hAlign:g&&g.style&&null!=g.style.hAlign?e.asEnum(g.style.hAlign,e.xlsx.HAlign,!0):e.isDate(C)?e.xlsx.HAlign.Left:e.xlsx.HAlign.General,w!==x.columns.firstVisibleIndex||!x.treeIndent||O!==e.xlsx.HAlign.Left&&O!==e.xlsx.HAlign.General||(M=f),I={value:S?null:"General"===y?_:C,isDate:N,formula:S?this._parseToExcelFormula(_,N):null,colSpan:w<x.columns.firstVisibleIndex?1:H,rowSpan:F,style:this._extend(L,{format:y,hAlign:O,vAlign:F>1?o===x.cells||!1===x.centerHeadersVertically?e.xlsx.VAlign.Top:e.xlsx.VAlign.Center:null,indent:M}),textRuns:k};p&&p(new r(o,new l.CellRange(n,w),G,d,u,I)),t.cells.push(I)}return s+w},o._parseCellStyle=function(l,o){if(void 0===o&&(o=!1),null==l)return null;var t=l.fontSize;t=t?+t.substring(0,t.indexOf("px")):null,isNaN(t)&&(t=null);var r=l.fontWeight;r="bold"===r||+r>=700;var n="italic"===l.fontStyle,s=l.textDecorationStyle;null==s&&(s=l.textDecoration),s="underline"===s;var a=l.whiteSpace;return a=!!a&&a.indexOf("pre")>-1,{font:{bold:r,italic:n,underline:s,family:this._parseToExcelFontFamily(l.fontFamily),size:t,color:l.color},fill:{color:l.backgroundColor},borders:this._parseBorder(l,o),hAlign:e.xlsx.Workbook._parseStringToHAlign(l.textAlign),wordWrap:a}},o._parseBorder=function(e,l){var o={};return o.left=this._parseEgdeBorder(e,"Left"),o.right=this._parseEgdeBorder(e,"Right"),o.top=this._parseEgdeBorder(e,"Top"),o.bottom=this._parseEgdeBorder(e,"Bottom"),l&&(o.vertical=this._parseEgdeBorder(e,"Vertical"),o.horizontal=this._parseEgdeBorder(e,"Horizontal")),o},o._parseEgdeBorder=function(l,o){var t,r=l["border"+o+"Style"],n=l["border"+o+"Width"];if(n&&n.length>2&&(n=+n.substring(0,n.length-2)),r&&"none"!==r&&"hidden"!==r){switch(t={},r=r.toLowerCase()){case"dotted":t.style=n>1?e.xlsx.BorderStyle.MediumDashDotted:e.xlsx.BorderStyle.Dotted;break;case"dashed":t.style=n>1?e.xlsx.BorderStyle.MediumDashed:e.xlsx.BorderStyle.Dashed;break;case"double":t.style=e.xlsx.BorderStyle.Double;break;default:t.style=n>2?e.xlsx.BorderStyle.Thick:n>1?e.xlsx.BorderStyle.Medium:e.xlsx.BorderStyle.Thin}t.color=l["border"+o+"Color"]}return t},o._parseBorderStyle=function(l,o,t){var r="border"+o+"Style",n="border"+o+"Width";switch(l){case e.xlsx.BorderStyle.Dotted:case e.xlsx.BorderStyle.Hair:t[r]="dotted",t[n]="1px";break;case e.xlsx.BorderStyle.Dashed:case e.xlsx.BorderStyle.ThinDashDotDotted:case e.xlsx.BorderStyle.ThinDashDotted:t[r]="dashed",t[n]="1px";break;case e.xlsx.BorderStyle.MediumDashed:case e.xlsx.BorderStyle.MediumDashDotDotted:case e.xlsx.BorderStyle.MediumDashDotted:case e.xlsx.BorderStyle.SlantedMediumDashDotted:t[r]="dashed",t[n]="2px";break;case e.xlsx.BorderStyle.Double:t[r]="double",t[n]="3px";break;case e.xlsx.BorderStyle.Medium:t[r]="solid",t[n]="2px";break;default:t[r]="solid",t[n]="1px"}},o._parseToExcelFontFamily=function(e){var l;return e&&(l=e.split(","))&&l.length>0&&(e=l[0].replace(/\"|\'/g,"")),e},o._parseToExcelFormula=function(l,o){var t,r,n,s,a,i,d,u=/(floor|ceiling)\([+-]?\d+\.?\d*\)/gi,c=/text\(\"?\w+\"?\s*\,\s*\"\w+\"\)/gi,f=/\"?\w+\"?\s*\,\s*\"(\w+)\"/i;if(t=l.match(u))for(a=0;a<t.length;a++)d=(i=t[a]).substring(0,i.lastIndexOf(")"))+", 1)",l=l.replace(i,d);if(t=null,t=l.match(c))for(a=0;a<t.length;a++)(r=(i=t[a]).match(f))&&2===r.length&&(n=r[1],/^d{1,4}?$/.test(n)||(s=e.xlsx.Workbook._parseCellFormat(n,o),d=i.replace(n,s),l=l.replace(i,d)));return l},o._parseToTextRuns=function(e){var l,o,t,r=e.split("<span "),n=[];for(l=0;l<r.length;l++)t=-1!==(o=r[l]).indexOf("</span>")?{text:o.substring(o.indexOf(">")+1,o.indexOf("</span>")),font:this._parseToTextRunFont(o.substring(o.indexOf('style="')+7,o.indexOf(';"')))}:{text:o},n.push(t);return n},o._parseToTextRunFont=function(e){var l,o,t,r,n,s,a,i,d,u=e.split(";");if(u.length>0){for(l=0;l<u.length;l++)if(2===(o=u[l].split(":")).length)switch(o[1]=o[1].trim(),o[0]){case"font-size":s=+o[1].substring(0,o[1].indexOf("px")),isNaN(s)&&(s=null);break;case"font-weight":t="bold"===o[1]||+o[1]>=700;break;case"font-style":r="italic"===o[1];break;case"text-decoration-style":case"text-decoration":n="underline"===o[1];break;case"font-family":a=this._parseToExcelFontFamily(o[1]);break;case"color":i=o[1]}d={bold:t,italic:r,underline:n,family:a,size:s,color:i}}return d},o._getMeasureCell=function(e,l,o,t){var r=t[e.cellType],n=r&&r[l],s=null==n;if(n){if(this.hasCssText){n.style;n.style.cssText="",n.style.visibility="hidden"}}else r||(t[e.cellType]=r=[]),r[l]=n=o.cloneNode();return!s&&n.parentElement||(e.hostElement.children.length>0?e.hostElement.children[0].appendChild(n):e.hostElement.appendChild(n)),n},o._getColumnSetting=function(l,o){var t=l.renderWidth;return t=t||o,{autoWidth:!0,width:t,visible:l.visible,style:{format:l.format?e.xlsx.Workbook._parseCellFormat(l.format,l.dataType===e.DataType.Date):"",hAlign:e.xlsx.Workbook._parseStringToHAlign(this._toExcelHAlign(l.getAlignment())),wordWrap:l.wordWrap}}},o._toExcelHAlign=function(e){return(e=e?e.trim().toLowerCase():e)?e.indexOf("center")>-1?"center":e.indexOf("right")>-1||e.indexOf("end")>-1?"right":e.indexOf("justify")>-1?"justify":"left":e},o._getColumnCount=function(l){for(var o,t=0,r=0,n=0;n<l.length;n++)(o=l[n]&&l[n].cells?l[n].cells:[])&&o.length>0&&(r=o.length,e.isInt(o[r-1].colSpan)&&o[r-1].colSpan>1&&(r=r+o[r-1].colSpan-1),r>t&&(t=r));return t},o._getRowCount=function(l,o){for(var t,r,n,s=l.length,a=s-1,i=0;i<o;i++)e:for(;a>=0;a--)if(t=l[a],r=t&&t.cells?t.cells:[],(n=r[i])&&(null!=n.value&&""!==n.value||e.isInt(n.rowSpan)&&n.rowSpan>1)){e.isInt(n.rowSpan)&&n.rowSpan>1&&a+n.rowSpan>s&&(s=a+n.rowSpan);break e}return s},o._numAlpha=function(e){var l=Math.floor(e/26)-1;return(l>-1?this._numAlpha(l):"")+String.fromCharCode(65+e%26)},o._getItemType=function(l){return null==l||null==l.value||isNaN(l.value)?null:e.getType(l.value)},o._setColumn=function(l,o,t){var r,n,s,a=l[o];a?(r=this._getItemType(t),a.dataType!==r&&a.dataType===e.DataType.Boolean&&r!==e.DataType.Boolean&&(a.dataType=r),t&&null!=t.value&&""!==t.value&&(n=e.xlsx.Workbook._parseExcelFormat(t))&&a.format!==n&&"General"!==n&&(a.format=n),t&&t.style&&(t.style.hAlign&&(s=e.xlsx.Workbook._parseHAlignToString(e.asEnum(t.style.hAlign,e.xlsx.HAlign))),null==a.wordWrap?a.wordWrap=!!t.style.wordWrap:a.wordWrap=a.wordWrap&&!!t.style.wordWrap),s||r!==e.DataType.Number||(s="right"),a.hAlign=s):l[o]={dataType:this._getItemType(t),format:e.xlsx.Workbook._parseExcelFormat(t),hAlign:"",wordWrap:null}},o._getItemValue=function(l){if(null==l||null==l.value)return null;var o=l.value;return e.isNumber(o)&&isNaN(o)?"":o instanceof Date&&isNaN(o.getTime())?"":o},o._getCellStyle=function(e,l,o,t){try{e.grid.cellFactory.updateCell(e,o,t,l),l.className=l.className.replace("wj-state-selected",""),l.className=l.className.replace("wj-state-multi-selected","")}catch(e){return null}return window.getComputedStyle(l)},o._parseTextRunsToHTML=function(e){var l,o,t,r;for(t="",r=0;r<e.length;r++)t+=(o=(l=e[r]).font)?'<span style="'+(o.bold?"font-weight: bold;":"")+(o.italic?"font-style: italic;":"")+(o.underline?"text-decoration: underline;":"")+(o.family?"font-family: "+o.family+";":"")+(null!=o.size?"font-size: "+o.size+"px;":"")+(o.color?"color: "+o.color+";":"")+'">'+l.text+"</span>":l.text;return t},o._extend=function(l,o){for(var t in o){var r=o[t];e.isObject(r)&&l[t]?e.copy(l[t],r):l[t]=r}return l},o._checkParentCollapsed=function(e,l){var o=!1;return Object.keys(e).forEach(function(t){!0===e[t]&&!1===o&&!isNaN(l)&&+t<l&&(o=!0)}),o},o._getColSpan=function(e,l,o){for(var t=0,r=l.leftCol;r<=l.rightCol;r++)o&&!o(e.columns[r])||t++;return t},o}();o.FlexGridXlsxConverter=t;var r=function(e){function l(l,o,t,r,n,s){var a=e.call(this,l,o)||this;return a._cell=t,a._patternCell=r,a._xlsxCell=s,a._cellsCache=n,a}return __extends(l,e),Object.defineProperty(l.prototype,"cell",{get:function(){return this._cell},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"xlsxCell",{get:function(){return this._xlsxCell},set:function(e){this._xlsxCell=e},enumerable:!0,configurable:!0}),l.prototype.getFormattedCell=function(){return this._cell||(this._cell=t._getMeasureCell(this.panel,this.col,this._patternCell,this._cellsCache),t._getCellStyle(this.panel,this._cell,this.row,this.col)),this._cell},l}(e.grid.CellRangeEventArgs);o.XlsxFormatItemEventArgs=r}(l.xlsx||(l.xlsx={}))}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.XlsxFormatItemEventArgs||(n.XlsxFormatItemEventArgs={}))})(t=n.xlsx||(n.xlsx={}))})(t=n.grid||(n.grid={}))})(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var wijmo;!function(t){t.pdf||(t.pdf={}),function(t){if("object"==typeof localExports&&"undefined"!=typeof localModule)localModule.localExports=t();else if("function"==typeof localDefine&&localDefine.amd)localDefine([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).PDFDocument=t()}}(function(){return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof localRequire&&localRequire;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find localModule '"+a+"'");throw c.code="localModule_NOT_FOUND",c}var l=n[a]={localExports:{}};e[a][0].call(l.localExports,function(t){var n=e[a][1][t];return i(n||t)},l,l.localExports,t,e,n,r)}return n[a].localExports}for(var o="function"==typeof localRequire&&localRequire,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e,n){var r;r=function(){function t(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(t){return this.data[this.pos++]=t},t.prototype.byteAt=function(t){return this.data[t]},t.prototype.readBool=function(){return!!this.readByte()},t.prototype.writeBool=function(t){return this.writeByte(t?1:0)},t.prototype.readUInt32=function(){var t,e,n,r;return t=16777216*this.readByte(),e=this.readByte()<<16,n=this.readByte()<<8,r=this.readByte(),t+e+n+r},t.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},t.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},t.prototype.readUInt16=function(){var t,e;return t=this.readByte()<<8,e=this.readByte(),t|e},t.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},t.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var e,n,r;for(n=[],e=r=0;0<=t?r<t:r>t;e=0<=t?++r:--r)n[e]=String.fromCharCode(this.readByte());return n.join("")},t.prototype.writeString=function(t){var e,n,r,i;for(i=[],e=n=0,r=t.length;0<=r?n<r:n>r;e=0<=r?++n:--n)i.push(this.writeByte(t.charCodeAt(e)));return i},t.prototype.stringAt=function(t,e){return this.pos=t,this.readString(e)},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,e,n,r,i,o,a,s;return t=this.readByte(),e=this.readByte(),n=this.readByte(),r=this.readByte(),i=this.readByte(),o=this.readByte(),a=this.readByte(),s=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^n)+4294967296*(255^r)+16777216*(255^i)+65536*(255^o)+256*(255^a)+(255^s)+1):72057594037927940*t+281474976710656*e+1099511627776*n+4294967296*r+16777216*i+65536*o+256*a+s},t.prototype.writeLongLong=function(t){var e,n;return e=Math.floor(t/4294967296),n=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.slice=function(t,e){return this.data.slice(t,e)},t.prototype.read=function(t){var e,n;for(e=[],n=0;0<=t?n<t:n>t;0<=t?++n:--n)e.push(this.readByte());return e},t.prototype.write=function(t){var e,n,r,i;for(i=[],n=0,r=t.length;n<r;n++)e=t[n],i.push(this.writeByte(e));return i},t}(),e.localExports=r},{}],2:[function(t,e,n){(function(n){var r,i,o,a,s,u,c={}.hasOwnProperty,l=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};u=t("stream"),s=t("fs"),i=t("./object"),a=t("./reference"),o=t("./page"),r=function(e){function r(t){var e,n,i,o;if(this.options=null!=t?t:{},r.__super__.constructor.apply(this,arguments),this.version=1.3,this.compress=null==(i=this.options.compress)||i,this._pageBuffer=[],this._pageBufferStart=0,this._offsets=[],this._waiting=0,this._ended=!1,this._offset=0,this._root=this.ref({Type:"Catalog",Pages:this.ref({Type:"Pages",Count:0,Kids:[]})}),this.page=null,this.initColor(),this.initVector(),this.initFonts(),this.initText(),this.initImages(),this.info={Producer:"PDFKit",Creator:"PDFKit",CreationDate:new Date},this.options.info){o=this.options.info;for(e in o)n=o[e],this.info[e]=n}this._write("%PDF-"+this.version),this._write("%ÿÿÿÿ"),this.options.pageAdding&&this.on("pageAdding",this.options.pageAdding),this.options.pageAdded&&this.on("pageAdded",this.options.pageAdded),!1!==this.options.autoFirstPage&&this.addPage()}var u;return l(r,e),(u=function(t){var e,n,i;i=[];for(n in t)e=t[n],i.push(r.prototype[n]=e);return i})(t("./mixins/color")),u(t("./mixins/vector")),u(t("./mixins/fonts")),u(t("./mixins/text")),u(t("./mixins/images")),u(t("./mixins/annotations")),r.prototype.addPage=function(t){var e;return null==t&&(t=this.options),this.emit("pageAdding",this,t),this.options.bufferPages||this.flushPages(),this.page=new o(this,t),this._pageBuffer.push(this.page),(e=this._root.data.Pages.data).Kids.push(this.page.dictionary),e.Count++,this.x=this.page.margins.left,this.y=this.page.margins.top,this._ctm=[1,0,0,1,0,0],this.transform(1,0,0,-1,0,this.page.height),this.emit("pageAdded",this),this},r.prototype.bufferedPageRange=function(){return{start:this._pageBufferStart,count:this._pageBuffer.length}},r.prototype.switchToPage=function(t){var e;if(!(e=this._pageBuffer[t-this._pageBufferStart]))throw new Error("switchToPage("+t+") out of bounds, current buffer covers pages "+this._pageBufferStart+" to "+(this._pageBufferStart+this._pageBuffer.length-1));return this.page=e},r.prototype.flushPages=function(){var t,e,n;for(t=this._pageBuffer,this._pageBuffer=[],this._pageBufferStart+=t.length,e=0,n=t.length;e<n;e++)t[e].end()},r.prototype.ref=function(t){var e;return e=new a(this,this._offsets.length+1,t),this._offsets.push(null),this._waiting++,e},r.prototype._read=function(){},r.prototype._write=function(t){return n.isBuffer(t)||(t=new n(t+"\n","binary")),this.push(t),this._offset+=t.length},r.prototype.addContent=function(t){return this.page.write(t),this},r.prototype._refEnd=function(t){if(this._offsets[t.id-1]=t.offset,0==--this._waiting&&this._ended)return this._finalize(),this._ended=!1},r.prototype.write=function(t,e){var n;return n=new Error("PDFDocument#write is deprecated, and will be removed in a future version of PDFKit. Please pipe the document into a Node stream."),console.warn(n.stack),this.pipe(s.createWriteStream(t)),this.end(),this.once("end",e)},r.prototype.output=function(t){throw new Error("PDFDocument#output is deprecated, and has been removed from PDFKit. Please pipe the document into a Node stream.")},r.prototype.end=function(){var t,e,n,r,i;this.emit("ending"),this.flushPages(),this._info=this.ref(),r=this.info;for(t in r)"string"==typeof(n=r[t])&&(n=new String(n)),this._info.data[t]=n;this._info.end(),i=this._fontFamilies;for(e in i)i[e].finalize();return this._root.end(),this._root.data.Pages.end(),0===this._waiting?this._finalize():this._ended=!0},r.prototype._finalize=function(t){var e,n,r,o,a;for(n=this._offset,this._write("xref"),this._write("0 "+(this._offsets.length+1)),this._write("0000000000 65535 f "),r=0,o=(a=this._offsets).length;r<o;r++)e=("0000000000"+(e=a[r])).slice(-10),this._write(e+" 00000 n ");return this._write("trailer"),this._write(i.convert({Size:this._offsets.length+1,Root:this._root,Info:this._info})),this._write("startxref"),this._write(""+n),this._write("%%EOF"),this.push(null)},r.prototype.toString=function(){return"[object PDFDocument]"},r}(u.Readable),e.localExports=r}).call(this,t("buffer").Buffer)},{"./mixins/annotations":12,"./mixins/color":13,"./mixins/fonts":14,"./mixins/images":15,"./mixins/text":16,"./mixins/vector":17,"./object":18,"./page":19,"./reference":21,buffer:60,fs:59,stream:216}],3:[function(t,e,n){(function(n){var r,i,o,a;a=t("fontkit"),i=function(){function t(){throw new Error("Cannot construct a PDFFont directly.")}return t.open=function(t,e,i,s){var u;if("string"==typeof e){if(o.isStandardFont(e))return new o(t,e,s)}else n.isBuffer(e)?u=a.create(e,i):e instanceof Uint8Array?u=a.create(new n(e),i):e instanceof ArrayBuffer&&(u=a.create(new n(new Uint8Array(e)),i));if(null==u)throw new Error("Not a supported font format or standard PDF font.");return new r(t,u,s)},t.prototype.encode=function(t){throw new Error("Must be implemented by subclasses")},t.prototype.widthOfString=function(t){throw new Error("Must be implemented by subclasses")},t.prototype.ref=function(){return null!=this.dictionary?this.dictionary:this.dictionary=this.document.ref()},t.prototype.finalize=function(){if(!this.embedded&&null!=this.dictionary)return this.embed(),this.embedded=!0},t.prototype.embed=function(){throw new Error("Must be implemented by subclasses")},t.prototype.lineHeight=function(t,e){var n;return null==e&&(e=!1),n=e?this.lineGap:0,(this.ascender+n-this.descender)/1e3*t},t.prototype.getAscender=function(t){return this.ascender/1e3*t},t.prototype.getBBox=function(t){return{llx:this.bbox[0]/1e3*t,lly:this.bbox[1]/1e3*t,urx:this.bbox[2]/1e3*t,ury:this.bbox[3]/1e3*t}},t}(),e.localExports=i,o=t("./font/standard"),r=t("./font/embedded")}).call(this,t("buffer").Buffer)},{"./font/embedded":5,"./font/standard":6,buffer:60,fontkit:165}],4:[function(t,e,n){var r;t("base64-js");r=function(){function t(t){this.bbox=this._parseFontBBox(t[1]),this.ascender=t[4],this.descender=t[5],this.glyphWidths=this._parseGlyphWidths(t[6]),this.charWidths=this._getCharWidths(),this.kernPairs=this._parseKerningPairs(t[7]),this.lineGap=this.bbox[3]-this.bbox[1]-(this.ascender-this.descender)}var e={402:131,8211:150,8212:151,8216:145,8217:146,8218:130,8220:147,8221:148,8222:132,8224:134,8225:135,8226:149,8230:133,8364:128,8240:137,8249:139,8250:155,710:136,8482:153,338:140,339:156,732:152,352:138,353:154,376:159,381:142,382:158},n="space:exclam:quotedbl:numbersign:dollar:percent:ampersand:quoteright:parenleft:parenright:asterisk:plus:comma:hyphen:period:slash:zero:one:two:three:four:five:six:seven:eight:nine:colon:semicolon:less:equal:greater:question:at:A:B:C:D:E:F:G:H:I:J:K:L:M:N:O:P:Q:R:S:T:U:V:W:X:Y:Z:bracketleft:backslash:bracketright:asciicircum:underscore:quoteleft:a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:w:x:y:z:braceleft:bar:braceright:asciitilde:exclamdown:cent:sterling:fraction:yen:florin:section:currency:quotesingle:quotedblleft:guillemotleft:guilsinglleft:guilsinglright:fi:fl:endash:dagger:daggerdbl:periodcentered:paragraph:bullet:quotesinglbase:quotedblbase:quotedblright:guillemotright:ellipsis:perthousand:questiondown:grave:acute:circumflex:tilde:macron:breve:dotaccent:dieresis:ring:cedilla:hungarumlaut:ogonek:caron:emdash:AE:ordfeminine:Lslash:Oslash:OE:ordmasculine:ae:dotlessi:lslash:oslash:oe:germandbls:Idieresis:eacute:abreve:uhungarumlaut:ecaron:Ydieresis:divide:Yacute:Acircumflex:aacute:Ucircumflex:yacute:scommaaccent:ecircumflex:Uring:Udieresis:aogonek:Uacute:uogonek:Edieresis:Dcroat:commaaccent:copyright:Emacron:ccaron:aring:Ncommaaccent:lacute:agrave:Tcommaaccent:Cacute:atilde:Edotaccent:scaron:scedilla:iacute:lozenge:Rcaron:Gcommaaccent:ucircumflex:acircumflex:Amacron:rcaron:ccedilla:Zdotaccent:Thorn:Omacron:Racute:Sacute:dcaron:Umacron:uring:threesuperior:Ograve:Agrave:Abreve:multiply:uacute:Tcaron:partialdiff:ydieresis:Nacute:icircumflex:Ecircumflex:adieresis:edieresis:cacute:nacute:umacron:Ncaron:Iacute:plusminus:brokenbar:registered:Gbreve:Idotaccent:summation:Egrave:racute:omacron:Zacute:Zcaron:greaterequal:Eth:Ccedilla:lcommaaccent:tcaron:eogonek:Uogonek:Aacute:Adieresis:egrave:zacute:iogonek:Oacute:oacute:amacron:sacute:idieresis:Ocircumflex:Ugrave:Delta:thorn:twosuperior:Odieresis:mu:igrave:ohungarumlaut:Eogonek:dcroat:threequarters:Scedilla:lcaron:Kcommaaccent:Lacute:trademark:edotaccent:Igrave:Imacron:Lcaron:onehalf:lessequal:ocircumflex:ntilde:Uhungarumlaut:Eacute:emacron:gbreve:onequarter:Scaron:Scommaaccent:Ohungarumlaut:degree:ograve:Ccaron:ugrave:radical:Dcaron:rcommaaccent:Ntilde:otilde:Rcommaaccent:Lcommaaccent:Atilde:Aogonek:Aring:Otilde:zdotaccent:Ecaron:Iogonek:kcommaaccent:minus:Icircumflex:ncaron:tcommaaccent:logicalnot:odieresis:udieresis:notequal:gcommaaccent:eth:zcaron:ncommaaccent:onesuperior:imacron:Euro:universal:existential:suchthat:asteriskmath:congruent:Alpha:Beta:Chi:Epsilon:Phi:Gamma:Eta:Iota:theta1:Kappa:Lambda:Mu:Nu:Omicron:Pi:Theta:Rho:Sigma:Tau:Upsilon:sigma1:Omega:Xi:Psi:Zeta:therefore:perpendicular:radicalex:alpha:beta:chi:delta:epsilon:phi:gamma:eta:iota:phi1:kappa:lambda:nu:omicron:pi:theta:rho:sigma:tau:upsilon:omega1:omega:xi:psi:zeta:similar:Upsilon1:minute:infinity:club:diamond:heart:spade:arrowboth:arrowleft:arrowup:arrowright:arrowdown:second:proportional:equivalence:approxequal:arrowvertex:arrowhorizex:carriagereturn:aleph:Ifraktur:Rfraktur:weierstrass:circlemultiply:circleplus:emptyset:intersection:union:propersuperset:reflexsuperset:notsubset:propersubset:reflexsubset:element:notelement:angle:gradient:registerserif:copyrightserif:trademarkserif:product:dotmath:logicaland:logicalor:arrowdblboth:arrowdblleft:arrowdblup:arrowdblright:arrowdbldown:angleleft:registersans:copyrightsans:trademarksans:parenlefttp:parenleftex:parenleftbt:bracketlefttp:bracketleftex:bracketleftbt:bracelefttp:braceleftmid:braceleftbt:braceex:angleright:integral:integraltp:integralex:integralbt:parenrighttp:parenrightex:parenrightbt:bracketrighttp:bracketrightex:bracketrightbt:bracerighttp:bracerightmid:bracerightbt:apple:a1:a2:a202:a3:a4:a5:a119:a118:a117:a11:a12:a13:a14:a15:a16:a105:a17:a18:a19:a20:a21:a22:a23:a24:a25:a26:a27:a28:a6:a7:a8:a9:a10:a29:a30:a31:a32:a33:a34:a35:a36:a37:a38:a39:a40:a41:a42:a43:a44:a45:a46:a47:a48:a49:a50:a51:a52:a53:a54:a55:a56:a57:a58:a59:a60:a61:a62:a63:a64:a65:a66:a67:a68:a69:a70:a71:a72:a73:a74:a203:a75:a204:a76:a77:a78:a79:a81:a82:a83:a84:a97:a98:a99:a100:a89:a90:a93:a94:a91:a92:a205:a85:a206:a86:a87:a88:a95:a96:a101:a102:a103:a104:a106:a107:a108:a112:a111:a110:a109:a120:a121:a122:a123:a124:a125:a126:a127:a128:a129:a130:a131:a132:a133:a134:a135:a136:a137:a138:a139:a140:a141:a142:a143:a144:a145:a146:a147:a148:a149:a150:a151:a152:a153:a154:a155:a156:a157:a158:a159:a160:a161:a163:a164:a196:a165:a192:a166:a167:a168:a169:a170:a171:a172:a173:a162:a174:a175:a176:a177:a178:a179:a193:a180:a199:a181:a200:a182:a201:a183:a184:a197:a185:a194:a198:a186:a195:a187:a188:a189:a190:a191".split(":"),r=".notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef space exclam quotedbl numbersign dollar percent ampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash zero one two three four five six seven eight nine colon semicolon less equal greater question at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum underscore grave a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright asciitilde .notdef Euro .notdef quotesinglbase florin quotedblbase ellipsis dagger daggerdbl circumflex perthousand Scaron guilsinglleft OE .notdef Zcaron .notdef .notdef quoteleft quoteright quotedblleft quotedblright bullet endash emdash tilde trademark scaron guilsinglright oe .notdef zcaron ydieresis space exclamdown cent sterling currency yen brokenbar section dieresis copyright ordfeminine guillemotleft logicalnot hyphen registered macron degree plusminus twosuperior threesuperior acute mu paragraph periodcentered cedilla onesuperior ordmasculine guillemotright onequarter onehalf threequarters questiondown Agrave Aacute Acircumflex Atilde Adieresis Aring AE Ccedilla Egrave Eacute Ecircumflex Edieresis Igrave Iacute Icircumflex Idieresis Eth Ntilde Ograve Oacute Ocircumflex Otilde Odieresis multiply Oslash Ugrave Uacute Ucircumflex Udieresis Yacute Thorn germandbls agrave aacute acircumflex atilde adieresis aring ae ccedilla egrave eacute ecircumflex edieresis igrave iacute icircumflex idieresis eth ntilde ograve oacute ocircumflex otilde odieresis divide oslash ugrave uacute ucircumflex udieresis yacute thorn ydieresis".split(" ");return t.prototype.encodeText=function(t){for(var n=[],r=0;r<t.length;r++){var i=t.charCodeAt(r);i=e[i]||i,n.push(i.toString(16))}return n},t.prototype.glyphsForString=function(t){for(var e=[],n=0;n<t.length;n++){var r=t.charCodeAt(n);e.push(this.characterToGlyph(r))}return e},t.prototype.characterToGlyph=function(t){return r[e[t]||t]||".notdef"},t.prototype.widthOfGlyph=function(t){return this.glyphWidths[t]||0},t.prototype.getKernPair=function(t,e){return this.kernPairs[t+"\0"+e]||0},t.prototype.advancesForGlyphs=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n],i=t[n+1];e.push(this.widthOfGlyph(r)+this.getKernPair(r,i))}return e},t.prototype._parseFontBBox=function(t){for(var e=t.split(":"),n=[],r=0;r<e.length;r++)n.push(parseInt(e[r]));return n},t.prototype._getCharWidths=function(){for(var t=[],e=0;e<=255;e++)t.push(this.glyphWidths[r[e]]);return t},t.prototype._parseGlyphWidths=function(t){var e,r=t.split(","),i={};if(1===r.length){var o=r[0].match(/(^\d+)-(\d+):(\d+)$/),a=parseInt(o[1]),s=parseInt(o[2]);e=parseInt(o[3]);for(c=a;c<=s;c++)i[n[c]]=e}else for(var u=0,c=0;c<r.length;c++){var l=r[c].split(":");1==l.length?e=parseInt(l[0]):(u=parseInt(l[0]),e=parseInt(l[1])),i[n[u++]]=e}return i},t.prototype._parseKerningPairs=function(t){return{}},t}(),e.localExports=r},{"base64-js":45}],5:[function(t,e,n){var r,i,o={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s=[].slice;i=t("../font"),t("../object"),r=function(t){function e(t,e,n){this.document=t,this.font=e,this.id=n,this.subset=this.font.createSubset(),this.unicode=[[0]],this.widths=[this.font.getGlyph(0).advanceWidth],this.name=this.font.postscriptName,this.scale=1e3/this.font.unitsPerEm,this.ascender=this.font.ascent*this.scale,this.descender=this.font.descent*this.scale,this.lineGap=this.font.lineGap*this.scale,this.bbox=this.font.bbox,this.layoutCache=Object.create(null)}var n;return a(e,i),e.prototype.layoutRun=function(t,e){var n,r,i,o,a,s,u;for(n=a=0,s=(u=(o=this.font.layout(t,e)).positions).length;a<s;n=++a){i=u[n];for(r in i)i[r]*=this.scale;i.advanceWidth=o.glyphs[n].advanceWidth*this.scale}return o},e.prototype.layoutCached=function(t){var e,n;return(e=this.layoutCache[t])?e:(n=this.layoutRun(t),this.layoutCache[t]=n,n)},e.prototype.layout=function(t,e,n){var r,i,o,a,s,u,c;if(null==n&&(n=!1),e)return this.layoutRun(t,e);for(i=n?null:[],s=n?null:[],r=0,a=0,o=0;o<=t.length;)o===t.length&&a<o||" "===(c=t.charAt(o))||"\t"===c?(u=this.layoutCached(t.slice(a,++o)),n||(i.push.apply(i,u.glyphs),s.push.apply(s,u.positions)),r+=u.advanceWidth,a=o):o++;return{glyphs:i,positions:s,advanceWidth:r}},e.prototype.encode=function(t,e){var n,r,i,o,a,s,u,c,l,h,f;for(i=(f=this.layout(t,e)).glyphs,a=f.positions,s=[],o=l=0,h=i.length;l<h;o=++l)r=i[o],n=this.subset.includeGlyph(r.id),s.push(("0000"+n.toString(16)).slice(-4)),null==(u=this.widths)[n]&&(u[n]=r.advanceWidth*this.scale),null==(c=this.unicode)[n]&&(c[n]=r.codePoints);return[s,a]},e.prototype.widthOfString=function(t,e,n){var r,i;return i=this.layout(t,n,!0).advanceWidth,r=e/1e3,i*r},e.prototype.embed=function(){var t,e,n,r,i,o,a,s,u,c;return o=this.document.ref(),this.subset.encodeStream().pipe(o),r=((null!=(c=this.font["OS/2"])?c.sFamilyClass:void 0)||0)>>8,i=0,this.font.post.isFixedPitch&&(i|=1),1<=r&&r<=7&&(i|=2),i|=4,10===r&&(i|=8),this.font.head.macStyle.italic&&(i|=64),u=function(){var t,e;for(e=[],a=t=0;t<6;a=++t)e.push(String.fromCharCode(26*Math.random()+65));return e}().join(""),s=u+"+"+this.font.postscriptName,t=this.font.bbox,n=this.document.ref({Type:"FontDescriptor",FontName:s,Flags:i,FontBBox:[t.minX*this.scale,t.minY*this.scale,t.maxX*this.scale,t.maxY*this.scale],ItalicAngle:this.font.italicAngle,Ascent:this.ascender,Descent:this.descender,CapHeight:(this.font.capHeight||this.font.ascent)*this.scale,XHeight:(this.font.xHeight||0)*this.scale,StemV:0}),n.data.FontFile2=o,n.end(),(e=this.document.ref({Type:"Font",Subtype:"CIDFontType2",BaseFont:s,CIDSystemInfo:{Registry:new String("Adobe"),Ordering:new String("Identity"),Supplement:0},FontDescriptor:n,W:[0,this.widths]})).end(),this.dictionary.data={Type:"Font",Subtype:"Type0",BaseFont:s,Encoding:"Identity-H",DescendantFonts:[e],ToUnicode:this.toUnicodeCmap()},this.dictionary.end()},n=function(){var t,e;return e=1<=arguments.length?s.call(arguments,0):[],function(){var n,r,i;for(i=[],n=0,r=e.length;n<r;n++)t=e[n],i.push(("0000"+t.toString(16)).slice(-4));return i}().join("")},e.prototype.toUnicodeCmap=function(){var t,e,r,i,o,a,s,u,c,l;for(t=this.document.ref(),i=[],a=0,u=(l=this.unicode).length;a<u;a++){for(r=[],s=0,c=(e=l[a]).length;s<c;s++)(o=e[s])>65535&&(o-=65536,r.push(n(o>>>10&1023|55296)),o=56320|1023&o),r.push(n(o));i.push("<"+r.join(" ")+">")}return t.end("/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n  /Registry (Adobe)\n  /Ordering (UCS)\n  /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange\n1 beginbfrange\n<0000> <"+n(i.length-1)+"> ["+i.join(" ")+"]\nendbfrange\nendcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"),t},e}(),e.localExports=r},{"../font":3,"../object":18}],6:[function(t,e,n){var r,i,o,a={}.hasOwnProperty,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=t("./afm"),i=t("../font"),t("fs"),o=function(t){function e(t,e,i){var o;this.document=t,this.name=e,this.id=i,this.font=new r(n[this.name]()),o=this.font,this.ascender=o.ascender,this.descender=o.descender,this.bbox=o.bbox,this.lineGap=o.lineGap}var n;return s(e,i),e.prototype.embed=function(){return this.dictionary.data={Type:"Font",BaseFont:this.name,Subtype:"Type1",Encoding:"WinAnsiEncoding"},this.dictionary.end()},e.prototype.encode=function(t){var e,n,r,i,o,a,s,u;for(n=this.font.encodeText(t),i=this.font.glyphsForString(""+t),e=this.font.advancesForGlyphs(i),a=[],o=s=0,u=i.length;s<u;o=++s)r=i[o],a.push({xAdvance:e[o],yAdvance:0,xOffset:0,yOffset:0,advanceWidth:this.font.widthOfGlyph(r)});return[n,a]},e.prototype.widthOfString=function(t,e){var n,r,i,o,a,s;for(r=this.font.glyphsForString(""+t),o=0,a=0,s=(n=this.font.advancesForGlyphs(r)).length;a<s;a++)o+=n[a];return i=e/1e3,o*i},e.isStandardFont=function(t){return t in n},n={Courier:function(){return[0,"-23:-250:715:805",562,426,629,-157,"0-314:600"]},"Courier-Bold":function(){return[0,"-113:-250:749:801",562,439,629,-157,"0-314:600"]},"Courier-Oblique":function(){return[-12,"-27:-250:849:805",562,426,629,-157,"0-314:600"]},"Courier-BoldOblique":function(){return[-12,"-57:-250:869:801",562,439,629,-157,"0-314:600"]},Helvetica:function(){return[0,"-166:-225:1000:931",718,523,718,-207,"278,278,355,556,556,889,667,222,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,222,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,167,556,556,556,556,191,333,556,333,333,500,500,556,556,556,278,537,350,222,333,333,556,1000,1000,611,333,333,333,333,333,333,333,333,333,333,333,333,333,1000,1000,370,556,778,1000,365,889,278,222,611,944,611,278,556,556,556,556,667,584,667,667,556,722,500,500,556,722,722,556,722,556,667,722,250,737,667,500,556,722,222,556,611,722,556,667,500,500,278,471,722,778,556,556,667,333,500,611,667,778,722,667,643,722,556,333,778,667,667,584,556,611,476,500,722,278,667,556,556,500,556,556,722,278,584,260,737,778,278,600,667,333,556,611,611,549,722,722,222,317,556,722,667,667,556,500,222,778,556,556,500,278,778,722,612,556,333,778,556,278,556,667,556,834,667,299,667,556,1000,556,278,278,556,834,549,556,556,722,667,556,556,834,667,667,778,400,556,722,556,453,722,333,722,556,722,556,667,667,667,778,500,667,278,500,584,278,556,278,584,556,556,549,556,556,500,556,333,278,556"]},"Helvetica-Bold":function(){return[0,"-170:-228:1003:962",718,532,718,-207,"278,333,474,556,556,889,722,278,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,278,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,167,556,556,556,556,238,500,556,333,333,611,611,556,556,556,278,556,350,278,500,500,556,1000,1000,611,333,333,333,333,333,333,333,333,333,333,333,333,333,1000,1000,370,611,778,1000,365,889,278,278,611,944,611,278,556,556,611,556,667,584,667,722,556,722,556,556,556,722,722,556,722,611,667,722,250,737,667,556,556,722,278,556,611,722,556,667,556,556,278,494,722,778,611,556,722,389,556,611,667,778,722,667,743,722,611,333,778,722,722,584,611,611,494,556,722,278,667,556,556,556,611,611,722,278,584,280,737,778,278,600,667,389,611,611,611,549,722,722,278,389,556,722,722,722,556,500,278,778,611,556,556,278,778,722,612,611,333,778,611,278,611,667,611,834,667,400,722,611,1000,556,278,278,611,834,549,611,611,722,667,556,611,834,667,667,778,400,611,722,611,549,722,389,722,611,722,611,722,722,722,778,500,667,278,556,584,278,611,333,584,611,611,549,611,611,500,611,333,278,556"]},"Helvetica-Oblique":function(){return[-12,"-170:-225:1116:931",718,523,718,-207,"278,278,355,556,556,889,667,222,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,222,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,167,556,556,556,556,191,333,556,333,333,500,500,556,556,556,278,537,350,222,333,333,556,1000,1000,611,333,333,333,333,333,333,333,333,333,333,333,333,333,1000,1000,370,556,778,1000,365,889,278,222,611,944,611,278,556,556,556,556,667,584,667,667,556,722,500,500,556,722,722,556,722,556,667,722,250,737,667,500,556,722,222,556,611,722,556,667,500,500,278,471,722,778,556,556,667,333,500,611,667,778,722,667,643,722,556,333,778,667,667,584,556,611,476,500,722,278,667,556,556,500,556,556,722,278,584,260,737,778,278,600,667,333,556,611,611,549,722,722,222,317,556,722,667,667,556,500,222,778,556,556,500,278,778,722,612,556,333,778,556,278,556,667,556,834,667,299,667,556,1000,556,278,278,556,834,549,556,556,722,667,556,556,834,667,667,778,400,556,722,556,453,722,333,722,556,722,556,667,667,667,778,500,667,278,500,584,278,556,278,584,556,556,549,556,556,500,556,333,278,556"]},"Helvetica-BoldOblique":function(){return[-12,"-174:-228:1114:962",718,532,718,-207,"278,333,474,556,556,889,722,278,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,278,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,167,556,556,556,556,238,500,556,333,333,611,611,556,556,556,278,556,350,278,500,500,556,1000,1000,611,333,333,333,333,333,333,333,333,333,333,333,333,333,1000,1000,370,611,778,1000,365,889,278,278,611,944,611,278,556,556,611,556,667,584,667,722,556,722,556,556,556,722,722,556,722,611,667,722,250,737,667,556,556,722,278,556,611,722,556,667,556,556,278,494,722,778,611,556,722,389,556,611,667,778,722,667,743,722,611,333,778,722,722,584,611,611,494,556,722,278,667,556,556,556,611,611,722,278,584,280,737,778,278,600,667,389,611,611,611,549,722,722,278,389,556,722,722,722,556,500,278,778,611,556,556,278,778,722,612,611,333,778,611,278,611,667,611,834,667,400,722,611,1000,556,278,278,611,834,549,611,611,722,667,556,611,834,667,667,778,400,611,722,611,549,722,389,722,611,722,611,722,722,722,778,500,667,278,556,584,278,611,333,584,611,611,549,611,611,500,611,333,278,556"]},"Times-Roman":function(){return[0,"-168:-218:1000:898",662,450,683,-217,"250,333,408,500,500,833,778,333,333,333,500,564,250,333,250,278,500,500,500,500,500,500,500,500,500,500,278,278,564,564,564,444,921,722,667,667,722,611,556,722,722,333,389,722,611,889,722,722,556,722,667,556,611,722,722,944,722,722,611,333,278,333,469,500,333,444,500,444,500,444,333,500,500,278,278,500,278,778,500,500,500,500,333,389,278,500,500,722,500,500,444,480,200,480,541,333,500,500,167,500,500,500,500,180,444,500,333,333,556,556,500,500,500,250,453,350,333,444,444,500,1000,1000,444,333,333,333,333,333,333,333,333,333,333,333,333,333,1000,889,276,611,722,889,310,667,278,278,500,722,500,333,444,444,500,444,722,564,722,722,444,722,500,389,444,722,722,444,722,500,611,722,250,760,611,444,444,722,278,444,611,667,444,611,389,389,278,471,667,722,500,444,722,333,444,611,556,722,667,556,588,722,500,300,722,722,722,564,500,611,476,500,722,278,611,444,444,444,500,500,722,333,564,200,760,722,333,600,611,333,500,611,611,549,722,667,278,326,444,722,722,722,444,444,278,722,500,444,389,278,722,722,612,500,300,722,500,278,500,611,500,750,556,344,722,611,980,444,333,333,611,750,549,500,500,722,611,444,500,750,556,556,722,400,500,667,500,453,722,333,722,500,667,611,722,722,722,722,444,611,333,500,564,333,500,278,564,500,500,549,500,500,444,500,300,278,500"]},"Times-Bold":function(){return[0,"-168:-218:1000:935",676,461,683,-217,"250,333,555,500,500,1000,833,333,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,930,722,667,722,722,667,611,778,778,389,500,778,667,944,722,778,611,778,722,556,667,722,722,1000,722,722,667,333,278,333,581,500,333,500,556,444,556,444,333,500,556,278,333,556,278,833,556,500,556,556,444,389,333,556,500,722,500,500,444,394,220,394,520,333,500,500,167,500,500,500,500,278,500,500,333,333,556,556,500,500,500,250,540,350,333,500,500,500,1000,1000,500,333,333,333,333,333,333,333,333,333,333,333,333,333,1000,1000,300,667,778,1000,330,722,278,278,500,722,556,389,444,500,556,444,722,570,722,722,500,722,500,389,444,722,722,500,722,556,667,722,250,747,667,444,500,722,278,500,667,722,500,667,389,389,278,494,722,778,556,500,722,444,444,667,611,778,722,556,672,722,556,300,778,722,722,570,556,667,494,500,722,278,667,500,444,444,556,556,722,389,570,220,747,778,389,600,667,444,500,667,667,549,722,722,278,416,444,722,722,722,444,444,278,778,500,500,389,278,778,722,612,556,300,778,556,278,500,667,556,750,556,394,778,667,1000,444,389,389,667,750,549,500,556,722,667,444,500,750,556,556,778,400,500,722,556,549,722,444,722,500,722,667,722,722,722,778,444,667,389,556,570,389,556,333,570,500,556,549,500,500,444,556,300,278,500"]},"Times-Italic":function(){return[-15.5,"-169:-217:1010:883",653,441,683,-217,"250,333,420,500,500,833,778,333,333,333,500,675,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,675,675,675,500,920,611,611,667,722,611,611,722,722,333,444,667,556,833,667,722,611,722,611,500,556,722,611,833,611,556,556,389,278,389,422,500,333,500,500,444,500,444,278,500,500,278,278,444,278,722,500,500,500,500,389,389,278,500,444,667,444,444,389,400,275,400,541,389,500,500,167,500,500,500,500,214,556,500,333,333,500,500,500,500,500,250,523,350,333,556,556,500,889,1000,500,333,333,333,333,333,333,333,333,333,333,333,333,333,889,889,276,556,722,944,310,667,278,278,500,667,500,333,444,500,500,444,556,675,556,611,500,722,444,389,444,722,722,500,722,500,611,722,250,760,611,444,500,667,278,500,556,667,500,611,389,389,278,471,611,722,500,500,611,389,444,556,611,722,611,500,544,722,500,300,722,611,611,675,500,556,476,444,667,278,611,500,444,444,500,500,667,333,675,275,760,722,333,600,611,389,500,556,556,549,722,667,278,300,444,722,611,611,444,389,278,722,500,500,389,278,722,722,612,500,300,722,500,278,500,611,500,750,500,300,667,556,980,444,333,333,611,750,549,500,500,722,611,444,500,750,500,500,722,400,500,667,500,453,722,389,667,500,611,556,611,611,611,722,389,611,333,444,675,333,500,278,675,500,500,549,500,500,389,500,300,278,500"]},"Times-BoldItalic":function(){return[-15,"-200:-218:996:921",669,462,683,-217,"250,389,555,500,500,833,778,333,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,832,667,667,667,722,667,667,722,778,389,500,667,611,889,722,722,611,722,667,556,611,722,667,889,667,611,611,333,278,333,570,500,333,500,500,444,500,444,333,500,556,278,278,500,278,778,556,500,500,500,389,389,278,556,444,667,500,444,389,348,220,348,570,389,500,500,167,500,500,500,500,278,500,500,333,333,556,556,500,500,500,250,500,350,333,500,500,500,1000,1000,500,333,333,333,333,333,333,333,333,333,333,333,333,333,1000,944,266,611,722,944,300,722,278,278,500,722,500,389,444,500,556,444,611,570,611,667,500,722,444,389,444,722,722,500,722,556,667,722,250,747,667,444,500,722,278,500,611,667,500,667,389,389,278,494,667,722,556,500,667,389,444,611,611,722,667,556,608,722,556,300,722,667,667,570,556,611,494,444,722,278,667,500,444,444,556,556,722,389,570,220,747,722,389,600,667,389,500,611,611,549,722,667,278,366,444,722,667,667,444,389,278,722,500,500,389,278,722,722,612,500,300,722,576,278,500,667,500,750,556,382,667,611,1000,444,389,389,611,750,549,500,556,722,667,444,500,750,556,556,722,400,500,667,556,549,722,389,722,500,667,611,667,667,667,722,389,667,389,500,606,389,556,278,606,500,556,549,500,500,389,556,300,278,500"]},Symbol:function(){return[0,"-180:-293:1090:1010",0,0,0,0,"250,333,315:713,3:500,316:549,5:833,778,317:439,8:333,333,318:500,11:549,250,300:549,14:250,278,500,500,500,500,500,500,500,500,500,500,278,278,549,549,549,444,319:549,722,667,722,250:612,323:611,763,603,722,333,631,722,686,889,722,722,768,741,556,592,611,690,439,768,645,795,611,59:333,345:863,61:333,346:658,63:500,347:500,631,549,549,494,439,521,411,603,329,603,549,549,254:576,360:521,549,549,521,549,603,439,576,713,686,493,686,494,91:480,200,480,373:549,314:750,374:620,247,270:549,98:167,376:713,100:500,377:753,753,753,753,1042,987,603,987,603,281:400,220:549,386:411,231:549,205:549,387:713,208:494,115:460,155:549,307:549,388:549,549,120:1000,390:603,1000,658,823,686,795,987,768,768,823,768,768,713,713,713,713,713,713,713,768,713,790,790,890,823,285:549,415:250,304:713,416:603,603,1042,987,603,987,603,185:494,423:329,790,790,786,225:713,427:384,384,384,384,384,384,494,494,494,494,329,274,686,686,686,384,384,384,384,384,384,494,494,494,790"]},ZapfDingbats:function(){return[0,"-1:-143:981:820",0,0,0,0,"278,452:974,961,974,980,719,789,790,791,690,960,939,549,855,911,933,911,945,974,755,846,762,761,571,677,763,760,759,754,494,552,537,577,692,786,788,788,790,793,794,816,823,789,841,823,833,816,831,923,744,723,749,790,792,695,776,768,792,759,707,708,682,701,826,815,789,789,707,687,696,689,786,787,713,791,785,791,873,761,762,762,759,759,892,892,788,784,438,138,277,415,392,392,668,668,390,390,317,317,276,276,509,509,410,410,234,234,334,334,732,544,544,910,667,760,760,776,595,694,626,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,894,838,1016,458,748,924,748,918,927,928,928,834,873,828,924,924,917,930,931,463,883,836,836,867,867,696,696,874,874,760,946,771,865,771,888,967,888,831,873,927,970,918"]}},e}(),e.localExports=o},{"../font":3,"./afm":4,fs:59}],7:[function(t,e,n){var r,i,o,a={}.hasOwnProperty,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=function(){function t(t){this.doc=t,this.stops=[],this.embedded=!1,this.transform=[1,0,0,1,0,0],this._colorSpace="DeviceRGB"}return t.prototype.stop=function(t,e,n){return null==n&&(n=1),n=Math.max(0,Math.min(1,n)),this.stops.push([t,this.doc._normalizeColor(e),n]),this},t.prototype.embed=function(){var t,e,n,r,i,o,a,s,u,c,l,h,f,d,p,g,_,y,m,v,b,w,x,S,k,C,E,A,P,j,O,I,T,L,B,N;if(!this.embedded&&0!==this.stops.length){for(this.embedded=!0,(l=this.stops[this.stops.length-1])[0]<1&&this.stops.push([1,l[1],l[2]]),t=[],r=[],P=[],c=O=0,L=this.stops.length-1;0<=L?O<L:O>L;c=0<=L?++O:--O)r.push(0,1),c+2!==this.stops.length&&t.push(this.stops[c+1][0]),i=this.doc.ref({FunctionType:2,Domain:[0,1],C0:this.stops[c+0][1],C1:this.stops[c+1][1],N:1}),P.push(i),i.end();if(1===P.length?i=P[0]:(i=this.doc.ref({FunctionType:3,Domain:[0,1],Functions:P,Bounds:t,Encode:r})).end(),this.id="Sh"+ ++this.doc._gradCount,h=this.doc._ctm.slice(),f=h[0],d=h[1],_=h[2],v=h[3],b=h[4],w=h[5],B=this.transform,p=B[0],g=B[1],y=B[2],m=B[3],e=B[4],n=B[5],h[0]=f*p+_*g,h[1]=d*p+v*g,h[2]=f*y+_*m,h[3]=d*y+v*m,h[4]=f*e+_*n+b,h[5]=d*e+v*n+w,(E=this.shader(i)).end(),S=this.doc.ref({Type:"Pattern",PatternType:2,Shading:E,Matrix:function(){var t,e,n;for(n=[],t=0,e=h.length;t<e;t++)j=h[t],n.push(+j.toFixed(5));return n}()}),this.doc.page.patterns[this.id]=S,S.end(),this.stops.some(function(t){return t[2]<1})){for((a=this.opacityGradient())._colorSpace="DeviceGray",I=0,T=(N=this.stops).length;I<T;I++)A=N[I],a.stop(A[0],[A[2]]);a=a.embed(),(s=this.doc.ref({Type:"Group",S:"Transparency",CS:"DeviceGray"})).end(),(k=this.doc.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"],Shading:{Sh1:a.data.Shading}})).end(),(o=this.doc.ref({Type:"XObject",Subtype:"Form",FormType:1,BBox:[0,0,this.doc.page.width,this.doc.page.height],Group:s,Resources:k})).end("/Sh1 sh"),(C=this.doc.ref({Type:"Mask",S:"Luminosity",G:o})).end(),u=this.doc.ref({Type:"ExtGState",SMask:C}),this.opacity_id=++this.doc._opacityCount,x="Gs"+this.opacity_id,this.doc.page.ext_gstates[x]=u,u.end()}return S}},t.prototype.apply=function(t){if(this.embedded||this.embed(),this.doc.addContent("/"+this.id+" "+t),this.opacity_id)return this.doc.addContent("/Gs"+this.opacity_id+" gs"),this.doc._sMasked=!0},t}(),i=function(t){function e(t,n,r,i,o){this.doc=t,this.x1=n,this.y1=r,this.x2=i,this.y2=o,e.__super__.constructor.apply(this,arguments)}return s(e,r),e.prototype.shader=function(t){return this.doc.ref({ShadingType:2,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.x2,this.y2],Function:t,Extend:[!0,!0]})},e.prototype.opacityGradient=function(){return new e(this.doc,this.x1,this.y1,this.x2,this.y2)},e}(),o=function(t){function e(t,n,r,i,o,a,s){this.doc=t,this.x1=n,this.y1=r,this.r1=i,this.x2=o,this.y2=a,this.r2=s,e.__super__.constructor.apply(this,arguments)}return s(e,r),e.prototype.shader=function(t){return this.doc.ref({ShadingType:3,ColorSpace:this._colorSpace,Coords:[this.x1,this.y1,this.r1,this.x2,this.y2,this.r2],Function:t,Extend:[!0,!0]})},e.prototype.opacityGradient=function(){return new e(this.doc,this.x1,this.y1,this.r1,this.x2,this.y2,this.r2)},e}(),e.localExports={PDFGradient:r,PDFLinearGradient:i,PDFRadialGradient:o}},{}],8:[function(t,e,n){(function(n){var r,i,o,a;a=t("fs"),t("./data"),r=t("./image/jpeg"),o=t("./image/png"),i=function(){function t(){}return t.open=function(t,e){var i,s;if(n.isBuffer(t))i=t;else if(t instanceof ArrayBuffer)i=new n(new Uint8Array(t));else if(s=/^data:.+;base64,(.*)$/.exec(t))i=new n(s[1],"base64");else if(!(i=a.readFileSync(t)))return;if(255===i[0]&&216===i[1])return new r(i,e);if(137===i[0]&&"PNG"===i.toString("ascii",1,4))return new o(i,e);throw new Error("Unknown image format.")},t}(),e.localExports=i}).call(this,t("buffer").Buffer)},{"./data":1,"./image/jpeg":9,"./image/png":10,buffer:60,fs:59}],9:[function(t,e,n){var r,i=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1};t("fs"),r=function(){function t(t,n){var r,o,a;if(this.data=t,this.label=n,65496!==this.data.readUInt16BE(0))throw"SOI not found in JPEG";for(a=2;a<this.data.length&&(o=this.data.readUInt16BE(a),a+=2,!(i.call(e,o)>=0));)a+=this.data.readUInt16BE(a);if(i.call(e,o)<0)throw"Invalid JPEG.";a+=2,this.bits=this.data[a++],this.height=this.data.readUInt16BE(a),a+=2,this.width=this.data.readUInt16BE(a),a+=2,r=this.data[a++],this.colorSpace=function(){switch(r){case 1:return"DeviceGray";case 3:return"DeviceRGB";case 4:return"DeviceCMYK"}}(),this.obj=null}var e;return e=[65472,65473,65474,65475,65477,65478,65479,65480,65481,65482,65483,65484,65485,65486,65487],t.prototype.embed=function(t){if(!this.obj)return this.obj=t.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.bits,Width:this.width,Height:this.height,ColorSpace:this.colorSpace,Filter:"DCTDecode"}),"DeviceCMYK"===this.colorSpace&&(this.obj.data.Decode=[1,0,1,0,1,0,1,0]),this.obj.end(this.data),this.data=null},t}(),e.localExports=r},{fs:59}],10:[function(t,e,n){(function(n){var r,i,o;o=t("zlib"),r=t("png-js"),i=function(){function t(t,e){this.label=e,this.image=new r(t),this.width=this.image.width,this.height=this.image.height,this.imgData=this.image.imgData,this.obj=null}return t.prototype.embed=function(t){var e,r,i,o,a,s,u,c;if(this.document=t,!this.obj){if(this.obj=this.document.ref({Type:"XObject",Subtype:"Image",BitsPerComponent:this.image.bits,Width:this.width,Height:this.height,Filter:"FlateDecode"}),this.image.hasAlphaChannel||(i=this.document.ref({Predictor:15,Colors:this.image.colors,BitsPerComponent:this.image.bits,Columns:this.width}),this.obj.data.DecodeParms=i,i.end()),0===this.image.palette.length?this.obj.data.ColorSpace=this.image.colorSpace:((r=this.document.ref()).end(new n(this.image.palette)),this.obj.data.ColorSpace=["Indexed","DeviceRGB",this.image.palette.length/3-1,r]),this.image.transparency.grayscale)return a=this.image.transparency.greyscale,this.obj.data.Mask=[a,a];if(this.image.transparency.rgb){for(e=[],u=0,c=(o=this.image.transparency.rgb).length;u<c;u++)s=o[u],e.push(s,s);return this.obj.data.Mask=e}return this.image.transparency.indexed?this.loadIndexedAlphaChannel():this.image.hasAlphaChannel?this.splitAlphaChannel():this.finalize()}},t.prototype.finalize=function(){var t;return this.alphaChannel&&((t=this.document.ref({Type:"XObject",Subtype:"Image",Height:this.height,Width:this.width,BitsPerComponent:8,Filter:"FlateDecode",ColorSpace:"DeviceGray",Decode:[0,1]})).end(this.alphaChannel),this.obj.data.SMask=t),this.obj.end(this.imgData),this.image=null,this.imgData=null},t.prototype.splitAlphaChannel=function(){return this.image.decodePixels(function(t){return function(e){var r,i,a,s,u,c,l,h,f;for(a=t.image.colors*t.image.bits/8,f=t.width*t.height,c=new n(f*a),i=new n(f),u=h=r=0,l=e.length;u<l;)c[h++]=e[u++],c[h++]=e[u++],c[h++]=e[u++],i[r++]=e[u++];return s=0,o.deflate(c,function(e,n){if(t.imgData=n,e)throw e;if(2==++s)return t.finalize()}),o.deflate(i,function(e,n){if(t.alphaChannel=n,e)throw e;if(2==++s)return t.finalize()})}}(this))},t.prototype.loadIndexedAlphaChannel=function(t){var e;return e=this.image.transparency.indexed,this.image.decodePixels(function(t){return function(r){var i,a,s,u,c;for(i=new n(t.width*t.height),a=0,s=u=0,c=r.length;u<c;s=u+=1)i[a++]=e[r[s]];return o.deflate(i,function(e,n){if(t.alphaChannel=n,e)throw e;return t.finalize()})}}(this))},t}(),e.localExports=i}).call(this,t("buffer").Buffer)},{buffer:60,"png-js":186,zlib:58}],11:[function(t,e,n){var r,i,o,a={}.hasOwnProperty,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};r=t("events").EventEmitter,i=t("linebreak"),o=function(t){function e(t,e){var n;this.document=t,this.indent=e.indent||0,this.characterSpacing=e.characterSpacing||0,this.wordSpacing=0===e.wordSpacing,this.columns=e.columns||1,this.columnGap=null!=(n=e.columnGap)?n:18,this.lineWidth=(e.width-this.columnGap*(this.columns-1))/this.columns,this.spaceLeft=this.lineWidth,this.startX=this.document.x,this.startY=this.document.y,this.column=1,this.ellipsis=e.ellipsis,this.continuedX=0,this.features=e.features,null!=e.height?(this.height=e.height,this.maxY=this.startY+e.height):this.maxY=this.document.page.maxY(),this.on("firstLine",function(t){return function(e){var n;return n=t.continuedX||t.indent,t.document.x+=n,t.lineWidth-=n,t.once("line",function(){if(t.document.x-=n,t.lineWidth+=n,e.continued&&!t.continuedX&&(t.continuedX=t.indent),!e.continued)return t.continuedX=0})}}(this)),this.on("lastLine",function(t){return function(e){var n;return"justify"===(n=e.align)&&(e.align="left"),t.lastLine=!0,t.once("line",function(){return t.document.y+=e.paragraphGap||0,e.align=n,t.lastLine=!1})}}(this))}return s(e,r),e.prototype.wordWidth=function(t){return this.document.widthOfString(t,this)+this.characterSpacing+this.wordSpacing},e.prototype.eachWord=function(t,e){var n,r,o,a,s,u,c,l,h,f;for(r=new i(t),s=null,f=Object.create(null);n=r.nextBreak();){if(h=t.slice((null!=s?s.position:void 0)||0,n.position),(l=null!=f[h]?f[h]:f[h]=this.wordWidth(h))>this.lineWidth+this.continuedX)for(u=s,o={};h.length;){for(a=h.length;l>this.spaceLeft;)l=this.wordWidth(h.slice(0,--a));if(o.required=a<h.length,c=e(h.slice(0,a),l,o,u),u={required:!1},h=h.slice(a),l=this.wordWidth(h),!1===c)break}else c=e(h,l,n,s);if(!1===c)break;s=n}},e.prototype.wrap=function(t,e){var n,r,i,o,a,s,u;return null!=e.indent&&(this.indent=e.indent),null!=e.characterSpacing&&(this.characterSpacing=e.characterSpacing),null!=e.wordSpacing&&(this.wordSpacing=e.wordSpacing),null!=e.ellipsis&&(this.ellipsis=e.ellipsis),o=this.document.y+this.document.currentLineHeight(!0),(this.document.y>this.maxY||o>this.maxY)&&this.nextSection(),n="",a=0,s=0,i=0,u=this.document.y,r=function(t){return function(){return e.textWidth=a+t.wordSpacing*(s-1),e.wordCount=s,e.lineWidth=t.lineWidth,u=t.document.y,t.emit("line",n,e,t),i++}}(this),this.emit("sectionStart",e,this),this.eachWord(t,function(t){return function(i,o,u,c){var l;if((null==c||c.required)&&(t.emit("firstLine",e,t),t.spaceLeft=t.lineWidth),o<=t.spaceLeft&&(n+=i,a+=o,s++),u.required||o>t.spaceLeft){if(u.required&&t.emit("lastLine",e,t),l=t.document.currentLineHeight(!0),null!=t.height&&t.ellipsis&&t.document.y+2*l>t.maxY&&t.column>=t.columns){for(!0===t.ellipsis&&(t.ellipsis="вЂ¦"),n=n.replace(/\s+$/,""),a=t.wordWidth(n+t.ellipsis);a>t.lineWidth;)n=n.slice(0,-1).replace(/\s+$/,""),a=t.wordWidth(n+t.ellipsis);n+=t.ellipsis}return r(),t.maxY-(t.document.y+l)<-1e-6&&!t.nextSection()?(s=0,n="",!1):u.required?(o>t.spaceLeft&&(n=i,a=o,s=1,r()),t.spaceLeft=t.lineWidth,n="",a=0,s=0):(t.spaceLeft=t.lineWidth-o,n=i,a=o,s=1)}return t.spaceLeft-=o}}(this)),s>0&&(this.emit("lastLine",e,this),r()),this.emit("sectionEnd",e,this),!0===e.continued?(i>1&&(this.continuedX=0),this.continuedX+=e.textWidth,this.document.y=u):this.document.x=this.startX},e.prototype.nextSection=function(t){var e;if(this.emit("sectionEnd",t,this),++this.column>this.columns){if(null!=this.height)return!1;this.document.addPage(),this.column=1,this.startY=this.document.page.margins.top,this.maxY=this.document.page.maxY(),this.document.x=this.startX,this.document._fillColor&&(e=this.document).fillColor.apply(e,this.document._fillColor),this.emit("pageBreak",t,this)}else this.document.x+=this.lineWidth+this.columnGap,this.document.y=this.startY,this.emit("columnBreak",t,this);return this.emit("sectionStart",t,this),!0},e}(),e.localExports=o},{events:164,linebreak:173}],12:[function(t,e,n){e.localExports={annotate:function(t,e,n,r,i){var o,a,s;i.Type="Annot",i.Rect=this._convertRect(t,e,n,r),i.Border=[0,0,0],"Link"!==i.Subtype&&null==i.C&&(i.C=this._normalizeColor(i.color||[0,0,0])),delete i.color,"string"==typeof i.Dest&&(i.Dest=new String(i.Dest));for(o in i)s=i[o],i[o[0].toUpperCase()+o.slice(1)]=s;return a=this.ref(i),this.page.annotations.push(a),a.end(),this},note:function(t,e,n,r,i,o){return null==o&&(o={}),o.Subtype="Text",o.Contents=new String(i),o.Name="Comment",null==o.color&&(o.color=[243,223,92]),this.annotate(t,e,n,r,o)},link:function(t,e,n,r,i,o){return null==o&&(o={}),o.Subtype="Link",o.A=this.ref({S:"URI",URI:new String(i)}),o.A.end(),this.annotate(t,e,n,r,o)},_markup:function(t,e,n,r,i){var o,a,s,u,c;return null==i&&(i={}),c=this._convertRect(t,e,n,r),o=c[0],s=c[1],a=c[2],u=c[3],i.QuadPoints=[o,u,a,u,o,s,a,s],i.Contents=new String,this.annotate(t,e,n,r,i)},highlight:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Highlight",null==i.color&&(i.color=[241,238,148]),this._markup(t,e,n,r,i)},underline:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Underline",this._markup(t,e,n,r,i)},strike:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="StrikeOut",this._markup(t,e,n,r,i)},lineAnnotation:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Line",i.Contents=new String,i.L=[t,this.page.height-e,n,this.page.height-r],this.annotate(t,e,n,r,i)},rectAnnotation:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Square",i.Contents=new String,this.annotate(t,e,n,r,i)},ellipseAnnotation:function(t,e,n,r,i){return null==i&&(i={}),i.Subtype="Circle",i.Contents=new String,this.annotate(t,e,n,r,i)},textAnnotation:function(t,e,n,r,i,o){return null==o&&(o={}),o.Subtype="FreeText",o.Contents=new String(i),o.DA=new String,this.annotate(t,e,n,r,o)},_convertRect:function(t,e,n,r){var i,o,a,s,u,c,l,h,f;return h=e,e+=r,l=t+n,f=this._ctm,i=f[0],o=f[1],a=f[2],s=f[3],u=f[4],c=f[5],t=i*t+a*e+u,e=o*t+s*e+c,l=i*l+a*h+u,h=o*l+s*h+c,[t,e,l,h]}}},{}],13:[function(t,e,n){var r,i,o,a,s;s=t("../gradient"),r=s.PDFGradient,i=s.PDFLinearGradient,o=s.PDFRadialGradient,e.localExports={initColor:function(){return this._opacityRegistry={},this._opacityCount=0,this._gradCount=0},_normalizeColor:function(t){var e,n;return t instanceof r?t:("string"==typeof t&&("#"===t.charAt(0)?(4===t.length&&(t=t.replace(/#([0-9A-F])([0-9A-F])([0-9A-F])/i,"#$1$1$2$2$3$3")),e=parseInt(t.slice(1),16),t=[e>>16,e>>8&255,255&e]):a[t]&&(t=a[t])),Array.isArray(t)?(3===t.length?t=function(){var e,r,i;for(i=[],e=0,r=t.length;e<r;e++)n=t[e],i.push(n/255);return i}():4===t.length&&(t=function(){var e,r,i;for(i=[],e=0,r=t.length;e<r;e++)n=t[e],i.push(n/100);return i}()),t):null)},_setColor:function(t,e){var n,i,o,a;return!!(t=this._normalizeColor(t))&&(this._sMasked&&((n=this.ref({Type:"ExtGState",SMask:"None"})).end(),i="Gs"+ ++this._opacityCount,this.page.ext_gstates[i]=n,this.addContent("/"+i+" gs"),this._sMasked=!1),o=e?"SCN":"scn",t instanceof r?(this._setColorSpace("Pattern",e),t.apply(o)):(a=4===t.length?"DeviceCMYK":"DeviceRGB",this._setColorSpace(a,e),t=t.join(" "),this.addContent(t+" "+o)),!0)},_setColorSpace:function(t,e){var n;return n=e?"CS":"cs",this.addContent("/"+t+" "+n)},fillColor:function(t,e){return null==e&&(e=1),this._setColor(t,!1)&&this.fillOpacity(e),this._fillColor=[t,e],this},strokeColor:function(t,e){return null==e&&(e=1),this._setColor(t,!0)&&this.strokeOpacity(e),this},opacity:function(t){return this._doOpacity(t,t),this},fillOpacity:function(t){return this._doOpacity(t,null),this},strokeOpacity:function(t){return this._doOpacity(null,t),this},_doOpacity:function(t,e){var n,r,i,o;if(null!=t||null!=e)return null!=t&&(t=Math.max(0,Math.min(1,t))),null!=e&&(e=Math.max(0,Math.min(1,e))),r=t+"_"+e,this._opacityRegistry[r]?(n=(o=this._opacityRegistry[r])[0],i=o[1]):(n={Type:"ExtGState"},null!=t&&(n.ca=t),null!=e&&(n.CA=e),(n=this.ref(n)).end(),i="Gs"+ ++this._opacityCount,this._opacityRegistry[r]=[n,i]),this.page.ext_gstates[i]=n,this.addContent("/"+i+" gs")},linearGradient:function(t,e,n,r){return new i(this,t,e,n,r)},radialGradient:function(t,e,n,r,i,a){return new o(this,t,e,n,r,i,a)}},a={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{"../gradient":7}],14:[function(t,e,n){var r;r=t("../font"),e.localExports={initFonts:function(){return this._fontFamilies={},this._fontCount=0,this._fontSize=12,this._font=null,this._registeredFonts={},this.font("Helvetica")},font:function(t,e,n){var i,o,a,s;return"number"==typeof e&&(n=e,e=null),"string"==typeof t&&this._registeredFonts[t]?(i=t,t=(s=this._registeredFonts[t]).src,e=s.family):"string"!=typeof(i=e||t)&&(i=null),null!=n&&this.fontSize(n),(o=this._fontFamilies[i])?(this._font=o,this):(a="F"+ ++this._fontCount,this._font=r.open(this,t,e,a),(o=this._fontFamilies[this._font.name])?(this._font=o,this):(i&&(this._fontFamilies[i]=this._font),this._fontFamilies[this._font.name]=this._font,this))},fontSize:function(t){return this._fontSize=t,this},currentLineHeight:function(t){return null==t&&(t=!1),this._font.lineHeight(this._fontSize,t)},currentFontAscender:function(){return this._font.getAscender(this._fontSize)},currentFontBBox:function(){return this._font.getBBox(this._fontSize)},currentFontSize:function(){return this._fontSize},registerFont:function(t,e,n){return this._registeredFonts[t]={src:e,family:n},this}}},{"../font":3}],15:[function(t,e,n){(function(n){var r;r=t("../image"),e.localExports={initImages:function(){return this._imageRegistry={},this._imageCount=0},image:function(t,e,i,o){var a,s,u,c,l,h,f,d,p,g,_,y,m;null==o&&(o={}),"object"==typeof e&&(o=e,e=null),e=null!=(_=null!=e?e:o.x)?_:this.x,i=null!=(y=null!=i?i:o.y)?y:this.y,n.isBuffer(t)||(l=this._imageRegistry[t]),l||((l=r.open(t,"I"+ ++this._imageCount)).embed(this),n.isBuffer(t)||(this._imageRegistry[t]=l)),null==(p=this.page.xobjects)[g=l.label]&&(p[g]=l.obj);var v=.75*l.width,b=.75*l.height;return f=o.width||v,u=o.height||b,o.width&&!o.height?(f=v*(d=f/v),u=b*d):o.height&&!o.width?(f=v*(c=u/b),u=b*c):o.scale?(f=v*o.scale,u=b*o.scale):o.fit&&((h=v/b)>(s=(m=o.fit)[0])/(a=m[1])?(f=s,u=s/h):(u=a,f=a*h),"center"===o.align?e=e+s/2-f/2:"right"===o.align&&(e=e+s-f),"center"===o.valign?i=i+a/2-u/2:"bottom"===o.valign&&(i=i+a-u)),this.y===i&&(this.y+=u),this.save(),this.transform(f,0,0,-u,e,i+u),this.addContent("/"+l.label+" Do"),this.restore(),this}}}).call(this,{isBuffer:t("../../node_modules/is-buffer/index.js")})},{"../../node_modules/is-buffer/index.js":168,"../image":8}],16:[function(t,e,n){var r;r=t("../line_wrapper"),e.localExports={initText:function(){return this.x=0,this.y=0,this._lineGap=0},currentLineGap:function(){return this._lineGap},lineGap:function(t){return this._lineGap=t,this},moveDown:function(t){return null==t&&(t=1),this.y+=this.currentLineHeight(!0)*t+this._lineGap,this},moveUp:function(t){return null==t&&(t=1),this.y-=this.currentLineHeight(!0)*t+this._lineGap,this},_text:function(t,e,n,i,o){var a,s,u,c;if(i=this._initOptions(e,n,i),t=""+t,i.wordSpacing&&(t=t.replace(/\s{2,}/g," ")),i.width)(a=this._wrapper)||(a=new r(this,i)).on("line",o),this._wrapper=i.continued?a:null,this._textOptions=i.continued?i:null,a.wrap(t,i);else for(s=0,u=(c=t.split("\n")).length;s<u;s++)o(c[s],i);return this},text:function(t,e,n,r){return this._text(t,e,n,r,this._line.bind(this))},widthOfString:function(t,e){return null==e&&(e={}),this._font.widthOfString(t,this._fontSize,e.features)+(e.characterSpacing||0)*(t.length-1)},heightOfString:function(t,e){var n,r,i,o;return null==e&&(e={}),i=this.x,o=this.y,e=this._initOptions(e),e.height=1/0,r=e.lineGap||this._lineGap||0,this._text(t,this.x,this.y,e,function(t){return function(e,n){return t.y+=t.currentLineHeight(!0)+r}}(this)),n=this.y-o,this.x=i,this.y=o,n},textAndMeasure:function(t,e,n,r,i){r=r||{},null==e&&(e=this.x,n=this.y);var o=this,a=this.x,s=this.y,u={width:0,height:0,charCount:0},c=r.lineGap||this._lineGap||0,l=r.columnGap||18,h=null==e?this.x:e,f=[],d=0;return i&&null==r.height&&(r.height=1/0),this._text(t,e,n,r,function(n,r,a){u.charCount+=n.length,o.x===e&&(u.height+=o.currentLineHeight(!0)+c),r.textWidth&&(o.x>h&&(h=o.x,f[d++]=r.lineWidth),f[d]=Math.max(f[d]||0,r.textWidth)),i?a?o.y+=o.currentLineHeight(!0)+c:o.x+=o.widthOfString(t):o._line.apply(o,arguments)}),f.length?(f.forEach(function(t){u.width+=t+l}),u.width-=l):u.width=this.x-a,!1===r.includeLastLineExternalLeading&&(u.height-=this.currentLineHeight(!0)-this.currentLineHeight(!1)),u.height=Math.max(0,u.height),i&&(this.x=a,this.y=s),u},list:function(t,e,n,i,o){var a,s,u,c,l,h,f,d;return i=this._initOptions(e,n,i),d=Math.round(this._font.ascender/1e3*this._fontSize/3),u=i.textIndent||5*d,c=i.bulletIndent||8*d,h=1,l=[],f=[],(a=function(t){var e,n,r,i,o;for(o=[],e=r=0,i=t.length;r<i;e=++r)n=t[e],Array.isArray(n)?(h++,a(n),o.push(h--)):(l.push(n),o.push(f.push(h)));return o})(t),(o=new r(this,i)).on("line",this._line.bind(this)),h=1,s=0,o.on("firstLine",function(t){return function(){var e,n;return(n=f[s++])!==h&&(e=c*(n-h),t.x+=e,o.lineWidth-=e,h=n),t.circle(t.x-u+d,t.y+d+d/2,d),t.fill()}}(this)),o.on("sectionStart",function(t){return function(){var e;return e=u+c*(h-1),t.x+=e,o.lineWidth-=e}}(this)),o.on("sectionEnd",function(t){return function(){var e;return e=u+c*(h-1),t.x-=e,o.lineWidth+=e}}(this)),o.wrap(l.join("\n"),i),this},_initOptions:function(t,e,n){var r,i,o,a;if(null==t&&(t={}),null==n&&(n={}),"object"==typeof t&&(n=t,t=null),n=function(){var t,e,r;e={};for(t in n)r=n[t],e[t]=r;return e}(),this._textOptions){a=this._textOptions;for(r in a)o=a[r],"continued"!==r&&null==n[r]&&(n[r]=o)}return null!=t&&(this.x=t),null!=e&&(this.y=e),!1!==n.lineBreak&&(i=this.page.margins,null==n.width&&(n.width=this.page.width-this.x-i.right,n.width=Math.max(n.width,0))),n.columns||(n.columns=0),null==n.columnGap&&(n.columnGap=18),n},_line:function(t,e,n){var r;return null==e&&(e={}),this._fragment(t,this.x,this.y,e),r=e.lineGap||this._lineGap||0,n?this.y+=this.currentLineHeight(!0)+r:this.x+=this.widthOfString(t)},_fragment:function(t,e,n,r){var i,o,a,s,u,c,l,h,f,d,p,g,_,y,m,v,b,w,x,S,k,C,E,A,P,j,O,I,T,L,B,N;if(0!==(t=(""+t).replace(/\n/g,"")).length){if(o=r.align||"left",E=r.wordSpacing||0,a=r.characterSpacing||0,r.width)switch(o){case"right":k=this.widthOfString(t.replace(/\s+$/,""),r),e+=r.lineWidth-k;break;case"center":e+=r.lineWidth/2-r.textWidth/2;break;case"justify":A=t.trim().split(/\s+/),k=this.widthOfString(t.replace(/\s+/g,""),r),S=this.widthOfString(" ")+a,E=Math.max(0,(r.lineWidth-k)/Math.max(1,A.length-1)-S)}if(w=r.textWidth+E*(r.wordCount-1)+a*(t.length-1),r.link&&this.link(e,n,w,this.currentLineHeight(),r.link),(r.underline||r.strike)&&(this.save(),r.stroke||this.strokeColor.apply(this,this._fillColor),g=this._fontSize<10?.5:Math.floor(this._fontSize/10),this.lineWidth(g),u=r.underline?1:2,_=n+this.currentLineHeight()/u,r.underline&&(_-=g),this.moveTo(e,_),this.lineTo(e+w,_),this.stroke(),this.restore()),this.save(),this.transform(1,0,0,-1,0,this.page.height),n=this.page.height-n-this._font.ascender/1e3*this._fontSize,null==(P=this.page.fonts)[L=this._font.id]&&(P[L]=this._font.ref()),this.addContent("BT"),this.addContent("1 0 0 1 "+e+" "+n+" Tm"),this.addContent("/"+this._font.id+" "+this._fontSize+" Tf"),(y=r.fill&&r.stroke?2:r.stroke?1:0)&&this.addContent(y+" Tr"),a&&this.addContent(a+" Tc"),E)for(A=t.trim().split(/\s+/),E+=this.widthOfString(" ")+a,E*=1e3/this._fontSize,c=[],v=[],j=0,I=A.length;j<I;j++)C=A[j],l=(B=this._font.encode(C,r.features))[0],b=B[1],c.push.apply(c,l),v.push.apply(v,b),v[v.length-1].xAdvance+=E;else N=this._font.encode(t,r.features),c=N[0],v=N[1];for(x=this._fontSize/1e3,s=[],p=0,f=!1,i=function(t){var e,n;return p<t&&(n=c.slice(p,t).join(""),e=v[t-1].xAdvance-v[t-1].advanceWidth,s.push("<"+n+"> "+-e)),p=t},h=function(t){return function(e){if(i(e),s.length>0)return t.addContent("["+s.join(" ")+"] TJ"),s.length=0}}(this),d=O=0,T=v.length;O<T;d=++O)(m=v[d]).xOffset||m.yOffset?(h(d),this.addContent("1 0 0 1 "+(e+m.xOffset*x)+" "+(n+m.yOffset*x)+" Tm"),h(d+1),f=!0):(f&&(this.addContent("1 0 0 1 "+e+" "+n+" Tm"),f=!1),m.xAdvance-m.advanceWidth!=0&&i(d+1)),e+=m.xAdvance*x;return h(d),this.addContent("ET"),this.restore()}}}},{"../line_wrapper":11}],17:[function(t,e,n){var r,i,o=[].slice;i=t("../path"),r=(Math.sqrt(2)-1)/3*4,e.localExports={initVector:function(){return this._ctm=[1,0,0,1,0,0],this._ctmStack=[]},save:function(){return this._ctmStack.push(this._ctm.slice()),this.addContent("q")},restore:function(){return this._ctm=this._ctmStack.pop()||[1,0,0,1,0,0],this.addContent("Q")},closePath:function(){return this.addContent("h")},lineWidth:function(t){return this.addContent(t+" w")},_CAP_STYLES:{BUTT:0,ROUND:1,SQUARE:2},lineCap:function(t){return"string"==typeof t&&(t=this._CAP_STYLES[t.toUpperCase()]),this.addContent(t+" J")},_JOIN_STYLES:{MITER:0,ROUND:1,BEVEL:2},lineJoin:function(t){return"string"==typeof t&&(t=this._JOIN_STYLES[t.toUpperCase()]),this.addContent(t+" j")},miterLimit:function(t){return this.addContent(t+" M")},dash:function(t,e){var n,r,i;return null==e&&(e={}),null==t?this:(r=null!=(i=e.space)?i:t,n=e.phase||0,this.addContent("["+t+" "+r+"] "+n+" d"))},undash:function(){return this.addContent("[] 0 d")},moveTo:function(t,e){return this.addContent(t+" "+e+" m")},lineTo:function(t,e){return this.addContent(t+" "+e+" l")},bezierCurveTo:function(t,e,n,r,i,o){return this.addContent(t+" "+e+" "+n+" "+r+" "+i+" "+o+" c")},quadraticCurveTo:function(t,e,n,r){return this.addContent(t+" "+e+" "+n+" "+r+" v")},rect:function(t,e,n,r){return this.addContent(t+" "+e+" "+n+" "+r+" re")},roundedRect:function(t,e,n,r,i){return null==i&&(i=0),this.moveTo(t+i,e),this.lineTo(t+n-i,e),this.quadraticCurveTo(t+n,e,t+n,e+i),this.lineTo(t+n,e+r-i),this.quadraticCurveTo(t+n,e+r,t+n-i,e+r),this.lineTo(t+i,e+r),this.quadraticCurveTo(t,e+r,t,e+r-i),this.lineTo(t,e+i),this.quadraticCurveTo(t,e,t+i,e)},ellipse:function(t,e,n,i){var o,a,s,u,c,l;return null==i&&(i=n),t-=n,e-=i,o=n*r,a=i*r,s=t+2*n,c=e+2*i,u=t+n,l=e+i,this.moveTo(t,l),this.bezierCurveTo(t,l-a,u-o,e,u,e),this.bezierCurveTo(u+o,e,s,l-a,s,l),this.bezierCurveTo(s,l+a,u+o,c,u,c),this.bezierCurveTo(u-o,c,t,l+a,t,l),this.closePath()},circle:function(t,e,n){return this.ellipse(t,e,n)},polygon:function(){var t,e,n,r;for(e=1<=arguments.length?o.call(arguments,0):[],this.moveTo.apply(this,e.shift()),n=0,r=e.length;n<r;n++)t=e[n],this.lineTo.apply(this,t);return this.closePath()},path:function(t){return i.apply(this,t),this},_windingRule:function(t){return/even-?odd/.test(t)?"*":""},fill:function(t,e){return/(even-?odd)|(non-?zero)/.test(t)&&(e=t,t=null),t&&this.fillColor(t),this.addContent("f"+this._windingRule(e))},stroke:function(t){return t&&this.strokeColor(t),this.addContent("S")},fillAndStroke:function(t,e,n){var r;return null==e&&(e=t),(r=/(even-?odd)|(non-?zero)/).test(t)&&(n=t,t=null),r.test(e)&&(n=e,e=t),t&&(this.fillColor(t),this.strokeColor(e)),this.addContent("B"+this._windingRule(n))},clip:function(t){return this.addContent("W"+this._windingRule(t)+" n")},transform:function(t,e,n,r,i,o){var a,s,u,c,l,h,f,d,p;return a=this._ctm,s=a[0],u=a[1],c=a[2],l=a[3],h=a[4],f=a[5],a[0]=s*t+c*e,a[1]=u*t+l*e,a[2]=s*n+c*r,a[3]=u*n+l*r,a[4]=s*i+c*o+h,a[5]=u*i+l*o+f,p=function(){var a,s,u,c;for(c=[],a=0,s=(u=[t,e,n,r,i,o]).length;a<s;a++)d=u[a],c.push(+d.toFixed(5));return c}().join(" "),this.addContent(p+" cm")},translate:function(t,e){return this.transform(1,0,0,1,t,e)},rotate:function(t,e){var n,r,i,o,a,s,u;return null==e&&(e={}),r=t*Math.PI/180,n=Math.cos(r),i=Math.sin(r),o=a=0,null!=e.origin&&(s=(o=(u=e.origin)[0])*i+(a=u[1])*n,o-=o*n-a*i,a-=s),this.transform(n,i,-i,n,o,a)},scale:function(t,e,n){var r,i,o;return null==e&&(e=t),null==n&&(n={}),2===arguments.length&&(n=e=t),r=i=0,null!=n.origin&&(r=(o=n.origin)[0],i=o[1],r-=t*r,i-=e*i),this.transform(t,0,0,e,r,i)}}},{"../path":20}],18:[function(t,e,n){(function(n){var r,i;r=function(){function t(){}var e,r,o,a;return o=function(t,e){return(Array(e+1).join("0")+t).slice(-e)},r=/[\n\r\t\b\f\(\)\\]/g,e={"\n":"\\n","\r":"\\r","\t":"\\t","\b":"\\b","\f":"\\f","\\":"\\\\","(":"\\(",")":"\\)"},a=function(t){var e,n,r,i,o;if(1&(r=t.length))throw new Error("Buffer length must be even");for(n=i=0,o=r-1;i<o;n=i+=2)e=t[n],t[n]=t[n+1],t[n+1]=e;return t},t.convert=function(s){var u,c,l,h,f,d,p,g,_;if("string"==typeof s)return"/"+s;if(s instanceof String){for(l=!1,c=g=0,_=(d=s.replace(r,function(t){return e[t]})).length;g<_;c=g+=1)if(d.charCodeAt(c)>127){l=!0;break}return l&&(d=a(new n("\ufeff"+d,"utf16le")).toString("binary")),"("+d+")"}if(n.isBuffer(s))return"<"+s.toString("hex")+">";if(s instanceof i)return s.toString();if(s instanceof Date)return"(D:"+o(s.getUTCFullYear(),4)+o(s.getUTCMonth()+1,2)+o(s.getUTCDate(),2)+o(s.getUTCHours(),2)+o(s.getUTCMinutes(),2)+o(s.getUTCSeconds(),2)+"Z)";if(Array.isArray(s))return"["+function(){var e,n,r;for(r=[],e=0,n=s.length;e<n;e++)u=s[e],r.push(t.convert(u));return r}().join(" ")+"]";if("[object Object]"==={}.toString.call(s)){f=["<<"];for(h in s)p=s[h],f.push("/"+h+" "+t.convert(p));return f.push(">>"),f.join("\n")}return""+s},t}(),e.localExports=r,i=t("./reference")}).call(this,t("buffer").Buffer)},{"./reference":21,buffer:60}],19:[function(t,e,n){var r;r=function(){function t(t,r){var i;this.document=t,null==r&&(r={}),this.size=r.size||"letter",this.layout=r.layout||"portrait","number"==typeof r.margin?this.margins={top:r.margin,left:r.margin,bottom:r.margin,right:r.margin}:(this.margins=r.margins||e,this.margins={top:this.margins.top,left:this.margins.left,bottom:this.margins.bottom,right:this.margins.right}),i=Array.isArray(this.size)?this.size:n[this.size.toUpperCase()],this.width=i["portrait"===this.layout?0:1],this.height=i["portrait"===this.layout?1:0],this.content=this.document.ref(),this.resources=this.document.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"]}),Object.defineProperties(this,{fonts:{get:function(t){return function(){var e;return null!=(e=t.resources.data).Font?e.Font:e.Font={}}}(this)},xobjects:{get:function(t){return function(){var e;return null!=(e=t.resources.data).XObject?e.XObject:e.XObject={}}}(this)},ext_gstates:{get:function(t){return function(){var e;return null!=(e=t.resources.data).ExtGState?e.ExtGState:e.ExtGState={}}}(this)},patterns:{get:function(t){return function(){var e;return null!=(e=t.resources.data).Pattern?e.Pattern:e.Pattern={}}}(this)},annotations:{get:function(t){return function(){var e;return null!=(e=t.dictionary.data).Annots?e.Annots:e.Annots=[]}}(this)}}),this.dictionary=this.document.ref({Type:"Page",Parent:this.document._root.data.Pages,MediaBox:[0,0,this.width,this.height],Contents:this.content,Resources:this.resources})}var e,n;return t.prototype.maxY=function(){return this.height-this.margins.bottom},t.prototype.write=function(t){return this.content.write(t)},t.prototype.end=function(){return this.dictionary.end(),this.resources.end(),this.content.end()},e={top:72,left:72,bottom:72,right:72},n={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]},t}(),e.localExports=r},{}],20:[function(t,e,n){var r;r=function(){function t(){}var e,n,r,i,o,a,s,u,c,l,h,f,d,p;return t.apply=function(t,n){var r;return r=s(n),e(r,t)},a={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},s=function(t){var e,n,r,i,o,s,u,c,l;for(u=[],e=[],i="",o=!1,s=0,c=0,l=t.length;c<l;c++)if(n=t[c],null!=a[n])s=a[n],r&&(i.length>0&&(e[e.length]=+i),u[u.length]={cmd:r,args:e},e=[],i="",o=!1),r=n;else if(" "===n||","===n||"-"===n&&i.length>0&&"e"!==i[i.length-1]||"."===n&&o){if(0===i.length)continue;e.length===s?(u[u.length]={cmd:r,args:e},e=[+i],"M"===r&&(r="L"),"m"===r&&(r="l")):e[e.length]=+i,o="."===n,i="-"===n||"."===n?n:""}else i+=n,"."===n&&(o=!0);return i.length>0&&(e.length===s?(u[u.length]={cmd:r,args:e},e=[+i],"M"===r&&(r="L"),"m"===r&&(r="l")):e[e.length]=+i),u[u.length]={cmd:r,args:e},u},r=i=u=c=d=p=0,e=function(t,e){var n,o,a,s,h;for(r=i=u=c=d=p=0,o=a=0,s=t.length;a<s;o=++a)n=t[o],"function"==typeof l[h=n.cmd]&&l[h](e,n.args);return r=i=u=c=0},l={M:function(t,e){return r=e[0],i=e[1],u=c=null,d=r,p=i,t.moveTo(r,i)},m:function(t,e){return r+=e[0],i+=e[1],u=c=null,d=r,p=i,t.moveTo(r,i)},C:function(t,e){return r=e[4],i=e[5],u=e[2],c=e[3],t.bezierCurveTo.apply(t,e)},c:function(t,e){return t.bezierCurveTo(e[0]+r,e[1]+i,e[2]+r,e[3]+i,e[4]+r,e[5]+i),u=r+e[2],c=i+e[3],r+=e[4],i+=e[5]},S:function(t,e){return null===u&&(u=r,c=i),t.bezierCurveTo(r-(u-r),i-(c-i),e[0],e[1],e[2],e[3]),u=e[0],c=e[1],r=e[2],i=e[3]},s:function(t,e){return null===u&&(u=r,c=i),t.bezierCurveTo(r-(u-r),i-(c-i),r+e[0],i+e[1],r+e[2],i+e[3]),u=r+e[0],c=i+e[1],r+=e[2],i+=e[3]},Q:function(t,e){return u=e[0],c=e[1],r=e[2],i=e[3],t.quadraticCurveTo(e[0],e[1],r,i)},q:function(t,e){return t.quadraticCurveTo(e[0]+r,e[1]+i,e[2]+r,e[3]+i),u=r+e[0],c=i+e[1],r+=e[2],i+=e[3]},T:function(t,e){return null===u?(u=r,c=i):(u=r-(u-r),c=i-(c-i)),t.quadraticCurveTo(u,c,e[0],e[1]),u=r-(u-r),c=i-(c-i),r=e[0],i=e[1]},t:function(t,e){return null===u?(u=r,c=i):(u=r-(u-r),c=i-(c-i)),t.quadraticCurveTo(u,c,r+e[0],i+e[1]),r+=e[0],i+=e[1]},A:function(t,e){return f(t,r,i,e),r=e[5],i=e[6]},a:function(t,e){return e[5]+=r,e[6]+=i,f(t,r,i,e),r=e[5],i=e[6]},L:function(t,e){return r=e[0],i=e[1],u=c=null,t.lineTo(r,i)},l:function(t,e){return r+=e[0],i+=e[1],u=c=null,t.lineTo(r,i)},H:function(t,e){return r=e[0],u=c=null,t.lineTo(r,i)},h:function(t,e){return r+=e[0],u=c=null,t.lineTo(r,i)},V:function(t,e){return i=e[0],u=c=null,t.lineTo(r,i)},v:function(t,e){return i+=e[0],u=c=null,t.lineTo(r,i)},Z:function(t){return t.closePath(),r=d,i=p},z:function(t){return t.closePath(),r=d,i=p}},f=function(t,e,r,i){var o,a,s,u,c,l,f,d,p,g,_,y,m;for(l=i[0],f=i[1],c=i[2],u=i[3],g=i[4],a=i[5],s=i[6],m=[],_=0,y=(p=n(a,s,l,f,u,g,c,e,r)).length;_<y;_++)d=p[_],o=h.apply(null,d),m.push(t.bezierCurveTo.apply(t,o));return m},n=function(t,e,n,r,i,o,a,s,l){var h,f,d,p,g,_,y,m,v,b,w,x,S,k,C,E,A,P,j,O,I,T,L,B;for(S=a*(Math.PI/180),x=Math.sin(S),g=Math.cos(S),n=Math.abs(n),r=Math.abs(r),(y=(u=g*(s-t)*.5+x*(l-e)*.5)*u/(n*n)+(c=g*(l-e)*.5-x*(s-t)*.5)*c/(r*r))>1&&(n*=y=Math.sqrt(y),r*=y),(w=1/(((j=(h=g/n)*t+(f=x/n)*e)-(P=h*s+f*l))*(j-P)+((T=(d=-x/r)*t+(p=g/r)*e)-(I=d*s+p*l))*(T-I))-.25)<0&&(w=0),b=Math.sqrt(w),o===i&&(b=-b),O=.5*(P+j)-b*(T-I),L=.5*(I+T)+b*(j-P),k=Math.atan2(I-L,P-O),(A=Math.atan2(T-L,j-O)-k)<0&&1===o?A+=2*Math.PI:A>0&&0===o&&(A-=2*Math.PI),v=Math.ceil(Math.abs(A/(.5*Math.PI+.001))),m=[],_=B=0;0<=v?B<v:B>v;_=0<=v?++B:--B)C=k+_*A/v,E=k+(_+1)*A/v,m[_]=[O,L,C,E,n,r,x,g];return m},h=function(t,e,n,r,i,a,s,u){var c,l,h,f,d,p,g,_,y,m,v,b;return c=u*i,l=-s*a,h=s*i,f=u*a,p=.5*(r-n),d=8/3*Math.sin(.5*p)*Math.sin(.5*p)/Math.sin(p),g=o(t+Math.cos(n)-d*Math.sin(n)),m=o(e+Math.sin(n)+d*Math.cos(n)),y=o(t+Math.cos(r)),b=o(e+Math.sin(r)),_=o(y+d*Math.sin(r)),v=o(b-d*Math.cos(r)),[c*g+l*m,h*g+f*m,c*_+l*v,h*_+f*v,c*y+l*b,h*y+f*b]},o=function(t){return Math.abs(Math.round(t)-t)<1e-13?Math.round(t):t},t}(),e.localExports=r},{}],21:[function(t,e,n){(function(n){var r,i,o,a=function(t,e){return function(){return t.apply(e,arguments)}},s={}.hasOwnProperty,u=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};o=t("zlib"),i=function(t){function e(t,n,r){this.document=t,this.id=n,this.data=null!=r?r:{},this.finalize=a(this.finalize,this),e.__super__.constructor.call(this,{decodeStrings:!1}),this.gen=0,this.deflate=null,this.compress=this.document.compress&&!this.data.Filter,this.uncompressedLength=0,this.chunks=[]}return u(e,t),e.prototype.initDeflate=function(){return this.data.Filter="FlateDecode",this.deflate=o.createDeflate(),this.deflate.on("data",function(t){return function(e){return t.chunks.push(e),t.data.Length+=e.length}}(this)),this.deflate.on("end",this.finalize)},e.prototype._write=function(t,e,r){var i;return n.isBuffer(t)||(t=new n(t+"\n","binary")),this.uncompressedLength+=t.length,null==(i=this.data).Length&&(i.Length=0),this.compress?(this.deflate||this.initDeflate(),this.deflate.write(t)):(this.chunks.push(t),this.data.Length+=t.length),r()},e.prototype.end=function(t){return e.__super__.end.apply(this,arguments),this.deflate?this.deflate.end():this.finalize()},e.prototype.finalize=function(){var t,e,n,i;if(this.offset=this.document._offset,this.document._write(this.id+" "+this.gen+" obj"),this.document._write(r.convert(this.data)),this.chunks.length){for(this.document._write("stream"),e=0,n=(i=this.chunks).length;e<n;e++)t=i[e],this.document._write(t);this.chunks.length=0,this.document._write("\nendstream")}return this.document._write("endobj"),this.document._refEnd(this)},e.prototype.toString=function(){return this.id+" "+this.gen+" R"},e}(t("stream").Writable),e.localExports=i,r=t("./object")}).call(this,t("buffer").Buffer)},{"./object":18,buffer:60,stream:216,zlib:58}],22:[function(t,e,n){function r(t,e){return d.isUndefined(e)?""+e:d.isNumber(e)&&!isFinite(e)?e.toString():d.isFunction(e)||d.isRegExp(e)?e.toString():e}function i(t,e){return d.isString(t)?t.length<e?t:t.slice(0,e):t}function o(t){return i(JSON.stringify(t.actual,r),128)+" "+t.operator+" "+i(JSON.stringify(t.expected,r),128)}function a(t,e,n,r,i){throw new _.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:i})}function s(t,e){t||a(t,!0,e,"==",_.ok)}function u(t,e){if(t===e)return!0;if(d.isBuffer(t)&&d.isBuffer(e)){if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}return d.isDate(t)&&d.isDate(e)?t.getTime()===e.getTime():d.isRegExp(t)&&d.isRegExp(e)?t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase:d.isObject(t)||d.isObject(e)?l(t,e):t==e}function c(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function l(t,e){if(d.isNullOrUndefined(t)||d.isNullOrUndefined(e))return!1;if(t.prototype!==e.prototype)return!1;if(d.isPrimitive(t)||d.isPrimitive(e))return t===e;var n=c(t),r=c(e);if(n&&!r||!n&&r)return!1;if(n)return t=p.call(t),e=p.call(e),u(t,e);var i,o,a=y(t),s=y(e);if(a.length!=s.length)return!1;for(a.sort(),s.sort(),o=a.length-1;o>=0;o--)if(a[o]!=s[o])return!1;for(o=a.length-1;o>=0;o--)if(i=a[o],!u(t[i],e[i]))return!1;return!0}function h(t,e){return!(!t||!e)&&("[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e||!0===e.call({},t))}function f(t,e,n,r){var i;d.isString(n)&&(r=n,n=null);try{e()}catch(t){i=t}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&a(i,n,"Missing expected exception"+r),!t&&h(i,n)&&a(i,n,"Got unwanted exception"+r),t&&i&&n&&!h(i,n)||!t&&i)throw i}var d=t("util/"),p=Array.prototype.slice,g=Object.prototype.hasOwnProperty,_=e.localExports=s;_.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=o(this),this.generatedMessage=!0);var e=t.stackStartFunction||a;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=e.name,s=r.indexOf("\n"+i);if(s>=0){var u=r.indexOf("\n",s+1);r=r.substring(u+1)}this.stack=r}}},d.inherits(_.AssertionError,Error),_.fail=a,_.ok=s,_.equal=function(t,e,n){t!=e&&a(t,e,n,"==",_.equal)},_.notEqual=function(t,e,n){t==e&&a(t,e,n,"!=",_.notEqual)},_.deepEqual=function(t,e,n){u(t,e)||a(t,e,n,"deepEqual",_.deepEqual)},_.notDeepEqual=function(t,e,n){u(t,e)&&a(t,e,n,"notDeepEqual",_.notDeepEqual)},_.strictEqual=function(t,e,n){t!==e&&a(t,e,n,"===",_.strictEqual)},_.notStrictEqual=function(t,e,n){t===e&&a(t,e,n,"!==",_.notStrictEqual)},_.throws=function(t,e,n){f.apply(this,[!0].concat(p.call(arguments)))},_.doesNotThrow=function(t,e){f.apply(this,[!1].concat(p.call(arguments)))},_.ifError=function(t){if(t)throw t};var y=Object.keys||function(t){var e=[];for(var n in t)g.call(t,n)&&e.push(n);return e}},{"util/":224}],23:[function(t,e,n){e.localExports={default:t("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":62}],24:[function(t,e,n){e.localExports={default:t("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":63}],25:[function(t,e,n){e.localExports={default:t("core-js/library/fn/is-iterable"),__esModule:!0}},{"core-js/library/fn/is-iterable":64}],26:[function(t,e,n){e.localExports={default:t("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":65}],27:[function(t,e,n){e.localExports={default:t("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":66}],28:[function(t,e,n){e.localExports={default:t("core-js/library/fn/object/define-properties"),__esModule:!0}},{"core-js/library/fn/object/define-properties":67}],29:[function(t,e,n){e.localExports={default:t("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":68}],30:[function(t,e,n){e.localExports={default:t("core-js/library/fn/object/freeze"),__esModule:!0}},{"core-js/library/fn/object/freeze":69}],31:[function(t,e,n){e.localExports={default:t("core-js/library/fn/object/get-own-property-descriptor"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-descriptor":70}],32:[function(t,e,n){e.localExports={default:t("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":71}],33:[function(t,e,n){e.localExports={default:t("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":72}],34:[function(t,e,n){e.localExports={default:t("core-js/library/fn/object/set-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/set-prototype-of":73}],35:[function(t,e,n){e.localExports={default:t("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":74}],36:[function(t,e,n){e.localExports={default:t("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":75}],37:[function(t,e,n){"use strict";n.__esModule=!0,n.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},{}],38:[function(t,e,n){"use strict";n.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(t("../core-js/object/define-property"));n.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),r.default(t,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()},{"../core-js/object/define-property":29}],39:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=r(t("../core-js/object/get-prototype-of")),o=r(t("../core-js/object/get-own-property-descriptor"));n.default=function t(e,n,r){null===e&&(e=Function.prototype);var a=o.default(e,n);if(void 0===a){var s=i.default(e);return null===s?void 0:t(s,n,r)}if("value"in a)return a.value;var u=a.get;if(void 0!==u)return u.call(r)}},{"../core-js/object/get-own-property-descriptor":31,"../core-js/object/get-prototype-of":32}],40:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=r(t("../core-js/object/set-prototype-of")),o=r(t("../core-js/object/create")),a=r(t("../helpers/typeof"));n.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":a.default(e)));t.prototype=o.default(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(i.default?i.default(t,e):t.__proto__=e)}},{"../core-js/object/create":27,"../core-js/object/set-prototype-of":34,"../helpers/typeof":44}],41:[function(t,e,n){"use strict";n.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(t("../helpers/typeof"));n.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":r.default(e))&&"function"!=typeof e?t:e}},{"../helpers/typeof":44}],42:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=r(t("../core-js/is-iterable")),o=r(t("../core-js/get-iterator"));n.default=function(){function t(t,e){var n=[],r=!0,i=!1,a=void 0;try{for(var s,u=o.default(t);!(r=(s=u.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw a}}return n}return function(e,n){if(Array.isArray(e))return e;if(i.default(Object(e)))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},{"../core-js/get-iterator":24,"../core-js/is-iterable":25}],43:[function(t,e,n){"use strict";n.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(t("../core-js/array/from"));n.default=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return r.default(t)}},{"../core-js/array/from":23}],44:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=r(t("../core-js/symbol/iterator")),o=r(t("../core-js/symbol")),a="function"==typeof o.default&&"symbol"==typeof i.default?function(t){return typeof t}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default?"symbol":typeof t};n.default="function"==typeof o.default&&"symbol"===a(i.default)?function(t){return void 0===t?"undefined":a(t)}:function(t){return t&&"function"==typeof o.default&&t.constructor===o.default?"symbol":void 0===t?"undefined":a(t)}},{"../core-js/symbol":35,"../core-js/symbol/iterator":36}],45:[function(t,e,n){"use strict";function r(t){return o[t>>18&63]+o[t>>12&63]+o[t>>6&63]+o[63&t]}function i(t,e,n){for(var i,o=[],a=e;a<n;a+=3)i=(t[a]<<16)+(t[a+1]<<8)+t[a+2],o.push(r(i));return o.join("")}n.toByteArray=function(t){var e,n,r,i,o,u,c=t.length;if(c%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[c-2]?2:"="===t[c-1]?1:0,u=new s(3*c/4-o),r=o>0?c-4:c;var l=0;for(e=0,n=0;e<r;e+=4,n+=3)i=a[t.charCodeAt(e)]<<18|a[t.charCodeAt(e+1)]<<12|a[t.charCodeAt(e+2)]<<6|a[t.charCodeAt(e+3)],u[l++]=i>>16&255,u[l++]=i>>8&255,u[l++]=255&i;return 2===o?(i=a[t.charCodeAt(e)]<<2|a[t.charCodeAt(e+1)]>>4,u[l++]=255&i):1===o&&(i=a[t.charCodeAt(e)]<<10|a[t.charCodeAt(e+1)]<<4|a[t.charCodeAt(e+2)]>>2,u[l++]=i>>8&255,u[l++]=255&i),u},n.fromByteArray=function(t){for(var e,n=t.length,r=n%3,a="",s=[],u=0,c=n-r;u<c;u+=16383)s.push(i(t,u,u+16383>c?c:u+16383));return 1===r?(e=t[n-1],a+=o[e>>2],a+=o[e<<4&63],a+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],a+=o[e>>10],a+=o[e>>4&63],a+=o[e<<2&63],a+="="),s.push(a),s.join("")};var o=[],a=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array;!function(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,n=t.length;e<n;++e)o[e]=t[e],a[t.charCodeAt(e)]=e;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63}()},{}],56:[function(t,e,n){},{}],57:[function(t,e,n){(function(e,r){function i(t){if(t<n.DEFLATE||t>n.UNZIP)throw new TypeError("Bad argument");this.mode=t,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function o(t,e){for(var n=0;n<t.length;n++)this[e+n]=t[n]}var a=t("pako/lib/zlib/messages"),s=t("pako/lib/zlib/zstream"),u=t("pako/lib/zlib/deflate.js"),c=t("pako/lib/zlib/inflate.js"),l=t("pako/lib/zlib/constants");for(var h in l)n[h]=l[h];n.NONE=0,n.DEFLATE=1,n.INFLATE=2,n.GZIP=3,n.GUNZIP=4,n.DEFLATERAW=5,n.INFLATERAW=6,n.UNZIP=7,i.prototype.init=function(t,e,r,i,o){switch(this.windowBits=t,this.level=e,this.memLevel=r,this.strategy=i,this.mode!==n.GZIP&&this.mode!==n.GUNZIP||(this.windowBits+=16),this.mode===n.UNZIP&&(this.windowBits+=32),this.mode!==n.DEFLATERAW&&this.mode!==n.INFLATERAW||(this.windowBits=-this.windowBits),this.strm=new s,this.mode){case n.DEFLATE:case n.GZIP:case n.DEFLATERAW:a=u.deflateInit2(this.strm,this.level,n.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case n.INFLATE:case n.GUNZIP:case n.INFLATERAW:case n.UNZIP:var a=c.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}a===n.Z_OK?(this.write_in_progress=!1,this.init_done=!0):this._error(a)},i.prototype.params=function(){throw new Error("deflateParams Not supported")},i.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(this.mode===n.NONE)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")},i.prototype.write=function(t,n,r,i,o,a,s){this._writeCheck(),this.write_in_progress=!0;var u=this;return e.nextTick(function(){u.write_in_progress=!1;var e=u._write(t,n,r,i,o,a,s);u.callback(e[0],e[1]),u.pending_close&&u.close()}),this},i.prototype.writeSync=function(t,e,n,r,i,o,a){return this._writeCheck(),this._write(t,e,n,r,i,o,a)},i.prototype._write=function(t,e,i,a,s,l,h){if(this.write_in_progress=!0,t!==n.Z_NO_FLUSH&&t!==n.Z_PARTIAL_FLUSH&&t!==n.Z_SYNC_FLUSH&&t!==n.Z_FULL_FLUSH&&t!==n.Z_FINISH&&t!==n.Z_BLOCK)throw new Error("Invalid flush value");null==e&&(e=new r(0),a=0,i=0),s._set?s.set=s._set:s.set=o;var f=this.strm;switch(f.avail_in=a,f.input=e,f.next_in=i,f.avail_out=h,f.output=s,f.next_out=l,this.mode){case n.DEFLATE:case n.GZIP:case n.DEFLATERAW:d=u.deflate(f,t);break;case n.UNZIP:case n.INFLATE:case n.GUNZIP:case n.INFLATERAW:var d=c.inflate(f,t);break;default:throw new Error("Unknown mode "+this.mode)}return d!==n.Z_STREAM_END&&d!==n.Z_OK&&this._error(d),this.write_in_progress=!1,[f.avail_in,f.avail_out]},i.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,this.mode===n.DEFLATE||this.mode===n.GZIP||this.mode===n.DEFLATERAW?u.deflateEnd(this.strm):c.inflateEnd(this.strm),this.mode=n.NONE)},i.prototype.reset=function(){switch(this.mode){case n.DEFLATE:case n.DEFLATERAW:t=u.deflateReset(this.strm);break;case n.INFLATE:case n.INFLATERAW:var t=c.inflateReset(this.strm)}t!==n.Z_OK&&this._error(t)},i.prototype._error=function(t){this.onerror(a[t]+": "+this.strm.msg,t),this.write_in_progress=!1,this.pending_close&&this.close()},n.Zlib=i}).call(this,t("_process"),t("buffer").Buffer)},{_process:188,buffer:60,"pako/lib/zlib/constants":177,"pako/lib/zlib/deflate.js":179,"pako/lib/zlib/inflate.js":181,"pako/lib/zlib/messages":183,"pako/lib/zlib/zstream":185}],58:[function(t,e,n){(function(e,r){function i(t,e,n){function i(){for(var e;null!==(e=t.read());)a.push(e),s+=e.length;t.once("readable",i)}function o(){var e=r.concat(a,s);a=[],n(null,e),t.close()}var a=[],s=0;t.on("error",function(e){t.removeListener("end",o),t.removeListener("readable",i),n(e)}),t.on("end",o),t.end(e),i()}function o(t,e){if("string"==typeof e&&(e=new r(e)),!r.isBuffer(e))throw new TypeError("Not a string or buffer");var n=g.Z_FINISH;return t._processChunk(e,n)}function a(t){if(!(this instanceof a))return new a(t);d.call(this,t,g.DEFLATE)}function s(t){if(!(this instanceof s))return new s(t);d.call(this,t,g.INFLATE)}function u(t){if(!(this instanceof u))return new u(t);d.call(this,t,g.GZIP)}function c(t){if(!(this instanceof c))return new c(t);d.call(this,t,g.GUNZIP)}function l(t){if(!(this instanceof l))return new l(t);d.call(this,t,g.DEFLATERAW)}function h(t){if(!(this instanceof h))return new h(t);d.call(this,t,g.INFLATERAW)}function f(t){if(!(this instanceof f))return new f(t);d.call(this,t,g.UNZIP)}function d(t,e){if(this._opts=t=t||{},this._chunkSize=t.chunkSize||n.Z_DEFAULT_CHUNK,p.call(this,t),t.flush&&t.flush!==g.Z_NO_FLUSH&&t.flush!==g.Z_PARTIAL_FLUSH&&t.flush!==g.Z_SYNC_FLUSH&&t.flush!==g.Z_FULL_FLUSH&&t.flush!==g.Z_FINISH&&t.flush!==g.Z_BLOCK)throw new Error("Invalid flush flag: "+t.flush);if(this._flushFlag=t.flush||g.Z_NO_FLUSH,t.chunkSize&&(t.chunkSize<n.Z_MIN_CHUNK||t.chunkSize>n.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBits<n.Z_MIN_WINDOWBITS||t.windowBits>n.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.level<n.Z_MIN_LEVEL||t.level>n.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevel<n.Z_MIN_MEMLEVEL||t.memLevel>n.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=n.Z_FILTERED&&t.strategy!=n.Z_HUFFMAN_ONLY&&t.strategy!=n.Z_RLE&&t.strategy!=n.Z_FIXED&&t.strategy!=n.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!r.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new g.Zlib(e);var i=this;this._hadError=!1,this._binding.onerror=function(t,e){i._binding=null,i._hadError=!0;var r=new Error(t);r.errno=e,r.code=n.codes[e],i.emit("error",r)};var o=n.Z_DEFAULT_COMPRESSION;"number"==typeof t.level&&(o=t.level);var a=n.Z_DEFAULT_STRATEGY;"number"==typeof t.strategy&&(a=t.strategy),this._binding.init(t.windowBits||n.Z_DEFAULT_WINDOWBITS,o,t.memLevel||n.Z_DEFAULT_MEMLEVEL,a,t.dictionary),this._buffer=new r(this._chunkSize),this._offset=0,this._closed=!1,this._level=o,this._strategy=a,this.once("end",this.close)}var p=t("_stream_transform"),g=t("./binding"),_=t("util"),y=t("assert").ok;g.Z_MIN_WINDOWBITS=8,g.Z_MAX_WINDOWBITS=15,g.Z_DEFAULT_WINDOWBITS=15,g.Z_MIN_CHUNK=64,g.Z_MAX_CHUNK=1/0,g.Z_DEFAULT_CHUNK=16384,g.Z_MIN_MEMLEVEL=1,g.Z_MAX_MEMLEVEL=9,g.Z_DEFAULT_MEMLEVEL=8,g.Z_MIN_LEVEL=-1,g.Z_MAX_LEVEL=9,g.Z_DEFAULT_LEVEL=g.Z_DEFAULT_COMPRESSION,Object.keys(g).forEach(function(t){t.match(/^Z/)&&(n[t]=g[t])}),n.codes={Z_OK:g.Z_OK,Z_STREAM_END:g.Z_STREAM_END,Z_NEED_DICT:g.Z_NEED_DICT,Z_ERRNO:g.Z_ERRNO,Z_STREAM_ERROR:g.Z_STREAM_ERROR,Z_DATA_ERROR:g.Z_DATA_ERROR,Z_MEM_ERROR:g.Z_MEM_ERROR,Z_BUF_ERROR:g.Z_BUF_ERROR,Z_VERSION_ERROR:g.Z_VERSION_ERROR},Object.keys(n.codes).forEach(function(t){n.codes[n.codes[t]]=t}),n.Deflate=a,n.Inflate=s,n.Gzip=u,n.Gunzip=c,n.DeflateRaw=l,n.InflateRaw=h,n.Unzip=f,n.createDeflate=function(t){return new a(t)},n.createInflate=function(t){return new s(t)},n.createDeflateRaw=function(t){return new l(t)},n.createInflateRaw=function(t){return new h(t)},n.createGzip=function(t){return new u(t)},n.createGunzip=function(t){return new c(t)},n.createUnzip=function(t){return new f(t)},n.deflate=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new a(e),t,n)},n.deflateSync=function(t,e){return o(new a(e),t)},n.gzip=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new u(e),t,n)},n.gzipSync=function(t,e){return o(new u(e),t)},n.deflateRaw=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new l(e),t,n)},n.deflateRawSync=function(t,e){return o(new l(e),t)},n.unzip=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new f(e),t,n)},n.unzipSync=function(t,e){return o(new f(e),t)},n.inflate=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new s(e),t,n)},n.inflateSync=function(t,e){return o(new s(e),t)},n.gunzip=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new c(e),t,n)},n.gunzipSync=function(t,e){return o(new c(e),t)},n.inflateRaw=function(t,e,n){return"function"==typeof e&&(n=e,e={}),i(new h(e),t,n)},n.inflateRawSync=function(t,e){return o(new h(e),t)},_.inherits(d,p),d.prototype.params=function(t,r,i){if(t<n.Z_MIN_LEVEL||t>n.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+t);if(r!=n.Z_FILTERED&&r!=n.Z_HUFFMAN_ONLY&&r!=n.Z_RLE&&r!=n.Z_FIXED&&r!=n.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==t||this._strategy!==r){var o=this;this.flush(g.Z_SYNC_FLUSH,function(){o._binding.params(t,r),o._hadError||(o._level=t,o._strategy=r,i&&i())})}else e.nextTick(i)},d.prototype.reset=function(){return this._binding.reset()},d.prototype._flush=function(t){this._transform(new r(0),"",t)},d.prototype.flush=function(t,n){var i=this._writableState;if(("function"==typeof t||void 0===t&&!n)&&(n=t,t=g.Z_FULL_FLUSH),i.ended)n&&e.nextTick(n);else if(i.ending)n&&this.once("end",n);else if(i.needDrain){var o=this;this.once("drain",function(){o.flush(n)})}else this._flushFlag=t,this.write(new r(0),"",n)},d.prototype.close=function(t){if(t&&e.nextTick(t),!this._closed){this._closed=!0,this._binding.close();var n=this;e.nextTick(function(){n.emit("close")})}},d.prototype._transform=function(t,e,n){var i,o=this._writableState,a=(o.ending||o.ended)&&(!t||o.length===t.length);if(null===!t&&!r.isBuffer(t))return n(new Error("invalid input"));a?i=g.Z_FINISH:(i=this._flushFlag,t.length>=o.length&&(this._flushFlag=this._opts.flush||g.Z_NO_FLUSH));this._processChunk(t,i,n)},d.prototype._processChunk=function(t,e,n){function i(l,d){if(!u._hadError){var p=a-d;if(y(p>=0,"have should not go down"),p>0){var g=u._buffer.slice(u._offset,u._offset+p);u._offset+=p,c?u.push(g):(h.push(g),f+=g.length)}if((0===d||u._offset>=u._chunkSize)&&(a=u._chunkSize,u._offset=0,u._buffer=new r(u._chunkSize)),0===d){if(s+=o-l,o=l,!c)return!0;var _=u._binding.write(e,t,s,o,u._buffer,u._offset,u._chunkSize);return _.callback=i,void(_.buffer=t)}if(!c)return!1;n()}}var o=t&&t.length,a=this._chunkSize-this._offset,s=0,u=this,c="function"==typeof n;if(!c){var l,h=[],f=0;this.on("error",function(t){l=t});do{var d=this._binding.writeSync(e,t,s,o,this._buffer,this._offset,a)}while(!this._hadError&&i(d[0],d[1]));if(this._hadError)throw l;var p=r.concat(h,f);return this.close(),p}var g=this._binding.write(e,t,s,o,this._buffer,this._offset,a);g.buffer=t,g.callback=i},_.inherits(a,d),_.inherits(s,d),_.inherits(u,d),_.inherits(c,d),_.inherits(l,d),_.inherits(h,d),_.inherits(f,d)}).call(this,t("_process"),t("buffer").Buffer)},{"./binding":57,_process:188,_stream_transform:197,assert:22,buffer:60,util:224}],59:[function(t,e,n){arguments[4][56][0].apply(n,arguments)},{dup:56}],60:[function(t,e,n){(function(e){"use strict";function r(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,e){if(r()<e)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=o.prototype:(null===t&&(t=new o(e)),t.length=e),t}function o(t,e,n){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return a(this,t,e,n)}function a(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?f(t,e,n,r):"string"==typeof e?l(t,e,n):d(t,e)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function u(t,e,n,r){return s(e),e<=0?i(t,e):void 0!==n?"string"==typeof r?i(t,e).fill(n,r):i(t,e).fill(n):i(t,e)}function c(t,e){if(s(e),t=i(t,e<0?0:0|p(e)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function l(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!o.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|g(e,n),a=(t=i(t,r)).write(e,n);return a!==r&&(t=t.slice(0,a)),t}function h(t,e){var n=e.length<0?0:0|p(e.length);t=i(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function f(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r),o.TYPED_ARRAY_SUPPORT?(t=e).__proto__=o.prototype:t=h(t,e),t}function d(t,e){if(o.isBuffer(e)){var n=0|p(e.length);return 0===(t=i(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||V(e.length)?i(t,0):h(t,e);if("Buffer"===e.type&&J(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(t){if(t>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function g(t,e){if(o.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(t).length;default:if(r)return G(t).length;e=(""+e).toLowerCase(),r=!0}}function _(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,n);case"utf8":case"utf-8":return A(this,e,n);case"ascii":return j(this,e,n);case"latin1":case"binary":return O(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function m(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=o.from(e,r)),o.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"==typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;c<s;c++)if(o(t,c)===o(e,-1===l?0:c-l)){if(-1===l&&(l=c),c-l+1===u)return l*a}else-1!==l&&(c-=c-l),l=-1}else for(n+u>s&&(n=s-u),c=n;c>=0;c--){for(var h=!0,f=0;f<u;f++)if(o(t,c+f)!==o(e,f)){h=!1;break}if(h)return c}return-1}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function w(t,e,n,r){return Y(G(e,t.length-n),t,n,r)}function x(t,e,n,r){return Y(q(e),t,n,r)}function S(t,e,n,r){return x(t,e,n,r)}function k(t,e,n,r){return Y(W(e),t,n,r)}function C(t,e,n,r){return Y(Z(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,n))}function A(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=n){var u,c,l,h;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(u=t[i+1]))&&(h=(31&o)<<6|63&u)>127&&(a=h);break;case 3:u=t[i+1],c=t[i+2],128==(192&u)&&128==(192&c)&&(h=(15&o)<<12|(63&u)<<6|63&c)>2047&&(h<55296||h>57343)&&(a=h);break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(h=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&h<1114112&&(a=h)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return P(r)}function P(t){var e=t.length;if(e<=Q)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=Q));return n}function j(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function O(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function I(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=H(t[o]);return i}function T(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function L(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,n,r,i,a){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function N(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function R(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function M(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(t,e,n,r,i){return i||M(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,n,r,23,4),n+4}function D(t,e,n,r,i){return i||M(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,n,r,52,8),n+8}function z(t){if((t=U(t).replace($,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function U(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function G(t,e){e=e||1/0;for(var n,r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}function Z(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}function W(t){return K.toByteArray(z(t))}function Y(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function V(t){return t!==t}var K=t("base64-js"),X=t("ieee754"),J=t("isarray");n.Buffer=o,n.SlowBuffer=function(t){return+t!=t&&(t=0),o.alloc(+t)},n.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),n.kMaxLength=r(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,e,n){return a(null,t,e,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,e,n){return u(null,t,e,n)},o.allocUnsafe=function(t){return c(null,t)},o.allocUnsafeSlow=function(t){return c(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,a=Math.min(n,r);i<a;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(t,e){if(!J(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=o.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!o.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},o.byteLength=g,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},o.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},o.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},o.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):_.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t,e,n,r,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var a=i-r,s=n-e,u=Math.min(a,s),c=this.slice(r,i),l=t.slice(e,n),h=0;h<u;++h)if(c[h]!==l[h]){a=c[h],s=l[h];break}return a<s?-1:s<a?1:0},o.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},o.prototype.indexOf=function(t,e,n){return m(this,t,e,n,!0)},o.prototype.lastIndexOf=function(t,e,n){return m(this,t,e,n,!1)},o.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return x(this,t,e,n);case"latin1":case"binary":return S(this,t,e,n);case"base64":return k(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r;if(o.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=o.prototype;else{var i=e-t;r=new o(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+t]}return r},o.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},o.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},o.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},o.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||L(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(t,e){return e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||L(t,4,this.length),X.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),X.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),X.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),X.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||B(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},o.prototype.writeUIntBE=function(t,e,n,r){t=+t,e|=0,n|=0,r||B(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},o.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);B(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},o.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);B(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},o.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,n){return F(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){return F(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){return D(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){return D(this,t,e,!1,n)},o.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,a=r-n;if(this===t&&n<e&&e<r)for(i=a-1;i>=0;--i)t[i+e]=this[i+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},o.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0);var a;if("number"==typeof t)for(a=e;a<n;++a)this[a]=t;else{var s=o.isBuffer(t)?t:G(new o(t,r).toString()),u=s.length;for(a=0;a<n-e;++a)this[a+e]=s[a%u]}return this};var $=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":45,ieee754:166,isarray:169}],61:[function(t,e,n){(function(t){var n=function(){"use strict";function e(n,i,o,a){function s(n,o){if(null===n)return null;if(0==o)return n;var h,f;if("object"!=typeof n)return n;if(e.__isArray(n))h=[];else if(e.__isRegExp(n))h=new RegExp(n.source,r(n)),n.lastIndex&&(h.lastIndex=n.lastIndex);else if(e.__isDate(n))h=new Date(n.getTime());else{if(l&&t.isBuffer(n))return h=new t(n.length),n.copy(h),h;void 0===a?(f=Object.getPrototypeOf(n),h=Object.create(f)):(h=Object.create(a),f=a)}if(i){var d=u.indexOf(n);if(-1!=d)return c[d];u.push(n),c.push(h)}for(var p in n){var g;f&&(g=Object.getOwnPropertyDescriptor(f,p)),g&&null==g.set||(h[p]=s(n[p],o-1))}return h}"object"==typeof i&&(o=i.depth,a=i.prototype,i.filter,i=i.circular);var u=[],c=[],l=void 0!==t;return void 0===i&&(i=!0),void 0===o&&(o=1/0),s(n,o)}function n(t){return Object.prototype.toString.call(t)}function r(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return e.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},e.__objToStr=n,e.__isDate=function(t){return"object"==typeof t&&"[object Date]"===n(t)},e.__isArray=function(t){return"object"==typeof t&&"[object Array]"===n(t)},e.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===n(t)},e.__getRegExpFlags=r,e}();"object"==typeof e&&e.localExports&&(e.localExports=n)}).call(this,t("buffer").Buffer)},{buffer:60}],62:[function(t,e,n){t("../../modules/es6.string.iterator"),t("../../modules/es6.array.from"),e.localExports=t("../../modules/_core").Array.from},{"../../modules/_core":82,"../../modules/es6.array.from":143,"../../modules/es6.string.iterator":155}],63:[function(t,e,n){t("../modules/web.dom.iterable"),t("../modules/es6.string.iterator"),e.localExports=t("../modules/core.get-iterator")},{"../modules/core.get-iterator":141,"../modules/es6.string.iterator":155,"../modules/web.dom.iterable":159}],64:[function(t,e,n){t("../modules/web.dom.iterable"),t("../modules/es6.string.iterator"),e.localExports=t("../modules/core.is-iterable")},{"../modules/core.is-iterable":142,"../modules/es6.string.iterator":155,"../modules/web.dom.iterable":159}],65:[function(t,e,n){t("../../modules/es6.object.assign"),e.localExports=t("../../modules/_core").Object.assign},{"../../modules/_core":82,"../../modules/es6.object.assign":145}],66:[function(t,e,n){t("../../modules/es6.object.create");var r=t("../../modules/_core").Object;e.localExports=function(t,e){return r.create(t,e)}},{"../../modules/_core":82,"../../modules/es6.object.create":146}],67:[function(t,e,n){t("../../modules/es6.object.define-properties");var r=t("../../modules/_core").Object;e.localExports=function(t,e){return r.defineProperties(t,e)}},{"../../modules/_core":82,"../../modules/es6.object.define-properties":147}],68:[function(t,e,n){t("../../modules/es6.object.define-property");var r=t("../../modules/_core").Object;e.localExports=function(t,e,n){return r.defineProperty(t,e,n)}},{"../../modules/_core":82,"../../modules/es6.object.define-property":148}],69:[function(t,e,n){t("../../modules/es6.object.freeze"),e.localExports=t("../../modules/_core").Object.freeze},{"../../modules/_core":82,"../../modules/es6.object.freeze":149}],70:[function(t,e,n){t("../../modules/es6.object.get-own-property-descriptor");var r=t("../../modules/_core").Object;e.localExports=function(t,e){return r.getOwnPropertyDescriptor(t,e)}},{"../../modules/_core":82,"../../modules/es6.object.get-own-property-descriptor":150}],71:[function(t,e,n){t("../../modules/es6.object.get-prototype-of"),e.localExports=t("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":82,"../../modules/es6.object.get-prototype-of":151}],72:[function(t,e,n){t("../../modules/es6.object.keys"),e.localExports=t("../../modules/_core").Object.keys},{"../../modules/_core":82,"../../modules/es6.object.keys":152}],73:[function(t,e,n){t("../../modules/es6.object.set-prototype-of"),e.localExports=t("../../modules/_core").Object.setPrototypeOf},{"../../modules/_core":82,"../../modules/es6.object.set-prototype-of":153}],74:[function(t,e,n){t("../../modules/es6.symbol"),t("../../modules/es6.object.to-string"),t("../../modules/es7.symbol.async-iterator"),t("../../modules/es7.symbol.observable"),e.localExports=t("../../modules/_core").Symbol},{"../../modules/_core":82,"../../modules/es6.object.to-string":154,"../../modules/es6.symbol":156,"../../modules/es7.symbol.async-iterator":157,"../../modules/es7.symbol.observable":158}],75:[function(t,e,n){t("../../modules/es6.string.iterator"),t("../../modules/web.dom.iterable"),e.localExports=t("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":138,"../../modules/es6.string.iterator":155,"../../modules/web.dom.iterable":159}],76:[function(t,e,n){e.localExports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},{}],77:[function(t,e,n){e.localExports=function(){}},{}],78:[function(t,e,n){var r=t("./_is-object");e.localExports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},{"./_is-object":100}],79:[function(t,e,n){var r=t("./_to-iobject"),i=t("./_to-length"),o=t("./_to-index");e.localExports=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),l=o(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},{"./_to-index":130,"./_to-iobject":132,"./_to-length":133}],80:[function(t,e,n){var r=t("./_cof"),i=t("./_wks")("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};e.localExports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},{"./_cof":81,"./_wks":139}],81:[function(t,e,n){var r={}.toString;e.localExports=function(t){return r.call(t).slice(8,-1)}},{}],82:[function(t,e,n){var r,i=e.localExports={version:"2.4.0"};"number"==typeof r&&(r=i)},{}],83:[function(t,e,n){"use strict";var r=t("./_object-dp"),i=t("./_property-desc");e.localExports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},{"./_object-dp":112,"./_property-desc":123}],84:[function(t,e,n){var r=t("./_a-function");e.localExports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},{"./_a-function":76}],85:[function(t,e,n){e.localExports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},{}],86:[function(t,e,n){e.localExports=!t("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":91}],87:[function(t,e,n){var r=t("./_is-object"),i=t("./_global").document,o=r(i)&&r(i.createElement);e.localExports=function(t){return o?i.createElement(t):{}}},{"./_global":92,"./_is-object":100}],88:[function(t,e,n){e.localExports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],89:[function(t,e,n){var r=t("./_object-keys"),i=t("./_object-gops"),o=t("./_object-pie");e.localExports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),u=o.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},{"./_object-gops":117,"./_object-keys":120,"./_object-pie":121}],90:[function(t,e,n){var r=t("./_global"),i=t("./_core"),o=t("./_ctx"),a=t("./_hide"),s=function(t,e,n){var u,c,l,h=t&s.F,f=t&s.G,d=t&s.S,p=t&s.P,g=t&s.B,_=t&s.W,y=f?i:i[e]||(i[e]={}),m=y.prototype,v=f?r:d?r[e]:(r[e]||{}).prototype;f&&(n=e);for(u in n)(c=!h&&v&&void 0!==v[u])&&u in y||(l=c?v[u]:n[u],y[u]=f&&"function"!=typeof v[u]?n[u]:g&&c?o(l,r):_&&v[u]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):p&&"function"==typeof l?o(Function.call,l):l,p&&((y.virtual||(y.virtual={}))[u]=l,t&s.R&&m&&!m[u]&&a(m,u,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.localExports=s},{"./_core":82,"./_ctx":84,"./_global":92,"./_hide":94}],91:[function(t,e,n){e.localExports=function(t){try{return!!t()}catch(t){return!0}}},{}],92:[function(t,e,n){var r,i=e.localExports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof r&&(r=i)},{}],93:[function(t,e,n){var r={}.hasOwnProperty;e.localExports=function(t,e){return r.call(t,e)}},{}],94:[function(t,e,n){var r=t("./_object-dp"),i=t("./_property-desc");e.localExports=t("./_descriptors")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},{"./_descriptors":86,"./_object-dp":112,"./_property-desc":123}],95:[function(t,e,n){e.localExports=t("./_global").document&&document.documentElement},{"./_global":92}],96:[function(t,e,n){e.localExports=!t("./_descriptors")&&!t("./_fails")(function(){return 7!=Object.defineProperty(t("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":86,"./_dom-create":87,"./_fails":91}],97:[function(t,e,n){var r=t("./_cof");e.localExports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},{"./_cof":81}],98:[function(t,e,n){var r=t("./_iterators"),i=t("./_wks")("iterator"),o=Array.prototype;e.localExports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},{"./_iterators":106,"./_wks":139}],99:[function(t,e,n){var r=t("./_cof");e.localExports=Array.isArray||function(t){return"Array"==r(t)}},{"./_cof":81}],100:[function(t,e,n){e.localExports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},{}],101:[function(t,e,n){var r=t("./_an-object");e.localExports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},{"./_an-object":78}],102:[function(t,e,n){"use strict";var r=t("./_object-create"),i=t("./_property-desc"),o=t("./_set-to-string-tag"),a={};t("./_hide")(a,t("./_wks")("iterator"),function(){return this}),e.localExports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},{"./_hide":94,"./_object-create":111,"./_property-desc":123,"./_set-to-string-tag":126,"./_wks":139}],103:[function(t,e,n){"use strict";var r=t("./_library"),i=t("./_export"),o=t("./_redefine"),a=t("./_hide"),s=t("./_has"),u=t("./_iterators"),c=t("./_iter-create"),l=t("./_set-to-string-tag"),h=t("./_object-gpo"),f=t("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};e.localExports=function(t,e,n,g,_,y,m){c(n,e,g);var v,b,w,x=function(t){if(!d&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",k="values"==_,C=!1,E=t.prototype,A=E[f]||E["@@iterator"]||_&&E[_],P=A||x(_),j=_?k?x("entries"):P:void 0,O="Array"==e?E.entries||A:A;if(O&&(w=h(O.call(new t)))!==Object.prototype&&(l(w,S,!0),r||s(w,f)||a(w,f,p)),k&&A&&"values"!==A.name&&(C=!0,P=function(){return A.call(this)}),r&&!m||!d&&!C&&E[f]||a(E,f,P),u[e]=P,u[S]=p,_)if(v={values:k?P:x("values"),keys:y?P:x("keys"),entries:j},m)for(b in v)b in E||o(E,b,v[b]);else i(i.P+i.F*(d||C),e,v);return v}},{"./_export":90,"./_has":93,"./_hide":94,"./_iter-create":102,"./_iterators":106,"./_library":108,"./_object-gpo":118,"./_redefine":124,"./_set-to-string-tag":126,"./_wks":139}],104:[function(t,e,n){var r=t("./_wks")("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}e.localExports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},{"./_wks":139}],105:[function(t,e,n){e.localExports=function(t,e){return{value:e,done:!!t}}},{}],106:[function(t,e,n){e.localExports={}},{}],107:[function(t,e,n){var r=t("./_object-keys"),i=t("./_to-iobject");e.localExports=function(t,e){for(var n,o=i(t),a=r(o),s=a.length,u=0;s>u;)if(o[n=a[u++]]===e)return n}},{"./_object-keys":120,"./_to-iobject":132}],108:[function(t,e,n){e.localExports=!0},{}],109:[function(t,e,n){var r=t("./_uid")("meta"),i=t("./_is-object"),o=t("./_has"),a=t("./_object-dp").f,s=0,u=Object.isExtensible||function(){return!0},c=!t("./_fails")(function(){return u(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},h=e.localExports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return c&&h.NEED&&u(t)&&!o(t,r)&&l(t),t}}},{"./_fails":91,"./_has":93,"./_is-object":100,"./_object-dp":112,"./_uid":136}],110:[function(t,e,n){"use strict";var r=t("./_object-keys"),i=t("./_object-gops"),o=t("./_object-pie"),a=t("./_to-object"),s=t("./_iobject"),u=Object.assign;e.localExports=!u||t("./_fails")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=a(t),u=arguments.length,c=1,l=i.f,h=o.f;u>c;)for(var f,d=s(arguments[c++]),p=l?r(d).concat(l(d)):r(d),g=p.length,_=0;g>_;)h.call(d,f=p[_++])&&(n[f]=d[f]);return n}:u},{"./_fails":91,"./_iobject":97,"./_object-gops":117,"./_object-keys":120,"./_object-pie":121,"./_to-object":134}],111:[function(t,e,n){var r=t("./_an-object"),i=t("./_object-dps"),o=t("./_enum-bug-keys"),a=t("./_shared-key")("IE_PROTO"),s=function(){},u=function(){var e,n=t("./_dom-create")("iframe"),r=o.length;for(n.style.display="none",t("./_html").appendChild(n),n.src="javascript:",(e=n.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.localExports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=u(),void 0===e?n:i(n,e)}},{"./_an-object":78,"./_dom-create":87,"./_enum-bug-keys":88,"./_html":95,"./_object-dps":113,"./_shared-key":127}],112:[function(t,e,n){var r=t("./_an-object"),i=t("./_ie8-dom-define"),o=t("./_to-primitive"),a=Object.defineProperty;n.f=t("./_descriptors")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},{"./_an-object":78,"./_descriptors":86,"./_ie8-dom-define":96,"./_to-primitive":135}],113:[function(t,e,n){var r=t("./_object-dp"),i=t("./_an-object"),o=t("./_object-keys");e.localExports=t("./_descriptors")?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},{"./_an-object":78,"./_descriptors":86,"./_object-dp":112,"./_object-keys":120}],114:[function(t,e,n){var r=t("./_object-pie"),i=t("./_property-desc"),o=t("./_to-iobject"),a=t("./_to-primitive"),s=t("./_has"),u=t("./_ie8-dom-define"),c=Object.getOwnPropertyDescriptor;n.f=t("./_descriptors")?c:function(t,e){if(t=o(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},{"./_descriptors":86,"./_has":93,"./_ie8-dom-define":96,"./_object-pie":121,"./_property-desc":123,"./_to-iobject":132,"./_to-primitive":135}],115:[function(t,e,n){var r=t("./_to-iobject"),i=t("./_object-gopn").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return i(t)}catch(t){return a.slice()}};e.localExports.f=function(t){return a&&"[object Window]"==o.call(t)?s(t):i(r(t))}},{"./_object-gopn":116,"./_to-iobject":132}],116:[function(t,e,n){var r=t("./_object-keys-internal"),i=t("./_enum-bug-keys").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},{"./_enum-bug-keys":88,"./_object-keys-internal":119}],117:[function(t,e,n){n.f=Object.getOwnPropertySymbols},{}],118:[function(t,e,n){var r=t("./_has"),i=t("./_to-object"),o=t("./_shared-key")("IE_PROTO"),a=Object.prototype;e.localExports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},{"./_has":93,"./_shared-key":127,"./_to-object":134}],119:[function(t,e,n){var r=t("./_has"),i=t("./_to-iobject"),o=t("./_array-includes")(!1),a=t("./_shared-key")("IE_PROTO");e.localExports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},{"./_array-includes":79,"./_has":93,"./_shared-key":127,"./_to-iobject":132}],120:[function(t,e,n){var r=t("./_object-keys-internal"),i=t("./_enum-bug-keys");e.localExports=Object.keys||function(t){return r(t,i)}},{"./_enum-bug-keys":88,"./_object-keys-internal":119}],121:[function(t,e,n){n.f={}.propertyIsEnumerable},{}],122:[function(t,e,n){var r=t("./_export"),i=t("./_core"),o=t("./_fails");e.localExports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},{"./_core":82,"./_export":90,"./_fails":91}],123:[function(t,e,n){e.localExports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},{}],124:[function(t,e,n){e.localExports=t("./_hide")},{"./_hide":94}],125:[function(t,e,n){var r=t("./_is-object"),i=t("./_an-object"),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};e.localExports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,r){try{(r=t("./_ctx")(Function.call,t("./_object-gopd").f(Object.prototype,"__proto__").set,2))(e,[]),n=!(e instanceof Array)}catch(t){n=!0}return function(t,e){return o(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:o}},{"./_an-object":78,"./_ctx":84,"./_is-object":100,"./_object-gopd":114}],126:[function(t,e,n){var r=t("./_object-dp").f,i=t("./_has"),o=t("./_wks")("toStringTag");e.localExports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},{"./_has":93,"./_object-dp":112,"./_wks":139}],127:[function(t,e,n){var r=t("./_shared")("keys"),i=t("./_uid");e.localExports=function(t){return r[t]||(r[t]=i(t))}},{"./_shared":128,"./_uid":136}],128:[function(t,e,n){var r=t("./_global"),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.localExports=function(t){return i[t]||(i[t]={})}},{"./_global":92}],129:[function(t,e,n){var r=t("./_to-integer"),i=t("./_defined");e.localExports=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},{"./_defined":85,"./_to-integer":131}],130:[function(t,e,n){var r=t("./_to-integer"),i=Math.max,o=Math.min;e.localExports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},{"./_to-integer":131}],131:[function(t,e,n){var r=Math.ceil,i=Math.floor;e.localExports=function(t){return isNaN(t=+t)?0:(t>0?i:r)(t)}},{}],132:[function(t,e,n){var r=t("./_iobject"),i=t("./_defined");e.localExports=function(t){return r(i(t))}},{"./_defined":85,"./_iobject":97}],133:[function(t,e,n){var r=t("./_to-integer"),i=Math.min;e.localExports=function(t){return t>0?i(r(t),9007199254740991):0}},{"./_to-integer":131}],134:[function(t,e,n){var r=t("./_defined");e.localExports=function(t){return Object(r(t))}},{"./_defined":85}],135:[function(t,e,n){var r=t("./_is-object");e.localExports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":100}],136:[function(t,e,n){var r=0,i=Math.random();e.localExports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+i).toString(36))}},{}],137:[function(t,e,n){var r=t("./_global"),i=t("./_core"),o=t("./_library"),a=t("./_wks-ext"),s=t("./_object-dp").f;e.localExports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},{"./_core":82,"./_global":92,"./_library":108,"./_object-dp":112,"./_wks-ext":138}],138:[function(t,e,n){n.f=t("./_wks")},{"./_wks":139}],139:[function(t,e,n){var r=t("./_shared")("wks"),i=t("./_uid"),o=t("./_global").Symbol,a="function"==typeof o;(e.localExports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},{"./_global":92,"./_shared":128,"./_uid":136}],140:[function(t,e,n){var r=t("./_classof"),i=t("./_wks")("iterator"),o=t("./_iterators");e.localExports=t("./_core").getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},{"./_classof":80,"./_core":82,"./_iterators":106,"./_wks":139}],141:[function(t,e,n){var r=t("./_an-object"),i=t("./core.get-iterator-method");e.localExports=t("./_core").getIterator=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},{"./_an-object":78,"./_core":82,"./core.get-iterator-method":140}],142:[function(t,e,n){var r=t("./_classof"),i=t("./_wks")("iterator"),o=t("./_iterators");e.localExports=t("./_core").isIterable=function(t){var e=Object(t);return void 0!==e[i]||"@@iterator"in e||o.hasOwnProperty(r(e))}},{"./_classof":80,"./_core":82,"./_iterators":106,"./_wks":139}],143:[function(t,e,n){"use strict";var r=t("./_ctx"),i=t("./_export"),o=t("./_to-object"),a=t("./_iter-call"),s=t("./_is-array-iter"),u=t("./_to-length"),c=t("./_create-property"),l=t("./core.get-iterator-method");i(i.S+i.F*!t("./_iter-detect")(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,h,f=o(t),d="function"==typeof this?this:Array,p=arguments.length,g=p>1?arguments[1]:void 0,_=void 0!==g,y=0,m=l(f);if(_&&(g=r(g,p>2?arguments[2]:void 0,2)),void 0==m||d==Array&&s(m))for(n=new d(e=u(f.length));e>y;y++)c(n,y,_?g(f[y],y):f[y]);else for(h=m.call(f),n=new d;!(i=h.next()).done;y++)c(n,y,_?a(h,g,[i.value,y],!0):i.value);return n.length=y,n}})},{"./_create-property":83,"./_ctx":84,"./_export":90,"./_is-array-iter":98,"./_iter-call":101,"./_iter-detect":104,"./_to-length":133,"./_to-object":134,"./core.get-iterator-method":140}],144:[function(t,e,n){"use strict";var r=t("./_add-to-unscopables"),i=t("./_iter-step"),o=t("./_iterators"),a=t("./_to-iobject");e.localExports=t("./_iter-define")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},{"./_add-to-unscopables":77,"./_iter-define":103,"./_iter-step":105,"./_iterators":106,"./_to-iobject":132}],145:[function(t,e,n){var r=t("./_export");r(r.S+r.F,"Object",{assign:t("./_object-assign")})},{"./_export":90,"./_object-assign":110}],146:[function(t,e,n){var r=t("./_export");r(r.S,"Object",{create:t("./_object-create")})},{"./_export":90,"./_object-create":111}],147:[function(t,e,n){var r=t("./_export");r(r.S+r.F*!t("./_descriptors"),"Object",{defineProperties:t("./_object-dps")})},{"./_descriptors":86,"./_export":90,"./_object-dps":113}],148:[function(t,e,n){var r=t("./_export");r(r.S+r.F*!t("./_descriptors"),"Object",{defineProperty:t("./_object-dp").f})},{"./_descriptors":86,"./_export":90,"./_object-dp":112}],149:[function(t,e,n){var r=t("./_is-object"),i=t("./_meta").onFreeze;t("./_object-sap")("freeze",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},{"./_is-object":100,"./_meta":109,"./_object-sap":122}],150:[function(t,e,n){var r=t("./_to-iobject"),i=t("./_object-gopd").f;t("./_object-sap")("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},{"./_object-gopd":114,"./_object-sap":122,"./_to-iobject":132}],151:[function(t,e,n){var r=t("./_to-object"),i=t("./_object-gpo");t("./_object-sap")("getPrototypeOf",function(){return function(t){return i(r(t))}})},{"./_object-gpo":118,"./_object-sap":122,"./_to-object":134}],152:[function(t,e,n){var r=t("./_to-object"),i=t("./_object-keys");t("./_object-sap")("keys",function(){return function(t){return i(r(t))}})},{"./_object-keys":120,"./_object-sap":122,"./_to-object":134}],153:[function(t,e,n){var r=t("./_export");r(r.S,"Object",{setPrototypeOf:t("./_set-proto").set})},{"./_export":90,"./_set-proto":125}],154:[function(t,e,n){arguments[4][56][0].apply(n,arguments)},{dup:56}],155:[function(t,e,n){"use strict";var r=t("./_string-at")(!0);t("./_iter-define")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},{"./_iter-define":103,"./_string-at":129}],156:[function(t,e,n){"use strict";var r=t("./_global"),i=t("./_has"),o=t("./_descriptors"),a=t("./_export"),s=t("./_redefine"),u=t("./_meta").KEY,c=t("./_fails"),l=t("./_shared"),h=t("./_set-to-string-tag"),f=t("./_uid"),d=t("./_wks"),p=t("./_wks-ext"),g=t("./_wks-define"),_=t("./_keyof"),y=t("./_enum-keys"),m=t("./_is-array"),v=t("./_an-object"),b=t("./_to-iobject"),w=t("./_to-primitive"),x=t("./_property-desc"),S=t("./_object-create"),k=t("./_object-gopn-ext"),C=t("./_object-gopd"),E=t("./_object-dp"),A=t("./_object-keys"),P=C.f,j=E.f,O=k.f,I=r.Symbol,T=r.JSON,L=T&&T.stringify,B=d("_hidden"),N=d("toPrimitive"),R={}.propertyIsEnumerable,M=l("symbol-registry"),F=l("symbols"),D=l("op-symbols"),z=Object.prototype,U="function"==typeof I,H=r.QObject,G=!H||!H.prototype||!H.prototype.findChild,q=o&&c(function(){return 7!=S(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=P(z,e);r&&delete z[e],j(t,e,n),r&&t!==z&&j(z,e,r)}:j,Z=function(t){var e=F[t]=S(I.prototype);return e._k=t,e},W=U&&"symbol"==typeof I.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof I},Y=function(t,e,n){return t===z&&Y(D,e,n),v(t),e=w(e,!0),v(n),i(F,e)?(n.enumerable?(i(t,B)&&t[B][e]&&(t[B][e]=!1),n=S(n,{enumerable:x(0,!1)})):(i(t,B)||j(t,B,x(1,{})),t[B][e]=!0),q(t,e,n)):j(t,e,n)},V=function(t,e){v(t);for(var n,r=y(e=b(e)),i=0,o=r.length;o>i;)Y(t,n=r[i++],e[n]);return t},K=function(t){var e=R.call(this,t=w(t,!0));return!(this===z&&i(F,t)&&!i(D,t))&&(!(e||!i(this,t)||!i(F,t)||i(this,B)&&this[B][t])||e)},X=function(t,e){if(t=b(t),e=w(e,!0),t!==z||!i(F,e)||i(D,e)){var n=P(t,e);return!n||!i(F,e)||i(t,B)&&t[B][e]||(n.enumerable=!0),n}},J=function(t){for(var e,n=O(b(t)),r=[],o=0;n.length>o;)i(F,e=n[o++])||e==B||e==u||r.push(e);return r},Q=function(t){for(var e,n=t===z,r=O(n?D:b(t)),o=[],a=0;r.length>a;)!i(F,e=r[a++])||n&&!i(z,e)||o.push(F[e]);return o};U||(s((I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===z&&e.call(D,n),i(this,B)&&i(this[B],t)&&(this[B][t]=!1),q(this,t,x(1,n))};return o&&G&&q(z,t,{configurable:!0,set:e}),Z(t)}).prototype,"toString",function(){return this._k}),C.f=X,E.f=Y,t("./_object-gopn").f=k.f=J,t("./_object-pie").f=K,t("./_object-gops").f=Q,o&&!t("./_library")&&s(z,"propertyIsEnumerable",K,!0),p.f=function(t){return Z(d(t))}),a(a.G+a.W+a.F*!U,{Symbol:I});for(var $="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;$.length>tt;)d($[tt++]);for(var $=A(d.store),tt=0;$.length>tt;)g($[tt++]);a(a.S+a.F*!U,"Symbol",{for:function(t){return i(M,t+="")?M[t]:M[t]=I(t)},keyFor:function(t){if(W(t))return _(M,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){G=!0},useSimple:function(){G=!1}}),a(a.S+a.F*!U,"Object",{create:function(t,e){return void 0===e?S(t):V(S(t),e)},defineProperty:Y,defineProperties:V,getOwnPropertyDescriptor:X,getOwnPropertyNames:J,getOwnPropertySymbols:Q}),T&&a(a.S+a.F*(!U||c(function(){var t=I();return"[null]"!=L([t])||"{}"!=L({a:t})||"{}"!=L(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!W(t)){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);return"function"==typeof(e=r[1])&&(n=e),!n&&m(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!W(e))return e}),r[1]=e,L.apply(T,r)}}}),I.prototype[N]||t("./_hide")(I.prototype,N,I.prototype.valueOf),h(I,"Symbol"),h(Math,"Math",!0),h(r.JSON,"JSON",!0)},{"./_an-object":78,"./_descriptors":86,"./_enum-keys":89,"./_export":90,"./_fails":91,"./_global":92,"./_has":93,"./_hide":94,"./_is-array":99,"./_keyof":107,"./_library":108,"./_meta":109,"./_object-create":111,"./_object-dp":112,"./_object-gopd":114,"./_object-gopn":116,"./_object-gopn-ext":115,"./_object-gops":117,"./_object-keys":120,"./_object-pie":121,"./_property-desc":123,"./_redefine":124,"./_set-to-string-tag":126,"./_shared":128,"./_to-iobject":132,"./_to-primitive":135,"./_uid":136,"./_wks":139,"./_wks-define":137,"./_wks-ext":138}],157:[function(t,e,n){t("./_wks-define")("asyncIterator")},{"./_wks-define":137}],158:[function(t,e,n){t("./_wks-define")("observable")},{"./_wks-define":137}],159:[function(t,e,n){t("./es6.array.iterator");for(var r=t("./_global"),i=t("./_hide"),o=t("./_iterators"),a=t("./_wks")("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=s[u],l=r[c],h=l&&l.prototype;h&&!h[a]&&i(h,a,c),o[c]=o.Array}},{"./_global":92,"./_hide":94,"./_iterators":106,"./_wks":139,"./es6.array.iterator":144}],160:[function(t,e,n){(function(t){function e(t){return Object.prototype.toString.call(t)}n.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},n.isBoolean=function(t){return"boolean"==typeof t},n.isNull=function(t){return null===t},n.isNullOrUndefined=function(t){return null==t},n.isNumber=function(t){return"number"==typeof t},n.isString=function(t){return"string"==typeof t},n.isSymbol=function(t){return"symbol"==typeof t},n.isUndefined=function(t){return void 0===t},n.isRegExp=function(t){return"[object RegExp]"===e(t)},n.isObject=function(t){return"object"==typeof t&&null!==t},n.isDate=function(t){return"[object Date]"===e(t)},n.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},n.isFunction=function(t){return"function"==typeof t},n.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},n.isBuffer=t.isBuffer}).call(this,{isBuffer:t("../../is-buffer/index.js")})},{"../../is-buffer/index.js":168}],164:[function(t,e,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"number"==typeof t}function a(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}e.localExports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,n,r,o,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var l=new Error('Uncaught, unspecified "error" event. ('+e+")");throw l.context=e,l}if(n=this._events[t],s(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),n.apply(this,o)}else if(a(n))for(o=Array.prototype.slice.call(arguments,1),r=(c=n.slice()).length,u=0;u<r;u++)c[u].apply(this,o);return!0},r.prototype.addListener=function(t,e){var n;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?a(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,a(this._events[t])&&!this._events[t].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},r.prototype.removeListener=function(t,e){var n,r,o,s;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],o=n.length,r=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(n)){for(s=o;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],i(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},{}],165:[function(t,e,n){(function(n,r){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t.default:t}function o(t,e,n){var r=n.get;n.get=function(){var t=r.call(this);return m(this,e,{value:t}),t}}function a(t,e){for(var n=[];t<e;)n.push(t++);return n}function s(t){for(var e=t.length,n=0;n<e;){var r=t.charCodeAt(n++);if(55296<=r&&r<=56319&&n<e){var i=t.charCodeAt(n);56320<=i&&i<=57343&&(n++,r=((1023&r)<<10)+(1023&i)+65536)}var o=A.getScript(r);if("Common"!==o&&"Inherited"!==o&&"Unknown"!==o)return st[o]}return st.Unknown}function u(t){for(var e=0;e<t.length;e++){var n=t[e],r=A.getScript(n);if("Common"!==r&&"Inherited"!==r&&"Unknown"!==r)return st[r]}return st.Unknown}function c(t){return"ltr"}function l(t){var e=gt[t];return e||dt}function h(t,e,n,r,i){var o={};return Object.keys(r).forEach(function(t){o[t]=r[t]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(t,e,n)||n},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(t,e,o),o=null),o}function f(t,e,n,r,i){var o={};return Object.keys(r).forEach(function(t){o[t]=r[t]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(t,e,n)||n},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(t,e,o),o=null),o}var d=i(t("restructure")),p=i(t("babel-runtime/core-js/object/get-own-property-descriptor")),g=i(t("babel-runtime/core-js/object/freeze")),_=i(t("babel-runtime/core-js/object/keys")),y=i(t("babel-runtime/helpers/typeof")),m=i(t("babel-runtime/core-js/object/define-property")),v=i(t("babel-runtime/helpers/classCallCheck")),b=i(t("babel-runtime/helpers/createClass")),w=i(t("babel-runtime/core-js/object/get-prototype-of")),x=i(t("babel-runtime/helpers/possibleConstructorReturn")),S=i(t("babel-runtime/helpers/inherits")),k=(i(t("babel-runtime/core-js/object/define-properties")),i(t("babel-runtime/helpers/get"))),C=i(t("babel-runtime/core-js/object/assign")),E=i(t("babel-runtime/helpers/toConsumableArray")),A=i(t("unicode-properties")),P=i(t("babel-runtime/helpers/slicedToArray")),j=i(t("clone")),O={};O.logErrors=!1;var I=[];O.registerFormat=function(t){I.push(t)},O.create=function(t,e){for(var n=0;n<I.length;n++){var r=I[n];if(r.probe(t)){var i=new r(new d.DecodeStream(t));return e?i.getFont(e):i}}throw new Error("Unknown font format")};var T=new d.Struct({firstCode:d.uint16,entryCount:d.uint16,idDelta:d.int16,idRangeOffset:d.uint16}),L=new d.Struct({startCharCode:d.uint32,endCharCode:d.uint32,glyphID:d.uint32}),B=(new d.Struct({startUnicodeValue:d.uint24,additionalCount:d.uint8}),new d.Struct({unicodeValue:d.uint24,glyphID:d.uint16}),new d.VersionedStruct(d.uint16,{0:{length:d.uint16,language:d.uint16,codeMap:new d.LazyArray(d.uint8,256)},2:{length:d.uint16,language:d.uint16,subHeaderKeys:new d.Array(d.uint16,256),subHeaderCount:function(t){return Math.max.apply(Math,t.subHeaderKeys)},subHeaders:new d.LazyArray(T,"subHeaderCount"),glyphIndexArray:new d.LazyArray(d.uint16,"subHeaderCount")},4:{length:d.uint16,language:d.uint16,segCountX2:d.uint16,segCount:function(t){return t.segCountX2>>1},searchRange:d.uint16,entrySelector:d.uint16,rangeShift:d.uint16,endCode:new d.LazyArray(d.uint16,"segCount"),reservedPad:new d.Reserved(d.uint16),startCode:new d.LazyArray(d.uint16,"segCount"),idDelta:new d.LazyArray(d.int16,"segCount"),idRangeOffset:new d.LazyArray(d.uint16,"segCount"),glyphIndexArray:new d.LazyArray(d.uint16,function(t){return(t.length-t._currentOffset)/2})},6:{length:d.uint16,language:d.uint16,firstCode:d.uint16,entryCount:d.uint16,glyphIndices:new d.LazyArray(d.uint16,"entryCount")},8:{reserved:new d.Reserved(d.uint16),length:d.uint32,language:d.uint16,is32:new d.LazyArray(d.uint8,8192),nGroups:d.uint32,groups:new d.LazyArray(L,"nGroups")},10:{reserved:new d.Reserved(d.uint16),length:d.uint32,language:d.uint32,firstCode:d.uint32,entryCount:d.uint32,glyphIndices:new d.LazyArray(d.uint16,"numChars")},12:{reserved:new d.Reserved(d.uint16),length:d.uint32,language:d.uint32,nGroups:d.uint32,groups:new d.LazyArray(L,"nGroups")},13:{reserved:new d.Reserved(d.uint16),length:d.uint32,language:d.uint32,nGroups:d.uint32,groups:new d.LazyArray(L,"nGroups")}})),N=new d.Struct({platformID:d.uint16,encodingID:d.uint16,table:new d.Pointer(d.uint32,B,{type:"parent",lazy:!0})}),R=new d.Struct({version:d.uint16,numSubtables:d.uint16,tables:new d.Array(N,"numSubtables")}),M=new d.Struct({version:d.int32,revision:d.int32,checkSumAdjustment:d.uint32,magicNumber:d.uint32,flags:d.uint16,unitsPerEm:d.uint16,created:new d.Array(d.int32,2),modified:new d.Array(d.int32,2),xMin:d.int16,yMin:d.int16,xMax:d.int16,yMax:d.int16,macStyle:new d.Bitfield(d.uint16,["bold","italic","underline","outline","shadow","condensed","extended"]),lowestRecPPEM:d.uint16,fontDirectionHint:d.int16,indexToLocFormat:d.int16,glyphDataFormat:d.int16}),F=new d.Struct({version:d.int32,ascent:d.int16,descent:d.int16,lineGap:d.int16,advanceWidthMax:d.uint16,minLeftSideBearing:d.int16,minRightSideBearing:d.int16,xMaxExtent:d.int16,caretSlopeRise:d.int16,caretSlopeRun:d.int16,caretOffset:d.int16,reserved:new d.Reserved(d.int16,4),metricDataFormat:d.int16,numberOfMetrics:d.uint16}),D=new d.Struct({advance:d.uint16,bearing:d.int16}),z=new d.Struct({metrics:new d.LazyArray(D,function(t){return t.parent.hhea.numberOfMetrics}),bearings:new d.LazyArray(d.int16,function(t){return t.parent.maxp.numGlyphs-t.parent.hhea.numberOfMetrics})}),U=new d.Struct({version:d.int32,numGlyphs:d.uint16,maxPoints:d.uint16,maxContours:d.uint16,maxComponentPoints:d.uint16,maxComponentContours:d.uint16,maxZones:d.uint16,maxTwilightPoints:d.uint16,maxStorage:d.uint16,maxFunctionDefs:d.uint16,maxInstructionDefs:d.uint16,maxStackElements:d.uint16,maxSizeOfInstructions:d.uint16,maxComponentElements:d.uint16,maxComponentDepth:d.uint16}),H=new d.Struct({platformID:d.uint16,encodingID:d.uint16,languageID:d.uint16,nameID:d.uint16,length:d.uint16,string:new d.Pointer(d.uint16,new d.String("length",function(t){return W[t.platformID][t.encodingID]}),{type:"parent",relativeTo:"parent.stringOffset",allowNull:!1})}),G=new d.Struct({length:d.uint16,tag:new d.Pointer(d.uint16,new d.String("length","utf16be"),{type:"parent",relativeTo:"stringOffset"})}),q=new d.VersionedStruct(d.uint16,{0:{count:d.uint16,stringOffset:d.uint16,records:new d.Array(H,"count")},1:{count:d.uint16,stringOffset:d.uint16,records:new d.Array(H,"count"),langTagCount:d.uint16,langTags:new d.Array(G,"langTagCount")}}),Z=["copyright","fontFamily","fontSubfamily","uniqueSubfamily","fullName","version","postscriptName","trademark","manufacturer","designer","description","vendorURL","designerURL","license","licenseURL",null,"preferredFamily","preferredSubfamily","compatibleFull","sampleText","postscriptCIDFontName","wwsFamilyName","wwsSubfamilyName"],W=[["utf16be","utf16be","utf16be","utf16be","utf16be","utf16be"],["macroman","shift-jis","big5","euc-kr","iso-8859-6","iso-8859-8","macgreek","maccyrillic","symbol","Devanagari","Gurmukhi","Gujarati","Oriya","Bengali","Tamil","Telugu","Kannada","Malayalam","Sinhalese","Burmese","Khmer","macthai","Laotian","Georgian","Armenian","gb-2312-80","Tibetan","Mongolian","Geez","maccyrillic","Vietnamese","Sindhi"],["ascii"],["symbol","utf16be","shift-jis","gb18030","big5","wansung","johab",null,null,null,"ucs-4"]],Y=[[],{0:"English",59:"Pashto",1:"French",60:"Kurdish",2:"German",61:"Kashmiri",3:"Italian",62:"Sindhi",4:"Dutch",63:"Tibetan",5:"Swedish",64:"Nepali",6:"Spanish",65:"Sanskrit",7:"Danish",66:"Marathi",8:"Portuguese",67:"Bengali",9:"Norwegian",68:"Assamese",10:"Hebrew",69:"Gujarati",11:"Japanese",70:"Punjabi",12:"Arabic",71:"Oriya",13:"Finnish",72:"Malayalam",14:"Greek",73:"Kannada",15:"Icelandic",74:"Tamil",16:"Maltese",75:"Telugu",17:"Turkish",76:"Sinhalese",18:"Croatian",77:"Burmese",19:"Chinese (Traditional)",78:"Khmer",20:"Urdu",79:"Lao",21:"Hindi",80:"Vietnamese",22:"Thai",81:"Indonesian",23:"Korean",82:"Tagalong",24:"Lithuanian",83:"Malay (Roman script)",25:"Polish",84:"Malay (Arabic script)",26:"Hungarian",85:"Amharic",27:"Estonian",86:"Tigrinya",28:"Latvian",87:"Galla",29:"Sami",88:"Somali",30:"Faroese",89:"Swahili",31:"Farsi/Persian",90:"Kinyarwanda/Ruanda",32:"Russian",91:"Rundi",33:"Chinese (Simplified)",92:"Nyanja/Chewa",34:"Flemish",93:"Malagasy",35:"Irish Gaelic",94:"Esperanto",36:"Albanian",128:"Welsh",37:"Romanian",129:"Basque",38:"Czech",130:"Catalan",39:"Slovak",131:"Latin",40:"Slovenian",132:"Quenchua",41:"Yiddish",133:"Guarani",42:"Serbian",134:"Aymara",43:"Macedonian",135:"Tatar",44:"Bulgarian",136:"Uighur",45:"Ukrainian",137:"Dzongkha",46:"Byelorussian",138:"Javanese (Roman script)",47:"Uzbek",139:"Sundanese (Roman script)",48:"Kazakh",140:"Galician",49:"Azerbaijani (Cyrillic script)",141:"Afrikaans",50:"Azerbaijani (Arabic script)",142:"Breton",51:"Armenian",143:"Inuktitut",52:"Georgian",144:"Scottish Gaelic",53:"Moldavian",145:"Manx Gaelic",54:"Kirghiz",146:"Irish Gaelic (with dot above)",55:"Tajiki",147:"Tongan",56:"Turkmen",148:"Greek (polytonic)",57:"Mongolian (Mongolian script)",149:"Greenlandic",58:"Mongolian (Cyrillic script)",150:"Azerbaijani (Roman script)"},[],{1078:"Afrikaans",1107:"Khmer",1052:"Albanian",1158:"K'iche",1156:"Alsatian",1159:"Kinyarwanda",1118:"Amharic",1089:"Kiswahili",5121:"Arabic",1111:"Konkani",15361:"Arabic",1042:"Korean",3073:"Arabic",1088:"Kyrgyz",2049:"Arabic",1108:"Lao",11265:"Arabic",1062:"Latvian",13313:"Arabic",1063:"Lithuanian",12289:"Arabic",2094:"Lower Sorbian",4097:"Arabic",1134:"Luxembourgish",6145:"Arabic",1071:"Macedonian (FYROM)",8193:"Arabic",2110:"Malay",16385:"Arabic",1086:"Malay",1025:"Arabic",1100:"Malayalam",10241:"Arabic",1082:"Maltese",7169:"Arabic",1153:"Maori",14337:"Arabic",1146:"Mapudungun",9217:"Arabic",1102:"Marathi",1067:"Armenian",1148:"Mohawk",1101:"Assamese",1104:"Mongolian (Cyrillic)",2092:"Azeri (Cyrillic)",2128:"Mongolian (Traditional)",1068:"Azeri (Latin)",1121:"Nepali",1133:"Bashkir",1044:"Norwegian (Bokmal)",1069:"Basque",2068:"Norwegian (Nynorsk)",1059:"Belarusian",1154:"Occitan",2117:"Bengali",1096:"Odia (formerly Oriya)",1093:"Bengali",1123:"Pashto",8218:"Bosnian (Cyrillic)",1045:"Polish",5146:"Bosnian (Latin)",1046:"Portuguese",1150:"Breton",2070:"Portuguese",1026:"Bulgarian",1094:"Punjabi",1027:"Catalan",1131:"Quechua",3076:"Chinese",2155:"Quechua",5124:"Chinese",3179:"Quechua",2052:"Chinese",1048:"Romanian",4100:"Chinese",1047:"Romansh",1028:"Chinese",1049:"Russian",1155:"Corsican",9275:"Sami (Inari)",1050:"Croatian",4155:"Sami (Lule)",4122:"Croatian (Latin)",5179:"Sami (Lule)",1029:"Czech",3131:"Sami (Northern)",1030:"Danish",1083:"Sami (Northern)",1164:"Dari",2107:"Sami (Northern)",1125:"Divehi",8251:"Sami (Skolt)",2067:"Dutch",6203:"Sami (Southern)",1043:"Dutch",7227:"Sami (Southern)",3081:"English",1103:"Sanskrit",10249:"English",7194:"Serbian (Cyrillic)",4105:"English",3098:"Serbian (Cyrillic)",9225:"English",6170:"Serbian (Latin)",16393:"English",2074:"Serbian (Latin)",6153:"English",1132:"Sesotho sa Leboa",8201:"English",1074:"Setswana",17417:"English",1115:"Sinhala",5129:"English",1051:"Slovak",13321:"English",1060:"Slovenian",18441:"English",11274:"Spanish",7177:"English",16394:"Spanish",11273:"English",13322:"Spanish",2057:"English",9226:"Spanish",1033:"English",5130:"Spanish",12297:"English",7178:"Spanish",1061:"Estonian",12298:"Spanish",1080:"Faroese",17418:"Spanish",1124:"Filipino",4106:"Spanish",1035:"Finnish",18442:"Spanish",2060:"French",2058:"Spanish",3084:"French",19466:"Spanish",1036:"French",6154:"Spanish",5132:"French",15370:"Spanish",6156:"French",10250:"Spanish",4108:"French",20490:"Spanish",1122:"Frisian",3082:"Spanish (Modern Sort)",1110:"Galician",1034:"Spanish (Traditional Sort)",1079:"Georgian",21514:"Spanish",3079:"German",14346:"Spanish",1031:"German",8202:"Spanish",5127:"German",2077:"Sweden",4103:"German",1053:"Swedish",2055:"German",1114:"Syriac",1032:"Greek",1064:"Tajik (Cyrillic)",1135:"Greenlandic",2143:"Tamazight (Latin)",1095:"Gujarati",1097:"Tamil",1128:"Hausa (Latin)",1092:"Tatar",1037:"Hebrew",1098:"Telugu",1081:"Hindi",1054:"Thai",1038:"Hungarian",1105:"Tibetan",1039:"Icelandic",1055:"Turkish",1136:"Igbo",1090:"Turkmen",1057:"Indonesian",1152:"Uighur",1117:"Inuktitut",1058:"Ukrainian",2141:"Inuktitut (Latin)",1070:"Upper Sorbian",2108:"Irish",1056:"Urdu",1076:"isiXhosa",2115:"Uzbek (Cyrillic)",1077:"isiZulu",1091:"Uzbek (Latin)",1040:"Italian",1066:"Vietnamese",2064:"Italian",1106:"Welsh",1041:"Japanese",1160:"Wolof",1099:"Kannada",1157:"Yakut",1087:"Kazakh",1144:"Yi",1130:"Yoruba"}];q.process=function(t){for(var e={},n=0,r=Object.keys(this.records);n<r.length;n++){var i=this.records[r[n]],o=Y[i.platformID][i.languageID];if(null==o&&null!=this.langTags&&i.languageID>=32768&&(o=this.langTags[i.languageID-32768].tag),null==o&&(o=i.platformID+"-"+i.languageID),i.nameID>=256)null==e.fontFeatures&&(e.fontFeatures={}),(null!=e.fontFeatures[o]?e.fontFeatures[o]:e.fontFeatures[o]={})[i.nameID]=i.string;else{var a=Z[i.nameID]||i.nameID;null==e[a]&&(e[a]={}),e[a][o]=i.string}}this.records=e},q.preEncode=function(){if(!Array.isArray(this.records)){this.version=0;var t=[];for(var n in this.records){var i=this.records[n];"fontFeatures"!==n&&(t.push({platformID:3,encodingID:1,languageID:1033,nameID:Z.indexOf(n),length:r.byteLength(i.English,"utf16le"),string:i.English}),"postscriptName"===n&&t.push({platformID:1,encodingID:0,languageID:0,nameID:Z.indexOf(n),length:i.English.length,string:i.English}))}this.records=t,this.count=t.length,this.stringOffset=e.localExports.size(this,null,!1)}};var V=new d.VersionedStruct(d.uint16,{header:{xAvgCharWidth:d.int16,usWeightClass:d.uint16,usWidthClass:d.uint16,fsType:new d.Bitfield(d.uint16,[null,"noEmbedding","viewOnly","editable",null,null,null,null,"noSubsetting","bitmapOnly"]),ySubscriptXSize:d.int16,ySubscriptYSize:d.int16,ySubscriptXOffset:d.int16,ySubscriptYOffset:d.int16,ySuperscriptXSize:d.int16,ySuperscriptYSize:d.int16,ySuperscriptXOffset:d.int16,ySuperscriptYOffset:d.int16,yStrikeoutSize:d.int16,yStrikeoutPosition:d.int16,sFamilyClass:d.int16,panose:new d.Array(d.uint8,10),ulCharRange:new d.Array(d.uint32,4),vendorID:new d.String(4),fsSelection:new d.Bitfield(d.uint16,["italic","underscore","negative","outlined","strikeout","bold","regular","useTypoMetrics","wws","oblique"]),usFirstCharIndex:d.uint16,usLastCharIndex:d.uint16},0:{},1:{typoAscender:d.int16,typoDescender:d.int16,typoLineGap:d.int16,winAscent:d.uint16,winDescent:d.uint16,codePageRange:new d.Array(d.uint32,2)},2:{typoAscender:d.int16,typoDescender:d.int16,typoLineGap:d.int16,winAscent:d.uint16,winDescent:d.uint16,codePageRange:new d.Array(d.uint32,2),xHeight:d.int16,capHeight:d.int16,defaultChar:d.uint16,breakChar:d.uint16,maxContent:d.uint16},5:{typoAscender:d.int16,typoDescender:d.int16,typoLineGap:d.int16,winAscent:d.uint16,winDescent:d.uint16,codePageRange:new d.Array(d.uint32,2),xHeight:d.int16,capHeight:d.int16,defaultChar:d.uint16,breakChar:d.uint16,maxContent:d.uint16,usLowerOpticalPointSize:d.uint16,usUpperOpticalPointSize:d.uint16}}),K=V.versions;K[3]=K[4]=K[2];var X=new d.VersionedStruct(d.fixed32,{header:{italicAngle:d.fixed32,underlinePosition:d.int16,underlineThickness:d.int16,isFixedPitch:d.uint32,minMemType42:d.uint32,maxMemType42:d.uint32,minMemType1:d.uint32,maxMemType1:d.uint32},1:{},2:{numberOfGlyphs:d.uint16,glyphNameIndex:new d.Array(d.uint16,"numberOfGlyphs"),names:new d.Array(new d.String(d.uint8))},2.5:{numberOfGlyphs:d.uint16,offsets:new d.Array(d.uint8,"numberOfGlyphs")},3:{},4:{map:new d.Array(d.uint32,function(t){return t.parent.maxp.numGlyphs})}}),J=new d.VersionedStruct("head.indexToLocFormat",{0:{offsets:new d.Array(d.uint16)},1:{offsets:new d.Array(d.uint32)}});J.process=function(){if(0===this.version)for(var t=0;t<this.offsets.length;t++)this.offsets[t]<<=1},J.preEncode=function(){if(null==this.version&&(this.version=this.offsets[this.offsets.length-1]>65535?1:0,0===this.version))for(var t=0;t<this.offsets.length;t++)this.offsets[t]>>>=1};var Q=new d.Array(new d.Buffer),$={};$.cmap=R,$.head=M,$.hhea=F,$.hmtx=z,$.maxp=U,$.name=q,$["OS/2"]=V,$.post=X,$.loca=J,$.glyf=Q;var tt=new d.Struct({tag:new d.String(4),checkSum:d.uint32,offset:new d.Pointer(d.uint32,"void",{type:"global"}),length:d.uint32}),et=new d.Struct({tag:new d.String(4),numTables:d.uint16,searchRange:d.uint16,entrySelector:d.uint16,rangeShift:d.uint16,tables:new d.Array(tt,"numTables")});et.process=function(){var t=this,e={};Object.keys(this.tables).forEach(function(n){var r=t.tables[n];e[r.tag]=r}),this.tables=e},et.preEncode=function(t){var e=[];for(var n in this.tables){var r=this.tables[n];r&&e.push({tag:n,checkSum:0,offset:new d.VoidPointer($[n],r),length:$[n].size(r)})}this.tag="true",this.numTables=e.length,this.tables=e,this.searchRange=16*Math.floor(Math.log(this.numTables)/Math.LN2),this.entrySelector=Math.floor(this.searchRange/Math.LN2),this.rangeShift=16*this.numTables-this.searchRange};for(var nt=function(){function t(e){v(this,t),this._characterSet=null;for(var n=Object.keys(e.tables),r=0;r<n.length;r++)if(0===(R=e.tables[n[r]]).platformID&&(4===R.encodingID||6===R.encodingID)||3===R.platformID&&10===R.encodingID)return void(this.cmap=R.table);for(r=0;r<n.length;r++)if(0===(R=e.tables[n[r]]).platformID||3===R.platformID&&1===R.encodingID)return void(this.cmap=R.table);throw new Error("Could not find a unicode cmap")}return b(t,[{key:"lookup",value:function(t){var e=this.cmap;switch(e.version){case 0:return e.codeMap.get(t)||0;case 4:for(var n=0,r=e.segCount-1;n<=r;){var i=n+r>>1;if(t<e.startCode.get(i))r=i-1;else{if(!(t>e.endCode.get(i))){var o=e.idRangeOffset.get(i),a=void 0;if(0===o)a=t+e.idDelta.get(i);else{var s=o/2+(t-e.startCode.get(i))-(e.segCount-i);0!==(a=e.glyphIndexArray.get(s)||0)&&(a+=e.idDelta.get(i))}return 65535&a}n=i+1}}return 0;case 8:throw new Error("TODO: cmap format 8");case 6:case 10:return e.glyphIndices.get(t-e.firstCode)||0;case 12:case 13:for(var u=0,c=e.nGroups-1;u<=c;){var l=u+c>>1,h=e.groups.get(l);if(t<h.startCharCode)c=l-1;else{if(!(t>h.endCharCode))return 12===e.version?h.glyphID+(t-h.startCharCode):h.glyphID;u=l+1}}return 0;case 14:throw new Error("TODO: cmap format 14");default:throw new Error("Unknown cmap format "+e.version)}}},{key:"getCharacterSet",value:function(){if(this._characterSet)return this._characterSet;var t=this.cmap;switch(t.version){case 0:return this._characterSet=a(0,t.codeMap.length);case 4:for(var e=[],n=t.endCode.toArray(),r=0;r<n.length;r++){var i=n[r]+1,o=t.startCode.get(r);e.push.apply(e,E(a(o,i)))}return this._characterSet=e;case 8:throw new Error("TODO: cmap format 8");case 6:case 10:return this._characterSet=a(t.firstCode,t.firstCode+t.glyphIndices.length);case 12:case 13:for(var s=[],u=t.groups.toArray(),r=0;r<u.length;r++){var c=u[r];s.push.apply(s,E(a(c.startCharCode,c.endCharCode+1)))}return this._characterSet=s;case 14:throw new Error("TODO: cmap format 14");default:throw new Error("Unknown cmap format "+t.version)}}}]),t}(),rt=function(){function t(e){v(this,t),this.font=e}return b(t,[{key:"positionGlyphs",value:function(t,e){for(var n=0,r=0,i=0;i<t.length;i++)t[i].isMark?r=i:(n!==r&&this.positionCluster(t,e,n,r),n=r=i);return n!==r&&this.positionCluster(t,e,n,r),e}},{key:"positionCluster",value:function(t,e,n,r){var i=t[n],o=i.cbox.copy();i.codePoints.length>1&&(o.minX+=(i.codePoints.length-1)*o.width/i.codePoints.length);for(var a=-e[n].xAdvance,s=0,u=this.font.unitsPerEm/16,c=n+1;c<=r;c++){var l=t[c],h=l.cbox,f=e[c],d=this.getCombiningClass(l.codePoints[0]);if("Not_Reordered"!==d){switch(f.xOffset=f.yOffset=0,d){case"Double_Above":case"Double_Below":f.xOffset+=o.minX-h.width/2-h.minX;break;case"Attached_Below_Left":case"Below_Left":case"Above_Left":f.xOffset+=o.minX-h.minX;break;case"Attached_Above_Right":case"Below_Right":case"Above_Right":f.xOffset+=o.maxX-h.width-h.minX;break;default:f.xOffset+=o.minX+(o.width-h.width)/2-h.minX}switch(d){case"Double_Below":case"Below_Left":case"Below":case"Below_Right":case"Attached_Below_Left":case"Attached_Below":"Attached_Below_Left"!==d&&"Attached_Below"!==d||(o.minY+=u),f.yOffset=-o.minY-h.maxY,o.minY+=h.height;break;case"Double_Above":case"Above_Left":case"Above":case"Above_Right":case"Attached_Above":case"Attached_Above_Right":"Attached_Above"!==d&&"Attached_Above_Right"!==d||(o.maxY+=u),f.yOffset=o.maxY-h.minY,o.maxY+=h.height}f.xAdvance=f.yAdvance=0,f.xOffset+=a,f.yOffset+=s}else a-=f.xAdvance,s-=f.yAdvance}}},{key:"getCombiningClass",value:function(t){var e=A.getCombiningClass(t);if(3584==(-256&t))if("Not_Reordered"===e)switch(t){case 3633:case 3636:case 3637:case 3638:case 3639:case 3655:case 3660:case 3645:case 3662:return"Above_Right";case 3761:case 3764:case 3765:case 3766:case 3767:case 3771:case 3788:case 3789:return"Above";case 3772:return"Below"}else if(3642===t)return"Below_Right";switch(e){case"CCC10":case"CCC11":case"CCC12":case"CCC13":case"CCC14":case"CCC15":case"CCC16":case"CCC17":case"CCC18":case"CCC20":case"CCC22":return"Below";case"CCC23":return"Attached_Above";case"CCC24":return"Above_Right";case"CCC25":case"CCC19":return"Above_Left";case"CCC26":return"Above";case"CCC21":break;case"CCC27":case"CCC28":case"CCC30":case"CCC31":case"CCC33":case"CCC34":case"CCC35":case"CCC36":return"Above";case"CCC29":case"CCC32":return"Below";case"CCC103":return"Below_Right";case"CCC107":return"Above_Right";case"CCC118":return"Below";case"CCC122":return"Above";case"CCC129":case"CCC132":return"Below";case"CCC130":return"Above"}return e}}]),t}(),it=function(){function t(e,n,r,i){var o=arguments.length<=0||void 0===arguments[0]?1/0:arguments[0],a=arguments.length<=1||void 0===arguments[1]?1/0:arguments[1],s=arguments.length<=2||void 0===arguments[2]?-1/0:arguments[2],u=arguments.length<=3||void 0===arguments[3]?-1/0:arguments[3];v(this,t),this.minX=o,this.minY=a,this.maxX=s,this.maxY=u}return b(t,[{key:"addPoint",value:function(t,e){t<this.minX&&(this.minX=t),e<this.minY&&(this.minY=e),t>this.maxX&&(this.maxX=t),e>this.maxY&&(this.maxY=e)}},{key:"copy",value:function(){return new t(this.minX,this.minY,this.maxX,this.maxY)}},{key:"width",get:function(){return this.maxX-this.minX}},{key:"height",get:function(){return this.maxY-this.minY}}]),t}(),ot=function(){function t(e,n){v(this,t),this.glyphs=e,this.positions=n}return b(t,[{key:"advanceWidth",get:function(){var t=this,e=0;return Object.keys(this.positions).forEach(function(n){e+=t.positions[n].xAdvance}),e}},{key:"advanceHeight",get:function(){var t=this,e=0;return Object.keys(this.positions).forEach(function(n){e+=t.positions[n].yAdvance}),e}},{key:"bbox",get:function(){for(var t=new it,e=0,n=0,r=0;r<this.glyphs.length;r++){var i=this.glyphs[r],o=this.positions[r],a=i.bbox;t.addPoint(a.minX+e+o.xOffset,a.minY+n+o.yOffset),t.addPoint(a.maxX+e+o.xOffset,a.maxY+n+o.yOffset),e+=o.xAdvance,n+=o.yAdvance}return t}}]),t}(),at=function t(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],n=arguments.length<=1||void 0===arguments[1]?0:arguments[1],r=arguments.length<=2||void 0===arguments[2]?0:arguments[2],i=arguments.length<=3||void 0===arguments[3]?0:arguments[3];v(this,t),this.xAdvance=e,this.yAdvance=n,this.xOffset=r,this.yOffset=i},st={Caucasian_Albanian:"aghb",Arabic:"arab",Imperial_Aramaic:"armi",Armenian:"armn",Avestan:"avst",Balinese:"bali",Bamum:"bamu",Bassa_Vah:"bass",Batak:"batk",Bengali:["bng2","beng"],Bopomofo:"bopo",Brahmi:"brah",Braille:"brai",Buginese:"bugi",Buhid:"buhd",Chakma:"cakm",Canadian_Aboriginal:"cans",Carian:"cari",Cham:"cham",Cherokee:"cher",Coptic:"copt",Cypriot:"cprt",Cyrillic:"cyrl",Devanagari:["dev2","deva"],Deseret:"dsrt",Duployan:"dupl",Egyptian_Hieroglyphs:"egyp",Elbasan:"elba",Ethiopic:"ethi",Georgian:"geor",Glagolitic:"glag",Gothic:"goth",Grantha:"gran",Greek:"grek",Gujarati:["gjr2","gujr"],Gurmukhi:["gur2","guru"],Hangul:"hang",Han:"hani",Hanunoo:"hano",Hebrew:"hebr",Hiragana:"hira",Pahawh_Hmong:"hmng",Katakana_Or_Hiragana:"hrkt",Old_Italic:"ital",Javanese:"java",Kayah_Li:"kali",Katakana:"kana",Kharoshthi:"khar",Khmer:"khmr",Khojki:"khoj",Kannada:["knd2","knda"],Kaithi:"kthi",Tai_Tham:"lana",Lao:"lao ",Latin:"latn",Lepcha:"lepc",Limbu:"limb",Linear_A:"lina",Linear_B:"linb",Lisu:"lisu",Lycian:"lyci",Lydian:"lydi",Mahajani:"mahj",Mandaic:"mand",Manichaean:"mani",Mende_Kikakui:"mend",Meroitic_Cursive:"merc",Meroitic_Hieroglyphs:"mero",Malayalam:["mlm2","mlym"],Modi:"modi",Mongolian:"mong",Mro:"mroo",Meetei_Mayek:"mtei",Myanmar:["mym2","mymr"],Old_North_Arabian:"narb",Nabataean:"nbat",Nko:"nko ",Ogham:"ogam",Ol_Chiki:"olck",Old_Turkic:"orkh",Oriya:"orya",Osmanya:"osma",Palmyrene:"palm",Pau_Cin_Hau:"pauc",Old_Permic:"perm",Phags_Pa:"phag",Inscriptional_Pahlavi:"phli",Psalter_Pahlavi:"phlp",Phoenician:"phnx",Miao:"plrd",Inscriptional_Parthian:"prti",Rejang:"rjng",Runic:"runr",Samaritan:"samr",Old_South_Arabian:"sarb",Saurashtra:"saur",Shavian:"shaw",Sharada:"shrd",Siddham:"sidd",Khudawadi:"sind",Sinhala:"sinh",Sora_Sompeng:"sora",Sundanese:"sund",Syloti_Nagri:"sylo",Syriac:"syrc",Tagbanwa:"tagb",Takri:"takr",Tai_Le:"tale",New_Tai_Lue:"talu",Tamil:"taml",Tai_Viet:"tavt",Telugu:["tel2","telu"],Tifinagh:"tfng",Tagalog:"tglg",Thaana:"thaa",Thai:"thai",Tibetan:"tibt",Tirhuta:"tirh",Ugaritic:"ugar",Vai:"vai ",Warang_Citi:"wara",Old_Persian:"xpeo",Cuneiform:"xsux",Yi:"yi  ",Inherited:"zinh",Common:"zyyy",Unknown:"zzzz"},ut=function(){function t(e,n,r){v(this,t),this.font=e,this.script=n,this.language=r,this.direction=c(n),this.stages=[],this.globalFeatures={},this.allFeatures={}}return b(t,[{key:"_addFeatures",value:function(t){var e=this,n=this.stages[this.stages.length-1];Object.keys(t).forEach(function(r){var i=t[r];e.allFeatures[i]||(n.push(i),e.allFeatures[i]=!0)})}},{key:"_addGlobal",value:function(t){var e=this;Object.keys(t).forEach(function(n){var r=t[n];e.globalFeatures[r]=!0})}},{key:"add",value:function(t){var e=arguments.length<=1||void 0===arguments[1]||arguments[1];if(0===this.stages.length&&this.stages.push([]),"string"==typeof t&&(t=[t]),Array.isArray(t))this._addFeatures(t),e&&this._addGlobal(t);else{if("object"!==(void 0===t?"undefined":y(t)))throw new Error("Unsupported argument to ShapingPlan#add");var n=(t.global||[]).concat(t.local||[]);this._addFeatures(n),t.global&&this._addGlobal(t.global)}}},{key:"addStage",value:function(t,e){"function"==typeof t?this.stages.push(t,[]):(this.stages.push([]),this.add(t,e))}},{key:"assignGlobalFeatures",value:function(t){var e=this;Object.keys(t).forEach(function(n){var r=t[n];for(var i in e.globalFeatures)r.features[i]=!0})}},{key:"process",value:function(t,e,n){var r=this;t.selectScript(this.script,this.language),Object.keys(this.stages).forEach(function(i){var o=r.stages[i];"function"==typeof o?o(e,n):o.length>0&&t.applyFeatures(o,e,n)})}}]),t}(),ct=["ccmp","locl","rlig","mark","mkmk"],lt=["frac","numr","dnom"],ht=["calt","clig","liga","rclt","curs","kern"],ft={ltr:["ltra","ltrm"],rtl:["rtla","rtlm"]},dt=function(){function t(){v(this,t)}return b(t,null,[{key:"plan",value:function(t,e,n){this.planPreprocessing(t),this.planFeatures(t),this.planPostprocessing(t,n),t.assignGlobalFeatures(e),this.assignFeatures(t,e)}},{key:"planPreprocessing",value:function(t){t.add({global:ft[t.direction],local:lt})}},{key:"planFeatures",value:function(t){}},{key:"planPostprocessing",value:function(t,e){t.add([].concat(ct,ht,E(e)))}},{key:"assignFeatures",value:function(t,e){for(var n=0;n<e.length;){var r=e[n];if(8260===r.codePoints[0]){for(var i=n-1,o=n+1;i>=0&&A.isDigit(e[i].codePoints[0]);)e[i].features.numr=!0,e[i].features.frac=!0,i--;for(;o<e.length&&A.isDigit(e[o].codePoints[0]);)e[o].features.dnom=!0,e[o].features.frac=!0,o++;r.features.frac=!0,n=o-1}else n++}}}]),t}(),pt=function t(e){var n=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],r=arguments.length<=2||void 0===arguments[2]?[]:arguments[2];if(v(this,t),this.id=e,this.codePoints=n,this.isMark=this.codePoints.every(A.isMark),this.isLigature=this.codePoints.length>1,this.features={},Array.isArray(r))for(var i=0;i<r.length;i++){var o=r[i];this.features[o]=!0}else"object"===(void 0===r?"undefined":y(r))&&C(this.features,r);this.ligatureID=null,this.ligatureComponent=null,this.cursiveAttachment=null,this.markAttachment=null},gt={latn:dt,DFLT:dt},_t=function(){function t(e,n){v(this,t),this.glyphs=e,this.reset(n)}return b(t,[{key:"reset",value:function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.flags=t,this.index=0}},{key:"shouldIgnore",value:function(t,e){return e.ignoreMarks&&t.isMark||e.ignoreBaseGlyphs&&!t.isMark||e.ignoreLigatures&&t.isLigature}},{key:"move",value:function(t){for(this.index+=t;0<=this.index&&this.index<this.glyphs.length&&this.shouldIgnore(this.glyphs[this.index],this.flags);)this.index+=t;return 0>this.index||this.index>=this.glyphs.length?null:this.glyphs[this.index]}},{key:"next",value:function(){return this.move(1)}},{key:"prev",value:function(){return this.move(-1)}},{key:"peek",value:function(){var t=arguments.length<=0||void 0===arguments[0]?1:arguments[0],e=this.index,n=this.increment(t);return this.index=e,n}},{key:"peekIndex",value:function(){var t=arguments.length<=0||void 0===arguments[0]?1:arguments[0],e=this.index;this.increment(t);var n=this.index;return this.index=e,n}},{key:"increment",value:function(){var t=arguments.length<=0||void 0===arguments[0]?1:arguments[0],e=t<0?-1:1;for(t=Math.abs(t);t--;)this.move(e);return this.glyphs[this.index]}},{key:"cur",get:function(){return this.glyphs[this.index]||null}}]),t}(),yt=["DFLT","dflt","latn"],mt=(function(){function t(e,n){v(this,t),this.font=e,this.table=n,this.script=null,this.scriptTag=null,this.language=null,this.languageTag=null,this.features={},this.lookups={},this.selectScript(),this.glyphs=[],this.positions=[],this.ligatureID=1}b(t,[{key:"findScript",value:function(t){if(null==this.table.scriptList)return null;Array.isArray(t)||(t=[t]);for(var e=0,n=Object.keys(this.table.scriptList);e<n.length;e++)for(var r=this.table.scriptList[n[e]],i=0,o=Object.keys(t);i<o.length;i++){var a=t[o[i]];if(r.tag===a)return r}return null}},{key:"selectScript",value:function(t,e){var n=this,r=!1,i=void 0;if(!this.script||t!==this.scriptTag){if(i=this.findScript(t),t&&(i=this.findScript(t)),i||(i=this.findScript(yt)),!i)return;this.scriptTag=i.tag,this.script=i.script,this.direction=c(t),this.language=null,r=!0}if(!e&&e!==this.langugeTag)for(var o=0,a=Object.keys(this.script.langSysRecords);o<a.length;o++){var s=this.script.langSysRecords[a[o]];if(s.tag===e){this.language=s.langSys,this.langugeTag=s.tag,r=!0;break}}this.language||(this.language=this.script.defaultLangSys),r&&(this.features={},this.language&&Object.keys(this.language.featureIndexes).forEach(function(t){var e=n.language.featureIndexes[t],r=n.table.featureList[e];n.features[r.tag]=r.feature}))}},{key:"lookupsForFeatures",value:function(){for(var t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],e=arguments[1],n=[],r=0,i=Object.keys(t);r<i.length;r++){var o=t[i[r]],a=this.features[o];if(a)for(var s=0,u=Object.keys(a.lookupListIndexes);s<u.length;s++){var c=a.lookupListIndexes[u[s]];e&&-1!==e.indexOf(c)||n.push({feature:o,index:c,lookup:this.table.lookupList.get(c)})}}return n.sort(function(t,e){return t.index-e.index}),n}},{key:"applyFeatures",value:function(t,e,n){var r=this.lookupsForFeatures(t);this.applyLookups(r,e,n)}},{key:"applyLookups",value:function(t,e,n){this.glyphs=e,this.positions=n,this.glyphIterator=new _t(e);for(var r=0,i=Object.keys(t);r<i.length;r++){var o=t[i[r]],a=o.feature,s=o.lookup;for(this.glyphIterator.reset(s.flags);this.glyphIterator.index<e.length;)if(a in this.glyphIterator.cur.features){for(var u=0,c=Object.keys(s.subTables);u<c.length;u++){var l=s.subTables[c[u]];if(this.applyLookup(s.lookupType,l))break}this.glyphIterator.index++}else this.glyphIterator.index++}}},{key:"applyLookup",value:function(t,e){throw new Error("applyLookup must be implemented by subclasses")}},{key:"applyLookupList",value:function(t){var e=this,n=this.glyphIterator.index;Object.keys(t).forEach(function(r){var i=t[r];e.glyphIterator.index=n+i.sequenceIndex;var o=e.table.lookupList.get(i.lookupListIndex);Object.keys(o.subTables).forEach(function(t){var n=o.subTables[t];e.applyLookup(o.lookupType,n)})}),this.glyphIterator.index=n}},{key:"coverageIndex",value:function(t,e){switch(null==e&&(e=this.glyphIterator.cur.id),t.version){case 1:return t.glyphs.indexOf(e);case 2:for(var n=0,r=Object.keys(t.rangeRecords);n<r.length;n++){var i=t.rangeRecords[r[n]];if(i.start<=e&&e<=i.end)return i.startCoverageIndex+e-i.start}}return-1}},{key:"match",value:function(t,e,n,r){for(var i=this.glyphIterator.index,o=this.glyphIterator.increment(t),a=0;a<e.length&&o&&n(e[a],o.id);)r&&r.push(this.glyphIterator.index),a++,o=this.glyphIterator.next();return this.glyphIterator.index=i,!(a<e.length)&&(r||!0)}},{key:"sequenceMatches",value:function(t,e){return this.match(t,e,function(t,e){return t===e})}},{key:"sequenceMatchIndices",value:function(t,e){return this.match(t,e,function(t,e){return t===e},[])}},{key:"coverageSequenceMatches",value:function(t,e){var n=this;return this.match(t,e,function(t,e){return n.coverageIndex(t,e)>=0})}},{key:"getClassID",value:function(t,e){switch(e.version){case 1:for(var n=e.startGlyph,r=0,i=Object.keys(e.classValueArray);r<i.length;r++){var o=e.classValueArray[i[r]];if(t===n++)return o}break;case 2:for(var r=0,i=Object.keys(e.classRangeRecord);r<i.length;r++){var a=e.classRangeRecord[i[r]];if(a.start<=t&&t<=a.end)return a.class}}return-1}},{key:"classSequenceMatches",value:function(t,e,n){var r=this;return this.match(t,e,function(t,e){return t===r.getClassID(e,n)})}},{key:"applyContext",value:function(t){switch(t.version){case 1:var e=this.coverageIndex(t.coverage);if(-1===e)return;for(var n=t.ruleSets[e],r=0,i=Object.keys(n);r<i.length;r++){o=n[i[r]];if(this.sequenceMatches(1,o.input))return this.applyLookupList(o.lookupRecords)}break;case 2:if(-1===this.coverageIndex(t.coverage))return;if(-1===(e=this.getClassID(this.glyphIterator.cur.id,t.classDef)))return;n=t.classSet[e];for(var r=0,i=Object.keys(n);r<i.length;r++){var o=n[i[r]];if(this.classSequenceMatches(1,o.classes,t.classDef))return this.applyLookupList(o.lookupRecords)}break;case 3:if(this.coverageSequenceMatches(0,t.coverages))return this.applyLookupList(t.lookupRecords)}}},{key:"applyChainingContext",value:function(t){switch(t.version){case 1:var e=this.coverageIndex(t.coverage);if(-1===e)return;for(var n=t.chainRuleSets[e],r=0,i=Object.keys(n);r<i.length;r++){a=n[i[r]];if(this.sequenceMatches(-a.backtrack.length,a.backtrack)&&this.sequenceMatches(1,a.input)&&this.sequenceMatches(1+a.input.length,a.lookahead))return this.applyLookupList(a.lookupRecords)}break;case 2:if(-1===this.coverageIndex(t.coverage))return;if(-1===(e=this.getClassID(this.glyphIterator.cur.id,t.inputClassDef)))return;for(var o=t.chainClassSet[e],r=0,i=Object.keys(o);r<i.length;r++){var a=o[i[r]];if(this.classSequenceMatches(-a.backtrack.length,a.backtrack,t.backtrackClassDef)&&this.classSequenceMatches(1,a.input,t.inputClassDef)&&this.classSequenceMatches(1+a.input.length,a.lookahead,t.lookaheadClassDef))return this.applyLookupList(a.lookupRecords)}break;case 3:if(this.coverageSequenceMatches(-t.backtrackGlyphCount,t.backtrackCoverage)&&this.coverageSequenceMatches(0,t.inputCoverage)&&this.coverageSequenceMatches(t.inputGlyphCount,t.lookaheadCoverage))return this.applyLookupList(t.lookupRecords)}}}])}(),function(){function t(e){v(this,t),this.font=e,this.glyphInfos=null,this.plan=null}b(t,[{key:"setup",value:function(t,e,n,r){this.glyphInfos=t.map(function(t){return new pt(t.id,[].concat(E(t.codePoints)))});var i=l(n);return this.plan=new ut(this.font,n,r),i.plan(this.plan,this.glyphInfos,e)}},{key:"substitute",value:function(t){return t}},{key:"position",value:function(t,e){return"rtl"===this.plan.direction&&(t.reverse(),e.reverse()),this.GPOSProcessor&&this.GPOSProcessor.features}},{key:"cleanup",value:function(){this.glyphInfos=null,this.plan=null}},{key:"getAvailableFeatures",value:function(t,e){return[]}}])}(),function(){function t(e){v(this,t),this.font=e,this.unicodeLayoutEngine=null}return b(t,[{key:"layout",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],n=arguments[2],r=arguments[3];if("string"==typeof e&&(r=n=e,e=[]),"string"==typeof t){null==n&&(n=s(t));l=this.font.glyphsForString(t)}else{if(null==n){for(var i=[],o=0,a=Object.keys(t);o<a.length;o++){var c=t[a[o]];i.push.apply(i,E(c.codePoints))}n=u(i)}var l=t}if(0===l.length)return new ot(l,[]);l=this.substitute(l,e,n,r);var h=this.position(l,e,n,r);return new ot(l,h)}},{key:"substitute",value:function(t,e,n,r){return t}},{key:"position",value:function(t,e,n,r){var i=t.map(function(t){return new at(t.advanceWidth)});return this.unicodeLayoutEngine||(this.unicodeLayoutEngine=new rt(this.font)),this.unicodeLayoutEngine.positionGlyphs(t,i),i}},{key:"getAvailableFeatures",value:function(t,e){return[]}}]),t}()),vt=function(){function t(){v(this,t),this.commands=[],this._bbox=null,this._cbox=null}return b(t,[{key:"toFunction",value:function(){var t=this.commands.map(function(t){return"  ctx."+t.command+"("+t.args.join(", ")+");"});return new Function("ctx",t.join("\n"))}},{},{key:"cbox",get:function(){if(!this._cbox){for(var t=new it,e=0,n=Object.keys(this.commands);e<n.length;e++)for(var r=this.commands[e],i=0;i<r.args.length;i+=2)t.addPoint(r.args[i],r.args[i+1]);this._cbox=g(t)}return this._cbox}},{key:"bbox",get:function(){if(this._bbox)return this._bbox;for(var t=new it,e=0,n=0,r=function(t){return Math.pow(1-t,3)*w[i]+3*Math.pow(1-t,2)*t*x[i]+3*(1-t)*Math.pow(t,2)*S[i]+Math.pow(t,3)*k[i]},i=0,o=Object.keys(this.commands);i<o.length;i++){var a=this.commands[o[i]];switch(a.command){case"moveTo":case"lineTo":var s=P(a.args,2),u=s[0],c=s[1];t.addPoint(u,c),e=u,n=c;break;case"quadraticCurveTo":case"bezierCurveTo":if("quadraticCurveTo"===a.command)var l=P(a.args,4),h=l[0],f=l[1],d=e+2/3*(h-e),p=n+2/3*(f-n),_=(v=l[2])+2/3*(h-v),y=(b=l[3])+2/3*(f-b);else var m=P(a.args,6),d=m[0],p=m[1],_=m[2],y=m[3],v=m[4],b=m[5];t.addPoint(v,b);for(var w=[e,n],x=[d,p],S=[_,y],k=[v,b],C=0;C<=1;C++){var E=6*w[C]-12*x[C]+6*S[C],A=-3*w[C]+9*x[C]-9*S[C]+3*k[C],i=C;if(a=3*x[C]-3*w[C],0!==A){var j=Math.pow(E,2)-4*a*A;if(!(j<0)){var O=(-E+Math.sqrt(j))/(2*A);0<O&&O<1&&(0===C?t.addPoint(r(O),t.maxY):1===C&&t.addPoint(t.maxX,r(O)));var I=(-E-Math.sqrt(j))/(2*A);0<I&&I<1&&(0===C?t.addPoint(r(I),t.maxY):1===C&&t.addPoint(t.maxX,r(I)))}}else{if(0===E)continue;var T=-a/E;0<T&&T<1&&(0===C?t.addPoint(r(T),t.maxY):1===C&&t.addPoint(t.maxX,r(T)))}}e=v,n=b}}return this._bbox=g(t)}}]),t}(),bt=["moveTo","lineTo","quadraticCurveTo","bezierCurveTo","closePath"],wt=0;wt<bt.length;wt++)!function(){var t=bt[wt];vt.prototype[t]=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return this._bbox=this._cbox=null,this.commands.push({command:t,args:n}),this}}();var xt,St,kt=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"],Ct=(xt=function(){function t(e,n,r){v(this,t),this.id=e,this.codePoints=n,this._font=r,this.isMark=this.codePoints.every(A.isMark),this.isLigature=this.codePoints.length>1}return b(t,[{key:"_getPath",value:function(){return new vt}},{key:"_getCBox",value:function(){return this.path.cbox}},{key:"_getBBox",value:function(){return this.path.bbox}},{key:"_getTableMetrics",value:function(t){if(this.id<t.metrics.length)return t.metrics.get(this.id);var e=t.metrics.get(t.metrics.length-1);return{advance:e?e.advance:0,bearing:t.bearings.get(this.id-t.metrics.length)||0}}},{key:"_getMetrics",value:function(t){if(this._metrics)return this._metrics;var e=this._getTableMetrics(this._font.hmtx),n=e.advance,r=e.bearing,i=void 0;if(void 0!==t&&null!==t||(t=this.cbox),(i=this._font["OS/2"])&&i.version>0)var o=Math.abs(i.typoAscender-i.typoDescender),a=i.typoAscender-t.maxY;else var s=this._font.hhea,o=Math.abs(s.ascent-s.descent),a=s.ascent-t.maxY;return this._metrics={advanceWidth:n,advanceHeight:o,leftBearing:r,topBearing:a}}},{key:"_getName",value:function(){var t=this._font.post;if(!t)return null;switch(t.version){case 1:return kt[this.id];case 2:var e=t.glyphNameIndex[this.id];return e<kt.length?kt[e]:t.names[e-kt.length];case 2.5:return kt[this.id+t.offsets[this.id]];case 4:return String.fromCharCode(t.map[this.id])}}},{key:"cbox",get:function(){return this._getCBox()}},{key:"bbox",get:function(){return this._getBBox()}},{key:"path",get:function(){return this._getPath()}},{key:"advanceWidth",get:function(){return this._getMetrics().advanceWidth}},{key:"advanceHeight",get:function(){return this._getMetrics().advanceHeight}},{key:"ligatureCaretPositions",get:function(){}},{key:"name",get:function(){return this._getName()}}]),t}(),h(xt.prototype,"cbox",[o],p(xt.prototype,"cbox"),xt.prototype),h(xt.prototype,"bbox",[o],p(xt.prototype,"bbox"),xt.prototype),h(xt.prototype,"path",[o],p(xt.prototype,"path"),xt.prototype),h(xt.prototype,"advanceWidth",[o],p(xt.prototype,"advanceWidth"),xt.prototype),h(xt.prototype,"advanceHeight",[o],p(xt.prototype,"advanceHeight"),xt.prototype),h(xt.prototype,"name",[o],p(xt.prototype,"name"),xt.prototype),xt),Et=new d.Struct({numberOfContours:d.int16,xMin:d.int16,yMin:d.int16,xMax:d.int16,yMax:d.int16}),At=function(){function t(e,n,r,i){var o=arguments.length<=2||void 0===arguments[2]?0:arguments[2],a=arguments.length<=3||void 0===arguments[3]?0:arguments[3];v(this,t),this.onCurve=e,this.endContour=n,this.x=o,this.y=a}return b(t,[{key:"copy",value:function(){return new t(this.onCurve,this.endContour,this.x,this.y)}}]),t}(),Pt=function t(e,n,r){v(this,t),this.glyphID=e,this.dx=n,this.dy=r,this.pos=0,this.scale=this.xScale=this.yScale=this.scale01=this.scale10=null},jt=function(t){function e(){return v(this,e),x(this,(e.__proto__||w(e)).apply(this,arguments))}return S(e,Ct),b(e,[{key:"_getCBox",value:function(t){var e=this._font._getTableStream("glyf");e.pos+=this._font.loca.offsets[this.id];var n=Et.decode(e),r=new it(n.xMin,n.yMin,n.xMax,n.yMax);return g(r)}},{key:"_parseGlyphCoord",value:function(t,e,n,r){if(n){i=t.readUInt8();r||(i=-i),i+=e}else if(r)i=e;else var i=e+t.readInt16BE();return i}},{key:"_decode",value:function(){var t=this._font.loca.offsets[this.id];if(t===this._font.loca.offsets[this.id+1])return null;var e=this._font._getTableStream("glyf");e.pos+=t;var n=e.pos,r=Et.decode(e);return r.numberOfContours>0?this._decodeSimple(r,e):r.numberOfContours<0&&this._decodeComposite(r,e,n),r}},{key:"_decodeSimple",value:function(t,e){t.points=[];for(var n=new d.Array(d.uint16,t.numberOfContours).decode(e),r=(new d.Array(d.uint8,d.uint16).decode(e),[]),i=n[n.length-1]+1;r.length<i;){s=e.readUInt8();if(r.push(s),8&s)for(var o=e.readUInt8(),a=0;a<o;a++)r.push(s)}for(l=0;l<r.length;l++){var s=r[l],u=new At(!!(1&s),n.indexOf(l)>=0,0,0);t.points.push(u)}for(var c=0,l=0;l<r.length;l++){s=r[l];t.points[l].x=c=this._parseGlyphCoord(e,c,2&s,16&s)}for(var h=0,l=0;l<r.length;l++){s=r[l];t.points[l].y=h=this._parseGlyphCoord(e,h,4&s,32&s)}}},{key:"_decodeComposite",value:function(t,e){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2];t.components=[];for(var r=!1,i=32;32&i;){i=e.readUInt16BE();var o=e.pos-n,a=e.readUInt16BE();if(r||(r=0!=(256&i)),1&i)var s=e.readInt16BE(),u=e.readInt16BE();else var s=e.readInt8(),u=e.readInt8();var c=new Pt(a,s,u);c.pos=o,c.scaleX=c.scaleY=1,c.scale01=c.scale10=0,8&i?c.scaleX=c.scaleY=(e.readUInt8()<<24|e.readUInt8()<<16)/1073741824:64&i?(c.scaleX=(e.readUInt8()<<24|e.readUInt8()<<16)/1073741824,c.scaleY=(e.readUInt8()<<24|e.readUInt8()<<16)/1073741824):128&i&&(c.scaleX=(e.readUInt8()<<24|e.readUInt8()<<16)/1073741824,c.scale01=(e.readUInt8()<<24|e.readUInt8()<<16)/1073741824,c.scale10=(e.readUInt8()<<24|e.readUInt8()<<16)/1073741824,c.scaleY=(e.readUInt8()<<24|e.readUInt8()<<16)/1073741824),t.components.push(c)}return r}},{key:"_getPhantomPoints",value:function(t){var e=this._getCBox(!0);null==this._metrics&&(this._metrics=Ct.prototype._getMetrics.call(this,e));var n=this._metrics,r=n.advanceWidth,i=n.advanceHeight,o=n.leftBearing,a=n.topBearing;return[new At(!1,!0,t.xMin-o,0),new At(!1,!0,t.xMin-o+r,0),new At(!1,!0,0,t.yMax+a),new At(!1,!0,0,t.yMax+a+i)]}},{key:"_getContours",value:function(){var t=this._decode();if(!t)return[];if(t.numberOfContours<0)for(var e=[],n=0,r=Object.keys(t.components);n<r.length;n++)for(var i=t.components[r[n]],o=0,a=Object.keys(t.points);o<a.length;o++){l=t.points[r[o]];e.push(new At(l.onCurve,l.endContour,l.x+i.dx,l.y+i.dy))}else e=t.points;for(var s=[],u=[],c=0;c<e.length;c++){var l=e[c];u.push(l),l.endContour&&(s.push(u),u=[])}return s}},{key:"_getMetrics",value:function(){if(this._metrics)return this._metrics;var t=this._getCBox(!0);return k(e.prototype.__proto__||w(e.prototype),"_getMetrics",this).call(this,t),this._metrics}},{key:"_getPath",value:function(){for(var t=this._getContours(),e=new vt,n=0;n<t.length;n++){var r=t[n],i=r[0],o=r[r.length-1],a=0;if(i.onCurve){f=null;a=1}else f=i=o.onCurve?o:new At(!1,!1,(i.x+o.x)/2,(i.y+o.y)/2);e.moveTo(i.x,i.y);for(var s=a;s<r.length;s++){var u=r[s],c=0===s?i:r[s-1];if(c.onCurve&&u.onCurve)e.lineTo(u.x,u.y);else if(c.onCurve&&!u.onCurve)f=u;else if(c.onCurve||u.onCurve){if(c.onCurve||!u.onCurve)throw new Error("Unknown TTF path state");e.quadraticCurveTo(f.x,f.y,u.x,u.y);f=null}else{var l=(c.x+u.x)/2,h=(c.y+u.y)/2;e.quadraticCurveTo(c.x,c.y,l,h);var f=u}}i!==o&&(f?e.quadraticCurveTo(f.x,f.y,i.x,i.y):e.lineTo(i.x,i.y))}return e.closePath(),e}}]),e}(),Ot=function(){function t(e){v(this,t),this.font=e,this.glyphs=[],this.mapping={},this.includeGlyph(0)}return b(t,[{key:"includeGlyph",value:function(t){return"object"===(void 0===t?"undefined":y(t))&&(t=t.id),null==this.mapping[t]&&(this.glyphs.push(t),this.mapping[t]=this.glyphs.length-1),this.mapping[t]}},{key:"encodeStream",value:function(){var t=this,e=new d.EncodeStream;return n.nextTick(function(){return t.encode(e),e.end()}),e}}]),t}(),It=function(t){function e(){return v(this,e),x(this,(e.__proto__||w(e)).apply(this,arguments))}return S(e,Ot),b(e,[{key:"_addGlyph",value:function(t){var e=this.font.getGlyph(t)._decode(),n=this.font.loca.offsets[t],i=this.font.loca.offsets[t+1],o=this.font._getTableStream("glyf");o.pos+=n;var a=o.readBuffer(i-n);if(e&&e.numberOfContours<0){a=new r(a);for(var s=0,u=Object.keys(e.components);s<u.length;s++){var c=e.components[u[s]];t=this.includeGlyph(c.glyphID),a.writeUInt16BE(t,c.pos)}}return this.glyf.push(a),this.loca.offsets.push(this.offset),t<this.font.hmtx.metrics.length?this.hmtx.metrics.push(this.font.hmtx.metrics.get(t)):this.hmtx.metrics.push({advance:this.font.hmtx.metrics.get(this.font.hmtx.metrics.length-1).advance,bearing:this.font.hmtx.bearings.get(t-this.font.hmtx.metrics.length)}),this.offset+=a.length,this.glyf.length-1}},{key:"encode",value:function(t){this.glyf=[],this.offset=0,this.loca={offsets:[]},this.hmtx={metrics:[],bearings:[]};for(var e=0;e<this.glyphs.length;)this._addGlyph(this.glyphs[e++]);var n=j(this.font.maxp);n.numGlyphs=this.glyf.length,this.loca.offsets.push(this.offset),$.loca.preEncode.call(this.loca);var r=j(this.font.head);r.indexToLocFormat=this.loca.version;var i=j(this.font.hhea);i.numberOfMetrics=this.hmtx.metrics.length,et.encode(t,{tables:{head:r,hhea:i,loca:this.loca,maxp:n,"cvt ":this.font["cvt "],prep:this.font.prep,glyf:this.glyf,hmtx:this.hmtx,fpgm:this.font.fpgm}})}}]),e}(),Tt=(St=function(){function t(e,n){arguments.length<=1||void 0===arguments[1]||arguments[1];v(this,t),this.stream=e,this._directoryPos=this.stream.pos,this._tables={},this._glyphs={},this._decodeDirectory();for(var r in this.directory.tables){var i=this.directory.tables[r];$[r]&&i.length>0&&m(this,r,{get:this._getTable.bind(this,i)})}}return b(t,null,[{key:"probe",value:function(t){var e=t.toString("ascii",0,4);return"true"===e||"OTTO"===e||e===String.fromCharCode(0,1,0,0)}}]),b(t,[{key:"_getTable",value:function(t){if(!(t.tag in this._tables))try{this._tables[t.tag]=this._decodeTable(t)}catch(e){O.logErrors&&(console.error("Error decoding table "+t.tag),console.error(e.stack))}return this._tables[t.tag]}},{key:"_getTableStream",value:function(t){var e=this.directory.tables[t];return e?(this.stream.pos=e.offset,this.stream):null}},{key:"_decodeDirectory",value:function(){return this.directory=et.decode(this.stream,{_startOffset:0})}},{key:"_decodeTable",value:function(t){var e=this.stream.pos,n=this._getTableStream(t.tag),r=$[t.tag].decode(n,this,t.length);return this.stream.pos=e,r}},{key:"getName",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?"English":arguments[1],n=this.name.records[t];return n?n[e]:null}},{key:"hasGlyphForCodePoint",value:function(t){return!!this._cmapProcessor.lookup(t)}},{key:"glyphForCodePoint",value:function(t){return this.getGlyph(this._cmapProcessor.lookup(t),[t])}},{key:"glyphsForString",value:function(t){for(var e=[],n=t.length,r=0;r<n;){var i=t.charCodeAt(r++);if(55296<=i&&i<=56319&&r<n){var o=t.charCodeAt(r);56320<=o&&o<=57343&&(r++,i=((1023&i)<<10)+(1023&o)+65536)}e.push(this.glyphForCodePoint(i))}return e}},{key:"layout",value:function(t,e,n,r){return this._layoutEngine.layout(t,e,n,r)}},{key:"_getBaseGlyph",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?[]:arguments[1];return this._glyphs[t]||this.directory.tables.glyf&&(this._glyphs[t]=new jt(t,e,this)),this._glyphs[t]||null}},{key:"getGlyph",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?[]:arguments[1];return this._glyphs[t]||this._getBaseGlyph(t,e),this._glyphs[t]||null}},{key:"createSubset",value:function(){return new It(this)}},{key:"getVariation",value:function(e){if(!this.directory.tables.fvar||!this.directory.tables.gvar||!this.directory.tables.glyf)throw new Error("Variations require a font with the fvar, gvar, and glyf tables.");if("string"==typeof e&&(e=this.namedVariations[e]),"object"!==(void 0===e?"undefined":y(e)))throw new Error("Variation settings must be either a variation name or settings object.");var n=new d.DecodeStream(this.stream.buffer);n.pos=this._directoryPos;var r=new t(n);return r._tables=this._tables,r}},{key:"getFont",value:function(t){return this.getVariation(t)}},{key:"postscriptName",get:function(){var t=this.name.records.postscriptName;return t[_(t)[0]]}},{key:"fullName",get:function(){return this.getName("fullName")}},{key:"familyName",get:function(){return this.getName("fontFamily")}},{key:"subfamilyName",get:function(){return this.getName("fontSubfamily")}},{key:"copyright",get:function(){return this.getName("copyright")}},{key:"version",get:function(){return this.getName("version")}},{key:"ascent",get:function(){return this.hhea.ascent}},{key:"descent",get:function(){return this.hhea.descent}},{key:"lineGap",get:function(){return this.hhea.lineGap}},{key:"underlinePosition",get:function(){return this.post.underlinePosition}},{key:"underlineThickness",get:function(){return this.post.underlineThickness}},{key:"italicAngle",get:function(){return this.post.italicAngle}},{key:"capHeight",get:function(){var t=this["OS/2"];return t?t.capHeight:this.ascent}},{key:"xHeight",get:function(){var t=this["OS/2"];return t?t.xHeight:0}},{key:"numGlyphs",get:function(){return this.maxp.numGlyphs}},{key:"unitsPerEm",get:function(){return this.head.unitsPerEm}},{key:"bbox",get:function(){return g(new it(this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax))}},{key:"_cmapProcessor",get:function(){return new nt(this.cmap)}},{key:"characterSet",get:function(){return this._cmapProcessor.getCharacterSet()}},{key:"_layoutEngine",get:function(){return new mt(this)}},{key:"availableFeatures",get:function(){return this._layoutEngine.getAvailableFeatures()}},{key:"variationAxes",get:function(){return{}}},{key:"namedVariations",get:function(){return{}}}]),t}(),f(St.prototype,"bbox",[o],p(St.prototype,"bbox"),St.prototype),f(St.prototype,"_cmapProcessor",[o],p(St.prototype,"_cmapProcessor"),St.prototype),f(St.prototype,"characterSet",[o],p(St.prototype,"characterSet"),St.prototype),f(St.prototype,"_layoutEngine",[o],p(St.prototype,"_layoutEngine"),St.prototype),St),Lt=new d.VersionedStruct(d.uint32,{65536:{numFonts:d.uint32,offsets:new d.Array(d.uint32,"numFonts")},131072:{numFonts:d.uint32,offsets:new d.Array(d.uint32,"numFonts"),dsigTag:d.uint32,dsigLength:d.uint32,dsigOffset:d.uint32}}),Bt=function(){function t(e){if(v(this,t),this.stream=e,"ttcf"!==e.readString(4))throw new Error("Not a TrueType collection");this.header=Lt.decode(e)}return b(t,null,[{key:"probe",value:function(t){return"ttcf"===t.toString("ascii",0,4)}}]),b(t,[{key:"getFont",value:function(t){for(var e=0,n=Object.keys(this.header.offsets);e<n.length;e++){var r=this.header.offsets[n[e]],i=new d.DecodeStream(this.stream.buffer);i.pos=r;var o=new Tt(i);if(o.postscriptName===t)return o}return null}},{key:"fonts",get:function(){for(var t=[],e=0,n=Object.keys(this.header.offsets);e<n.length;e++){var r=this.header.offsets[n[e]],i=new d.DecodeStream(this.stream.buffer);i.pos=r,t.push(new Tt(i))}return t}}]),t}(),Nt=new d.String(d.uint8),Rt=(new d.Struct({len:d.uint32,buf:new d.Buffer("len")}),new d.Struct({id:d.uint16,nameOffset:d.int16,attr:d.uint8,dataOffset:d.uint24,handle:d.uint32})),Mt=new d.Struct({name:new d.String(4),maxTypeIndex:d.uint16,refList:new d.Pointer(d.uint16,new d.Array(Rt,function(t){return t.maxTypeIndex+1}),{type:"parent"})}),Ft=new d.Struct({length:d.uint16,types:new d.Array(Mt,function(t){return t.length+1})}),Dt=new d.Struct({reserved:new d.Reserved(d.uint8,24),typeList:new d.Pointer(d.uint16,Ft),nameListOffset:new d.Pointer(d.uint16,"void")}),zt=new d.Struct({dataOffset:d.uint32,map:new d.Pointer(d.uint32,Dt),dataLength:d.uint32,mapLength:d.uint32}),Ut=function(){function t(e){v(this,t),this.stream=e,this.header=zt.decode(this.stream);for(var n=0,r=Object.keys(this.header.map.typeList.types);n<r.length;n++){for(var i=this.header.map.typeList.types[r[n]],o=0,a=Object.keys(i.refList);o<a.length;o++){var s=i.refList[a[o]];s.nameOffset>=0?(this.stream.pos=s.nameOffset+this.header.map.nameListOffset,s.name=Nt.decode(this.stream)):s.name=null}"sfnt"===i.name&&(this.sfnt=i)}}return b(t,null,[{key:"probe",value:function(t){var e=new d.DecodeStream(t);try{var n=zt.decode(e)}catch(t){return!1}for(var r=0,i=Object.keys(n.map.typeList.types);r<i.length;r++)if("sfnt"===n.map.typeList.types[i[r]].name)return!0;return!1}}]),b(t,[{key:"getFont",value:function(t){if(!this.sfnt)return null;for(var e=0,n=Object.keys(this.sfnt.refList);e<n.length;e++){var r=this.sfnt.refList[n[e]],i=this.header.dataOffset+r.dataOffset+4,o=new d.DecodeStream(this.stream.buffer.slice(i)),a=new Tt(o);if(a.postscriptName===t)return a}return null}},{key:"fonts",get:function(){for(var t=[],e=0,n=Object.keys(this.sfnt.refList);e<n.length;e++){var r=this.sfnt.refList[n[e]],i=this.header.dataOffset+r.dataOffset+4,o=new d.DecodeStream(this.stream.buffer.slice(i));t.push(new Tt(o))}return t}}]),t}();O.registerFormat(Tt),O.registerFormat(Bt),O.registerFormat(Ut),e.localExports=O}).call(this,t("_process"),t("buffer").Buffer)},{_process:188,"babel-runtime/core-js/get-iterator":24,"babel-runtime/core-js/object/assign":26,"babel-runtime/core-js/object/define-properties":28,"babel-runtime/core-js/object/define-property":29,"babel-runtime/core-js/object/freeze":30,"babel-runtime/core-js/object/get-own-property-descriptor":31,"babel-runtime/core-js/object/get-prototype-of":32,"babel-runtime/core-js/object/keys":33,"babel-runtime/helpers/classCallCheck":37,"babel-runtime/helpers/createClass":38,"babel-runtime/helpers/get":39,"babel-runtime/helpers/inherits":40,"babel-runtime/helpers/possibleConstructorReturn":41,"babel-runtime/helpers/slicedToArray":42,"babel-runtime/helpers/toConsumableArray":43,"babel-runtime/helpers/typeof":44,buffer:60,clone:61,restructure:199,"restructure/src/utils":215,"tiny-inflate":218,"unicode-properties":220,"unicode-trie":221}],166:[function(t,e,n){n.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,h=n?i-1:0,f=n?-1:1,d=t[e+h];for(h+=f,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+t[e+h],h+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)},n.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(e*u-1)*Math.pow(2,i),a+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;t[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+d]=255&a,d+=p,a/=256,c-=8);t[n+d-p]|=128*g}},{}],167:[function(t,e,n){"function"==typeof Object.create?e.localExports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.localExports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},{}],168:[function(t,e,n){function r(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function i(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0))}e.localExports=function(t){return null!=t&&(r(t)||i(t)||!!t._isBuffer)}},{}],169:[function(t,e,n){var r={}.toString;e.localExports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},{}],172:[function(t,e,n){(function(){n.OP=0,n.CL=1,n.CP=2,n.QU=3,n.GL=4,n.NS=5,n.EX=6,n.SY=7,n.IS=8,n.PR=9,n.PO=10,n.NU=11,n.AL=12,n.HL=13,n.ID=14,n.IN=15,n.HY=16,n.BA=17,n.BB=18,n.B2=19,n.ZW=20,n.CM=21,n.WJ=22,n.H2=23,n.H3=24,n.JL=25,n.JV=26,n.JT=27,n.RI=28,n.AI=29,n.BK=30,n.CB=31,n.CJ=32,n.CR=33,n.LF=34,n.NL=35,n.SA=36,n.SG=37,n.SP=38,n.XX=39}).call(this)},{}],173:[function(t,e,n){(function(){var n,r,i,o,a,s,u,c,l,h,f,d,p,g,_,y,m,v,b,w,x,S,k,C,E;b=t("unicode-trie");var A=t("buffer").Buffer;S=new b(new A("AA4IAAAAAAAAAf2g3VZ7PNP7//+ebiriUKKwnRJyieRSxrZzoiS3IypilJ3KbW4rWjM7HURuK9cuNKUyHXeOhbGkTKGR+4ZhMWFbjA27fH7U+f31ezx+v/7+Pf95f96Px/N1eb5ez8f78eGOwO8yBn+iRSQBb4PFc2MpJuMfg73V9I5mfUfHsyfPvqE3NeX3M99whH07I8PY752rV77Lhm37Hl/EP15RCFD7IlqUnXJNetcDzz1t1lH5erf1nFusm8HIk78MNHt/t9/oXNN1Ug6x2EX7j23q4dZNxi/uX0rfnON5KW1H7eAlwoLWCqlgu5xFb/evOw/VdP+mBl00ff2zdqrprRT9K/eRt3TOeSKRIY2Xy0E3hgslGZEFP5bVcMHtN1XFIFLhLd0L5U25dZ1IOUT1MLuS8NNt9Uupd1YaxTMN6/mVKxQ89wSHpKKOr3ctHVNU9aC3/db5LS6gEHmt2xYcd3ffyVb1na/ub+k4TNvgiEywsCynDpRebRdoCUdhwGtY4b8tdYJB/cHzlDSX1LLu9oLvlbb5OJm2aMobVS58SPzemYZQXtVjvODKmmCz4/KowrjQU0o45J/7TqojN6i5fytRUtG6xXuuwn7l0KTd5rPHSM89vul1IQmET1Bx9WHspS4l9YsB67pDLzJ7yF++R1FQl+IORcnNucnao6NJSW0nPHbY263hQMLemc29v+4s1WZMF6SAVtXVbVPT/2e1ujcW5WtDczm147q5v3n3cQ2tdfUbFUzfrIv3v22129N/TfugfyL0A/8g2ID05rc1ZpedPOpa1wklnMLht1uRTmP+yXumPC/eUe0fvJiiJTwInIL9IDE7xuP3hLi9MwEFd3b/2+fFJOXW+6/f7Vp3lYphSWXzN2u5/mhGux8lpv1gaZn1/+3VtQ0MFvrogNd3fBuyN+BpgiVk+mkibIu6f7ypbrjpOwW0UcXb7cEhFe8UsVl43R8l7vtBIvwuYfvL8N9ttXaYw+2oeliHUqWooVH8vf3B+LYXccY3p4kBa17b9+8Uflp3ZqvV96WKhAS4HwwnUmVROETH53i2YdN4SsuRpgmNJsmH70fc5Zh3R2NW3ny/ZX6/qbUvJ4eFd0hv8h9LAB7wyJ42bBvdiQulDZtFdUpHOkcujTaOjEUerZh7iCUB2Py6gS8PxdnpdSLOQ2x4el1tRKdFErJsp48ZK7qDMmIhCKN1FCLMwFEdlH4LgTutwwxh5netg0K3EByldbT4mBEjOyhtFgINWof7Wkx4B6XZgoOn5dEQaFiUExDtDKCn0YhXg8Pgcnvle96TMTVwWiWXB/Pd3Cfmc9IO/iOGh5bH4j03Oofx4qLi063sEUEAVsRaMk06/Hb6T1PdqTxImmmLZMNuvV5mxvVzozevuHwb7R5wNKkgqDX56JUgktq1OfOD53eWxk8G443S0xMg3Fgbwrpv1JHxlUlJST4da08SGI+XEXEUSV7hqSlwpvfFO9nnr+7TCClvUxRrBIgXim5EE9PL/VZ20cW4bPt1W20NqX4v6N/GmNb8b7eyd+m+yOMVyfUkrd7HqSj/73i05mrM0z49MQv4ZUjCoU8CWD8DrbPN5csBx7b1O8z43UjXu5FmTTGnNxIxgGzX8oi85J1NleHz89saD/vK2Sgd4pT+IRx3VetQ4GBRXpbtfMdVEVNbzUIXUBYIbGwsuGNpKw3/KcePasjQgLqbPnQxEA8F/uEfn90C3XYo9/RKOlmcR/ZbjFFWvhf8ma73F3oL3mr5IZK5dXuZgNdWnxtejBk9dPPmBCTCRb+lmMtDyNsjlAZ5hP3+9iDaHuU639G8148MPU7j8wyHsydYtkb1p7+MvxLCJlbQghtz0h7w9gPlsK9HfokB6zjnwwkXG/BF9+zhTjeBmctjmFdOtbMnQMs4yHsfgy/8Qt9Zqm4g8B5NRAmbHR+bXUvz6YjCIU5H081IW9mcvOsqvjTr88xj9JPZhoErmSXRzsj5C+1anE9E+1cHmNexd2Dqvh8v+HFIrsCSKvsMbTKc2CCsxATApTiovViOjAkw0muk/gyDvUDhgVXzIKaMzj9NI1gRnkgF4SSwpqF7DsarN0J3NnYw9G8KEx6stZkp9plsPyJjty7poxX/wTfREmwY8Pexel821jKnVbj4MsGvFdCePCATwpHQAZt5JAi4lLtXHNieWSslLBU+Y0/0M1mt83Dnhj8Cga+wKw82DgeJaX2i4oze6Aw2vl8I72dBIwYSxiPm7zPgd9Af1Yx1HKgK4oVT8SKxMVtIqXeBuEhFSyC0lNOdE8hxcEMtGx9Yri66xVGt1lyySi+60vi18cXYq9RIngjTQpydBzfiJ1+zKyNVh+rKJg22xYKyw8TqxL6w54lsNx8tPa5Gc6WySKTpmrYfJP4EoraIrzRIanVKqa+WUGDHlzlSn3Dq8DGmlN6KMYtpDJ+2+aVoAK1CaOSZ1AGj1EiSDMXHM+ohlmHVOjZUJwOCxHaAgeEU4fiTmkPjIj5IgIXHMuHyRmKk3nIsvZgP/tyHl4iUJQtUeanNMI24u0SCAXuH5I7nDMb4Wb8ENudKZY+X6hf636axgqmyjz1PZBxqa1QDY87RF3eAC/fKx8ruRT3eqfeSMMgjc3iCQB1o9DMr2aZyb4PnPWWXq3KgQeDkLp4XY3pYREie8BGkBD/iT1mxthMazPFXVc4nDjCADBD2Ux58IYBKYp8ZpoeAacldLDqmrOGsDCsfQdvE6ula8NOeMZHUgx2pQBlV73ki3xSvUqkZU8pB/UmGAtYDhYyP7TiMXYWC70cz7bJQ3/tV2RvLoYurxxKnIM2TxP39zhBXHLjSJYNvIxSZLONSx/kBTlWyYk7PWOyI1s8ylznzp/3QAYu4TpGrywPBgXylFbbOsJwiLtb84KtRxJvrf0lNOoUpM11NdriwoF5RDVglNzeq0V2oL8/kRt6JoubA9p7nhQ+1wFNWGwF1GV5+IvLpqruPFmjGMbHVM2M+ozZ2IocgtXkvzOzvfDKJXoxDo+CB+ToIuMmA5bnquXYNdhYKC3zQK8POjsb/8QCvigAJOOiOQ2V9sxuyxrOOyA0Zu2YcAUWWlbi3360xeTbk0rtQXC5PtZyV6aISn83+0bkDTGXPTHtCb5M5gMzZySVHEJGDS/27Bd17OSeKMIOOlZ5onNK83OQhBTP5jimzKRFvkGYvXVk0CizIJh6vphkdsbTrbDqJa5et91Ih8UCxobd06mE8U+Bw6mt0BCuRKzUkfr2xA014ujBbsfXyMWFAQ1nIHJphzxSffQY5dBoTkqvt6kZ7530D0J7rwg0WjHFWpdjXdMf3MPyZaw7AR13eaDF3gekRL6aNW3mdSYQdVZHk2RYvimNBj8Wb4UqR05q7R5vg51NXfU54IICAePFFRvATm6wd+BWvsZXKm/oJ/VBh/dVbnOal9Duz8EBhD2Dk/PWqr0aMJZ0AneKesaItZM6JKlk4Y+m8mQH9uMTSTcpxB8aJ4utaForJ+7lWEvTJWpHoPnJAXNuem821usuV0m3daFEXyFEAhERiFd6tmePUx1L6qayDf5Ho/mpcvmKodNXak+g28GQgUrKdfMKD+XnEF7PY84yoRVWVifatiqozZNI/uZGcocSFZextIzxV/SzgpVNKDI91o1NpQpGKoIgC7G5tr5jPJySuErnzwcg5GsrkffSmPIgMNdCnM2PBXfLOkKmNRjFWlch/c/nH3zMU3aRm3Mq2KMAg+QAnr0RqMhe2LN6s74r54P54IavIZvL//edo6Wdpzie61far0siNb8SLru2jnkLIVTecUI5ylOBAcZlnOLY3yEKzReU+p/EU+epG8MDUc8ziLB930sTJOqcTTUe3hLHJcgx+V21mDb7XtJMOXTKl5NvS6JFj3YZ0s5byONtJh5upTYa4MPJRZXFYAxyhTeXFHiHEWifMQl4qZdkSHFak+5erOfrke2e/vK3iZPMHUFaLkgeBRfRtQzzXoq/iOG7koCYeFFaCQRrHUBoMteBNOvnam+j6xHC/m3k0Oqm+eNP0cOSe5ro0btXghAjKnGyb2S1sPifG+upkLUHmKxHw0Q/LH/5mqRbHVvngmcbiJ6vOC7LjDK7WQ6pdJQJ8IkCuzzVGSxVjlG+bg0zphEUWY5r/IQPFnOSvEQVtgiLbFS+xwz0m0Bvx6IXvxz4l0OyytT02gbzThgcKziyRsqLyJxFU2iqxDA7OOyMroSkx134qxqiRa65NSGj/nEveNW/twJJLZvA4dyf3snPyzkTLoOWO9IbkGAn0HBlDZtUxjxEglSMnMTwit2qXFwMT3D1URkeTHS9YwhJ3XsM/l0DIiHRHXpgHvBpRZv4pNUVJzR8rmWzmG0ZQqxFNpIV4cE+Zd43UoOqZAEDXcPWNH2Qv2YQ2HDLptgcxl4pW6ZfFuVwRqmyojsbG//Rf","base64")),C=t("./classes"),o=C.BK,l=C.CR,d=C.LF,g=C.NL,a=C.CB,i=C.BA,v=C.SP,w=C.WJ,v=C.SP,o=C.BK,d=C.LF,g=C.NL,n=C.AI,r=C.AL,y=C.SA,m=C.SG,x=C.XX,u=C.CJ,C.ID,_=C.NS,C.characterClasses,E=t("./pairs"),h=E.DI_BRK,f=E.IN_BRK,s=E.CI_BRK,c=E.CP_BRK,E.PR_BRK,k=E.pairTable,p=function(){function t(t){this.string=t,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null}var e,p,b;return t.prototype.nextCodePoint=function(){var t,e;return t=this.string.charCodeAt(this.pos++),e=this.string.charCodeAt(this.pos),55296<=t&&t<=56319&&56320<=e&&e<=57343?(this.pos++,1024*(t-55296)+(e-56320)+65536):t},p=function(t){switch(t){case n:return r;case y:case m:case x:return r;case u:return _;default:return t}},b=function(t){switch(t){case d:case g:return o;case a:return i;case v:return w;default:return t}},t.prototype.nextCharClass=function(t){return null==t&&(t=!1),p(S.get(this.nextCodePoint()))},e=function(){return function(t,e){this.position=t,this.required=null!=e&&e}}(),t.prototype.nextBreak=function(){var t,n,r;for(null==this.curClass&&(this.curClass=b(this.nextCharClass()));this.pos<this.string.length;){if(this.lastPos=this.pos,n=this.nextClass,this.nextClass=this.nextCharClass(),this.curClass===o||this.curClass===l&&this.nextClass!==d)return this.curClass=b(p(this.nextClass)),new e(this.lastPos,!0);if(null==(t=function(){switch(this.nextClass){case v:return this.curClass;case o:case d:case g:return o;case l:return l;case a:return i}}.call(this))){switch(r=!1,k[this.curClass][this.nextClass]){case h:r=!0;break;case f:r=n===v;break;case s:if(!(r=n===v))continue;break;case c:if(n!==v)continue}if(this.curClass=this.nextClass,r)return new e(this.lastPos)}else if(this.curClass=t,this.nextClass===a)return new e(this.lastPos)}if(this.pos>=this.string.length)return this.lastPos<this.string.length?(this.lastPos=this.string.length,new e(this.string.length)):null},t}(),e.localExports=p}).call(this)},{buffer:60,"./classes":172,"./pairs":174,"unicode-trie":221}],174:[function(t,e,n){(function(){n.DI_BRK=0,n.IN_BRK=1,n.CI_BRK=2,n.CP_BRK=3,n.PR_BRK=4,n.pairTable=[[4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,4,4,4,4,4,4,4],[0,4,4,1,1,4,4,4,4,1,1,0,0,0,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,1,4,4,4,4,1,1,1,1,1,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[4,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,1,1,4,4,4,0,0,1,0,0,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,1,1,4,4,4,0,0,1,1,1,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,1,0,1,1,0,0,4,2,4,1,1,1,1,1,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,0,1,4,4,4,0,0,1,0,0,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[0,4,4,1,0,1,4,4,4,0,0,0,0,0,0,0,1,1,0,0,4,2,4,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,0,1,1,0,4,4,2,4,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,0,0,1,1,1,0,1,1,1,0,0,4,2,4,0,0,0,0,0,0],[1,4,4,1,1,1,4,4,4,1,1,1,1,1,1,1,1,1,1,1,4,2,4,1,1,1,1,1,1],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,1,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,1,1,1,1,0,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,1,1,0],[0,4,4,1,1,1,4,4,4,0,1,0,0,0,0,1,1,1,0,0,4,2,4,0,0,0,0,1,0],[0,4,4,1,1,1,4,4,4,0,0,0,0,0,0,0,1,1,0,0,4,2,4,0,0,0,0,0,1]]}).call(this)},{}],175:[function(t,e,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}}return t},n.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,n,r,i){if(e.subarray&&t.subarray)t.set(e.subarray(n,n+r),i);else for(var o=0;o<r;o++)t[i+o]=e[n+o]},flattenChunks:function(t){var e,n,r,i,o,a;for(r=0,e=0,n=t.length;e<n;e++)r+=t[e].length;for(a=new Uint8Array(r),i=0,e=0,n=t.length;e<n;e++)o=t[e],a.set(o,i),i+=o.length;return a}},o={arraySet:function(t,e,n,r,i){for(var o=0;o<r;o++)t[i+o]=e[n+o]},flattenChunks:function(t){return[].concat.apply([],t)}};n.setTyped=function(t){t?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,o))},n.setTyped(r)},{}],176:[function(t,e,n){"use strict";e.localExports=function(t,e,n,r){for(var i=65535&t|0,o=t>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+e[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}},{}],177:[function(t,e,n){"use strict";e.localExports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],178:[function(t,e,n){"use strict";var r=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();e.localExports=function(t,e,n,i){var o=r,a=i+n;t^=-1;for(var s=i;s<a;s++)t=t>>>8^o[255&(t^e[s])];return-1^t}},{}],179:[function(t,e,n){"use strict";function r(t,e){return t.msg=P[e],e}function i(t){return(t<<1)-(t>4?9:0)}function o(t){for(var e=t.length;--e>=0;)t[e]=0}function a(t){var e=t.state,n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(k.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function s(t,e){C._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,a(t.strm)}function u(t,e){t.pending_buf[t.pending++]=e}function c(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function l(t,e,n,r){var i=t.avail_in;return i>r&&(i=r),0===i?0:(t.avail_in-=i,k.arraySet(e,t.input,t.next_in,i,n),1===t.state.wrap?t.adler=E(t.adler,e,i,n):2===t.state.wrap&&(t.adler=A(t.adler,e,i,n)),t.next_in+=i,t.total_in+=i,i)}function h(t,e){var n,r,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-rt?t.strstart-(t.w_size-rt):0,c=t.window,l=t.w_mask,h=t.prev,f=t.strstart+nt,d=c[o+a-1],p=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(n=e,c[n+a]===p&&c[n+a-1]===d&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<f);if(r=nt-(f-o),o=f-nt,r>a){if(t.match_start=e,a=r,r>=s)break;d=c[o+a-1],p=c[o+a]}}}while((e=h[e&l])>u&&0!=--i);return a<=t.lookahead?a:t.lookahead}function f(t){var e,n,r,i,o,a=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=a+(a-rt)){k.arraySet(t.window,t.window,a,a,0),t.match_start-=a,t.strstart-=a,t.block_start-=a,e=n=t.hash_size;do{r=t.head[--e],t.head[e]=r>=a?r-a:0}while(--n);e=n=a;do{r=t.prev[--e],t.prev[e]=r>=a?r-a:0}while(--n);i+=a}if(0===t.strm.avail_in)break;if(n=l(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=n,t.lookahead+t.insert>=et)for(o=t.strstart-t.insert,t.ins_h=t.window[o],t.ins_h=(t.ins_h<<t.hash_shift^t.window[o+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[o+et-1])&t.hash_mask,t.prev[o&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=o,o++,t.insert--,!(t.lookahead+t.insert<et)););}while(t.lookahead<rt&&0!==t.strm.avail_in)}function d(t,e){for(var n,r;;){if(t.lookahead<rt){if(f(t),t.lookahead<rt&&e===j)return ft;if(0===t.lookahead)break}if(n=0,t.lookahead>=et&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+et-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-rt&&(t.match_length=h(t,n)),t.match_length>=et)if(r=C._tr_tally(t,t.strstart-t.match_start,t.match_length-et),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=et){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+et-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else r=C._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(s(t,!1),0===t.strm.avail_out))return ft}return t.insert=t.strstart<et-1?t.strstart:et-1,e===T?(s(t,!0),0===t.strm.avail_out?pt:gt):t.last_lit&&(s(t,!1),0===t.strm.avail_out)?ft:dt}function p(t,e){for(var n,r,i;;){if(t.lookahead<rt){if(f(t),t.lookahead<rt&&e===j)return ft;if(0===t.lookahead)break}if(n=0,t.lookahead>=et&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+et-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=et-1,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-rt&&(t.match_length=h(t,n),t.match_length<=5&&(t.strategy===z||t.match_length===et&&t.strstart-t.match_start>4096)&&(t.match_length=et-1)),t.prev_length>=et&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-et,r=C._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-et),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+et-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=et-1,t.strstart++,r&&(s(t,!1),0===t.strm.avail_out))return ft}else if(t.match_available){if((r=C._tr_tally(t,0,t.window[t.strstart-1]))&&s(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return ft}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=C._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<et-1?t.strstart:et-1,e===T?(s(t,!0),0===t.strm.avail_out?pt:gt):t.last_lit&&(s(t,!1),0===t.strm.avail_out)?ft:dt}function g(t,e){for(var n,r,i,o,a=t.window;;){if(t.lookahead<=nt){if(f(t),t.lookahead<=nt&&e===j)return ft;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=et&&t.strstart>0&&(i=t.strstart-1,(r=a[i])===a[++i]&&r===a[++i]&&r===a[++i])){o=t.strstart+nt;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o);t.match_length=nt-(o-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=et?(n=C._tr_tally(t,1,t.match_length-et),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=C._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(s(t,!1),0===t.strm.avail_out))return ft}return t.insert=0,e===T?(s(t,!0),0===t.strm.avail_out?pt:gt):t.last_lit&&(s(t,!1),0===t.strm.avail_out)?ft:dt}function _(t,e){for(var n;;){if(0===t.lookahead&&(f(t),0===t.lookahead)){if(e===j)return ft;break}if(t.match_length=0,n=C._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(s(t,!1),0===t.strm.avail_out))return ft}return t.insert=0,e===T?(s(t,!0),0===t.strm.avail_out?pt:gt):t.last_lit&&(s(t,!1),0===t.strm.avail_out)?ft:dt}function y(t,e,n,r,i){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=i}function m(t){t.window_size=2*t.w_size,o(t.head),t.max_lazy_match=S[t.level].max_lazy,t.good_match=S[t.level].good_length,t.nice_match=S[t.level].nice_length,t.max_chain_length=S[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=et-1,t.match_available=0,t.ins_h=0}function v(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=W,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new k.Buf16(2*$),this.dyn_dtree=new k.Buf16(2*(2*J+1)),this.bl_tree=new k.Buf16(2*(2*Q+1)),o(this.dyn_ltree),o(this.dyn_dtree),o(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new k.Buf16(tt+1),this.heap=new k.Buf16(2*X+1),o(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new k.Buf16(2*X+1),o(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function b(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=Z,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?ot:lt,t.adler=2===e.wrap?0:1,e.last_flush=j,C._tr_init(e),B):r(t,R)}function w(t){var e=b(t);return e===B&&m(t.state),e}function x(t,e,n,i,o,a){if(!t)return R;var s=1;if(e===D&&(e=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),o<1||o>Y||n!==W||i<8||i>15||e<0||e>9||a<0||a>G)return r(t,R);8===i&&(i=9);var u=new v;return t.state=u,u.strm=t,u.wrap=s,u.gzhead=null,u.w_bits=i,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+et-1)/et),u.window=new k.Buf8(2*u.w_size),u.head=new k.Buf16(u.hash_size),u.prev=new k.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new k.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=a,u.method=n,w(t)}var S,k=t("../utils/common"),C=t("./trees"),E=t("./adler32"),A=t("./crc32"),P=t("./messages"),j=0,O=1,I=3,T=4,L=5,B=0,N=1,R=-2,M=-3,F=-5,D=-1,z=1,U=2,H=3,G=4,q=0,Z=2,W=8,Y=9,V=15,K=8,X=286,J=30,Q=19,$=2*X+1,tt=15,et=3,nt=258,rt=nt+et+1,it=32,ot=42,at=69,st=73,ut=91,ct=103,lt=113,ht=666,ft=1,dt=2,pt=3,gt=4,_t=3;S=[new y(0,0,0,0,function(t,e){var n=65535;for(n>t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(f(t),0===t.lookahead&&e===j)return ft;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var r=t.block_start+n;if((0===t.strstart||t.strstart>=r)&&(t.lookahead=t.strstart-r,t.strstart=r,s(t,!1),0===t.strm.avail_out))return ft;if(t.strstart-t.block_start>=t.w_size-rt&&(s(t,!1),0===t.strm.avail_out))return ft}return t.insert=0,e===T?(s(t,!0),0===t.strm.avail_out?pt:gt):(t.strstart>t.block_start&&(s(t,!1),t.strm.avail_out),ft)}),new y(4,4,8,4,d),new y(4,5,16,8,d),new y(4,6,32,32,d),new y(4,4,16,16,p),new y(8,16,32,32,p),new y(8,16,128,128,p),new y(8,32,128,256,p),new y(32,128,258,1024,p),new y(32,258,258,4096,p)],n.deflateInit=function(t,e){return x(t,e,W,V,K,q)},n.deflateInit2=x,n.deflateReset=w,n.deflateResetKeep=b,n.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?R:(t.state.gzhead=e,B):R},n.deflate=function(t,e){var n,s,l,h;if(!t||!t.state||e>L||e<0)return t?r(t,R):R;if(s=t.state,!t.output||!t.input&&0!==t.avail_in||s.status===ht&&e!==T)return r(t,0===t.avail_out?F:R);if(s.strm=t,n=s.last_flush,s.last_flush=e,s.status===ot)if(2===s.wrap)t.adler=0,u(s,31),u(s,139),u(s,8),s.gzhead?(u(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),u(s,255&s.gzhead.time),u(s,s.gzhead.time>>8&255),u(s,s.gzhead.time>>16&255),u(s,s.gzhead.time>>24&255),u(s,9===s.level?2:s.strategy>=U||s.level<2?4:0),u(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(u(s,255&s.gzhead.extra.length),u(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=A(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=at):(u(s,0),u(s,0),u(s,0),u(s,0),u(s,0),u(s,9===s.level?2:s.strategy>=U||s.level<2?4:0),u(s,_t),s.status=lt);else{var f=W+(s.w_bits-8<<4)<<8;f|=(s.strategy>=U||s.level<2?0:s.level<6?1:6===s.level?2:3)<<6,0!==s.strstart&&(f|=it),f+=31-f%31,s.status=lt,c(s,f),0!==s.strstart&&(c(s,t.adler>>>16),c(s,65535&t.adler)),t.adler=1}if(s.status===at)if(s.gzhead.extra){for(l=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>l&&(t.adler=A(t.adler,s.pending_buf,s.pending-l,l)),a(t),l=s.pending,s.pending!==s.pending_buf_size));)u(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>l&&(t.adler=A(t.adler,s.pending_buf,s.pending-l,l)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=st)}else s.status=st;if(s.status===st)if(s.gzhead.name){l=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>l&&(t.adler=A(t.adler,s.pending_buf,s.pending-l,l)),a(t),l=s.pending,s.pending===s.pending_buf_size)){h=1;break}h=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,u(s,h)}while(0!==h);s.gzhead.hcrc&&s.pending>l&&(t.adler=A(t.adler,s.pending_buf,s.pending-l,l)),0===h&&(s.gzindex=0,s.status=ut)}else s.status=ut;if(s.status===ut)if(s.gzhead.comment){l=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>l&&(t.adler=A(t.adler,s.pending_buf,s.pending-l,l)),a(t),l=s.pending,s.pending===s.pending_buf_size)){h=1;break}h=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,u(s,h)}while(0!==h);s.gzhead.hcrc&&s.pending>l&&(t.adler=A(t.adler,s.pending_buf,s.pending-l,l)),0===h&&(s.status=ct)}else s.status=ct;if(s.status===ct&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&a(t),s.pending+2<=s.pending_buf_size&&(u(s,255&t.adler),u(s,t.adler>>8&255),t.adler=0,s.status=lt)):s.status=lt),0!==s.pending){if(a(t),0===t.avail_out)return s.last_flush=-1,B}else if(0===t.avail_in&&i(e)<=i(n)&&e!==T)return r(t,F);if(s.status===ht&&0!==t.avail_in)return r(t,F);if(0!==t.avail_in||0!==s.lookahead||e!==j&&s.status!==ht){var d=s.strategy===U?_(s,e):s.strategy===H?g(s,e):S[s.level].func(s,e);if(d!==pt&&d!==gt||(s.status=ht),d===ft||d===pt)return 0===t.avail_out&&(s.last_flush=-1),B;if(d===dt&&(e===O?C._tr_align(s):e!==L&&(C._tr_stored_block(s,0,0,!1),e===I&&(o(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),a(t),0===t.avail_out))return s.last_flush=-1,B}return e!==T?B:s.wrap<=0?N:(2===s.wrap?(u(s,255&t.adler),u(s,t.adler>>8&255),u(s,t.adler>>16&255),u(s,t.adler>>24&255),u(s,255&t.total_in),u(s,t.total_in>>8&255),u(s,t.total_in>>16&255),u(s,t.total_in>>24&255)):(c(s,t.adler>>>16),c(s,65535&t.adler)),a(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?B:N)},n.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==ot&&e!==at&&e!==st&&e!==ut&&e!==ct&&e!==lt&&e!==ht?r(t,R):(t.state=null,e===lt?r(t,M):B):R},n.deflateSetDictionary=function(t,e){var n,r,i,a,s,u,c,l,h=e.length;if(!t||!t.state)return R;if(n=t.state,2===(a=n.wrap)||1===a&&n.status!==ot||n.lookahead)return R;for(1===a&&(t.adler=E(t.adler,e,h,0)),n.wrap=0,h>=n.w_size&&(0===a&&(o(n.head),n.strstart=0,n.block_start=0,n.insert=0),l=new k.Buf8(n.w_size),k.arraySet(l,e,h-n.w_size,n.w_size,0),e=l,h=n.w_size),s=t.avail_in,u=t.next_in,c=t.input,t.avail_in=h,t.next_in=0,t.input=e,f(n);n.lookahead>=et;){r=n.strstart,i=n.lookahead-(et-1);do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+et-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--i);n.strstart=r,n.lookahead=et-1,f(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=et-1,n.match_available=0,t.next_in=u,t.input=c,t.avail_in=s,n.wrap=a,B},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":175,"./adler32":176,"./crc32":178,"./messages":183,"./trees":184}],180:[function(t,e,n){"use strict";e.localExports=function(t,e){var n,r,i,o,a,s,u,c,l,h,f,d,p,g,_,y,m,v,b,w,x,S,k,C,E;n=t.state,r=t.next_in,C=t.input,i=r+(t.avail_in-5),o=t.next_out,E=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),u=n.dmax,c=n.wsize,l=n.whave,h=n.wnext,f=n.window,d=n.hold,p=n.bits,g=n.lencode,_=n.distcode,y=(1<<n.lenbits)-1,m=(1<<n.distbits)-1;t:do{p<15&&(d+=C[r++]<<p,p+=8,d+=C[r++]<<p,p+=8),v=g[d&y];e:for(;;){if(b=v>>>24,d>>>=b,p-=b,0===(b=v>>>16&255))E[o++]=65535&v;else{if(!(16&b)){if(0==(64&b)){v=g[(65535&v)+(d&(1<<b)-1)];continue e}if(32&b){n.mode=12;break t}t.msg="invalid literal/length code",n.mode=30;break t}w=65535&v,(b&=15)&&(p<b&&(d+=C[r++]<<p,p+=8),w+=d&(1<<b)-1,d>>>=b,p-=b),p<15&&(d+=C[r++]<<p,p+=8,d+=C[r++]<<p,p+=8),v=_[d&m];n:for(;;){if(b=v>>>24,d>>>=b,p-=b,!(16&(b=v>>>16&255))){if(0==(64&b)){v=_[(65535&v)+(d&(1<<b)-1)];continue n}t.msg="invalid distance code",n.mode=30;break t}if(x=65535&v,b&=15,p<b&&(d+=C[r++]<<p,(p+=8)<b&&(d+=C[r++]<<p,p+=8)),(x+=d&(1<<b)-1)>u){t.msg="invalid distance too far back",n.mode=30;break t}if(d>>>=b,p-=b,b=o-a,x>b){if((b=x-b)>l&&n.sane){t.msg="invalid distance too far back",n.mode=30;break t}if(S=0,k=f,0===h){if(S+=c-b,b<w){w-=b;do{E[o++]=f[S++]}while(--b);S=o-x,k=E}}else if(h<b){if(S+=c+h-b,(b-=h)<w){w-=b;do{E[o++]=f[S++]}while(--b);if(S=0,h<w){w-=b=h;do{E[o++]=f[S++]}while(--b);S=o-x,k=E}}}else if(S+=h-b,b<w){w-=b;do{E[o++]=f[S++]}while(--b);S=o-x,k=E}for(;w>2;)E[o++]=k[S++],E[o++]=k[S++],E[o++]=k[S++],w-=3;w&&(E[o++]=k[S++],w>1&&(E[o++]=k[S++]))}else{S=o-x;do{E[o++]=E[S++],E[o++]=E[S++],E[o++]=E[S++],w-=3}while(w>2);w&&(E[o++]=E[S++],w>1&&(E[o++]=E[S++]))}break}}break}}while(r<i&&o<s);r-=w=p>>3,d&=(1<<(p-=w<<3))-1,t.next_in=r,t.next_out=o,t.avail_in=r<i?i-r+5:5-(r-i),t.avail_out=o<s?s-o+257:257-(o-s),n.hold=d,n.bits=p}},{}],181:[function(t,e,n){"use strict";function r(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new d.Buf16(320),this.work=new d.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=T,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new d.Buf32(lt),e.distcode=e.distdyn=new d.Buf32(ht),e.sane=1,e.back=-1,k):A}function a(t){var e;return t&&t.state?(e=t.state,e.wsize=0,e.whave=0,e.wnext=0,o(t)):A}function s(t,e){var n,r;return t&&t.state?(r=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?A:(null!==r.window&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,a(t))):A}function u(t,e){var n,r;return t?(r=new i,t.state=r,r.window=null,(n=s(t,e))!==k&&(t.state=null),n):A}function c(t){if(dt){var e;for(h=new d.Buf32(512),f=new d.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(y(v,t.lens,0,288,h,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;y(b,t.lens,0,32,f,0,t.work,{bits:5}),dt=!1}t.lencode=h,t.lenbits=9,t.distcode=f,t.distbits=5}function l(t,e,n,r){var i,o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new d.Buf8(o.wsize)),r>=o.wsize?(d.arraySet(o.window,e,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>r&&(i=r),d.arraySet(o.window,e,n-r,i,o.wnext),(r-=i)?(d.arraySet(o.window,e,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}var h,f,d=t("../utils/common"),p=t("./adler32"),g=t("./crc32"),_=t("./inffast"),y=t("./inftrees"),m=0,v=1,b=2,w=4,x=5,S=6,k=0,C=1,E=2,A=-2,P=-3,j=-4,O=-5,I=8,T=1,L=2,B=3,N=4,R=5,M=6,F=7,D=8,z=9,U=10,H=11,G=12,q=13,Z=14,W=15,Y=16,V=17,K=18,X=19,J=20,Q=21,$=22,tt=23,et=24,nt=25,rt=26,it=27,ot=28,at=29,st=30,ut=31,ct=32,lt=852,ht=592,ft=15,dt=!0;n.inflateReset=a,n.inflateReset2=s,n.inflateResetKeep=o,n.inflateInit=function(t){return u(t,ft)},n.inflateInit2=u,n.inflate=function(t,e){var n,i,o,a,s,u,h,f,lt,ht,ft,dt,pt,gt,_t,yt,mt,vt,bt,wt,xt,St,kt,Ct,Et=0,At=new d.Buf8(4),Pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return A;(n=t.state).mode===G&&(n.mode=q),s=t.next_out,o=t.output,h=t.avail_out,a=t.next_in,i=t.input,u=t.avail_in,f=n.hold,lt=n.bits,ht=u,ft=h,St=k;t:for(;;)switch(n.mode){case T:if(0===n.wrap){n.mode=q;break}for(;lt<16;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}if(2&n.wrap&&35615===f){n.check=0,At[0]=255&f,At[1]=f>>>8&255,n.check=g(n.check,At,2,0),f=0,lt=0,n.mode=L;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&f)<<8)+(f>>8))%31){t.msg="incorrect header check",n.mode=st;break}if((15&f)!==I){t.msg="unknown compression method",n.mode=st;break}if(f>>>=4,lt-=4,xt=8+(15&f),0===n.wbits)n.wbits=xt;else if(xt>n.wbits){t.msg="invalid window size",n.mode=st;break}n.dmax=1<<xt,t.adler=n.check=1,n.mode=512&f?U:G,f=0,lt=0;break;case L:for(;lt<16;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}if(n.flags=f,(255&n.flags)!==I){t.msg="unknown compression method",n.mode=st;break}if(57344&n.flags){t.msg="unknown header flags set",n.mode=st;break}n.head&&(n.head.text=f>>8&1),512&n.flags&&(At[0]=255&f,At[1]=f>>>8&255,n.check=g(n.check,At,2,0)),f=0,lt=0,n.mode=B;case B:for(;lt<32;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}n.head&&(n.head.time=f),512&n.flags&&(At[0]=255&f,At[1]=f>>>8&255,At[2]=f>>>16&255,At[3]=f>>>24&255,n.check=g(n.check,At,4,0)),f=0,lt=0,n.mode=N;case N:for(;lt<16;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}n.head&&(n.head.xflags=255&f,n.head.os=f>>8),512&n.flags&&(At[0]=255&f,At[1]=f>>>8&255,n.check=g(n.check,At,2,0)),f=0,lt=0,n.mode=R;case R:if(1024&n.flags){for(;lt<16;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}n.length=f,n.head&&(n.head.extra_len=f),512&n.flags&&(At[0]=255&f,At[1]=f>>>8&255,n.check=g(n.check,At,2,0)),f=0,lt=0}else n.head&&(n.head.extra=null);n.mode=M;case M:if(1024&n.flags&&((dt=n.length)>u&&(dt=u),dt&&(n.head&&(xt=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),d.arraySet(n.head.extra,i,a,dt,xt)),512&n.flags&&(n.check=g(n.check,i,dt,a)),u-=dt,a+=dt,n.length-=dt),n.length))break t;n.length=0,n.mode=F;case F:if(2048&n.flags){if(0===u)break t;dt=0;do{xt=i[a+dt++],n.head&&xt&&n.length<65536&&(n.head.name+=String.fromCharCode(xt))}while(xt&&dt<u);if(512&n.flags&&(n.check=g(n.check,i,dt,a)),u-=dt,a+=dt,xt)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=D;case D:if(4096&n.flags){if(0===u)break t;dt=0;do{xt=i[a+dt++],n.head&&xt&&n.length<65536&&(n.head.comment+=String.fromCharCode(xt))}while(xt&&dt<u);if(512&n.flags&&(n.check=g(n.check,i,dt,a)),u-=dt,a+=dt,xt)break t}else n.head&&(n.head.comment=null);n.mode=z;case z:if(512&n.flags){for(;lt<16;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}if(f!==(65535&n.check)){t.msg="header crc mismatch",n.mode=st;break}f=0,lt=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=G;break;case U:for(;lt<32;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}t.adler=n.check=r(f),f=0,lt=0,n.mode=H;case H:if(0===n.havedict)return t.next_out=s,t.avail_out=h,t.next_in=a,t.avail_in=u,n.hold=f,n.bits=lt,E;t.adler=n.check=1,n.mode=G;case G:if(e===x||e===S)break t;case q:if(n.last){f>>>=7&lt,lt-=7&lt,n.mode=it;break}for(;lt<3;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}switch(n.last=1&f,f>>>=1,lt-=1,3&f){case 0:n.mode=Z;break;case 1:if(c(n),n.mode=J,e===S){f>>>=2,lt-=2;break t}break;case 2:n.mode=V;break;case 3:t.msg="invalid block type",n.mode=st}f>>>=2,lt-=2;break;case Z:for(f>>>=7&lt,lt-=7&lt;lt<32;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}if((65535&f)!=(f>>>16^65535)){t.msg="invalid stored block lengths",n.mode=st;break}if(n.length=65535&f,f=0,lt=0,n.mode=W,e===S)break t;case W:n.mode=Y;case Y:if(dt=n.length){if(dt>u&&(dt=u),dt>h&&(dt=h),0===dt)break t;d.arraySet(o,i,a,dt,s),u-=dt,a+=dt,h-=dt,s+=dt,n.length-=dt;break}n.mode=G;break;case V:for(;lt<14;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}if(n.nlen=257+(31&f),f>>>=5,lt-=5,n.ndist=1+(31&f),f>>>=5,lt-=5,n.ncode=4+(15&f),f>>>=4,lt-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=st;break}n.have=0,n.mode=K;case K:for(;n.have<n.ncode;){for(;lt<3;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}n.lens[Pt[n.have++]]=7&f,f>>>=3,lt-=3}for(;n.have<19;)n.lens[Pt[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,kt={bits:n.lenbits},St=y(m,n.lens,0,19,n.lencode,0,n.work,kt),n.lenbits=kt.bits,St){t.msg="invalid code lengths set",n.mode=st;break}n.have=0,n.mode=X;case X:for(;n.have<n.nlen+n.ndist;){for(;Et=n.lencode[f&(1<<n.lenbits)-1],_t=Et>>>24,yt=Et>>>16&255,mt=65535&Et,!(_t<=lt);){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}if(mt<16)f>>>=_t,lt-=_t,n.lens[n.have++]=mt;else{if(16===mt){for(Ct=_t+2;lt<Ct;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}if(f>>>=_t,lt-=_t,0===n.have){t.msg="invalid bit length repeat",n.mode=st;break}xt=n.lens[n.have-1],dt=3+(3&f),f>>>=2,lt-=2}else if(17===mt){for(Ct=_t+3;lt<Ct;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}lt-=_t,xt=0,dt=3+(7&(f>>>=_t)),f>>>=3,lt-=3}else{for(Ct=_t+7;lt<Ct;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}lt-=_t,xt=0,dt=11+(127&(f>>>=_t)),f>>>=7,lt-=7}if(n.have+dt>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=st;break}for(;dt--;)n.lens[n.have++]=xt}}if(n.mode===st)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=st;break}if(n.lenbits=9,kt={bits:n.lenbits},St=y(v,n.lens,0,n.nlen,n.lencode,0,n.work,kt),n.lenbits=kt.bits,St){t.msg="invalid literal/lengths set",n.mode=st;break}if(n.distbits=6,n.distcode=n.distdyn,kt={bits:n.distbits},St=y(b,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,kt),n.distbits=kt.bits,St){t.msg="invalid distances set",n.mode=st;break}if(n.mode=J,e===S)break t;case J:n.mode=Q;case Q:if(u>=6&&h>=258){t.next_out=s,t.avail_out=h,t.next_in=a,t.avail_in=u,n.hold=f,n.bits=lt,_(t,ft),s=t.next_out,o=t.output,h=t.avail_out,a=t.next_in,i=t.input,u=t.avail_in,f=n.hold,lt=n.bits,n.mode===G&&(n.back=-1);break}for(n.back=0;Et=n.lencode[f&(1<<n.lenbits)-1],_t=Et>>>24,yt=Et>>>16&255,mt=65535&Et,!(_t<=lt);){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}if(yt&&0==(240&yt)){for(vt=_t,bt=yt,wt=mt;Et=n.lencode[wt+((f&(1<<vt+bt)-1)>>vt)],_t=Et>>>24,yt=Et>>>16&255,mt=65535&Et,!(vt+_t<=lt);){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}f>>>=vt,lt-=vt,n.back+=vt}if(f>>>=_t,lt-=_t,n.back+=_t,n.length=mt,0===yt){n.mode=rt;break}if(32&yt){n.back=-1,n.mode=G;break}if(64&yt){t.msg="invalid literal/length code",n.mode=st;break}n.extra=15&yt,n.mode=$;case $:if(n.extra){for(Ct=n.extra;lt<Ct;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}n.length+=f&(1<<n.extra)-1,f>>>=n.extra,lt-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=tt;case tt:for(;Et=n.distcode[f&(1<<n.distbits)-1],_t=Et>>>24,yt=Et>>>16&255,mt=65535&Et,!(_t<=lt);){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}if(0==(240&yt)){for(vt=_t,bt=yt,wt=mt;Et=n.distcode[wt+((f&(1<<vt+bt)-1)>>vt)],_t=Et>>>24,yt=Et>>>16&255,mt=65535&Et,!(vt+_t<=lt);){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}f>>>=vt,lt-=vt,n.back+=vt}if(f>>>=_t,lt-=_t,n.back+=_t,64&yt){t.msg="invalid distance code",n.mode=st;break}n.offset=mt,n.extra=15&yt,n.mode=et;case et:if(n.extra){for(Ct=n.extra;lt<Ct;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}n.offset+=f&(1<<n.extra)-1,f>>>=n.extra,lt-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=st;break}n.mode=nt;case nt:if(0===h)break t;if(dt=ft-h,n.offset>dt){if((dt=n.offset-dt)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=st;break}dt>n.wnext?(dt-=n.wnext,pt=n.wsize-dt):pt=n.wnext-dt,dt>n.length&&(dt=n.length),gt=n.window}else gt=o,pt=s-n.offset,dt=n.length;dt>h&&(dt=h),h-=dt,n.length-=dt;do{o[s++]=gt[pt++]}while(--dt);0===n.length&&(n.mode=Q);break;case rt:if(0===h)break t;o[s++]=n.length,h--,n.mode=Q;break;case it:if(n.wrap){for(;lt<32;){if(0===u)break t;u--,f|=i[a++]<<lt,lt+=8}if(ft-=h,t.total_out+=ft,n.total+=ft,ft&&(t.adler=n.check=n.flags?g(n.check,o,ft,s-ft):p(n.check,o,ft,s-ft)),ft=h,(n.flags?f:r(f))!==n.check){t.msg="incorrect data check",n.mode=st;break}f=0,lt=0}n.mode=ot;case ot:if(n.wrap&&n.flags){for(;lt<32;){if(0===u)break t;u--,f+=i[a++]<<lt,lt+=8}if(f!==(4294967295&n.total)){t.msg="incorrect length check",n.mode=st;break}f=0,lt=0}n.mode=at;case at:St=C;break t;case st:St=P;break t;case ut:return j;case ct:default:return A}return t.next_out=s,t.avail_out=h,t.next_in=a,t.avail_in=u,n.hold=f,n.bits=lt,(n.wsize||ft!==t.avail_out&&n.mode<st&&(n.mode<it||e!==w))&&l(t,t.output,t.next_out,ft-t.avail_out)?(n.mode=ut,j):(ht-=t.avail_in,ft-=t.avail_out,t.total_in+=ht,t.total_out+=ft,n.total+=ft,n.wrap&&ft&&(t.adler=n.check=n.flags?g(n.check,o,ft,t.next_out-ft):p(n.check,o,ft,t.next_out-ft)),t.data_type=n.bits+(n.last?64:0)+(n.mode===G?128:0)+(n.mode===J||n.mode===W?256:0),(0===ht&&0===ft||e===w)&&St===k&&(St=O),St)},n.inflateEnd=function(t){if(!t||!t.state)return A;var e=t.state;return e.window&&(e.window=null),t.state=null,k},n.inflateGetHeader=function(t,e){var n;return t&&t.state?0==(2&(n=t.state).wrap)?A:(n.head=e,e.done=!1,k):A},n.inflateSetDictionary=function(t,e){var n,r,i=e.length;return t&&t.state?0!==(n=t.state).wrap&&n.mode!==H?A:n.mode===H&&(r=1,(r=p(r,e,i,0))!==n.check)?P:l(t,e,i,i)?(n.mode=ut,j):(n.havedict=1,k):A},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":175,"./adler32":176,"./crc32":178,"./inffast":180,"./inftrees":182}],182:[function(t,e,n){"use strict";var r=t("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.localExports=function(t,e,n,u,c,l,h,f){var d,p,g,_,y,m,v,b,w,x=f.bits,S=0,k=0,C=0,E=0,A=0,P=0,j=0,O=0,I=0,T=0,L=null,B=0,N=new r.Buf16(16),R=new r.Buf16(16),M=null,F=0;for(S=0;S<=15;S++)N[S]=0;for(k=0;k<u;k++)N[e[n+k]]++;for(A=x,E=15;E>=1&&0===N[E];E--);if(A>E&&(A=E),0===E)return c[l++]=20971520,c[l++]=20971520,f.bits=1,0;for(C=1;C<E&&0===N[C];C++);for(A<C&&(A=C),O=1,S=1;S<=15;S++)if(O<<=1,(O-=N[S])<0)return-1;if(O>0&&(0===t||1!==E))return-1;for(R[1]=0,S=1;S<15;S++)R[S+1]=R[S]+N[S];for(k=0;k<u;k++)0!==e[n+k]&&(h[R[e[n+k]]++]=k);if(0===t?(L=M=h,m=19):1===t?(L=i,B-=257,M=o,F-=257,m=256):(L=a,M=s,m=-1),T=0,k=0,S=C,y=l,P=A,j=0,g=-1,I=1<<A,_=I-1,1===t&&I>852||2===t&&I>592)return 1;for(;;){0,v=S-j,h[k]<m?(b=0,w=h[k]):h[k]>m?(b=M[F+h[k]],w=L[B+h[k]]):(b=96,w=0),d=1<<S-j,C=p=1<<P;do{c[y+(T>>j)+(p-=d)]=v<<24|b<<16|w|0}while(0!==p);for(d=1<<S-1;T&d;)d>>=1;if(0!==d?(T&=d-1,T+=d):T=0,k++,0==--N[S]){if(S===E)break;S=e[n+h[k]]}if(S>A&&(T&_)!==g){for(0===j&&(j=A),y+=C,O=1<<(P=S-j);P+j<E&&!((O-=N[P+j])<=0);)P++,O<<=1;if(I+=1<<P,1===t&&I>852||2===t&&I>592)return 1;c[g=T&_]=A<<24|P<<16|y-l|0}}return 0!==T&&(c[y+T]=S-j<<24|64<<16|0),f.bits=A,0}},{"../utils/common":175}],183:[function(t,e,n){"use strict";e.localExports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],184:[function(t,e,n){"use strict";function r(t){for(var e=t.length;--e>=0;)t[e]=0}function i(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}function o(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function a(t){return t<256?et[t]:et[256+(t>>>7)]}function s(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function u(t,e,n){t.bi_valid>G-n?(t.bi_buf|=e<<t.bi_valid&65535,s(t,t.bi_buf),t.bi_buf=e>>G-t.bi_valid,t.bi_valid+=n-G):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)}function c(t,e,n){u(t,n[2*e],n[2*e+1])}function l(t,e){var n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}function h(t){16===t.bi_valid?(s(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function f(t,e){var n,r,i,o,a,s,u=e.dyn_tree,c=e.max_code,l=e.stat_desc.static_tree,h=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(o=0;o<=H;o++)t.bl_count[o]=0;for(u[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<U;n++)(o=u[2*u[2*(r=t.heap[n])+1]+1]+1)>p&&(o=p,g++),u[2*r+1]=o,r>c||(t.bl_count[o]++,a=0,r>=d&&(a=f[r-d]),s=u[2*r],t.opt_len+=s*(o+a),h&&(t.static_len+=s*(l[2*r+1]+a)));if(0!==g){do{for(o=p-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(o=p;0!==o;o--)for(r=t.bl_count[o];0!==r;)(i=t.heap[--n])>c||(u[2*i+1]!==o&&(t.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),r--)}}function d(t,e,n){var r,i,o=new Array(H+1),a=0;for(r=1;r<=H;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=l(o[s]++,s))}}function p(){var t,e,n,r,o,a=new Array(H+1);for(n=0,r=0;r<R-1;r++)for(rt[r]=n,t=0;t<1<<K[r];t++)nt[n++]=r;for(nt[n-1]=r,o=0,r=0;r<16;r++)for(it[r]=o,t=0;t<1<<X[r];t++)et[o++]=r;for(o>>=7;r<D;r++)for(it[r]=o<<7,t=0;t<1<<X[r]-7;t++)et[256+o++]=r;for(e=0;e<=H;e++)a[e]=0;for(t=0;t<=143;)$[2*t+1]=8,t++,a[8]++;for(;t<=255;)$[2*t+1]=9,t++,a[9]++;for(;t<=279;)$[2*t+1]=7,t++,a[7]++;for(;t<=287;)$[2*t+1]=8,t++,a[8]++;for(d($,F+1,a),t=0;t<D;t++)tt[2*t+1]=5,tt[2*t]=l(t,5);ot=new i($,K,M+1,F,H),at=new i(tt,X,0,D,H),st=new i(new Array(0),J,0,z,q)}function g(t){var e;for(e=0;e<F;e++)t.dyn_ltree[2*e]=0;for(e=0;e<D;e++)t.dyn_dtree[2*e]=0;for(e=0;e<z;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*Z]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function _(t){t.bi_valid>8?s(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function y(t,e,n,r){_(t),r&&(s(t,n),s(t,~n)),P.arraySet(t.pending_buf,t.window,e,n,t.pending),t.pending+=n}function m(t,e,n,r){var i=2*e,o=2*n;return t[i]<t[o]||t[i]===t[o]&&r[e]<=r[n]}function v(t,e,n){for(var r=t.heap[n],i=n<<1;i<=t.heap_len&&(i<t.heap_len&&m(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!m(e,r,t.heap[i],t.depth));)t.heap[n]=t.heap[i],n=i,i<<=1;t.heap[n]=r}function b(t,e,n){var r,i,o,s,l=0;if(0!==t.last_lit)do{r=t.pending_buf[t.d_buf+2*l]<<8|t.pending_buf[t.d_buf+2*l+1],i=t.pending_buf[t.l_buf+l],l++,0===r?c(t,i,e):(c(t,(o=nt[i])+M+1,e),0!==(s=K[o])&&u(t,i-=rt[o],s),c(t,o=a(--r),n),0!==(s=X[o])&&u(t,r-=it[o],s))}while(l<t.last_lit);c(t,Z,e)}function w(t,e){var n,r,i,o=e.dyn_tree,a=e.stat_desc.static_tree,s=e.stat_desc.has_stree,u=e.stat_desc.elems,c=-1;for(t.heap_len=0,t.heap_max=U,n=0;n<u;n++)0!==o[2*n]?(t.heap[++t.heap_len]=c=n,t.depth[n]=0):o[2*n+1]=0;for(;t.heap_len<2;)o[2*(i=t.heap[++t.heap_len]=c<2?++c:0)]=1,t.depth[i]=0,t.opt_len--,s&&(t.static_len-=a[2*i+1]);for(e.max_code=c,n=t.heap_len>>1;n>=1;n--)v(t,o,n);i=u;do{n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],v(t,o,1),r=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=r,o[2*i]=o[2*n]+o[2*r],t.depth[i]=(t.depth[n]>=t.depth[r]?t.depth[n]:t.depth[r])+1,o[2*n+1]=o[2*r+1]=i,t.heap[1]=i++,v(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],f(t,e),d(o,c,t.bl_count)}function x(t,e,n){var r,i,o=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),e[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=e[2*(r+1)+1],++s<u&&i===a||(s<c?t.bl_tree[2*i]+=s:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[2*W]++):s<=10?t.bl_tree[2*Y]++:t.bl_tree[2*V]++,s=0,o=i,0===a?(u=138,c=3):i===a?(u=6,c=3):(u=7,c=4))}function S(t,e,n){var r,i,o=-1,a=e[1],s=0,l=7,h=4;for(0===a&&(l=138,h=3),r=0;r<=n;r++)if(i=a,a=e[2*(r+1)+1],!(++s<l&&i===a)){if(s<h)do{c(t,i,t.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(c(t,i,t.bl_tree),s--),c(t,W,t.bl_tree),u(t,s-3,2)):s<=10?(c(t,Y,t.bl_tree),u(t,s-3,3)):(c(t,V,t.bl_tree),u(t,s-11,7));s=0,o=i,0===a?(l=138,h=3):i===a?(l=6,h=3):(l=7,h=4)}}function k(t){var e;for(x(t,t.dyn_ltree,t.l_desc.max_code),x(t,t.dyn_dtree,t.d_desc.max_code),w(t,t.bl_desc),e=z-1;e>=3&&0===t.bl_tree[2*Q[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function C(t,e,n,r){var i;for(u(t,e-257,5),u(t,n-1,5),u(t,r-4,4),i=0;i<r;i++)u(t,t.bl_tree[2*Q[i]+1],3);S(t,t.dyn_ltree,e-1),S(t,t.dyn_dtree,n-1)}function E(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return O;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return I;for(e=32;e<M;e++)if(0!==t.dyn_ltree[2*e])return I;return O}function A(t,e,n,r){u(t,(L<<1)+(r?1:0),3),y(t,e,n,!0)}var P=t("../utils/common"),j=4,O=0,I=1,T=2,L=0,B=1,N=2,R=29,M=256,F=M+1+R,D=30,z=19,U=2*F+1,H=15,G=16,q=7,Z=256,W=16,Y=17,V=18,K=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],X=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],J=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],$=new Array(2*(F+2));r($);var tt=new Array(2*D);r(tt);var et=new Array(512);r(et);var nt=new Array(256);r(nt);var rt=new Array(R);r(rt);var it=new Array(D);r(it);var ot,at,st,ut=!1;n._tr_init=function(t){ut||(p(),ut=!0),t.l_desc=new o(t.dyn_ltree,ot),t.d_desc=new o(t.dyn_dtree,at),t.bl_desc=new o(t.bl_tree,st),t.bi_buf=0,t.bi_valid=0,g(t)},n._tr_stored_block=A,n._tr_flush_block=function(t,e,n,r){var i,o,a=0;t.level>0?(t.strm.data_type===T&&(t.strm.data_type=E(t)),w(t,t.l_desc),w(t,t.d_desc),a=k(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==e?A(t,e,n,r):t.strategy===j||o===i?(u(t,(B<<1)+(r?1:0),3),b(t,$,tt)):(u(t,(N<<1)+(r?1:0),3),C(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),b(t,t.dyn_ltree,t.dyn_dtree)),g(t),r&&_(t)},n._tr_tally=function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(nt[n]+M+1)]++,t.dyn_dtree[2*a(e)]++),t.last_lit===t.lit_bufsize-1},n._tr_align=function(t){u(t,B<<1,3),c(t,Z,$),h(t)}},{"../utils/common":175}],185:[function(t,e,n){"use strict";e.localExports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],186:[function(t,e,n){(function(n){(function(){var r,i;r=t("fs"),i=t("zlib"),e.localExports=function(){function t(t){var e,r,i,o,a,s,u,c,l,h;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.text={};;){switch(e=this.readUInt32(),function(){var t,e;for(e=[],i=t=0;t<4;i=++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"PLTE":this.palette=this.read(e);break;case"IDAT":for(i=c=0;c<e;i=c+=1)this.imgData.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(e),(s=255-this.transparency.indexed.length)>0)for(i=l=0;0<=s?l<s:l>s;i=0<=s?++l:--l)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":o=(u=this.read(e)).indexOf(0),a=String.fromCharCode.apply(String,u.slice(0,o)),this.text[a]=String.fromCharCode.apply(String,u.slice(o+1));break;case"IEND":return this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(h=this.colorType)||6===h,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new n(this.imgData));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return t.decode=function(e,n){return r.readFile(e,function(e,r){return new t(r).decode(function(t){return n(t)})})},t.load=function(e){var n;return n=r.readFileSync(e),new t(n)},t.prototype.read=function(t){var e,n;for(n=[],e=0;0<=t?e<t:e>t;0<=t?++e:--e)n.push(this.data[this.pos++]);return n},t.prototype.readUInt32=function(){var t,e,n,r;return t=this.data[this.pos++]<<24,e=this.data[this.pos++]<<16,n=this.data[this.pos++]<<8,r=this.data[this.pos++],t|e|n|r},t.prototype.readUInt16=function(){var t,e;return t=this.data[this.pos++]<<8,e=this.data[this.pos++],t|e},t.prototype.decodePixels=function(t){var e=this;return i.inflate(this.imgData,function(r,i){var o,a,s,u,c,l,h,f,d,p,g,_,y,m,v,b,w,x,S,k,C,E,A;if(r)throw r;for(b=(_=e.pixelBitlength/8)*e.width,y=new n(b*e.height),l=i.length,v=0,m=0,a=0;m<l;){switch(i[m++]){case 0:for(u=S=0;S<b;u=S+=1)y[a++]=i[m++];break;case 1:for(u=k=0;k<b;u=k+=1)o=i[m++],c=u<_?0:y[a-_],y[a++]=(o+c)%256;break;case 2:for(u=C=0;C<b;u=C+=1)o=i[m++],s=(u-u%_)/_,w=v&&y[(v-1)*b+s*_+u%_],y[a++]=(w+o)%256;break;case 3:for(u=E=0;E<b;u=E+=1)o=i[m++],s=(u-u%_)/_,c=u<_?0:y[a-_],w=v&&y[(v-1)*b+s*_+u%_],y[a++]=(o+Math.floor((c+w)/2))%256;break;case 4:for(u=A=0;A<b;u=A+=1)o=i[m++],s=(u-u%_)/_,c=u<_?0:y[a-_],0===v?w=x=0:(w=y[(v-1)*b+s*_+u%_],x=s&&y[(v-1)*b+(s-1)*_+u%_]),h=c+w-x,f=Math.abs(h-c),p=Math.abs(h-w),g=Math.abs(h-x),d=f<=p&&f<=g?c:p<=g?w:x,y[a++]=(o+d)%256;break;default:throw new Error("Invalid filter algorithm: "+i[m-1])}v++}return t(y)})},t.prototype.decodePalette=function(){var t,e,r,i,o,a,s,u,c;for(r=this.palette,a=this.transparency.indexed||[],o=new n(a.length+r.length),i=0,r.length,t=0,e=s=0,u=r.length;s<u;e=s+=3)o[i++]=r[e],o[i++]=r[e+1],o[i++]=r[e+2],o[i++]=null!=(c=a[t++])?c:255;return o},t.prototype.copyToImageData=function(t,e){var n,r,i,o,a,s,u,c,l,h,f;if(r=this.colors,l=null,n=this.hasAlphaChannel,this.palette.length&&(l=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),r=4,n=!0),i=(null!=t?t.data:void 0)||t,c=i.length,a=l||e,o=s=0,1===r)for(;o<c;)u=l?4*e[o/4]:s,h=a[u++],i[o++]=h,i[o++]=h,i[o++]=h,i[o++]=n?a[u++]:255,s=u;else for(;o<c;)u=l?4*e[o/4]:s,i[o++]=a[u++],i[o++]=a[u++],i[o++]=a[u++],i[o++]=n?a[u++]:255,s=u},t.prototype.decode=function(t){var e,r=this;return e=new n(this.width*this.height*4),this.decodePixels(function(n){return r.copyToImageData(e,n),t(e)})},t}()}).call(this)}).call(this,t("buffer").Buffer)},{buffer:60,fs:59,zlib:58}],187:[function(t,e,n){(function(t){"use strict";!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.localExports=function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,i)});default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return t.nextTick(function(){e.apply(null,o)})}}:e.localExports=t.nextTick}).call(this,t("_process"))},{_process:188}],188:[function(t,e,n){function r(t){if(c===setTimeout)return setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function i(t){if(l===clearTimeout)return clearTimeout(t);try{return l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}function o(){p&&f&&(p=!1,f.length?d=f.concat(d):g=-1,d.length&&a())}function a(){if(!p){var t=r(o);p=!0;for(var e=d.length;e;){for(f=d,d=[];++g<e;)f&&f[g].run();g=-1,e=d.length}f=null,p=!1,i(t)}}function s(t,e){this.fun=t,this.array=e}function u(){}var c,l,h=e.localExports={};!function(){try{c=setTimeout}catch(t){c=function(){throw new Error("setTimeout is not defined")}}try{l=clearTimeout}catch(t){l=function(){throw new Error("clearTimeout is not defined")}}}();var f,d=[],p=!1,g=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new s(t,e)),1!==d.length||p||r(a)},s.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=u,h.addListener=u,h.once=u,h.off=u,h.removeListener=u,h.removeAllListeners=u,h.emit=u,h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],189:[function(t,e,n){e.localExports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":190}],190:[function(t,e,n){"use strict";function r(t){if(!(this instanceof r))return new r(t);c.call(this,t),l.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||s(o,this)}function o(t){t.end()}var a=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};e.localExports=r;var s=t("process-nextick-args"),u=t("core-util-is");u.inherits=t("inherits");var c=t("./_stream_readable"),l=t("./_stream_writable");u.inherits(r,c);for(var h=a(l.prototype),f=0;f<h.length;f++){var d=h[f];r.prototype[d]||(r.prototype[d]=l.prototype[d])}},{"./_stream_readable":192,"./_stream_writable":194,"core-util-is":160,inherits:167,"process-nextick-args":187}],191:[function(t,e,n){"use strict";function r(t){if(!(this instanceof r))return new r(t);i.call(this,t)}e.localExports=r;var i=t("./_stream_transform"),o=t("core-util-is");o.inherits=t("inherits"),o.inherits(r,i),r.prototype._transform=function(t,e,n){n(null,t)}},{"./_stream_transform":193,"core-util-is":160,inherits:167}],192:[function(t,e,n){(function(n){"use strict";function r(e,n){B=B||t("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,n instanceof B&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(L||(L=t("string_decoder/").StringDecoder),this.decoder=new L(e.encoding),this.encoding=e.encoding)}function i(e){if(B=B||t("./_stream_duplex"),!(this instanceof i))return new i(e);this._readableState=new r(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),P.call(this)}function o(t,e,n,r,i){var o=c(e,n);if(o)t.emit("error",o);else if(null===n)e.reading=!1,l(t,e);else if(e.objectMode||n&&n.length>0)if(e.ended&&!i){s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&i){var s=new Error("stream.unshift() after end event");t.emit("error",s)}else{var u;!e.decoder||i||r||(n=e.decoder.write(n),u=!e.objectMode&&0===n.length),i||(e.reading=!1),u||(e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,i?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&h(t))),d(t,e)}else i||(e.reading=!1);return a(e)}function a(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function s(t){return t>=N?t=N:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function u(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:null===t||isNaN(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:t<=0?0:(t>e.highWaterMark&&(e.highWaterMark=s(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function c(t,e){var n=null;return A.isBuffer(e)||"string"==typeof e||null===e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function l(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,h(t)}}function h(t,e){var n=t._readableState;n.needReadable=!1,n.emittedReadable||(T("emitReadable",n.flowing),n.emittedReadable=!0,n.sync?C(f,t):f(t))}function f(t){T("emit readable"),t.emit("readable"),v(t)}function d(t,e){e.readingMore||(e.readingMore=!0,C(p,t,e))}function p(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(T("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function g(t){return function(){var e=t._readableState;T("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&j(t,"data")&&(e.flowing=!0,v(t))}}function _(t){T("readable nexttick read 0"),t.read(0)}function y(t,e){e.resumeScheduled||(e.resumeScheduled=!0,C(m,t,e))}function m(t,e){e.reading||(T("resume read 0"),t.read(0)),e.resumeScheduled=!1,t.emit("resume"),v(t),e.flowing&&!e.reading&&t.read(0)}function v(t){var e=t._readableState;if(T("flow",e.flowing),e.flowing)do{var n=t.read()}while(null!==n&&e.flowing)}function b(t,e){var n,r=e.buffer,i=e.length,o=!!e.decoder,a=!!e.objectMode;if(0===r.length)return null;if(0===i)n=null;else if(a)n=r.shift();else if(!t||t>=i)n=o?r.join(""):1===r.length?r[0]:A.concat(r,i),r.length=0;else if(t<r[0].length)n=(l=r[0]).slice(0,t),r[0]=l.slice(t);else if(t===r[0].length)n=r.shift();else{n=o?"":new A(t);for(var s=0,u=0,c=r.length;u<c&&s<t;u++){var l=r[0],h=Math.min(t-s,l.length);o?n+=l.slice(0,h):l.copy(n,s,0,h),h<l.length?r[0]=l.slice(h):r.shift(),s+=h}}return n}function w(t){var e=t._readableState;if(e.length>0)throw new Error("endReadable called on non-empty stream");e.endEmitted||(e.ended=!0,C(x,e,t))}function x(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function S(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)}function k(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}e.localExports=i;var C=t("process-nextick-args"),E=t("isarray"),A=t("buffer").Buffer;i.ReadableState=r;t("events");var P,j=function(t,e){return t.listeners(e).length};!function(){try{P=t("stream")}catch(t){}finally{P||(P=t("events").EventEmitter)}}();var A=t("buffer").Buffer,O=t("core-util-is");O.inherits=t("inherits");var I=t("util"),T=void 0;T=I&&I.debuglog?I.debuglog("stream"):function(){};var L;O.inherits(i,P);var B;i.prototype.push=function(t,e){var n=this._readableState;return n.objectMode||"string"!=typeof t||(e=e||n.defaultEncoding)!==n.encoding&&(t=new A(t,e),e=""),o(this,n,t,e,!1)},i.prototype.unshift=function(t){return o(this,this._readableState,t,"",!0)},i.prototype.isPaused=function(){return!1===this._readableState.flowing},i.prototype.setEncoding=function(e){return L||(L=t("string_decoder/").StringDecoder),this._readableState.decoder=new L(e),this._readableState.encoding=e,this};var N=8388608;i.prototype.read=function(t){T("read",t);var e=this._readableState,n=t;if(("number"!=typeof t||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return T("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?w(this):h(this),null;if(0===(t=u(t,e))&&e.ended)return 0===e.length&&w(this),null;var r=e.needReadable;T("need readable",r),(0===e.length||e.length-t<e.highWaterMark)&&T("length less than watermark",r=!0),(e.ended||e.reading)&&T("reading or ended",r=!1),r&&(T("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),r&&!e.reading&&(t=u(n,e));var i;return null===(i=t>0?b(t,e):null)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),n!==t&&e.ended&&0===e.length&&w(this),null!==i&&this.emit("data",i),i},i.prototype._read=function(t){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,e){function r(t){T("onunpipe"),t===h&&o()}function i(){T("onend"),t.end()}function o(){T("cleanup"),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("drain",p),t.removeListener("error",s),t.removeListener("unpipe",r),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",a),_=!0,!f.awaitDrain||t._writableState&&!t._writableState.needDrain||p()}function a(e){T("ondata"),!1===t.write(e)&&(1!==f.pipesCount||f.pipes[0]!==t||1!==h.listenerCount("data")||_||(T("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++),h.pause())}function s(e){T("onerror",e),l(),t.removeListener("error",s),0===j(t,"error")&&t.emit("error",e)}function u(){t.removeListener("finish",c),l()}function c(){T("onfinish"),t.removeListener("close",u),l()}function l(){T("unpipe"),h.unpipe(t)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,T("pipe count=%d opts=%j",f.pipesCount,e);var d=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?i:o;f.endEmitted?C(d):h.once("end",d),t.on("unpipe",r);var p=g(h);t.on("drain",p);var _=!1;return h.on("data",a),t._events&&t._events.error?E(t._events.error)?t._events.error.unshift(s):t._events.error=[s,t._events.error]:t.on("error",s),t.once("close",u),t.once("finish",c),t.emit("pipe",h),f.flowing||(T("pipe resume"),h.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var n=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=k(e.pipes,t);return-1===o?this:(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,e){var n=P.prototype.on.call(this,t,e);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&!this._readableState.endEmitted){var r=this._readableState;r.readableListening||(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading?r.length&&h(this):C(_,this))}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(T("resume"),t.flowing=!0,y(this,t)),this},i.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,n=!1,r=this;t.on("end",function(){if(T("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&r.push(t)}r.push(null)}),t.on("data",function(i){T("wrapped data"),e.decoder&&(i=e.decoder.write(i)),(!e.objectMode||null!==i&&void 0!==i)&&(e.objectMode||i&&i.length)&&(r.push(i)||(n=!0,t.pause()))});for(var i in t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));return S(["error","close","destroy","pause","resume"],function(e){t.on(e,r.emit.bind(r,e))}),r._read=function(e){T("wrapped _read",e),n&&(n=!1,t.resume())},r},i._fromList=b}).call(this,t("_process"))},{"./_stream_duplex":190,_process:188,buffer:60,"core-util-is":160,events:164,inherits:167,isarray:169,"process-nextick-args":187,"string_decoder/":217,util:56}],193:[function(t,e,n){"use strict";function r(t){this.afterTransform=function(e,n){return i(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(t,e,n){var r=t._transformState;r.transforming=!1;var i=r.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&t.push(n),i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);s.call(this,t),this._transformState=new r(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(t){a(e,t)}):a(e)})}function a(t,e){if(e)return t.emit("error",e);var n=t._writableState,r=t._transformState;if(n.length)throw new Error("calling transform done when ws.length != 0");if(r.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}e.localExports=o;var s=t("./_stream_duplex"),u=t("core-util-is");u.inherits=t("inherits"),u.inherits(o,s),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,s.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,n){throw new Error("not implemented")},o.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0}},{"./_stream_duplex":190,"core-util-is":160,inherits:167}],194:[function(t,e,n){(function(n){"use strict";function r(){}function i(t,e,n){this.chunk=t,this.encoding=e,this.callback=n,this.next=null}function o(e,n){j=j||t("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,n instanceof j&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(n,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new x(this),this.corkedRequestsFree.next=new x(this)}function a(e){if(j=j||t("./_stream_duplex"),!(this instanceof a||this instanceof j))return new a(e);this._writableState=new o(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),A.call(this)}function s(t,e){var n=new Error("write after end");t.emit("error",n),S(e,n)}function u(t,e,n,r){var i=!0;if(!C.isBuffer(n)&&"string"!=typeof n&&null!==n&&void 0!==n&&!e.objectMode){var o=new TypeError("Invalid non-string/buffer chunk");t.emit("error",o),S(r,o),i=!1}return i}function c(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=new C(e,n)),e}function l(t,e,n,r,o){n=c(e,n,r),C.isBuffer(n)&&(r="buffer");var a=e.objectMode?1:n.length;e.length+=a;var s=e.length<e.highWaterMark;if(s||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest=new i(n,r,o),u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else h(t,e,!1,a,n,r,o);return s}function h(t,e,n,r,i,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function f(t,e,n,r,i){--e.pendingcb,n?S(i,r):i(r),t._writableState.errorEmitted=!0,t.emit("error",r)}function d(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(d(n),e)f(t,n,r,e,i);else{var o=m(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||y(t,n),r?k(g,t,n,o,i):g(t,n,o,i)}}function g(t,e,n,r){n||_(t,e),e.pendingcb--,r(),b(t,e)}function _(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function y(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var a=0;n;)i[a]=n,n=n.next,a+=1;h(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,e.corkedRequestsFree=o.next,o.next=null}else{for(;n;){var s=n.chunk,u=n.encoding,c=n.callback;if(h(t,e,!1,e.objectMode?1:s.length,s,u,c),n=n.next,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=n,e.bufferProcessing=!1}function m(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function v(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function b(t,e){var n=m(e);return n&&(0===e.pendingcb?(v(t,e),e.finished=!0,t.emit("finish")):v(t,e)),n}function w(t,e,n){e.ending=!0,b(t,e),n&&(e.finished?S(n):t.once("finish",n)),e.ended=!0,t.writable=!1}function x(t){var e=this;this.next=null,this.entry=null,this.finish=function(n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}}e.localExports=a;var S=t("process-nextick-args"),k=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?setImmediate:S,C=t("buffer").Buffer;a.WritableState=o;var E=t("core-util-is");E.inherits=t("inherits");var A,P={deprecate:t("util-deprecate")};!function(){try{A=t("stream")}catch(t){}finally{A||(A=t("events").EventEmitter)}}();C=t("buffer").Buffer;E.inherits(a,A);o.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(o.prototype,"buffer",{get:P.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(t){}}();var j;a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},a.prototype.write=function(t,e,n){var i=this._writableState,o=!1;return"function"==typeof e&&(n=e,e=null),C.isBuffer(t)?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=r),i.ended?s(this,n):u(this,i,t,n)&&(i.pendingcb++,o=l(this,i,t,e,n)),o},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||y(this,t))},a.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);this._writableState.defaultEncoding=t},a.prototype._write=function(t,e,n){n(new Error("not implemented"))},a.prototype._writev=null,a.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||w(this,r,n)}}).call(this,t("_process"))},{"./_stream_duplex":190,_process:188,buffer:60,"core-util-is":160,events:164,inherits:167,"process-nextick-args":187,"util-deprecate":222}],195:[function(t,e,n){e.localExports=t("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":191}],196:[function(t,e,n){var r=function(){try{return t("stream")}catch(t){}}();(n=e.localExports=t("./lib/_stream_readable.js")).Stream=r||n,n.Readable=n,n.Writable=t("./lib/_stream_writable.js"),n.Duplex=t("./lib/_stream_duplex.js"),n.Transform=t("./lib/_stream_transform.js"),n.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":190,"./lib/_stream_passthrough.js":191,"./lib/_stream_readable.js":192,"./lib/_stream_transform.js":193,"./lib/_stream_writable.js":194}],197:[function(t,e,n){e.localExports=t("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":193}],198:[function(t,e,n){e.localExports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":194}],199:[function(t,e,n){(function(){var e,r,i,o;n.EncodeStream=t("./src/EncodeStream"),n.DecodeStream=t("./src/DecodeStream"),n.Array=t("./src/Array"),n.LazyArray=t("./src/LazyArray"),n.Bitfield=t("./src/Bitfield"),n.Boolean=t("./src/Boolean"),n.Buffer=t("./src/Buffer"),n.Enum=t("./src/Enum"),n.Optional=t("./src/Optional"),n.Reserved=t("./src/Reserved"),n.String=t("./src/String"),n.Struct=t("./src/Struct"),n.VersionedStruct=t("./src/VersionedStruct"),i=t("./src/Number");for(e in i)r=i[e],n[e]=r;o=t("./src/Pointer");for(e in o)r=o[e],n[e]=r}).call(this)},{"./src/Array":200,"./src/Bitfield":201,"./src/Boolean":202,"./src/Buffer":203,"./src/DecodeStream":204,"./src/EncodeStream":205,"./src/Enum":206,"./src/LazyArray":207,"./src/Number":208,"./src/Optional":209,"./src/Pointer":210,"./src/Reserved":211,"./src/String":212,"./src/Struct":213,"./src/VersionedStruct":214}],200:[function(t,e,n){(function(){var n,r,i;r=t("./Number").Number,i=t("./utils"),n=function(){function t(t,e,n){this.type=t,this.length=e,this.lengthType=null!=n?n:"count"}return t.prototype.decode=function(t,e){var n,o,a,s,u,c;if(a=t.pos,s=[],n=e,null!=this.length&&(o=i.resolveLength(this.length,t,e)),this.length instanceof r&&(Object.defineProperties(s,{parent:{value:e},_startOffset:{value:a},_currentOffset:{value:0,writable:!0},_length:{value:o}}),n=s),null==o||"bytes"===this.lengthType)for(u=null!=o?t.pos+o:(null!=e?e._length:void 0)?e._startOffset+e._length:t.length;t.pos<u;)s.push(this.type.decode(t,n));else for(c=0;c<o;c+=1)s.push(this.type.decode(t,n));return s},t.prototype.size=function(t,e){var n,o,a,s;if(!t)return this.type.size(null,e)*i.resolveLength(this.length,null,e);for(o=0,this.length instanceof r&&(o+=this.length.size(),e={parent:e}),a=0,s=t.length;a<s;a++)n=t[a],o+=this.type.size(n,e);return o},t.prototype.encode=function(t,e,n){var i,o,a,s,u,c;for(i=n,this.length instanceof r&&((i={pointers:[],startOffset:t.pos,parent:n}).pointerOffset=t.pos+this.size(e,i),this.length.encode(t,e.length)),u=0,c=e.length;u<c;u++)a=e[u],this.type.encode(t,a,i);if(this.length instanceof r)for(o=0;o<i.pointers.length;)(s=i.pointers[o++]).type.encode(t,s.val)},t}(),e.localExports=n}).call(this)},{"./Number":208,"./utils":215}],201:[function(t,e,n){(function(){var t;t=function(){function t(t,e){this.type=t,this.flags=null!=e?e:[]}return t.prototype.decode=function(t){var e,n,r,i,o,a,s;for(i=this.type.decode(t),r={},n=o=0,a=(s=this.flags).length;o<a;n=++o)null!=(e=s[n])&&(r[e]=!!(i&1<<n));return r},t.prototype.size=function(){return this.type.size()},t.prototype.encode=function(t,e){var n,r,i,o,a,s;for(i=0,r=o=0,a=(s=this.flags).length;o<a;r=++o)null!=(n=s[r])&&e[n]&&(i|=1<<r);return this.type.encode(t,i)},t}(),e.localExports=t}).call(this)},{}],202:[function(t,e,n){(function(){var t;t=function(){function t(t){this.type=t}return t.prototype.decode=function(t,e){return!!this.type.decode(t,e)},t.prototype.size=function(t,e){return this.type.size(t,e)},t.prototype.encode=function(t,e,n){return this.type.encode(t,+e,n)},t}(),e.localExports=t}).call(this)},{}],203:[function(t,e,n){(function(){var n,r,i;i=t("./utils"),r=t("./Number").Number,n=function(){function t(t){this.length=t}return t.prototype.decode=function(t,e){var n;return n=i.resolveLength(this.length,t,e),t.readBuffer(n)},t.prototype.size=function(t,e){return t?t.length:i.resolveLength(this.length,null,e)},t.prototype.encode=function(t,e,n){return this.length instanceof r&&this.length.encode(t,e.length),t.writeBuffer(e)},t}(),e.localExports=n}).call(this)},{"./Number":208,"./utils":215}],204:[function(t,e,n){(function(t){(function(){var n,r;try{r=function(){throw new Error("Cannot find module 'iconv-lite' from '/Users/devongovett/projects/PDFKit/node_modules/restructure/src'")}()}catch(t){}n=function(){function e(t){this.buffer=t,this.pos=0,this.length=this.buffer.length}var n;e.TYPES={UInt8:1,UInt16:2,UInt24:3,UInt32:4,Int8:1,Int16:2,Int24:3,Int32:4,Float:4,Double:8};for(n in t.prototype)"read"===n.slice(0,4)&&function(t){var n;n=e.TYPES[t.replace(/read|[BL]E/g,"")],e.prototype[t]=function(){var e;return e=this.buffer[t](this.pos),this.pos+=n,e}}(n);return e.prototype.readString=function(e,n){var i,o,a,s,u;switch(null==n&&(n="ascii"),n){case"utf16le":case"ucs2":case"utf8":case"ascii":return this.buffer.toString(n,this.pos,this.pos+=e);case"utf16be":for(a=s=0,u=(i=new t(this.readBuffer(e))).length-1;s<u;a=s+=2)o=i[a],i[a]=i[a+1],i[a+1]=o;return i.toString("utf16le");default:return i=this.readBuffer(e),r?r.decode(i,n):i}},e.prototype.readBuffer=function(t){return this.buffer.slice(this.pos,this.pos+=t)},e.prototype.readUInt24BE=function(){return(this.readUInt16BE()<<8)+this.readUInt8()},e.prototype.readUInt24LE=function(){return this.readUInt16LE()+(this.readUInt8()<<16)},e.prototype.readInt24BE=function(){return(this.readInt16BE()<<8)+this.readUInt8()},e.prototype.readInt24LE=function(){return this.readUInt16LE()+(this.readInt8()<<16)},e}(),e.localExports=n}).call(this)}).call(this,t("buffer").Buffer)},{buffer:60}],205:[function(t,e,n){(function(n){(function(){var r,i,o,a,s={}.hasOwnProperty,u=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};a=t("stream"),r=t("./DecodeStream");try{o=function(){throw new Error("Cannot find module 'iconv-lite' from '/Users/devongovett/projects/PDFKit/node_modules/restructure/src'")}()}catch(t){}i=function(t){function e(){e.__super__.constructor.apply(this,arguments),this.pos=0}var i;u(e,t);for(i in n.prototype)"write"===i.slice(0,5)&&function(t){var i;i=r.TYPES[t.replace(/write|[BL]E/g,"")],e.prototype[t]=function(e){var r;return(r=new n(+i))[t](e,0),this.writeBuffer(r)}}(i);return e.prototype._read=function(){},e.prototype.writeBuffer=function(t){return this.push(t),this.pos+=t.length},e.prototype.writeString=function(t,e){var r,i,a,s,u;switch(null==e&&(e="ascii"),e){case"utf16le":case"ucs2":case"utf8":case"ascii":return this.writeBuffer(new n(t,e));case"utf16be":for(a=s=0,u=(r=new n(t,"utf16le")).length-1;s<u;a=s+=2)i=r[a],r[a]=r[a+1],r[a+1]=i;return this.writeBuffer(r);default:if(o)return this.writeBuffer(o.encode(t,e));throw new Error("Install iconv-lite to enable additional string encodings.")}},e.prototype.writeUInt24BE=function(t){var e;return e=new n(3),e[0]=t>>>16&255,e[1]=t>>>8&255,e[2]=255&t,this.writeBuffer(e)},e.prototype.writeUInt24LE=function(t){var e;return e=new n(3),e[0]=255&t,e[1]=t>>>8&255,e[2]=t>>>16&255,this.writeBuffer(e)},e.prototype.writeInt24BE=function(t){return t>=0?this.writeUInt24BE(t):this.writeUInt24BE(t+16777215+1)},e.prototype.writeInt24LE=function(t){return t>=0?this.writeUInt24LE(t):this.writeUInt24LE(t+16777215+1)},e.prototype.fill=function(t,e){var r;return(r=new n(e)).fill(t),this.writeBuffer(r)},e.prototype.end=function(){return this.push(null)},e}(a.Readable),e.localExports=i}).call(this)}).call(this,t("buffer").Buffer)},{"./DecodeStream":204,buffer:60,stream:216}],206:[function(t,e,n){(function(){var t;t=function(){function t(t,e){this.type=t,this.options=null!=e?e:[]}return t.prototype.decode=function(t){var e;return e=this.type.decode(t),this.options[e]||e},t.prototype.size=function(){return this.type.size()},t.prototype.encode=function(t,e){var n;if(-1===(n=this.options.indexOf(e)))throw new Error("Unknown option in enum: "+e);return this.type.encode(t,n)},t}(),e.localExports=t}).call(this)},{}],207:[function(t,e,n){(function(){var n,r,i,o,a,s,u={}.hasOwnProperty,c=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};n=t("./Array"),o=t("./Number").Number,s=t("./utils"),a=t("util").inspect,i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,n),e.prototype.decode=function(t,e){var n,i,a;return i=t.pos,n=s.resolveLength(this.length,t,e),this.length instanceof o&&(e={parent:e,_startOffset:i,_currentOffset:0,_length:n}),a=new r(this.type,n,t,e),t.pos+=n*this.type.size(null,e),a},e.prototype.size=function(t,n){return t instanceof r&&(t=t.toArray()),e.__super__.size.call(this,t,n)},e.prototype.encode=function(t,n,i){return n instanceof r&&(n=n.toArray()),e.__super__.encode.call(this,t,n,i)},e}(),r=function(){function t(t,e,n,r){this.type=t,this.length=e,this.stream=n,this.ctx=r,this.base=this.stream.pos,this.items=[]}return t.prototype.get=function(t){var e;if(!(t<0||t>=this.length))return null==this.items[t]&&(e=this.stream.pos,this.stream.pos=this.base+this.type.size(null,this.ctx)*t,this.items[t]=this.type.decode(this.stream,this.ctx),this.stream.pos=e),this.items[t]},t.prototype.toArray=function(){var t,e,n,r;for(r=[],t=e=0,n=this.length;e<n;t=e+=1)r.push(this.get(t));return r},t.prototype.inspect=function(){return a(this.toArray())},t}(),e.localExports=i}).call(this)},{"./Array":200,"./Number":208,"./utils":215,util:224}],208:[function(t,e,n){(function(){var e,r,i,o={}.hasOwnProperty,a=function(t,e){function n(){this.constructor=t}for(var r in e)o.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};e=t("./DecodeStream"),i=function(){function t(t,e){this.type=t,this.endian=null!=e?e:"BE",this.fn=this.type,"8"!==this.type[this.type.length-1]&&(this.fn+=this.endian)}return t.prototype.size=function(){return e.TYPES[this.type]},t.prototype.decode=function(t){return t["read"+this.fn]()},t.prototype.encode=function(t,e){return t["write"+this.fn](e)},t}(),n.Number=i,n.uint8=new i("UInt8"),n.uint16be=n.uint16=new i("UInt16","BE"),n.uint16le=new i("UInt16","LE"),n.uint24be=n.uint24=new i("UInt24","BE"),n.uint24le=new i("UInt24","LE"),n.uint32be=n.uint32=new i("UInt32","BE"),n.uint32le=new i("UInt32","LE"),n.int8=new i("Int8"),n.int16be=n.int16=new i("Int16","BE"),n.int16le=new i("Int16","LE"),n.int24be=n.int24=new i("Int24","BE"),n.int24le=new i("Int24","LE"),n.int32be=n.int32=new i("Int32","BE"),n.int32le=new i("Int32","LE"),n.floatbe=n.float=new i("Float","BE"),n.floatle=new i("Float","LE"),n.doublebe=n.double=new i("Double","BE"),n.doublele=new i("Double","LE"),r=function(t){function e(t,n,r){null==r&&(r=t>>1),e.__super__.constructor.call(this,"Int"+t,n),this._point=1<<r}return a(e,i),e.prototype.decode=function(t){return e.__super__.decode.call(this,t)/this._point},e.prototype.encode=function(t,n){return e.__super__.encode.call(this,t,n*this._point|0)},e}(),n.Fixed=r,n.fixed16be=n.fixed16=new r(16,"BE"),n.fixed16le=new r(16,"LE"),n.fixed32be=n.fixed32=new r(32,"BE"),n.fixed32le=new r(32,"LE")}).call(this)},{"./DecodeStream":204}],209:[function(t,e,n){(function(){var t;t=function(){function t(t,e){this.type=t,this.condition=null==e||e}return t.prototype.decode=function(t,e){var n;if("function"==typeof(n=this.condition)&&(n=n.call(e,e)),n)return this.type.decode(t,e)},t.prototype.size=function(t,e){var n;return"function"==typeof(n=this.condition)&&(n=n.call(e,e)),n?this.type.size(t,e):0},t.prototype.encode=function(t,e,n){var r;if("function"==typeof(r=this.condition)&&(r=r.call(n,n)),r)return this.type.encode(t,e,n)},t}(),e.localExports=t}).call(this)},{}],210:[function(t,e,n){(function(){var e,r,i;i=t("./utils"),e=function(){function t(t,e,n){var r,i,o,a;this.offsetType=t,this.type=e,this.options=null!=n?n:{},"void"===this.type&&(this.type=null),null==(r=this.options).type&&(r.type="local"),null==(i=this.options).allowNull&&(i.allowNull=!0),null==(o=this.options).nullValue&&(o.nullValue=0),null==(a=this.options).lazy&&(a.lazy=!1),this.options.relativeTo&&(this.relativeToGetter=new Function("ctx","return ctx."+this.options.relativeTo))}return t.prototype.decode=function(t,e){var n,r,o,a,s,u;return(o=this.offsetType.decode(t))===this.options.nullValue&&this.options.allowNull?null:(s=function(){switch(this.options.type){case"local":return e._startOffset;case"immediate":return t.pos-this.offsetType.size();case"parent":return e.parent._startOffset;default:for(n=e;n.parent;)n=n.parent;return n._startOffset||0}}.call(this),this.options.relativeTo&&(s+=this.relativeToGetter(e)),a=o+s,null!=this.type?(u=null,r=function(n){return function(){var r;return null!=u?u:(r=t.pos,t.pos=a,u=n.type.decode(t,e),t.pos=r,u)}}(this),this.options.lazy?new i.PropertyDescriptor({get:r}):r()):a)},t.prototype.size=function(t,e){var n,i;switch(n=e,this.options.type){case"local":case"immediate":break;case"parent":e=e.parent;break;default:for(;e.parent;)e=e.parent}if(null==(i=this.type)){if(!(t instanceof r))throw new Error("Must be a VoidPointer");i=t.type,t=t.value}return t&&e&&(e.pointerSize+=i.size(t,n)),this.offsetType.size()},t.prototype.encode=function(t,e,n){var i,o,a;i=n;if(null!=e){switch(this.options.type){case"local":o=n.startOffset;break;case"immediate":o=t.pos+this.offsetType.size(e,i);break;case"parent":o=(n=n.parent).startOffset;break;default:for(o=0;n.parent;)n=n.parent}if(this.options.relativeTo&&(o+=this.relativeToGetter(i.val)),this.offsetType.encode(t,n.pointerOffset-o),null==(a=this.type)){if(!(e instanceof r))throw new Error("Must be a VoidPointer");a=e.type,e=e.value}return n.pointers.push({type:a,val:e,parent:i}),n.pointerOffset+=a.size(e,i)}this.offsetType.encode(t,this.options.nullValue)},t}(),r=function(){return function(t,e){this.type=t,this.value=e}}(),n.Pointer=e,n.VoidPointer=r}).call(this)},{"./utils":215}],211:[function(t,e,n){(function(){var n,r;r=t("./utils"),n=function(){function t(t,e){this.type=t,this.count=null!=e?e:1}return t.prototype.decode=function(t,e){t.pos+=this.size(null,e)},t.prototype.size=function(t,e){var n;return n=r.resolveLength(this.count,null,e),this.type.size()*n},t.prototype.encode=function(t,e,n){return t.fill(0,this.size(e,n))},t}(),e.localExports=n}).call(this)},{"./utils":215}],212:[function(t,e,n){(function(n){(function(){var r,i,o;r=t("./Number").Number,o=t("./utils"),i=function(){function t(t,e){this.length=t,this.encoding=null!=e?e:"ascii"}return t.prototype.decode=function(t,e){var n,r,i,a,s;return i=function(){if(null!=this.length)return o.resolveLength(this.length,t,e);for(n=t.buffer,i=t.length,a=t.pos;a<i&&0!==n[a];)++a;return a-t.pos}.call(this),"function"==typeof(r=this.encoding)&&(r=r.call(e,e)||"ascii"),s=t.readString(i,r),null==this.length&&t.pos<t.length&&t.pos++,s},t.prototype.size=function(t,e){var i,a;return t?("function"==typeof(i=this.encoding)&&(i=i.call(null!=e?e.val:void 0,null!=e?e.val:void 0)||"ascii"),"utf16be"===i&&(i="utf16le"),a=n.byteLength(t,i),this.length instanceof r&&(a+=this.length.size()),null==this.length&&a++,a):o.resolveLength(this.length,null,e)},t.prototype.encode=function(t,e,i){var o;if("function"==typeof(o=this.encoding)&&(o=o.call(null!=i?i.val:void 0,null!=i?i.val:void 0)||"ascii"),this.length instanceof r&&this.length.encode(t,n.byteLength(e,o)),t.writeString(e,o),null==this.length)return t.writeUInt8(0)},t}(),e.localExports=i}).call(this)}).call(this,t("buffer").Buffer)},{"./Number":208,"./utils":215,buffer:60}],213:[function(t,e,n){(function(){var n,r;r=t("./utils"),n=function(){function t(t){this.fields=null!=t?t:{}}return t.prototype.decode=function(t,e,n){var r,i;return null==n&&(n=0),r=this._setup(t,e,n),this._parseFields(t,r,this.fields),null!=(i=this.process)&&i.call(r,t),r},t.prototype._setup=function(t,e,n){var r;return r={},Object.defineProperties(r,{parent:{value:e},_startOffset:{value:t.pos},_currentOffset:{value:0,writable:!0},_length:{value:n}}),r},t.prototype._parseFields=function(t,e,n){var i,o,a;for(i in n)void 0!==(a="function"==typeof(o=n[i])?o.call(e,e):o.decode(t,e))&&(a instanceof r.PropertyDescriptor?Object.defineProperty(e,i,a):e[i]=a),e._currentOffset=t.pos-e._startOffset},t.prototype.size=function(t,e,n){var r,i,o,a,s;null==t&&(t={}),null==n&&(n=!0),r={parent:e,val:t,pointerSize:0},o=0,s=this.fields;for(i in s)null!=(a=s[i]).size&&(o+=a.size(t[i],r));return n&&(o+=r.pointerSize),o},t.prototype.encode=function(t,e,n){var r,i,o,a,s,u,c;null!=(u=this.preEncode)&&u.call(e,t),(r={pointers:[],startOffset:t.pos,parent:n,val:e,pointerSize:0}).pointerOffset=t.pos+this.size(e,r,!1),c=this.fields;for(o in c)null!=(s=c[o]).encode&&s.encode(t,e[o],r);for(i=0;i<r.pointers.length;)(a=r.pointers[i++]).type.encode(t,a.val,a.parent)},t}(),e.localExports=n}).call(this)},{"./utils":215}],214:[function(t,e,n){(function(){var n,r,i={}.hasOwnProperty,o=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};n=t("./Struct"),r=function(t){function e(t,e){this.type=t,this.versions=null!=e?e:{},"string"==typeof this.type&&(this.versionGetter=new Function("parent","return parent."+this.type),this.versionSetter=new Function("parent","version","return parent."+this.type+" = version"))}return o(e,n),e.prototype.decode=function(t,n,r){var i,o,a;if(null==r&&(r=0),o=this._setup(t,n,r),"string"==typeof this.type?o.version=this.versionGetter(n):o.version=this.type.decode(t),this.versions.header&&this._parseFields(t,o,this.versions.header),null==(i=this.versions[o.version]))throw new Error("Unknown version "+o.version);return i instanceof e?i.decode(t,n):(this._parseFields(t,o,i),null!=(a=this.process)&&a.call(o,t),o)},e.prototype.size=function(t,e,n){var r,i,o,a,s,u;if(null==n&&(n=!0),!t)throw new Error("Not a fixed size");if(r={parent:e,val:t,pointerSize:0},a=0,"string"!=typeof this.type&&(a+=this.type.size(t.version,r)),this.versions.header){u=this.versions.header;for(o in u)null!=(s=u[o]).size&&(a+=s.size(t[o],r))}if(null==(i=this.versions[t.version]))throw new Error("Unknown version "+t.version);for(o in i)null!=(s=i[o]).size&&(a+=s.size(t[o],r));return n&&(a+=r.pointerSize),a},e.prototype.encode=function(t,e,n){var r,i,o,a,s,u,c,l;if(null!=(c=this.preEncode)&&c.call(e,t),r={pointers:[],startOffset:t.pos,parent:n,val:e,pointerSize:0},r.pointerOffset=t.pos+this.size(e,r,!1),"string"!=typeof this.type&&this.type.encode(t,e.version),this.versions.header){l=this.versions.header;for(a in l)null!=(u=l[a]).encode&&u.encode(t,e[a],r)}i=this.versions[e.version];for(a in i)null!=(u=i[a]).encode&&u.encode(t,e[a],r);for(o=0;o<r.pointers.length;)(s=r.pointers[o++]).type.encode(t,s.val,s.parent)},e}(),e.localExports=r}).call(this)},{"./Struct":213}],215:[function(t,e,n){(function(){var e,r;e=t("./Number").Number,n.resolveLength=function(t,n,r){var i;if("number"==typeof t?i=t:"function"==typeof t?i=t.call(r,r):r&&"string"==typeof t?i=r[t]:n&&t instanceof e&&(i=t.decode(n)),isNaN(i))throw new Error("Not a fixed size");return i},r=function(){return function(t){var e,n;null==t&&(t={}),this.enumerable=!0,this.configurable=!0;for(e in t)n=t[e],this[e]=n}}(),n.PropertyDescriptor=r}).call(this)},{"./Number":208}],216:[function(t,e,n){function r(){i.call(this)}e.localExports=r;var i=t("events").EventEmitter;t("inherits")(r,i),r.Readable=t("readable-stream/readable.js"),r.Writable=t("readable-stream/writable.js"),r.Duplex=t("readable-stream/duplex.js"),r.Transform=t("readable-stream/transform.js"),r.PassThrough=t("readable-stream/passthrough.js"),r.Stream=r,r.prototype.pipe=function(t,e){function n(e){t.writable&&!1===t.write(e)&&c.pause&&c.pause()}function r(){c.readable&&c.resume&&c.resume()}function o(){l||(l=!0,t.end())}function a(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function s(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){c.removeListener("data",n),t.removeListener("drain",r),c.removeListener("end",o),c.removeListener("close",a),c.removeListener("error",s),t.removeListener("error",s),c.removeListener("end",u),c.removeListener("close",u),t.removeListener("close",u)}var c=this;c.on("data",n),t.on("drain",r),t._isStdio||e&&!1===e.end||(c.on("end",o),c.on("close",a));var l=!1;return c.on("error",s),t.on("error",s),c.on("end",u),c.on("close",u),t.on("close",u),t.emit("pipe",c),t}},{events:164,inherits:167,"readable-stream/duplex.js":189,"readable-stream/passthrough.js":195,"readable-stream/readable.js":196,"readable-stream/transform.js":197,"readable-stream/writable.js":198}],217:[function(t,e,n){function r(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function a(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var s=t("buffer").Buffer,u=s.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},c=n.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),r(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=i)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(t){for(var e="";this.charLength;){var n=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(t=t.slice(n,t.length),!((i=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);r=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,r),r-=this.charReceived);var r=(e+=t.toString(this.encoding,0,r)).length-1,i=e.charCodeAt(r);if(i>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,r)}return e},c.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var n=t[t.length-e];if(1==e&&n>>5==6){this.charLength=2;break}if(e<=2&&n>>4==14){this.charLength=3;break}if(e<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=e},c.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;e+=r.slice(0,n).toString(i)}return e}},{buffer:60}],218:[function(t,e,n){function r(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function i(t,e){this.source=t,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=e,this.destLen=0,this.ltree=new r,this.dtree=new r}function o(t,e,n,r){var i,o;for(i=0;i<n;++i)t[i]=0;for(i=0;i<30-n;++i)t[i+n]=i/n|0;for(o=r,i=0;i<30;++i)e[i]=o,o+=1<<t[i]}function a(t,e,n,r){var i,o;for(i=0;i<16;++i)t.table[i]=0;for(i=0;i<r;++i)t.table[e[n+i]]++;for(t.table[0]=0,o=0,i=0;i<16;++i)k[i]=o,o+=t.table[i];for(i=0;i<r;++i)e[n+i]&&(t.trans[k[e[n+i]]++]=i)}function s(t){t.bitcount--||(t.tag=t.source[t.sourceIndex++],t.bitcount=7);var e=1&t.tag;return t.tag>>>=1,e}function u(t,e,n){if(!e)return n;for(;t.bitcount<24;)t.tag|=t.source[t.sourceIndex++]<<t.bitcount,t.bitcount+=8;var r=t.tag&65535>>>16-e;return t.tag>>>=e,t.bitcount-=e,r+n}function c(t,e){for(;t.bitcount<24;)t.tag|=t.source[t.sourceIndex++]<<t.bitcount,t.bitcount+=8;var n=0,r=0,i=0,o=t.tag;do{r=2*r+(1&o),o>>>=1,++i,n+=e.table[i],r-=e.table[i]}while(r>=0);return t.tag=o,t.bitcount-=i,e.trans[n+r]}function l(t,e,n){var r,i,o,s,l,h;for(r=u(t,5,257),i=u(t,5,1),o=u(t,4,4),s=0;s<19;++s)S[s]=0;for(s=0;s<o;++s){var f=u(t,3,0);S[w[s]]=f}for(a(x,S,0,19),l=0;l<r+i;){var d=c(t,x);switch(d){case 16:var p=S[l-1];for(h=u(t,2,3);h;--h)S[l++]=p;break;case 17:for(h=u(t,3,3);h;--h)S[l++]=0;break;case 18:for(h=u(t,7,11);h;--h)S[l++]=0;break;default:S[l++]=d}}a(e,S,0,r),a(n,S,r,i)}function h(t,e,n){for(;;){var r=c(t,e);if(256===r)return d;if(r<256)t.dest[t.destLen++]=r;else{var i,o,a,s;for(i=u(t,y[r-=257],m[r]),o=c(t,n),s=a=t.destLen-u(t,v[o],b[o]);s<a+i;++s)t.dest[t.destLen++]=t.dest[s]}}}function f(t){for(var e,n,r;t.bitcount>8;)t.sourceIndex--,t.bitcount-=8;if(e=t.source[t.sourceIndex+1],e=256*e+t.source[t.sourceIndex],n=t.source[t.sourceIndex+3],n=256*n+t.source[t.sourceIndex+2],e!==(65535&~n))return p;for(t.sourceIndex+=4,r=e;r;--r)t.dest[t.destLen++]=t.source[t.sourceIndex++];return t.bitcount=0,d}var d=0,p=-3,g=new r,_=new r,y=new Uint8Array(30),m=new Uint16Array(30),v=new Uint8Array(30),b=new Uint16Array(30),w=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),x=new r,S=new Uint8Array(320),k=new Uint16Array(16);!function(t,e){var n;for(n=0;n<7;++n)t.table[n]=0;for(t.table[7]=24,t.table[8]=152,t.table[9]=112,n=0;n<24;++n)t.trans[n]=256+n;for(n=0;n<144;++n)t.trans[24+n]=n;for(n=0;n<8;++n)t.trans[168+n]=280+n;for(n=0;n<112;++n)t.trans[176+n]=144+n;for(n=0;n<5;++n)e.table[n]=0;for(e.table[5]=32,n=0;n<32;++n)e.trans[n]=n}(g,_),o(y,m,4,3),o(v,b,2,1),y[28]=0,m[28]=258,e.localExports=function(t,e){var n,r,o=new i(t,e);do{switch(n=s(o),u(o,2,0)){case 0:r=f(o);break;case 1:r=h(o,g,_);break;case 2:l(o,o.ltree,o.dtree),r=h(o,o.ltree,o.dtree);break;default:r=p}if(r!==d)throw new Error("Data error")}while(!n);return o.destLen<o.dest.length?"function"==typeof o.dest.slice?o.dest.slice(0,o.destLen):o.dest.subarray(0,o.destLen):o.dest}},{}],219:[function(t,e,n){e.localExports={categories:["Cc","Zs","Po","Sc","Ps","Pe","Sm","Pd","Nd","Lu","Sk","Pc","Ll","So","Lo","Pi","Cf","No","Pf","Lt","Lm","Mn","Me","Mc","Nl","Zl","Zp","Cs","Co"],combiningClasses:["Not_Reordered","Above","Above_Right","Below","Attached_Above_Right","Attached_Below","Overlay","Iota_Subscript","Double_Below","Double_Above","Below_Right","Above_Left","CCC10","CCC11","CCC12","CCC13","CCC14","CCC15","CCC16","CCC17","CCC18","CCC19","CCC20","CCC21","CCC22","CCC23","CCC24","CCC25","CCC30","CCC31","CCC32","CCC27","CCC28","CCC29","CCC33","CCC34","CCC35","CCC36","Nukta","Virama","CCC84","CCC91","CCC103","CCC107","CCC118","CCC122","CCC129","CCC130","CCC132","Attached_Above","Below_Left","Left","Kana_Voicing","CCC26","Right"],scripts:["Common","Latin","Bopomofo","Inherited","Greek","Coptic","Cyrillic","Armenian","Hebrew","Arabic","Syriac","Thaana","Nko","Samaritan","Mandaic","Devanagari","Bengali","Gurmukhi","Gujarati","Oriya","Tamil","Telugu","Kannada","Malayalam","Sinhala","Thai","Lao","Tibetan","Myanmar","Georgian","Hangul","Ethiopic","Cherokee","Canadian_Aboriginal","Ogham","Runic","Tagalog","Hanunoo","Buhid","Tagbanwa","Khmer","Mongolian","Limbu","Tai_Le","New_Tai_Lue","Buginese","Tai_Tham","Balinese","Sundanese","Batak","Lepcha","Ol_Chiki","Braille","Glagolitic","Tifinagh","Han","Hiragana","Katakana","Yi","Lisu","Vai","Bamum","Syloti_Nagri","Phags_Pa","Saurashtra","Kayah_Li","Rejang","Javanese","Cham","Tai_Viet","Meetei_Mayek","null","Linear_B","Lycian","Carian","Old_Italic","Gothic","Old_Permic","Ugaritic","Old_Persian","Deseret","Shavian","Osmanya","Elbasan","Caucasian_Albanian","Linear_A","Cypriot","Imperial_Aramaic","Palmyrene","Nabataean","Hatran","Phoenician","Lydian","Meroitic_Hieroglyphs","Meroitic_Cursive","Kharoshthi","Old_South_Arabian","Old_North_Arabian","Manichaean","Avestan","Inscriptional_Parthian","Inscriptional_Pahlavi","Psalter_Pahlavi","Old_Turkic","Old_Hungarian","Brahmi","Kaithi","Sora_Sompeng","Chakma","Mahajani","Sharada","Khojki","Multani","Khudawadi","Grantha","Tirhuta","Siddham","Modi","Takri","Ahom","Warang_Citi","Pau_Cin_Hau","Cuneiform","Egyptian_Hieroglyphs","Anatolian_Hieroglyphs","Mro","Bassa_Vah","Pahawh_Hmong","Miao","Duployan","SignWriting","Mende_Kikakui"],eaw:["N","Na","A","W","H","F"]}},{}],220:[function(t,e,n){(function(e){var r,i,o,a,s,u,c,l,h,f,d,p,g,_,y,m;p=t("unicode-trie"),_=t("./data.json"),m=new p(e("ABEAAAAAAAAAEKiQ5ZlpWFPX2vd73lPrafWIdQBlirUqKggKIqOkWhVxgGJFZIyCiMgQIUCAQNIjRxEZoqIiQogaBgcGAZkhEZFEQIiMAQKJECHGEEIImciwX2x7TrGnp+u9ng/vl2dfXNlJdvZa6/7t//rf91pMDqHfPNNQBgL8sjccSNRdbRc9uWHX5MnvbXfYXDWY/3CyInqFXvTkQJk/Lf3j549vpiQStB13g03WhrM3LLJscN7NU6x2ssNko8yCPlOg8t3zg2vP9u3mOyqelpehLkSEi6dXxAvXyXP/ue/lhrwz71bdPN6781lk/Pu1a7LueJwcHLCxrq2JjfkS65ywd73fimPmEV8d2npe19PWgS33ZXfjRgxDHDed1T6xK3qZs2mYoe9Fof+2P2uKQq/uVw2QP4czqqdwLsxrV+788+Ykn1sbusdp/9HvD8s6UP/Rc1jwug3rN32z8dvCe3kPCu7nc76nP3/18vWLNmpnU2tLR/Ph6QTJl8lXnA62vtqy+dHDoHM8+RuLBRHi2EjIZHcY5fP7UctXfJ1x7cb1H//JJiN40b90SOf9vkNDPqhD8YeVv7b0wzHXnjfdovuBp874nT0d4M99+25sYnSjXDH7Z0P6CB3+e6CzS1OPvDZhC72I2X3RvzVU/I+fIaXmXLxx9e7l2+lau//67UqLJcZ6douNdKy0zJrM7rkc3Hdk76EDzr8wpCXl/uN6ctalW2mExIyU7KTMtzq9Rn8e0HIeKJ5LoHhUL+ZAEvr6jyMuCpnUz/Eetm/4nPLQ4Zuvd3y5Za3Noo2rLf++zQAW98WBT9SFOEIE0SgB0ch8A6LBB9HY+KeC+0jjGJBGEJBGKpDGCSCNQiANBoDGtfcgGquB2rgKpLERSKMcSGM/iEbpYxAN9x4QDeDM18yxIS+2zvfMhWOZyk74D5v5yXL5nzal/gvbVvrWvfoLEJnLQDI/Asnkg8gw+kFkgB4SBdRJHVAnu4E6IYNosL8D0UA+BNGwmpOKBWw3cuCUHBASFRjSSmBIj4AhAW0RCbTFapAtTv/1v7ie5jlSnYCs+rWrPaf//ucRU4KUVts/6Uo5wXb+fUgqL+5V8nUcgTFI7qS/Q3A9qkrFGxWMWLyAr9qviTL0U9oSr+EIOgNkMpuLYPdUlwqZCoZsQsBXIjWS3VJxVOie6ai051aMv8Sjil9IK9VnbxNxQuJztHTA5a3YshCCpnAWeOhsvwbSTAaHGcZ3UOAI1OTbYEO14q7xYgRqlM7wtpLfpWPJE0VNjIZZsaVsKXkik1hqc2ba0kV19qycUByudLLXjJCZaGUYW1BIQZa0yE19mhkSfSYjaq2CIVk9f14xf142f14yf148f/58/vwZk+ENh+7SkQiUVBXsS07oaBSXKiRSy6ROykTr/EVr6K4wDIEaUgWz6hI6js5f5Eotaa8pE9fnL+6A7mrNXyTP31md0DEyU6oYlFouVpZoNDKfbfI9Gq2D8kRyFLw87beHhXvjooobscJ3/UufOAFmIPejvNijUYmwkIR/7oPLjaZaDA//9nzJGWq4If/jw6PkVg+UhLBPU0YEv6ol6SRfS9Ev3vury40lxSv5t8LcexF4y6ptI1Yy3CuXOZmUwMNtJUJpTQ6filErqmi+u1k7lcOw8y/dYd+7YHdXcnc+gydzo9n2zpBE3BR9Zq4OzjQtQsismOrCe0oDg1xchPr4lMxgRJqA1ZVCa8crqW+TFD4r/qvvqE7DsVAE9NF8Rvv3fpwAc824OX3cRBTql8lWh6z7/WyDv9jx9S8NQleEc/Qm9K0XZZk/C5ndYLTgxxCc3dyO/Sh4Hnr/J3PLHZvEiK7/eRRbcEOsUqLnE9b8JFKsnC0lNvEVYXAyUwnNW8NB4u4XMIVFCSyoZcF0YRelfZyaCqOyiRaOsZ4SPZPT7P/rJOY1gipT0u88FtuLVnM/FN6plP48cniGfvN5wscHwWAMCYkX/WPsuRvlXVj2v6csfI4pKx4umVfMLFozN6+Ynt8XrtmVX/8BcE1VKcWF+dFOxExygppRrZbTULgRHFlgBLE0r99G6Tchx9UbAcP3ApVeD4E5ZBfQcL2AhksAGq4vyHCFwKocDarKp+1AKfUhsA7tBNLQAdJ4AqRxFEgDmH5kwPSDAZVe54Da8AXSQAJp4IE03IE0gFW5DFSVTy8GleXngNr4B4iGZh2IBu4piAZ8H4gGDFiVa4Gq8ukkkG+8B2rjayCNg0AaN4E0PIE0SCAa+D4QDf8/DBa6Uyqur/qtJ5ru3wBIwoFIYoBILgKRuIKQEPNASFxAi5PpQtB0eQ+cLif/IFa4tDBeYxE7tbArTlHGtStyWgKD/hTruaGfeOM6zoh2LKbo11K3Fp4BU1rF0X63Cad65LAERHsnkHYdkPb3QNqPALRPAZ06ELgUrADStgFqzxtIIxdIAwGigQCl8VPALK4D3DJIAZpTC5DGCiAN4CqSAlxFIkBp/FQ3iIY7cDvJGKgNNyCN80AaaUAawM01BCiNnwLaEgO41agH1EYakMYmII0KIA3g5hoblMZPdYFoVAN9gwnUhgGQxn/8J+M/aGQCaXgBaYDS+ClgFpcBfUMJ1IYaSOMvIBrQPRAN3EEQDXgRiAawwsMDfcMRqA1/II1wII1/AmkcA9IAbbaeAlb/LkDfCARqowJIwwZIowFIYw+IBgW42QqsN8yAvpEJ1IYxkIYbkMZdIA0fII37IBrAegMJ9I1qoDaYQBoGQBolQBouQBqlIBrAegMG9A0toDYcgTT8gTSSQTSg4yAauAIQDWC9QQT6hhlQG5lAGsZAGpVAGgeANJ6AaADrDTbQN4RAbWgBaTgCaWQAaXiAaEAPQDSA9QYF6BtsoDaEQBpaQBqFQBqHgTSKATTWyQ2bZBsAQHYDwzUB7ieeAIULzwaFSwQmDfrCpNEB9bDUL63jWLF+RikmN9zCnHJ8kFUZR9e3WWQIOmLQmMRF69ctdrX425vvpPeGP3+3ro362aJJ/a1Wf7WpeVfb21WrOBsn2xswdBn1JLGswP7Vi+826QXfTGt8dX9gZnLfq7gvVlp/98WrPYoZRN9hbY8NfNgTTyKCQ+ImEGUKiGymIPeNfEi0TkW+dNWnVXPsutJ8VdudH8DgacQWM7/lxBZEC8LxUa6GtBZPWu0yFtSwVhCjLXxZ35UMuimMfOzbuyJrT9GGXGp2V3qgyLlBj2B9pVl+QL8lPN6OvHLkfYsWZ8OcqEfuoVr/hchD5aaKuintxu3khD8bc7JPsyIZ0McIMVa24cuTRGnWVzny6Hijuq4UGNVpllMoqpDvXzpWIX8i528WFELnqJxzLRkxusgDdrktdqKwyLF1yzh64au88OcdXjxR/A0uiwmjrHbZxHQx4mX3cMbPO0w8WNE3kObZS/oaUwa7JM3VThVjjREr0aftMyfOOMyHSJqtnumL1KGq4YRZKJJZ6Htl37eUApmaEwLPDYGlzug1465vZrpchjI77av+Xso8YDii26rHsktzrS28dYDc5n+MbPHI7jHF4jWMAUmNBjXW2N2mzNcGopD7RodnrLZkhm/brTmThyqw5Dp9k1B+CudR66fH0Zj1IztuJuwaxEZXUYLmznRE7+JxWy/OtH+AexzTxOdmykTvbtjklLLHxd79kFvP0QmKrU90UcWD1yppxaIo7VteJwI9sqJojVNy7Vtrbb235zbbNHPYW3oRDbtx20Jus4ajymNynvS/C3DO9Ige2eZVIVF6zSoak/n9FMQyYQ1l6lB+ZYNF95285gbqu5Oke3fg9erOvWk2+bWRohizqp5ca2FwLDHb+pwkzNfOFnU51nHJTFLdSv4EooDyPD7LjQM70h0QVRCbv1HRYiuoVXcnORmZhiDJ/Y4Kfdu2hO1Hkxgtrp18hcY6/YCCYJFvr1zW/prW9a5uDSzYeSg2+kTVHWeltXOcT3PNZEwZJZZmdcrNLmWOYEAv3+HgZSzYJPD9xsehoBCVYGIYDMfaOpWOFXoxBh9jv2m8GyjbsHuzRBxr3pu1RpCJtS4TiEbOxvXVMQ2rI9ckhrAde9a8y4i7JuzeT6XZyfqtL/snVGwnJibTOKkyTH63HmpCzNJcCK/1U+zXrrQ6z28WSRc7UXRgLSmbIa1WfDVHLV9HthK5NlyZge2fEFO3d9jE2PGUGYIgRLPg9Iibq0ODnbESmR66vHima1FzYf0JRdAe1JjovecaJCw1oNFU0gS75clOwWvOHUcPSGvYE3nFzcW6DmalXlUWctLw13TxyBrHwakD8KFBoT1cyZp850GRaG5IYnBn64e3VqM/0Sxqu+Xani5xcek3+zNQqNbdO8gU7WG7nmDSsEH2hFY7Ge4eNsz+guESnpqBsWIKUmVbL3d1Bu7HDFBlufie0FdxzyoMSZFdUuWlBoXASrvX63Z6p1eQuVCsqcY1+rhwWR9CT7WiOR82w8Y1yYeO+1udd8UfmGzB3kzvpvWP63p/UDvdpaeVJZ7TjtQx/c5KwLqaGnBgjnKt+lV87UZJJ43dUH561qLfKxNlYZmmyYOiprqO+liaxtNMhnKnXBpfVfjY0Nch7SmTNoE88Zt73pErkswetaoc4hwG4VvuIJL2849Nj8WehqYns1DT1JdHRo5SrRocHOnj43scdEgLSDzKQDcPk9x9Mrs7f5gbsVmrR+0cHS8oC4EKis9j4hrWtFNVGdyMhoyLrKKKXV8FHxuGZhUtGu39ZVMPLLPXco6wx7udMUZbXdNGHu7frVumo3R9CMW8f/YMpRLL7R2SETTkvnSD1HaTKyfmDOyyJmGmkWWsEE15HKPysUBRZsI0FGjRoc1Q3il7KIAfcZrgkIC9PxxQFtKQua/2lhh26yE1rPeBYdpAinpzTr0fLBMf6DC0BR5tPgj3DiIP10lK/NyYLZz2ttwOSy4uB33sTf0pUd2RNp1OXJngyUvFGrry6Lse3OyTT0KWNW2USer8J/PYzhN9Wa8rMmYybUqrY36OGWuSmW7zc1N30EiqIr6TkVfDzqqHzLx6UhTtVJsedG1GxcJxHSQknla72NrRYLRSzk6sIRF9magMprrOOdxNDb5jau6F3YUjlPcIFA37x29LKjbjDHS4GPMuO6ZvvOrdC43rqMrsfP0AdTUp/uYn8VqrT3FjlputVxuYiGJuml4Nm2B3WBdSY5My75pVOBP4NcnSQG68dZas14k3ppsDI7KFJTVQvR3bLIoyo77EjyybHH0dU8ClZH/SbE2kPic6vaczfMimpDO0kCKy7HKhqF/Xw7MwcE7t6/isqA/etE0CM2O7NKwDRIs1shCbejZsMuJGnciB/BrHAyZoQ3pZudXYTtzxB7r1rilxO/3MpP4FaU+o69TLzFlNZ14nPovKUpjze2u1OrmYmF3sMlZqeJaYI1YmzreAaWdIZoJPRcdzE4za5r94uM8ymqQtOffSd5LGS4nX0FLkZ64F/iSXnJrC4K4p4/vu3txq5E8SNGe7pmafF5eTd22p7qy5KmpfJFNFdhyI4x6gxS1pM3lq3ZZvr3Dc+LhMr/Kh47dSP7h2an5tUUd+V5s3rIo1HN0kTMCFdCmMd5PzOqZqNAwKPLhAfXZeY6sWwFlz28BjlWCWkeuN7Il005Tf6c8qrX+tEvkpM9MCTiDD6t9qUeDmJQw74/qQBm5CJI0HhzRFTnoZm/Gsa8YkxL9FxjYdNhInRB1Y9tVdxoUfDhqRWXrZPM6R2gzRwiE6TB1Ph4TyNJkxDdqs4cuRHAoe2uFgWGCDZQXuUDefHrpqdGn2zNj0seaTbhMlHY5cPAXxQWW+tTlWc+pGp2JcFpg249JZjUOtJ64koaxHENaXFwnMdvhSJO3sS6I72r74/Cx+dGvZ4JyOMHGUrbPNlk5Z4+hBT+KceWAV6OqrEolFZd4/fqvzAXYbHwEtHNuxqtqXdf4EOCvbLvrYdjZ1ffuQZy/DNi4/xd+3W8agUxua5givK3Hbu4vt6zMv7zjKJd1hd9jar8o/ZhGE3iR0GXjsENL1063LZZuRrpoHce7FOMSwTMRmiFGIfi65BNLpGLz7rlF6hPXNiYG1x9ONf7OQ8LkHEarYBk3QuLw4xoy8lp0GowUtjVD13Im93ahpWNZfvvMxvebvgXymR8iK4g/Z4X/77Hljf04N1ktw/ttlwoPGua/tNegb9LhD+RO97PfHlTgLsn5wr5ehow35UYskzh9XNUc/q0PKrrMiWe36gKtzfkIifnxfHrT0GPpHsYSqbLye5i+b3tiTbb0lxCyifC8yDHMJp4wvHzF53ymAG+JF1XRIdSSounHlAvWcjJYeg6wl+B//4CWzz6zSvOQ+b7fFSJiAHBs96V369lwvzpiDX5AdghXyns7R3d2Ni/1rPJ74MTle7UJcTaRpcbwmvKuuq7MurL0G8m1qzUlR6NAQJnYI3BhF9bS3MzBMKTPDwqvQWhPS7O/Hu9hypoE6mXp+Ka7vV++MMseH3qEG0PqTSTdxB6ssNRtdHdqiViwYfHjWoPAtyRv9ff42/tmw6k0yb6uPf28HFGpGR8KuXpfaTLrT7Fc8v+b33NrwKtV41Nn2jmx9SNB+lAQpGyPgjLML/ECZaY/zrcBSmQ370LyyoMivIEr/GIQLuz8m6tZylCz2KPUwCpdfULvQjVB3iO6l13DlzzdAbM37bimXDq3jwhdklOt1HYf1i4wYU+uIRqTILMuhrGRP5Hq6dmXzNpstqSTr3L0aIrQ5Vycd/+H24coGeP+M5mS70j/3hwe/2ko32UvWR4nPnd0Qt9JoUWOt/3XJWs/VxZ6oA3YJI2ZGxrMnNt9UZlbAU4LxE3Yk+zmKZ+8BXHChbdyL4jRs38/TuaSSO2Sjh6zNmHNNPj95YNuHriuNA/hjRuPVpPp9qLxnbVc3Y4VLcWHdvFLRiEUmYishlb/NVVfN9OFelkyIL4emDgWtxt/6yt8rAv4ue9rB1vMe3LY/YTpd+2Tp6wn+AMWvkVmmrpxfXmQpI7oq3r3gwKha1NiR1ZKqMzyuG69ZXLsUgnfkh0IYt+5MC58AJidjWQ/pVm7x0xrWztt9dnCsnZqdKXJhnrzN0qjcO5Bug8KiC9AHemcwtvFyFCtLH1N4qmdOh7/Nl5HC6AiQMOwgrkSHQIuiwdOpX3R6bTu68wBk2nbSnyqXXdfLR76sdkTq5ndJVVjxkUdPE3JlPfJBD1yFrs6HW1/xaucvB87QmELnVe0OhFRBq7dm6/zqIB6TGWSS5R7kpFk0PkrRZeiqva6QBkJvpge3PnHUhbNS1KezRPICqhhz7MMyvjCvc5aNZz3EBj3rGxkIsfd95DEQVuSKTWDgKwKneMo5VUUMrqmsWyuwg7u6HT0x5CEXJ/JfNr2cZvMNkVZfxXKVhFbNce5eX/9ncGa/PC626nlTFvWiA57eltozKm7LWCKhK5EdqcGawG8Je3FiDrbuu3AsYa+6MFDwjBoLYabSEC8pyfCORnGQCjmoqZDjHniaGkD8PJwxj46ahNIoje62Grp/YIxw9xbJJw4lO6R2dEIky8jHPmixNkvsnBAbfOqxxhIvHb5WI1HgkuFM/JKfEYFIQWyiDK8ZgXok2WmjlDJsV9MibjBmO5eny0wpsiW/H6pzqhAHHanSC04PHilDJHjzg1Z1Uy/6py0K0OnzuUkxQWriPPpZY8HBsbDMysYQZ34JPQBVb4IjSBk+2e3SUv4mJgLd0V+M85p6TFSG9nGdnuzE9mcXWCk8ogZlL2odecqujQkVvDhkhTAUQWdWdYSbXQ0tpRVwGnkDH2JMGzCOv4R0F33pY0TunMpzVORL9hXKWkQ6Xabd0M6ukGqT9Z52T3N3WiV0HhBGyU6FabWpAl9U0SrOxz8ZPo5zN3AsU0VNVMbY61DcrbZZIaR1Yh+ZfZFXYFRtBzHTNFtWbv5khsusS7as/5JpSC/n4wYtd9Srl+ei3elKBwmllcs6igtDBNqjJQki85onsewj8OLuSTqi/xAj4Qt9jeG+ALlyVZmXpwqDKxyXtIeqh8PCutBjkduqZaja89QfOtbczreypJKG/jK9qFLNxr3VnLt1aAnFvyQ7DOPLRPQoK7RlAfrPpaFKNX8Xix12/mhJ1Vmm2qZ9Z1WC71S79QQNdWtH8Y/ckrGzSkF/7u6THBHasOj0a01CUeAltRsOHUxWPYhLOQLpa2rC0HnfNlrx3jStQAV4NaIyGi7JYh55zIZXR8aTEbzhw6Rw99uvC6+xSw3IvaYp2GK9jsPt3p4QnchupaBRHkWPoXKYkMsaKVBQvkXn7tLRz2b7jncsYoolhcri7nH49569WHRH+BElDuWERXXTR2il5xejx0yVc+vrS7kw8sGprYa3lu0yhyFMLW+wTdakU7Jnn6qeeEKTQnKRc2FC0VbZ2dOY40gj9QJDTuLIE6Vah3BvFNuDzBxM1K0MqOVVTePU/yGJcjT7i6H5dJsZ5G9eWhHrjMOKHmJfbbtDhemrT71z5RHK4tBjFyI15Ls3mVbkqfrBXE9V+qxLBH4Y3TIgpdzX7HeTawZjj9uWzJdy/gIhKdTHwl2taQjNpkbBV2ryIp5aJiv4Bf+q8Yz1vF2sQuSBx5NwhTyJulvkJfKNtyDrwVkwPJ/dvgaKtk/HwTWJcjsRjIpbBYU3aM7zam7NpskPqc6q+qcdBifmzGqQQuZcKafaggpt0ITZJ1eX90NB3ezkUiobj1sObc+lwq9CJiyM5IsJSd9cs6VGNaCx9j0re6v5KR/rZvf5Z//l+MmCT2vSGaqir/xvv/ifHs+PellpnNTT2pHIRz4fv5h6MUnHL/P15O8z4odTojLPpevnL30eV9dlUnMCM06K+2RVFX6CW0BCxGkTFt8xvD1X7NsN095Ji+Wvub0tqnr71NTAGf2RnB9NB3j9yoUrJsdHSjTGv1ZHx8NAOPxgSpca4FXr4FnrsMvFzr1IVp43Uht18ozriGSIotI3YIkU1lZpClUKh+2byij0snZM0pnl/9j4IlpFpAfKdG7VhhutbEwelTal1srzjttqrLEGhaL5VV7E+1Njog0++omzyoigzpNr0zKSmzNftkripfGN2U+69Ldm6goIC8v8Gb4wjdWxGWbaZWJtf9jINSxA9UlWNQ7GVMfpGOQYjyvKbqHeOA8ye5jPnR6pB/H99dGbujrlUF5EDPdqV+sAnfBytFnSw82wyXnd8cQqExdhyi3KED99FB7ZThiGL2hVaFIDFQr0x+O9e1OmbvhbtDneaqCcmNF4Brn/u/wyKYKnkoqYaobX2Bk/kcY2vIwYRY2IkCpiP12ZkV4o4Lq54gd93JhL7SUZiRdHNa3vhmxtjHtC7S+4xHF5b/YgpQMZrJm4lrq0bGiwMz5Hxk6bOAhX8tvFF0ooZRnJEy+nY9DrFXwH2oYvapdp1z7iuPMwnrg+UZ8wV0aTG1TZcf1qSUdZek8MSk5XKIVVR4U81g3BhKrRZ4qrXKgM9WEWvEqk+vL/XYnT5gM75x6hvKbKS+vNYYlUs39pf/FUBfW/3lXzANG3LHbNY+N0oqalpaFt9xqZz2ZkmXDOO469rc455lRBmSD86aDiLv7Eo4regh0HCbFLSDmieOFiTuQ2F6vNXtsFwR5YkbxcsNpzeKXQu/3oSynjs5/cDuUbNbuEEBUMX1omxmAKE+JQSAu/cAK611t/2zF/YqOn6MyzRhPbYlYEYXyuuCwcjnRusNshkD3mtYjocdVv7XFrdNrJtQfg37sYBRBzbZBC0RHYk06or2QJeXMn59ws24xbZ/u7LUyzzCG7hZLbi3FZMl8Q1MxOOqdyu3Necwkx6JsazjGuc6oSZ8uDeINDuxwpnjtGwm7n9msxuk2iGKYY4lLa7tmKttH+Vf5uWdn2vqkitTQmYvfS0tbEiobTOyuIT053Nr2aCz9+4Yfzq/hTBmETW6NKPhQot1ahR6pK67BWbsSkwNM7l5z1K/zFO/81P4JqI+eXP+QfbbHGrBQkFc2hhesm6rv404rPORqlP9BTj4pirpuP5yFfMkXY+OXsFPxlGqfn5qDT3C35iNwz3ljjoToTYz9RcOFpm5FjvoZWtrIyRuiVjzVi4UsTgnPQc03WuOkm+UCKFpWWaaCcTQwfGS0jkFC3bHrmxL5Qf03Hg9PK4taBidU0C5Nshb5Wgi4lPf6Dobe7jSDePDS42TLXQk+HiTlXxlNVI+Ua27QTDjpTnjuGBnHvS1ba6KAVNpgyKBWXEm2LoVVaJ+CE8sZSgY8++7H1ITtG5Fxxo+axeeLprP1dHSIMTygxPblKfXPkcji7o3sdU9YaX1TSM7x2UmIcPudXCsUu9TWpPaFN1VRgSlCllVIt2DPp7SMPhllI4b7f1qvyYDU/tvn9GRPZ4HwnWZmtm8Kf4UYJ4Zz3BS4/ZXbsgkNhH8SyKhLRQXuLIaVoOMFNX6yKT2EmepmnNmFRgU9x3snnc8gDcI39F6L1DmnHeIeTqt+fOlc4m8/5eYUW7qnpFnFdz+cPVxVdIZygGvQNEB628PTWYpaODTFwdpyaLS1S7Y5CgojGY67FLX3Q6zTo9bTHCS4sJK7Zt1HZ1zkcF0XuNTHIV/mcXOXIo2T7M3spASgRO2G+C7zSRiuDYzf4iQw+xBuWQu8O05AtGFGHfMqlk85dRzs8iNxvZxu+auQ9bZ1v3hEbnp4ougEGeykbI42K5DsDom9gN2KtyNrsqzht+FpDPKLgyEYekipsYXC0OEQaTAtPg66HQ/VyaOzwFgg9hh6jXIG2arLlhc07tMqXJZpJOlM3/TiQi+8qw9lugewandQojnm7DMm8JFpGk8PxtPjRAQqGbPHK84BlNGd2f2fU0rGWFEsH9he1SSdqdxoasCoJ3SSOLNowIAx/N//EzNSAM9+V/L3huN0G/3NGwojFwTdrTyMEt4ZwF0bjBoPgbTJHqiaaaphY7chBmlY6R3az289Fp3fkpx+T7jpCH+wi/fwEnOGvalP2NFw5ZhWAbLs4wCuA5h05B2umnuew7xExzmq0/H0gIWVXKgE7sbxvIK0Hb560Jn72/Rwdl5hKaB853zAzOR6er0D7Grb7F84eYtkhWjFcY8UUbjzm2uz+yWdtsTRjrkFpjqw+giVso/1aruiNx7tn4hHQIcUnmxENN5+tFrx/6RpJgtsbwgqLXcZcOD1r/l4kaXOa3cQbPfwQbYkT2QehHinEzLiNXNGtHJp7hCGqhPTL3l4C55cvEK2xr6OWs1OFVDxn5xc2mvVtxe5DQRWEXcz/eGmk/r3K/jIqJLDEf37p/Blh1ezEkZkksQpxGRXqrL+6ilaiS0gdrfJZMe5ckrEg3aJNa53TNVih91wdIm5JjkkrPod7f7ROP8Bn4Y74I0bO/DLdohPzLSPGCrXGS1ibT4zSs0tuXjyVd6/68k1lCmzbucJY135pA2sw6tgU1zZlwcbFqiFCKGVn/K6H+u6/lZycZ942Gntf9iN9ymphixWnXsSxTtuTTrmSVsLeQ0WtDCsvbp+P4quvYm0KE3NKw7Go+xUxkgu1PNH+8RN9PgGkuXZ4pqeN5sK4Db8v4yLLD9pK98Mp4rtm24vdxTmz53MzfDtQ3U9ineMs6U6lEza8PnujxrvcvJ8vYnhzlT2agdZX1sLpY9woHSH7mVsoHT/evSNwGy12vpJ5IVXopjI9GtiadljH61jFUK5JK2Invpas2YN8lFV1Qh+xmjCrfjo/wtvWW/JS2gLtZO5GDGpsfYdr3fo2wjBuYXXhHQEZ5OOT+Hn3rDjxWKPDbQF2wdiblvA2T3auYgc9vTS7IUkwD3JvmXd3ERRT7/G0i65sG/GGFjbiG6GW9bCbrweyi5ixtiO+69hfq3GV03aYs+o5D8qCRyoz86DwqevEdUsqEqRfOW+KWzLDnTF1+OutxZ/8jMZLccfD8c96TKw33/LFVAUQQrdm+gYvtE24c3vpuJpf2YBrvC0rZcxoJJ4sim+7khEcC8VtEyJKfUZlfr7tFtM6zwO6OsM/1gFbDj/oxhYj/l2AGKdva2cnuwlMt1qMIKp9y4Y7hRvVjeO0FOX+HqneJWxBwuptd+kq/QLaVVTWbUWPfKemn8llwvEuYwiX7vv4JQHsuRHGnFA9NVN5R6W6F9u0qUzAXzGVUZ/uPPexUK8pDVuf3r3ss8/80V+PzH3z2fPD3G4u0T4w9HCQXFaI+DQe7dR6m3LB+0BD5oV+CBqqP5cYtTaveLEAJr3dbusdub3QLtD7bMdmrQj1gd/uwm0nY10QDdH2V1w49DE6p0JO8T2imZoOLaKHEsXBjuJrsXql7NbmSEFwoVVhfVnphFLUdVX4ipl6ohOm1XyUQDnKZ7+UoHw16+Ly++kPbOKdre+iGOGfNUT2p4XiUQSbEIw+evL9mbweISHLhgXpBAac9ZabZvXxZk0tQyk9H3x2uk+UdOAD+dz3ziO++vkJ6xm9WV6+4sEBaaXE3GutXX53+CdPLZ9D50gIvy2e0ntOFpZuFE2mR069SrjjwtuYTT8at8uDGHhJ0H1RsF/ZojrK/fHu4UyPqPiueN8qcUVI2uHDM1a74fmYncR2KiJVuYuYKYizgIl3wMRZd6k+rwU8gw5eOfZ1j32HGEtH3Ul/4L21UjzFKtnHGmHGopHckUYCWhb97cwUq7MeoyRnGldmL/7suY6zcKO0vDOKgKqbUlCKwsQX+S8f1Jq0IxhRpB77z7/aVNYTZLjAJUi9NpPbKp2ftSVZaI+PFPjhegRjA7vW0gPEWUhMl61Ju9fNMFtN1JDXcVwGqiKMkO3JfJIr3M9veExkTkK2XVvhBrVx+vbbtRJUZvVHOZvm6sL0mEWUPvEPYTfTk6IXeBzcxF03O+jedXLVaVtaqIRCUPjalzINGWdRAxumJhxij+O7B9z8PGXf1HyQM7KgPn8mMeP5SEzgP0LxX/7EdKtb7B+TRf1yeyShJgzHMGivYqRnVwaFYBrMSEfH6kKRmBKmbzu/qkKgGOlTCeO80asZBvwqbtVIpcpNsPx/vnD8/3jsKncOwaT+7svn7UEZA9KToymv1Iv/8K4L9VWrmblWWkOa3Wv++pnWqxD9UE5X4RsrZsQPH/6i1RvF+ZNVxf+K49QZXabhH7P733JcwJkkQ7D/Cw==","base64")),y=Math.log2||function(t){return Math.log(t)/Math.LN2},r=(g=function(t){return y(t)+1|0})(_.categories.length-1),a=g(_.combiningClasses.length-1),h=g(_.scripts.length-1),c=g(_.eaw.length-1),o=a+h+c+10,u=h+c+10,d=c+10,i=(1<<r)-1,s=(1<<a)-1,f=(1<<h)-1,l=(1<<c)-1,n.getCategory=function(t){var e;return e=m.get(t),_.categories[e>>o&i]},n.getCombiningClass=function(t){var e;return e=m.get(t),_.combiningClasses[e>>u&s]},n.getScript=function(t){var e;return e=m.get(t),_.scripts[e>>d&f]},n.getEastAsianWidth=function(t){var e;return e=m.get(t),_.eaw[e>>10&l]},n.getNumericValue=function(t){var e,n,r,i,o;if(o=m.get(t),0===(r=1023&o))return null;if(r<=50)return r-1;if(r<480)return i=(r>>4)-12,e=1+(15&r),i/e;if(r<768){for(o=(r>>5)-14,n=2+(31&r);n>0;)o*=10,n--;return o}for(o=(r>>2)-191,n=1+(3&r);n>0;)o*=60,n--;return o},n.isAlphabetic=function(t){var e;return"Lu"===(e=n.getCategory(t))||"Ll"===e||"Lt"===e||"Lm"===e||"Lo"===e||"Nl"===e},n.isDigit=function(t){return"Nd"===n.getCategory(t)},n.isPunctuation=function(t){var e;return"Pc"===(e=n.getCategory(t))||"Pd"===e||"Pe"===e||"Pf"===e||"Pi"===e||"Po"===e||"Ps"===e},n.isLowerCase=function(t){return"Ll"===n.getCategory(t)},n.isUpperCase=function(t){return"Lu"===n.getCategory(t)},n.isTitleCase=function(t){return"Lt"===n.getCategory(t)},n.isWhiteSpace=function(t){var e;return"Zs"===(e=n.getCategory(t))||"Zl"===e||"Zp"===e},n.isBaseForm=function(t){var e;return"Nd"===(e=n.getCategory(t))||"No"===e||"Nl"===e||"Lu"===e||"Ll"===e||"Lt"===e||"Lm"===e||"Lo"===e||"Me"===e||"Mc"===e},n.isMark=function(t){var e;return"Mn"===(e=n.getCategory(t))||"Me"===e||"Mc"===e}}).call(this,t("buffer").Buffer)},{"./data.json":219,buffer:60,"unicode-trie":221}],221:[function(t,e,n){var r,i;i=t("tiny-inflate"),r=function(){function t(t){var e,n,r;(e="function"==typeof t.readUInt32BE&&"function"==typeof t.slice)||t instanceof Uint8Array?(e?(this.highStart=t.readUInt32BE(0),this.errorValue=t.readUInt32BE(4),n=t.readUInt32BE(8),t=t.slice(12)):(r=new DataView(t.buffer),this.highStart=r.getUint32(0),this.errorValue=r.getUint32(4),n=r.getUint32(8),t=t.subarray(12)),t=i(t,new Uint8Array(n)),t=i(t,new Uint8Array(n)),this.data=new Uint32Array(t.buffer)):(this.data=t.data,this.highStart=t.highStart,this.errorValue=t.errorValue)}return 11,5,6,32,64,63,2,32,31,2048,32,2080,2080,32,2112,4,t.prototype.get=function(t){var e;return t<0||t>1114111?this.errorValue:t<55296||t>56319&&t<=65535?(e=(this.data[t>>5]<<2)+(31&t),this.data[e]):t<=65535?(e=(this.data[2048+(t-55296>>5)]<<2)+(31&t),this.data[e]):t<this.highStart?(e=this.data[2080+(t>>11)],e=this.data[e+(t>>5&63)],e=(e<<2)+(31&t),this.data[e]):this.data[this.data.length-4]},t}(),e.localExports=r},{"tiny-inflate":218}],222:[function(t,e,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(t){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.localExports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],223:[function(t,e,n){e.localExports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],224:[function(t,e,n){(function(e,r){function i(t,e){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),g(e)?r.showHidden=e:e&&n._extend(r,e),v(r.showHidden)&&(r.showHidden=!1),v(r.depth)&&(r.depth=2),v(r.colors)&&(r.colors=!1),v(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,t,r.depth)}function o(t,e){var n=i.styles[e];return n?"["+i.colors[n][0]+"m"+t+"["+i.colors[n][1]+"m":t}function a(t,e){return t}function s(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function u(t,e,r){if(t.customInspect&&e&&k(e.inspect)&&e.inspect!==n.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(r,t);return m(i)||(i=u(t,i,r)),i}var o=c(t,e);if(o)return o;var a=Object.keys(e),g=s(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),S(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(e);if(0===a.length){if(k(e)){var _=e.name?": "+e.name:"";return t.stylize("[Function"+_+"]","special")}if(b(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(x(e))return t.stylize(Date.prototype.toString.call(e),"date");if(S(e))return l(e)}var y="",v=!1,w=["{","}"];if(p(e)&&(v=!0,w=["[","]"]),k(e)&&(y=" [Function"+(e.name?": "+e.name:"")+"]"),b(e)&&(y=" "+RegExp.prototype.toString.call(e)),x(e)&&(y=" "+Date.prototype.toUTCString.call(e)),S(e)&&(y=" "+l(e)),0===a.length&&(!v||0==e.length))return w[0]+y+w[1];if(r<0)return b(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var C;return C=v?h(t,e,r,g,a):a.map(function(n){return f(t,e,r,g,n,v)}),t.seen.pop(),d(C,y,w)}function c(t,e){if(v(e))return t.stylize("undefined","undefined");if(m(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return y(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):_(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,n,r,i){for(var o=[],a=0,s=e.length;a<s;++a)P(e,String(a))?o.push(f(t,e,n,r,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,n,r,i,!0))}),o}function f(t,e,n,r,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(s=t.stylize("[Setter]","special")),P(r,i)||(a="["+i+"]"),s||(t.seen.indexOf(c.value)<0?(s=_(n)?u(t,c.value,null):u(t,c.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return"  "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return"   "+t}).join("\n")):s=t.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function d(t,e,n){var r=0;return t.reduce(function(t,e){return r++,e.indexOf("\n")>=0&&r++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n  ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function p(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function _(t){return null===t}function y(t){return"number"==typeof t}function m(t){return"string"==typeof t}function v(t){return void 0===t}function b(t){return w(t)&&"[object RegExp]"===C(t)}function w(t){return"object"==typeof t&&null!==t}function x(t){return w(t)&&"[object Date]"===C(t)}function S(t){return w(t)&&("[object Error]"===C(t)||t instanceof Error)}function k(t){return"function"==typeof t}function C(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}function A(){var t=new Date,e=[E(t.getHours()),E(t.getMinutes()),E(t.getSeconds())].join(":");return[t.getDate(),T[t.getMonth()],e].join(" ")}function P(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var j=/%[sdj%]/g;n.format=function(t){if(!m(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(i(arguments[n]));return e.join(" ")}for(var n=1,r=arguments,o=r.length,a=String(t).replace(j,function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),s=r[n];n<o;s=r[++n])_(s)||!w(s)?a+=" "+s:a+=" "+i(s);return a},n.deprecate=function(t,i){if(v(r.process))return function(){return n.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),o=!0}return t.apply(this,arguments)}};var O,I={};n.debuglog=function(t){if(v(O)&&(O=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!I[t])if(new RegExp("\\b"+t+"\\b","i").test(O)){var r=e.pid;I[t]=function(){var e=n.format.apply(n,arguments);console.error("%s %d: %s",t,r,e)}}else I[t]=function(){};return I[t]},n.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=p,n.isBoolean=g,n.isNull=_,n.isNullOrUndefined=function(t){return null==t},n.isNumber=y,n.isString=m,n.isSymbol=function(t){return"symbol"==typeof t},n.isUndefined=v,n.isRegExp=b,n.isObject=w,n.isDate=x,n.isError=S,n.isFunction=k,n.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},n.isBuffer=t("./support/isBuffer");var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",A(),n.format.apply(n,arguments))},n.inherits=t("inherits"),n._extend=function(t,e){if(!e||!w(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":223,_process:188,inherits:167}]},{},[2])(2)})}(wijmo||(wijmo={}));var wijmo;!function(t){!function(t){"use strict";!function(t){t[t.Butt=0]="Butt",t[t.Round=1]="Round",t[t.Square=2]="Square"}(t.PdfLineCapStyle||(t.PdfLineCapStyle={}));!function(t){t[t.Miter=0]="Miter",t[t.Round=1]="Round",t[t.Bevel=2]="Bevel"}(t.PdfLineJoinStyle||(t.PdfLineJoinStyle={}));!function(t){t[t.NonZero=0]="NonZero",t[t.EvenOdd=1]="EvenOdd"}(t.PdfFillRule||(t.PdfFillRule={}));!function(t){t[t.Portrait=0]="Portrait",t[t.Landscape=1]="Landscape"}(t.PdfPageOrientation||(t.PdfPageOrientation={}));!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right"}(t.PdfImageHorizontalAlign||(t.PdfImageHorizontalAlign={}));!function(t){t[t.Top=0]="Top",t[t.Center=1]="Center",t[t.Bottom=2]="Bottom"}(t.PdfImageVerticalAlign||(t.PdfImageVerticalAlign={}));!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Justify=3]="Justify"}(t.PdfTextHorizontalAlign||(t.PdfTextHorizontalAlign={}));!function(t){t[t.Top=0]="Top",t[t.Alphabetic=1]="Alphabetic"}(t._PdfTextBaseline||(t._PdfTextBaseline={}));!function(t){t[t.A0=0]="A0",t[t.A1=1]="A1",t[t.A2=2]="A2",t[t.A3=3]="A3",t[t.A4=4]="A4",t[t.A5=5]="A5",t[t.A6=6]="A6",t[t.A7=7]="A7",t[t.A8=8]="A8",t[t.A9=9]="A9",t[t.A10=10]="A10",t[t.B0=11]="B0",t[t.B1=12]="B1",t[t.B2=13]="B2",t[t.B3=14]="B3",t[t.B4=15]="B4",t[t.B5=16]="B5",t[t.B6=17]="B6",t[t.B7=18]="B7",t[t.B8=19]="B8",t[t.B9=20]="B9",t[t.B10=21]="B10",t[t.C0=22]="C0",t[t.C1=23]="C1",t[t.C2=24]="C2",t[t.C3=25]="C3",t[t.C4=26]="C4",t[t.C5=27]="C5",t[t.C6=28]="C6",t[t.C7=29]="C7",t[t.C8=30]="C8",t[t.C9=31]="C9",t[t.C10=32]="C10",t[t.RA0=33]="RA0",t[t.RA1=34]="RA1",t[t.RA2=35]="RA2",t[t.RA3=36]="RA3",t[t.RA4=37]="RA4",t[t.SRA0=38]="SRA0",t[t.SRA1=39]="SRA1",t[t.SRA2=40]="SRA2",t[t.SRA3=41]="SRA3",t[t.SRA4=42]="SRA4",t[t.Executive=43]="Executive",t[t.Folio=44]="Folio",t[t.Legal=45]="Legal",t[t.Letter=46]="Letter",t[t.Tabloid=47]="Tabloid"}(t.PdfPageSize||(t.PdfPageSize={}))}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(t){"use strict";t._Errors={InvalidArg:function(t){return'Invalid argument: "'+t+'".'},InvalidFormat:function(t){return'"'+t+'" is not in the correct format.'},ValueCannotBeEmpty:function(t){return'Value cannot be empty: "'+t+'".'},PathStarted:"This method can not be used until the current path is finished.",BufferPagesMustBeEnabled:"The bufferPages property must be enabled to render headers and footers.",AbstractMethod:"This is an abstract method, it should not be called.",FontNameMustBeSet:"The font name must be set.",FontSourceMustBeStringArrayBuffer:"The font source must be of type string or ArrayBuffer.",FontSourceMustBeString:"The font source must be of type string.",FontSourceMustBeArrayBuffer:"The font source must be of type ArrayBuffer.",EmptyUrl:"URL can not be empty.",UndefinedMimeType:"MIME-type must be set.",InvalidImageDataUri:"Invalid Data URI. It should be base64 encoded string that represents JPG or PNG image.",InvalidImageFormat:"Invalid image format. Only JPG and PNG formats are supported."}}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";function n(e){return.75*t.asNumber(e)}function r(e,n){if(t.isObject(e)&&t.isObject(n)){for(var i in e)if(!i||"_"!==i[0]){var o=e[i];if(!(o&&t.isFunction(o.equals)?o.equals(n[i]):r(o,n[i])))return!1}return!0}if(t.isArray(e)&&t.isArray(n)){if(e.length!==n.length)return!1;for(var a=0;a<e.length;a++)if(!r(e[a],n[a]))return!1;return!0}return e===n}e._IE="ActiveXObject"in window;var i={"xx-small":7,"x-small":7.5,small:10,medium:12,large:13.5,"x-large":18,"xx-large":24};e.saveBlob=function(t,e){if(t&&t instanceof Blob&&e)if(navigator.msSaveBlob)navigator.msSaveBlob(t,e);else{var n=document.createElement("a"),r=function(t){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),t.dispatchEvent(e)};if("download"in n){var i=window.URL||window.webkitURL||window,o=i.createObjectURL(t);n.href=o,n.download=e,r(n),n=null,window.setTimeout(function(){i.revokeObjectURL(o)},3e4)}else{var a=new FileReader;a.onloadend=function(t){n.download=e,n.href=a.result,r(n),n=null},a.readAsDataURL(t)}}},e.ptToPx=function(e){return t.asNumber(e)/.75},e.pxToPt=n,e._asColor=function(n,r){void 0===r&&(r=!0);var i;return i=n?n instanceof t.Color?r?t.Color.fromRgba(n.r,n.g,n.b,n.a):n:t.Color.fromString(n):t.Color.fromRgba(0,0,0),t.assert(i instanceof t.Color,e._Errors.InvalidArg("colorOrString")),i},e._asPdfPen=function(n,r){return void 0===r&&(r=!0),(t.isString(n)||n instanceof t.Color)&&(n=new e.PdfPen(n)),t.assert(null==n&&r||n instanceof e.PdfPen,e._Errors.InvalidArg("penOrColor")),n},e._asPdfBrush=function(n,r){return void 0===r&&(r=!0),(t.isString(n)||n instanceof t.Color)&&(n=new e.PdfSolidBrush(n)),t.assert(null==n&&r||n instanceof e.PdfBrush,e._Errors.InvalidArg("brushOrColor")),n},e._asPdfFont=function(n,r){return void 0===r&&(r=!0),t.assert(null==n&&r||n instanceof e.PdfFont,e._Errors.InvalidArg("font")),n},e._asPt=function(r,o,a){void 0===o&&(o=!0),void 0===a&&(a=0);var s=!r&&0!==r;if(t.assert(!s||o,e._Errors.ValueCannotBeEmpty("value")),s)return a;if(t.isNumber(r)){if(r===r)return r}else if(t.isString(r)){if(i[r])return i[r];var u=parseFloat(r);if(u===u){if(r.match(/(px)$/i))return n(u);if(r==u||r.match(/(pt)$/i))return u}}t.assert(!1,e._Errors.InvalidFormat(r))},e._formatMacros=function(t,e){var n={},r=0;return t=t.replace(/&&/g,function(t,e,i){return n[e-2*r+r]=!0,r++,"&"}),t=t.replace(/&\[(\S+?)\]/g,function(t,r,i,o){var a=e[r];return a&&!n[i]?a:t})},e._compare=r,e._shallowCopy=function(t){var e={};if(t)for(var n in t)e[n]=t[n];return e},e._toTitleCase=function(t){return t?t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():t}}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var n=function(){function e(t,e,n){void 0===t&&(t=null),void 0===e&&(e=t),void 0===n&&(n=0),this.dash=t,this.gap=e,this.phase=n}return Object.defineProperty(e.prototype,"dash",{get:function(){return this._dash},set:function(e){this._dash=t.asNumber(e,!0,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gap",{get:function(){return this._gap},set:function(e){this._gap=t.asNumber(e,!0,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"phase",{get:function(){return this._phase},set:function(e){this._phase=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return new e(this._dash,this._gap,this._phase)},e.prototype.equals=function(t){return t instanceof e&&this._dash===t.dash&&this._gap===t.gap&&this._phase===t.phase},e}();e.PdfDashPattern=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(t){"use strict";var e=function(){function e(){}return e.prototype.clone=function(){throw t._Errors.AbstractMethod},e.prototype.equals=function(e){throw t._Errors.AbstractMethod},e.prototype._getBrushObject=function(e){throw t._Errors.AbstractMethod},e}();t.PdfBrush=e}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var n=function(){function n(e,n,r){this.offset=e||0,this.color=n||t.Color.fromRgba(0,0,0),this.opacity=null==r?1:r}return Object.defineProperty(n.prototype,"offset",{get:function(){return this._offset},set:function(e){this._offset=t.clamp(t.asNumber(e,!1,!0),0,1)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"color",{get:function(){return this._color},set:function(t){this._color=e._asColor(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"opacity",{get:function(){return this._opacity},set:function(e){this._opacity=t.clamp(t.asNumber(e,!1,!0),0,1)},enumerable:!0,configurable:!0}),n.prototype.clone=function(){return new n(this.offset,this.color,this.opacity)},n.prototype.equals=function(t){return t instanceof n&&this._offset===t._offset&&this._color.equals(t._color)&&this._opacity===t._opacity},n}();e.PdfGradientStop=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wijmo;!function(t){!function(e){"use strict";var n=function(n){function r(t,e){var r=n.call(this)||this;return r.stops=t||[],r.opacity=null==e?1:e,r}return __extends(r,n),Object.defineProperty(r.prototype,"opacity",{get:function(){return this._opacity},set:function(e){this._opacity=t.clamp(t.asNumber(e,!1,!0),0,1)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"stops",{get:function(){return this._stops},set:function(n){t.assert(t.isArray(n),e._Errors.InvalidArg("value")),this._stops=this._cloneStopsArray(n)},enumerable:!0,configurable:!0}),r.prototype.equals=function(t){return t instanceof r&&this._opacity===t.opacity&&e._compare(this._stops,t._stops)},r.prototype._cloneStopsArray=function(n){for(var r=[],i=0;i<n.length;i++){var o=n[i];t.assert(o instanceof e.PdfGradientStop,e._Errors.InvalidArg("stops["+i+"]")),r.push(n[i].clone())}return r},r}(e.PdfBrush);e.PdfGradientBrush=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wijmo;!function(t){!function(e){"use strict";var n=function(e){function n(t,n,r,i,o,a){var s=e.call(this,o,a)||this;return s.x1=t,s.y1=n,s.x2=r,s.y2=i,s}return __extends(n,e),Object.defineProperty(n.prototype,"x1",{get:function(){return this._x1},set:function(e){this._x1=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y1",{get:function(){return this._y1},set:function(e){this._y1=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"x2",{get:function(){return this._x2},set:function(e){this._x2=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y2",{get:function(){return this._y2},set:function(e){this._y2=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),n.prototype.clone=function(){return new n(this._x1,this._y1,this._x2,this._y2,this.stops,this.opacity)},n.prototype.equals=function(t){return t instanceof n&&this._x1===t._x1&&this._y1===t._y1&&this._x2===t._x2&&this._y2===t._y2&&e.prototype.equals.call(this,t)},n.prototype._getBrushObject=function(t){for(var e=t._pdfdoc._document.linearGradient(this._x1+t._offset.x,this._y1+t._offset.y,this._x2+t._offset.x,this._y2+t._offset.y),n=this.stops,r=0;r<n.length;r++){var i=n[r];i&&e.stop(i.offset,[i.color.r,i.color.g,i.color.b],i.color.a)}return e},n}(e.PdfGradientBrush);e.PdfLinearGradientBrush=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wijmo;!function(t){!function(e){"use strict";var n=function(e){function n(t,n,r,i,o,a,s,u){var c=e.call(this,s,u)||this;return c.x1=t,c.y1=n,c.r1=r,c.x2=i,c.y2=o,c.r2=a,c}return __extends(n,e),Object.defineProperty(n.prototype,"x1",{get:function(){return this._x1},set:function(e){this._x1=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y1",{get:function(){return this._y1},set:function(e){this._y1=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"r1",{get:function(){return this._r1},set:function(e){this._r1=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"x2",{get:function(){return this._x2},set:function(e){this._x2=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y2",{get:function(){return this._y2},set:function(e){this._y2=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"r2",{get:function(){return this._r2},set:function(e){this._r2=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),n.prototype.clone=function(){return new n(this._x1,this._y1,this._r1,this._x2,this._y2,this._r2,this.stops,this.opacity)},n.prototype.equals=function(t){return t instanceof n&&this._x1===t._x1&&this._y1===t._y1&&this._r1===t._r1&&this._x2===t._x2&&this._y2===t._y2&&this._r2===t._r2&&e.prototype.equals.call(this,t)},n.prototype._getBrushObject=function(t){for(var e=t._pdfdoc._document.radialGradient(this._x1+t._offset.x,this._y2+t._offset.y,this._r1,this._x2+t._offset.x,this._y2+t._offset.y,this._r2),n=this.stops,r=0;r<n.length;r++){var i=n[r];i&&e.stop(i.offset,[i.color.r,i.color.g,i.color.b],i.color.a)}return e},n}(e.PdfGradientBrush);e.PdfRadialGradientBrush=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wijmo;!function(t){!function(e){"use strict";var n=function(n){function r(e){var r=n.call(this)||this;return r.color=e||t.Color.fromRgba(0,0,0),r}return __extends(r,n),Object.defineProperty(r.prototype,"color",{get:function(){return this._color},set:function(t){this._color=e._asColor(t)},enumerable:!0,configurable:!0}),r.prototype.clone=function(){return new r(this._color)},r.prototype.equals=function(t){return t instanceof r&&this._color.equals(t._color)},r.prototype._getBrushObject=function(t){return this._color},r}(e.PdfBrush);e.PdfSolidBrush=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var n=function(){function n(n,r,i,o,a,s){if(null==n&&(n=t.Color.fromRgba(0,0,0)),null==r&&(r=1),null==i&&(i=new e.PdfDashPattern(null,null,0)),null==o&&(o=e.PdfLineCapStyle.Butt),null==a&&(a=e.PdfLineJoinStyle.Miter),null==s&&(s=10),!t.isObject(n)||n instanceof t.Color||n instanceof e.PdfBrush)n instanceof e.PdfBrush?this.brush=n:this.color=n,this.width=r,this.cap=o,this.join=a,this.miterLimit=s,this.dashPattern=i;else{var u=n;this.color=u.color,this.brush=u.brush,this.width=null!=u.width?u.width:r,this.cap=null!=u.cap?u.cap:o,this.join=null!=u.join?u.join:a,this.miterLimit=null!=u.miterLimit?u.miterLimit:s,this.dashPattern=u.dashPattern||i}this._color=this._color||t.Color.fromRgba(0,0,0)}return Object.defineProperty(n.prototype,"color",{get:function(){return this._color},set:function(t){this._color=e._asColor(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"brush",{get:function(){return this._brush},set:function(t){t=e._asPdfBrush(t,!0),this._brush=t?t.clone():null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"width",{get:function(){return this._width},set:function(e){this._width=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"cap",{get:function(){return this._cap},set:function(n){this._cap=t.asEnum(n,e.PdfLineCapStyle)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"join",{get:function(){return this._join},set:function(n){this._join=t.asEnum(n,e.PdfLineJoinStyle)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"miterLimit",{get:function(){return this._miterLimit},set:function(e){this._miterLimit=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dashPattern",{get:function(){return this._dashPattern},set:function(n){t.assert(n instanceof e.PdfDashPattern,e._Errors.InvalidArg("value")),this._dashPattern=n.clone()},enumerable:!0,configurable:!0}),n.prototype.clone=function(){var t=new n(this._color,this._width,this._dashPattern,this._cap,this._join,this._miterLimit);return t.brush=this._brush,t},n.prototype.equals=function(t){return t instanceof n&&this._color.equals(t._color)&&(this._brush?this._brush.equals(t._brush):this._brush===t._brush)&&this._width===t._width&&this._cap===t._cap&&this._join===t._join&&this._miterLimit===t._miterLimit&&this._dashPattern.equals(t._dashPattern)},n}();e.PdfPen=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var n=function(){function n(t,e,n,r){void 0===t&&(t="times"),void 0===e&&(e=10),void 0===n&&(n="normal"),void 0===r&&(r="normal"),this.family=t,this.size=e,this.style=n,this.weight=r}return Object.defineProperty(n.prototype,"family",{get:function(){return this._family},set:function(e){this._family=t.asString(e,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"size",{get:function(){return this._size},set:function(e){this._size=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"style",{get:function(){return this._style},set:function(r){(r=t.asString(r,!1))&&t.assert(!!n._KNOWN_STYLES[(r||"").toLowerCase()],e._Errors.InvalidArg("value")),this._style=r},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"weight",{get:function(){return this._weight},set:function(r){(r=t.asString(r,!1))&&t.assert(!!n._KNOWN_WEIGHTS[(r||"").toLowerCase()],e._Errors.InvalidArg("value")),this._weight=r},enumerable:!0,configurable:!0}),n.prototype.clone=function(){return new n(this.family,this.size,this.style,this.weight)},n.prototype.equals=function(t){return t instanceof n&&this._family===t._family&&this._size===t._size&&this._style===t._style&&this._weight===t._weight},n._DEF_NATIVE_NAME="Times-Roman",n._DEF_FAMILY_NAME="times",n._KNOWN_WEIGHTS={normal:1,bold:1,100:1,200:1,300:1,400:1,500:1,600:1,700:1,800:1,900:1},n._KNOWN_STYLES={normal:1,italic:1,oblique:1},n._DEF_PDFKIT_FONT=new n("helvetica",12),n._DEF_FONT=new n,n}();e.PdfFont=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var n=function(){function t(t){if(this._values=[],this._keys={},t)for(var e=0;e<t.length;e++){var n=t[e];this._keys[n.key]=e,this._values.push({key:n.key,value:n.value})}}return t.prototype.hasKey=function(t){var e=this._keys[t];return void 0!==e?this._values[e].value:null},t.prototype.add=function(t,e){return this.hasKey(t)?null:(this._keys[t]=this._values.length,this._values.push({key:t,value:e}),e)},t.prototype.each=function(t){if(t)for(var e=0;e<this._values.length;e++){var n=this._values[e];if(!1===t(n.key,n.value))break}},t.prototype.eachReverse=function(t){if(t)for(var e=this._values.length-1;e>=0;e--){var n=this._values[e];if(!1===t(n.key,n.value))break}},t}(),r=function(){function r(t){var e=this;this._fonts=new n([{key:"zapfdingbats",value:{attributes:{fantasy:!0},normal:{400:"ZapfDingbats"}}},{key:"symbol",value:{attributes:{serif:!0},normal:{400:"Symbol"}}},{key:"courier",value:{attributes:{serif:!0,monospace:!0},normal:{400:"Courier",700:"Courier-Bold"},oblique:{400:"Courier-Oblique",700:"Courier-BoldOblique"}}},{key:"helvetica",value:{attributes:{sansSerif:!0},normal:{400:"Helvetica",700:"Helvetica-Bold"},oblique:{400:"Helvetica-Oblique",700:"Helvetica-BoldOblique"}}},{key:"times",value:{attributes:{serif:!0},normal:{400:"Times-Roman",700:"Times-Bold"},italic:{400:"Times-Italic",700:"Times-BoldItalic"}}}]),this._weightNameToNum={normal:400,bold:700},this._findFontCache={},this._internalFontNames={},this._doc=t,this._fonts.each(function(t,n){var r=function(t){for(var n in t)e._internalFontNames[t[n]]=1};r(n.normal)||r(n.italic)||r(n.oblique)})}return r.prototype.registerFont=function(n){t.assert(!!n,e._Errors.ValueCannotBeEmpty("font")),t.asString(n.name),t.assert(n.source instanceof ArrayBuffer,e._Errors.FontSourceMustBeArrayBuffer),n=e._shallowCopy(n);var r=this._normalizeFontSelector(n.name,n.style,n.weight),i=this._fonts.hasKey(r.name);i||(i=this._fonts.add(r.name,{attributes:n}));var o=i[r.style];o||(o=i[r.style]={});var a=this._makeInternalName(r);return o[r.weight]||(this._doc.registerFont(a,n.source,n.family),this._findFontCache={},o[r.weight]=a,this._internalFontNames[a]=1),a},r.prototype.findFont=function(t,n,r){var i=this._normalizeFontSelector(t,n,r),o=this._makeInternalName(i);if(this._findFontCache[o])return this._findFontCache[o];i.name+=","+e.PdfFont._DEF_FAMILY_NAME;for(var a=0,s=i.name.split(",");a<s.length;a++){var u=this._findFont(s[a].replace(/["']/g,"").trim(),i.style,i.weight);if(u)return this._findFontCache[o]=u}return this._findFontCache[o]=this._internalFontNames[t]?t:e.PdfFont._DEF_NATIVE_NAME},r.prototype._normalizeFontSelector=function(t,n,r){return{name:(t||"").toLowerCase(),style:(n||e.PdfFont._DEF_FONT.style).toLowerCase(),weight:parseInt(this._weightNameToNum[r]||r)||parseInt(this._weightNameToNum[e.PdfFont._DEF_FONT.weight])}},r.prototype._findFont=function(t,e,n){var r,i=this,o=[];switch(e){case"italic":o=["italic","oblique","normal"];break;case"oblique":o=["oblique","italic","normal"];break;default:o=["normal","oblique","italic"]}switch(t){case"cursive":case"fantasy":case"monospace":case"serif":case"sans-serif":this._fonts.eachReverse(function(e,a){var s="sans-serif"===t?"sansSerif":t;if(a.attributes[s])for(var u=0;u<o.length;u++)if(r=i._findFontWeightFallback(e,o[u],n))return!1});break;default:if(this._fonts.hasKey(t))for(var a=0;a<o.length&&!r;a++)r=this._findFontWeightFallback(t,o[a],n)}return r},r.prototype._findFontWeightFallback=function(t,e,n,r){var i=this._fonts.hasKey(t);if(i&&i[e]){var o=i[e];if(o[n])return o[n];if(!r){r=[];for(var a in o)r.push(parseFloat(a));r.sort(function(t,e){return t-e})}if(n>500){for(var s=0,u=0;u<r.length;u++){if((l=r[u])>n)return o[l];s=l}if(s)return o[s]}else{if(!(n<400))return 400==n?o[500]?o[500]:this._findFontWeightFallback(t,e,300,r):o[400]?o[400]:this._findFontWeightFallback(t,e,300,r);for(var c=0,u=r.length-1;u>=0;u--){var l=r[u];if(l<n)return o[l];c=l}if(c)return o[c]}}return null},r.prototype._makeInternalName=function(t){return t.name+"-"+t.style+"-"+t.weight},r}();e._PdfFontRegistrar=r}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var n=function(){function n(){this._ctxProps={xo:0,yo:0,lineGap:0}}return Object.defineProperty(n.prototype,"x",{get:function(){this._switchCtx();var t=this._pdfdoc._document.x-this._offset.x;return this._saveCtx(),t},set:function(e){e=t.asNumber(e),this._switchCtx(),this._pdfdoc._document.x=e+this._offset.x,this._saveCtx()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y",{get:function(){this._switchCtx();var t=this._pdfdoc._document.y-this._offset.y;return this._saveCtx(),t},set:function(e){e=t.asNumber(e),this._switchCtx(),this._pdfdoc._document.y=e+this._offset.y,this._saveCtx()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"lineGap",{get:function(){return this._ctxProps.lineGap},set:function(e){this._ctxProps.lineGap=e=t.asNumber(e,!1,!0),this._pdfdoc&&this._pdfdoc._document&&(this._switchCtx(),this._pdfdoc._document.lineGap(e),this._saveCtx())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){var t=this._pdfdoc._document.page;return Math.max(0,t.height-t.margins.top-t.margins.bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"width",{get:function(){var t=this._pdfdoc._document.page;return Math.max(t.width-t.margins.left-t.margins.right)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"paths",{get:function(){return this._graphics},enumerable:!0,configurable:!0}),n.prototype.drawText=function(n,r,i,o){if(this._assertPathStarted(),n=t.asString(n)){o=o||{};var a,s=this._pdfdoc,u=s._document,c=o.stroke&&o.fill?2:o.stroke?1:0;!o.strike&&!o.underline||o.stroke||(c=2),this._switchCtx();try{this._drawingText=!0,1&c||s._toggleBrush(e._asPdfBrush(o.brush)),3&c&&s._togglePen(e._asPdfPen(o.pen)),s._toggleFont(e._asPdfFont(o.font));var l=this._textOptionsToNative(o),h=o._baseline===e._PdfTextBaseline.Alphabetic?u.currentFontAscender():0;null==r?(u.y-=h,a=u.textAndMeasure(n,null,null,l)):a=u.textAndMeasure(n,t.asNumber(r)+this._offset.x,t.asNumber(i)+this._offset.y-h,l)}finally{this._drawingText=!1,this._saveCtx()}return{charCount:a.charCount||0,size:new t.Size(a.width||0,a.height||0)}}},n.prototype.drawImage=function(n,r,i,o){if(this._assertPathStarted(),!(n=t.asString(n)))return this;var a=e._PdfImageHelper.getDataUri(n);this._switchCtx();try{var s={};if(o){switch(t.asEnum(o.align,e.PdfImageHorizontalAlign,!0)){case e.PdfImageHorizontalAlign.Center:s.align="center";break;case e.PdfImageHorizontalAlign.Right:s.align="right";break;default:s.align="left"}switch(t.asEnum(o.vAlign,e.PdfImageVerticalAlign,!0)){case e.PdfImageVerticalAlign.Center:s.valign="center";break;case e.PdfImageVerticalAlign.Bottom:s.valign="bottom";break;default:s.valign="top"}var u=t.asNumber(o.width,!0,!0),c=t.asNumber(o.height,!0,!0);u&&c&&t.asBoolean(o.stretchProportionally,!0)?s.fit=[u,c]:(s.width=u,s.height=c)}null==r?this._pdfdoc._document.image(a,s):this._pdfdoc._document.image(a,t.asNumber(r)+this._offset.x,t.asNumber(i)+this._offset.y,s)}finally{this._saveCtx()}return this},n.prototype.drawSvg=function(n,r,i,o){if(o=o||{},this._assertPathStarted(),!(n=t.asString(n)))return this;var a;if(n.indexOf("data:image/svg")>=0)a=function(t){return decodeURIComponent(Array.prototype.map.call(atob(t),function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(n.substring(n.indexOf(",")+1));else{var s;if(a=t.pdf._XhrHelper.text(n,function(t){return s=t.statusText}),s)throw s}if(!a)return this;var u,c,l=new e._SvgRenderer(a,this,t.asFunction(o.urlResolver)),h=null==i,r=null!=r?r:this.x,i=null!=i?i:this.y,f=this.y,d=this.x,p=t.asNumber(o.width,!0,!0),g=t.asNumber(o.height,!0,!0),_=l.root.width.hasVal?l.root.width.val:void 0,y=l.root.height.hasVal?l.root.height.val:void 0;if((p||g)&&_&&y)if(u=p/_,c=g/y,p&&g){if(o.stretchProportionally){var m=Math.min(u,c);if(u===m)switch(t.asEnum(o.vAlign,e.PdfImageVerticalAlign,!0)){case e.PdfImageVerticalAlign.Center:i+=g/2-y*u/2;break;case e.PdfImageVerticalAlign.Bottom:i+=g-y*u}if(c===m)switch(t.asEnum(o.align,e.PdfImageHorizontalAlign,!0)){case e.PdfImageHorizontalAlign.Center:r+=p/2-_*c/2;break;case e.PdfImageHorizontalAlign.Right:r+=p-_*c}u=c=m}}else o.width?c=u:u=c;u=u||1,c=c||1,this._switchCtx(),this._pdfdoc.saveState();try{this.translate(r,i),this.scale(u,c),l.render()}finally{this._pdfdoc.restoreState(),this._saveCtx()}if(this.x=d,this.y=f,h){var v=null!=g?g:null!=y?y*c:void 0;this.y+=v||0}return this},n.prototype.lineHeight=function(t){var n=this._pdfdoc;n._toggleFont(e._asPdfFont(t)),this._switchCtx();var r=n._document.currentLineHeight();return this._saveCtx(),r},n.prototype.measureText=function(n,r,i){var o={};if(n=t.asString(n)){var a=this._pdfdoc;a._toggleFont(e._asPdfFont(r)),this._switchCtx();try{o=a._document.textAndMeasure(n,null,null,this._textOptionsToNative(i),!0)}finally{this._saveCtx()}}return{charCount:o.charCount||0,size:new t.Size(o.width||0,o.height||0)}},n.prototype.moveDown=function(n,r){if(void 0===n&&(n=1),n=t.asNumber(n,!1,!0)){var i=this._pdfdoc;i._toggleFont(e._asPdfFont(r)),this._switchCtx();try{i._document.moveDown(n)}finally{this._saveCtx()}}return this},n.prototype.moveUp=function(n,r){if(void 0===n&&(n=1),n=t.asNumber(n,!1,!0)){var i=this._pdfdoc;i._toggleFont(e._asPdfFont(r)),this._switchCtx();try{i._document.moveUp(n)}finally{this._saveCtx()}}return this},n.prototype.scale=function(e,n,r){void 0===n&&(n=e),this._assertPathStarted(),r=r||new t.Point(0,0);var i=t.asNumber(r.x)+this._offset.x,o=t.asNumber(r.y)+this._offset.y;return e=t.asNumber(e,!1),n=t.asNumber(n,!1),this._pdfdoc._document.scale(e,n,{origin:[i,o]}),this},n.prototype.translate=function(e,n){return this._assertPathStarted(),e=t.asNumber(e),n=t.asNumber(n),this._pdfdoc._document.translate(e,n),this},n.prototype.transform=function(e,n,r,i,o,a){this._assertPathStarted(),e=t.asNumber(e),n=t.asNumber(n),r=t.asNumber(r),i=t.asNumber(i),o=t.asNumber(o),a=t.asNumber(a);var s=this._offset.x,u=this._offset.y;return this._pdfdoc._document.transform(e,n,r,i,o-e*s+s-r*u,a-n*s-i*u+u),this},n.prototype.rotate=function(e,n){this._assertPathStarted(),n=n||new t.Point(0,0);var r=t.asNumber(n.x)+this._offset.x,i=t.asNumber(n.y)+this._offset.y;return e=t.asNumber(e),this._pdfdoc._document.rotate(e,{origin:[r,i]}),this},n.prototype._assertPathStarted=function(){t.assert(!this.paths._hasPathBuffer(),e._Errors.PathStarted)},n.prototype._initialize=function(n,r,i){this._pdfdoc=n,this._offset=new t.Point(r,i),this._ctxProps={xo:r,yo:i,lineGap:this._ctxProps.lineGap},this._graphics=new e.PdfPaths(this._pdfdoc,this._offset)},n.prototype._isDrawingText=function(){return this._drawingText},n.prototype._switchCtx=function(){this._pdfdoc._switchTextFlowCtx(this._ctxProps)},n.prototype._saveCtx=function(){this._ctxProps=this._pdfdoc._getTextFlowCtxState()},n.prototype._textOptionsToNative=function(n){n=n||{};var r=e._shallowCopy(n);return null!=n.align&&(r.align=(e.PdfTextHorizontalAlign[t.asEnum(n.align,e.PdfTextHorizontalAlign)]||"").toLowerCase()),r},n}();e.PdfPageArea=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var n=function(){function n(t,n,r){this.text=t||"",this.font=n||new e.PdfFont,this.brush=r||new e.PdfSolidBrush}return Object.defineProperty(n.prototype,"font",{get:function(){return this._font},set:function(t){t=e._asPdfFont(t,!0),this._font=t?t.clone():t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"text",{get:function(){return this._text},set:function(e){this._text=t.asString(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"brush",{get:function(){return this._brush},set:function(t){t=e._asPdfBrush(t),this._brush=t?t.clone():t},enumerable:!0,configurable:!0}),n.prototype.clone=function(){return new n(this.text,this.font,this.brush)},n.prototype.equals=function(t){return t instanceof n&&this._text===t.text&&(this._brush?this._brush.equals(t._brush):this._brush===t._brush)&&(this._font?this._font.equals(t._font):this._font===t._font)},n}();e.PdfRunningTitleDeclarativeContent=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wijmo;!function(t){!function(e){"use strict";var n=function(n){function r(r){var i=n.call(this)||this;return i._height=24,i._declarative=new e.PdfRunningTitleDeclarativeContent,i._heightChanged=new t.Event,t.copy(i,r),i}return __extends(r,n),Object.defineProperty(r.prototype,"declarative",{get:function(){return this._declarative},set:function(n){null!=n&&(t.assert(n instanceof e.PdfRunningTitleDeclarativeContent,e._Errors.InvalidArg("value")),n=n.clone()),this._declarative=n},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this._height},set:function(e){e!==this._height&&(this._height=t.asNumber(e,!1,!0),this._heightChanged.raise(this,t.EventArgs.empty))},enumerable:!0,configurable:!0}),r.prototype.drawText=function(t,e,r,i){return i=i||{},i.height=1/0,n.prototype.drawText.call(this,t,e,r,i)},r}(e.PdfPageArea);e.PdfRunningTitle=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var n=function(){function n(){}return n.getDataUri=function(r){if(t.assert(!!(r=t.asString(r)),e._Errors.EmptyUrl),n.DATAURI_CACHE[r])return n.DATAURI_CACHE[r];var i="";if(0===r.indexOf("data:")){if(!r.match(/^data:image\/(png|jpeg|jpg);base64,/))throw e._Errors.InvalidImageDataUri;i=r}else{var o,a=e._XhrHelper.arrayBuffer(r,function(t){return o=t.statusText});if(o)throw o;try{var s=new Uint16Array(a,0,2);if(55551!==s[0]&&(20617!==s[0]||18254!==s[1]))throw"";var u=n._toBase64(a);i="data:"+(55551===s[0]?"image/jpeg":"image/png")+";base64,"+u}catch(t){throw e._Errors.InvalidImageFormat}}return n.DATAURI_CACHE[r]=i},n._toBase64=function(t){for(var e="",n=new Uint8Array(t),r=0;r<n.byteLength;r++)e+=String.fromCharCode(n[r]);return window.btoa(e)},n.DATAURI_CACHE={},n}();e._PdfImageHelper=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var n=function(){function n(t,e){this._pathBuffer=[],this._doc=t,this._offset=e}return n.prototype.moveTo=function(e,n){return this._pathBuffer.push({func:this._doc._document.moveTo,params:[t.asNumber(e)+this._offset.x,t.asNumber(n)+this._offset.y]}),this},n.prototype.lineTo=function(e,n){return this._pathBuffer.push({func:this._doc._document.lineTo,params:[t.asNumber(e)+this._offset.x,t.asNumber(n)+this._offset.y]}),this},n.prototype.quadraticCurveTo=function(e,n,r,i){return this._pathBuffer.push({func:this._doc._document.quadraticCurveTo,params:[t.asNumber(e)+this._offset.x,t.asNumber(n)+this._offset.y,t.asNumber(r)+this._offset.x,t.asNumber(i)+this._offset.y]}),this},n.prototype.bezierCurveTo=function(e,n,r,i,o,a){return this._pathBuffer.push({func:this._doc._document.bezierCurveTo,params:[t.asNumber(e)+this._offset.x,t.asNumber(n)+this._offset.y,t.asNumber(r)+this._offset.x,t.asNumber(i)+this._offset.y,t.asNumber(o)+this._offset.x,t.asNumber(a)+this._offset.y]}),this},n.prototype.svgPath=function(n){if(n){var r=e._PdfSvgPathHelper.offset(t.asString(n),this._offset);this._pathBuffer.push({func:this._doc._document.path,params:[t.asString(r)]})}return this},n.prototype.closePath=function(){return this._writePathBuffer(),this._doc._document.closePath(),this},n.prototype.rect=function(e,n,r,i){return this._pathBuffer.push({func:this._doc._document.rect,params:[t.asNumber(e)+this._offset.x,t.asNumber(n)+this._offset.y,t.asNumber(r,!1,!0),t.asNumber(i,!1,!0)]}),this},n.prototype.roundedRect=function(e,n,r,i,o){return void 0===o&&(o=0),this._pathBuffer.push({func:this._doc._document.roundedRect,params:[t.asNumber(e)+this._offset.x,t.asNumber(n)+this._offset.y,t.asNumber(r,!1,!0),t.asNumber(i,!1,!0),t.asNumber(o,!1,!0)]}),this},n.prototype.ellipse=function(e,n,r,i){return void 0===i&&(i=r),this._pathBuffer.push({func:this._doc._document.ellipse,params:[t.asNumber(e)+this._offset.x,t.asNumber(n)+this._offset.y,t.asNumber(r,!1,!0),t.asNumber(i,!1,!0)]}),this},n.prototype.circle=function(e,n,r){return this._pathBuffer.push({func:this._doc._document.circle,params:[t.asNumber(e)+this._offset.x,t.asNumber(n)+this._offset.y,t.asNumber(r,!1,!0)]}),this},n.prototype.polygon=function(t){if(t)for(var e=0;e<t.length;e++){var n=t[e];n[0]=n[0]+this._offset.x,n[1]=n[1]+this._offset.y}return this._pathBuffer.push({func:this._doc._document.polygon,params:t}),this},n.prototype.clip=function(t){return void 0===t&&(t=e.PdfFillRule.NonZero),this._writePathBuffer(),this._doc._document.clip(t===e.PdfFillRule.EvenOdd?"even-odd":"non-zero"),this},n.prototype.fill=function(t,n){return this._doc._toggleBrush(e._asPdfBrush(t)),this._writePathBuffer(),this._doc._document.fill(n===e.PdfFillRule.EvenOdd?"even-odd":"non-zero"),this},n.prototype.fillAndStroke=function(t,n,r){return this._doc._toggleBrush(e._asPdfBrush(t)),this._doc._togglePen(e._asPdfPen(n)),this._writePathBuffer(),this._doc._document.fillAndStroke(r===e.PdfFillRule.EvenOdd?"even-odd":"non-zero"),this},n.prototype.stroke=function(t){return this._doc._togglePen(e._asPdfPen(t)),this._writePathBuffer(),this._doc._document.stroke(),this},n.prototype._hasPathBuffer=function(){return this._pathBuffer.length>0},n.prototype._writePathBuffer=function(){for(var t=this._doc._document,e=0;e<this._pathBuffer.length;e++){var n=this._pathBuffer[e];n.func.apply(t,n.params)}this._pathBuffer=[]},n}();e.PdfPaths=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var n=function(){function e(){}return e.offset=function(t,e){var n=this;return this._processPath(t,function(t,r,i,o){return t=n._updateOffset(t,e,r,i,o)})},e.scale=function(t,e){return this._processPath(t,function(t,n,r,i){if("a"===n||"A"===n){var o=i%7;if(o>=2&&o<=4)return t}return t*e})},e._processPath=function(e,n){for(var r,i=this._getTokenizer(e),o="",a="",s=-1,u=-1;r=i();){if(1===r.length&&/[a-zA-Z]/.test(r))u++,o=r,s=-1;else{s++;var c=n(parseFloat(r),o,u,s);r=t.toFixed(c,7,!1)+""}a+=r+" "}return a},e._getTokenizer=function(t){var e=t.length,n=0;return function(){if(n>=e)return"";for(;n<e&&(/\s/.test(t[n])||","==t[n]);)n++;for(var r=n;n<e&&/[0-9\.\-eE\+]/.test(t[n]);)n++;return n!=r?t.substr(r,n-r):t.substr(n++,1)}},e._updateOffset=function(t,e,n,r,i){var o=0;switch(n){case"m":0===r&&(0===i?o=-1:1===i&&(o=1));break;case"L":case"M":case"C":case"S":case"Q":case"T":o=i%2==0?-1:1;break;case"A":i%7==5?o=-1:i%7==6&&(o=1);break;case"H":o=-1;break;case"V":o=1}return o?-1===o?t+e.x:t+e.y:t},e}();e._PdfSvgPathHelper=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var n=!!(new XMLHttpRequest).overrideMimeType,r=function(){function e(){}return e.arrayBufferAsync=function(t,e,n){var r={method:"GET",responseType:"arraybuffer",async:!0};this._getData(t,r,e,n)},e.arrayBuffer=function(e,r){var i,o={method:"GET",async:!1};return t.pdf._IE||!n?(o.responseType="arraybuffer",this._getData(e,o,function(t,e){i=e},r)):(o.overrideMimeType="text/plain; charset=x-user-defined",this._getData(e,o,function(t,e){i=new ArrayBuffer(e.length);for(var n=new Uint8Array(i),r=0,o=e.length;r<o;r++)n[r]=255&e.charCodeAt(r)},r)),i},e.text=function(t,e){var n={method:"GET",async:!1},r="";return this._getData(t,n,function(t,e){return r=e},e),r},e._getData=function(t,e,n,r){var i=new XMLHttpRequest;if(e=e||{},i.open(e.method,t,e.async,e.user,e.password),i.addEventListener("load",function(){if(4===i.readyState){var t=i.status;t>=200&&t<300||304===t?n&&n(i,i.response):r&&r(i)}}),e.headers)for(var o in e.headers)i.setRequestHeader(o,e.headers[o]);e.responseType&&(i.responseType=e.responseType),e.overrideMimeType&&i.overrideMimeType&&i.overrideMimeType(e.overrideMimeType),i.send(e.data)},e}();e._XhrHelper=r}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wijmo;!function(t){!function(e){"use strict";var n=function(t){function e(e){var n=t.call(this)||this;return n._chunks=e,n}return __extends(e,t),Object.defineProperty(e.prototype,"blob",{get:function(){return this._blob||(this._blob=new Blob(this._chunks,{type:"application/pdf"})),this._blob},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"chunks",{get:function(){return this._chunks},enumerable:!0,configurable:!0}),e}(t.EventArgs);e.PdfDocumentEndedEventArgs=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wijmo;!function(t){!function(e){"use strict";var n=function(n){function r(r){var i=n.call(this)||this;i._docInitialized=!1,i._compress=!0,i._bufferPages=!0,i._chunks=[],i._pageIndex=-1,i._graphicsStack=[],i._currentGS={},i.info={author:void 0,creationDate:void 0,keywords:void 0,modDate:void 0,subject:void 0,title:void 0},i.pageSettings={layout:e.PdfPageOrientation.Portrait,size:e.PdfPageSize.Letter,margins:{top:72,left:72,bottom:72,right:72},_copy:function(t,e){if("size"===t)return this.size=e,!0}},i.ended=new t.Event,i.pageAdded=new t.Event,i._runtimeProperties=["pageIndex","x","y"],t.copy(i,r);var o=function(t){i._doc=t,i._fontReg=new e._PdfFontRegistrar(i._doc)},a=function(){i.setPen(i._currentGS[i._pageIndex].pen),i.setBrush(i._currentGS[i._pageIndex].brush),i._curFont=e.PdfFont._DEF_PDFKIT_FONT,i.setFont(new e.PdfFont)},s=!1,u={compress:i._compress,bufferPages:i._bufferPages,pageAdding:i._ehOnPageAdding=function(t,e){i._docInitialized||(s=!0,o(t)),i._onPageAdding(t,e)},pageAdded:i._ehOnPageAdded=function(t){var n=i._isDrawingText()?i._currentGS[i._pageIndex].brush:new e.PdfSolidBrush;i._currentGS[++i._pageIndex]={pen:new e.PdfPen,brush:n},i._docInitialized||a(),i._onPageAdded(t)}};return i._doc=new PDFDocument(u),s||(o(i._doc),a()),i._doc.on("data",i._ehOnDocData=function(t){i._onDocData(t)}).on("ending",i._ehOnDocEnding=function(){i._onDocEnding()}).on("end",i._ehOnDocEnded=function(){i._onDocEnded()}),i._docInitialized=!0,i}return __extends(r,n),Object.defineProperty(r.prototype,"compress",{get:function(){return this._compress},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"bufferPages",{get:function(){return this._bufferPages},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"header",{get:function(){var t=this;return this._header||(this._header=new e.PdfRunningTitle({_heightChanged:function(){t._docInitialized&&t._resetAreasOffset(t._doc)}})),this._header},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"footer",{get:function(){var t=this;return this._footer||(this._footer=new e.PdfRunningTitle({_heightChanged:function(){t._docInitialized&&t._resetAreasOffset(t._doc)}})),this._footer},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"pageIndex",{get:function(){return this._pageIndex},set:function(e){e=t.asNumber(e,!1,!0),this._pageIndex!==e&&(this._doc.switchToPage(e),this._pageIndex=e)},enumerable:!0,configurable:!0}),r.prototype.onEnded=function(t){this.ended&&this.ended.raise(this,t)},r.prototype.onPageAdded=function(t){this.pageAdded&&this.pageAdded.raise(this,t)},r.prototype.dispose=function(){this._doc&&(this._doc.removeListener("data",this._ehOnDocData).removeListener("ending",this._ehOnDocEnding).removeListener("end",this._ehOnDocEnded).removeListener("pageAdding",this._ehOnPageAdding).removeListener("pageAdded",this._ehOnPageAdded),this._doc=null,this._chunks=null)},Object.defineProperty(r.prototype,"currentPageSettings",{get:function(){var n=this._doc.page;return{layout:"landscape"===n.layout?e.PdfPageOrientation.Landscape:e.PdfPageOrientation.Portrait,size:t.isArray(n.size)?new t.Size(n.size[0],n.size[1]):e.PdfPageSize[n.size.match(/\d+/)?n.size:e._toTitleCase(n.size)],margins:{left:n.margins.left,right:n.margins.right,top:n.margins.top-this.header.height,bottom:n.margins.bottom-this.footer.height}}},enumerable:!0,configurable:!0}),r.prototype.addPage=function(t){var e=this._pageSettingsToNative(t||this.pageSettings);return this._doc.addPage(e),this},r.prototype.bufferedPageRange=function(){return this._doc.bufferedPageRange()},r.prototype.end=function(){this._doc.end()},r.prototype.setBrush=function(t){return this._assertAreasPathStarted(),this._setCurBrush(this._defBrush=e._asPdfBrush(t,!1).clone()),this},r.prototype.setPen=function(t){return this._assertAreasPathStarted(),this._setCurPen(this._defPen=e._asPdfPen(t,!1).clone()),this},r.prototype.setFont=function(t){return this._setCurFont(this._defFont=e._asPdfFont(t,!1).clone()),this},r.prototype._getFont=function(){return this._curFont},r.prototype.registerFont=function(n){t.assert(!!n,e._Errors.ValueCannotBeEmpty("font"));var r;if(t.isString(n.source)){var i;if(r=e._XhrHelper.arrayBuffer(n.source,function(t){return i=t.statusText}),i)throw i}else{if(!(n.source instanceof ArrayBuffer))throw e._Errors.FontSourceMustBeStringArrayBuffer;r=n.source}return n=e._shallowCopy(n),n.source=r,this._fontReg.registerFont(n),this},r.prototype.registerFontAsync=function(n,r){var i=this;t.assert("string"==typeof n.source,e._Errors.FontSourceMustBeString),t.asFunction(r,!1),e._XhrHelper.arrayBufferAsync(n.source,function(t,o){var a=e._shallowCopy(n);a.source=o,i._fontReg.registerFont(a),r(n)})},r.prototype.saveState=function(){return this._assertAreasPathStarted(),this._graphicsStack.push(this._currentGS[this._pageIndex].pen.clone(),this._defPen.clone(),this._currentGS[this._pageIndex].brush.clone(),this._defBrush.clone()),this._pdfdoc._document.save(),this},r.prototype.restoreState=function(){return this._assertAreasPathStarted(),this._graphicsStack.length&&(this._defBrush=this._graphicsStack.pop(),this._currentGS[this._pageIndex].brush=this._graphicsStack.pop(),this._defPen=this._graphicsStack.pop(),this._currentGS[this._pageIndex].pen=this._graphicsStack.pop()),this._pdfdoc._document.restore(),this},r.prototype._copy=function(e,n){return"compress"===e?(this._compress=t.asBoolean(n),!0):"bufferPages"===e?(this._bufferPages=t.asBoolean(n),!0):this._runtimeProperties.indexOf(e)>=0},Object.defineProperty(r.prototype,"_document",{get:function(){return this._doc},enumerable:!0,configurable:!0}),r.prototype._switchTextFlowCtx=function(t){this._doc.x=t.xo,this._doc.y=t.yo,this._doc.lineGap(t.lineGap)},r.prototype._getTextFlowCtxState=function(){return{xo:this._doc.x,yo:this._doc.y,lineGap:this._doc.currentLineGap()}},r.prototype._toggleBrush=function(t){t?this._setCurBrush(t):this._setCurBrush(this._defBrush)},r.prototype._togglePen=function(t){t?this._setCurPen(t):this._setCurPen(this._defPen)},r.prototype._toggleFont=function(t){t?this._setCurFont(t):this._setCurFont(this._defFont)},r.prototype._onDocData=function(t){this._chunks.push(t)},r.prototype._onDocEnding=function(){if(this._processHeadersFooters(),this.info){var t;(t=this.info.author)&&(this._doc.info.Author=t),(t=this.info.creationDate)&&(this._doc.info.CreationDate=t),(t=this.info.keywords)&&(this._doc.info.Keywords=t),(t=this.info.modDate)&&(this._doc.info.ModDate=t),(t=this.info.subject)&&(this._doc.info.Subject=t),(t=this.info.title)&&(this._doc.info.Title=t)}},r.prototype._onDocEnded=function(){if(e._IE&&this._chunks.length&&!this._chunks[0].buffer)for(var t=0;t<this._chunks.length;t++){for(var n=this._chunks[t],r=new Uint8Array(n.length),i=0;i<n.length;i++)r[i]=n[i];this._chunks[t]=r.buffer}this.onEnded(new e.PdfDocumentEndedEventArgs(this._chunks)),this._chunks=[]},r.prototype._onPageAdding=function(t,e){if(this.pageSettings){var n=this._pageSettingsToNative(this.pageSettings);e.layout=t.options.layout=n.layout,e.margins=t.options.margins=n.margins,e.size=t.options.size=n.size}},r.prototype._onPageAdded=function(n){n.page.originalMargins=e._shallowCopy(n.page.margins),this._resetAreasOffset(n),this.onPageAdded(t.EventArgs.empty)},r.prototype._assertAreasPathStarted=function(){this._docInitialized&&(this._assertPathStarted(),this.header._assertPathStarted(),this.footer._assertPathStarted())},r.prototype._pageSettingsToNative=function(n){var r={};if(n){var i=t.asEnum(n.layout,e.PdfPageOrientation,!0);null!=i&&(r.layout=(e.PdfPageOrientation[i]||"").toLowerCase());var o=n.margins;o&&(r.margins={left:t.asNumber(o.left,!1,!0),right:t.asNumber(o.right,!1,!0),top:t.asNumber(o.top,!1,!0),bottom:t.asNumber(o.bottom,!1,!0)});var a=n.size;null!=a&&(a instanceof t.Size?r.size=[t.asNumber(a.width,!1,!0),t.asNumber(a.height,!1,!0)]:(a=t.asEnum(a,e.PdfPageSize),r.size=(e.PdfPageSize[a]||"").toUpperCase()))}return r},r.prototype._processHeadersFooters=function(){var n=this.header,r=this.footer;if(n.height>0||r.height>0){var i=this._doc;t.assert(i.options.bufferPages,e._Errors.BufferPagesMustBeEnabled);for(var o=i.bufferedPageRange(),a=o.start;a<o.count;a++){var s={Page:a+1,Pages:o.count};this.pageIndex=a,this._renderHeaderFooter(n,s,!0),this._renderHeaderFooter(r,s,!1)}}},r.prototype._renderHeaderFooter=function(t,n,r){if(t.height>0&&t.declarative&&t.declarative.text){var i=e._formatMacros(t.declarative.text,n).split("\t");i.length>0&&i[0]&&this._renderHeaderFooterPart(t,i[0],e.PdfTextHorizontalAlign.Left,r),i.length>1&&i[1]&&this._renderHeaderFooterPart(t,i[1],e.PdfTextHorizontalAlign.Center,r),i.length>2&&i[2]&&this._renderHeaderFooterPart(t,i[2],e.PdfTextHorizontalAlign.Right,r)}},r.prototype._renderHeaderFooterPart=function(t,e,n,r){var i={font:t.declarative.font,brush:t.declarative.brush,width:t.width,height:t.height,align:n};if(r)this.header.drawText(e,0,0,i);else{i.includeLastLineExternalLeading=!1;var o=this.footer.measureText(e,i.font,i);this.footer.drawText(e,0,this.footer.height-o.size.height,i)}},r.prototype._setCurBrush=function(t){this._currentGS[this.pageIndex].brush.equals(t)||(this._setNativeDocBrush(t,!1),this._currentGS[this.pageIndex].brush=t.clone())},r.prototype._setCurFont=function(t){if(!this._curFont.equals(t)){var n=this._fontReg.findFont(t.family,t.style,t.weight);this._doc.font(n,t.size||e.PdfFont._DEF_FONT.size),this._curFont=t.clone()}},r.prototype._setCurPen=function(t){var e=this._doc,n=this._currentGS[this.pageIndex].pen;!t.brush||n.brush&&n.brush.equals(t.brush)?(n.brush&&!t.brush||!n.brush&&!n.color.equals(t.color))&&e.strokeColor([t.color.r,t.color.g,t.color.b],t.color.a):this._setNativeDocBrush(t.brush,!0),n.width!==t.width&&e.lineWidth(t.width),n.miterLimit!==t.miterLimit&&e.miterLimit(t.miterLimit),n.cap!==t.cap&&e.lineCap(t.cap),n.join!==t.join&&e.lineJoin(t.join),n.dashPattern.equals(t.dashPattern)||(null!=t.dashPattern.dash?e.dash(t.dashPattern.dash,{space:t.dashPattern.gap,phase:t.dashPattern.phase}):null!=n.dashPattern.dash&&e.undash()),this._currentGS[this.pageIndex].pen=t.clone()},r.prototype._setNativeDocBrush=function(n,r){var i=this._doc,o=n._getBrushObject(this),a=1;o instanceof t.Color?(a=o.a,o=[o.r,o.g,o.b]):n instanceof e.PdfGradientBrush&&(a=n.opacity),r?i.strokeColor(o,a):i.fillColor(o,a)},r.prototype._resetAreasOffset=function(t){t.page.margins.top=t.page.originalMargins.top+this.header.height,t.y=t.page.margins.top,t.page.margins.bottom=t.page.originalMargins.bottom+this.footer.height,this._header._initialize(this,t.page.margins.left,t.page.originalMargins.top),this._initialize(this,t.page.margins.left,t.page.margins.top),this._footer._initialize(this,t.page.margins.left,t.page.height-t.page.margins.bottom)},r}(e.PdfPageArea);e.PdfDocument=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(t){"use strict";function e(t){return t&&(t=t.trim().replace(/\s+/gm," ")),t}function n(t,e){return t&&e&&!/(^[a-z][a-z0-9]*:)?\/\//i.test(t)&&(t=e(t)),t}t._compressSpaces=e,t._resolveUrlIfRelative=n;var r=function(){function t(t,e){this.selector=t,this.declarations={},this._fillDeclarations(e)}return t.prototype._fillDeclarations=function(t){var e=this;t&&t.split(";").forEach(function(t){if(t){var n=t.split(":");if(2===n.length){var r=n[0].trim().toLowerCase(),i=n[1].trim();if(r&&i){var o=/!important$/i.test(i);o&&(i=i.replace(/!important$/i,"").trim()),i&&(e.declarations[r]={value:i,important:o})}}}})},t}();t._SvgCssRule=r;var i=function(){function t(){}return t.matchesSelector=function(t,e){var n=!1;try{n=(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}catch(t){}return n},t.getSpecificity=function(t){var e=0,n=0,r=0,i=function(e){var n=(t.match(e)||[]).length;return n&&(t=t.replace(e,"")),n};return t=t.replace(/:not\(([^\)]*)\)/g,function(t,e){return" "+e+" "}),n+=i(/(\[[^\]]+\])/g),e+=i(/(#[^\s\+>~\.\[:]+)/g),n+=i(/(\.[^\s\+>~\.\[:]+)/g),r+=i(/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi),n+=i(/(:[\w-]+\([^\)]*\))/gi),n+=i(/(:[^\s\+>~\.\[:]+)/g),t=t.replace(/[\*\s\+>~]/g," "),t=t.replace(/[#\.]/g," "),r+=i(/([^\s\+>~\.\[:]+)/g),e<<16|n<<8|r},t.getComputedStyle=function(t,n){var i=this,o={},a=[];if(t.className)for(var a=[],s=0,u=Object.keys(n);s<u.length;s++){var c=u[s];this.matchesSelector(t,c)&&a.push(n[c])}a.sort(function(t,e){return i.getSpecificity(t.selector)-i.getSpecificity(e.selector)});var l=t.getAttribute("style");l&&a.push(new r("_inline_",e(l)));for(s=0;s<a.length;s++)for(var h=a[s],f=0,u=Object.keys(h.declarations);f<u.length;f++){var d=u[f],p=h.declarations[d];null!=o[d]&&!p.important&&o[d].important||(o[d]=p)}for(var g={},s=0,u=Object.keys(o);s<u.length;s++)g[d=u[s]]=o[d].value;return g},t.registerFontFace=function(t,e,r){var i=e.declarations;i["font-family"]&&i.src&&i.src.value.split(",").every(function(e){if(e.match(/format\(\s*['"]?truetype['"]?\s*\)/i)){var o=e.match(/url\(\s*['"]?([^'"\)]+)['"]?\s*\)/i);if(o){var a=o[1].trim(),s=!1;if(a=n(a,r)){var u={name:i["font-family"].value,source:a,weight:i["font-weight"]?i["font-weight"].value.toLowerCase():"normal",style:i["font-style"]?i["font-style"].value.toLowerCase():"normal"};try{t.registerFont(u),s=!0}catch(t){}}return!s}}return!0})},t}();t._SvgCssHelper=i}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wijmo;!function(t){!function(e){"use strict";var n;!function(t){t[t.Default=1]="Default",t[t.None=2]="None",t[t.Px=3]="Px"}(n=e._SvgNumConversion||(e._SvgNumConversion={}));var r;!function(t){t[t.Width=1]="Width",t[t.Height=2]="Height",t[t.Other=3]="Other"}(r=e._SvgLengthContext||(e._SvgLengthContext={}));var i;!function(t){t[t.Number=1]="Number",t[t.String=2]="String"}(i=e._SvgAttrType||(e._SvgAttrType={}));var o=function(){function o(i,o,a,s,u,c,l){void 0===s&&(s=void 0),void 0===u&&(u=n.Default),void 0===c&&(c=r.Other),void 0===l&&(l=!1),t.assert(!!i,e._Errors.ValueCannotBeEmpty("owner")),t.assert(!!o,e._Errors.ValueCannotBeEmpty("propName")),this._owner=i,this._propName=o,this._propType=a,this._defValue=s,this._inheritable=l,this._nc=u,this._pCtx=c,this._searchValue=!0}return o.parseValue=function(t,o,a,s,u){if(null==t)return t;if(o&i.Number){var c,l;if("number"==typeof t)c=t;else{var h=t.match(/^([\+-]?[\d\.]+)(em|ex|px|pt|pc|cm|mm|in|%)?$/);h&&(c=parseFloat(h[1]),l=h[2])}if(null!=c&&c===c){if(u!==n.Default){if(l)throw e._Errors.InvalidFormat(t);if(u===n.None)return c}switch(l){case"mm":return 72*c/25.4;case"cm":return 72*c/2.54;case"in":return 72*c;case"pt":return c;case"pc":return 12*c;case"%":switch(s){case r.Height:c*=a.height/100;break;case r.Width:c*=a.width/100;break;case r.Other:c*=Math.sqrt(a.width*a.width+a.height*a.height)/Math.sqrt(2)/100}return c;case"px":default:return.75*c}}}if(o&i.String)return t+"";throw e._Errors.InvalidFormat(t)},Object.defineProperty(o.prototype,"hasVal",{get:function(){return null!=this._val},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"val",{get:function(){if(null!=this._val)return this._val;var e=t.isFunction(this._defValue)?this._defValue.call(this,this._owner.ctx):this._defValue;return this._parse(e)},set:function(t){this._searchValue=!1,this._value=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"_val",{get:function(){if(this._searchValue){this._searchValue=!1;for(var t,e=this._owner;e&&(t=e.attr(this._propName),this._inheritable&&(null==t||"inherit"==t));e=e.parent);this._value="inherit"===t?void 0:this._parse(t)}return this._value},enumerable:!0,configurable:!0}),o.prototype.reset=function(){this._value=void 0,this._searchValue=!0},o.prototype._parse=function(t,e){return t=o.parseValue(t,this._propType,this._owner.viewport,this._pCtx,e||this._nc)},o}();e._SvgAttr=o;var a=function(t){function e(e,o,a,s,u,c){return void 0===a&&(a=void 0),void 0===s&&(s=n.Default),void 0===u&&(u=r.Other),t.call(this,e,o,i.Number,a,s,u,c)||this}return __extends(e,t),e}(o);e._SvgNumAttr=a;var s=function(t){function e(e,n,r,o){return t.call(this,e,n,i.String,r,void 0,void 0,o)||this}return __extends(e,t),e}(o);e._SvgStrAttr=s;var u=function(t){function e(e,o,a,s){return void 0===a&&(a=void 0),void 0===s&&(s=!0),t.call(this,e,o,i.String,a,n.None,r.Other,s)||this}return __extends(e,t),e.prototype.asHref=function(){var t=this.val.match(/url\((.+)\)/);return t?t[1]:null},e.prototype._parse=function(e){if(""!==e&&"null"!==e&&"undefined"!==e)return t.prototype._parse.call(this,e)},e}(o);e._SvgColorAttr=u;var c=function(t){function e(e){return t.call(this,e,"stroke-dasharray",i.Number,void 0,n.Px,r.Other,!0)||this}return __extends(e,t),e.prototype._parse=function(e){var n,r=(e||"").trim().split(/[\s,]+/);if(r.length){n=[];try{for(var i=0;i<r.length;i++)r[i]&&n.push(t.prototype._parse.call(this,r[i]))}catch(t){return}return n.length?n:void 0}return n},e}(o);e._SvgDashArrayAttr=c;var l=function(n){function r(t,r){return n.call(this,t,r,i.String,e.PdfFillRule.NonZero,void 0,void 0,!0)||this}return __extends(r,n),r.prototype._parse=function(n){if(t.isNumber(n))return n;var r=(n||"").match(/(nonzero|evenodd)/i);return r?"nonzero"===r[1]?e.PdfFillRule.NonZero:e.PdfFillRule.EvenOdd:void 0},r}(o);e._SvgFillRuleAttr=l;var h=function(t){function e(e,n){return t.call(this,e,n)||this}return __extends(e,t),e.prototype._parse=function(t){var e=(t=(t||"").trim()).match(/url\((.+)\)/);return e&&(t=e[1].trim()),t=t.replace(/["']/g,"")},e}(s);e._SvgHRefAttr=h;var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype._parse=function(e){if((e=t.prototype._parse.call(this,e))&&"#"===e[0])return e.substring(1)},e}(h);e._SvgIdRefAttr=f;var d=function(e){function r(t,r){return e.call(this,t,r,i.Number,void 0,n.Px)||this}return __extends(r,e),r.prototype._parse=function(n){var r,i=(n||"").trim().split(/[\s,]+/),o=2*Math.floor(i.length/2);if(o){r=[];try{for(var a=0;a<o-1;a+=2)r.push(new t.Point(e.prototype._parse.call(this,i[a]),e.prototype._parse.call(this,i[a+1])))}catch(t){return}}return r},r}(o);e._SvgPointsArrayAttr=d;var p=function(e){function r(t){return e.call(this,t,"transform",i.Number,void 0,n.None)||this}return __extends(r,e),r.prototype.apply=function(t){var e=t.ctx.area;this.hasVal&&this.val.forEach(function(t){t(e)})},r.prototype._parse=function(r){var i=this,o=[],a=(r||"").match(/((matrix|translate|scale|rotate|skewX|skewY)\([^\)]+\))+/g);if(a)for(var s=0;s<a.length;s++){var u=a[s].match(/(\w+)\(([^\)]+)\)/),c=[];try{u[2].trim().split(/[\s,]+/).forEach(function(t){t&&c.push(e.prototype._parse.call(i,t,n.None))})}catch(t){return}if(c.length)switch(u[1]){case"matrix":o.push(function(t,e,n,r,i,o){return function(a){a.transform(t,e,n,r,i,o)}}(c[0],c[1],c[2],c[3],e.prototype._parse.call(this,c[4],n.Px),e.prototype._parse.call(this,c[5],n.Px)));break;case"translate":o.push(function(t,e){return function(n){n.translate(t,e)}}(e.prototype._parse.call(this,c[0],n.Px),e.prototype._parse.call(this,c[1]||0,n.Px)));break;case"scale":o.push(function(t,e){return function(n){n.scale(t,e)}}(c[0],c[1]));break;case"rotate":o.push(function(t,e){return function(n){n.rotate(t,e)}}(c[0],new t.Point(e.prototype._parse.call(this,c[1]||0,n.Px),e.prototype._parse.call(this,c[2]||0,n.Px))));break;case"skewX":o.push(function(t){return function(e){e.transform(1,0,t,1,0,0)}}(Math.tan(c[0]*Math.PI/180)));break;case"skewY":o.push(function(t){return function(e){e.transform(1,t,0,1,0,0)}}(Math.tan(c[0]*Math.PI/180)))}}return o.length?o:void 0},r}(o);e._SvgTransformAttr=p;var g=function(t){function e(e){return t.call(this,e,"text-decoration",i.String,void 0,n.None)||this}return __extends(e,t),e.prototype._parse=function(t){var e,n=(t||"").trim().toLowerCase().split(/[\s,]+/);if(n.length){e=[];for(var r=0;r<n.length;r++)/line-through|overline|underline/.test(n[r])&&e.push(n[r])}return e&&e.length?e:void 0},e}(o);e._SvgTextDecorationAttr=g;var _=function(t){function e(e){return t.call(this,e,"viewBox",i.Number,void 0,n.Px)||this}return __extends(e,t),e.prototype._parse=function(e){var n,r=(e||"").trim().split(/[\s,]+/);return 4===r.length&&(n={minX:t.prototype._parse.call(this,r[0]),minY:t.prototype._parse.call(this,r[1]),width:t.prototype._parse.call(this,r[2]),height:t.prototype._parse.call(this,r[3])}),n},e}(o);e._SvgViewboxAttr=_;var y=function(t){function e(e){return t.call(this,e,"preserveAspectRatio",i.Number,"xMidYMid meet")||this}return __extends(e,t),e.prototype._parse=function(t){var e;if("string"==typeof t){var n=t.replace(/^defer\s+/,"").trim().split(/\s+/);e={align:n[0],meet:!n[1]||"meet"===n[1]}}else e=t;return e},e}(o);e._SvgPreserveAspectRatioAttr=y;var m=function(){function e(t){this._owner=t,this.aspect=new y(this._owner),this.viewBox=new _(this._owner)}return e.prototype.apply=function(e){var n=e.ctx.area,r=e.viewport,i=this.viewBox.val;if(r&&i){if(i.width&&i.height){var o=this.aspect.val,a=r.width/i.width,s=r.height/i.height,u=Math.min(a,s),c=Math.max(a,s),l=i.width*(o.meet?u:c),h=i.height*(o.meet?u:c);if("none"===o.align)n.scale(a,s);else{var f=o.meet?u:c,d=0,p=0;o.align.match(/^xMid/)&&f===s?d=r.width/2-l/2:o.align.match(/^xMax/)&&f===s&&(d=r.width-l),o.align.match(/YMid$/)&&f===a?p=r.height/2-h/2:o.align.match(/YMax$/)&&f===a&&(p=r.height-h),(d||p)&&n.translate(d,p),o.meet?n.scale(u,u):n.scale(c,c),(i.minX||i.minY)&&n.translate(-i.minX,-i.minY)}}return new t.Size(i.width,i.height)}return r},e}();e._SvgScaleAttributes=m;var v=function(){function i(t){this._owner=t,this.color=new u(this._owner,"stroke","none"),this.dashArray=new c(this._owner),this.dashOffset=new a(this._owner,"stroke-dashoffset",0,n.Default,r.Other,!0),this.lineCap=new s(this._owner,"stroke-linecap","butt",!0),this.lineJoin=new s(this._owner,"stroke-linejoin","miter",!0),this.miterLimit=new a(this._owner,"stroke-miterlimit",4,n.None,r.Other,!0),this.opacity=new a(this._owner,"stroke-opacity",1,n.None,r.Other,!0),this.width=new a(this._owner,"stroke-width",1,n.Default,r.Other,!0)}return i.prototype.toPen=function(n){var r=new t.Color(this.color.val);this.opacity.hasVal&&(r.a=this.opacity.val);var i=new e.PdfPen(r,this.width.val);if(this.dashArray.hasVal){var o=this.dashArray.val;o.length&&(i.dashPattern=new e.PdfDashPattern(o[0],o.length>1?o[1]:void 0,this.dashOffset.val))}switch(this.lineCap.val){case"butt":i.cap=e.PdfLineCapStyle.Butt;break;case"round":i.cap=e.PdfLineCapStyle.Round;break;case"square":i.cap=e.PdfLineCapStyle.Square}switch(this.lineJoin.val){case"miter":i.join=e.PdfLineJoinStyle.Miter;break;case"round":i.join=e.PdfLineJoinStyle.Round;break;case"bevel":i.join=e.PdfLineJoinStyle.Bevel}return i.miterLimit=this.miterLimit.val,i},i}();e._SvgStrokeAttributes=v;var b=function(){function r(t){this._owner=t,this.color=new u(this._owner,"fill","black"),this.opacity=new a(this._owner,"fill-opacity",1,n.None,void 0,!0),this.rule=new l(this._owner,"fill-rule")}return r.prototype.toBrush=function(n){var r,i=this.color.asHref();if(i&&n){var o=n.ctx.getElement(i);if(o instanceof e._SvgLinearGradientElementImpl)return o.toBrush(n)}return r=new t.Color(this.color.val),this.opacity.hasVal&&(r.a=this.opacity.val),new e.PdfSolidBrush(r)},r}();e._SvgFillAttributes=b;var w=function(){function n(t){this._owner=t,this.family=new s(this._owner,"font-family",function(t){var e=t.area._pdfdoc._getFont();return e?e.family:void 0},!0),this.size=new o(this._owner,"font-size",i.Number|i.String,"medium",void 0,r.Other,!0),this.style=new s(this._owner,"font-style","normal",!0),this.weight=new s(this._owner,"font-weight","normal",!0)}return n.prototype.toFont=function(){var n=t.pdf._asPt(this.size.val);return new e.PdfFont(this.family.val,n,this.style.val,this.weight.val)},n}();e._SvgFontAttributes=w;var x=function(){function n(t){this._owner=t,this.clipRule=new l(this._owner,"clip-rule"),this.fill=new b(this._owner),this.font=new w(this._owner),this.stroke=new v(this._owner)}return n.prototype.apply=function(n,r,i){var o=n.ctx.area;n.renderMode===e._SvgRenderMode.Clip||(r&&i&&"none"!==this.fill.color.val&&"none"!==this.stroke.color.val?o.paths.fillAndStroke(this.fill.toBrush(n),this.stroke.toPen(n),this.fill.rule.val):r&&"none"!==this.fill.color.val?o.paths.fill(this.fill.toBrush(n),this.fill.rule.val):i&&"none"!==this.stroke.color.val?o.paths.stroke(this.stroke.toPen(n)):o.paths.stroke(t.Color.fromRgba(0,0,0,0)))},n}();e._SvgStyleAttributes=x}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wijmo;!function(t){!function(e){"use strict";var n;!function(t){t[t.Render=0]="Render",t[t.Ignore=1]="Ignore",t[t.Clip=2]="Clip"}(n=e._SvgRenderMode||(e._SvgRenderMode={}));var r=function(){function t(t,e,r){void 0===r&&(r=n.Render),this._children=[],this._attributes={},this._defRenderMode=r,this._ctx=t}return Object.defineProperty(t.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ctx",{get:function(){return this._ctx},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},set:function(t){this._parent=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this._style||(this._style=new e._SvgStyleAttributes(this)),this._style},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewport",{get:function(){return this._viewport},set:function(t){this._viewport=t.clone()},enumerable:!0,configurable:!0}),t.prototype.attr=function(t,e){return t=t.toLowerCase(),arguments.length>1&&(this._attributes[t]=e),this._attributes[t]},t.prototype.appendNode=function(t){t&&t!==this&&t.parent!==this&&(t.remove(),this.children.push(t),t.parent=this)},t.prototype.copyAttributesFrom=function(t,e){if(t){var n=t._attributes,r=this._attributes;for(var i in n)n.hasOwnProperty(i)&&null==r[i]&&(!e||e.indexOf(i)<0)&&(r[i]=n[i])}},t.prototype.clone=function(){var t=new(Function.prototype.bind.call(this.constructor,null,this.ctx,null));return t.copyAttributesFrom(this),this._children.forEach(function(e){t.appendNode(e.clone())}),t},t.prototype.remove=function(){var t=this.parent;if(t){for(var e=0;e<t.children.length;e++)if(t.children[e]===this){t.children.splice(e,1);break}this.parent=null}},t.prototype.clearAttr=function(t){delete this._attributes[t.toLowerCase()]},t.prototype.render=function(t,e){this._viewport=t.clone(),(this._curRenderMode=e||this._defRenderMode)!==n.Ignore&&this._render()},Object.defineProperty(t.prototype,"renderMode",{get:function(){return this._curRenderMode},enumerable:!0,configurable:!0}),t.prototype._render=function(){this._renderContent()},t.prototype._renderContent=function(){for(var t=0;t<this._children.length;t++)this._children[t].render(this.viewport,this.renderMode)},t}();e._SvgElementBase=r;var i=function(t){function r(r,i,o){void 0===o&&(o=n.Render);var a=t.call(this,r,i,o)||this;return a._clipPath=new e._SvgIdRefAttr(a,"clip-path"),a}return __extends(r,t),r.prototype._render=function(){var e,r=this.ctx.area;if(this._clipPath.val){var i=this.ctx.getElement(this._clipPath.val);(e=!!(i&&i instanceof p))&&(r._pdfdoc.saveState(),i.render(this.viewport,n.Clip),r.paths.clip(this.style.clipRule.val))}t.prototype._render.call(this),e&&r._pdfdoc.restoreState()},r}(r);e._SvgClippableElementBase=i;var o=function(t){function r(n,r){var i=t.call(this,n,r)||this;return i._transform=new e._SvgTransformAttr(i),i}return __extends(r,t),r.prototype._render=function(){var e=this._transform.hasVal&&this.renderMode!==n.Clip;e&&(this.ctx.area._pdfdoc.saveState(),this._transform.apply(this)),t.prototype._render.call(this),e&&this.ctx.area._pdfdoc.restoreState()},r}(i);e._SvgTransformableElementBase=o;var a=function(n){function r(){var t=null!==n&&n.apply(this,arguments)||this;return t._fill=!0,t._stroke=!0,t}return __extends(r,n),r.prototype._renderContent=function(){this._draw(),this.style.apply(this,this._fill,this._stroke)},r.prototype._draw=function(){t.assert(!1,e._Errors.AbstractMethod)},r}(o);e._SvgShapeElementBase=a;var s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype._draw=function(){var t=new e._SvgNumAttr(this,"r",0).val;if(t>0){var n=new e._SvgNumAttr(this,"cx",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width).val,r=new e._SvgNumAttr(this,"cy",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height).val;this.ctx.area.paths.circle(n,r,t)}},n}(a);e._SvgCircleElementImpl=s;var u=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype._draw=function(){var t=new e._SvgNumAttr(this,"rx",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width).val,n=new e._SvgNumAttr(this,"ry",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height).val;if(t>0&&n>0){var r=new e._SvgNumAttr(this,"cx",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width).val,i=new e._SvgNumAttr(this,"cy",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height).val;this.ctx.area.paths.ellipse(r,i,t,n)}},n}(a);e._SvgEllipseElementImpl=u;var c=function(t){function n(e,n){var r=t.call(this,e,n)||this;return r._fill=!1,r}return __extends(n,t),n.prototype._draw=function(){var t=new e._SvgNumAttr(this,"x1",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width).val,n=new e._SvgNumAttr(this,"y1",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height).val,r=new e._SvgNumAttr(this,"x2",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width).val,i=new e._SvgNumAttr(this,"y2",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height).val;this.ctx.area.paths.moveTo(t,n).lineTo(r,i)},n}(a);e._SvgLineElementImpl=c;var l=function(t){function r(n,r){var i=t.call(this,n,r)||this;return i._d=new e._SvgStrAttr(i,"d"),i}return __extends(r,t),r.prototype._renderContent=function(){var r=this.ctx.area;if(this.renderMode===n.Clip){if(this._d.hasVal){var i=e._PdfSvgPathHelper.scale(this._d.val,.75);this.attr("d",i),this._d.reset()}t.prototype._renderContent.call(this)}else r._pdfdoc.saveState(),r.scale(.75),t.prototype._renderContent.call(this),r._pdfdoc.restoreState()},r.prototype._draw=function(){this._d.hasVal&&this.ctx.area.paths.svgPath(this._d.val)},r}(a);e._SvgPathElementImpl=l;var h=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype._draw=function(){var t=new e._SvgPointsArrayAttr(this,"points");if(t.hasVal){var n=t.val,r=this.ctx.area;if(n.length>1){for(var i=0;i<n.length;i++)0==i?r.paths.moveTo(n[i].x,n[i].y):r.paths.lineTo(n[i].x,n[i].y);return!0}}return!1},n}(a);e._SvgPolylineElementImpl=h;var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype._draw=function(){return!!t.prototype._draw.call(this)&&(this.ctx.area.paths.closePath(),!0)},e}(h);e._SvgPolygonElementImpl=f;var d=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return __extends(n,t),n.prototype._draw=function(){var t=new e._SvgNumAttr(this,"width",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width).val,n=new e._SvgNumAttr(this,"height",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height).val;if(t>0&&n>0){var r=new e._SvgNumAttr(this,"x",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width).val,i=new e._SvgNumAttr(this,"y",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height).val,o=Math.max(new e._SvgNumAttr(this,"rx",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width).val,0),a=Math.max(new e._SvgNumAttr(this,"ry",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height).val,0),s=this.ctx.area.paths;o||a?(o=Math.min(o||a,t/2),a=Math.min(a||o,n/2),s.moveTo(r+o,i),s.lineTo(r+t-o,i),s.quadraticCurveTo(r+t,i,r+t,i+a),s.lineTo(r+t,i+n-a),s.quadraticCurveTo(r+t,i+n,r+t-o,i+n),s.lineTo(r+o,i+n),s.quadraticCurveTo(r,i+n,r,i+n-a),s.lineTo(r,i+a),s.quadraticCurveTo(r,i,r+o,i)):s.rect(r,i,t,n)}},n}(a);e._SvgRectElementImpl=d;var p=function(t){function e(e,r){return t.call(this,e,r,n.Ignore)||this}return __extends(e,t),e}(r);e._SvgClipPathElementImpl=p;var g=function(t){function e(e,r){return t.call(this,e,r,n.Ignore)||this}return __extends(e,t),e}(i);e._SvgDefsElementImpl=g;var _=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e}(o);e._SvgGElementImpl=_;var y=function(r){function i(t,i){var o=r.call(this,t,i,n.Ignore)||this;return o._x1=new e._SvgStrAttr(o,"x1","0%"),o._x2=new e._SvgStrAttr(o,"x2","100%"),o._y1=new e._SvgStrAttr(o,"y1","0%"),o._y2=new e._SvgStrAttr(o,"y2","0%"),o._gradientUnits=new e._SvgStrAttr(o,"gradientUnits","objectBoundingBox"),o}return __extends(i,r),i.prototype.toBrush=function(n){for(var r=new t.Rect(new e._SvgNumAttr(n,"x",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width).val,new e._SvgNumAttr(n,"y",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height).val,new e._SvgNumAttr(n,"width",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width).val,new e._SvgNumAttr(n,"height",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height).val),i="objectBoundingBox"===this._gradientUnits.val?new t.Size(r.width,r.height):n.viewport.clone(),o=e._SvgNumAttr.parseValue(this._x1.val,e._SvgAttrType.Number,i,e._SvgLengthContext.Width,e._SvgNumConversion.Default),a=e._SvgNumAttr.parseValue(this._x2.val,e._SvgAttrType.Number,i,e._SvgLengthContext.Width,e._SvgNumConversion.Default),s=e._SvgNumAttr.parseValue(this._y1.val,e._SvgAttrType.Number,i,e._SvgLengthContext.Height,e._SvgNumConversion.Default),u=e._SvgNumAttr.parseValue(this._y2.val,e._SvgAttrType.Number,i,e._SvgLengthContext.Height,e._SvgNumConversion.Default),c=[],l=0;l<this.children.length;l++)if(this.children[l]instanceof m){var h=this.children[l];c.push(new e.PdfGradientStop(e._SvgNumAttr.parseValue(h.offset.val,e._SvgAttrType.Number,i,e._SvgLengthContext.Other,e._SvgNumConversion.Default),h.color.val,h.opacity.val))}return new e.PdfLinearGradientBrush(r.left+o,r.top+s,r.left+a,r.top+u,c)},i}(r);e._SvgLinearGradientElementImpl=y;var m=function(t){function r(r,i){var o=t.call(this,r,i,n.Ignore)||this;return o.color=new e._SvgColorAttr(o,"stop-color","black"),o.opacity=new e._SvgNumAttr(o,"stop-opacity",1,e._SvgNumConversion.None,void 0,!0),o.offset=new e._SvgStrAttr(o,"offset","0"),o}return __extends(r,t),r}(r);e._SvgStopElementImpl=m;var v=function(n){function r(t,r){var i=n.call(this,t,r)||this;return i._x=new e._SvgNumAttr(i,"x",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width),i._y=new e._SvgNumAttr(i,"y",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height),i._width=new e._SvgNumAttr(i,"width",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width),i._height=new e._SvgNumAttr(i,"height",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height),i._href=new e._SvgHRefAttr(i,"xlink:href"),i._par=new e._SvgPreserveAspectRatioAttr(i),i}return __extends(r,n),r.prototype._renderContent=function(){var n=this._width.val,r=this._height.val;if(n>0&&r>0&&this._href.hasVal){var i=e._resolveUrlIfRelative(this._href.val,this.ctx.urlResolver);if(i){this.ctx.area._pdfdoc.saveState(),(this._x.val||this._y.val)&&this.ctx.area.translate(this._x.val,this._y.val),this.viewport=new t.Size(n,r);try{this._href.val.match(/\.svg$/i)?this._renderSvgImage(i):this._renderRasterImage(i)}catch(t){}this.ctx.area._pdfdoc.restoreState()}}},r.prototype._renderSvgImage=function(n){var r,i=t.pdf._XhrHelper.text(n,function(t){return r=t.statusText});if(r)throw r;var o=new e._SvgRenderer(i,this.ctx.area),a=o.root;this.attr("viewBox",a.attr("viewBox")),a.clearAttr("viewBox"),a.clearAttr("x"),a.clearAttr("y"),a.clearAttr("width"),a.clearAttr("height"),a.clearAttr("preserveAspectRatio"),a.clearAttr("clip"),a.clearAttr("overflow"),this.ctx.area.paths.rect(0,0,this.viewport.width,this.viewport.height).clip();var s=new e._SvgScaleAttributes(this);o.render(s.apply(this))},r.prototype._renderRasterImage=function(t){var n=e._PdfImageHelper.getDataUri(t),r=this._par.val,i={width:this.viewport.width,height:this.viewport.height,align:e.PdfImageHorizontalAlign.Left,vAlign:e.PdfImageVerticalAlign.Top};"none"===r.align?i.stretchProportionally=!1:(i.stretchProportionally=!0,r.align.match(/^xMid/)?i.align=e.PdfImageHorizontalAlign.Center:r.align.match(/^xMax/)&&(i.align=e.PdfImageHorizontalAlign.Right),r.align.match(/YMid$/)?i.vAlign=e.PdfImageVerticalAlign.Center:r.align.match(/YMax$/)&&(i.vAlign=e.PdfImageVerticalAlign.Bottom)),this.ctx.area.drawImage(n,0,0,i)},r}(o);e._SvgImageElementImpl=v;var b=function(t){function r(r,i){var o=t.call(this,r,i,n.Ignore)||this;if(i&&(!i.type||"text/css"===i.type)){for(var a="",s=0;s<i.childNodes.length;s++)a+=i.childNodes[s].textContent;var u=(a=(a=e._compressSpaces(a)).replace(/\/\*([^*]|\*+[^*/])*\*+\//gm,"")).match(/[^{}]*{[^}]*}/g);if(u)for(s=0;s<u.length;s++){var c=u[s].match(/([^{}]*){([^}]*)}/);if(c){var l=c[1].trim().split(","),h=c[2].trim();l.length&&h&&l.forEach(function(t){(t=t.trim())&&o.ctx.registerCssRule(new e._SvgCssRule(t,h))})}}}return o}return __extends(r,t),r}(r);e._SvgStyleElementImpl=b;var w=function(n){function r(t,r){var i=n.call(this,t,r)||this;return i._x=new e._SvgNumAttr(i,"x",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width),i._y=new e._SvgNumAttr(i,"y",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height),i._width=new e._SvgNumAttr(i,"width","100%",e._SvgNumConversion.Default,e._SvgLengthContext.Width),i._height=new e._SvgNumAttr(i,"height","100%",e._SvgNumConversion.Default,e._SvgLengthContext.Height),i._scale=new e._SvgScaleAttributes(i),i._overflow=new e._SvgStrAttr(i,"overflow","hidden"),i}return __extends(r,n),Object.defineProperty(r.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),r.prototype._render=function(){var e=this.ctx.area;e._pdfdoc.saveState();var r=this._width.val,i=this._height.val,o=this._x.val,a=this._y.val;this.parent&&(o||a)&&e.translate(o,a),this.viewport=new t.Size(r,i),"visible"!==this._overflow.val&&e.paths.rect(0,0,r,i).clip(),this.viewport=this._scale.apply(this),this.viewport.width>0&&this.viewport.height>0&&n.prototype._render.call(this),e._pdfdoc.restoreState()},r}(i);e._SvgSvgElementImpl=w;var x=function(t){function e(e,r){return t.call(this,e,r,n.Ignore)||this}return __extends(e,t),e}(i);e._SvgSymbolElementImpl=x;var S=function(n){function r(t,r){var i=n.call(this,t,r)||this;return i._xlink=new e._SvgIdRefAttr(i,"xlink:href"),i}return __extends(r,n),r.prototype._render=function(){var e,n;if(this._xlink.hasVal&&(e=this.ctx.getElement(this._xlink.val))){var r=new _(this.ctx,null);if(r.parent=this.parent,r.copyAttributesFrom(this,["x","y","width","height","xlink:href"]),null!=this.attr("x")||null!=this.attr("y")){var i=t.format("translate({x},{y})",{x:this.attr("x")||0,y:this.attr("y")||0});r.attr("transform",(n=r.attr("transform"))?n+" "+i:i)}if(e instanceof x){var o=new w(this.ctx,null);o.copyAttributesFrom(e);for(var a=0;a<e.children.length;a++)o.appendNode(e.children[a].clone());r.appendNode(o),o.attr("width",this.attr("width")||"100%"),o.attr("height",this.attr("height")||"100%")}else e=e.clone(),r.appendNode(e),e instanceof w&&(null!=(n=this.attr("width"))&&e.attr("width",n),null!=(n=this.attr("height"))&&e.attr("height",n));r.render(this.viewport,this.renderMode)}},r}(r);e._SvgUseElementImpl=S;var k=function(t){function r(n,r){var i=t.call(this,n,r)||this;return i._x=new e._SvgNumAttr(i,"x",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width),i._y=new e._SvgNumAttr(i,"y",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height),i._dx=new e._SvgNumAttr(i,"dx",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width),i._dy=new e._SvgNumAttr(i,"dy",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height),i._textDecoration=new e._SvgTextDecorationAttr(i),i}return __extends(r,t),r.prototype._render=function(){this.renderMode===n.Render&&t.prototype._render.call(this)},r.prototype._renderContent=function(){var t=this;this._prepareNodes();for(var e=this._x.val+this._dx.val,n=this._y.val+this._dy.val,r=function(i,o){if(i._x.hasVal&&(e=i._x.val),i._y.hasVal&&(n=i._y.val),e+=i._dx.val,n+=i._dy.val,i._text)i._cx=e,i._cy=n,i._setDecorators(o),i.render(t.viewport,t.renderMode),e+=t.ctx.area.measureText(i._text,i.style.font.toFont(),{width:1/0,height:1/0,includeLastLineExternalLeading:!1}).size.width;else for(var a=0;a<i.children.length;a++){var s=o.slice();s.push({decoration:i._textDecoration,style:i.style}),r(i.children[a],s)}},i=0;i<this.children.length;i++)r(this.children[i],[{decoration:this._textDecoration,style:this.style}])},r.prototype._prepareNodes=function(){var t=function(e){for(var n=0;n<e.children.length;n++){var r=e.children[n];!r._text&&t(r)&&r.remove()}return 0===e.children.length},e=[],n=function(t){for(var r=0;r<t.children.length;r++){var i=t.children[r];i._text?e.push(i):n(i)}};t(this),n(this);for(var r=0;r<e.length;r++){var i=e.length;" "===e[r]._text&&(0===r||r===i-1||r<i-1&&" "===e[r+1]._text)&&(e[r].remove(),e.splice(r,1),r--)}},r}(o);e._SvgTextElementImpl=k;var C=function(n){function r(r,i,o){var a=n.call(this,r,i)||this;return a._textDecoration=new e._SvgTextDecorationAttr(a),a._text=t.asString(o),a._x=new e._SvgNumAttr(a,"x",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width),a._y=new e._SvgNumAttr(a,"y",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height),a._dx=new e._SvgNumAttr(a,"dx",0,e._SvgNumConversion.Default,e._SvgLengthContext.Width),a._dy=new e._SvgNumAttr(a,"dy",0,e._SvgNumConversion.Default,e._SvgLengthContext.Height),a._textDecoration=new e._SvgTextDecorationAttr(a),a}return __extends(r,n),r.prototype.clone=function(){var t=n.prototype.clone.call(this);return t._text=this._text,t},r.prototype._setDecorators=function(t){this._decorators=t},r.prototype._renderContent=function(){if(this._text){var t={font:this.style.font.toFont(),width:1/0,height:1/0,lineBreak:!1,fill:"none"!==this.style.fill.color.val,stroke:"none"!==this.style.stroke.color.val,_baseline:e._PdfTextBaseline.Alphabetic};this._decorate(),(t.fill||t.stroke)&&(t.fill&&(t.brush=this.style.fill.toBrush(this)),t.stroke&&(t.pen=this.style.stroke.toPen(this)),this.ctx.area.drawText(this._text,this._cx,this._cy,t))}},r.prototype._decorate=function(){var t=this.ctx.area,e=!1;this._decorators.push({decoration:this._textDecoration,style:this.style});for(var n=0;n<this._decorators.length&&!e;n++)e=null!=this._decorators[n].decoration.val;if(e){t._pdfdoc.saveState();for(var r,i=t._pdfdoc._document,o=t.measureText(this._text,this.style.font.toFont(),{width:1/0,height:1/0,includeLastLineExternalLeading:!1}).size,a=Math.max(i.currentFontSize()/20,.1),s=i.currentFontAscender(),u=this._cx;r=this._decorators.shift();){var c=r.decoration.val;if(c){for(var l=0;l<c.length;l++){var h=this._cy-s;switch(c[l]){case"line-through":h=h+o.height/2-a/2;break;case"overline":h-=i.currentFontBBox().ury-i.currentFontAscender();break;case"underline":h=h+o.height-1.5*a}t.paths.rect(u,h,o.width,a)}r.style.apply(this,!0,!0)}}t._pdfdoc.restoreState()}},r}(i);e._SvgTspanElementImpl=C}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict;";var n=function(){function n(n,r,i){var o=this;this._elementsById={},this._registeredCssRules={},t.assert(null!=r,e._Errors.ValueCannotBeEmpty("svgString")),this._doc=r._pdfdoc;var a=this._parse(n);a&&(this._svg=new e._SvgSvgElementImpl({area:r,urlResolver:i,getElement:this._getElementById.bind(this),registerCssRule:function(t){o._registerCssRule(t,i)}},null),this._copyAttributes(a,this._svg),this._buildTree(a,this._svg),this._svg.viewport=new t.Size(r.width,r.height))}return Object.defineProperty(n.prototype,"root",{get:function(){return this._svg},enumerable:!0,configurable:!0}),n.prototype.render=function(t){this._svg&&this._svg.render(t||this._svg.viewport)},n.prototype._parse=function(t){if(t){var e=new DOMParser;return e.async=!1,e.parseFromString(t,"text/xml").getElementsByTagName("svg")[0]}},n.prototype._buildTree=function(n,r,i){for(var o=0;n.childNodes&&o<n.childNodes.length;o++){var a=n.childNodes.item(o),s=a.nodeName;if(1===a.nodeType){var u=this._getClassName(s);if(t.pdf[u]){var c=new t.pdf[u](r.ctx,a);this._copyAttributes(a,c),r.appendNode(c);var l;(l=a.getAttribute("id"))&&(this._elementsById[l]=c),this._buildTree(a,c,"text"===s||i&&"tspan"===s)}}else if(3===a.nodeType&&i){var h=a.textContent.trim();if(h){0!=o&&1===n.childNodes[o-1].nodeType&&a.textContent.match(/^\s/)&&r.appendNode(new e._SvgTspanElementImpl(r.ctx,null," "));var f=e._compressSpaces(a.textContent);r.appendNode(new e._SvgTspanElementImpl(r.ctx,null,f))}h&&!a.textContent.match(/\s$/)||r.appendNode(new e._SvgTspanElementImpl(r.ctx,null," "))}}},n.prototype._getClassName=function(t){return"_Svg"+t.charAt(0).toUpperCase()+t.substring(1)+"ElementImpl"},n.prototype._copyAttributes=function(t,n){for(o=0;o<t.attributes.length;o++){var r=t.attributes.item(o);n.attr(r.name,r.value)}for(var i=e._SvgCssHelper.getComputedStyle(t,this._registeredCssRules),o=0,a=Object.keys(i);o<a.length;o++){var s=a[o];n.attr(s,i[s])}},n.prototype._getElementById=function(t){return t=(t||"").replace("#",""),this._elementsById[t]},n.prototype._registerCssRule=function(t,n){"@"!==t.selector[0]?this._registeredCssRules[t.selector]=t:"@font-face"===t.selector&&e._SvgCssHelper.registerFontFace(this._doc,t,n)},n}();e._SvgRenderer=n}(t.pdf||(t.pdf={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function r(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}(),wijmo;!function(e){!function(t){!function(o){"use strict";function r(t,o,i){if(void 0===i&&(i=!1),o&&t)for(var n in o){var l=o[n],s=t[n];if(e.isObject(l)){if(void 0===s||!e.isObject(s)&&i){if(e.isFunction(l.clone)){t[n]=s=l.clone();continue}t[n]=s={}}e.isObject(s)&&r(t[n],l,i)}else(void 0===s||i&&void 0!==l)&&(t[n]=l)}return t}var i;!function(e){e[e.ActualSize=0]="ActualSize",e[e.PageWidth=1]="PageWidth",e[e.SinglePage=2]="SinglePage"}(i=o.ScaleMode||(o.ScaleMode={}));var n;!function(e){e[e.All=0]="All",e[e.Selection=1]="Selection"}(n=o.ExportMode||(o.ExportMode={}));var l=function(t){function o(o,r,i,n,l,s,a,h,d){var c=t.call(this,o,r)||this;return c.cancelBorders=!1,c._cell=e.asType(i,HTMLElement,!0),c._canvas=n,c._clientRect=l,c._contentRect=s,c._textTop=a,c._style=h,c._getFormattedCell=d,c}return __extends(o,t),Object.defineProperty(o.prototype,"canvas",{get:function(){return this._canvas},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"cell",{get:function(){return this._cell},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"clientRect",{get:function(){return this._clientRect},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"contentRect",{get:function(){return this._contentRect},enumerable:!0,configurable:!0}),o.prototype.getFormattedCell=function(){return e.asFunction(this._getFormattedCell)()},Object.defineProperty(o.prototype,"style",{get:function(){return this._style},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"textTop",{get:function(){return this._textTop},enumerable:!0,configurable:!0}),o}(e.grid.CellRangeEventArgs);o.PdfFormatItemEventArgs=l;var s,a=function(){function o(){}return o.draw=function(t,o,n,l,s){e.assert(!!t,"The flex argument cannot be null."),e.assert(!!o,"The doc argument cannot be null.");var a=r({},s);r(a,this.DefaultDrawSettings),a.scaleMode=null==n?i.ActualSize:null==l?i.PageWidth:i.SinglePage;try{a.recalculateStarWidths&&t.columns._updateStarSizes(e.pdf.ptToPx(o.width)),this._draw(t,o,null,n,l,a)}finally{a.recalculateStarWidths&&t.invalidate(!0)}},o.drawToPosition=function(t,o,n,l,s,a){e.assert(!!t,"The flex argument cannot be null."),e.assert(!!o,"The doc argument cannot be null."),e.assert(!!n,"The point argument cannot be null.");var h=r({},a);r(h,this.DefaultDrawSettings),h.scaleMode=null==l?i.ActualSize:null==s?i.PageWidth:i.SinglePage;try{h.recalculateStarWidths&&t.columns._updateStarSizes(e.pdf.ptToPx(o.width)),this._draw(t,o,n,l,s,h)}finally{h.recalculateStarWidths&&t.invalidate(!0)}},o.export=function(t,o,i){e.assert(!!t,"The flex argument cannot be null."),e.assert(!!o,"The fileName argument cannot be empty."),r(i=r({},i),this.DefaultExportSettings);var n=i.documentOptions.ended;i.documentOptions.ended=function(t,r){n&&!1===n.apply(l,[t,r])||e.pdf.saveBlob(r.blob,o),t.dispose()};var l=new e.pdf.PdfDocument(i.documentOptions);try{i.recalculateStarWidths&&t.columns._updateStarSizes(e.pdf.ptToPx(l.width)),this._draw(t,l,null,null,null,i),l.end()}finally{i.recalculateStarWidths&&t.invalidate(!0)}},o._draw=function(o,r,i,n,l,a){var h=null!=i,d=new e.Size(r.width,r.height);i||(i=new e.Point(0,r.y)),e.isArray(a.embeddedFonts)&&a.embeddedFonts.forEach(function(e){r.registerFont(e)});var c=_.getSelection(o,a.exportMode),u=this._getGridRenderer(o,a,c,this.BorderWidth,!0),g=new e.Rect(i.x||0,i.y||0,n||d.width,l||d.height),p=this._getScaleFactor(u,a.scaleMode,g),f=this._getPages(u,c,g,a,h,p);(s=document.createElement("div")).setAttribute(t.FlexGrid._WJS_MEASURE,"true"),s.style.visibility="hidden",o.hostElement.appendChild(s);try{for(var b=0;b<f.length;b++){b>0&&r.addPage();var w=f[b],m=0===w.pageCol?g.left:0,y=0===w.pageRow?g.top:0;r.saveState(),r.paths.rect(0,0,d.width,d.height).clip(),r.scale(p,p,new e.Point(m,y)),r.translate(m,y);var C=this._getGridRenderer(o,a,w.range,this.BorderWidth,b===f.length-1);C.render(r),r.restoreState(),r.x=m,r.y=y+C.renderSize.height*p}}finally{s&&(e.removeChild(s),s=null)}},o._getScaleFactor=function(e,t,o){var r=1;if(t===i.ActualSize)return r;var n=e.renderSize;if(t===i.SinglePage)(l=Math.min(o.width/n.width,o.height/n.height))<1&&(r=l);else{var l=o.width/n.width;l<1&&(r=l)}return r},o._getPages=function(t,o,r,n,l,s){var a=this,h=[],d=[],c=e.pdf.pxToPt,u=t.flex,p=t.showColumnHeader,f=t.showColumnFooter,b=t.showRowHeader,w=p?c(u.columnHeaders.height):0,_=f?c(u.columnFooters.height):0,y=b?c(u.rowHeaders.width):0,C=n.scaleMode===i.ActualSize||n.scaleMode===i.PageWidth,R=n.scaleMode===i.ActualSize,v=(r.width-r.left)*(1/s),S=(r.height-r.top)*(1/s),x=r.width*(1/s),T=r.height*(1/s),P=w+_,z=y,W=l&&n.scaleMode==i.ActualSize;if(C){var H=0;o.forEach(u.cells,function(e,t,o,r){var i=h.length?T:S;if(g.isRenderableRow(e)){var n=c(e.renderHeight);H++,P+=n,(p||H>1)&&(P-=a.BorderWidth),P>i&&(w+n>i||W?(h.push(r),P=w):(h.push(r-1),P=w+n),p&&(P-=a.BorderWidth))}})}var M=o.length()-1;if(M<0&&(M=0),h.length&&h[h.length-1]===M||h.push(M),R)for(var A=0,L=o.leftCol;L<=o.rightCol;L++){var B=u.columns[L];if(B.isVisible){var V=c(B.renderWidth),j=d.length?x:v;A++,z+=V,(b||A>1)&&(z-=this.BorderWidth),z>j&&(y+V>j||W?(d.push(L),z=y):(d.push(L-1),z=y+V),b&&(z-=this.BorderWidth))}}d.length&&d[d.length-1]===o.rightCol||d.push(o.rightCol);for(var O=[],F=!1,E=1,k=l&&n.maxPages>0?1:n.maxPages,L=0;L<h.length&&!F;L++)for(var D=0;D<d.length&&!F;D++,E++)if(!(F=E>k)){var G=0==L?0:h[L-1]+1,I=0==D?o.leftCol:d[D-1]+1;O.push(new m(o.subrange(G,h[L]-G+1,I,d[D]),D,L))}return O},o._getGridRenderer=function(o,r,i,n,l){return new(t.multirow&&o instanceof t.multirow.MultiRow&&c||t.sheet&&o instanceof t.sheet.FlexSheet&&d||e.olap&&o instanceof e.olap.PivotGrid&&u||h)(o,r,i,n,l)},o.BorderWidth=1,o.DefaultDrawSettings={maxPages:Number.MAX_VALUE,exportMode:n.All,repeatMergedValuesAcrossPages:!0,recalculateStarWidths:!0,styles:{cellStyle:{font:new e.pdf.PdfFont,padding:1.5,verticalAlign:"middle"},headerCellStyle:{font:{weight:"bold"}}}},o.DefaultExportSettings=r({scaleMode:i.PageWidth,documentOptions:{compress:!1,pageSettings:{margins:{left:36,right:36,top:18,bottom:18}}}},o.DefaultDrawSettings),o}();o.FlexGridPdfConverter=a;var h=function(){function o(e,o,r,i,n){this._flex=e,this._borderWidth=i,this._lastPage=n,this._settings=o||{},this._topLeft=new p(this,e.topLeftCells,this.showRowHeader&&this.showColumnHeader?new _(e,[new t.CellRange(0,0,e.topLeftCells.rows.length-1,e.topLeftCells.columns.length-1)]):new _(e,[]),i),this._rowHeader=new p(this,e.rowHeaders,this.showRowHeader?r.clone(0,e.rowHeaders.columns.length-1):new _(e,[]),i),this._columnHeader=new p(this,e.columnHeaders,this.showColumnHeader?new _(e,[new t.CellRange(0,r.leftCol,e.columnHeaders.rows.length-1,r.rightCol)]):new _(e,[]),i),this._cells=new p(this,e.cells,r,i),this._bottomLeft=new p(this,e.bottomLeftCells,this.showRowHeader&&this.showColumnFooter?new _(e,[new t.CellRange(0,0,e.bottomLeftCells.rows.length-1,e.bottomLeftCells.columns.length-1)]):new _(e,[]),i),this._columnFooter=new p(this,e.columnFooters,this.showColumnFooter?new _(e,[new t.CellRange(0,r.leftCol,e.columnFooters.rows.length-1,r.rightCol)]):new _(e,[]),i)}return Object.defineProperty(o.prototype,"settings",{get:function(){return this._settings},enumerable:!0,configurable:!0}),o.prototype.render=function(e){var t=Math.max(0,Math.max(this._topLeft.renderSize.width,this._rowHeader.renderSize.width)-this._borderWidth),o=Math.max(0,Math.max(this._topLeft.renderSize.height,this._columnHeader.renderSize.height)-this._borderWidth);this._topLeft.render(e,0,0),this._rowHeader.render(e,0,o),this._columnHeader.render(e,t,0),this._cells.render(e,t,o),o=Math.max(0,o+this._cells.renderSize.height-this._borderWidth),this._bottomLeft.render(e,0,o),this._columnFooter.render(e,t,o)},Object.defineProperty(o.prototype,"flex",{get:function(){return this._flex},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"renderSize",{get:function(){var t=Math.max(this._topLeft.renderSize.height,this._columnHeader.renderSize.height)+Math.max(this._rowHeader.renderSize.height,this._cells.renderSize.height)+Math.max(this._bottomLeft.renderSize.height,this._columnFooter.renderSize.height),o=Math.max(this._topLeft.renderSize.width,this._rowHeader.renderSize.width)+Math.max(this._columnHeader.renderSize.width,this._cells.renderSize.width);return this._columnHeader.visibleRows>0&&(t-=this._borderWidth),this._columnFooter.visibleRows>0&&(t-=this._borderWidth),this._rowHeader.visibleColumns>0&&(o-=this._borderWidth),new e.Size(o,t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"showColumnHeader",{get:function(){return!!(this._flex.headersVisibility&t.HeadersVisibility.Column)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"showRowHeader",{get:function(){return!!(this._flex.headersVisibility&t.HeadersVisibility.Row)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"showColumnFooter",{get:function(){return this._lastPage&&this._flex.columnFooters.rows.length>0},enumerable:!0,configurable:!0}),o.prototype.alignMergedTextToTheTopRow=function(e){return!1},o.prototype.getCellValue=function(e,t,o){return e.getCellData(o,t,!0)},o.prototype.getColumn=function(e,t,o){return e.columns[t]},o.prototype.isAlternatingRow=function(e){return e.index%2!=0},o.prototype.isGroupRow=function(e){return e instanceof t.GroupRow&&e.hasChildren},o.prototype.isMergeableCell=function(e,t){return!0},o.prototype.getCellStyle=function(e,o,i){var n=this.settings.styles,l=r({},n.cellStyle),s=this._flex;switch(e.cellType){case t.CellType.Cell:this.isGroupRow(o)?r(l,n.groupCellStyle,!0):this.isAlternatingRow(o)&&r(l,n.altCellStyle,!0);break;case t.CellType.ColumnHeader:case t.CellType.RowHeader:case t.CellType.TopLeft:case t.CellType.BottomLeft:r(l,n.headerCellStyle,!0);break;case t.CellType.ColumnFooter:r(l,n.headerCellStyle,!0),r(l,n.footerCellStyle,!0)}return!this.settings.customCellContent&&s._getShowErrors()&&s._getError(e,o.index,i.index)&&r(l,n.errorCellStyle,!0),l},o}(),d=function(o){function i(e,t,r,i,n){return o.call(this,e,t,r,i,n)||this}return __extends(i,o),i.prototype.getCellValue=function(e,r,i){return e.cellType===t.CellType.Cell?e.rows[i]instanceof t.sheet.HeaderRow?this.flex.columnHeaders.getCellData(i,r,!0):this.flex.getCellValue(i,r,!0):o.prototype.getCellValue.call(this,e,r,i)},i.prototype.getCellStyle=function(t,i,n){var l=o.prototype.getCellStyle.call(this,t,i,n),s=this.flex.selectedSheet.findTable(i.index,n.index);if(s){var a=s.getRange(),h=i.index-a.topRow,d=n.index-a.leftCol,c=s._getTableCellAppliedStyles(h,d);c&&(c.font=new e.pdf.PdfFont(c.fontFamily,e.pdf._asPt(c.fontSize,!0,void 0),c.fontStyle,c.fontWeight)),r(l,c,!0)}return l},Object.defineProperty(i.prototype,"showColumnHeader",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showRowHeader",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showColumnFooter",{get:function(){return!1},enumerable:!0,configurable:!0}),i}(h),c=function(e){function o(t,o,r,i,n){return e.call(this,t,o,r,i,n)||this}return __extends(o,e),o.prototype.getColumn=function(e,t,o){return this.flex.getBindingColumn(e,o,t)},o.prototype.isAlternatingRow=function(o){return o instanceof t.multirow._MultiRow?o.dataIndex%2!=0:e.prototype.isAlternatingRow.call(this,o)},o.prototype.isMergeableCell=function(e,t){return!0},o}(h),u=function(e){function o(t,o,r,i,n){return e.call(this,t,o,r,i,n)||this}return __extends(o,e),o.prototype.alignMergedTextToTheTopRow=function(e){return!this.flex.centerHeadersVertically&&(e.cellType===t.CellType.ColumnHeader||e.cellType===t.CellType.RowHeader)},o}(h),g=function(){function o(e,t){this._panel=e,this._range=t.clone()}return o.isRenderableRow=function(e){return e.isVisible&&!(e instanceof t._NewRowTemplate)},Object.defineProperty(o.prototype,"visibleRows",{get:function(){var e=this;return null==this._visibleRows&&(this._visibleRows=0,this._range.forEach(this._panel,function(t){e.isRenderableRow(t)&&e._visibleRows++})),this._visibleRows},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"visibleColumns",{get:function(){if(null==this._visibleColumns&&(this._visibleColumns=0,this._range.isValid))for(var e=this._range.leftCol;e<=this._range.rightCol;e++)this._panel.columns[e].isVisible&&this._visibleColumns++;return this._visibleColumns},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"size",{get:function(){if(null==this._size){var t=this._range.getRenderSize(this._panel);this._size=new e.Size(e.pdf.pxToPt(t.width),e.pdf.pxToPt(t.height))}return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"range",{get:function(){return this._range},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"panel",{get:function(){return this._panel},enumerable:!0,configurable:!0}),o.prototype.isRenderableRow=function(e){return o.isRenderableRow(e)},o}(),p=function(o){function r(e,t,r,i){var n=o.call(this,t,r)||this;return n._gr=e,n._borderWidth=i,n}return __extends(r,o),Object.defineProperty(r.prototype,"gr",{get:function(){return this._gr},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"renderSize",{get:function(){return null==this._renderSize&&(this._renderSize=this.size.clone(),this.visibleColumns>1&&(this._renderSize.width-=this._borderWidth*(this.visibleColumns-1)),this.visibleRows>1&&(this._renderSize.height-=this._borderWidth*(this.visibleRows-1))),this._renderSize},enumerable:!0,configurable:!0}),r.prototype.getRangeWidth=function(t,o){for(var r=0,i=0,n=this.panel,l=t;l<=o;l++){var s=n.columns[l];s.isVisible&&(i++,r+=s.renderWidth)}return r=e.pdf.pxToPt(r),i>1&&(r-=this._borderWidth*(i-1)),r},r.prototype.getRangeHeight=function(t,o){for(var r=0,i=0,n=this.panel,l=t;l<=o;l++){var s=n.rows[l];this.isRenderableRow(s)&&(i++,r+=s.renderHeight)}return r=e.pdf.pxToPt(r),i>1&&(r-=this._borderWidth*(i-1)),r},r.prototype.render=function(t,o,r){var i=this,n=this.range,l=this.panel,s=new b(this._gr.flex),a=new w(l,0,0,0,0),h=new f(this,t,this._borderWidth);if(n.isValid){for(var d={},c=n.leftCol;c<=n.rightCol;c++)d[c]=r;n.forEach(l,function(t,r,c){if(i.isRenderableRow(t))for(var u=o,g=n.leftCol;g<=n.rightCol;g++){var p,f=i.gr.getColumn(l,g,c),b=void 0,w=void 0,_=!1,m=void 0;if(f.isVisible){var y=i._getCellValue(g,c),C=null;if(i.gr.isMergeableCell(f,t)&&(C=s.getMergedRange(l,c,g)))if(a.copyFrom(C),C.topRow!==C.bottomRow)C.firstVisibleRow===c||c===r.topRow?(_=!0,p=i.gr.settings.repeatMergedValuesAcrossPages?y:C.firstVisibleRow===c?y:"",b=i.getRangeHeight(c,Math.min(C.bottomRow,r.bottomRow)),w=i.getRangeWidth(g,g)):w=i.getRangeWidth(g,g);else{_=!0,p=i.gr.settings.repeatMergedValuesAcrossPages?y:g===C.leftCol?y:"",b=i.getRangeHeight(c,c),w=i.getRangeWidth(Math.max(n.leftCol,C.leftCol),Math.min(n.rightCol,C.rightCol)),m=Math.min(n.rightCol,C.rightCol);for(var R=g+1;R<=m;R++)d[R]+=b-i._borderWidth}else a.setRange(c,g,c,g),_=!0,p=y,b=i.getRangeHeight(c,c),w=i.getRangeWidth(g,g);_&&h.renderCell(p,t,f,a,new e.Rect(u,d[g],w,b)),b&&(d[g]+=b-i._borderWidth),w&&(u+=w-i._borderWidth),m&&(g=m)}}})}},r.prototype._getCellValue=function(e,o){var r=this.panel,i=this.gr.getCellValue(r,e,o),n=r.columns[e].isContentHtml;if(!i&&r.cellType===t.CellType.Cell){var l=r.rows[o];l instanceof t.GroupRow&&l.dataItem&&l.dataItem.groupDescription&&e===r.columns.firstVisibleIndex&&(n=!0,i=l.getGroupHeader())}return n&&(this._cvtHtml||(this._cvtHtml=document.createElement("div")),this._cvtHtml.innerHTML=i,i=this._cvtHtml.textContent),i},r}(g),f=function(){function o(e,t,o){this._pr=e,this._area=t,this._borderWidth=o}return o.prototype.renderCell=function(o,r,i,n,a){var h,d=r.grid,c=this._pr.panel,u=function(){var e=n.topRow,t=n.leftCol,o=c.getCellElement(e,t);return o||(s.innerHTML=s.className=s.style.cssText="",d.cellFactory.updateCell(c,e,t,s)),o||s},g=!!this._pr.gr.settings.customCellContent,p=null,f=this._pr.gr.getCellStyle(c,r,i);if(g&&(p=u()),g&&!(o=p.textContent.trim())&&this._isBooleanCell(i,r,c)&&(o=this._extractCheckboxValue(p)+""),g){var b=function(e){return e.className=e.className.replace("wj-state-selected",""),e.className=e.className.replace("wj-state-multi-selected",""),window.getComputedStyle(e)}(p);f.color=b.color,f.backgroundColor=b.backgroundColor,f.borderColor=b.borderColor||b.borderRightColor||b.borderBottomColor||b.borderLeftColor||b.borderTopColor,f.font=new e.pdf.PdfFont(b.fontFamily,e.pdf._asPt(b.fontSize,!0,void 0),b.fontStyle,b.fontWeight),f.textAlign=b.textAlign}if(f.boxSizing="border-box",f.borderWidth=this._borderWidth,f.borderStyle="solid",f.textAlign||r instanceof t.GroupRow&&!i.aggregate||(f.textAlign=i.getAlignment()),c.cellType===t.CellType.Cell&&d.rows.maxGroupLevel>=0&&n.leftCol===d.columns.firstVisibleIndex){var w=r instanceof t.GroupRow?Math.max(r.level,0):d.rows.maxGroupLevel+1,_=e.pdf._asPt(f.paddingLeft||f.padding),m=e.pdf.pxToPt(w*d.treeIndent);f.paddingLeft=_+m}var y,C=this._measureCell(o,i,r,c,f,a),R=n.rowSpan>1&&n.visibleRowsCount>1&&this._pr.gr.alignMergedTextToTheTopRow(c);R&&(y=new e.Rect(C.contentRect.left,C.contentRect.top,C.contentRect.width,C.contentRect.height/(n.visibleRowsCount||1)),C.textRect=this._calculateTextRect(o,i,r,c,y,f)),e.isFunction(this._pr.gr.settings.formatItem)&&((h=new l(c,n,p,this._area,C.rect,C.contentRect,C.textRect.top,f,function(){return p||u()})).data=o,this._pr.gr.settings.formatItem(h),h.data!==o&&(o=e.asString(h.data),C.textRect=this._calculateTextRect(o,i,r,c,R?y:C.contentRect,f))),this._renderCell(o,r,i,n,C,f,!h||!h.cancel,!h||!h.cancelBorders)},o.prototype._renderCell=function(e,t,o,r,i,n,l,s){(l||s)&&(this._isBooleanCellAndValue(e,o,t,this._pr.panel)?this._renderBooleanCell(e,i,n,l,s):this._renderTextCell(e,i,n,l,s))},o.prototype._isBooleanCellAndValue=function(e,t,o,r){return this._isBooleanCell(t,o,r)&&this._isBoolean(e)},o.prototype._isBooleanCell=function(o,r,i){return o.dataType===e.DataType.Boolean&&i.cellType===t.CellType.Cell&&!this._pr.gr.isGroupRow(r)},o.prototype._isBoolean=function(t){var o=e.isString(t)&&t.toLowerCase();return"true"===o||"false"===o||!0===t||!1===t},o.prototype._measureCell=function(t,o,r,i,n,l){this._decompositeStyle(n);var s=l.left,a=l.top,h=l.height,d=l.width,c=this._parseBorder(n),u=c.left.width,g=c.top.width,p=c.bottom.width,f=c.right.width,b=this._parsePadding(n),w=0,_=0,m=0,y=0;if("content-box"===n.boxSizing||void 0===n.boxSizing)w=b.top+h+b.bottom,_=b.left+d+b.right,m=h,y=d;else{if("border-box"!==n.boxSizing)throw"Invalid value: "+n.boxSizing;e.pdf._IE&&n instanceof CSSStyleDeclaration?(w=b.top+b.bottom+h,_=b.left+b.right+d):(w=h-g-p,_=d-u-f),m=w-b.top-b.bottom,y=_-b.left-b.right}var l=new e.Rect(s,a,d,h),C=new e.Rect(s+u,a+g,_,w),R=new e.Rect(s+u+b.left,a+g+b.top,y,m);return{rect:l,clientRect:C,contentRect:R,textRect:this._calculateTextRect(t,o,r,i,R,n)}},o.prototype._decompositeStyle=function(e){if(e){var t;(t=e.borderColor)&&(e.borderLeftColor||(e.borderLeftColor=t),e.borderRightColor||(e.borderRightColor=t),e.borderTopColor||(e.borderTopColor=t),e.borderBottomColor||(e.borderBottomColor=t)),(t=e.borderWidth)&&(e.borderLeftWidth||(e.borderLeftWidth=t),e.borderRightWidth||(e.borderRightWidth=t),e.borderTopWidth||(e.borderTopWidth=t),e.borderBottomWidth||(e.borderBottomWidth=t)),(t=e.borderStyle)&&(e.borderLeftStyle||(e.borderLeftStyle=t),e.borderRightStyle||(e.borderRightStyle=t),e.borderTopStyle||(e.borderTopStyle=t),e.borderBottomStyle||(e.borderBottomStyle=t)),(t=e.padding)&&(e.paddingLeft||(e.paddingLeft=t),e.paddingRight||(e.paddingRight=t),e.paddingTop||(e.paddingTop=t),e.paddingBottom||(e.paddingBottom=t))}},o.prototype._parseBorder=function(t){var o={left:{width:0},top:{width:0},bottom:{width:0},right:{width:0}};return"none"!==t.borderLeftStyle&&(o.left={width:e.pdf._asPt(t.borderLeftWidth),style:t.borderLeftStyle,color:t.borderLeftColor}),"none"!==t.borderTopStyle&&(o.top={width:e.pdf._asPt(t.borderTopWidth),style:t.borderTopStyle,color:t.borderTopColor}),"none"!==t.borderBottomStyle&&(o.bottom={width:e.pdf._asPt(t.borderBottomWidth),style:t.borderBottomStyle,color:t.borderBottomColor}),"none"!==t.borderRightStyle&&(o.right={width:e.pdf._asPt(t.borderRightWidth),style:t.borderRightStyle,color:t.borderRightColor}),o},o.prototype._parsePadding=function(t){return{left:e.pdf._asPt(t.paddingLeft),top:e.pdf._asPt(t.paddingTop),bottom:e.pdf._asPt(t.paddingBottom),right:e.pdf._asPt(t.paddingRight)}},o.prototype._renderEmptyCell=function(t,o,r,i){var n=t.rect.left,l=t.rect.top,s=t.clientRect.width,a=t.clientRect.height,h=t.clientRect.left-t.rect.left,d=t.clientRect.top-t.rect.top,c=t.rect.top+t.rect.height-(t.clientRect.top+t.clientRect.height),u=t.rect.left+t.rect.width-(t.clientRect.left+t.clientRect.width);if(i&&(h||u||c||d)){var g=o.borderLeftColor||o.borderColor,p=o.borderRightColor||o.borderColor,f=o.borderTopColor||o.borderColor,b=o.borderBottomColor||o.borderColor;if(h&&d&&c&&u&&h===u&&h===c&&h===d&&g===p&&g===b&&g===f){var w=h,_=w/2;this._area.paths.rect(n+_,l+_,s+w,a+w).stroke(new e.pdf.PdfPen(g,w))}else h&&this._area.paths.polygon([[n,l],[n+h,l+d],[n+h,l+d+a],[n,l+d+a+c]]).fill(g),d&&this._area.paths.polygon([[n,l],[n+h,l+d],[n+h+s,l+d],[n+h+s+u,l]]).fill(f),u&&this._area.paths.polygon([[n+h+s+u,l],[n+h+s,l+d],[n+h+s,l+d+a],[n+h+s+u,l+d+a+c]]).fill(p),c&&this._area.paths.polygon([[n,l+d+a+c],[n+h,l+d+a],[n+h+s,l+d+a],[n+h+s+u,l+d+a+c]]).fill(b)}r&&o.backgroundColor&&s>0&&a>0&&this._area.paths.rect(n+h,l+d,s,a).fill(o.backgroundColor)},o.prototype._renderBooleanCell=function(t,o,r,i,n){if(this._renderEmptyCell(o,r,i,n),i){var l=o.textRect.left,s=o.textRect.top,a=o.textRect.height;if(this._area.paths.rect(l,s,a,a).fillAndStroke(e.Color.fromRgba(255,255,255),new e.pdf.PdfPen(void 0,.5)),!0===e.changeType(t,e.DataType.Boolean,"")){var h=a/20,d=a-.5-2*h,c=a/8;this._area._pdfdoc.saveState(),this._area.translate(l+.25+h,s+.25+h).paths.moveTo(c/2,.6*d).lineTo(d-.6*d,d-c).lineTo(d-c/2,c/2).stroke(new e.pdf.PdfPen(void 0,c)),this._area._pdfdoc.restoreState()}}},o.prototype._renderTextCell=function(t,o,r,i,n){this._renderEmptyCell(o,r,i,n),i&&t&&this._area.drawText(t,o.textRect.left,o.textRect.top,{brush:r.color,font:r.font,height:o.textRect.height,width:o.textRect.width,align:"center"===r.textAlign?e.pdf.PdfTextHorizontalAlign.Center:"right"===r.textAlign?e.pdf.PdfTextHorizontalAlign.Right:"justify"===r.textAlign?e.pdf.PdfTextHorizontalAlign.Justify:e.pdf.PdfTextHorizontalAlign.Left})},o.prototype._calculateTextRect=function(e,t,o,r,i,n){var l=i.clone();if(this._isBooleanCellAndValue(e,t,o,r)){var s=this._getTextLineHeight(n.font);switch(n.verticalAlign){case"middle":l.top=i.top+i.height/2-s/2;break;case"bottom":l.top=i.top+i.height-s}switch(n.textAlign){case"justify":case"center":l.left=i.left+i.width/2-s/2;break;case"right":l.left=i.left+i.width-s}l.height=l.width=s}else if(l.height>0&&l.width>0){switch(n.verticalAlign){case"bottom":(a=this._area.measureText(e,n.font,{height:l.height,width:l.width})).size.height<l.height&&(l.top+=l.height-a.size.height,l.height=a.size.height);break;case"middle":var a=this._area.measureText(e,n.font,{height:l.height,width:l.width});a.size.height<l.height&&(l.top+=l.height/2-a.size.height/2,l.height=a.size.height)}t.wordWrap||(l.height=this._getTextLineHeight(n.font))}return l},o.prototype._extractCheckboxValue=function(e){var t=e.querySelector("input.wj-cell-check[type=checkbox]");if(t){var o=window.getComputedStyle(t);if("none"!==o.display&&"hidden"!==o.visibility)return t.checked}},o.prototype._getTextLineHeight=function(e){return this._area.lineHeight(e)},o}(),b=function(){function e(e){this._columns={},this._flex=e}return e.prototype.getMergedRange=function(e,t,o){var r=this._columns[o];if(r&&t>=r.topRow&&t<=r.bottomRow)return r;var i=this._flex.getMergedRange(e,t,o,!1);return this._columns[o]=i?new w(e,i):null},e}(),w=function(e){function o(o,r,i,n,l){var s=this;(s=r instanceof t.CellRange?e.call(this,r.row,r.col,r.row2,r.col2)||this:e.call(this,r,i,n,l)||this).firstVisibleRow=-1,s.visibleRowsCount=0;var a=s.topRow,h=s.bottomRow,d=o.rows.length;if(d>0)for(var c=a;c<=h&&c<d;c++)o.rows[c].isVisible&&(s.firstVisibleRow<0&&(s.firstVisibleRow=c),s.visibleRowsCount++);return s}return __extends(o,e),o.prototype.copyFrom=function(e){this.setRange(e.row,e.col,e.row2,e.col2),this.firstVisibleRow=e.firstVisibleRow,this.visibleRowsCount=e.visibleRowsCount},o}(t.CellRange),_=function(){function o(e,t){this._flex=e,this._ranges=t||[]}return o.getSelection=function(e,r){var i=[];if(r===n.All)i.push(new t.CellRange(0,0,e.rows.length-1,e.columns.length-1));else{var l=e.selection;switch(e.selectionMode){case t.SelectionMode.None:break;case t.SelectionMode.Cell:case t.SelectionMode.CellRange:i.push(l);break;case t.SelectionMode.Row:i.push(new t.CellRange(l.topRow,0,l.topRow,e.cells.columns.length-1));break;case t.SelectionMode.RowRange:i.push(new t.CellRange(l.topRow,0,l.bottomRow,e.cells.columns.length-1));break;case t.SelectionMode.ListBox:for(var s=-1,a=0;a<e.rows.length;a++)e.rows[a].isSelected?(s<0&&(s=a),a===e.rows.length-1&&i.push(new t.CellRange(s,0,a,e.cells.columns.length-1))):(s>=0&&i.push(new t.CellRange(s,0,a-1,e.cells.columns.length-1)),s=-1)}}return new o(e,i)},o.prototype.length=function(){for(var e=0,t=0;t<this._ranges.length;t++){var o=this._ranges[t];o.isValid&&(e+=o.bottomRow-o.topRow+1)}return e},Object.defineProperty(o.prototype,"isValid",{get:function(){return this._ranges.length&&this._ranges[0].isValid},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"leftCol",{get:function(){return this._ranges.length?this._ranges[0].leftCol:-1},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"rightCol",{get:function(){return this._ranges.length?this._ranges[0].rightCol:-1},enumerable:!0,configurable:!0}),o.prototype.clone=function(e,t){for(var r=[],i=0;i<this._ranges.length;i++){var n=this._ranges[i].clone();arguments.length>0&&(n.col=e),arguments.length>1&&(n.col2=t),r.push(n)}return new o(this._flex,r)},o.prototype.getRenderSize=function(t){for(var o=new e.Size(0,0),r=0;r<this._ranges.length;r++){var i=this._ranges[r].getRenderSize(t);o.width=Math.max(o.width,i.width),o.height+=i.height}return o},o.prototype.forEach=function(e,t){for(var o=0,r=0;r<this._ranges.length;r++){var i=this._ranges[r];if(i.isValid)for(var n=i.topRow;n<=i.bottomRow;n++)t(e.rows[n],i,n,o++)}},o.prototype.subrange=function(e,r,i,n){var l=[];if(e>=0&&r>0)for(var s=0,a=0,h=0;h<this._ranges.length&&r>0;h++,s=a+1){var d=this._ranges[h];if(a=s+(d.bottomRow-d.topRow),!(e>a)){var c=e>s?d.topRow+(e-s):d.topRow,u=Math.min(d.bottomRow,c+r-1),g=arguments.length>2?i:d.leftCol,p=arguments.length>2?n:d.rightCol;l.push(new t.CellRange(c,g,u,p)),r-=u-c+1}}return new o(this._flex,l)},o}(),m=function(){function e(e,t,o){this._col=t,this._row=o,this._range=e}return Object.defineProperty(e.prototype,"range",{get:function(){return this._range},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageCol",{get:function(){return this._col},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageRow",{get:function(){return this._row},enumerable:!0,configurable:!0}),e}()}(t.pdf||(t.pdf={}))}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.PdfDocument||(n.PdfDocument={}))})(t=n.pdf||(n.pdf={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.PdfPageArea||(n.PdfPageArea={}))})(t=n.pdf||(n.pdf={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.PdfDocumentEndedEventArgs||(n.PdfDocumentEndedEventArgs={}))})(t=n.pdf||(n.pdf={}))}(wijmo||(wijmo={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.PdfFormatItemEventArgs||(n.PdfFormatItemEventArgs={}))})(t=n.pdf||(n.pdf={}))})(t=n.grid||(n.grid={}))})(wijmo||(wijmo={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.grid.FlexGrid);n.FlexGrid=t})(t=n.grid||(n.grid={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(i){var u=function(t){function u(){return t!==null&&t.apply(this,arguments)||this}return __extends(u,t),Object.defineProperty(u.prototype,"_controlType",{get:function(){return r},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_initializerType",{get:function(){return n.mvc.grid._Initializer},enumerable:!0,configurable:!0}),u.prototype._getExtensionTypes=function(){var n=t.prototype._getExtensionTypes.call(this);return n.push(i._ItemTemplateProvider,i._Validator,i._SortHelper,i._MaskLayer,i._VirtualScrolling,i._UpdateHelper),n},u}(t._ControlWrapper),r;i._FlexGridWrapper=u;r=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype._getSortDescriptorKeyMvc=function(){return"FlexGridSort"},t.prototype._getFlatColumnsMvc=function(n){return n.columns},t.prototype._getLayoutGroupsMvc=function(n){var i=[],r,t=n.columns;return t&&t.length&&(r={cells:t},i.push(r)),i},t.prototype._getBindingColumns=function(){var n=[];return this.columns.forEach(function(t){n.push(t)}),n},t.prototype._getBindingColumnMvc=function(n,t){return this.columns[t]},t.prototype._getBindingColumnFromCellRangeMvc=function(n){return this.columns[n.col]},t.prototype._getRowsPerItemMvc=function(){return 1},t.prototype._getSortCellMvc=function(n,t,i){return{groupIndex:-1,cellIndex:t,cell:i}},t}(n.grid.FlexGrid);i.FlexGrid=r})(i=t.grid||(t.grid={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(i){var r=function(i){function r(r){var u=i.call(this,r)||this;return u._columnFootersRowHeaderText="Σ",u._grid=r,n.documentReady(function(){r.invalidate()}),t._overrideMethod(r,"refresh",null,u._afterRefresh.bind(u)),u}return __extends(r,i),r.prototype._afterRefresh=function(){this._suspendedOpts&&this._grid.collectionView&&(!t.DataSourceManager._isRemoteSource(this._grid.collectionView)||this._isInitialized?this._processSuspendedOpts():this._isInitialized=!0)},r.prototype._beforeInitializeControl=function(n){n&&this._filterOptions(n)},r.prototype._afterInitializeControl=function(){this._showColumnFooters&&(this._grid.columnFooters.rows.push(new wijmo.grid.GroupRow),this._grid.bottomLeftCells.setCellData(0,0,this._columnFootersRowHeaderText||""))},r.prototype._filterOptions=function(n){this._filterItemsSourceOptions(n);this._filterDataMapOptions(n);this._filterSuspendedOpts(n);this._filterColumnFootersOpts(n)},r.prototype._filterItemsSourceOptions=function(t){wijmo.tryCast(t.itemsSource,wijmo.collections.CollectionView)==null&&wijmo.isArray(t.itemsSource)?t.itemsSource=new n.mvc.collections.CallbackCollectionView({sourceCollection:t.itemsSource,uniqueId:null,disableServerRead:!0}):t.itemsSource==null&&delete t.itemsSource},r.prototype._filterDataMapOptions=function(n){var i,t,r,u,f;i=this._grid._getFlatColumnsMvc(n);i&&i.length&&i.forEach(function(n){t=n.dataMap;t&&(u=t.mapChanged,f=t.sortByDisplayValues,r=new wijmo.grid.DataMap(t.itemsSource,t.selectedValuePath,t.displayMemberPath),u&&r.mapChanged.addHandler(u),r.sortByDisplayValues=f===!0,n.dataMap=r)})},r.prototype._filterSuspendedOpts=function(n){var t=this;this._suspendedOpts=null;r._SUSPENDED_OPTIONS.forEach(function(i){return t._filterSuspendedOpt(i,n)})},r.prototype._filterSuspendedOpt=function(n,t){typeof t[n]!="undefined"&&(this._suspendedOpts||(this._suspendedOpts={}),this._suspendedOpts[n]=t[n],delete t[n])},r.prototype._filterColumnFootersOpts=function(n){typeof n.showColumnFooters!="undefined"&&(this._showColumnFooters=!!n.showColumnFooters,delete n.showColumnFooters);typeof n.columnFootersRowHeaderText!="undefined"&&(this._columnFootersRowHeaderText=n.columnFootersRowHeaderText,delete n.columnFootersRowHeaderText)},r.prototype._processSuspendedOpts=function(){var i=this._grid,t,n;if(this._suspendedOpts){for(t in this._suspendedOpts){n=this._suspendedOpts[t];switch(t){case"scrollPosition":i[t]=n?new wijmo.Point(n.x,n.y):new wijmo.Point;break;case"selection":i[t]=n?new wijmo.grid.CellRange(n.row,n.col,n.row2,n.col2):new wijmo.grid.CellRange}}this._suspendedOpts=null}},r._SUSPENDED_OPTIONS=["scrollPosition","selection"],r}(n.mvc._Initializer);i._Initializer=r})(i=t.grid||(t.grid={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var c1;(function(n){var t;(function(t){var i;(function(i){var r=function(){function r(n){this._grid=wijmo.asType(n,wijmo.grid.FlexGrid,!1);t._overrideMethod(n,i._Initializer._INITIAL_NAME,null,this._afterInitialize.bind(this))}return r.prototype._afterInitialize=function(n){var t=this;n&&(this._addHandlers(),this._grid.itemsSourceChanged.addHandler(function(){t._removeHandlers();t._addHandlers()}))},r.prototype._addHandlers=function(){var t,i;this._collectionView=this._grid.collectionView;t=wijmo.tryCast(this._collectionView,n.mvc.collections.RemoteCollectionView);t?(t.beginQuery.addHandler(this._updateMaskLayer,this),t.endQuery.addHandler(this._updateMaskLayer,this)):(i=wijmo.tryCast(this._collectionView,wijmo.odata.ODataCollectionView),i&&(i.loading.addHandler(this._updateMaskLayer,this),i.loaded.addHandler(this._updateMaskLayer,this)));this._updateMaskLayer()},r.prototype._removeHandlers=function(){var i=wijmo.tryCast(this._collectionView,n.mvc.collections.RemoteCollectionView),t;i?(i.beginQuery.removeHandler(this._updateMaskLayer,this),i.endQuery.removeHandler(this._updateMaskLayer,this)):(t=wijmo.tryCast(this._collectionView,wijmo.odata.ODataCollectionView),t&&(t.loading.removeHandler(this._updateMaskLayer,this),t.loaded.removeHandler(this._updateMaskLayer,this)))},r.prototype._updateMaskLayer=function(){t.DataSourceManager._isQueringData(this._grid.collectionView)?this._showMaskLayer():this._hideMaskLayer()},r.prototype._showMaskLayer=function(){this._maskLayer||(this._maskLayer=this._createMaskLayer());this._maskLayer.style.display="inline-block"},r.prototype._hideMaskLayer=function(){this._maskLayer&&(this._maskLayer.style.display="none")},r.prototype._createMaskLayer=function(){var r=this._grid.cells.hostElement.parentElement.parentElement,t,i,n;if(!r)throw"the grid container doesn't exist.";return i=wijmo.getElementRect(r),t=document.createElement("div"),n=t.style,n.left="0px",n.top="0px",n.width=i.width+"px",n.height=i.height+"px",n.lineHeight=i.height+"px",n.display="none",t.innerText="loading...",r.appendChild(t),wijmo.addClass(t,"c1-grid-mask"),t},r}();i._MaskLayer=r})(i=t.grid||(t.grid={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var c1;(function(n){var t;(function(n){var t;(function(t){var i=function(){function t(t){this._grid=wijmo.asType(t,wijmo.grid.FlexGrid,!1);t.pasting.addHandler(this._onPasting,this);t.pastingCell.addHandler(this._onPastingCell,this);t.pasted.addHandler(this._onPasted,this);var i=t._keyHdl;i&&n._overrideMethod(i,"_deleteSel",null,this._afterDeleteSel.bind(this))}return t.prototype._onPasting=function(){this._pastingItem=null},t.prototype._onPastingCell=function(n,t){var r=this._grid.collectionView,i,u;t.panel.cellType===wijmo.grid.CellType.Cell&&r&&(u=Math.floor(t.row/this._grid._getRowsPerItemMvc()),i=r.items[u],i&&(this._pastingItem&&this._pastingItem!=i&&r.commitEdit(),this._pastingItem=i,r.editItem(i)))},t.prototype._onPasted=function(){this._pastingItem&&(this._pastingItem=null,this._commitEdit())},t.prototype._afterDeleteSel=function(){this._commitEdit()},t.prototype._commitEdit=function(){var n=this._grid.collectionView;n.commitEdit()},t}();t._UpdateHelper=i})(t=n.grid||(n.grid={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var c1;(function(n){var t;(function(t){var i;(function(i){var r=function(){function r(n){this._grid=wijmo.asType(n,wijmo.grid.FlexGrid,!1);t._overrideMethod(n,i._Initializer._INITIAL_NAME,null,this._afterInitialize.bind(this));t._overrideMethod(n,"refresh",null,this._afterRefresh.bind(this))}return r.prototype._afterInitialize=function(n){var t=this;n&&(this._addHandlers(),this._grid.itemsSourceChanged.addHandler(function(){t._removeHandlers();t._addHandlers()}))},r.prototype._addHandlers=function(){this._collectionView=this._grid.collectionView;t.DataSourceManager._isDynamicalLoading(this._collectionView)&&this._grid.scrollPositionChanged.addHandler(this._scrollingToCurrentView,this)},r.prototype._removeHandlers=function(){t.DataSourceManager._isDynamicalLoading(this._collectionView)&&this._grid.scrollPositionChanged.removeHandler(this._scrollingToCurrentView,this)},r.prototype._afterRefresh=function(){t.DataSourceManager._isDynamicalLoading(this._grid.collectionView)&&this._scrollingToCurrentView()},r.prototype._scrollingToCurrentView=function(){var n=this._grid.viewRange;this._setWindow(n.row,n.row2)},r.prototype._prepareRequest=function(n,t,i){var u=this,f=this._grid,r;n&&window.setTimeout(function(){r=f.viewRange;r.row==t&&r.row2==i?u._requestItems(n,t,i):u._prepareRequest(n,r.row,r.row2)},100)},r.prototype._setWindow=function(t,i){var u=wijmo.tryCast(this._grid.collectionView,n.mvc.collections.RemoteCollectionView),r;if(u){this._prepareRequest(u,t,i);return}r=wijmo.tryCast(this._grid.collectionView,wijmo.odata.ODataCollectionView);r&&r.setWindow(t,i)},r.prototype._requestItems=function(n,t,i){var r=this._grid._getRowsPerItemMvc(),u=Math.floor(t/r),f=Math.ceil(i/r);n.requestItems(u,f)},r}();i._VirtualScrolling=r})(i=t.grid||(t.grid={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var c1;(function(n){var t;(function(t){var i;(function(i){var r=function(){function r(n){this._grid=wijmo.asType(n,wijmo.grid.FlexGrid,!1);var r=this._grid.collectionView;!r||r instanceof wijmo.odata.ODataCollectionView||(t._overrideMethod(n,i._Initializer._INITIAL_NAME,null,this._afterInitialize.bind(this)),t._overrideMethod(n,"_bindColumns",null,this._afterBindColumns.bind(this)),t._overrideMethod(n,"onSortingColumn",null,this._afterOnSortingColumn.bind(this)))}return r.prototype._afterInitialize=function(n){var t=this;n&&(this._storeColumns(),this._addHandlers(),this._grid.itemsSourceChanged.addHandler(function(){t._removeHandlers();t._addHandlers()}))},r.prototype._addHandlers=function(){if(this._collectionView=this._grid.collectionView,this._isServerReadRemoteCollectionView()){var t=wijmo.tryCast(this._collectionView,n.mvc.collections.RemoteCollectionView);t.queryData.addHandler(this._collectSortSettings,this)}},r.prototype._removeHandlers=function(){if(this._isServerReadRemoteCollectionView()){var t=wijmo.tryCast(this._collectionView,n.mvc.collections.RemoteCollectionView);t.queryData.removeHandler(this._collectSortSettings,this)}},r.prototype._isServerReadRemoteCollectionView=function(){var t=wijmo.tryCast(this._collectionView,n.mvc.collections.RemoteCollectionView);return t&&t._isDisableServerRead&&!t._isDisableServerRead()},r.prototype._afterBindColumns=function(){this._storeColumns()},r.prototype._storeColumns=function(){this._originalColumns=[];for(var n=0;n<this._grid.columns.length;n++)this._originalColumns.push(this._grid.columns[n])},r.prototype._afterOnSortingColumn=function(n){var t;n.cancel||(this._sortingRowIndex=n.row,t=this._grid.columns[n.col],this._sortingOriginalColumnIndex=this._originalColumns.indexOf(t))},r.prototype._collectSortSettings=function(n,t){if(n.sortDescriptions&&n.sortDescriptions.length){var i=this._getSortSettings();i&&i.length&&(t.extraRequestData=t.extraRequestData||{},t.extraRequestData[this._grid._getSortDescriptorKeyMvc()]=i)}},r.prototype._getSortSettings=function(){var t,n,i=[],r;return this._sortingOriginalColumnIndex!=null&&(t=this._grid._getSortCellMvc(this._sortingRowIndex,this._sortingOriginalColumnIndex,this._originalColumns[this._sortingOriginalColumnIndex]),n=t.cell,n&&(n.sortMemberPath==null||n.sortMemberPath==n.binding)&&n.dataMap&&n.dataMap.sortByDisplayValues&&(r={group:t.groupIndex,index:t.cellIndex,binding:n.binding,dataMap:{selectedValuePath:n.dataMap.selectedValuePath,displayMemberPath:n.dataMap.displayMemberPath}},i.push(r))),i},r}();i._SortHelper=r})(i=t.grid||(t.grid={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var c1;(function(n){var t;(function(t){var i;(function(i){var r=function(){function r(n){this._grid=wijmo.asType(n,wijmo.grid.FlexGrid,!1);t._overrideMethod(n,i._Initializer._INITIAL_NAME,this._beforeInitialize.bind(this),this._afterInitialize.bind(this))}return r.prototype._beforeInitialize=function(n){n&&this._processTemplates(n)},r.prototype._afterInitialize=function(n){var t=this;n&&(this._addHandlers(),this._grid.itemsSourceChanged.addHandler(function(){t._removeHandlers();t._applyTemplates()}))},r.prototype._addHandlers=function(){this._collectionView=wijmo.tryCast(this._grid.collectionView,wijmo.collections.CollectionView);this._collectionView&&(this._collectionView.items&&this._collectionView.items.length>0?this._applyTemplates():this._collectionView.collectionChanged.addHandler(this._applyTemplatesOnce,this))},r.prototype._applyTemplatesOnce=function(){var n=this;setTimeout(function(){n._collectionView.collectionChanged.removeHandler(n._applyTemplatesOnce,n)});this._applyTemplates()},r.prototype._removeHandlers=function(){(this._collectionView.collectionChanged.removeHandler(this._applyTemplatesOnce,this),this._templates)&&(this._removeEditTemplateHandlers(),this._grid.formatItem.removeHandler(this._applyCellTemplates,this))},r.prototype._processTemplates=function(n){this._processPanelTemplates(n);this._processColumnsTempaltes(n)},r.prototype._processPanelTemplates=function(n){for(var u=["rowHeadersTemplate","columnHeadersTemplate","cellsTemplate","topLeftCellsTemplate","columnFootersTemplate","bottomLeftCellsTemplate"],f=["RowHeader","ColumnHeader","Cell","TopLeft","ColumnFooter","BottomLeft"],e=u.length,i,r,t=0;t<e;t++)r=u[t],i=n[r],i&&delete n[r],i!=null&&this._updateTemplates(f[t],i)},r.prototype._processColumnsTempaltes=function(n){var o=this,t,i,f=0,u,r,e="cellTemplate";t=this._grid._getLayoutGroupsMvc(n);t&&t.length&&t.forEach(function(n){u=0;i=n.cells;i&&i.length&&i.forEach(function(n){r=n[e];r&&delete n[e];r!=null&&o._updateTemplates("Cell",r,f,u);u++});f++})},r.prototype._updateTemplates=function(n,t,i,r){i===void 0&&(i=-1);r===void 0&&(r=-1);var u,f=i===-1&&r===-1?"-1":i+"_"+r;t!=null&&(this._templates||(this._templates={}),u=this._templates[n],u||(u={}),u[f]=t,this._templates[n]=u)},r.prototype._applyTemplates=function(){var n,i;if(this._templates){this._celltemplates={};t.Utils.copy(this._celltemplates,this._templates);for(n in this._celltemplates)i=this._celltemplates[n],n==="Cell"&&(i=this._updateCellsTemplate(n,i),this._celltemplates[n]=i);this._addEditTemplateHandlers();this._grid.formatItem.addHandler(this._applyCellTemplates,this)}},r.prototype._updateCellsTemplate=function(n,t){var i,r={},f,s=this._grid,u,e,o;for(i in t)parseInt(i)!=-1?(u=i.split("_"),e=parseInt(u[0]),o=parseInt(u[1]),f=this._grid._getBindingColumnMvc(e,o),r[n+f._hash]=t[i]):r[i]=t[i];return r},r.prototype._applyCellTemplates=function(t,i){var u,f,e,s,h,r;if(this._celltemplates&&(u=i.panel.cellType,f=this._isEditing(u,i.row,i.col),u!==wijmo.grid.CellType.Cell||!f)&&(e=wijmo.grid.CellType[u],s=this._celltemplates[e],s)&&(h=this._grid._getBindingColumnFromCellRangeMvc(i),r=this._getCellTemplate(e,h._hash,s),r)){var c=r.templateId||r.templateContent,l=r.editTemplateId||r.editTemplateContent,o={row:i.row,column:i.col},a="";i.cell&&i.cell.style&&i.cell.style.visibility==="hidden"&&(a="hidden");o[n.mvc.Template.UID]=this._getUnqiueIdentifier()+"_"+e+"_r"+i.row+"_c"+i.col+a;o[n.mvc.Template.DATACONTEXT]=this._grid.rows[i.row].dataItem;!f&&c?c.applyTo(i.cell,o):f&&l&&l.applyTo(i.cell,o)}},r.prototype._resizeWindow=function(){!!this._activeEdt&&this._containsFocus(this._activeEdt)&&this._containsFocus(this._activeEdt.firstElementChild)&&(this._closeEditor(!0),this._grid.focus())},r._hasEditTemplate=function(n){var i,t;for(i in n)if(t=n[i],t&&(t.editTemplateId||t.editTemplateContent))return!0;return!1},r.prototype._getCellTemplate=function(n,t,i){var u,n,r;return wijmo.grid.CellType[n]==wijmo.grid.CellType.Cell&&(u=n+t,r=i[u]),r==null&&(r=i["-1"]),r},r.prototype._addEditTemplateHandlers=function(){if(this._celltemplates&&this._celltemplates.Cell){var n=this._celltemplates.Cell;r._hasEditTemplate(n)&&(window.addEventListener("resize",this._resizeWindow.bind(this)),this._grid.beginningEdit.addHandler(this._applyCellEditTemplate,this),this._grid.scrollPositionChanged.addHandler(this._closeEditor,this),this._grid.prepareCellForEdit.addHandler(this._saveEdit,this),this._grid.selectionChanging.addHandler(this._saveEdit,this))}},r.prototype._removeEditTemplateHandlers=function(){window.removeEventListener("resize",this._resizeWindow.bind(this));this._grid.beginningEdit.removeHandler(this._applyCellEditTemplate,this);this._grid.scrollPositionChanged.removeHandler(this._closeEditor,this);this._grid.prepareCellForEdit.removeHandler(this._saveEdit,this);this._grid.selectionChanging.removeHandler(this._saveEdit,this)},r.prototype._saveEdit=function(){this._closeEditor(!0)},r.prototype._getUnqiueIdentifier=function(){return this._grid.hostElement.id||n.mvc._getUniqueId(this._grid)},r.prototype._getCellBoundingRect=function(n,t){var r=this._grid.cells.getCellElement(n,t),i;if(r)return i=r.getBoundingClientRect(),new wijmo.Rect(i.left,i.top,i.width,i.height)},r.prototype._applyCellEditTemplate=function(t,i){var v=this,s=i.data,b,l,y,c,r,a,u,f,w,e;if((!s||s.keyCode!=wijmo.Key.Delete)&&(b=this._grid._getBindingColumnFromCellRangeMvc(i),l=this._getCellTemplate("Cell",b._hash,this._celltemplates.Cell),l)&&(y=l.editTemplateId||l.editTemplateContent,y)){var h=i.col,o=i.row,p={row:o,column:h};(p[n.mvc.Template.UID]=this._getUnqiueIdentifier()+"_Cell_r"+o+"_c"+h,p[n.mvc.Template.DATACONTEXT]=t.rows[o].dataItem,i.cancel=!0,c=Math.floor(o/this._grid._getRowsPerItemMvc()),this._editedItemIndex!=c||this._editedColIndex!=h)&&(this._editedItemIndex=c,this._editedColIndex=h,this._rng=i.range,r=document.createElement("div"),document.body.appendChild(r),r.addEventListener("keydown",function(n){switch(n.keyCode){case wijmo.Key.Enter:case wijmo.Key.Tab:n.preventDefault();v._closeEditor(!0);t.focus();var i=document.createEvent("HTMLEvents");i.initEvent("keydown",!0,!0);i.ctrlKey=n.ctrlKey;i.shiftKey=n.shiftKey;i.keyCode=n.keyCode;t.hostElement.dispatchEvent(i);break;case wijmo.Key.Escape:v._closeEditor(!1);t.focus()}}),a=this._getCellBoundingRect(o,h),wijmo.setCss(r,{position:"absolute",left:a.left-1+pageXOffset,top:a.top-1+pageYOffset,width:a.width+1,height:t.rows[o].renderHeight+1,borderRadius:"0px"}),y.applyTo(r,p),u=r.firstElementChild,f=wijmo.Control.getControl(u),this._listenLostFocus(f),this._activeEdt=r,w=t.collectionView.items[c],t.collectionView&&w&&setTimeout(function(){c==v._editedItemIndex&&t.collectionView.editItem(w)},210),e=s&&s.charCode>32?String.fromCharCode(s.charCode):null,f&&e&&f.focus(),setTimeout(function(){var n,t;f&&e||u.focus();e?(n=u.querySelector("input.wj-form-control"),n||(n=u.querySelector("input")),!n&&u instanceof HTMLInputElement&&(n=u),n instanceof HTMLInputElement&&(n.value=e,wijmo.setSelectionRange(n,e.length,e.length),t=document.createEvent("HTMLEvents"),t.initEvent("input",!0,!1),n.dispatchEvent(t))):f&&f.focus()},50))}},r.prototype._listenLostFocus=function(n){var t=this,i;n&&(i=function(){setTimeout(function(){n.lostFocus.removeHandler(i,t);!n.containsFocus()&&t._activeEdt&&t._activeEdt.firstElementChild===n.hostElement&&t._closeEditor(!0)})},n.lostFocus.addHandler(i,this))},r.prototype._containsFocus=function(n){var t=wijmo.Control.getControl(n);return t?t.containsFocus():wijmo.contains(n,document.activeElement)},r.prototype._closeEditor=function(n){var o,r;if(this._activeEdt&&this._editedItemIndex!=null){var f=this._activeEdt,s=this._editedItemIndex,e=f.parentElement;if(this._activeEdt=null,this._editedItemIndex=null,this._editedColIndex=null,e){var t=this._grid,u=new wijmo.grid.CellEditEndingEventArgs(t.cells,this._rng),i=wijmo.Control.getControl(f.firstElementChild);u.cancel=!n;t.onCellEditEnding(u);u.cancel||i!=null&&(o=t.selection,r=this._collectionView,r.editItem(r.items[s]),wijmo.isUndefined(i.value)?wijmo.isUndefined(i.text)||t.setCellData(this._rng.row,this._rng.col,i.text):t.setCellData(this._rng.row,this._rng.col,i.value),r.commitEdit(),r.commitNew(),t.select(o));i instanceof wijmo.input.DropDown&&(i.isDroppedDown=!1);e.removeChild(f);t.onCellEditEnded(u)}}},r.prototype._isEditing=function(n,t,i){var r=!1;if(this._grid.isReadOnly)return!1;switch(n){case wijmo.grid.CellType.RowHeader:r=this._isCellEditing(t);break;case wijmo.grid.CellType.ColumnHeader:r=this._isCellEditing(-1,i);break;case wijmo.grid.CellType.Cell:r=this._isCellEditing(t,i);break;case wijmo.grid.CellType.TopLeft:r=this._isCellEditing()}return r},r.prototype._isCellEditing=function(n,t){n===void 0&&(n=-1);t===void 0&&(t=-1);var i=this._grid.editRange;return i==null?!1:n!=-1&&t!=-1?i.contains(n,t):n!=-1?i.containsRow(n):t!=-1?i.containsColumn(t):!0},r}();i._ItemTemplateProvider=r})(i=t.grid||(t.grid={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var c1;(function(n){var t;(function(n){var t;(function(t){var i=function(){function i(i){this._grid=wijmo.asType(i,wijmo.grid.FlexGrid,!1);n._overrideMethod(i,t._Initializer._INITIAL_NAME,this._beforeInitialize.bind(this));n._overrideMethod(i,"onPrepareCellForEdit",null,this._afterOnPrepareCellForEdit.bind(this));n._overrideMethod(i,"onCellEditEnding",this._beforeOnCellEditEnding.bind(this));n._overrideMethod(i,"onCellEditEnded",null,this._afterOnCellEditEnded.bind(this))}return i.prototype._beforeInitialize=function(n){n&&n.validationAttributesMap&&(this._validationAttributesMap=n.validationAttributesMap,delete n.validationAttributesMap)},i.prototype._afterOnPrepareCellForEdit=function(n){var i=this._grid.activeEditor,f=this._grid._getBindingColumnFromCellRangeMvc(n),e=f.binding,u,o,s,r,t;if(e&&!f.dataMap&&f.dataType!==wijmo.DataType.Boolean){for(o in this._validationAttributesMap)if(o.toLowerCase()==e.toLowerCase()){u=this._validationAttributesMap[o];break}if(u){for(s in u)i.setAttribute(s,u[s]);if(i.setAttribute("name",e),r=window.jQuery,r&&r.validator&&r.validator.unobtrusive&&(r(i).wrap("<form><\/form>"),this._focusEditor(i),r.validator.unobtrusive.parse(i.form),t=r(i.form).data("validator"),t&&t.settings)){t.settings.errorPlacement=function(n,i){var r=i.closest("div");r.removeClass(t.settings.validClass);r.addClass(t.settings.errorClass);r.attr("title",n.text())};t.settings.success=function(n,i){var u=r(i).closest("div");u.removeClass(t.settings.errorClass);u.addClass(t.settings.validClass);u.attr("title","")};r(i).on("input",function(){t.element(i)});t.element(i)}}}},i.prototype._focusEditor=function(n){n.type!="checkbox"&&n.focus()},i.prototype._beforeOnCellEditEnding=function(n){var t=this._grid,i,r;n.cancel||(this._isInnerCheckBoxEditor=t.activeEditor&&t.activeEditor.type=="checkbox"&&wijmo.contains(t.hostElement,t.activeEditor),this._editor=t.activeEditor,i=window.jQuery,i&&t.activeEditor&&(r=i(t.activeEditor.form).data("validator"),r&&(n.cancel=!r.element(t.activeEditor))))},i.prototype._afterOnCellEditEnded=function(n){var t=this._grid,i,n;if(!this._editor||n.cancel||!this._isInnerCheckBoxEditor){this._isInnerCheckBoxEditor=!1;this._editor=null;return}if(this._editor=null,this._isInnerCheckBoxEditor=!1,i=wijmo.tryCast(t.collectionView,"IEditableCollectionView"),i&&i.currentEditItem){n=new wijmo.grid.CellRangeEventArgs(t.cells,t.selection);t.onRowEditEnding(n);i.commitEdit();t.onRowEditEnded(n)}},i}();t._Validator=i})(t=n.grid||(n.grid={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.CellRange||(n.CellRange={}))})(t=n.grid||(n.grid={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.DataMap||(n.DataMap={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FlexGrid||(n.FlexGrid={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.GridPanel||(n.GridPanel={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.HitTestInfo||(n.HitTestInfo={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.MergeManager||(n.MergeManager={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Column||(n.Column={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.GroupRow||(n.GroupRow={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Row||(n.Row={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.RowCol||(n.RowCol={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.CellEditEndingEventArgs||(n.CellEditEndingEventArgs={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.CellRangeEventArgs||(n.CellRangeEventArgs={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FormatItemEventArgs||(n.FormatItemEventArgs={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(){return function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}}();e.DataPoint=i;var n=function(t){function e(e){var i=t.call(this)||this;return i._engine=e,i}return __extends(e,t),Object.defineProperty(e.prototype,"engine",{get:function(){return this._engine},enumerable:!0,configurable:!0}),e}(t.CancelEventArgs);e.RenderEventArgs=n;var r=function(t){function e(e,i,n){var r=t.call(this,e)||this;return r._index=i,r._count=n,r}return __extends(e,t),Object.defineProperty(e.prototype,"index",{get:function(){return this._index},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},enumerable:!0,configurable:!0}),e}(n);e.SeriesRenderingEventArgs=r;var s;!function(t){t[t.Png=0]="Png",t[t.Jpeg=1]="Jpeg",t[t.Svg=2]="Svg"}(s=e.ImageFormat||(e.ImageFormat={}));var o=function(i){function n(){var n=null!==i&&i.apply(this,arguments)||this;return n._palette=null,n._selectionMode=e.SelectionMode.None,n._defPalette=e.Palettes.standard,n._notifyCurrentChanged=!0,n._legendHost=null,n._needBind=!1,n.rendering=new t.Event,n.rendered=new t.Event,n.selectionChanged=new t.Event,n}return __extends(n,i),Object.defineProperty(n.prototype,"itemsSource",{get:function(){return this._items},set:function(e){this._items!=e&&(this._cv&&(this._cv.currentChanged.removeHandler(this._cvCurrentChanged,this),this._cv.collectionChanged.removeHandler(this._cvCollectionChanged,this),this._cv=null),this._items=e,this._cv=t.asCollectionView(e),null!=this._cv&&(this._cv.currentChanged.addHandler(this._cvCurrentChanged,this),this._cv.collectionChanged.addHandler(this._cvCollectionChanged,this)),this._clearCachedValues(),this._bindChart())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"collectionView",{get:function(){return this._cv},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"palette",{get:function(){return this._palette},set:function(e){e!=this._palette&&(this._palette=t.asArray(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"plotMargin",{get:function(){return this._plotMargin},set:function(t){t!=this._plotMargin&&(this._plotMargin=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"legend",{get:function(){return this._legend},set:function(i){i!=this._legend&&(this._legend=t.asType(i,e.Legend),null!=this._legend&&(this._legend._chart=this))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"header",{get:function(){return this._header},set:function(e){e!=this._header&&(this._header=t.asString(e,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"footer",{get:function(){return this._footer},set:function(e){e!=this._footer&&(this._footer=t.asString(e,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"headerStyle",{get:function(){return this._headerStyle},set:function(t){t!=this._headerStyle&&(this._headerStyle=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"footerStyle",{get:function(){return this._footerStyle},set:function(t){t!=this._footerStyle&&(this._footerStyle=t,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectionMode",{get:function(){return this._selectionMode},set:function(i){(i=t.asEnum(i,e.SelectionMode))!=this._selectionMode&&(this._selectionMode=i,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"itemFormatter",{get:function(){return this._itemFormatter},set:function(e){e!=this._itemFormatter&&(this._itemFormatter=t.asFunction(e),this.invalidate())},enumerable:!0,configurable:!0}),n.prototype.onRendered=function(t){this.rendered.raise(this,t)},n.prototype.onRendering=function(t){this.rendering.raise(this,t)},n.prototype.saveImageToFile=function(t){var e,i,n,r;t&&0!==t.length&&-1!==t.indexOf(".")||(t="image.png"),r=t.split("."),e=r[0].toLowerCase(),i=r[1].toLowerCase(),n=s[i[0].toUpperCase()+i.substring(1)],this.saveImageToDataUrl(n,function(t){h.downloadImage(t,e,i)})},n.prototype.saveImageToDataUrl=function(e,i){var n=t.asEnum(e,s,!1),r=s[n].toLowerCase();r&&r.length&&this._exportToImage(r,function(t){i.call(i,t)})},n.prototype._exportToImage=function(e,i){var n,r=new Image,s=this._currentRenderEngine.element;n=h.getDataUri(s),"svg"===e?i.call(null,n):(r.onload=function(){var n,o=document.createElement("canvas"),a=s.parentNode||s,h=t.getElementRect(a);o.width=h.width,o.height=h.height;var l=o.getContext("2d");l.fillStyle="#ffffff",l.fillRect(0,0,h.width,h.height);var c=window.getComputedStyle(a,null).getPropertyValue("padding-left").replace("px",""),u=window.getComputedStyle(a,null).getPropertyValue("padding-top").replace("px","");l.drawImage(r,+c||0,+u||0),n=o.toDataURL("image/"+e),i.call(null,n),o=null},r.src=n)},n.prototype.refresh=function(t){void 0===t&&(t=!0),i.prototype.refresh.call(this,t),this.isUpdating||this._refreshChart()},n.prototype.onSelectionChanged=function(t){this.selectionChanged.raise(this,t)},n.prototype.onLostFocus=function(t){this._tooltip&&this._tooltip.isVisible&&this._tooltip.hide(),i.prototype.onLostFocus.call(this,t)},n.prototype._cvCollectionChanged=function(t,e){this._clearCachedValues(),this._bindChart()},n.prototype._cvCurrentChanged=function(t,e){this._notifyCurrentChanged&&this._bindChart()},n.prototype._getColor=function(t){var e=this._defPalette;return null!=this._palette&&this._palette.length>0&&(e=this._palette),e[t%e.length]},n.prototype._getColorLight=function(t){var e=this._getColor(t);return this._getLightColor(e)},n.prototype._getLightColor=function(e){var i=new t.Color(e);return null!=i&&-1===e.indexOf("-")&&(1==i.a&&-1==e.indexOf("rgba")&&(i.a*=.7),e=i.toString()),e},n.prototype._bindChart=function(){this._needBind=!0,this.invalidate()},n.prototype._clearCachedValues=function(){},n.prototype._render=function(i,n){void 0===n&&(n=!0);this.hostElement;var r=this._getHostSize(),s=r.width,o=r.height;if(0!=s){if(isNaN(s)&&(s=e.FlexChart._WIDTH),(0==o||isNaN(o))&&(o=e.FlexChart._HEIGHT),i.beginRender(),s>0&&o>0){i.setViewportSize(s,o),this._rectChart=new t.Rect(0,0,s,o),this._prepareRender();var a=new t.Rect(0,0,s,o);this._chartRectId="chartRect"+(1e6*Math.random()).toFixed(),i.addClipRect(a,this._chartRectId),this._renderHeader(i,a),this._renderFooter(i,a),this._renderLegends(i,a),this._renderChart(i,a,n)}i.endRender()}},n.prototype._renderHeader=function(t,i){t.startGroup(e.FlexChart._CSS_HEADER,this._chartRectId),i=this._drawTitle(t,i,this.header,this.headerStyle,!1),t.endGroup()},n.prototype._renderFooter=function(t,i){t.startGroup(e.FlexChart._CSS_FOOTER,this._chartRectId),i=this._drawTitle(t,i,this.footer,this.footerStyle,!0),t.endGroup()},n.prototype._renderLegends=function(i,n){var r,s,o=this.legend,a=n.width,h=n.height,l=o._getPosition(a,h);switch(r=o._getDesiredSize(i,l,a,h),l){case e.Position.Right:a-=r.width,s=new t.Point(a,n.top+.5*(h-r.height));break;case e.Position.Left:n.left+=r.width,a-=r.width,s=new t.Point(0,n.top+.5*(h-r.height));break;case e.Position.Top:h-=r.height,s=new t.Point(.5*(a-r.width),n.top),n.top+=r.height;break;case e.Position.Bottom:h-=r.height,s=new t.Point(.5*(a-r.width),n.top+h)}n.width=a,n.height=h,r?(this._legendHost=i.startGroup(e.FlexChart._CSS_LEGEND,this._chartRectId),this._rectLegend=new t.Rect(s.x,s.y,r.width,r.height),this.legend._render(i,s,l,r.width,r.height),i.endGroup()):(this._legendHost=null,this._rectLegend=null)},n.prototype._prepareRender=function(){},n.prototype._renderChart=function(t,e,i){},n.prototype._performBind=function(){},n.prototype._getDesiredLegendSize=function(t,e,i,n){return null},n.prototype._renderLegend=function(t,e,i,n,r,s){},n.prototype._getHitTestItem=function(t){return null},n.prototype._getHitTestValue=function(t){return null},n.prototype._getHitTestLabel=function(t){return null},n.prototype._refreshChart=function(){this._needBind&&(this._needBind=!1,this._performBind()),this.hostElement&&this._render(this._currentRenderEngine)},n.prototype._drawTitle=function(i,n,r,s,o){var a=e.FlexChart._CSS_TITLE,h=o?e.FlexChart._CSS_FOOTER:e.FlexChart._CSS_HEADER,l=null;if(o?this._rectFooter=null:this._rectHeader=null,null!=r){var c=null,u=null,_=null,p=null;s&&(s.fontSize&&(c=s.fontSize),s.foreground&&(u=s.foreground),s.fill&&(u=s.fill),s.fontFamily&&(_=s.fontFamily),s.halign&&(p=s.halign)),i.fontSize=c,i.fontFamily=_,l=i.measureString(r,a,h,s),n.height-=l.height,u||(u=e.FlexChart._FG),i.textFill=u,o?("left"==p?e.FlexChart._renderText(i,r,new t.Point(n.left,n.bottom),0,0,a,h,s):"right"==p?e.FlexChart._renderText(i,r,new t.Point(n.left+n.width,n.bottom),2,0,a,h,s):e.FlexChart._renderText(i,r,new t.Point(n.left+.5*n.width,n.bottom),1,0,a,h,s),this._rectFooter=new t.Rect(n.left,n.bottom,n.width,l.height)):(this._rectHeader=new t.Rect(n.left,n.top,n.width,l.height),n.top+=l.height,"left"==p?e.FlexChart._renderText(i,r,new t.Point(n.left,0),0,0,a,h,s):"right"==p?e.FlexChart._renderText(i,r,new t.Point(n.left+n.width,0),2,0,a,h,s):e.FlexChart._renderText(i,r,new t.Point(n.left+.5*n.width,0),1,0,a,h,s)),i.textFill=null,i.fontSize=null,i.fontFamily=null}return n},n.prototype.pageToControl=function(t,e){return this._toControl(t,e)},n.prototype._toControl=function(e,i){t.isNumber(e)&&t.isNumber(i)?e=new t.Point(e,i):e instanceof MouseEvent&&(e=t.mouseToPage(e)),t.asType(e,t.Point);var n=e.clone(),r=this._getHostOffset();n.x-=r.x,n.y-=r.y;var s=this._getHostComputedStyle();if(s){var o=parseInt(s.paddingLeft.replace("px",""));o&&!isNaN(o)&&(n.x-=o);var a=parseInt(s.paddingTop.replace("px",""));a&&!isNaN(a)&&(n.y-=a)}return n},n.prototype._highlightItems=function(e,i,n){if(n)for(r=0;r<e.length;r++)t.addClass(e[r],i);else for(var r=0;r<e.length;r++)t.removeClass(e[r],i)},n.prototype._parseMargin=function(e){var i={};if(t.isNumber(e)&&!isNaN(e))i.top=i.bottom=i.left=i.right=t.asNumber(e);else if(t.isString(e)){var n=t.asString(e).split(" ",4),r=NaN,s=NaN,o=NaN,a=NaN;n&&(4==n.length?(r=parseFloat(n[0]),a=parseFloat(n[1]),s=parseFloat(n[2]),o=parseFloat(n[3])):2==n.length?(r=s=parseFloat(n[0]),o=a=parseFloat(n[1])):1==n.length&&(r=s=o=a=parseFloat(n[1])),isNaN(r)||(i.top=r),isNaN(s)||(i.bottom=s),isNaN(o)||(i.left=o),isNaN(a)||(i.right=a))}return i},n.prototype._showToolTip=function(t,e){var i=this,n=this._tooltip.showDelay;i._clearTimeouts(),n>0?i._toShow=setTimeout(function(){i._tooltip.show(i.hostElement,t,e),i._tooltip.hideDelay>0&&(i._toHide=setTimeout(function(){i._tooltip.hide()},i._tooltip.hideDelay))},n):(i._tooltip.show(i.hostElement,t,e),i._tooltip.hideDelay>0&&(i._toHide=setTimeout(function(){i._tooltip.hide()},i._tooltip.hideDelay)))},n.prototype._hideToolTip=function(){this._clearTimeouts(),this._tooltip.hide()},n.prototype._clearTimeouts=function(){this._toShow&&(clearTimeout(this._toShow),this._toShow=null),this._toHide&&(clearTimeout(this._toHide),this._toHide=null)},n.prototype._getHostOffset=function(){var e=t.getElementRect(this.hostElement);return new t.Point(e.left,e.top)},n.prototype._getHostSize=function(){var e=new t.Size,i=this.hostElement,n=this._getHostComputedStyle(),r=i.offsetWidth,s=i.offsetHeight;if(n){var o=parseFloat(n.paddingLeft.replace("px","")),a=parseFloat(n.paddingRight.replace("px","")),h=parseFloat(n.paddingTop.replace("px","")),l=parseFloat(n.paddingBottom.replace("px",""));isNaN(o)||(r-=o),isNaN(a)||(r-=a),isNaN(h)||(s-=h),isNaN(l)||(s-=l);var c=parseFloat(n.borderLeftWidth.replace("px","")),u=parseFloat(n.borderRightWidth.replace("px","")),_=parseFloat(n.borderTopWidth.replace("px","")),p=parseFloat(n.borderBottomWidth.replace("px",""));isNaN(c)||(r-=c),isNaN(u)||(r-=u),isNaN(_)||(s-=_),isNaN(p)||(s-=p),e.width=r,e.height=s}return e},n.prototype._getHostComputedStyle=function(){var t=this.hostElement;return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(this.hostElement):null},n.prototype._find=function(t,e){for(var i=[],n=0;n<t.childElementCount;n++){var r=t.childNodes.item(n);if(e.indexOf(r.nodeName)>=0)i.push(r);else{var s=this._find(r,e);if(s.length>0)for(var o=0;o<s.length;o++)i.push(s[o])}}return i},n._WIDTH=300,n._HEIGHT=200,n._SELECTION_THRESHOLD=15,n}(t.Control);e.FlexChartBase=o;var a=function(){function e(){this._keys={},this._keys.seriesName=null,this._keys.pointIndex=null,this._keys.x=null,this._keys.y=null,this._keys.value=null,this._keys.name=null}return e.prototype.replace=function(e,i){var n=this;return t.format(e,{},function(t,e,r,s){return n.getValue(e,i,r)})},e.prototype.getValue=function(e,i,n){switch(e){case"seriesName":return i.series?i.series.name:"";case"pointIndex":return null!=i.pointIndex?i.pointIndex.toFixed():"";case"x":return n?t.Globalize.format(i.x,n):i._xfmt;case"y":return n?t.Globalize.format(i.y,n):i._yfmt;case"value":return n?t.Globalize.format(i.value,n):i.value;case"name":return i.name}return i.item&&(0==e.indexOf("item.")&&(e=e.substr(5)),e in i.item)?n?t.Globalize.format(i.item[e],n):i.item[e]:""},e}();e._KeyWords=a;var h=function(){function e(){}return e.downloadImage=function(e,i,n){var r=document.createElement("a"),s="image/"+n;if(navigator.msSaveOrOpenBlob){e=e.substring(e.indexOf(",")+1);var o,a,h,l=atob(e),c=[];for(o=0;o<l.length;o+=512){a=l.slice(o,o+512);for(var u=new Array(a.length),_=0;_<a.length;_++)u[_]=a.charCodeAt(_);var p=new Uint8Array(u);c.push(p)}h=new Blob(c,{type:s}),navigator.msSaveOrOpenBlob(h,i+"."+n)}else r.download=i+"."+n,r.href=e,document.body.appendChild(r),r.addEventListener("click",function(e){t.removeChild(r)}),r.click()},e.getDataUri=function(i){var n,r,s,o,a,h,l,c,u,_,p=document.createElement("div"),d=i.cloneNode(!0);return"svg"==i.tagName?(r=(n=t.getElementRect(i.parentNode||i)).width||0,s=n.height||0,o=i.viewBox.baseVal&&0!==i.viewBox.baseVal.width?i.viewBox.baseVal.width:r,a=i.viewBox.baseVal&&0!==i.viewBox.baseVal.height?i.viewBox.baseVal.height:s):(r=(h=i.getBBox()).x+h.width,s=h.y+h.height,d.setAttribute("transform",d.getAttribute("transform").replace(/translate\(.*?\)/,"")),o=r,a=s,(c=document.createElementNS("http://www.w3.org/2000/svg","svg")).appendChild(d),d=c),d.setAttribute("version","1.1"),d.setAttributeNS(e.xmlns,"xmlns","http://www.w3.org/2000/svg"),d.setAttributeNS(e.xmlns,"xmlns:xlink","http://www.w3.org/1999/xlink"),d.setAttribute("width",r),d.setAttribute("height",s),d.setAttribute("viewBox","0 0 "+o+" "+a),t.addClass(d,i.parentNode&&i.parentNode.getAttribute("class")||""),p.appendChild(d),l=e.getStyles(i),(u=document.createElement("style")).setAttribute("type","text/css"),u.innerHTML="<![CDATA[\n"+l+"\n]]>",(_=document.createElement("defs")).appendChild(u),d.insertBefore(_,d.firstChild),"data:image/svg+xml;base64,"+window.btoa(window.unescape(encodeURIComponent(e.doctype+p.innerHTML)))},e.getStyles=function(t){var e="",i=document.styleSheets;return null==i||0===i.length?null:([].forEach.call(i,function(i){var n;try{if(null==i.cssRules||0===i.cssRules.length)return!0}catch(t){if("SecurityError"==t.name)return console.log("SecurityError. Can't read: "+i.href),!0}n=i.cssRules,[].forEach.call(n,function(i){var n,r=i.style;if(null==r)return!0;try{n=t.querySelector(i.selectorText)}catch(t){console.warn('Invalid CSS selector "'+i.selectorText+'"',t)}n?e+=i.selectorText+" { "+r.cssText+" }\n":i.cssText.match(/^@font-face/)&&(e+=i.cssText+"\n")})}),e)},e.doctype='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',e.xmlns="http://www.w3.org/2000/xmlns/",e}()}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(i){function o(n,r){var s=i.call(this,n,null,!0)||this;s._areas=[],s._keywords=new e._KeyWords,s._startAngle=0,s._innerRadius=0,s._offset=0,s._reversed=!1,s._isAnimated=!1,s._selectedItemPosition=e.Position.None,s._selectedItemOffset=0,s._rotationAngle=0,s._center=new t.Point,s._selectedOffset=new t.Point,s._selectedIndex=-1,s._angles=[],s._colRowLens=[],s._values=[],s._labels=[],s._pels=[],s._sum=0,s.applyTemplate("wj-control wj-flexchart wj-flexpie",null,null),s._currentRenderEngine=new e._SvgRenderEngine(s.hostElement),s._legend=new e.Legend(s),s._tooltip=new e.ChartTooltip,s._tooltip.content="<b>{name}</b><br/>{value}",s._tooltip.showDelay=0,s._lbl=new e.PieDataLabel,s._lbl._chart=s;var o=s;return s.hostElement.addEventListener("mousemove",function(e){var i=o._tooltip;if(i.content&&!o.isTouching){var n=o.hitTest(e);if(n.distance<=i.threshold){var r=o._getLabelContent(n,o.tooltip.content);o._showToolTip(r,new t.Rect(e.clientX,e.clientY,5,5))}else o._hideToolTip()}}),s.hostElement.addEventListener("click",function(i){var n=!0;if(o.selectionMode!=e.SelectionMode.None){var r=o.hitTest(i),s=e.FlexChart._SELECTION_THRESHOLD;o.tooltip&&o.tooltip.threshold&&(s=o.tooltip.threshold),r.distance<=s?(r.pointIndex!=o._selectionIndex&&o.selectedItemPosition!=e.Position.None&&(n=!1),r.pointIndex!=o._selectionIndex&&o._select(r.pointIndex,!0)):o._selectedIndex>=0&&o._select(null)}if(n&&o.isTouching){var a=o._tooltip;if(a.content)if((r=o.hitTest(i)).distance<=a.threshold){var h=o._getLabelContent(r,o.tooltip.content);o._showToolTip(h,new t.Rect(i.clientX,i.clientY,5,5))}else o._hideToolTip()}}),s.hostElement.addEventListener("mouseleave",function(t){o._hideToolTip()}),s.initialize(r),s.refresh(),s}return __extends(o,i),Object.defineProperty(o.prototype,"binding",{get:function(){return this._binding},set:function(e){e!=this._binding&&(this._binding=t.asString(e,!0),this._bindChart())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"bindingName",{get:function(){return this._bindingName},set:function(e){e!=this._bindingName&&(this._bindingName=t.asString(e,!0),this._bindChart())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"startAngle",{get:function(){return this._startAngle},set:function(e){e!=this._startAngle&&(this._startAngle=t.asNumber(e,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"offset",{get:function(){return this._offset},set:function(e){e!=this._offset&&(this._offset=t.asNumber(e,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"innerRadius",{get:function(){return this._innerRadius},set:function(e){e!=this._innerRadius&&(this._innerRadius=t.asNumber(e,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"reversed",{get:function(){return this._reversed},set:function(e){e!=this._reversed&&(this._reversed=t.asBoolean(e,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"selectedItemPosition",{get:function(){return this._selectedItemPosition},set:function(e){(e=t.asEnum(e,t.chart.Position,!0))!=this._selectedItemPosition&&(this._selectedItemPosition=e,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"selectedItemOffset",{get:function(){return this._selectedItemOffset},set:function(e){e!=this._selectedItemOffset&&(this._selectedItemOffset=t.asNumber(e,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isAnimated",{get:function(){return this._isAnimated},set:function(t){t!=this._isAnimated&&(this._isAnimated=t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"tooltip",{get:function(){return this._tooltip},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"dataLabel",{get:function(){return this._lbl},set:function(t){t!=this._lbl&&(this._lbl=t,this._lbl&&(this._lbl._chart=this))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){if(e!=this._selectedIndex){var i=t.asNumber(e,!0);this._select(i,!0)}},enumerable:!0,configurable:!0}),o.prototype._getLabelsForLegend=function(){return this._labels},o.prototype.hitTest=function(t,i){var n=this._toControl(t,i),r=new e.HitTestInfo(this,n),s=null;if(e.FlexChart._contains(this._rectHeader,n))r._chartElement=e.ChartElement.Header;else if(e.FlexChart._contains(this._rectFooter,n))r._chartElement=e.ChartElement.Footer;else if(e.FlexChart._contains(this._rectLegend,n))r._chartElement=e.ChartElement.Legend,null!==(s=this.legend._hitTest(n))&&s>=0&&s<this._areas.length&&r._setData(null,s);else if(e.FlexChart._contains(this._rectChart,n)){for(var o,a=this._areas.length,h=NaN,l=0;l<a;l++){var c=n.clone();if(0!=this._rotationAngle){var u=this._center.x,_=this._center.y,p=-u+c.x,d=-_+c.y,f=Math.sqrt(p*p+d*d),g=Math.atan2(d,p)-this._rotationAngle*Math.PI/180;c.x=u+f*Math.cos(g),c.y=_+f*Math.sin(g)}l==this._selectedIndex&&(c.x-=this._selectedOffset.x,c.y-=this._selectedOffset.y);var y=this._areas[l];if(y.contains(c)&&(r._setData(null,y.tag),r._dist=0,l!=this._selectedIndex))break;var m=y.distance(c);void 0!==m&&(isNaN(h)||m<h)&&(h=m,o=y)}0!==r._dist&&null!=o&&(r._setData(null,o.tag),r._dist=h),r._chartElement=e.ChartElement.ChartArea}else r._chartElement=e.ChartElement.None;return r},o.prototype._performBind=function(){if(this._initData(),this._cv){this._selectionIndex=this._cv.currentPosition;var t=this._cv.items;if(t)for(var e=t.length,i=0;i<e;i++){var n=t[i];this._sum+=Math.abs(this._getBindData(n,this._values,this._labels,this.binding,this.bindingName))}}},o.prototype._initData=function(){this._sum=0,this._values=[],this._labels=[]},o.prototype._getBindData=function(e,i,n,r,s){var o,a=0;r&&(o=e[r]);a=0;if(t.isNumber(o)?a=t.asNumber(o):o&&(a=parseFloat(o.toString())),!isNaN(a)&&isFinite(a)?i.push(a):(a=0,i.push(a)),s&&e){var h=e[s];h&&(h=h.toString()),n.push(h)}else n.push(a.toString());return a},o.prototype._render=function(t,e){void 0===e&&(e=!0),this._selectionAnimationID&&clearInterval(this._selectionAnimationID),i.prototype._render.call(this,t,e)},o.prototype._prepareRender=function(){this._areas=[]},o.prototype._renderChart=function(i,n,r){var s=this._rectChart.clone();new t.Size(s.width,s.height);this.onRendering(new e.RenderEventArgs(i));var a=n.width,h=n.height;this._pieGroup=i.startGroup("wj-slice-group",null,!0);var l=this._parseMargin(this.plotMargin),c=this.dataLabel,u=c.content&&c.position==e.PieLabelPosition.Outside,_=u?(t.isNumber(c.offset)?c.offset:0)+24:0;isNaN(l.left)&&(l.left=u?_:o._MARGIN),isNaN(l.right)&&(l.right=u?_:o._MARGIN),isNaN(l.top)&&(l.top=u?_:o._MARGIN),isNaN(l.bottom)&&(l.bottom=u?_:o._MARGIN),n.top+=l.top;h=n.height-(l.top+l.bottom);n.height=h>0?h:24,n.left+=l.left;a=n.width-(l.left+l.right);n.width=a>0?a:24,this._renderData(i,n,this._pieGroup),i.endGroup(),this._rotationAngle=0,this._highlightCurrent(),this.dataLabel.content&&this.dataLabel.position!=e.PieLabelPosition.None&&this._renderLabels(i),this.onRendered(new e.RenderEventArgs(i))},o.prototype._getDesiredLegendSize=function(e,i,n,r){var s=new t.Size,o=this,a=new t.Size(n,r),h=o._getLabelsForLegend(),l=h.length,c=0,u=0;this._colRowLens=[];for(var _=0;_<l;_++){var p=o._measureLegendItem(e,h[_]);i?(u+p.height>r&&(s.height=r,this._colRowLens.push(c),c=0,u=0),c<p.width&&(c=p.width),u+=p.height):(c+p.width>n&&(s.width=n,this._colRowLens.push(u),u=0,c=0),u<p.height&&(u=p.height),c+=p.width)}return i?(s.height<u&&(s.height=u),this._colRowLens.push(c),s.width=this._colRowLens.reduce(function(t,e){return t+e},0),s.width>a.width/2&&(s.width=a.width/2)):(s.width<c&&(s.width=c),this._colRowLens.push(u),s.height=this._colRowLens.reduce(function(t,e){return t+e},0),s.height>a.height/2&&(s.height=a.height/2)),s},o.prototype._renderLegend=function(e,i,n,r,s,o){for(var a=this,h=a._rectLegend,l=a._getLabelsForLegend(),c=l.length,u=0,_=i.clone(),p=0;p<c;p++){var d=a._measureLegendItem(e,l[p]);r?_.y+d.height>h.top+h.height+1&&(_.x+=this._colRowLens[u],u++,_.y=i.y):_.x+d.width>h.left+h.width+1&&(_.y+=this._colRowLens[u],u++,_.x=i.x);var f=new t.Rect(_.x,_.y,d.width,d.height);a._drawLegendItem(e,f,p,l[p]),n.push(f),r?_.y+=d.height:_.x+=d.width}},o.prototype._renderData=function(t,e,i){this._pels=[],this._angles=[];var n=this._sum,r=this.startAngle+180,s=this.innerRadius,o=this.offset;if(n>0){var a=r*Math.PI/180,h=e.left+.5*e.width,l=e.top+.5*e.height,c=Math.min(.5*e.width,.5*e.height);this._center.x=h,this._center.y=l;var u=Math.max(o,this.selectedItemOffset);u>0&&(o*=c/=1+u),this._radius=c;var _=s*c;this._renderPie(t,c,_,a,o),this._highlightCurrent()}},o.prototype._renderPie=function(t,e,i,n,r){this._renderSlices(t,this._values,this._sum,e,i,n,2*Math.PI,r)},o.prototype._getCenter=function(){return this._center},o.prototype._renderSlices=function(t,e,i,n,r,s,o,a){for(var h,l,c,u=e.length,_=s,p=1==this.reversed,d=this._center,f=1===u?360:359.9/360,g=0;g<u;g++){l=d.x,c=d.y,h=t.startGroup("wj-slice"),t.fill=this._getColorLight(g),t.stroke=this._getColor(g);var y=Math.abs(e[g]),m=Math.abs(y-i)<1e-10?o:o*y/i;m=Math.min(m,o*f);var b=p?_-.5*m:_+.5*m;a>0&&m<o&&(l+=a*Math.cos(b),c+=a*Math.sin(b)),this._renderSlice(t,l,c,b,g,n,r,_,m,o),p?_-=m:_+=m,t.endGroup(),this._pels.push(h)}},o.prototype._renderSlice=function(i,n,r,s,o,a,h,l,c,u){var _=this,p=!!this.reversed;if(this._angles.push(s),this.itemFormatter){var d=new e.HitTestInfo(this,new t.Point(n+a*Math.cos(s),r+a*Math.sin(s)),e.ChartElement.SeriesSymbol);d._setData(null,o),this.itemFormatter(i,d,function(){_._drawSlice(i,o,p,n,r,a,h,l,c)})}else this._drawSlice(i,o,p,n,r,a,h,l,c)},o.prototype._renderLabels=function(i){var r=this._areas.length,s=this.dataLabel,o=s.position,a="wj-data-label",h=this._rotationAngle,l=s.connectingLine,c=s.offset?s.offset:0;i.stroke="null",i.fill="transparent",i.strokeWidth=1,i.startGroup("wj-data-labels");for(var u=0;u<r;u++){var _=this._areas[u];if(_){var p=_.radius,d=_.langle+h,f=1,g=1;o==e.PieLabelPosition.Center||o===e.PieLabelPosition.Radial||o===e.PieLabelPosition.Circular?p*=.5*(1+(_.innerRadius||0)/_.radius):((d=n.clampAngle(d))<=-170||d>=170?(f=2,g=1):d>=-100&&d<=-80?(f=1,g=2):d>=-10&&d<=10?(f=0,g=1):d>=80&&d<=100?(f=1,g=0):-180<d&&d<-90?(f=2,g=2):-90<=d&&d<0?(f=0,g=2):0<d&&d<90?(f=0,g=0):90<d&&d<180&&(f=2,g=0),o==e.PieLabelPosition.Inside&&(f=2-f,g=2-g)),d*=Math.PI/180;var y=0,m=0,b=0;u==this._selectedIndex&&this.selectedItemOffset>0&&(b=this.selectedItemOffset),b>0&&(y=Math.cos(d)*b*this._radius,m=Math.sin(d)*b*this._radius);var v=p;o==e.PieLabelPosition.Outside?v+=c:o==e.PieLabelPosition.Inside&&(v-=c);var x=_.center.x,w=_.center.y,S=x-this._center.x,P=w-this._center.y;if(0!=this._rotationAngle){var C=Math.sqrt(S*S+P*P),T=Math.atan2(P,S)+this._rotationAngle*Math.PI/180;x=this._center.x+C*Math.cos(T),w=this._center.y+C*Math.sin(T)}var M=new t.Point(x+y+v*Math.cos(d),w+m+v*Math.sin(d));s.border&&o!=e.PieLabelPosition.Center&&(0==f?M.x+=2:2==f&&(M.x-=2),0==g?M.y+=2:2==g&&(M.y-=2));var A=new e.HitTestInfo(this,M);A._setData(null,u);var N=this._getLabelContent(A,s.content),L=new e.DataLabelRenderEventArgs(i,A,M,N);if(s.onRendering&&(s.onRendering(L)?(N=L.text,M=L.point):N=null),N){var I,E=180*Math.atan2(w-M.y,x-M.x)/Math.PI;if(E=(E+360)%360,o===e.PieLabelPosition.Radial||o===e.PieLabelPosition.Circular?(o===e.PieLabelPosition.Radial?E>90&&E<270&&(E+=180):(E>180&&E<360&&(E+=180),E-=90),(I=e.FlexChart._renderRotatedText(i,N,M,f,g,M,E,a).getBBox()).left=I.x,I.top=I.y):I=e.FlexChart._renderText(i,N,M,f,g,a),s.border&&i.drawRect(I.left-2,I.top-2,I.width+4,I.height+4,"wj-data-label-border"),l){var k=new t.Point(_.center.x+y+p*Math.cos(d),_.center.y+m+p*Math.sin(d));i.drawLine(M.x,M.y,k.x,k.y,"wj-data-label-line")}}}}i.endGroup()},o.prototype._drawSlice=function(e,i,n,o,a,h,l,c,u){var _;n?l>0?(0!=u&&e.drawDonutSegment(o,a,h,l,c-u,u),(_=new s(new t.Point(o,a),h,l,c-u,u,this.startAngle)).tag=i,this._areas.push(_)):(0!=u&&e.drawPieSegment(o,a,h,c-u,u),(_=new r(new t.Point(o,a),h,c-u,u,this.startAngle)).tag=i,this._areas.push(_)):(l>0?(0!=u&&e.drawDonutSegment(o,a,h,l,c,u),(_=new s(new t.Point(o,a),h,l,c,u,this.startAngle)).tag=i,this._areas.push(_)):(0!=u&&e.drawPieSegment(o,a,h,c,u),(_=new r(new t.Point(o,a),h,c,u,this.startAngle)).tag=i,this._areas.push(_)),c+=u)},o.prototype._measureLegendItem=function(i,n){var r=new t.Size;if(r.width=e.Series._LEGEND_ITEM_WIDTH,r.height=e.Series._LEGEND_ITEM_HEIGHT,n){var s=i.measureString(n,e.FlexChart._CSS_LABEL,e.FlexChart._CSS_LEGEND);r.width+=s.width,r.height<s.height&&(r.height=s.height)}return r.width+=3*e.Series._LEGEND_ITEM_MARGIN,r.height+=2*e.Series._LEGEND_ITEM_MARGIN,r},o.prototype._drawLegendItem=function(i,n,r,s){i.strokeWidth=1;var o=e.Series._LEGEND_ITEM_MARGIN,a=null,h=null;null===a&&(a=this._getColorLight(r)),null===h&&(h=this._getColor(r)),i.fill=a,i.stroke=h;var l=n.top+.5*n.height,c=e.Series._LEGEND_ITEM_WIDTH,u=e.Series._LEGEND_ITEM_HEIGHT;i.drawRect(n.left+o,l-.5*u,c,u,null),null!=s&&e.FlexChart._renderText(i,s.toString(),new t.Point(n.left+u+2*o,l),0,1,e.FlexChart._CSS_LABEL)},o.prototype._getLabelContent=function(e,i){return t.isString(i)?this._keywords.replace(i,e):t.isFunction(i)?i(e):null},o.prototype._select=function(t,i){if(void 0===i&&(i=!1),this._highlight(!1,this._selectionIndex),this._selectionIndex=t,this.selectionMode==e.SelectionMode.Point){var n=this._cv;n&&(this._notifyCurrentChanged=!1,n.moveCurrentToPosition(t),this._notifyCurrentChanged=!0)}!this.isAnimated&&(this.selectedItemOffset>0||this.selectedItemPosition!=e.Position.None)?(this._selectedIndex=null==t?-1:t,this.invalidate()):this._highlight(!0,this._selectionIndex,i),this.onSelectionChanged()},o.prototype._highlightCurrent=function(){if(this.selectionMode!=e.SelectionMode.None){var t=-1,i=this._cv;i&&(t=i.currentPosition),this._highlight(!0,t)}},o.prototype._highlight=function(t,i,n){if(void 0===n&&(n=!1),this.selectionMode==e.SelectionMode.Point&&void 0!==i&&null!==i&&i>=0){var r=this._pels[i];if(t){if(r){r.parentNode.appendChild(r);var s=this._find(r,["ellipse"]);this._highlightItems(this._find(r,["path","ellipse"]),e.FlexChart._CSS_SELECTION,t)}var o=this._angles[i];if(this.selectedItemPosition!=e.Position.None&&0!=o){var a=0;this.selectedItemPosition==e.Position.Left?a=180:this.selectedItemPosition==e.Position.Top?a=-90:this.selectedItemPosition==e.Position.Bottom&&(a=90);var h=a*Math.PI/180-o;h*=180/Math.PI,n&&this.isAnimated?this._animateSelectionAngle(h,.5):(this._rotationAngle=h,this._pieGroup.transform.baseVal.getItem(0).setRotate(h,this._center.x,this._center.y))}var l=this.selectedItemOffset;if(l>0&&s&&0==s.length){var c=this._selectedOffset.x=Math.cos(o)*l*this._radius,u=this._selectedOffset.y=Math.sin(o)*l*this._radius;r&&r.setAttribute("transform","translate("+c.toFixed()+","+u.toFixed()+")")}this._selectedIndex=i}else r&&(r.parentNode.insertBefore(r,r.parentNode.childNodes.item(i)),r.removeAttribute("transform"),this._highlightItems(this._find(r,["path","ellipse"]),e.FlexChart._CSS_SELECTION,t)),this._selectedIndex==i&&(this._selectedIndex=-1)}},o.prototype._animateSelectionAngle=function(i,r){var s=n.clampAngle(this._rotationAngle),o=(i=n.clampAngle(i))-s,a=this,h=s,l=a._pieGroup;a._selectionAnimationID&&clearInterval(this._selectionAnimationID),this._selectionAnimationID=t.animate(function(t){l==a._pieGroup&&(a._rotationAngle=s=h+o*t,a._pieGroup.transform.baseVal.getItem(0).setRotate(s,a._center.x,a._center.y),1==t&&clearInterval(a._selectionAnimationID),t>.99&&(a.selectedItemOffset>0||a.selectedItemPosition!=e.Position.None)&&a.invalidate())},1e3*r)},o.prototype._getHitTestItem=function(t){var e=null,i=null;return(e=null!=this._cv?this._cv.items:this.itemsSource)&&t<e.length&&(i=e[t]),i},o.prototype._getHitTestValue=function(t){return this._values[t]},o.prototype._getHitTestLabel=function(t){return this._labels[t]},o._MARGIN=4,o}(e.FlexChartBase);e.FlexPie=i;var n=function(){function t(){}return t.clampAngle=function(t,e){void 0===e&&(e=0);var i=(t+180)%360-180;return i<-180+(e<0?e+360:e)&&(i+=360),i},t}(),r=function(){function t(t,e,i,r,s){void 0===s&&(s=0),this._isFull=!1,this._center=t,this._radius=e,this._originAngle=i,this._originSweep=r,r>=2*Math.PI&&(this._isFull=!0),this._sweep=.5*r*180/Math.PI,this._angle=n.clampAngle(180*i/Math.PI+this._sweep),this._radius2=e*e,this._startAngle=s}return t.prototype.contains=function(t){var e=t.x-this._center.x,i=t.y-this._center.y;if(e*e+i*i<=this._radius2){var r=180*Math.atan2(i,e)/Math.PI,s=n.clampAngle(this._angle,this._startAngle)-n.clampAngle(r,this._startAngle);if(this._isFull||Math.abs(s)<=this._sweep)return!0}return!1},t.prototype.distance=function(t){if(this.contains(t))return 0;var e=t.x-this._center.x,i=t.y-this._center.y,r=e*e+i*i,s=180*Math.atan2(i,e)/Math.PI,o=n.clampAngle(this._angle,this._startAngle)-n.clampAngle(s,this._startAngle);return this._isFull||Math.abs(o)<=this._sweep?Math.sqrt(r)-this._radius:void 0},Object.defineProperty(t.prototype,"center",{get:function(){return this._center},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this._radius},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"langle",{get:function(){return this._angle},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"angle",{get:function(){return this._originAngle},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sweep",{get:function(){return this._originSweep},enumerable:!0,configurable:!0}),t}();e._PieSegment=r;var s=function(){function t(t,e,i,r,s,o){void 0===o&&(o=0),this._isFull=!1,this._center=t,this._radius=e,this._iradius=i,this._originAngle=r,this._originSweep=s,s>=2*Math.PI&&(this._isFull=!0),this._sweep=.5*s*180/Math.PI,this._angle=n.clampAngle(180*r/Math.PI+this._sweep),this._radius2=e*e,this._iradius2=i*i,this._startAngle=o}return t.prototype.contains=function(t){var e=t.x-this._center.x,i=t.y-this._center.y,r=e*e+i*i;if(r>=this._iradius2&&r<=this._radius2){var s=180*Math.atan2(i,e)/Math.PI,o=n.clampAngle(this._angle,this._startAngle)-n.clampAngle(s,this._startAngle);if(this._isFull||Math.abs(o)<=this._sweep)return!0}return!1},t.prototype.distance=function(t){if(this.contains(t))return 0},Object.defineProperty(t.prototype,"center",{get:function(){return this._center},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this._radius},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"langle",{get:function(){return this._angle},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"angle",{get:function(){return this._originAngle},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sweep",{get:function(){return this._originSweep},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"innerRadius",{get:function(){return this._iradius},enumerable:!0,configurable:!0}),t}();e._DonutSegment=s}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i;!function(t){t[t.None=0]="None",t[t.Stacked=1]="Stacked",t[t.Stacked100pc=2]="Stacked100pc"}(i=e.Stacking||(e.Stacking={}));var n;!function(t){t[t.None=0]="None",t[t.Series=1]="Series",t[t.Point=2]="Point"}(n=e.SelectionMode||(e.SelectionMode={}));var r=function(r){function h(s,h){var l=r.call(this,s,null,!0)||this;l._series=new t.collections.ObservableArray,l._axes=new e.AxisCollection,l._pareas=new e.PlotAreaCollection,l._interpolateNulls=!1,l._legendToggle=!1,l._symbolSize=10,l._dataInfo=new o,l.__barPlotter=null,l.__linePlotter=null,l.__areaPlotter=null,l.__bubblePlotter=null,l.__financePlotter=null,l.__funnelPlotter=null,l._plotters=[],l._rotated=!1,l._stacking=i.None,l._xlabels=[],l._xvals=[],l._lblAreas=[],l._colRowLens=[],l._bindingSeparator=",",l.seriesVisibilityChanged=new t.Event,l.applyTemplate("wj-control wj-flexchart",null,null);var c=l;return c._series.collectionChanged.addHandler(function(){for(var e=c._series,i=0;i<e.length;i++){var n=t.tryCast(e[i],t.chart.SeriesBase);if(!n)throw"chartSeries array must contain SeriesBase objects.";n._chart=c,n.axisX&&(n.axisX._chart=c),n.axisY&&(n.axisY._chart=c)}c.invalidate()}),l._currentRenderEngine=new e._SvgRenderEngine(l.hostElement),l._hitTester=new e._HitTester(l),l._legend=new e.Legend(l),l._tooltip=new a,l._tooltip.showDelay=0,l._lbl=new e.DataLabel,l._lbl._chart=l,l._initAxes(),c._axes.collectionChanged.addHandler(function(){for(var e=c._axes,i=0;i<e.length;i++){var n=t.tryCast(e[i],t.chart.Axis);if(!n)throw"axes array must contain Axis objects.";n._chart=c}c.invalidate()}),c._pareas.collectionChanged.addHandler(function(){for(var e=c._pareas,i=0;i<e.length;i++){var n=t.tryCast(e[i],t.chart.PlotArea);if(!n)throw"plotAreas array must contain PlotArea objects.";n._chart=c}c.invalidate()}),l._keywords=new e._KeyWords,l.hostElement.addEventListener("click",function(e){var i=c._tooltip;if(i.content&&c.isTouching){var n=c.hitTest(e);if(n.distance<=i.threshold){var r=c._getLabelContent(n,c._tooltip.content);c._showToolTip(r,new t.Rect(e.clientX,e.clientY,5,5))}else c._hideToolTip()}}),l.hostElement.addEventListener("mousemove",function(e){var i=c._tooltip;if(i.content&&!c.isTouching){var n=c.hitTest(e);if(n.distance<=i.threshold){var r=c._getLabelContent(n,c._tooltip.content);c._showToolTip(r,new t.Rect(e.clientX,e.clientY,5,5))}else c._hideToolTip()}}),l.hostElement.addEventListener("mouseleave",function(t){c._hideToolTip()}),l.hostElement.addEventListener("click",function(t){if(c.selectionMode!=n.None){var i=c._hitTestData(t),r=e.FlexChart._SELECTION_THRESHOLD;c.tooltip&&c.tooltip.threshold&&(r=c.tooltip.threshold),i.distance<=r&&i.series?c._select(i.series,i.pointIndex):c.selectionMode==n.Series&&(i=c.hitTest(t)).chartElement==e.ChartElement.Legend&&i.series?c._select(i.series,null):c._select(null,null)}!0===c.legendToggle&&(i=c.hitTest(t)).chartElement==e.ChartElement.Legend&&i.series&&(i.series.visibility==e.SeriesVisibility.Legend?i.series.visibility=e.SeriesVisibility.Visible:i.series.visibility==e.SeriesVisibility.Visible&&(i.series.visibility=e.SeriesVisibility.Legend),c.focus())}),l.initialize(h),l}return __extends(h,r),h.prototype._initAxes=function(){this._axisX=new e.Axis(e.Position.Bottom),this._axisY=new e.Axis(e.Position.Left),this._axisX.majorGrid=!1,this._axisX.name="axisX",this._axisY.majorGrid=!0,this._axisY.majorTickMarks=e.TickMark.None,this._axisY.name="axisY",this._axisX._chart=this,this._axisY._chart=this,this._axes.push(this._axisX),this._axes.push(this._axisY)},Object.defineProperty(h.prototype,"series",{get:function(){return this._series},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"axes",{get:function(){return this._axes},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"axisX",{get:function(){return this._axisX},set:function(i){if(i!=this._axisX){var n=this._axisX=t.asType(i,e.Axis);this.beginUpdate(),n&&(void 0===n.majorGrid&&(n.majorGrid=!1),void 0===n.name&&(n.name="axisX"),void 0==n.position&&(n.position=e.Position.Bottom),n._axisType=e.AxisType.X,n._chart=this),this.endUpdate()}},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"axisY",{get:function(){return this._axisY},set:function(i){if(i!=this._axisY){var n=this._axisY=t.asType(i,e.Axis);this.beginUpdate(),n&&(void 0===n.majorGrid&&(n.majorGrid=!0),void 0===n.name&&(n.name="axisY"),n.majorTickMarks=e.TickMark.None,void 0==n.position&&(n.position=e.Position.Left),n._axisType=e.AxisType.Y,n._chart=this),this.endUpdate()}},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"plotAreas",{get:function(){return this._pareas},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"binding",{get:function(){return this._binding},set:function(e){e!=this._binding&&(this._binding=t.asString(e,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"bindingX",{get:function(){return this._bindingX},set:function(e){e!=this._bindingX&&(this._bindingX=t.asString(e,!0),this._bindChart())},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"symbolSize",{get:function(){return this._symbolSize},set:function(e){e!=this._symbolSize&&(this._symbolSize=t.asNumber(e,!1,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"interpolateNulls",{get:function(){return this._interpolateNulls},set:function(e){e!=this._interpolateNulls&&(this._interpolateNulls=t.asBoolean(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"legendToggle",{get:function(){return this._legendToggle},set:function(e){e!=this._legendToggle&&(this._legendToggle=t.asBoolean(e))},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"tooltip",{get:function(){return this._tooltip},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"dataLabel",{get:function(){return this._lbl},set:function(i){i!=this._lbl&&(this._lbl=t.asType(i,e.DataLabel),this._lbl&&(this._lbl._chart=this))},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"selection",{get:function(){return this._selection},set:function(i){i!=this._selection&&(this._selection=t.asType(i,e.SeriesBase,!0),this.invalidate())},enumerable:!0,configurable:!0}),h.prototype.onSeriesVisibilityChanged=function(t){this.seriesVisibilityChanged.raise(this,t)},h.prototype.hitTest=function(t,i){var n=this._toControl(t,i),r=new e.HitTestInfo(this,n),s=null;if(e.FlexChart._contains(this._rectHeader,n))r._chartElement=e.ChartElement.Header;else if(e.FlexChart._contains(this._rectFooter,n))r._chartElement=e.ChartElement.Footer;else if(e.FlexChart._contains(this._rectLegend,n))r._chartElement=e.ChartElement.Legend,null!==(s=this.legend._hitTest(n))&&s>=0&&s<this.series.length&&(this._getChartType()===e.ChartType.Bar?r._setData(this.series[this.series.length-1-s]):r._setData(this.series[s]));else if(e.FlexChart._contains(this._rectChart,n)){var o=this._hitTestLabels(n);if(o)r._chartElement=e.ChartElement.DataLabel,r._dist=0,r._setDataPoint(o.tag);else{for(var a=this._hitTester.hitTest(n),h=null,l=null,c=this.series.length-1;c>=0;c--)if(this.series[c].hitTest!==e.Series.prototype.hitTest){var u=this.series[c].hitTest(t);if(u&&((!h||u.distance<h.distance)&&(h=u,l=c),0===u.distance))break}a&&a.area?h&&h.distance<a.distance?r=h:h&&h.distance==a.distance&&l>a.area.tag.seriesIndex?r=h:(r._setDataPoint(a.area.tag),r._dist=a.distance):h&&(r=h),e.FlexChart._contains(this.axisX._axrect,n)?r._chartElement=e.ChartElement.AxisX:e.FlexChart._contains(this.axisY._axrect,n)?r._chartElement=e.ChartElement.AxisY:e.FlexChart._contains(this._plotRect,n)?r._chartElement=e.ChartElement.PlotArea:e.FlexChart._contains(this._rectChart,n)&&(r._chartElement=e.ChartElement.ChartArea)}}else r._chartElement=e.ChartElement.None;return r},h.prototype.pointToData=function(e,i){return t.isNumber(e)&&t.isNumber(i)&&(e=new t.Point(e,i)),e instanceof MouseEvent?(e=new t.Point(e.pageX,e.pageY),e=this._toControl(e)):e=e.clone(),e.x=this.axisX.convertBack(e.x),e.y=this.axisY.convertBack(e.y),e},h.prototype.dataToPoint=function(e,i){t.isNumber(e)&&t.isNumber(i)&&(e=new t.Point(e,i)),t.asType(e,t.Point);var n=e.clone();return n.x=this.axisX.convert(n.x),n.y=this.axisY.convert(n.y),n},h.prototype._copy=function(e,i){if("series"==e){this.series.clear();for(var n=t.asArray(i),r=0;r<n.length;r++){var s=this._createSeries();t.copy(s,n[r]),this.series.push(s)}return!0}return!1},h.prototype._createSeries=function(){return new e.Series},h.prototype._clearCachedValues=function(){for(var t=0;t<this._series.length;t++){var e=this._series[t];null==e.itemsSource&&e._clearValues()}},h.prototype._performBind=function(){if(this._xDataType=null,this._xlabels.splice(0),this._xvals.splice(0),this._cv){var e=this._cv.items;if(e){for(var i=e.length,n=0;n<i;n++){var r=e[n];if(this._bindingX){var s=r[this._bindingX];t.isNumber(s)?(this._xvals.push(t.asNumber(s)),this._xDataType=t.DataType.Number):t.isDate(s)&&(this._xvals.push(t.asDate(s).valueOf()),this._xDataType=t.DataType.Date),this._xlabels.push(r[this._bindingX])}}this._xvals.length==i?this._xlabels.splice(0):this._xvals.splice(0)}}},h.prototype._hitTestSeries=function(t,i){var n=this._toControl(t),r=new e.HitTestInfo(this,n),s=this._hitTester.hitTestSeries(n,i);return s&&s.area&&(r._setDataPoint(s.area.tag),r._chartElement=e.ChartElement.PlotArea,r._dist=s.distance),r},h.prototype._hitTestData=function(t){var i=this._toControl(t),n=new e.HitTestInfo(this,i),r=this._hitTester.hitTest(i,!0);return r&&r.area&&(n._setDataPoint(r.area.tag),n._dist=r.distance),n},h.prototype._hitTestLabels=function(t){for(var e=null,i=this._lblAreas.length,n=0;n<i;n++)if(this._lblAreas[n].contains(t)){e=this._lblAreas[n];break}return e},h._dist2=function(t,e){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n},h._dist=function(t,i,n){return Math.sqrt(e.FlexChart._distToSegmentSquared(t,i,n))},h._distToSegmentSquared=function(i,n,r){var s=e.FlexChart._dist2(n,r);if(0==s)return e.FlexChart._dist2(i,n);var o=((i.x-n.x)*(r.x-n.x)+(i.y-n.y)*(r.y-n.y))/s;return o<0?e.FlexChart._dist2(i,n):o>1?e.FlexChart._dist2(i,r):e.FlexChart._dist2(i,new t.Point(n.x+o*(r.x-n.x),n.y+o*(r.y-n.y)))},h.prototype._isRotated=function(){return this._getChartType()==e.ChartType.Bar?!this._rotated:this._rotated},h.prototype._getChartType=function(){return null},h.prototype._prepareRender=function(){this._hitTester.clear()},h.prototype._renderChart=function(i,n,r){var s=this._rectChart.clone(),o=new t.Size(s.width,s.height);n.width,n.height;(m=this._getPlotter(null)).stacking=this._stacking,this._curPlotter!=m&&(this._curPlotter&&this._curPlotter.unload(),this._curPlotter=m),m.load();var a=this._isRotated();this._dataInfo.analyse(this._series,a,m.stacking,this._xvals.length>0?this._xvals:null,this.axisX.logBase>0,this.axisY.logBase>0);var h=m.adjustLimits(this._dataInfo,n.clone());if(a){var l=this._dataInfo.getDataTypeX();l||(l=this._xDataType),this.axisX._updateActualLimits(this._dataInfo.getDataTypeY(),h.left,h.right),this.axisY._updateActualLimits(l,h.top,h.bottom,this._xlabels,this._xvals)}else{var c=this._dataInfo.getDataTypeX();c||(c=this._xDataType),this.axisX._updateActualLimits(c,h.left,h.right,this._xlabels,this._xvals),this.axisY._updateActualLimits(this._dataInfo.getDataTypeY(),h.top,h.bottom)}var u=this._getAxes();if(this._updateAuxAxes(u,a),this._layout(n,o,i),i.startGroup(e.FlexChart._CSS_PLOT_AREA),i.fill="transparent",i.stroke=null,this.plotAreas.length>0)for(f=0;f<this.plotAreas.length;f++)this.plotAreas[f]._render(i);else{var _=this._plotRect;i.drawRect(_.left,_.top,_.width,_.height)}i.endGroup();var p=this._series.length;this._clearPlotters();for(var d={},f=0;f<p;f++){var g=this._series[f];if(((S=g.visibility)==e.SeriesVisibility.Visible||S==e.SeriesVisibility.Plot)&&g.getValues(0)){var y=g._getAxisY(),m=this._getPlotter(g);if(!y||y==this.axisY||m instanceof e._BarPlotter)m.seriesCount++;else{var b=y._uniqueId;d[b]?d[b].count+=1:d[b]={count:1,index:0}}}}if(this.onRendering(new e.RenderEventArgs(i)),this._getChartType()!==e.ChartType.Funnel)for(f=0;f<u.length;f++){var v=u[f];w=v.axisType==e.AxisType.X?i.startGroup(e.FlexChart._CSS_AXIS_X,this._chartRectId):i.startGroup(e.FlexChart._CSS_AXIS_Y,this._chartRectId),v._hostElement=r?w:v._hostElement,v._render(i),i.endGroup()}i.startGroup("wj-series-group"),this._plotrectId="plotRect"+(1e6*Math.random()).toFixed(),i.addClipRect(this._plotRect,this._plotrectId);for(f=0;f<p;f++){var x=this._series[f];x._pointIndexes=[];m=this._getPlotter(x);x._plotter=m;var w=i.startGroup(x.cssClass,m.clipping?this._plotrectId:null);x._hostElement=r?w:x._hostElement;var S=x.visibility,P=x.axisX,C=x.axisY;if(P||(P=this.axisX),C||(C=this.axisY),S==e.SeriesVisibility.Visible||S==e.SeriesVisibility.Plot){var T,M,A=d[C._uniqueId];A?(T=A.index,M=A.count,A.index++,x.onRendering(i,T,M)||m.plotSeries(i,P,C,x,this,T,M)):(T=m.seriesIndex,M=m.seriesCount,m.seriesIndex++,x.onRendering(i,T,M)||m.plotSeries(i,P,C,x,this,T,M)),x.onRendered(i)}i.endGroup()}i.endGroup(),this._lblAreas=[],this.dataLabel.content&&this.dataLabel.position!=e.LabelPosition.None&&this._renderLabels(i),this._highlightCurrent(),this.onRendered(new e.RenderEventArgs(i))},h.prototype._getDesiredLegendSize=function(i,n,r,s){var o=new t.Size,a=this.series,h=a.length,l=0,c=0;this._colRowLens=[];for(var u=0;u<h;u++){var _=t.tryCast(a[u],t.chart.SeriesBase),p=_.visibility;if(_.name&&p!=e.SeriesVisibility.Hidden&&p!=e.SeriesVisibility.Plot)for(var d=_.legendItemLength(),f=0;f<d;f++){var g=_.measureLegendItem(i,f);n?(l+g.height>s&&(o.height=s,this._colRowLens.push(c),c=0,l=0),c<g.width&&(c=g.width),l+=g.height):(c+g.width>r&&(o.width=r,this._colRowLens.push(l),l=0,c=0),l<g.height&&(l=g.height),c+=g.width)}}return n?(o.height<l&&(o.height=l),this._colRowLens.push(c),o.width=this._colRowLens.reduce(function(t,e){return t+e},0),o.width>r/2&&(o.width=r/2)):(o.width<c&&(o.width=c),this._colRowLens.push(l),o.height=this._colRowLens.reduce(function(t,e){return t+e},0),o.height>s/2&&(o.height=s/2)),o},h.prototype._renderLegend=function(i,n,r,s,o,a){var h,l=this.series,c=l.length,u=n.clone(),_=0;if(this._getChartType()===e.ChartType.Bar)for(p=c-1;p>=0;p--)h=t.tryCast(l[p],t.chart.SeriesBase),_=this._renderLegendElements(i,h,n,u,r,s,o,a,_);else for(var p=0;p<c;p++)h=t.tryCast(l[p],t.chart.SeriesBase),_=this._renderLegendElements(i,h,n,u,r,s,o,a,_)},h.prototype._renderLegendElements=function(i,n,r,s,o,a,h,l,c){var u=this._rectLegend,_=c;if(!n)return _;var p=n.visibility;if(!n.name||p==e.SeriesVisibility.Hidden||p==e.SeriesVisibility.Plot)return n._legendElement=null,o.push(null),_;var d=n.legendItemLength(),f=i.startGroup(n.cssClass);p==e.SeriesVisibility.Legend?(f.setAttribute("opacity","0.5"),n._legendElement=f):p==e.SeriesVisibility.Visible?n._legendElement=f:n._legendElement=null;for(var g=0;g<d;g++){var y=n.measureLegendItem(i,g);a?s.y+y.height>u.top+u.height+1&&(s.x+=this._colRowLens[_],_++,s.y=r.y):s.x+y.width>u.left+u.width+1&&(s.y+=this._colRowLens[_],_++,s.x=r.x);var m=new t.Rect(s.x,s.y,y.width,y.height);p!=e.SeriesVisibility.Legend&&p!=e.SeriesVisibility.Visible||n.drawLegendItem(i,m,g),o.push(m),a?s.y+=y.height:s.x+=y.width}return i.endGroup(),_},h.prototype._renderLabels=function(t){var e=this.series,i=e.length;t.stroke="null",t.fill="transparent",t.strokeWidth=1;var n=h._CSS_DATA_LABELS;t.startGroup(n);for(var r=0;r<i;r++){var s=e[r],o=this._hitTester._map[r];o&&s._renderLabels(t,o,this,this._lblAreas)}t.endGroup()},h.prototype._getAxes=function(){for(var t=[this.axisX,this.axisY],e=this.series.length,i=0;i<e;i++){var n=this.series[i],r=n.axisX;r&&-1===t.indexOf(r)&&t.push(r);var s=n.axisY;s&&-1===t.indexOf(s)&&t.push(s)}return t},h.prototype._clearPlotters=function(){for(var t=this._plotters.length,e=0;e<t;e++)this._plotters[e].clear()},h.prototype._initPlotter=function(t){t.chart=this,t.dataInfo=this._dataInfo,t.hitTester=this._hitTester,this._plotters.push(t)},Object.defineProperty(h.prototype,"_barPlotter",{get:function(){return null===this.__barPlotter&&(this.__barPlotter=new e._BarPlotter,this._initPlotter(this.__barPlotter)),this.__barPlotter},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_linePlotter",{get:function(){return null===this.__linePlotter&&(this.__linePlotter=new e._LinePlotter,this._initPlotter(this.__linePlotter)),this.__linePlotter},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_areaPlotter",{get:function(){return null===this.__areaPlotter&&(this.__areaPlotter=new e._AreaPlotter,this._initPlotter(this.__areaPlotter)),this.__areaPlotter},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_bubblePlotter",{get:function(){return null===this.__bubblePlotter&&(this.__bubblePlotter=new e._BubblePlotter,this._initPlotter(this.__bubblePlotter)),this.__bubblePlotter},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_financePlotter",{get:function(){return null===this.__financePlotter&&(this.__financePlotter=new e._FinancePlotter,this._initPlotter(this.__financePlotter)),this.__financePlotter},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_funnelPlotter",{get:function(){return null===this.__funnelPlotter&&(this.__funnelPlotter=new e._FunnelPlotter,this._initPlotter(this.__funnelPlotter)),this.__funnelPlotter},enumerable:!0,configurable:!0}),h.prototype._getPlotter=function(t){var i=this._getChartType(),n=!1;if(t){var r=t._getChartType();null!==r&&void 0!==r&&r!=i&&(i=r,n=!0)}var s;switch(i){case e.ChartType.Column:this._barPlotter.isVolume=!1,this._barPlotter.width=.7,s=this._barPlotter;break;case e.ChartType.Bar:this._barPlotter.rotated=!this._rotated,this._barPlotter.isVolume=!1,this._barPlotter.width=.7,s=this._barPlotter;break;case e.ChartType.Line:this._linePlotter.hasSymbols=!1,this._linePlotter.hasLines=!0,this._linePlotter.isSpline=!1,s=this._linePlotter;break;case e.ChartType.Scatter:this._linePlotter.hasSymbols=!0,this._linePlotter.hasLines=!1,this._linePlotter.isSpline=!1,s=this._linePlotter;break;case e.ChartType.LineSymbols:this._linePlotter.hasSymbols=!0,this._linePlotter.hasLines=!0,this._linePlotter.isSpline=!1,s=this._linePlotter;break;case e.ChartType.Area:this._areaPlotter.isSpline=!1,s=this._areaPlotter;break;case e.ChartType.Bubble:s=this._bubblePlotter;break;case e.ChartType.Candlestick:(o=this._financePlotter).isCandle=!0,o.isEqui=!1,o.isArms=!1,o.isVolume=!1,s=o;break;case e.ChartType.HighLowOpenClose:var o=this._financePlotter;o.isCandle=!1,o.isEqui=!1,o.isArms=!1,o.isVolume=!1,s=o;break;case e.ChartType.Spline:this._linePlotter.hasSymbols=!1,this._linePlotter.hasLines=!0,this._linePlotter.isSpline=!0,s=this._linePlotter;break;case e.ChartType.SplineSymbols:this._linePlotter.hasSymbols=!0,this._linePlotter.hasLines=!0,this._linePlotter.isSpline=!0,s=this._linePlotter;break;case e.ChartType.SplineArea:this._areaPlotter.isSpline=!0,s=this._areaPlotter;break;case e.ChartType.Funnel:s=this._funnelPlotter;break;default:throw"Invalid chart type."}return s.rotated=this._rotated,i==e.ChartType.Bar&&(s.rotated=!s.rotated),n&&(s.rotated=this._isRotated()),s},h.prototype._layout=function(t,e,i){this.plotAreas.length>0?this._layoutMultiple(t,e,i):this._layoutSingle(t,e,i)},h.prototype._layoutSingle=function(i,n,r){for(var s=i.width,o=i.height,a=new t.Size(s,.75*o),h=new t.Size(o,.75*s),l=0,c=0,u=s,_=o,p=0,d=0,f=s,g=o,y=this._getAxes(),m=0;m<y.length;m++){var b=(C=y[m]).origin,v=C._getPosition();if(C.axisType==e.AxisType.X){(S=C._getHeight(r,s))>a.height&&(S=a.height),C._desiredSize=new t.Size(a.width,S);var x=C._hasOrigin=t.isNumber(b)&&b>this.axisY._getMinNum()&&b<this.axisY._getMaxNum(),w=Math.min(.25*s,C._annoSize.width);if(v==e.Position.Bottom)if(l=Math.max(l,.5*w),u=Math.min(u,s-.5*w),x){M=this._convertY(b,d,g);g-=Math.max(0,M+S-g)}else g-=S;else if(v==e.Position.Top)if(l=Math.max(l,.5*w),u=Math.min(u,s-.5*w),x){M=this._convertY(b,d,g);d+=Math.max(0,d-(M-S))}else d+=S}else if(C.axisType==e.AxisType.Y){var S=C._getHeight(r,o);S>h.height&&(S=h.height),C._desiredSize=new t.Size(h.width,S);x=C._hasOrigin=t.isNumber(b)&&b>this.axisX._getMinNum()&&b<this.axisX._getMaxNum();if(v==e.Position.Left)if(C._actualAngle<0?_=Math.min(_,o-C._annoSize.height):C._actualAngle>0?c=Math.max(c,C._annoSize.height):(c=Math.max(c,C._annoSize.height),_=Math.min(_,o-C._annoSize.height)),x){N=this._convertX(b,p,f);p+=Math.max(0,p-(N-S))}else p+=S;else if(v==e.Position.Right)if(C._actualAngle>0?_=Math.min(_,o-C._annoSize.height):C._actualAngle<0?c=Math.max(c,C._annoSize.height):(c=Math.max(c,C._annoSize.height),_=Math.min(_,o-C._annoSize.height)),x){N=this._convertX(b,p,f);f-=Math.max(0,N+S-f)}else f-=S}}var P=this._parseMargin(this.plotMargin);l=p=isNaN(P.left)?Math.max(l,p)+i.left:P.left,u=f=isNaN(P.right)?Math.min(u,f)+i.left:n.width-P.right,c=d=isNaN(P.top)?Math.max(c,d)+i.top:P.top,_=g=isNaN(P.bottom)?Math.min(_,g)+i.top:n.height-P.bottom,s=Math.max(1,u-l),o=Math.max(1,_-c),this._plotRect=new t.Rect(l,c,s,o),r.stroke=null;for(m=0;m<y.length;m++){var C=y[m],b=C.origin,v=C._getPosition();if(C.axisType==e.AxisType.X){var T;if(C._hasOrigin){var M=this._convertY(b,this._plotRect.top,this._plotRect.bottom);v==e.Position.Bottom?(T=new t.Rect(l,M,s,C._desiredSize.height),g+=Math.max(0,T.bottom-this._plotRect.bottom)):v==e.Position.Top?(T=new t.Rect(l,M-C._desiredSize.height,s,C._desiredSize.height),d-=Math.max(0,this._plotRect.top-T.top)):T=new t.Rect(l,M,s,1)}else v==e.Position.Bottom?(T=new t.Rect(l,g,s,C._desiredSize.height),g+=C._desiredSize.height):v==e.Position.Top?(T=new t.Rect(l,d-C._desiredSize.height,s,C._desiredSize.height),d-=C._desiredSize.height):T=new t.Rect(l,d,s,1);C._layout(T,this._plotRect)}else if(C.axisType==e.AxisType.Y){var A;if(C._hasOrigin){var N=this._convertX(b,this._plotRect.left,this._plotRect.right);v==e.Position.Left?(A=new t.Rect(N-C._desiredSize.height,c,o,C._desiredSize.height),p-=C._desiredSize.height):v==e.Position.Right?(A=new t.Rect(N,c,o,C._desiredSize.height),f+=C._desiredSize.height):A=new t.Rect(N,c,o,1)}else v==e.Position.Left?(A=new t.Rect(p-C._desiredSize.height,c,o,C._desiredSize.height),p-=C._desiredSize.height):v==e.Position.Right?(A=new t.Rect(f,c,o,C._desiredSize.height),f+=C._desiredSize.height):A=new t.Rect(p,c,o,1);C._layout(A,this._plotRect)}}},h.prototype._layoutMultiple=function(i,n,r){for(var o=i.width,a=i.height,h=[],l=[],c=this._getAxes(),u=c.length,_=0;_<u;_++)if((T=c[_])._plotrect=null,T.axisType==e.AxisType.X){for(var p=T.plotArea?T.plotArea.column:0;h.length<=p;)h.push(new s);h[p].axes.push(T)}else if(T.axisType==e.AxisType.Y){for(var d=T.plotArea?T.plotArea.row:0;l.length<=d;)l.push(new s);l[d].axes.push(T)}for(var f=h.length,g=l.length,y=new t.Size(o,.3*a),m=new t.Size(a,.3*o),b=0,v=0,x=o,w=a,S=0;S<f;S++){(O=h[S]).right=o,O.bottom=a;for(_=0;_<O.axes.length;_++){var P=(T=O.axes[_])._getHeight(r,T.axisType==e.AxisType.X?o:a);P>y.height&&(P=y.height);var C=new t.Size(y.width,P);T._desiredSize=C,0==S&&(O.left=Math.max(O.left,.5*T._annoSize.width)),S==f-1&&(O.right=Math.min(O.right,o-.5*T._annoSize.width)),(F=T._getPosition())==e.Position.Bottom?O.bottom-=C.height:F==e.Position.Top&&(O.top+=C.height)}}for(Y=0;Y<g;Y++){(O=l[Y]).right=o,O.bottom=a;for(_=0;_<O.axes.length;_++){var T=O.axes[_],M=new t.Size(m.width,T._getHeight(r,T.axisType==e.AxisType.X?o:a));M.height>m.height&&(M.height=m.height),T._desiredSize=M,0==Y&&(O.top=Math.max(O.top,.5*T._annoSize.width)),Y==g-1&&(O.bottom=Math.min(O.bottom,a-.5*T._annoSize.width)),(F=T._getPosition())==e.Position.Left?O.left+=M.height:F==e.Position.Right&&(O.right-=M.height)}}for(var A=0,N=0,L=o,I=a,S=0;S<f;S++){O=h[S];A=Math.max(A,O.left),N=Math.max(N,O.top),L=Math.min(L,O.right),I=Math.min(I,O.bottom)}for(Y=0;Y<g;Y++){O=l[Y];A=Math.max(A,O.left),N=Math.max(N,O.top),L=Math.min(L,O.right),I=Math.min(I,O.bottom)}A=b=Math.max(b,A),L=x=Math.min(x,L),N=v=Math.max(v,N),I=w=Math.min(w,I),this._plotRect=new t.Rect(b,v,x-b,w-v);for(var E=this._plotRect.clone(),k=b,D=this.plotAreas._calculateWidths(this._plotRect.width,f),S=0;S<f;S++){I=w,N=v;for(var O=h[S],R=D[S],_=0;_<O.axes.length;_++){var j,F=(T=O.axes[_])._getPosition(),V=new t.Rect(k,E.top,R,E.height);F==e.Position.Bottom?(j=new t.Rect(k,I,R,T._desiredSize.height),I+=T._desiredSize.height):F==e.Position.Top&&(j=new t.Rect(k,N-T._desiredSize.height,R,T._desiredSize.height),N-=T._desiredSize.height),T._layout(j,V)}for(_=0;_<this.plotAreas.length;_++)(G=this.plotAreas[_]).column==S&&G._setPlotX(k,R);k+=R}for(var X=v,B=this.plotAreas._calculateHeights(this._plotRect.height,g),Y=0;Y<g;Y++){A=b,L=x;for(var O=l[Y],z=B[Y],_=0;_<O.axes.length;_++){var F=(T=O.axes[_])._getPosition(),V=new t.Rect(E.left,X,E.width,z);T._plotrect?(V.left=T._plotrect.left,V.width=T._plotrect.width):D&&D.length>0&&(V.width=D[0]);var H;F==e.Position.Left?(H=new t.Rect(A-T._desiredSize.height,X,z,T._desiredSize.height),A-=T._desiredSize.height):F==e.Position.Right&&(H=new t.Rect(L,X,z,T._desiredSize.height),L+=T._desiredSize.height),T._layout(H,V)}for(_=0;_<this.plotAreas.length;_++){var G=this.plotAreas[_];G.row==Y&&G._setPlotY(X,z)}X+=z}},h.prototype._convertX=function(t,e,i){var n=this.axisX;return n.reversed?i-(i-e)*(t-n._getMinNum())/(n._getMaxNum()-n._getMinNum()):e+(i-e)*(t-n._getMinNum())/(n._getMaxNum()-n._getMinNum())},h.prototype._convertY=function(t,e,i){var n=this.axisY;return n.reversed?e+(i-e)*(t-n._getMinNum())/(n._getMaxNum()-n._getMinNum()):i-(i-e)*(t-n._getMinNum())/(n._getMaxNum()-n._getMinNum())},h.prototype._getLabelContent=function(e,i){return t.isString(i)?this._keywords.replace(i,e):t.isFunction(i)?i(e):null},h.prototype._select=function(t,e){var i=!1;if(t==this._selection&&e==this._selectionIndex||(i=!0),this._selection&&this._highlight(this._selection,!1,this._selectionIndex),this._selection=t,this._selectionIndex=e,this._selection&&this._highlight(this._selection,!0,this._selectionIndex),this.selectionMode==n.Point){var r=t?t.collectionView:this._cv;r&&(this._notifyCurrentChanged=!1,r.moveCurrentToPosition(t?e:-1),this._notifyCurrentChanged=!0)}i&&this.onSelectionChanged()},h.prototype._highlightCurrent=function(){if(this.selectionMode!=n.None){var t=this._selection,e=-1;if(t){var i=t.collectionView;i||(i=this._cv),i&&(e=i.currentPosition),this._highlight(t,!0,e)}}},h.prototype._highlight=function(i,r,s){if(i=t.asType(i,e.SeriesBase,!0),this.selectionMode==n.Series){var o=this.series.indexOf(i),a=i.hostElement;r?a.parentNode.appendChild(a):a.parentNode.insertBefore(a,a.parentNode.childNodes.item(o));l=this._find(a,["rect","ellipse","polyline","polygon","line","path"]);this._highlightItems(l,e.FlexChart._CSS_SELECTION,r),i.legendElement&&this._highlightItems(this._find(i.legendElement,["rect","ellipse","line"]),e.FlexChart._CSS_SELECTION,r)}else if(this.selectionMode==n.Point){var o=this.series.indexOf(i),a=i.hostElement;if(r){a.parentNode.appendChild(a);var h=i.getPlotElement(s);if(h){"g"!=h.nodeName&&this._highlightItems([h],e.FlexChart._CSS_SELECTION,r);l=this._find(h,["line","rect","ellipse","path","polygon"]);this._highlightItems(l,e.FlexChart._CSS_SELECTION,r)}}else{a.parentNode.insertBefore(a,a.parentNode.childNodes.item(o));var l=this._find(a,["rect","ellipse","line","path","polygon"]);this._highlightItems(l,e.FlexChart._CSS_SELECTION,r)}}},h.prototype._updateAuxAxes=function(i,n){for(var r=2;r<i.length;r++){var s=i[r];s._chart=this;for(var o=[],a=0;a<this.series.length;a++){var h=this.series[a];h.axisX!=s&&h.axisY!=s||o.push(h)}for(var l,c,a=0;a<o.length;a++){var u=o[a].getDataRect()||o[a]._getDataRect();u&&(s.axisType==e.AxisType.X&&!n||s.axisType==e.AxisType.Y&&n?((void 0===l||u.left<l)&&(l=u.left),(void 0===c||u.right>c)&&(c=u.right)):((void 0===l||u.top<l)&&(l=u.top),(void 0===c||u.bottom>c)&&(c=u.bottom)))}var _=o[0].getDataType(0);null==_&&(_=t.DataType.Number),i[r]._updateActualLimits(_,l,c)}},h._contains=function(t,e){return!(!t||!e)&&(e.x>=t.left&&e.x<=t.right&&e.y>=t.top&&e.y<=t.bottom)},h._intersects=function(t,e){return!(t.left>e.right||t.right<e.left||t.top>e.bottom||t.bottom<e.top)},h._toOADate=function(t){return t.valueOf()},h._fromOADate=function(t){return new Date(t)},h._renderText=function(e,i,n,r,s,o,a,h,l){var c=e.measureString(i,o,a,h),u=n.x,_=n.y;switch(r){case 1:u-=.5*c.width;break;case 2:u-=c.width}switch(s){case 1:_+=.5*c.height;break;case 0:_+=c.height}var p=new t.Rect(u,_-c.height,c.width,c.height);return l?l(p)?(e.drawString(i,new t.Point(u,_),o,h),p):null:(e.drawString(i,new t.Point(u,_),o,h),p)},h._renderRotatedText=function(e,i,n,r,s,o,a,h,l,c){var u=e.measureString(i,h,l,c),_=n.x,p=n.y;switch(r){case 1:_-=.5*u.width;break;case 2:_-=u.width}switch(s){case 1:p+=.5*u.height;break;case 0:p+=u.height}return e.drawStringRotated(i,new t.Point(_,p),o,a,h,c)},h._CSS_AXIS_X="wj-axis-x",h._CSS_AXIS_Y="wj-axis-y",h._CSS_LINE="wj-line",h._CSS_GRIDLINE="wj-gridline",h._CSS_TICK="wj-tick",h._CSS_GRIDLINE_MINOR="wj-gridline-minor",h._CSS_TICK_MINOR="wj-tick-minor",h._CSS_LABEL="wj-label",h._CSS_LEGEND="wj-legend",h._CSS_HEADER="wj-header",h._CSS_FOOTER="wj-footer",h._CSS_TITLE="wj-title",h._CSS_SELECTION="wj-state-selected",h._CSS_PLOT_AREA="wj-plot-area",h._CSS_DATA_LABELS="wj-data-labels",h._FG="#666",h._epoch=new Date(1899,11,30).getTime(),h._msPerDay=864e5,h}(e.FlexChartBase);e.FlexChartCore=r;var s=function(){function t(){this._axes=new Array,this.left=0,this.right=0,this.top=0,this.bottom=0}return Object.defineProperty(t.prototype,"axes",{get:function(){return this._axes},enumerable:!0,configurable:!0}),t}(),o=function(){function n(){this.stackAbs={},this._xvals=null}return n.prototype.analyse=function(r,s,o,a,h,l){var c=this;this.minY=NaN,this.maxY=NaN,this.minX=NaN,this.maxX=NaN,this.minXp=NaN,this.minYp=NaN,this.dx=0;var u={},_={},p={};if(this.dataTypeX=null,this.dataTypeY=null,this._xvals=a,null!=a)for(var d=a.length,f=0;f<d;f++){A=a[f];if((isNaN(this.minX)||this.minX>A)&&(this.minX=A),(isNaN(this.maxX)||this.maxX<A)&&(this.maxX=A),A>0&&(isNaN(this.minXp)||this.minXp>A)&&(this.minXp=A),f>0){S=Math.abs(A-a[f-1]);!isNaN(S)&&(S<this.dx||0==this.dx)&&(this.dx=S)}}for(f=0;f<r.length;f++){var g=r[f],y=g._getChartType(),m=void 0!==g.chartType,b=g.visibility;if(b!=e.SeriesVisibility.Hidden&&b!=e.SeriesVisibility.Legend){var v,x=g.getDataRect();x&&(!isNaN(this.minX)&&this.minX<x.left&&(v=x.right,x.left=this.minX,x.width=v-this.minX),!isNaN(this.maxX)&&this.maxX>x.right&&(x.width=this.maxX-x.left),!isNaN(this.minY)&&this.minY<x.top&&(v=x.bottom,x.top=this.minY,x.height=v-this.minY),!isNaN(this.maxY)&&this.maxY>x.bottom&&(x.height=this.maxY-x.top));var w=null;if(s?g._isCustomAxisY()||(w=g.getValues(1)):g._isCustomAxisX()||(w=g.getValues(1)),w){this.dataTypeX||(this.dataTypeX=g.getDataType(1));for(T=0;T<w.length;T++){M=w[T];if(n.isValid(M)&&((isNaN(this.minX)||this.minX>M)&&(this.minX=M),(isNaN(this.maxX)||this.maxX<M)&&(this.maxX=M),T>0&&(!y||y==e.ChartType.Column||y==e.ChartType.Bar))){var S=Math.abs(M-w[T-1]);!isNaN(S)&&S>0&&(S<this.dx||0==this.dx)&&(this.dx=S)}}}var P=null,C=!1;if(s?(C=g._isCustomAxisX(),P=g.getValues(0)):(C=g._isCustomAxisY(),P=g.getValues(0)),P&&(this.dataTypeY||C||(this.dataTypeY=g.getDataType(0)),isNaN(this.minX)?this.minX=0:w||a||(this.minX=Math.min(this.minX,0)),isNaN(this.maxX)?this.maxX=P.length-1:w||a||(this.maxX=Math.max(this.maxX,P.length-1)),!C))for(var T=0;T<P.length;T++){var M=P[T],A=w?t.asNumber(w[T],!0):a?t.asNumber(a[T],!0):T;t.isArray(M)?M.forEach(function(t){c._parseYVal(t,A,m,p,u,_)}):this._parseYVal(M,A,m,p,u,_)}var N=g.getDataRect(new t.Rect(this.minX,this.minY,this.maxX-this.minX,this.maxY-this.minY),x);N&&(this.minX=N.left,this.maxX=N.right,this.minY=N.top,this.maxY=N.bottom)}}if(o==i.Stacked){for(var L in u)u[L]>this.maxY&&(this.maxY=u[L]);for(var L in _)_[L]<this.minY&&(this.minY=_[L])}else if(o==i.Stacked100pc){this.minY=0,this.maxY=1;for(var L in p){var I=p[L];if(isFinite(I)&&0!=I){var E=u[L],k=_[L];isFinite(E)&&(E=Math.min(E/I,this.maxY)),isFinite(k)&&(k=Math.max(k/I,this.minY))}}}this.stackAbs=p,h&&(s?this.minY=isNaN(this.minYp)?1:this.minYp:this.minX=isNaN(this.minXp)?1:this.minXp),l&&(s?this.minX=isNaN(this.minXp)?1:this.minXp:this.minY=isNaN(this.minYp)?1:this.minYp)},n.prototype._parseYVal=function(t,e,i,r,s,o){n.isValid(t)&&(null!=t&&(isNaN(this.minY)||this.minY>t)&&(this.minY=t),null!=t&&(isNaN(this.maxY)||this.maxY<t)&&(this.maxY=t),t>0&&(isNaN(this.minYp)||this.minYp>t)&&(this.minYp=t),i||(t>0?isNaN(s[e])?s[e]=t:s[e]+=t:isNaN(o[e])?o[e]=t:o[e]+=t,isNaN(r[e])?r[e]=Math.abs(t):r[e]+=Math.abs(t)))},n.prototype.getMinY=function(){return this.minY},n.prototype.getMaxY=function(){return this.maxY},n.prototype.getMinX=function(){return this.minX},n.prototype.getMaxX=function(){return this.maxX},n.prototype.getMinXp=function(){return this.minXp},n.prototype.getMinYp=function(){return this.minYp},n.prototype.getDeltaX=function(){return this.dx},n.prototype.getDataTypeX=function(){return this.dataTypeX},n.prototype.getDataTypeY=function(){return this.dataTypeY},n.prototype.getStackedAbsSum=function(t){var e=this.stackAbs[t];return isFinite(e)?e:0},n.prototype.getXVals=function(){return this._xvals},n.isValid=function(t){return isFinite(t)},n}();e._DataInfo=o;var a=function(e){function i(){var t=e.call(this)||this;return t._content="<b>{seriesName}</b><br/>{x} {y}",t._threshold=15,t}return __extends(i,e),Object.defineProperty(i.prototype,"content",{get:function(){return this._content},set:function(t){t!=this._content&&(this._content=t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"threshold",{get:function(){return this._threshold},set:function(e){e!=this._threshold&&(this._threshold=t.asNumber(e))},enumerable:!0,configurable:!0}),i}(t.Tooltip);e.ChartTooltip=a}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i;!function(t){t[t.Column=0]="Column",t[t.Bar=1]="Bar",t[t.Scatter=2]="Scatter",t[t.Line=3]="Line",t[t.LineSymbols=4]="LineSymbols",t[t.Area=5]="Area",t[t.Bubble=6]="Bubble",t[t.Candlestick=7]="Candlestick",t[t.HighLowOpenClose=8]="HighLowOpenClose",t[t.Spline=9]="Spline",t[t.SplineSymbols=10]="SplineSymbols",t[t.SplineArea=11]="SplineArea",t[t.Funnel=12]="Funnel"}(i=e.ChartType||(e.ChartType={}));var n=function(n){function r(t,e){var r=n.call(this,t,null)||this;return r._chartType=i.Column,r.initialize(e),r}return __extends(r,n),r.prototype._getChartType=function(){return this._chartType},Object.defineProperty(r.prototype,"chartType",{get:function(){return this._chartType},set:function(e){(e=t.asEnum(e,i))!=this._chartType&&(this._chartType=e,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"rotated",{get:function(){return this._rotated},set:function(e){e!=this._rotated&&(this._rotated=t.asBoolean(e),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"stacking",{get:function(){return this._stacking},set:function(i){(i=t.asEnum(i,e.Stacking))!=this._stacking&&(this._stacking=i,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"options",{get:function(){return this._options},set:function(t){t!=this._options&&(this._options=t,this.invalidate())},enumerable:!0,configurable:!0}),r}(e.FlexChartCore);e.FlexChart=n}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i;!function(t){t[t.None=0]="None",t[t.Left=1]="Left",t[t.Top=2]="Top",t[t.Right=3]="Right",t[t.Bottom=4]="Bottom",t[t.Auto=5]="Auto"}(i=e.Position||(e.Position={}));var n;!function(t){t[t.X=0]="X",t[t.Y=1]="Y"}(n=e.AxisType||(e.AxisType={}));var r;!function(t){t[t.Auto=0]="Auto",t[t.Show=1]="Show"}(r=e.OverlappingLabels||(e.OverlappingLabels={}));var s;!function(t){t[t.None=0]="None",t[t.Outside=1]="Outside",t[t.Inside=2]="Inside",t[t.Cross=3]="Cross"}(s=e.TickMark||(e.TickMark={}));var o=function(){function o(e){this._GRIDLINE_WIDTH=1,this._LINE_WIDTH=1,this._TICK_WIDTH=1,this._TICK_HEIGHT=4,this._TICK_OVERLAP=1,this._TICK_LABEL_DISTANCE=4,this._minorGrid=!1,this._labels=!0,this._axisLine=!0,this._isTimeAxis=!1,this._labelPadding=5,this.rangeChanged=new t.Event,this._customConvert=null,this._customConvertBack=null,this.__uniqueId=o._id++,this._position=e,e==i.Bottom||e==i.Top?this._axisType=n.X:(this._axisType=n.Y,this._axisLine=!1),this._minorTickMarks=s.None,this._overlap=r.Auto}return Object.defineProperty(o.prototype,"hostElement",{get:function(){return this._hostElement},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"actualMin",{get:function(){return this._isTimeAxis?new Date(this._actualMin):this._actualMin},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"actualMax",{get:function(){return this._isTimeAxis?new Date(this._actualMax):this._actualMax},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"min",{get:function(){return this._min},set:function(e){e!=this._min&&(t.isDate(e)?this._min=t.asDate(e,!0):this._min=t.asNumber(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"max",{get:function(){return this._max},set:function(e){e!=this._max&&(t.isDate(e)?this._max=t.asDate(e,!0):this._max=t.asNumber(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"reversed",{get:function(){return this._reversed},set:function(e){this._reversed!=e&&(this._reversed=t.asBoolean(e),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"position",{get:function(){return this._position},set:function(e){(e=t.asEnum(e,i,!1))!=this._position&&(this._position=e,this._position==i.Bottom||this._position==i.Top?this._axisType=n.X:this._position!=i.Left&&this._position!=i.Right||(this._axisType=n.Y),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"majorUnit",{get:function(){return this._majorUnit},set:function(e){e!=this._majorUnit&&(this._majorUnit=t.asNumber(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"minorUnit",{get:function(){return this._minorUnit},set:function(e){e!=this._minorUnit&&(this._minorUnit=t.asNumber(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"name",{get:function(){return this._name},set:function(e){e!=this._name&&(this._name=t.asString(e,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"title",{get:function(){return this._title},set:function(e){e!=this._title&&(this._title=t.asString(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"format",{get:function(){return this._format},set:function(e){e!=this._format&&(this._format=t.asString(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"majorGrid",{get:function(){return this._majorGrid},set:function(e){e!=this._majorGrid&&(this._majorGrid=t.asBoolean(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"majorTickMarks",{get:function(){return this._majorTickMarks},set:function(e){(e=t.asEnum(e,s,!0))!=this._majorTickMarks&&(this._majorTickMarks=e,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"minorGrid",{get:function(){return this._minorGrid},set:function(e){e!=this._minorGrid&&(this._minorGrid=t.asBoolean(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"minorTickMarks",{get:function(){return this._minorTickMarks},set:function(e){(e=t.asEnum(e,s,!0))!=this._minorTickMarks&&(this._minorTickMarks=e,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"axisLine",{get:function(){return this._axisLine},set:function(e){e!=this._axisLine&&(this._axisLine=t.asBoolean(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"labels",{get:function(){return this._labels},set:function(e){e!=this._labels&&(this._labels=t.asBoolean(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"labelAlign",{get:function(){return this._labelAlign},set:function(e){e!=this._labelAlign&&(this._labelAlign=t.asString(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"labelAngle",{get:function(){return this._labelAngle},set:function(e){e!=this._labelAngle&&(this._labelAngle=t.asNumber(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"origin",{get:function(){return this._origin},set:function(e){e!=this._origin&&(this._origin=t.asNumber(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"overlappingLabels",{get:function(){return this._overlap},set:function(e){(e=t.asEnum(e,r,!0))!=this._overlap&&(this._overlap=e,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"itemsSource",{get:function(){return this._items},set:function(e){this._items!=e&&(this._cv&&(this._cv.collectionChanged.removeHandler(this._cvCollectionChanged,this),this._cv=null),this._items=e,this._cv=t.asCollectionView(e),null!=this._cv&&this._cv.collectionChanged.addHandler(this._cvCollectionChanged,this))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"binding",{get:function(){return this._binding},set:function(e){e!=this._binding&&(this._binding=t.asString(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"itemFormatter",{get:function(){return this._ifmt},set:function(e){this._ifmt!=e&&(this._ifmt=t.asFunction(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"logBase",{get:function(){return this._logBase},set:function(e){e!=this._logBase&&(this._logBase=t.asNumber(e,!0,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"plotArea",{get:function(){return this._parea},set:function(i){i!=this._parea&&(this._parea=t.asType(i,e.PlotArea,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"labelPadding",{get:function(){return this._labelPadding},set:function(e){e!=this._labelPadding&&(this._labelPadding=t.asNumber(e,!0,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"_groupClass",{get:function(){return this.axisType===n.X?e.FlexChartCore._CSS_AXIS_X:e.FlexChartCore._CSS_AXIS_Y},enumerable:!0,configurable:!0}),o.prototype.onRangeChanged=function(t){this.rangeChanged.raise(this,t)},o.prototype._getPosition=function(){if(this.axisType==n.X){if(this.position==i.Auto)return i.Bottom}else if(this.axisType==n.Y&&this.position==i.Auto)return i.Left;return this.position},o.prototype._isOverlapped=function(t,e,i,r){var s=this._lbls;if(null!=s&&s.length>1)for(var o=s.length,a=this._values&&this._values.length==o?this._values:null,h=0,l=0,c=0;c<o;c++){var u=a?a[c]:c;if(u>=this._actualMin&&u<=this._actualMax){var _=e*(u-this._actualMin)/(this._actualMax-this._actualMin),p=t.measureString(s[c],i,this._groupClass);if(this.axisType==n.X){if(c>0&&Math.abs(_-h)<Math.max(p.width,l)+12)return!0;h=_,l=p.width}else this.axisType,n.Y}}return!1},o.prototype._getHeight=function(i,r){this._actualAngle=null;var o=e.FlexChart._CSS_LABEL,a=e.FlexChart._CSS_TITLE,h=this._actualMax-this._actualMin,l=this._nicePrecision(h);(l<0||l>15)&&(l=0);var c=.1*h,u=this._lbls,_=this.labelAngle;if(this.labels&&this._chart._getChartType()!==e.ChartType.Funnel){if(c=this._updateAutoFormat(c),null!=u&&u.length>0){var p=u.length,d=this._values&&this._values.length==p?this._values:null;this._annoSize=new t.Size;for(var f=0;f<p;f++){var g=d?d[f]:f;if(g>=this._actualMin&&g<=this._actualMax){m=i.measureString(u[f],o,this._groupClass);this.axisType,n.X,m.width>this._annoSize.width&&(this._annoSize.width=m.width),m.height>this._annoSize.height&&(this._annoSize.height=m.height)}}null==_&&(this._isOverlapped(i,r,o,this.axisType)?_=this._actualAngle=-45:this._actualAngle=0)}else{var y=this._formatValue(this._actualMin-c),m=i.measureString(y,o,this._groupClass);this._annoSize=m,y=this._formatValue(this._actualMax+c),(m=i.measureString(y,o,this._groupClass)).width>this._annoSize.width&&(this._annoSize.width=m.width),m.height>this._annoSize.height&&(this._annoSize.height=m.height)}if(_){_>90?_=90:_<-90&&(_=-90);var b=_*Math.PI/180,v=this._annoSize.width,x=this._annoSize.height;this._annoSize.width=v*Math.abs(Math.cos(b))+x*Math.abs(Math.sin(b)),this._annoSize.height=v*Math.abs(Math.sin(b))+x*Math.abs(Math.cos(b))}}else this._annoSize=new t.Size;x=2*(this._labelPadding||5);this._axisType==n.X?x+=this._annoSize.height:x+=this._annoSize.width+this._TICK_LABEL_DISTANCE+2;var w=this._TICK_HEIGHT,S=this._TICK_OVERLAP;P==s.Outside?S=1:P==s.Inside?S=-1:P==s.Cross&&(S=0);var P=this.majorTickMarks;return null==P&&(P=s.Outside),P!=s.None&&(x+=.5*(1+S)*w),this._title&&(y=this._title,this._szTitle=i.measureString(y,a,this._groupClass),x+=this._szTitle.height),i.fontSize=null,x},o.prototype._updateAutoFormat=function(e){if(this._isTimeAxis){var i=this.format,n=.001*(this._actualMax-this._actualMin)/10,r=new l(n*l.TicksPerSecond),s=t.isNumber(this._majorUnit)?l.fromDays(this._majorUnit):c.NiceTimeSpan(r,i);i||(this._tfmt=c.GetTimeDefaultFormat(1e3*s.TotalSeconds,0)),e=s.TotalSeconds}return e},o.prototype._updateActualLimitsByChartType=function(t,i,n){if(t&&t.length>0&&!this._isTimeAxis){var r=this._chart._getChartType();r!=e.ChartType.Column&&r!=e.ChartType.Bar&&(i-=.5,n+=.5)}return{min:i,max:n}},o.prototype._updateActualLimits=function(i,n,r,s,o){void 0===s&&(s=null),void 0===o&&(o=null);var a=this._actualMin,h=this._actualMax;this._isTimeAxis=i==t.DataType.Date;var l=this._updateActualLimitsByChartType(s,n,r);n=l.min,r=l.max;var c=this._min,u=this._max;if(t.isDate(c)&&(c=c.valueOf()),t.isDate(u)&&(u=u.valueOf()),this._actualMin=null!=c&&this._chart&&this._chart._stacking!==e.Stacking.Stacked100pc?c:n,this._actualMax=null!=u&&this._chart&&this._chart._stacking!==e.Stacking.Stacked100pc?u:r,this._actualMin==this._actualMax&&(this._actualMin-=.5,this._actualMax+=.5),this.logBase>0){var _=this.logBase,p=Math.log(_);if(!this._max){var d=Math.ceil(Math.log(this._actualMax)/p);this._actualMax=Math.pow(_,d)}if(!this._min){var f=Math.floor(Math.log(this._actualMin)/p);this._actualMin=Math.pow(_,f)}(this._actualMin<=0||!t.isNumber(this._actualMin))&&(this._actualMin=1),this._actualMax<this._actualMin&&(this._actualMax=this._actualMin+1)}if((a!=this._actualMin&&(t.isNumber(a)||t.isNumber(this._actualMin))||h!=this._actualMax&&(t.isNumber(h)||t.isNumber(this._actualMax)))&&this.onRangeChanged(),this._items){this._values=[],this._lbls=[];var g=this._items.length,y="value",m="text";if(this.binding){var b=this.binding.split(",");2==b.length&&(y=b[0],m=b[1])}for(var v=0;v<g;v++){var x=this._items[v],w=x[y];t.isNumber(w)&&(this._values.push(w),this._lbls.push(x[m]))}}else this._lbls=s,this._values=o},o.prototype._layout=function(e,i){var r=this.axisType==n.Y;this._plotrect=i,this._axrect=r?new t.Rect(e.left,e.top,e.height,e.width):e},o.prototype._hasVisibileSeries=function(){for(var t,i=this._chart.series,n=0,r=i.length;n<r;n++)if((t=i[n].visibility)==e.SeriesVisibility.Plot||t==e.SeriesVisibility.Visible)return!0;return!1},o.prototype._render=function(n){if(this.position!=i.None&&this._hasVisibileSeries()){this._vals={};var r=0;this.labelAngle&&((r=this.labelAngle)>90?r=90:r<-90&&(r=-90)),null==this.labelAngle&&null!=this._actualAngle&&(r=this._actualAngle);var a=e.FlexChart._FG,h=this._actualMax-this._actualMin;if(t.isNumber(h)){var l=this._calcMajorUnit();0==l&&(l=.1*this._niceTickNumber(h));var c=Math.min(o.MAX_MAJOR,Math.floor(h/l)+1),u=[],_=[];this._rects=[],this._vals.major=u,this._vals.hasLbls=[];var p=Math.floor(this._actualMin/l)*l;p<this._actualMin&&(p+=l);var d=!1;if(this._lbls&&this._lbls.length>0)if(_=this._lbls,0==this._values.length){d=!0;for(v=0;v<_.length;v++)u.push(v)}else u=this._values;else this._isTimeAxis?this._createTimeLabels(p,c,u,_):this.logBase?this._createLogarithmicLabels(this._actualMin,this._actualMax,this.majorUnit,u,_,!0):this._createLabels(p,c,l,u,_);c=Math.min(u.length,_.length),n.textFill=a;var f=this._TICK_HEIGHT,g=this._TICK_OVERLAP,y=this.majorTickMarks;null==y&&(y=s.Outside),y==s.Outside?g=1:y==s.Inside?g=-1:y==s.Cross&&(g=0);for(var m=.5*(g-1)*f,b=.5*(1+g)*f,v=0;v<c;v++){var x=!0,w=u[v],S=_[v],P=this.labels;if(P&&(d||this.itemsSource)&&this.majorUnit&&v%this.majorUnit!=0&&(P=!1),w>=this._actualMin&&w<=this._actualMax){var C=n.textFill;x=this._renderLabelsAndTicks(n,v,w,S,r,y,P,m,b),n.textFill=C}this._vals.hasLbls.push(x)}}(this.minorGrid||this.minorTickMarks!=s.None)&&this._renderMinor(n,u,d),n.stroke=a,n.fontSize=null,this._renderLineAndTitle(n),n.stroke=null,n.fontSize=null,n.textFill=null,n.strokeWidth=null}},o.prototype._renderLineAndTitle=function(r){var s=this._getPosition(),o=this.axisType==n.Y,a=s!=i.Top&&s!=i.Right,h=e.FlexChart._CSS_TITLE,l=e.FlexChart._CSS_LINE;if(o)if(a){if(this._title){c=new t.Point(this._axrect.left+.5*this._szTitle.height,this._axrect.top+.5*this._axrect.height);e.FlexChart._renderRotatedText(r,this._title,c,1,1,c,-90,h,this._groupClass)}this.axisLine&&r.drawLine(this._axrect.right,this._axrect.top,this._axrect.right,this._axrect.bottom,l)}else{if(this._title){var c=new t.Point(this._axrect.right-.5*this._szTitle.height,this._axrect.top+.5*this._axrect.height);e.FlexChart._renderRotatedText(r,this._title,c,1,1,c,90,h,this._groupClass)}this.axisLine&&r.drawLine(this._axrect.left,this._axrect.top,this._axrect.left,this._axrect.bottom,l)}else a?(this.axisLine&&r.drawLine(this._axrect.left,this._axrect.top,this._axrect.right,this._axrect.top,l),this._title&&e.FlexChart._renderText(r,this._title,new t.Point(this._axrect.left+.5*this._axrect.width,this._axrect.bottom),1,2,h)):(this.axisLine&&r.drawLine(this._axrect.left,this._axrect.bottom,this._axrect.right,this._axrect.bottom,l),this._title&&e.FlexChart._renderText(r,this._title,new t.Point(this._axrect.left+.5*this._axrect.width,this._axrect.top),1,0,h))},o.prototype._renderMinor=function(t,e,r){var s=this._getPosition(),o=this.axisType==n.Y,a=s!=i.Top&&s!=i.Right;if(this.logBase){if(this.minorUnit>0){var h=[];this._createLogarithmicLabels(this._actualMin,this._actualMax,this.minorUnit,h,null,!1);for(var l=[],c=0;c<h.length;c++){var u=h[c];-1==e.indexOf(u)&&u>this._actualMin&&l.push(u)}this._renderMinors(t,l,o,a)}}else this._createMinors(t,e,o,a,r)},o.prototype._renderRotatedText=function(t,i,n,r,s,o,a,h,l,c,u){if(this.itemFormatter){var _=this._getFormattedItem(t,i,n,r,l);_?(n=_.text,l=_.cls):n=null}e.FlexChart._renderRotatedText(t,n,r,s,o,a,h,l,c,u)},o.prototype._getFormattedItem=function(t,e,r,s,o){if(this.itemFormatter){var a=s.clone();this.axisType==n.X?this.position==i.Top?a.y=this._plotrect.top:a.y=this._plotrect.bottom:this.position==i.Right?a.x=this._plotrect.right:a.x=this._plotrect.left;var h={val:e,text:r,pos:a,cls:o};return h=this.itemFormatter(t,h)}},o.prototype._renderLabelsAndTicks=function(o,a,h,l,c,u,_,p,d){var f=this._getPosition(),g=!0,y=this.axisType==n.Y,m=f!=i.Top&&f!=i.Right,b=this.labelPadding||5,v=this._TICK_WIDTH,x=this._getLabelAlign(y),w=e.FlexChart._CSS_LABEL,S=e.FlexChart._CSS_GRIDLINE,P=e.FlexChart._CSS_TICK,C=e.FlexChart._FG,T=e.FlexChart._FG,M=this._GRIDLINE_WIDTH,A=h!=this._actualMin&&this.majorGrid;if(y){var N=this.convert(h);if(A&&(o.stroke=C,o.strokeWidth=M,o.drawLine(this._plotrect.left,N,this._plotrect.right,N,S)),o.stroke=T,o.strokeWidth=v,m){if(u!=s.None&&o.drawLine(this._axrect.right-p,N,this._axrect.right-d,N,P),_){I=new t.Point(this._axrect.right-d-this._TICK_LABEL_DISTANCE-b,N);c>0?90==c?this._renderRotatedText(o,h,l,I,1,0,I,c,w,this._groupClass):this._renderRotatedText(o,h,l,I,2,1,I,c,w,this._groupClass):c<0?-90==c?this._renderRotatedText(o,h,l,I,1,2,I,c,w,this._groupClass):this._renderRotatedText(o,h,l,I,2,1,I,c,w,this._groupClass):this._renderLabel(o,h,l,I,2,x,w)}}else if(u!=s.None&&o.drawLine(this._axrect.left+p,N,this._axrect.left+d,N,P),_){I=new t.Point(this._axrect.left+d+this._TICK_LABEL_DISTANCE+b,N);c>0?90==c?this._renderRotatedText(o,h,l,I,1,2,I,c,w,this._groupClass):this._renderRotatedText(o,h,l,I,0,1,I,c,w,this._groupClass):c<0?-90==c?this._renderRotatedText(o,h,l,I,1,0,I,c,w,this._groupClass):this._renderRotatedText(o,h,l,I,0,1,I,c,w,this._groupClass):this._renderLabel(o,h,l,I,0,x,w)}}else{var L=this.convert(h);if(this.overlappingLabels==r.Auto&&this._xCross(L)&&(_=!1),A&&(o.stroke=C,o.strokeWidth=M,o.drawLine(L,this._plotrect.top,L,this._plotrect.bottom,S)),o.stroke=T,o.strokeWidth=v,m){if(g=!1,_){I=new t.Point(L,this._axrect.top+d+b);g=0!=c?this._renderRotatedLabel(o,h,l,I,x,c,w,m):this._renderLabel(o,h,l,I,x,0,w)}u!=s.None&&g&&(L=this.convert(h),o.drawLine(L,this._axrect.top+p,L,this._axrect.top+d,P))}else{if(_){var I=new t.Point(L,this._axrect.bottom-d-b);g=0!=c?this._renderRotatedLabel(o,h,l,I,x,c,w,m):this._renderLabel(o,h,l,I,x,2,w)}u!=s.None&&(L=this.convert(h),o.drawLine(L,this._axrect.bottom-p,L,this._axrect.bottom-d,P))}}return g},o.prototype._xCross=function(t){for(var e=this._rects.length,i=0;i<e;i++){var n=this._rects[i];if(t>=n.left&&t<=n.right)return!0}return!1},o.prototype._createMinors=function(e,i,n,r,s){if(i&&i.length>1){for(var a=this.majorUnit?this._isTimeAxis?24*this.majorUnit*3600*1e3:this.majorUnit:i[1]-i[0],h=t.isNumber(this.minorUnit)?this._isTimeAxis?24*this.minorUnit*3600*1e3:this.minorUnit:.5*a,l=[],c=i[0];c>this._actualMin&&l.length<o.MAX_MINOR;c-=h)-1==i.indexOf(c)&&l.push(c);for(c=i[0]+h;c<this._actualMax&&l.length<o.MAX_MINOR;c+=h)-1==i.indexOf(c)?l.push(c):s&&this.majorUnit&&c%this.majorUnit!=0&&l.push(c);this._renderMinors(e,l,n,r)}},o.prototype._renderMinors=function(t,i,n,r){var o=this._TICK_HEIGHT,a=this._TICK_WIDTH,h=this._TICK_OVERLAP,l=e.FlexChart._FG,c=this.minorTickMarks,u=!0;this._vals.minor=i,c==s.Outside?h=1:c==s.Inside?h=-1:c==s.Cross?h=0:u=!1;for(var _=.5*(h-1)*o,p=.5*(1+h)*o,d=i?i.length:0,f=this.minorGrid,g=this._plotrect,y=this._GRIDLINE_WIDTH,m=e.FlexChart._FG,b=e.FlexChart._CSS_GRIDLINE_MINOR,v=e.FlexChart._CSS_TICK_MINOR,x=0;x<d;x++)if(i[x]>=this.actualMin&&i[x]<=this.actualMax)if(n){var w=this.convert(i[x]);u&&(t.stroke=l,t.strokeWidth=a,r?t.drawLine(this._axrect.right-_,w,this._axrect.right-p,w,v):t.drawLine(this._axrect.left+_,w,this._axrect.left+p,w,v)),f&&(t.stroke=m,t.strokeWidth=y,t.drawLine(g.left,w,g.right,w,b))}else{var S=this.convert(i[x]);u&&(t.stroke=l,t.strokeWidth=a,r?t.drawLine(S,this._axrect.top+_,S,this._axrect.top+p,v):t.drawLine(S,this._axrect.bottom-_,S,this._axrect.bottom-p,v)),f&&(t.stroke=m,t.strokeWidth=y,t.drawLine(S,g.top,S,g.bottom,b))}},o.prototype._renderLabel=function(i,n,s,o,a,h,l){var c=!1;if(this.itemFormatter){var u=this._getFormattedItem(i,n,s,o,l);u?(s=u.text,l=u.cls):s=null}if(s){var _=this._rects,p=this.overlappingLabels==r.Auto&&!t.isNumber(this._actualAngle),d=e.FlexChart._renderText(i,s,o,a,h,l,this._groupClass,null,function(t){if(p)for(var i=_.length,n=0;n<i;n++)if(e.FlexChart._intersects(_[n],t))return!1;return!0});d&&(d.left+=4,d.width+=8,_.push(d),c=!0)}return c},o.prototype._renderRotatedLabel=function(i,n,s,o,a,h,l,c){if(this.itemFormatter){var u=this._getFormattedItem(i,n,s,o,l);u?(s=u.text,l=u.cls):s=null}if(s){var _=i.measureString(s,l,this._groupClass),p=.5*_.height,d=.5*_.width*Math.abs(Math.sin(h*Math.PI/180)),f=.5*_.width,g=.5*(_.width*Math.abs(Math.cos(h*Math.PI/180))+_.height*Math.abs(Math.sin(h*Math.PI/180))),y=new t.Point(o.x,o.y),m=new t.Point(o.x,o.y);this.labelAlign||(a=90==h||-90==h?1:c?h>0?0:2:h>0?2:0),c?(o.y+=p+d,y.y+=p+d-.5*_.height):(o.y-=p+d-_.height,y.y-=p+d-.5*_.height);var b=0;2===a?(y.x-=g,o.x-=f+g,b=y.x+g-_.height-2):0===a?(y.x+=g,o.x-=f-g,b=y.x-g):(o.x-=f,b=y.x-_.height/2);var v=new t.Rect(b,m.y,_.height+2,_.width),x=this._rects;if(this.overlappingLabels==r.Auto)for(var w=x.length,S=0;S<w;S++)if(e.FlexChart._intersects(x[S],v))return!1;return e.FlexChart._renderRotatedText(i,s,o,0,2,y,h,l,this._groupClass),this._rects.push(v),!0}return!1},o.prototype._getLabelAlign=function(t){var e=1;if(this.labelAlign){var i=this.labelAlign.toLowerCase();t?"top"==i?e=0:"bottom"==i&&(e=2):"left"==i?e=0:"right"==i&&(e=2)}return e},o.prototype.convert=function(t,e,i){var r=null==e?this._actualMax:e,s=null==i?this._actualMin:i;if(r==s)return 0;var o=this._axrect.left,a=this._axrect.width,h=this._axrect.top,l=this._axrect.height;if(null!=this._customConvert){var c=this._customConvert(t,s,r);return this.axisType==n.Y?h+c*l:o+c*a}if(this.logBase){if(t<=0)return NaN;var u=Math.log(r/s);return this._reversed?this.axisType==n.Y?h+Math.log(t/s)/u*l:o+a-Math.log(t/s)/u*a:this.axisType==n.Y?h+l-Math.log(t/s)/u*l:o+Math.log(t/s)/u*a}return this._reversed?this.axisType==n.Y?h+(t-s)/(r-s)*l:o+a-(t-s)/(r-s)*a:this.axisType==n.Y?h+l-(t-s)/(r-s)*l:o+(t-s)/(r-s)*a},o.prototype.convertBack=function(t){if(this._actualMax==this._actualMin)return 0;var e=this._plotrect.left,i=this._plotrect.width,r=this._plotrect.top,s=this._plotrect.height,o=this._actualMax-this._actualMin,a=this.logBase;if(null!=this._customConvertBack)return this.axisType==n.Y?this._customConvertBack((t-r)/s,this._actualMin,this._actualMax):this._customConvertBack((t-e)/i,this._actualMin,this._actualMax);if(a){var h=0;return h=this._reversed?this.axisType==n.Y?(t-r)/s:1-(t-e)/i:this.axisType==n.Y?1-(t-r)/s:(t-e)/i,Math.pow(a,(Math.log(this._actualMin)+(Math.log(this._actualMax)-Math.log(this._actualMin))*h)/Math.log(a))}return this._reversed?this.axisType==n.Y?this._actualMin+(t-r)*o/s:this._actualMin+(e+i-t)*o/i:this.axisType==n.Y?this._actualMax-(t-r)*o/s:this._actualMin+(t-e)*o/i},Object.defineProperty(o.prototype,"axisType",{get:function(){var t=this._chart;if(t){if(t.axisX==this)return n.X;if(t.axisY==this)return n.Y}return this._axisType},enumerable:!0,configurable:!0}),o.prototype._getMinNum=function(){return this._actualMin},o.prototype._getMaxNum=function(){return this._actualMax},o.prototype._invalidate=function(){this._chart&&this._chart.invalidate()},o.prototype._cvCollectionChanged=function(t,e){this._invalidate()},o.prototype._createLabels=function(t,e,i,n,r){for(var s=0;s<e;s++){var o=(t+i*s).toFixed(14),a=parseFloat(o),h=this._formatValue(a);n.push(a),r.push(h)}},o.prototype._createLogarithmicLabels=function(t,e,n,r,s,o){var a=this.logBase,h=Math.log(a),l=Math.floor(Math.log(t)/h),c=Math.ceil(Math.log(e)/h),u=a,_=!0;n>0&&(_=!1,u=n),u<a&&(u=a);var p=(c-l+1)*a/u,d=1;if(o){var f=this._getPosition(),g=this._getAnnoNumber(f==i.Left||f==i.Right);p>g?d=Math.floor(p/g+1):_&&(p<=.2*g?u=.2*a:p<=.1*g&&(u=.1*a))}for(var y=l;y<=c;y+=d)if(_)for(var m=Math.pow(a,y),b=0;b*u<a-1;b++)(v=m*(1+b*u))>=t&&v<=e&&(0==b?(r.unshift(v),s&&s.unshift(this._formatValue(v))):(r.push(v),s&&s.push(this._formatValue(v))));else{var v=Math.pow(u,y);v>=t&&v<=e&&(r.push(v),s&&s.push(this._formatValue(v)))}},o.prototype._createTimeLabels=function(e,i,r,s){var o=this._actualMin,a=this._actualMax,h=new Date(o),u=new Date(a),_=this._format,p=this._getAnnoNumber(this._axisType==n.Y);p>12&&(p=12);var d=.001*(this._actualMax-this._actualMin)/p,f=new l(d*l.TicksPerSecond),g=t.isNumber(this._majorUnit)?l.fromDays(this._majorUnit):c.NiceTimeSpan(f,_);_||(this._tfmt=_=c.GetTimeDefaultFormat(1e3*g.TotalSeconds,0));var y=g.Ticks,m=c.RoundTime(o,g.TotalDays,!1);isFinite(m)&&(o=m);var b=c.RoundTime(a,g.TotalDays,!0);isFinite(b)&&(a=b);var v=new Date(o);new Date(a);if(g.TotalDays>=365&&!t.isNumber(this._majorUnit)){(v=new Date(h.getFullYear(),1,1))<h&&v.setFullYear(v.getFullYear()+1);var x=g.TotalDays/365;x-=x%1;for(P=v;P<=u&&x;P.setFullYear(P.getFullYear()+x)){T=P.valueOf();r.push(T),s.push(this._formatValue(T))}}else if(g.TotalDays>=30&&!t.isNumber(this._majorUnit)){(v=new Date(h.getFullYear(),h.getMonth(),1))<h&&v.setMonth(v.getMonth()+1);var w=g.TotalDays/30;w-=w%1;for(P=v;P<=u;P.setMonth(P.getMonth()+w)){T=P.valueOf();r.push(T),s.push(this._formatValue(T))}}else{var S=1e3*y/l.TicksPerSecond,P=v,C=h.getTime()-P.getTime();for(C>S&&(P=new Date(P.getTime()+Math.floor(C/S)*S));P<=u&&S;P=new Date(P.getTime()+S))if(P>=h){var T=P.valueOf();r.push(T),s.push(this._formatValue(T))}}},o.prototype._formatValue=function(e){if(this._isTimeAxis)return this._format?t.Globalize.format(new Date(e),this._format):t.Globalize.format(new Date(e),this._tfmt);if(this._format)return t.Globalize.format(e,this._format);var i=e==Math.round(e)?"n0":"n";return t.Globalize.format(e,i)},o.prototype._calcMajorUnit=function(){var e=this._majorUnit;if(!t.isNumber(e)){var i=this._actualMax-this._actualMin,r=this._nicePrecision(i),s=i/this._getAnnoNumber(this.axisType==n.Y);(e=this._niceNumber(2*s,-r,!0))<s&&(e=this._niceNumber(s,1-r,!1)),e<s&&(e=this._niceTickNumber(s))}return e},o.prototype._getAnnoNumber=function(t){var e=t?this._annoSize.height:this._annoSize.width,i=t?this._axrect.height:this._axrect.width;if(e>0&&i>0){var n=Math.floor(i/(e+6));return n<=0&&(n=1),n}return 10},o.prototype._nicePrecision=function(e){if(!t.isNumber(e)||e<=0)return 0;var i,n=Math.log(e)/Math.LN10;i=n>=0?Math.floor(n):Math.ceil(n);var r=e/Math.pow(10,i);return r<3&&(i=1-i,(r=e/Math.pow(10,i))<3&&(i+=1)),i},o.prototype._niceTickNumber=function(t){if(0==t)return t;t<0&&(t=-t);var e=Math.log(t)/Math.LN10,i=Math.floor(e),n=t/Math.pow(10,i),r=10;return n<=1?r=1:n<=2?r=2:n<=5&&(r=5),r*Math.pow(10,i)},o.prototype._niceNumber=function(t,e,i){if(0==t)return t;t<0&&(t=-t);var n=t/Math.pow(10,e),r=10;return i?n<1.5?r=1:n<3?r=2:n<4.5?r=4:n<7&&(r=5):n<=1?r=1:n<=2?r=2:n<=5&&(r=5),r*Math.pow(10,e)},Object.defineProperty(o.prototype,"_uniqueId",{get:function(){return this.__uniqueId},enumerable:!0,configurable:!0}),o.MAX_MAJOR=1e3,o.MAX_MINOR=2e3,o._id=0,o}();e.Axis=o;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.getAxis=function(t){var e=this.indexOf(t);return e>-1?this[e]:null},e.prototype.indexOf=function(t){for(var e=0;e<this.length;e++)if(this[e].name==t)return e;return-1},e}(t.collections.ObservableArray);e.AxisCollection=a;var h;!function(t){t[t.tickf7=-7]="tickf7",t[t.tickf6=-6]="tickf6",t[t.tickf5=-5]="tickf5",t[t.tickf4=-4]="tickf4",t[t.tickf3=-3]="tickf3",t[t.tickf2=-2]="tickf2",t[t.tickf1=-1]="tickf1",t[t.second=1]="second",t[t.minute=60]="minute",t[t.hour=3600]="hour",t[t.day=86400]="day",t[t.week=604800]="week",t[t.month=2678400]="month",t[t.year=31536e3]="year",t[t.maxtime=Number.MAX_VALUE]="maxtime"}(h||(h={}));var l=function(){function t(t){this.ticks=t}return Object.defineProperty(t.prototype,"Ticks",{get:function(){return this.ticks},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"TotalSeconds",{get:function(){return this.ticks/1e7},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"TotalDays",{get:function(){return this.ticks/1e7/86400},enumerable:!0,configurable:!0}),t.fromSeconds=function(e){return new t(1e7*e)},t.fromDays=function(e){return new t(1e7*e*24*60*60)},t.TicksPerSecond=1e7,t}(),c=function(){function i(i){t.isDate(i)?this.init(i):t.isNumber(i)&&this.init(e.FlexChart._fromOADate(i))}return i.prototype.init=function(t){this.year=t.getFullYear(),this.month=t.getMonth(),this.day=t.getDate(),this.hour=t.getHours(),this.minute=t.getMinutes(),this.second=t.getSeconds()},i.prototype.getTimeAsDateTime=function(){this.hour>=24&&(this.hour-=24,this.day+=1),this.month<0?(-1-this.day,this.month=1):this.month>11&&(this.month-12,this.month=12),this.day<1?(-1-this.day,this.day=1):this.day>28&&2==this.month?(this.day-28,this.day=28):this.day>30&&(4==this.month||4==this.month||6==this.month||9==this.month||11==this.month)?(this.day-30,this.day=30):this.day>31&&(this.day-31,this.day=31),this.second>59&&(this.second-59,this.second=59);return this.minute>59&&(this.minute-59,this.minute=59),new Date(this.year,this.month,this.day,this.hour,this.minute,this.second)},i.prototype.getTimeAsDouble=function(){return this.getTimeAsDateTime().valueOf()},i.tround=function(t,e,i){var n=t/e*e;return n-=n%1,i&&n!=t&&(n+=e-=e%1),n},i.RoundTime=function(t,e,n){var r=24*e*60*60;if(r>0){var s=new i(t);return r<h.minute?(s.second=this.tround(s.second,r,n),s.getTimeAsDouble()):(s.second=0,r<h.hour?(r/=h.minute,s.minute=this.tround(s.minute,r,n),s.getTimeAsDouble()):(s.minute=0,r<h.day?(r/=h.hour,s.hour=this.tround(s.hour,r,n),s.getTimeAsDouble()):(s.hour=0,r<h.month?(r/=h.day,s.day=this.tround(s.day,r,n),s.getTimeAsDouble()):(s.day=1,r<h.year?(r/=h.month,1!=s.month&&(s.month=this.tround(s.month,r,n)),s.getTimeAsDouble()):(s.month=1,r/=h.year,s.year=this.tround(s.year,r,n),s.getTimeAsDouble())))))}var o=t,a=o-r,l=a/e*e;return n&&l!=a&&(l+=e),o=r+l},i.TimeSpanFromTmInc=function(t){var e=l.fromSeconds(1);if(t!=h.maxtime)if(t>h.tickf1)e=l.fromSeconds(t);else{var i=t,n=1;for(i+=7;i>0;)n*=10,i--;e=new l(n)}return e},i.manualTimeInc=function(t){var e=h.second;if(null==t||0==t.length)return e;var i=t.indexOf("f");if(i>=0){var n=-1;if(i>0&&"%"==t.substr(i-1,1))n=-1;else for(var r=1;r<6&&!(i+r>=t.length)&&"f"==t.substr(i+r,1);r++)n--;e=n}else t.indexOf("s")>=0?e=h.second:t.indexOf("m")>=0?e=h.minute:t.indexOf("h")>=0||t.indexOf("H")?e=h.hour:t.indexOf("d")>=0?e=h.day:t.indexOf("M")>=0?e=h.month:t.indexOf("y")>=0&&(e=h.year);return e},i.getNiceInc=function(t,e,i){for(var n=0;n<t.length;n++){var r=t[n]*i;if(e<=r)return r}return 0},i.NiceTimeSpan=function(t,e){var n=h.second;null!=e&&e.length>0&&(n=i.manualTimeInc(e));var r=0,s=0;if(n<h.second&&t.TotalSeconds<10){for(r=t.Ticks,s=i.TimeSpanFromTmInc(n).Ticks;r>10*s;)s*=10;var o=s;return r>o&&(o*=2),r>o&&(o=5*s),r>o&&(o=10*s),new l(o)}if(0==(r=Math.ceil(t.TotalSeconds)))return i.TimeSpanFromTmInc(n);if(s=1,n<h.minute){if(r<h.minute&&0!=(s=i.getNiceInc([1,2,5,10,15,30],r,n)))return l.fromSeconds(s);n=h.minute}if(n<h.hour){if(r<h.hour&&0!=(s=i.getNiceInc([1,2,5,10,15,30],r,n)))return l.fromSeconds(s);n=h.hour}if(n<h.day){if(r<h.day&&0!=(s=i.getNiceInc([1,3,6,12],r,n)))return l.fromSeconds(s);n=h.day}if(n<h.month){if(r<h.month&&0!=(s=i.getNiceInc([1,2,7,14],r,n)))return l.fromSeconds(s);n=h.month}if(n<h.year){if(r<h.year&&0!=(s=i.getNiceInc([1,2,3,4,6],r,n)))return l.fromSeconds(s);n=h.year}return s=100*h.year,r<s&&0==(s=i.getNiceInc([1,2,5,10,20,50],r,n))&&(s=100*h.year),l.fromSeconds(s)},i.NiceTimeUnit=function(t,e){var n=l.fromDays(t);return(n=i.NiceTimeSpan(n,e)).TotalDays},i.GetTimeDefaultFormat=function(e,i){if(!t.isNumber(e)||!t.isNumber(i))return"";var n="s",r=l.fromSeconds(.001*(e-i)),s=r.TotalSeconds;if(s>=h.year)n="yyyy";else if(s>=h.month)n="MMM yyyy";else if(s>=h.day)n="MMM d";else if(s>=h.hour)n="ddd H:mm";else if(s>=.5*h.hour)n="H:mm";else if(s>=1)n="H:mm:ss";else if(s>0){var o=r.Ticks;for(n="s.";o<l.TicksPerSecond;)o*=10,n+="f"}return n},i.secInYear=86400,i}()}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(){function e(e){this._row=0,this._col=0,this._rect=new t.Rect(0,0,0,0),e&&t.copy(this,e)}return Object.defineProperty(e.prototype,"row",{get:function(){return this._row},set:function(e){e!=this._row&&(this._row=t.asInt(e,!0,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"column",{get:function(){return this._col},set:function(e){e!=this._col&&(this._col=t.asInt(e,!0,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){e!=this._name&&(this._name=t.asString(e,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){t!=this._width&&(this._width=t,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){t!=this._height&&(this._height=t,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._style},set:function(t){t!=this._style&&(this._style=t,this._invalidate())},enumerable:!0,configurable:!0}),e.prototype._invalidate=function(){this._chart&&this._chart.invalidate()},e.prototype._render=function(t){t.drawRect(this._rect.left,this._rect.top,this._rect.width,this._rect.height,null,this.style)},e.prototype._setPlotX=function(t,e){this._rect.left=t,this._rect.width=e},e.prototype._setPlotY=function(t,e){this._rect.top=t,this._rect.height=e},e}();e.PlotArea=i;var n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.getPlotArea=function(t){var e=this.indexOf(t);return e>-1?this[e]:null},e.prototype.indexOf=function(t){for(var e=0;e<this.length;e++)if(this[e].name==t)return e;return-1},e.prototype._getWidth=function(t){for(var e=0;e<this.length;e++){var i=this[e];if(i.column==t&&0==i.row)return i.width}},e.prototype._getHeight=function(t){for(var e=0;e<this.length;e++){var i=this[e];if(i.row==t&&0==i.column)return i.height}},e.prototype._calculateWidths=function(t,e){if(e<=0)throw"ncols";for(var i=[],n=0;n<e;n++){var r=this._getWidth(n);i[n]=new s(r)}return this._calculateLengths(t,e,i)},e.prototype._calculateHeights=function(t,e){if(e<=0)throw"nrows";for(var i=[],n=0;n<e;n++){var r=this._getHeight(n);i[n]=new s(r)}return this._calculateLengths(t,e,i)},e.prototype._calculateLengths=function(t,e,i){for(var n=[e],r=0,s=0,o=0;o<e;o++)i[o].isAbsolute?(n[o]=i[o].value,r+=n[o]):i[o].isStar?s+=i[o].value:i[o].isAuto&&s++;for(var a=(t-r)/s,o=0;o<e;o++)i[o].isStar?n[o]=a*i[o].value:i[o].isAuto&&(n[o]=a),n[o]<0&&(n[o]=0);return n},e}(t.collections.ObservableArray);e.PlotAreaCollection=n;var r;!function(t){t[t.Auto=0]="Auto",t[t.Pixel=1]="Pixel",t[t.Star=2]="Star"}(r||(r={}));var s=function(){function t(t){void 0===t&&(t=null),this._unitType=r.Auto,t&&((t=t.toString()).indexOf("*")>=0?(this._unitType=r.Star,t=t.replace("*",""),this._value=parseFloat(t),isNaN(this._value)&&(this._value=1)):(this._unitType=r.Pixel,this._value=parseFloat(t),isNaN(this._value)&&(this._unitType=r.Auto,this._value=1)))}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isStar",{get:function(){return this._unitType==r.Star},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAbsolute",{get:function(){return this._unitType==r.Pixel},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAuto",{get:function(){return this._unitType==r.Auto},enumerable:!0,configurable:!0}),t}()}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i;!function(t){t[t.Visible=0]="Visible",t[t.Plot=1]="Plot",t[t.Legend=2]="Legend",t[t.Hidden=3]="Hidden"}(i=e.SeriesVisibility||(e.SeriesVisibility={}));var n;!function(t){t[t.Dot=0]="Dot",t[t.Box=1]="Box"}(n=e.Marker||(e.Marker={}));var r=function(){return function(){}}();e.DataArray=r;var s=function(e){function i(i){var n=e.call(this)||this;return n._series=t.asType(i,o),n}return __extends(i,e),Object.defineProperty(i.prototype,"series",{get:function(){return this._series},enumerable:!0,configurable:!0}),i}(t.EventArgs);e.SeriesEventArgs=s;var o=function(){function o(e){this._altStyle=null,this._symbolMarker=n.Dot,this._visibility=i.Visible,this.rendering=new t.Event,this.rendered=new t.Event,e&&this.initialize(e)}return Object.defineProperty(o.prototype,"style",{get:function(){return this._style},set:function(t){t!=this._style&&(this._style=t,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"altStyle",{get:function(){return this._altStyle},set:function(t){t!=this._altStyle&&(this._altStyle=t,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"symbolStyle",{get:function(){return this._symbolStyle},set:function(t){t!=this._symbolStyle&&(this._symbolStyle=t,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"symbolSize",{get:function(){return this._symbolSize},set:function(e){e!=this._symbolSize&&(this._symbolSize=t.asNumber(e,!0,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"symbolMarker",{get:function(){return this._symbolMarker},set:function(e){(e=t.asEnum(e,n,!0))!=this._symbolMarker&&(this._symbolMarker=e,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"binding",{get:function(){return this._binding?this._binding:this._chart?this._chart.binding:null},set:function(e){e!=this._binding&&(this._binding=t.asString(e,!0),this._clearValues(),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"bindingX",{get:function(){return this._bindingX?this._bindingX:this._chart?this._chart.bindingX:null},set:function(e){e!=this._bindingX&&(this._bindingX=t.asString(e,!0),this._clearValues(),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"name",{get:function(){return this._name},set:function(t){this._name=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"itemsSource",{get:function(){return this._itemsSource},set:function(e){e!=this._itemsSource&&(this._cv&&(this._cv.currentChanged.removeHandler(this._cvCurrentChanged,this),this._cv.collectionChanged.removeHandler(this._cvCollectionChanged,this),this._cv=null),this._itemsSource=e,this._cv=t.asCollectionView(e),null!=this._cv&&(this._cv.currentChanged.addHandler(this._cvCurrentChanged,this),this._cv.collectionChanged.addHandler(this._cvCollectionChanged,this)),this._clearValues(),this._itemsSource=e,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"collectionView",{get:function(){return this._cv?this._cv:this._chart?this._chart.collectionView:null},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"chart",{get:function(){return this._chart},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hostElement",{get:function(){return this._hostElement},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"legendElement",{get:function(){return this._legendElement},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"cssClass",{get:function(){return this._cssClass},set:function(e){this._cssClass=t.asString(e,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"visibility",{get:function(){return this._visibility},set:function(e){(e=t.asEnum(e,i))!=this._visibility&&(this._visibility=e,this._clearValues(),this._invalidate(),this._chart&&this._chart.onSeriesVisibilityChanged(new s(this)))},enumerable:!0,configurable:!0}),o.prototype.hitTest=function(e,i){return t.isNumber(e)&&t.isNumber(i)?e=new t.Point(e,i):e instanceof MouseEvent&&(e=new t.Point(e.pageX,e.pageY)),t.asType(e,t.Point),this._chart?this._chart._hitTestSeries(e,this._chart.series.indexOf(this)):null},o.prototype.getPlotElement=function(t){if(this.hostElement&&t<this._pointIndexes.length){var e=this._pointIndexes[t];if(e<this.hostElement.childNodes.length)return this.hostElement.childNodes[e]}return null},Object.defineProperty(o.prototype,"axisX",{get:function(){return this._axisX},set:function(i){if(i!=this._axisX){if(this._axisX=t.asType(i,e.Axis,!0),this._axisX){var n=this._axisX._chart=this._chart;n&&-1==n.axes.indexOf(this._axisX)&&n.axes.push(this._axisX)}this._invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"axisY",{get:function(){return this._axisY},set:function(i){if(i!=this._axisY){if(this._axisY=t.asType(i,e.Axis,!0),this._axisY){var n=this._axisY._chart=this._chart;n&&-1==n.axes.indexOf(this._axisY)&&n.axes.push(this._axisY)}this._invalidate()}},enumerable:!0,configurable:!0}),o.prototype.initialize=function(e){e&&t.copy(this,e)},o.prototype.pointToData=function(e){return t.asType(e,t.Point),e=e.clone(),e.x=this._getAxisX().convertBack(e.x),e.y=this._getAxisY().convertBack(e.y),e},o.prototype.dataToPoint=function(e){return t.asType(e,t.Point),e=e.clone(),e.x=this._getAxisX().convert(e.x),e.y=this._getAxisY().convert(e.y),e},o.prototype.onRendering=function(t,i,n){var r=new e.SeriesRenderingEventArgs(t,i,n);return this.rendering.raise(this,r),r.cancel},o.prototype.onRendered=function(t){this.rendered.raise(this,new e.RenderEventArgs(t))},Object.defineProperty(o.prototype,"_chart",{get:function(){return this.__chart},set:function(t){t!==this.__chart&&(this.__chart=t)},enumerable:!0,configurable:!0}),o.prototype._getSymbolSize=function(){return null!=this.symbolSize?this.symbolSize:this.chart.symbolSize},Object.defineProperty(o.prototype,"_plotter",{get:function(){return this.chart&&!this.__plotter&&(this.__plotter=this.chart._getPlotter(this)),this.__plotter},set:function(t){t!=this.__plotter&&(this.__plotter=t)},enumerable:!0,configurable:!0}),o.prototype.getDataType=function(t){return 0==t?this._valueDataType:1==t?this._xvalueDataType:null},o.prototype.getValues=function(t){if(0==t){if(null==this._values)if(this._valueDataType=null,null!=this._cv){i=this._bindValues(this._cv.items,this._getBinding(0));this._values=i.values,this._valueDataType=i.dataType}else if(null!=this.binding&&null!=this._chart&&null!=this._chart.collectionView){i=this._bindValues(this._chart.collectionView.items,this._getBinding(0));this._values=i.values,this._valueDataType=i.dataType}return this._values}if(1==t){if(null==this._xvalues){this._xvalueDataType=null;var e=this;if(null!=this.bindingX)if(null!=e._cv){i=this._bindValues(e._cv.items,this.bindingX,!0);this._xvalueDataType=i.dataType,this._xvalues=i.values}else{if(null==this._bindingX)return null;if(null!=e._chart&&null!=e._chart.collectionView){var i=this._bindValues(e._chart.collectionView.items,this.bindingX,!0);this._xvalueDataType=i.dataType,this._xvalues=i.values}}}return this._xvalues}return null},o.prototype.drawLegendItem=function(t,i,n){var r=this._getChartType();null==r&&(r=this._chart._getChartType()),r===e.ChartType.Funnel?this._drawFunnelLegendItem(t,i,n,this.style,this.symbolStyle):this._drawLegendItem(t,i,r,this.name,this.style,this.symbolStyle)},o.prototype.measureLegendItem=function(t,i){var n=this._getChartType();return null==n&&(n=this._chart._getChartType()),n===e.ChartType.Funnel?this._measureLegendItem(t,this._getFunnelLegendName(i)):this._measureLegendItem(t,this.name)},o.prototype.legendItemLength=function(){var t=this._getChartType();return null==t&&(t=this._chart._getChartType()),t===e.ChartType.Funnel&&this._chart._xlabels&&this._chart._xlabels.length?this._chart._xlabels.length:1},o.prototype.getDataRect=function(t,e){return null},o.prototype._getChartType=function(){return this._chartType},o.prototype._clearValues=function(){this._values=null,this._xvalues=null,this.__plotter=null},o.prototype._getBinding=function(t){var e=this.binding;if(e){var i=this.chart?this.chart._bindingSeparator:",";if(i){var n=e.split(i);n&&n.length>t&&(e=n[t].trim())}}return e},o.prototype._getBindingValues=function(t){var e;return null!=this._cv?e=this._cv.items:null!=this._chart&&null!=this._chart.collectionView&&(e=this._chart.collectionView.items),this._bindValues(e,this._getBinding(t)).values},o.prototype._getItem=function(t){var e=null,i=null;return null!=this.itemsSource?i=null!=this._cv?this._cv.items:this.itemsSource:null!=this._chart.itemsSource&&(i=null!=this._chart.collectionView?this._chart.collectionView.items:this._chart.itemsSource),null!=i&&(e=i[t]),e},o.prototype._getLength=function(){var t=0,e=null;return null!=this.itemsSource?e=null!=this._cv?this._cv.items:this.itemsSource:null!=this._chart.itemsSource&&(e=null!=this._chart.collectionView?this._chart.collectionView.items:this._chart.itemsSource),null!=e&&(t=e.length),t},o.prototype._setPointIndex=function(t,e){this._pointIndexes[t]=e},o.prototype._getDataRect=function(){var e=this.getValues(0),i=this.getValues(1);if(e){for(var n=NaN,r=NaN,s=NaN,o=NaN,a=e.length,h=0;h<a;h++){var l=e[h];if(isFinite(l)&&(isNaN(r)?r=o=l:l<r?r=l:l>o&&(o=l)),i){var c=i[h];isFinite(c)&&(isNaN(n)?n=s=c:c<n?n=c:l>o&&(s=c))}}if(i||(n=0,s=a-1),!isNaN(r))return new t.Rect(n,r,s-n,o-r)}return null},o.prototype._isCustomAxisX=function(){return!!this._axisX&&(!this._chart||this._axisX!=this.chart.axisX)},o.prototype._isCustomAxisY=function(){return!!this._axisY&&(!this._chart||this._axisY!=this.chart.axisY)},o.prototype._getAxisX=function(){var t=null;return this.axisX?t=this.axisX:this.chart&&(t=this.chart.axisX),t},o.prototype._getAxisY=function(){var t=null;return this.axisY?t=this.axisY:this.chart&&(t=this.chart.axisY),t},o.prototype._measureLegendItem=function(i,n){var r=new t.Size;if(r.width=e.Series._LEGEND_ITEM_WIDTH,r.height=e.Series._LEGEND_ITEM_HEIGHT,this._name){var s=i.measureString(n,e.FlexChart._CSS_LABEL,e.FlexChart._CSS_LEGEND);r.width+=s.width,r.height<s.height&&(r.height=s.height)}return r.width+=3*e.Series._LEGEND_ITEM_MARGIN,r.height+=2*e.Series._LEGEND_ITEM_MARGIN,r},o.prototype._drawFunnelLegendItem=function(i,n,r,s,o){i.strokeWidth=1;var a=e.Series._LEGEND_ITEM_MARGIN,h=null,l=null;null===h&&(h=this._chart._getColorLight(r)),null===l&&(l=this._chart._getColor(r)),i.fill=h,i.stroke=l;var c=n.top+.5*n.height,u=e.Series._LEGEND_ITEM_WIDTH,_=e.Series._LEGEND_ITEM_HEIGHT,p=this._getFunnelLegendName(r);i.drawRect(n.left+a,c-.5*_,u,_,null,o||s),p&&e.FlexChart._renderText(i,p,new t.Point(n.left+_+2*a,c),0,1,e.FlexChart._CSS_LABEL,e.FlexChart._CSS_LEGEND)},o.prototype._getFunnelLegendName=function(t){var e;return this._chart._xlabels&&this._chart._xlabels.length&&(e=this._chart._xlabels[t]),e||(e=this.name),e},o.prototype._drawLegendItem=function(i,r,s,o,a,h){i.strokeWidth=1;var l=e.Series._LEGEND_ITEM_MARGIN,c=null,u=null;null===c&&(c=this._chart._getColorLight(this._chart.series.indexOf(this))),null===u&&(u=this._chart._getColor(this._chart.series.indexOf(this))),i.fill=c,i.stroke=u;var _=r.top+.5*r.height,p=e.Series._LEGEND_ITEM_WIDTH,d=e.Series._LEGEND_ITEM_HEIGHT;switch(s){case e.ChartType.Area:case e.ChartType.SplineArea:i.drawRect(r.left+l,_-.5*d,p,d,null,a);break;case e.ChartType.Bar:case e.ChartType.Column:i.drawRect(r.left+l,_-.5*d,p,d,null,h||a);break;case e.ChartType.Scatter:case e.ChartType.Bubble:var f=.3*p,g=.3*d;this.symbolMarker==n.Box?i.drawRect(r.left+l+.5*p-f,_-g,2*f,2*g,null,h||a):i.drawEllipse(r.left+.5*p+l,_,f,g,null,h||a);break;case e.ChartType.Line:case e.ChartType.Spline:i.drawLine(r.left+l,_,r.left+p+l,_,null,a);break;case e.ChartType.LineSymbols:case e.ChartType.SplineSymbols:var f=.3*p,g=.3*d;this.symbolMarker==n.Box?i.drawRect(r.left+l+.5*p-f,_-g,2*f,2*g,null,h||a):i.drawEllipse(r.left+.5*p+l,_,f,g,null,h||a),i.drawLine(r.left+l,_,r.left+p+l,_,null,a);break;case e.ChartType.Candlestick:case e.ChartType.HighLowOpenClose:i.drawLine(r.left+l,_,r.left+p+l,_,null,h||a)}this._name&&e.FlexChart._renderText(i,o,new t.Point(r.left+d+2*l,_),0,1,e.FlexChart._CSS_LABEL,e.FlexChart._CSS_LEGEND)},o.prototype._cvCollectionChanged=function(t,e){this._clearValues(),this._invalidate()},o.prototype._cvCurrentChanged=function(t,e){this._chart&&this._chart._notifyCurrentChanged&&this._invalidate()},o.prototype._bindValues=function(e,i,n){void 0===n&&(n=!1);var s,o,a;if(null!=e){var h=e.length;s=new Array(e.length);for(var l=0;l<h;l++){a=null;var c=e[l];null!=i&&(c=c[i]),t.isArray(c)&&c.length>0&&(a=c,c=c[0]),t.isNumber(c)?(s[l]=c,o=t.DataType.Number):t.isDate(c)?(s[l]=c.valueOf(),o=t.DataType.Date):n&&c&&(s[l]=l,o=t.DataType.Number),t.isArray(a)&&a.length>0&&(s[l]=a)}}var u=new r;return u.values=s,u.dataType=o,u},o.prototype._invalidate=function(){this._chart&&this._chart.invalidate()},o.prototype._indexToPoint=function(e){if(e>=0&&e<this._values.length){var i=this._values[e],n=this._xvalues?this._xvalues[e]:e;return new t.Point(n,i)}return null},o.prototype._getSymbolFill=function(t){var e=null;return this.symbolStyle&&(e=this.symbolStyle.fill),!e&&this.style&&(e=this.style.fill),!e&&this.chart&&(e=this.chart._getColorLight(t)),e},o.prototype._getSymbolStroke=function(t){var e=null;return this.symbolStyle&&(e=this.symbolStyle.stroke),!e&&this.style&&(e=this.style.stroke),!e&&this.chart&&(e=this.chart._getColor(t)),e},o.prototype._getAltSymbolStroke=function(t){var e=null;return this.altStyle&&(e=this.altStyle.stroke),e},o.prototype._getAltSymbolFill=function(t){var e=null;return this.altStyle&&(e=this.altStyle.fill),e},o.prototype._renderLabels=function(t,e,i,n){this._plotter&&this._plotter._renderLabels(t,this,e,i,n)},o._LEGEND_ITEM_WIDTH=10,o._LEGEND_ITEM_HEIGHT=10,o._LEGEND_ITEM_MARGIN=4,o._DEFAULT_SYM_SIZE=10,o}();e.SeriesBase=o}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(i){function n(){return null!==i&&i.apply(this,arguments)||this}return __extends(n,i),Object.defineProperty(n.prototype,"chartType",{get:function(){return this._chartType},set:function(i){(i=t.asEnum(i,e.ChartType,!0))!=this._chartType&&(this._chartType=i,this._invalidate())},enumerable:!0,configurable:!0}),n}(e.SeriesBase);e.Series=i}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(t){"use strict"}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var i=function(){function i(t){this._strokeWidth=1,this._fontSize=null,this._fontFamily=null,this._savedGradient={},this._bbCache={},this._element=t,this._create(),this._element.appendChild(this._svg),void 0===i._isff&&(i._isff=navigator.userAgent.toLowerCase().indexOf("firefox")>=0)}return i.prototype.beginRender=function(){for(;this._svg.firstChild;)t.removeChild(this._svg.firstChild);this._savedGradient={},this._bbCache={},this._svg.appendChild(this._defs),this._svg.appendChild(this._textGroup)},i.prototype.endRender=function(){t.removeChild(this._textGroup)},i.prototype.setViewportSize=function(t,e){this._svg.setAttribute("width",t.toString()),this._svg.setAttribute("height",e.toString())},Object.defineProperty(i.prototype,"element",{get:function(){return this._svg},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fill",{get:function(){return this._fill},set:function(t){this._fill=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(t){this._fontFamily=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"stroke",{get:function(){return this._stroke},set:function(t){this._stroke=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"strokeWidth",{get:function(){return this._strokeWidth},set:function(t){this._strokeWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"textFill",{get:function(){return this._textFill},set:function(t){this._textFill=t},enumerable:!0,configurable:!0}),i.prototype.addClipRect=function(t,e){if(t&&e){var n=document.createElementNS(i.svgNS,"clipPath"),r=document.createElementNS(i.svgNS,"rect");r.setAttribute("x",(t.left-1).toFixed()),r.setAttribute("y",(t.top-1).toFixed()),r.setAttribute("width",(t.width+2).toFixed()),r.setAttribute("height",(t.height+2).toFixed()),n.appendChild(r),n.setAttribute("id",e),this._svg.appendChild(n)}},i.prototype.drawEllipse=function(t,e,n,r,s,o){var a=document.createElementNS(i.svgNS,"ellipse");return this._applyColor(a,"stroke",this._stroke),null!==this._strokeWidth&&a.setAttribute("stroke-width",this._strokeWidth.toString()),this._applyColor(a,"fill",this._fill),a.setAttribute("cx",t.toFixed(1)),a.setAttribute("cy",e.toFixed(1)),a.setAttribute("rx",n.toFixed(1)),a.setAttribute("ry",r.toFixed(1)),s&&a.setAttribute("class",s),this._applyStyle(a,o),this._appendChild(a),a},i.prototype.drawRect=function(t,e,n,r,s,o,a){var h=document.createElementNS(i.svgNS,"rect");return this._applyColor(h,"fill",this._fill),this._applyColor(h,"stroke",this._stroke),null!==this._strokeWidth&&h.setAttribute("stroke-width",this._strokeWidth.toString()),h.setAttribute("x",t.toFixed(1)),h.setAttribute("y",e.toFixed(1)),n>0&&n<.05?h.setAttribute("width","0.1"):h.setAttribute("width",n.toFixed(1)),r>0&&r<.05?h.setAttribute("height","0.1"):h.setAttribute("height",r.toFixed(1)),a&&h.setAttribute("clip-path","url(#"+a+")"),s&&h.setAttribute("class",s),this._applyStyle(h,o),this._appendChild(h),h},i.prototype.drawLine=function(t,e,n,r,s,o){var a=document.createElementNS(i.svgNS,"line");return this._applyColor(a,"stroke",this._stroke),null!==this._strokeWidth&&a.setAttribute("stroke-width",this._strokeWidth.toString()),a.setAttribute("x1",t.toFixed(1)),a.setAttribute("x2",n.toFixed(1)),a.setAttribute("y1",e.toFixed(1)),a.setAttribute("y2",r.toFixed(1)),s&&a.setAttribute("class",s),this._applyStyle(a,o),this._appendChild(a),a},i.prototype.drawLines=function(t,e,n,r,s){if(t&&e){var o=Math.min(t.length,e.length);if(o>0){var a=document.createElementNS(i.svgNS,"polyline");this._applyColor(a,"stroke",this._stroke),null!==this._strokeWidth&&a.setAttribute("stroke-width",this._strokeWidth.toString()),a.setAttribute("fill","none");for(var h="",l=0;l<o;l++)h+=t[l].toFixed(1)+","+e[l].toFixed(1)+" ";return a.setAttribute("points",h),n&&a.setAttribute("class",n),s&&a.setAttribute("clip-path","url(#"+s+")"),this._applyStyle(a,r),this._appendChild(a),a}}return null},i.prototype.drawSplines=function(t,n,r,s,o){if(t&&n){var a=new e._Spline(t,n).calculate(),h=a.xs,l=a.ys,c=Math.min(h.length,l.length);if(c>0){var u=document.createElementNS(i.svgNS,"polyline");this._applyColor(u,"stroke",this._stroke),null!==this._strokeWidth&&u.setAttribute("stroke-width",this._strokeWidth.toString()),u.setAttribute("fill","none");for(var _="",p=0;p<c;p++)_+=h[p].toFixed(1)+","+l[p].toFixed(1)+" ";return u.setAttribute("points",_),r&&u.setAttribute("class",r),o&&u.setAttribute("clip-path","url(#"+o+")"),this._applyStyle(u,s),this._appendChild(u),u}}return null},i.prototype.drawPolygon=function(t,e,n,r,s){if(t&&e){var o=Math.min(t.length,e.length);if(o>0){var a=document.createElementNS(i.svgNS,"polygon");this._applyColor(a,"stroke",this._stroke),null!==this._strokeWidth&&a.setAttribute("stroke-width",this._strokeWidth.toString()),this._applyColor(a,"fill",this._fill);for(var h="",l=0;l<o;l++)h+=t[l].toFixed(1)+","+e[l].toFixed(1)+" ";return a.setAttribute("points",h),n&&a.setAttribute("class",n),s&&a.setAttribute("clip-path","url(#"+s+")"),this._applyStyle(a,r),this._appendChild(a),a}}return null},i.prototype.drawPieSegment=function(e,n,r,s,o,a,h,l){if(o>=2*Math.PI)return this.drawEllipse(e,n,r,r,a,h);var c=document.createElementNS(i.svgNS,"path");this._applyColor(c,"fill",this._fill),this._applyColor(c,"stroke",this._stroke),null!==this._strokeWidth&&c.setAttribute("stroke-width",this._strokeWidth.toString());var u=new t.Point(e,n);u.x+=r*Math.cos(s),u.y+=r*Math.sin(s);var _=s+o,p=new t.Point(e,n);p.x+=r*Math.cos(_),p.y+=r*Math.sin(_);var d=" 0 0,1 ";Math.abs(o)>Math.PI&&(d=" 0 1,1 ");var f="M "+u.x.toFixed(1)+","+u.y.toFixed(1);return f+=" A "+r.toFixed(1)+","+r.toFixed(1)+d,f+=p.x.toFixed(1)+","+p.y.toFixed(1),f+=" L "+e.toFixed(1)+","+n.toFixed(1)+" z",c.setAttribute("d",f),l&&c.setAttribute("clip-path","url(#"+l+")"),a&&c.setAttribute("class",a),this._applyStyle(c,h),this._appendChild(c),c},i.prototype.drawDonutSegment=function(e,n,r,s,o,a,h,l,c){var u=!1;a>=2*Math.PI&&(u=!0,a-=.001);var _=document.createElementNS(i.svgNS,"path");this._applyColor(_,"fill",this._fill),this._applyColor(_,"stroke",this._stroke),null!==this._strokeWidth&&_.setAttribute("stroke-width",this._strokeWidth.toString());var p=new t.Point(e,n);p.x+=r*Math.cos(o),p.y+=r*Math.sin(o);var d=o+a,f=new t.Point(e,n);f.x+=r*Math.cos(d),f.y+=r*Math.sin(d);var g=new t.Point(e,n);g.x+=s*Math.cos(d),g.y+=s*Math.sin(d);var y=new t.Point(e,n);y.x+=s*Math.cos(o),y.y+=s*Math.sin(o);var m=" 0 0,1 ",b=" 0 0,0 ";Math.abs(a)>Math.PI&&(m=" 0 1,1 ",b=" 0 1,0 ");var v="M "+p.x.toFixed(3)+","+p.y.toFixed(3);return v+=" A "+r.toFixed(3)+","+r.toFixed(3)+m,v+=f.x.toFixed(3)+","+f.y.toFixed(3),v+=u?" M "+g.x.toFixed(3)+","+g.y.toFixed(3):" L "+g.x.toFixed(3)+","+g.y.toFixed(3),v+=" A "+s.toFixed(3)+","+s.toFixed(3)+b,v+=y.x.toFixed(3)+","+y.y.toFixed(3),u||(v+=" z"),_.setAttribute("d",v),c&&_.setAttribute("clip-path","url(#"+c+")"),h&&_.setAttribute("class",h),this._applyStyle(_,l),this._appendChild(_),_},i.prototype.drawString=function(t,e,i,n){var r=this._createText(e,t);i&&r.setAttribute("class",i),this._applyStyle(r,n),this._appendChild(r);var s,o=this._getKey(t,i,this._groupCls);return this._bbCache[o]?(s=this._bbCache[o],r.setAttribute("y",(e.y-(s.y+s.height)).toFixed(1))):(s=this._getBBox(r),r.setAttribute("y",(e.y-(s.y+s.height-e.y)).toFixed(1))),r},i.prototype.drawStringRotated=function(t,e,n,r,s,o){var a=this._createText(e,t);s&&a.setAttribute("class",s),this._applyStyle(a,o);var h=document.createElementNS(i.svgNS,"g");h.setAttribute("transform","rotate("+r.toFixed(1)+","+n.x.toFixed(1)+","+n.y.toFixed(1)+")"),h.appendChild(a),this._appendChild(h);var l=this._getBBox(a);return a.setAttribute("y",(e.y-(l.y+l.height-e.y)).toFixed(1)),a},i.prototype.measureString=function(e,i,n,r){var s=new t.Size(0,0);if(!this._fontFamily&&!this._fontSize){var o=this._getKey(e,i,n);if(this._bbCache[o])return this._bbCache[o]}this._fontSize&&this._text.setAttribute("font-size",this._fontSize),this._fontFamily&&this._text.setAttribute("font-family",this._fontFamily),i&&this._text.setAttribute("class",i),n&&this._textGroup.setAttribute("class",n),this._applyStyle(this._text,r),this._setText(this._text,e);var a=this._getBBox(this._text);if(s.width=a.width,s.height=a.height,this._text.removeAttribute("font-size"),this._text.removeAttribute("font-family"),this._text.removeAttribute("class"),r)for(var h in r)this._text.removeAttribute(this._deCase(h));if(this._textGroup.removeAttribute("class"),this._text.textContent=null,!this._fontFamily&&!this._fontSize){var l=this._getKey(e,i,n);this._bbCache[l]={x:a.x,y:a.y+1e3,width:a.width,height:a.height}}return s},i.prototype.startGroup=function(t,e,n){void 0===n&&(n=!1);var r=document.createElementNS(i.svgNS,"g");return t&&(r.setAttribute("class",t),this._groupCls=t),e&&r.setAttribute("clip-path","url(#"+e+")"),this._appendChild(r),n&&r.transform.baseVal.appendItem(this._svg.createSVGTransform()),this._group=r,r},i.prototype.endGroup=function(){if(this._group){var t=this._group.parentNode;t==this._svg?(this._group=null,this._groupCls=null):(this._group=t,this._groupCls=this._getClass(this._group))}},i.prototype.drawImage=function(t,e,n,r,s){var o=document.createElementNS(i.svgNS,"image");return o.setAttributeNS(i.xlinkNS,"href",t),o.setAttribute("x",e.toFixed(1)),o.setAttribute("y",n.toFixed(1)),o.setAttribute("width",r.toFixed(1)),o.setAttribute("height",s.toFixed(1)),this._appendChild(o),o},i.prototype._appendChild=function(t){var e=this._group;e||(e=this._svg),e.appendChild(t)},i.prototype._create=function(){this._svg=document.createElementNS(i.svgNS,"svg"),this._defs=document.createElementNS(i.svgNS,"defs"),this._svg.appendChild(this._defs),this._text=this._createText(new t.Point(-1e3,-1e3),""),this._textGroup=document.createElementNS(i.svgNS,"g"),this._textGroup.appendChild(this._text),this._svg.appendChild(this._textGroup)},i.prototype._setText=function(t,e){var i=e?e.toString():null;if(i&&i.indexOf("tspan")>=0)try{t.textContent=null;for(var n='<svg xmlns="http://www.w3.org/2000/svg">'+i+"</svg>",r=(new DOMParser).parseFromString(n,"text/xml").documentElement.firstChild;r;)t.appendChild(t.ownerDocument.importNode(r,!0)),r=r.nextSibling}catch(t){throw new Error("Error parsing XML string.")}else t.textContent=i},i.prototype._getKey=function(t,e,i){return t+(e||"")+(i||"")},i.prototype._createText=function(t,e){var n=document.createElementNS(i.svgNS,"text");return this._setText(n,e),n.setAttribute("x",t.x.toFixed(1)),n.setAttribute("y",t.y.toFixed(1)),null!=this._textFill&&n.setAttribute("fill",this._textFill),this._fontSize&&n.setAttribute("font-size",this._fontSize),this._fontFamily&&n.setAttribute("font-family",this._fontFamily),n},i.prototype._applyStyle=function(t,e){if(e)for(var i in e)"fill"===i||"stroke"===i?this._applyColor(t,i,e[i]):t.setAttribute(this._deCase(i),e[i])},i.prototype._deCase=function(t){return t.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()})},i.prototype._getClass=function(t){var e;if(t)for(var i=t;i&&!(e=i.getAttribute("class"));i=i.parentNode);return e},i.prototype._getBBox=function(t){if(!i._isff)return t.getBBox();try{return t.getBBox()}catch(t){return{x:0,y:0,width:0,height:0}}},i.prototype._applyColor=function(e,r,s){var o=n.tryParse(s);if(null!=o)if(t.isString(o))e.setAttribute(r,o);else{if(null==this._savedGradient[s]){var a,h="gc"+(1e6*Math.random()).toFixed();null!=o.x1?(a=document.createElementNS(i.svgNS,"linearGradient"),["x1","y1","x2","y2","gradientUnits"].forEach(function(t){null!=o[t]&&a.setAttribute(t,o[t])})):null!=o.r&&(a=document.createElementNS(i.svgNS,"radialGradient"),["cx","cy","r","fx","fy","fr","gradientUnits"].forEach(function(t){null!=o[t]&&a.setAttribute(t,o[t])})),o.colors&&o.colors&&o.colors.length>0&&o.colors.forEach(function(t){var e=document.createElementNS(i.svgNS,"stop");null!=t.color&&e.setAttribute("stop-color",t.color),null!=t.offset&&e.setAttribute("offset",t.offset),null!=t.opacity&&e.setAttribute("stop-opacity",t.opacity),a.appendChild(e)}),a.setAttribute("id",h),this._defs.appendChild(a),this._savedGradient[s]=h}e.setAttribute(r,"url(#"+this._savedGradient[s]+")")}},i.svgNS="http://www.w3.org/2000/svg",i.xlinkNS="http://www.w3.org/1999/xlink",i}();e._SvgRenderEngine=i;var n=function(){function t(){}return t.tryParse=function(e){if(t.parsedColor[e])return t.parsedColor[e];if(null==e||-1===e.indexOf("-"))return e;var i,n=e.replace(/\s+/g,"").split(/\-/g),r=n[0][0],s=!1,o=n[0].match(/\(\S+\)/)[0].replace(/[\(\\)]/g,"").split(/\,/g);"l"===r||"L"===r?(i={x1:"0",y1:"0",x2:"0",y2:"0",colors:[]},"l"===r&&(s=!0),["x1","y1","x2","y2"].forEach(function(t,e){null!=o[e]&&(i[t]=s?100*+o[e]+"%":o[e]+"")})):"r"!==r&&"R"!==r||(i={cx:"0",cy:"0",r:"0",colors:[]},"r"===r&&(s=!0),["cx","cy","r","fx","fy","fr"].forEach(function(t,e){null!=o[e]&&""!==o[e]&&(i[t]=s?100*+o[e]+"%":o[e]+"")})),s||(i.gradientUnits="userSpaceOnUse"),t.parsedColor[e]=i;var a=n.length-1;return n.forEach(function(t,e){t.indexOf(")")>-1&&(t=t.match(/\)\S+/)[0].replace(")",""));var n=t.split(":"),r={color:"black"};null!=n[0]&&(r.color=n[0]),null!=n[1]?r.offset=s?100*+n[1]+"%":n[1]+"":r.offset=e/a*100+"%",null!=n[2]&&(r.opacity=n[2]),i.colors.push(r)}),i},t.parsedColor={},t}()}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var i=function(){function i(i){this._position=e.Position.Right,this._title="",this._titleAlign="left",this._titlePadding=5,this._areas=new Array,this._sz=new t.Size,this._colRowLens=[],this._chart=i}return Object.defineProperty(i.prototype,"position",{get:function(){return this._position},set:function(i){(i=t.asEnum(i,e.Position))!=this._position&&(this._position=i,this._chart&&this._chart.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"title",{get:function(){return this._title},set:function(e){e!=this._title&&(this._title=t.asString(e,!1),this._chart&&this._chart.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"titleAlign",{get:function(){return this._titleAlign},set:function(e){if(e!=this._titleAlign){var i=t.asString(e,!1);this._titleAlign="right"===i?"right":"center"===i?"center":"left",this._chart&&this._chart.invalidate()}},enumerable:!0,configurable:!0}),i.prototype._getDesiredSize=function(t,i,n,r){if(i==e.Position.None)return null;var s=i==e.Position.Right||i==e.Position.Left,o=this._chart._getDesiredLegendSize(t,s,n,r);if(null!=o){if(this.title.length>0){var a=t.measureString(this.title,"wj-title","wj-legend");o.height+=a.height+this._titlePadding,a.width>o.width&&(o.width=a.width)}this._sz=o}return o},i.prototype._getPosition=function(t,i){return this.position==e.Position.Auto?t>=i?e.Position.Right:e.Position.Bottom:this.position},i.prototype._render=function(t,i,n,r,s){this._areas=[];var o=n==e.Position.Right||n==e.Position.Left;if(t.fill="transparent",t.stroke=null,t.drawRect(i.x,i.y,this._sz.width,this._sz.height),this.title.length){var a=t.drawString(this.title,i,"wj-title"),h=a.getBBox();a.setAttribute("y",Number(a.getAttribute("y"))+h.height),"right"===this.titleAlign?a.setAttribute("x",i.x+r-h.width):"center"===this.titleAlign&&a.setAttribute("x",i.x+r/2-h.width/2);var l=h.height+this._titlePadding;i.y+=l,s-=l}this._chart._renderLegend(t,i,this._areas,o,r,s)},i.prototype._hitTest=function(t){for(var i=this._areas,n=0;n<i.length;n++)if(i[n]&&e.FlexChartCore._contains(i[n],t))return n;return null},i}();e.Legend=i}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var i;!function(t){t[t.PlotArea=0]="PlotArea",t[t.AxisX=1]="AxisX",t[t.AxisY=2]="AxisY",t[t.ChartArea=3]="ChartArea",t[t.Legend=4]="Legend",t[t.Header=5]="Header",t[t.Footer=6]="Footer",t[t.Series=7]="Series",t[t.SeriesSymbol=8]="SeriesSymbol",t[t.DataLabel=9]="DataLabel",t[t.None=10]="None"}(i=e.ChartElement||(e.ChartElement={}));var n=function(){function n(t,e,n){this._pointIndex=null,this._chartElement=i.None,this._chart=t,this._pt=e,this._chartElement=n}return Object.defineProperty(n.prototype,"chart",{get:function(){return this._chart},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"point",{get:function(){return this._pt},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"series",{get:function(){return this._series},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pointIndex",{get:function(){return this._pointIndex},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"chartElement",{get:function(){return this._chartElement},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"distance",{get:function(){return this._dist},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"item",{get:function(){if(null==this._item&&null!==this.pointIndex)if(null!=this.series)this._item=this.series._getItem(this.pointIndex);else{var t=this._chart._getHitTestItem(this.pointIndex);t&&(this._item=t)}return this._item},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"x",{get:function(){return void 0===this._x&&(this._x=this._getValue(1,!1)),this._x},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y",{get:function(){return void 0===this._y&&(this._y=this._getValue(0,!1)),this._y},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){var t=this._chart._getHitTestValue(this.pointIndex);return null!=t?t:this.y},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){if(void 0===this._name){var t=this._chart._getHitTestLabel(this.pointIndex);return null==t?this.series.name:t.toString()}return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_xfmt",{get:function(){return void 0===this.__xfmt&&(this.__xfmt=this._getValue(1,!0)),this.__xfmt},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_yfmt",{get:function(){return void 0===this.__yfmt&&(this.__yfmt=this._getValue(0,!0)),this.__yfmt},enumerable:!0,configurable:!0}),n.prototype._setData=function(t,e){this._series=t,this._pointIndex=e},n.prototype._setDataPoint=function(i){if(i=t.asType(i,e._DataPoint,!0)){this._pointIndex=i.pointIndex;var n=t.asType(this._chart,t.chart.FlexChartCore,!0),r=i.seriesIndex;null!==r&&r>=0&&r<n.series.length&&(this._series=n.series[r]),null!=i.item&&(this._item=i.item),null!=i.x&&(this._x=i.x),null!=i.y&&(this._y=i.y),null!=i.xfmt&&(this.__xfmt=i.xfmt),null!=i.yfmt&&(this.__yfmt=i.yfmt),null!=i.name&&(this._name=i.name)}},n.prototype._getValue=function(e,i){var n=this._chart._getHitTestValue(this.pointIndex);if(null!=n)return n;var r=null,s=this._chart,o=this.pointIndex,a=s._isRotated();if(null!==this.series&&null!==o){var h=this.series.getValues(e),l=this.series.getDataType(e);h&&this.pointIndex<h.length?(r=h[this.pointIndex],l!=t.DataType.Date||i||(r=new Date(r))):1==e&&(s._xlabels&&s._xlabels.length>0&&o<s._xlabels.length?r=s._xlabels[o]:s._xvals&&o<s._xvals.length&&(r=s._xvals[o],s._xDataType!=t.DataType.Date||i||(r=new Date(r))))}return null!==r&&i&&(a?0==e?r=this.ax._formatValue(r):1==e&&(r=this.ay._formatValue(r)):0==e?r=this.ay._formatValue(r):1==e&&(r=this.ax._formatValue(r))),r},Object.defineProperty(n.prototype,"ax",{get:function(){return this.series.axisX?this.series.axisX:this._chart.axisX},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"ay",{get:function(){return this.series.axisY?this.series.axisY:this._chart.axisY},enumerable:!0,configurable:!0}),n}();e.HitTestInfo=n}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(t){"use strict";var e=function(){function t(){}return t.standard=["#88bde6","#fbb258","#90cd97","#f6aac9","#bfa554","#bc99c7","#eddd46","#f07e6e","#8c8c8c"],t.cocoa=["#466bb0","#c8b422","#14886e","#b54836","#6e5944","#8b3872","#73b22b","#b87320","#141414"],t.coral=["#84d0e0","#f48256","#95c78c","#efa5d6","#ba8452","#ab95c2","#ede9d0","#e96b7d","#888888"],t.dark=["#005fad","#f06400","#009330","#e400b1","#b65800","#6a279c","#d5a211","#dc0127","#000000"],t.highcontrast=["#ff82b0","#0dda2c","#0021ab","#bcf28c","#19c23b","#890d3a","#607efd","#1b7700","#000000"],t.light=["#ddca9a","#778deb","#cb9fbb","#b5eae2","#7270be","#a6c7a7","#9e95c7","#95b0c7","#9b9b9b"],t.midnight=["#83aaca","#e37849","#14a46a","#e097da","#a26d54","#a584b7","#d89c54","#e86996","#2c343b"],t.modern=["#2d9fc7","#ec993c","#89c235","#e377a4","#a68931","#a672a6","#d0c041","#e35855","#68706a"],t.organic=["#9c88d9","#a3d767","#8ec3c0","#e9c3a9","#91ab36","#d4ccc0","#61bbd8","#e2d76f","#80715a"],t.slate=["#7493cd","#f99820","#71b486","#e4a491","#cb883b","#ae83a4","#bacc5c","#e5746a","#505d65"],t.zen=["#7bb5ae","#e2d287","#92b8da","#eac4cb","#7b8bbd","#c7d189","#b9a0c8","#dfb397","#a9a9a9"],t.cyborg=["#2a9fd6","#77b300","#9933cc","#ff8800","#cc0000","#00cca3","#3d6dcc","#525252","#000000"],t.superhero=["#5cb85c","#f0ad4e","#5bc0de","#d9534f","#9f5bde","#46db8c","#b6b86e","#4e5d6c","#2b3e4b"],t.flatly=["#18bc9c","#3498db","#f39c12","#6cc1be","#99a549","#8f54b5","#e74c3c","#8a9899","#2c3e50"],t.darkly=["#375a7f","#00bc8c","#3498db","#f39c12","#e74c3c","#8f61b3","#b08725","#4a4949","#000000"],t.cerulan=["#033e76","#87c048","#59822c","#53b3eb","#fc6506","#d42323","#e3bb00","#cccccc","#222222"],t}();t.Palettes=e}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var i=function(){function e(e,i){this.k=.002,this._a=[],this._b=[],this._c=[],this._d=[],this.m=[[-.5,1.5,-1.5,.5],[1,-2.5,2,-.5],[-.5,0,.5,0],[0,1,0,0]],this._x=e,this._y=i;var n=this._len=Math.min(e.length,i.length);if(n>3)for(var r=0;r<n-1;r++){var s=0==r?new t.Point(e[r],i[r]):new t.Point(e[r-1],i[r-1]),o=new t.Point(e[r],i[r]),a=new t.Point(e[r+1],i[r+1]),h=r==n-2?new t.Point(e[r+1],i[r+1]):new t.Point(e[r+2],i[r+2]),l=new t.Point,c=new t.Point,u=new t.Point,_=new t.Point;l.x=s.x*this.m[0][0]+o.x*this.m[0][1]+a.x*this.m[0][2]+h.x*this.m[0][3],c.x=s.x*this.m[1][0]+o.x*this.m[1][1]+a.x*this.m[1][2]+h.x*this.m[1][3],u.x=s.x*this.m[2][0]+o.x*this.m[2][1]+a.x*this.m[2][2]+h.x*this.m[2][3],_.x=s.x*this.m[3][0]+o.x*this.m[3][1]+a.x*this.m[3][2]+h.x*this.m[3][3],l.y=s.y*this.m[0][0]+o.y*this.m[0][1]+a.y*this.m[0][2]+h.y*this.m[0][3],c.y=s.y*this.m[1][0]+o.y*this.m[1][1]+a.y*this.m[1][2]+h.y*this.m[1][3],u.y=s.y*this.m[2][0]+o.y*this.m[2][1]+a.y*this.m[2][2]+h.y*this.m[2][3],_.y=s.y*this.m[3][0]+o.y*this.m[3][1]+a.y*this.m[3][2]+h.y*this.m[3][3],this._a.push(l),this._b.push(c),this._c.push(u),this._d.push(_)}}return e.prototype.calculatePoint=function(t){var e=Math.floor(t);e<0&&(e=0),e>this._len-2&&(e=this._len-2);var i=t-e;return{x:((this._a[e].x*i+this._b[e].x)*i+this._c[e].x)*i+this._d[e].x,y:((this._a[e].y*i+this._b[e].y)*i+this._c[e].y)*i+this._d[e].y}},e.prototype.calculate=function(){if(this._len<=3)return{xs:this._x,ys:this._y};var t=[],e=[],i=this.calculatePoint(0);t.push(i.x),e.push(i.y);for(var n=this._len*this.k,r=n;r<=this._len-1;r+=n){var s=this.calculatePoint(r);(Math.abs(i.x-s.x)>=3||Math.abs(i.y-s.y)>=3)&&(t.push(s.x),e.push(s.y),i=s)}return{xs:t,ys:e}},e}();e._Spline=i}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i;!function(t){t[t.None=0]="None",t[t.Left=1]="Left",t[t.Top=2]="Top",t[t.Right=3]="Right",t[t.Bottom=4]="Bottom",t[t.Center=5]="Center"}(i=e.LabelPosition||(e.LabelPosition={}));var n;!function(t){t[t.None=0]="None",t[t.Inside=1]="Inside",t[t.Center=2]="Center",t[t.Outside=3]="Outside",t[t.Radial=4]="Radial",t[t.Circular=5]="Circular"}(n=e.PieLabelPosition||(e.PieLabelPosition={}));var r=function(e){function i(t,i,n,r){var s=e.call(this,t)||this;return s.cancel=!1,s._ht=i,s._pt=n,s._text=r,s}return __extends(i,e),Object.defineProperty(i.prototype,"point",{get:function(){return this._pt},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"text",{get:function(){return this._text},set:function(e){this._text=t.asString(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hitTestInfo",{get:function(){return this._ht},enumerable:!0,configurable:!0}),i}(e.RenderEventArgs);e.DataLabelRenderEventArgs=r;var s=function(){function e(){this.rendering=new t.Event}return Object.defineProperty(e.prototype,"content",{get:function(){return this._content},set:function(t){t!=this._content&&(this._content=t,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"border",{get:function(){return this._bdr},set:function(e){e!=this._bdr&&(this._bdr=t.asBoolean(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offset",{get:function(){return this._off},set:function(e){e!=this._off&&(this._off=t.asNumber(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"connectingLine",{get:function(){return this._line},set:function(e){e!=this._line&&(this._line=t.asBoolean(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),e.prototype.onRendering=function(t){return this.rendering.raise(this,t),!t.cancel},e.prototype._invalidate=function(){this._chart&&this._chart.invalidate()},e}();e.DataLabelBase=s;var o=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._pos=i.Top,t}return __extends(n,e),Object.defineProperty(n.prototype,"position",{get:function(){return this._pos},set:function(e){(e=t.asEnum(e,i))!=this._pos&&(this._pos=e,this._invalidate())},enumerable:!0,configurable:!0}),n}(s);e.DataLabel=o;var a=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._pos=n.Center,t}return __extends(i,e),Object.defineProperty(i.prototype,"position",{get:function(){return this._pos},set:function(e){(e=t.asEnum(e,n))!=this._pos&&(this._pos=e,this._invalidate())},enumerable:!0,configurable:!0}),i}(s);e.PieDataLabel=a}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var i,n=new(function(){function e(){this._moveMarker=function(t){var e=t.currentTarget,i=this._markers,n=e.getAttribute("data-markerIndex");null!=n&&i[n].forEach(function(e){e._moveMarker(t)})},this._markers=[],this._bindMoveMarker=this._moveMarker.bind(this)}return e.prototype.attach=function(e){var i,n,r=e.chart.hostElement,s=this._markers,o=r.getAttribute("data-markerIndex");null!=o?(n=s[o])&&t.isArray(n)?n.push(e):(s[o]=[e],this._bindMoveEvent(r)):(i=s.length,n=[e],s.push(n),r.setAttribute("data-markerIndex",i),this._bindMoveEvent(r))},e.prototype.detach=function(t){var e,i,n=t.chart.hostElement,r=this._markers,s=n.getAttribute("data-markerIndex");null!=s&&((e=(i=r[s]).indexOf(t))>-1&&i.splice(e,1),0===i.length&&((e=r.indexOf(i))>-1&&(r[e]=void 0),this._unbindMoveEvent(n)))},e.prototype._unbindMoveEvent=function(t){var e=this._bindMoveMarker;t.removeEventListener("mousemove",e),"ontouchstart"in window&&t.removeEventListener("touchmove",e)},e.prototype._bindMoveEvent=function(t){var e=this._bindMoveMarker;t.addEventListener("mousemove",e),"ontouchstart"in window&&t.addEventListener("touchmove",e)},e}());!function(t){t[t.None=0]="None",t[t.Vertical=1]="Vertical",t[t.Horizontal=2]="Horizontal",t[t.Both=3]="Both"}(i=e.LineMarkerLines||(e.LineMarkerLines={}));var r;!function(t){t[t.None=0]="None",t[t.Move=1]="Move",t[t.Drag=2]="Drag"}(r=e.LineMarkerInteraction||(e.LineMarkerInteraction={}));var s;!function(t){t[t.Auto=2]="Auto",t[t.Right=0]="Right",t[t.Left=1]="Left",t[t.Bottom=4]="Bottom",t[t.Top=6]="Top"}(s=e.LineMarkerAlignment||(e.LineMarkerAlignment={}));var o=function(){function o(e,i){this._wrapperMousedown=null,this._wrapperMouseup=null,this.positionChanged=new t.Event;var n=this;n._chart=e,e.rendered.addHandler(n._initialize,n),n._resetDefaultValue(),t.copy(this,i),n._initialize()}return Object.defineProperty(o.prototype,"chart",{get:function(){return this._chart},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){var i=this;e!==i._isVisible&&(i._isVisible=t.asBoolean(e),i._marker&&i._toggleVisibility())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"seriesIndex",{get:function(){return this._seriesIndex},set:function(e){var i=this;e!==i._seriesIndex&&(i._seriesIndex=t.asNumber(e,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"horizontalPosition",{get:function(){return this._horizontalPosition},set:function(e){var i=this;if(e!==i._horizontalPosition){if(i._horizontalPosition=t.asNumber(e,!0),i._horizontalPosition<0||i._horizontalPosition>1)throw"horizontalPosition's value should be in (0, 1).";i._marker&&i._updateMarkerPosition()}},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"x",{get:function(){var t=this,e=t._targetPoint.x-t._plotRect.left;return t._chart.axisX.convertBack(e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"y",{get:function(){var t=this,e=t._targetPoint.y-t._plotRect.top;return t._chart.axisY.convertBack(e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"content",{get:function(){return this._content},set:function(e){e!==this._content&&(this._content=t.asFunction(e),this._updateMarkerPosition())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"verticalPosition",{get:function(){return this._verticalPosition},set:function(e){var i=this;if(e!==i._verticalPosition){if(i._verticalPosition=t.asNumber(e,!0),i._verticalPosition<0||i._verticalPosition>1)throw"verticalPosition's value should be in (0, 1).";i._marker&&i._updateMarkerPosition()}},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"alignment",{get:function(){return this._alignment},set:function(t){var e=this;t!==e._alignment&&(e._alignment=t,e._marker&&e._updatePositionByAlignment())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"lines",{get:function(){return this._lines},set:function(e){(e=t.asEnum(e,i))!=this._lines&&(this._lines=e,this._marker&&this._resetLinesVisibility())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"interaction",{get:function(){return this._interaction},set:function(e){(e=t.asEnum(e,r))!=this._interaction&&(this._marker&&this._detach(),this._interaction=e,this._marker&&this._attach(),this._toggleElesDraggableClass(this._interaction==r.Drag))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"dragThreshold",{get:function(){return this._dragThreshold},set:function(e){e!=this._dragThreshold&&(this._dragThreshold=t.asNumber(e))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"dragContent",{get:function(){return this._dragContent},set:function(e){var n=this;e!==n._dragContent&&(n._dragContent=t.asBoolean(e)),t.toggleClass(n._dragEle,o._CSS_LINE_DRAGGABLE,n._interaction===r.Drag&&n._dragContent&&n._lines!==i.None)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"dragLines",{get:function(){return this._dragLines},set:function(e){e!=this._dragLines&&(this._dragLines=t.asBoolean(e))},enumerable:!0,configurable:!0}),o.prototype.onPositionChanged=function(t){this.positionChanged.raise(this,t)},o.prototype.remove=function(){var t=this,e=t._chart;t._marker&&(e.rendered.removeHandler(t._initialize,t),t._detach(),t._removeMarker(),t._wrapperMoveMarker=null,t._wrapperMousedown=null,t._wrapperMouseup=null)},o.prototype._attach=function(){var e=this,i=e._chart.hostElement;this._interaction!==r.None?t.addClass(i,o._CSS_TOUCH_DISABLED):t.removeClass(i,o._CSS_TOUCH_DISABLED),n.attach(e),e._attachDrag()},o.prototype._attachDrag=function(){var t=this;t._interaction===r.Drag&&(t._wrapperMousedown||(t._wrapperMousedown=t._onMousedown.bind(t)),t._wrapperMouseup||(t._wrapperMouseup=t._onMouseup.bind(t)),t._toggleDragEventAttach(!0))},o.prototype._detach=function(){var e=this;t.removeClass(e._chart.hostElement,o._CSS_TOUCH_DISABLED),n.detach(e),e._detachDrag()},o.prototype._detachDrag=function(){var t=this;t._interaction===r.Drag&&t._toggleDragEventAttach(!1)},o.prototype._toggleDragEventAttach=function(t){var e=this,i=e._chart.hostElement,n=t?"addEventListener":"removeEventListener";i[n]("mousedown",e._wrapperMousedown),document[n]("mouseup",e._wrapperMouseup),"ontouchstart"in window&&i[n]("touchstart",e._wrapperMousedown),"ontouchend"in window&&document[n]("touchend",e._wrapperMouseup)},o.prototype._onMousedown=function(e){var i,n,s,a,h,l=this,c=l._getEventPoint(e);l._interaction===r.Drag&&(a=!(0===(i=t.getElementRect(l._hLine)).width||0===i.height),h=!(0===(n=t.getElementRect(l._vLine)).width||0===n.height),s=t.getElementRect(l._markerContent),l._dragContent&&l._pointInRect(c,s)?(l._capturedEle=l._markerContent,l._contentDragStartPoint=new t.Point(c.x,c.y),l._mouseDownCrossPoint=new t.Point(l._targetPoint.x,l._targetPoint.y)):a&&(Math.abs(i.top-c.y)<=l._dragThreshold||Math.abs(c.y-i.top-i.height)<=l._dragThreshold||c.y>=i.top&&c.y<=i.top+i.height)?(l._capturedEle=l._hLine,l._contentDragStartPoint=void 0,t.addClass(l._chart.hostElement,o._CSS_LINE_DRAGGABLE)):h&&(Math.abs(n.left-c.x)<=l._dragThreshold||Math.abs(c.x-n.left-n.width)<=l._dragThreshold||c.x>=n.left&&c.x<=n.left+n.width)&&(l._capturedEle=l._vLine,l._contentDragStartPoint=void 0,t.addClass(l._chart.hostElement,o._CSS_LINE_DRAGGABLE)),e.preventDefault())},o.prototype._onMouseup=function(e){var n=this,r=n._alignment===s.Auto&&n._capturedEle===n._markerContent&&n._lines!==i.None;n._capturedEle=void 0,n._contentDragStartPoint=void 0,n._mouseDownCrossPoint=void 0,r&&(n._updatePositionByAlignment(),n._updatePositionByAlignment()),t.removeClass(n._chart.hostElement,o._CSS_LINE_DRAGGABLE)},o.prototype._moveMarker=function(n){var s,o,a,h,l,c,u=this,_=u._chart,p=u._getEventPoint(n),d=u._plotRect,f=u._interaction===r.Drag,g=u._lines===i.Horizontal,y=u._lines===i.Vertical,m=u._seriesIndex,b=t.getElementRect(_.hostElement);if(d&&u._isVisible&&u._interaction!==r.None&&(u._interaction!==r.Drag||u._capturedEle&&u._lines!==i.None)){if(f&&(u._contentDragStartPoint?(p.x=g?u._targetPoint.x:u._mouseDownCrossPoint.x+p.x-u._contentDragStartPoint.x,p.y=y?u._targetPoint.y:u._mouseDownCrossPoint.y+p.y-u._contentDragStartPoint.y):g||!u._dragLines&&u._capturedEle===u._hLine?p.x=u._targetPoint.x:(y||!u._dragLines&&u._capturedEle===u._vLine)&&(p.y=u._targetPoint.y)),f&&u._lines===i.Horizontal||!u._dragLines&&u._capturedEle===u._hLine){if(p.y<=d.top||p.y>=d.top+d.height)return}else if(f&&u._lines===i.Vertical||!u._dragLines&&u._capturedEle===u._vLine){if(p.x<=d.left||p.x>=d.left+d.width)return}else if(p.x<=d.left||p.y<=d.top||p.x>=d.left+d.width||p.y>=d.top+d.height)return;if(null!=m&&m>=0&&m<_.series.length){if(s=_.series[m],null==(o=s.hitTest(new t.Point(p.x,NaN)))||null==o.x||null==o.y)return;a=s.axisX||_.axisX,h=s._getAxisY(),l=t.isDate(o.x)?e.FlexChart._toOADate(o.x):o.x,l=t.isString(l)?o.pointIndex:l,c=t.isDate(o.y)?e.FlexChart._toOADate(o.y):o.y,p.x=a.convert(l)+b.left,p.y=h.convert(c)+b.top}u._updateMarkerPosition(p),n.preventDefault()}},o.prototype._show=function(t){(t||this._marker).style.display="block"},o.prototype._hide=function(t){(t||this._marker).style.display="none"},o.prototype._toggleVisibility=function(){this._isVisible?this._show():this._hide()},o.prototype._resetDefaultValue=function(){var e=this;e._isVisible=!0,e._alignment=s.Auto,e._lines=i.None,e._interaction=r.None,e._horizontalPosition=null,e._verticalPosition=null,e._content=null,e._seriesIndex=null,e._dragThreshold=15,e._dragContent=!1,e._dragLines=!1,e._targetPoint=new t.Point},o.prototype._initialize=function(){var i,n=this,r=n._chart.hostElement.querySelector("."+e.FlexChart._CSS_PLOT_AREA);n._plot=r,n._marker||n._createMarker(),r&&(n._plotRect=t.getElementRect(r),i=r.getBBox(),n._plotRect.width=i.width,n._plotRect.height=i.height,n._updateMarkerSize(),n._updateLinesSize()),n._updateMarkerPosition(),n._wrapperMoveMarker=n._moveMarker.bind(n),n._attach()},o.prototype._createMarker=function(){var e,i,n=this;e=document.createElement("div"),t.addClass(e,o._CSS_MARKER),(i=n._getContainer()).appendChild(e),n._markerContainer=i,n._marker=e,n._createChildren()},o.prototype._removeMarker=function(){var t=this,e=t._markerContainer;e.removeChild(t._marker),t._content=null,t._hLine=null,t._vLine=null,e.hasChildNodes()||(t._chart.hostElement.removeChild(t._markerContainer),t._markerContainer=null),t._marker=null},o.prototype._getContainer=function(){var t=this._chart.hostElement.querySelector(o._CSS_MARKER_CONTAINER);return t||(t=this._createContainer()),t},o.prototype._createContainer=function(){var e=document.createElement("div"),i=this._chart.hostElement;return t.addClass(e,o._CSS_MARKER_CONTAINER),i.insertBefore(e,i.firstChild),e},o.prototype._createChildren=function(){var e,i,n,s,a=this,h=a._marker;(s=document.createElement("div")).style.position="absolute",s.style.height="100%",s.style.width="100%",h.appendChild(s),a._dragEle=s,e=document.createElement("div"),t.addClass(e,o._CSS_MARKER_CONTENT),h.appendChild(e),a._markerContent=e,i=document.createElement("div"),t.addClass(i,o._CSS_MARKER_HLINE),h.appendChild(i),a._hLine=i,n=document.createElement("div"),t.addClass(n,o._CSS_MARKER_VLINE),h.appendChild(n),a._vLine=n,a._toggleElesDraggableClass(a._interaction===r.Drag),a._resetLinesVisibility()},o.prototype._toggleElesDraggableClass=function(e){var n=this;t.toggleClass(n._hLine,o._CSS_LINE_DRAGGABLE,e),t.toggleClass(n._vLine,o._CSS_LINE_DRAGGABLE,e),t.toggleClass(n._dragEle,o._CSS_LINE_DRAGGABLE,e&&n._dragContent&&n._lines!==i.None)},o.prototype._updateMarkerSize=function(){var e=this,i=e._plotRect,n=e._chart.hostElement,r=window.getComputedStyle(n,null),s=t.getElementRect(n);e._marker&&(e._marker.style.marginTop=i.top-s.top-(parseFloat(r.getPropertyValue("padding-top"))||0)+"px",e._marker.style.marginLeft=i.left-s.left-(parseFloat(r.getPropertyValue("padding-left"))||0)+"px")},o.prototype._updateLinesSize=function(){var t=this,e=t._plotRect;t._hLine&&t._vLine&&(t._hLine.style.width=e.width+"px",t._vLine.style.height=e.height+"px")},o.prototype._resetLinesVisibility=function(){var t=this;t._hLine&&t._vLine&&(t._hide(t._hLine),t._hide(t._vLine),t._lines!==i.Horizontal&&t._lines!==i.Both||t._show(t._hLine),t._lines!==i.Vertical&&t._lines!==i.Both||t._show(t._vLine))},o.prototype._updateMarkerPosition=function(t){var e,i,n=this,r=n._plotRect,s=n._targetPoint,o=!1;n._interaction;n._plot&&(e=r.left+r.width*(n._horizontalPosition||0),i=r.top+r.height*(n._verticalPosition||0),null==n._horizontalPosition&&t&&(e=t.x),null==n._verticalPosition&&t&&(i=t.y),e===s.x&&i===s.y||(o=!0),s.x=e,s.y=i,n._toggleVisibility(),n._content&&n._updateContent(),o&&n._raisePositionChanged(e,i),n._updatePositionByAlignment(!!t))},o.prototype._updateContent=function(){var t,e=this,i=e._chart,n=e._targetPoint,r=i.hitTest(n);t=e._content.call(null,r,n),e._markerContent.innerHTML=t||""},o.prototype._raisePositionChanged=function(e,i){this._plotRect;this.onPositionChanged(new t.Point(e,i))},o.prototype._updatePositionByAlignment=function(t){var e=this,i=e._alignment,n=e._targetPoint,o=e._marker,a=0,h=0,l=o.clientWidth,c=o.clientHeight,u=e._plotRect;e._plot&&(!e._capturedEle||e._capturedEle&&e._capturedEle!==e._markerContent?(i===s.Auto?(n.x+l+12>u.left+u.width&&n.x-l>=0&&(h=l),a=c,n.y-c<u.top&&(a=0)):(1==(1&i)&&(h=l),2==(2&i)&&(a=c)),e._interaction===r.Move&&0===a&&0===h&&(h=-12)):(parseInt(e._hLine.style.top)>0&&(a=c),parseInt(e._vLine.style.left)>0&&(h=l)),o.style.left=n.x-h-u.left+"px",o.style.top=n.y-a-u.top+"px",e._hLine.style.top=a+"px",e._hLine.style.left=u.left-n.x+h+"px",e._vLine.style.top=u.top-n.y+a+"px",e._vLine.style.left=h+"px")},o.prototype._getEventPoint=function(e){return e instanceof MouseEvent?new t.Point(e.pageX,e.pageY):new t.Point(e.changedTouches[0].pageX,e.changedTouches[0].pageY)},o.prototype._pointInRect=function(t,e){return!(!t||!e)&&(t.x>=e.left&&t.x<=e.left+e.width&&t.y>=e.top&&t.y<=e.top+e.height)},o._CSS_MARKER="wj-chart-linemarker",o._CSS_MARKER_HLINE="wj-chart-linemarker-hline",o._CSS_MARKER_VLINE="wj-chart-linemarker-vline",o._CSS_MARKER_CONTENT="wj-chart-linemarker-content",o._CSS_MARKER_CONTAINER="wj-chart-linemarker-container",o._CSS_LINE_DRAGGABLE="wj-chart-linemarker-draggable",o._CSS_TOUCH_DISABLED="wj-flexchart-touch-disabled",o}();e.LineMarker=o}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var i=function(){function t(t,e,i,n){this._seriesIndex=t,this._pointIndex=e,this._dataX=i,this._dataY=n}return Object.defineProperty(t.prototype,"seriesIndex",{get:function(){return this._seriesIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pointIndex",{get:function(){return this._pointIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataX",{get:function(){return this._dataX},set:function(t){t!==this._dataX&&(this._dataX=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dataY",{get:function(){return this._dataY},set:function(t){t!==this._dataY&&(this._dataY=t)},enumerable:!0,configurable:!0}),t}();e._DataPoint=i;var n;!function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.XY=2]="XY"}(n=e._MeasureOption||(e._MeasureOption={}));var r=function(){function e(t){this._rect=t}return Object.defineProperty(e.prototype,"rect",{get:function(){return this._rect},enumerable:!0,configurable:!0}),e.prototype.contains=function(t){var e=this._rect;return t.x>=e.left&&t.x<=e.right&&t.y>=e.top&&t.y<=e.bottom},e.prototype.pointDistance=function(t,e,i){var r=e.x-t.x,s=e.y-t.y;return i==n.X?Math.abs(r):i==n.Y?Math.abs(s):Math.sqrt(r*r+s*s)},e.prototype.distance=function(e){var i=n.XY;null===e.x?i=n.Y:null===e.y&&(i=n.X);var r=this._rect;return e.x<r.left?e.y<r.top?this.pointDistance(e,new t.Point(r.left,r.top),i):e.y>r.bottom?this.pointDistance(e,new t.Point(r.left,r.bottom),i):i==n.Y?0:r.left-e.x:e.x>r.right?e.y<r.top?this.pointDistance(e,new t.Point(r.right,r.top),i):e.y>r.bottom?this.pointDistance(e,new t.Point(r.right,r.bottom),i):i==n.Y?0:e.x-r.right:i==n.X?0:e.y<r.top?r.top-e.y:e.y>r.bottom?e.y-r.bottom:0},e}();e._RectArea=r;var s=function(){function t(t,e){this._center=t,this.setRadius(e)}return t.prototype.setRadius=function(t){this._rad=t,this._rad2=t*t},Object.defineProperty(t.prototype,"center",{get:function(){return this._center},enumerable:!0,configurable:!0}),t.prototype.contains=function(t){var e=this._center.x-t.x,i=this._center.y-t.y;return e*e+i*i<=this._rad2},t.prototype.distance=function(t){var e=isNaN(t.x)?0:this._center.x-t.x,i=isNaN(t.y)?0:this._center.y-t.y,n=e*e+i*i;return n<=this._rad2?0:Math.sqrt(n)-this._rad},t}();e._CircleArea=s;var o=function(){function i(t,e){this._x=[],this._y=[],this._x=t,this._y=e}return i.prototype.contains=function(t){return!1},i.prototype.distance=function(i){for(var n=NaN,r=0;r<this._x.length-1;r++){var s=e.FlexChart._dist(i,new t.Point(this._x[r],this._y[r]),new t.Point(this._x[r+1],this._y[r+1]));(isNaN(n)||s<n)&&(n=s)}return n},i}();e._LinesArea=o;var a=function(){return function(){}}();e._HitResult=a;var h=function(){function n(t){this._map={},this._chart=t}return n.prototype.add=function(t,e){this._map[e]&&(t.tag||(t.tag=new i(e,NaN,NaN,NaN)),this._map[e].push(t))},n.prototype.clear=function(){this._map={};for(var t=this._chart.series,i=0;i<t.length;i++)t[i].hitTest===e.Series.prototype.hitTest&&(this._map[i]=new Array)},n.prototype.hitTest=function(e,i){void 0===i&&(i=!1);for(var n=null,r=Number.MAX_VALUE,s=this._chart.series.length-1;s>=0;s--){var h=this._map[s];if(h){for(var l=h.length-1;l>=0;l--){var c=h[l];if(!t.tryCast(c,o)||i){var u=c.distance(e);if(u<r&&(r=u,n=c,0==r))break}}if(0==r)break}}if(n){var _=new a;return _.area=n,_.distance=r,_}return null},n.prototype.hitTestSeries=function(t,e){var i=null,n=Number.MAX_VALUE,r=this._map[e];if(r)for(var s=r.length-1;s>=0;s--){var o=r[s],h=o.distance(t);if(h<n&&(n=h,i=o,0==n))break}if(i){var l=new a;return l.area=i,l.distance=n,l}return null},n}();e._HitTester=h}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var i=function(){function i(){this._DEFAULT_WIDTH=2,this._DEFAULT_SYM_SIZE=10,this.clipping=!0}return i.prototype.clear=function(){this.seriesCount=0,this.seriesIndex=0},i.prototype._renderLabels=function(i,n,r,s,o){var a=r.length,h=s.dataLabel,l=h.border,c=h.offset,u=h.connectingLine;void 0===c&&(c=u?16:0),l&&(c-=2);for(var _=0;_<a;_++){var p=r[_],d=t.asType(p.tag,e._DataPoint,!0);d&&this._renderLabel(i,p,d,s,h,n,c,o)}},i.prototype._renderLabel=function(t,i,n,r,s,o,a,h){var l=null==s.position?e.LabelPosition.Top:s.position,c=s.border,u=s.connectingLine,_=new e.HitTestInfo(r,d);_._setDataPoint(n);var p=r._getLabelContent(_,s.content),d=this._getLabelPoint(o,n);if(this._getPointAndPosition(d,l,i,r),r._plotRect.contains(d)){var f=new e.DataLabelRenderEventArgs(t,_,d,p);if(s.onRendering&&(s.onRendering(f)?(p=f.text,d=f.point):p=null),p){var g=this._renderLabelAndBorder(t,p,l,a,d,u,2,c);if(g){var y=new e._RectArea(g);y.tag=n,h.push(y)}}}},i.prototype._getPointAndPosition=function(t,i,n,r){if(n instanceof e._RectArea){var s=n;r._isRotated()?t.y=s.rect.top+.5*s.rect.height:t.x=s.rect.left+.5*s.rect.width}},i.prototype._getLabelPoint=function(e,i){var n=e._getAxisX(),r=e._getAxisY();return new t.Point(n.convert(i.dataX),r.convert(i.dataY))},i.prototype._renderLabelAndBorder=function(t,i,n,r,s,o,a,h){var l,c="wj-data-label",u="wj-data-label-line",_=e.FlexChart._CSS_DATA_LABELS;switch(n){case e.LabelPosition.Top:o&&t.drawLine(s.x,s.y,s.x,s.y-r,u),s.y-=a+r,l=e.FlexChart._renderText(t,i,s,1,2,c,_);break;case e.LabelPosition.Bottom:o&&t.drawLine(s.x,s.y,s.x,s.y+r,u),s.y+=a+r,l=e.FlexChart._renderText(t,i,s,1,0,c,_);break;case e.LabelPosition.Left:o&&t.drawLine(s.x,s.y,s.x-r,s.y,u),s.x-=a+r,l=e.FlexChart._renderText(t,i,s,2,1,c,_);break;case e.LabelPosition.Right:o&&t.drawLine(s.x,s.y,s.x+r,s.y,u),s.x+=a+r,l=e.FlexChart._renderText(t,i,s,0,1,c,_);break;case e.LabelPosition.Center:l=e.FlexChart._renderText(t,i,s,1,1,c,_)}return h&&l&&t.drawRect(l.left-a,l.top-a,l.width+2*a,l.height+2*a,"wj-data-label-border"),l},i.prototype.getOption=function(e,i){var n=this.chart.options;if(i&&(n=n?n[i]:null),n&&!t.isUndefined(n[e])&&null!==n[e])return n[e]},i.prototype.getNumOption=function(e,i){var n=this.chart.options;if(i&&(n=n?n[i]:null),n&&n[e])return t.asNumber(n[e],!0)},i.cloneStyle=function(t,e){if(!t)return t;var i={};for(var n in t)e&&e.indexOf(n)>=0||(i[n]=t[n]);return i},i.prototype.isValid=function(i,n,r,s){return e._DataInfo.isValid(i)&&e._DataInfo.isValid(n)&&e.FlexChart._contains(this.chart._plotRect,new t.Point(i,n))},i.prototype.load=function(){},i.prototype.unload=function(){},i}();e._BasePlotter=i}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(i){function n(){var t=null!==i&&i.apply(this,arguments)||this;return t.origin=0,t.width=.7,t.isVolume=!1,t._volHelper=null,t.stackPosMap={},t.stackNegMap={},t.stacking=e.Stacking.None,t}return __extends(n,i),n.prototype.clear=function(){i.prototype.clear.call(this),this.stackNegMap[this.chart.axisY._uniqueId]={},this.stackPosMap[this.chart.axisY._uniqueId]={},this._volHelper=null},n.prototype.load=function(){if(i.prototype.load.call(this),this.isVolume){var n,r,s,o,a,h,l,c,u=null,_=null;for(h=0;h<this.chart.series.length;h++){if(n=this.chart.series[h],a=n.getDataType(1)||n.chart._xDataType,r=n._getAxisX(),s=n._getChartType(),(s=null===s||t.isUndefined(s)?this.chart._getChartType():s)===e.ChartType.Column){var p=this.chart?this.chart._bindingSeparator:",",d=n.binding.split(p).length-1;o=n._getBindingValues(d)}else o=s===e.ChartType.Candlestick?n._getBindingValues(4):null;if(a===t.DataType.Date){var f;for(l=[],c=[],h=0;h<n._getLength();h++)f=n._getItem(h)[n.bindingX].valueOf(),l.push(f),c.push({value:f,text:t.Globalize.format(new Date(f),r.format||"d")})}else l=this.dataInfo.getXVals();if(u=this.dataInfo.getMinX(),_=this.dataInfo.getMaxX(),o&&o.length>0){this._volHelper=new e._VolumeHelper(o,l,u,_,a),r._customConvert=this._volHelper.convert.bind(this._volHelper),r._customConvertBack=this._volHelper.convertBack.bind(this._volHelper),c&&c.length>0&&(this._itemsSource=r.itemsSource=c);break}}}},n.prototype.unload=function(){i.prototype.unload.call(this);for(var t,e=0;e<this.chart.series.length;e++)(t=this.chart.series[e]._getAxisX())&&(t._customConvert=null,t._customConvertBack=null,t.itemsSource&&t.itemsSource==this._itemsSource&&(this._itemsSource=t.itemsSource=null))},n.prototype.adjustLimits=function(i,n){this.dataInfo=i;var r=i.getMinX(),s=i.getMaxX(),o=i.getMinY(),a=i.getMaxY(),h=i.getDeltaX();h<=0&&(h=1),!this.isVolume||this.chart._getChartType()!==e.ChartType.Column&&this.chart._getChartType()!==e.ChartType.Candlestick?this.unload():this.load();for(var l=0;l<this.chart.series.length;l++){var c=this.chart.series[l],u=c._getChartType();(u=null===u||t.isUndefined(u)?this.chart._getChartType():u)!==e.ChartType.Column&&u!==e.ChartType.Bar||this._isRange(c)&&c._getBindingValues(1).forEach(function(t){t<o?o=t:t>a&&(a=t)})}return this.rotated?(this.chart.axisY.logBase||i.getDataTypeY()===t.DataType.Date||(this.origin>a?a=this.origin:this.origin<o&&(o=this.origin)),new t.Rect(o,r-.5*h,a-o,s-r+h)):(this.chart.axisY.logBase||i.getDataTypeY()===t.DataType.Date||(this.origin>a?a=this.origin:this.origin<o&&(o=this.origin)),new t.Rect(r-.5*h,o,s-r+h,a-o))},n.prototype._isRange=function(t){var e=this.chart?this.chart._bindingSeparator:",",i=(null==t.binding?"":t.binding.split(e)).length-1;return this.isVolume?2===i:1===i},n.prototype.plotSeries=function(i,n,r,s,o,a,h,l){var c=[],u=this.chart.series.indexOf(s),_=t.asType(s,e.SeriesBase),p=this.chart.options,d=this.width,f=0;if(a=a||0,h=h||1,p&&p.groupWidth){var g=p.groupWidth;if(t.isNumber(g)){m=t.asNumber(g);isFinite(m)&&m>0&&(f=m,d=1)}else if(t.isString(g)){var y=t.asString(g);if(y&&y.indexOf("%")>=0){y=y.replace("%","");m=parseFloat(y);isFinite(m)&&(m<0?m=0:m>100&&(m=100),f=0,d=m/100)}else{var m=parseFloat(y);isFinite(m)&&m>0&&(f=m,d=1)}}}var b=d/h,v=_._getAxisY()._uniqueId,x=this.stackNegMap[v],w=this.stackPosMap[v],S=s.getValues(0),P=s.getValues(1),C=this._isRange(_),T=_._bindValues(null==_._cv?null==this.chart.collectionView?null:this.chart.collectionView.items:_._cv.items,_._getBinding(1)).values;if(S){if(P||(P=this.dataInfo.getXVals()),P){var M=this.dataInfo.getDeltaX();M>0&&(d*=M,b*=M)}var A=_._getSymbolFill(u),N=_._getAltSymbolFill(u)||A,L=_._getSymbolStroke(u),I=_._getAltSymbolStroke(u)||L,E=S.length;null!=P&&(E=Math.min(E,P.length));var k,D,O=this.origin,R=0,j=this.stacking!=e.Stacking.None,F=this.stacking==e.Stacking.Stacked100pc;if(void 0!==_._getChartType()&&(j=F=!1),this.rotated){O<n.actualMin?O=n.actualMin:O>n.actualMax&&(O=n.actualMax),_._isCustomAxisY()&&(j=F=!1);for(var V=n.convert(O),X=r.actualMin,B=r.actualMax,Y=0;Y<E;Y++){var z=P?P[Y]:Y,H=S[Y],G=V;if(this._getSymbolOrigin&&(G=r.convert(this._getSymbolOrigin(O,Y))),C&&T&&T.length){it=T[Y];e._DataInfo.isValid(it)&&(G=n.convert(it))}if(this._getSymbolStyles){var W=this._getSymbolStyles(Y);A=W&&W.fill?W.fill:A,N=W&&W.fill?W.fill:N,L=W&&W.stroke?W.fill:L,I=W&&W.stroke?W.fill:I}if(k=H>0?A:N,D=H>0?L:I,i.fill=k,i.stroke=D,e._DataInfo.isValid(z)&&e._DataInfo.isValid(H))if(j){rt=z+.5*d;if((nt=z-.5*d)<X&&rt<X||nt>B&&rt>B)continue;nt=r.convert(Math.max(nt,X)),rt=r.convert(Math.min(rt,B));var U;if(F){var K=this.dataInfo.getStackedAbsSum(z);H/=K}st=0;H>0?(st=isNaN(w[z])?0:w[z],U=n.convert(st),ot=n.convert(st+H),w[z]=st+H):(st=isNaN(x[z])?0:x[z],U=n.convert(st),ot=n.convert(st+H),x[z]=st+H),l&&c.push(new t.Point(ot,r.convert(z)));Z=new t.Rect(Math.min(U,ot),Math.min(nt,rt),Math.abs(ot-U),Math.abs(rt-nt));if(f>0){(Q=1-f/Z.height)<0&&(Q=0);$=Z.top+.5*Z.height;Z.top+=($-Z.top)*Q,Z.height=Math.min(f,Z.height)}lt=new e._RectArea(Z);this.drawSymbol(i,Z,s,Y,new t.Point(ot,Z.top+.5*Z.height)),s._setPointIndex(Y,R),R++,lt.tag=new e._DataPoint(u,Y,st+H,z),this.hitTester.add(lt,u)}else{rt=z-.5*d+(a+1)*b;if((nt=z-.5*d+a*b)<X&&rt<X||nt>B&&rt>B)continue;nt=r.convert(Math.max(nt,X)),rt=r.convert(Math.min(rt,B));var q=n.convert(H),Z=new t.Rect(Math.min(q,G),Math.min(nt,rt),Math.abs(G-q),Math.abs(rt-nt));if(l&&c.push(new t.Point(q,(nt+rt)/2)),f>0){var J=f/h,Q=1-J/Z.height;Q<0&&(Q=0);var $=r.convert(z);Z.top+=($-Z.top)*Q,Z.height=Math.min(J,Z.height)}lt=new e._RectArea(Z);this.drawSymbol(i,Z,s,Y,new t.Point(q,Z.top+.5*Z.height)),s._setPointIndex(Y,R),R++,lt.tag=new e._DataPoint(u,Y,H,z),this.hitTester.add(lt,u)}}}else{O<r.actualMin?O=r.actualMin:O>r.actualMax&&(O=r.actualMax);var V=r.convert(O),tt=n.actualMin,et=n.actualMax;_._isCustomAxisY()&&(j=F=!1);for(Y=0;Y<E;Y++){var G=V,z=P?P[Y]:Y,H=S[Y];if(this._getSymbolOrigin&&(G=r.convert(this._getSymbolOrigin(O,Y,E))),C&&T&&T.length){var it=T[Y];e._DataInfo.isValid(it)&&(G=r.convert(it))}if(this._getSymbolStyles&&(A=(W=this._getSymbolStyles(Y,E))&&W.fill?W.fill:A,N=W&&W.fill?W.fill:N,L=W&&W.stroke?W.stroke:L,I=W&&W.stroke?W.stroke:I),k=H>0?A:N,D=H>0?L:I,i.fill=k,i.stroke=D,e._DataInfo.isValid(z)&&e._DataInfo.isValid(H))if(j){ot=z+.5*d;if((U=z-.5*d)<tt&&ot<tt||U>et&&ot>et)continue;if(U=n.convert(U),ot=n.convert(ot),!e._DataInfo.isValid(U)||!e._DataInfo.isValid(ot))continue;var nt,rt;F&&(H/=K=this.dataInfo.getStackedAbsSum(z));var st=0;H>0?(st=isNaN(w[z])?0:w[z],nt=r.convert(st),rt=r.convert(st+H),w[z]=st+H):(st=isNaN(x[z])?0:x[z],nt=r.convert(st),rt=r.convert(st+H),x[z]=st+H),l&&c.push(new t.Point(n.convert(z),rt));Z=new t.Rect(Math.min(U,ot),Math.min(nt,rt),Math.abs(ot-U),Math.abs(rt-nt));if(f>0){(Q=1-f/Z.width)<0&&(Q=0);ht=Z.left+.5*Z.width;Z.left+=(ht-Z.left)*Q,Z.width=Math.min(f,Z.width)}lt=new e._RectArea(Z);this.drawSymbol(i,Z,s,Y,new t.Point(Z.left+.5*Z.width,rt)),s._setPointIndex(Y,R),R++,lt.tag=new e._DataPoint(u,Y,z,st+H),this.hitTester.add(lt,u)}else{var ot=z-.5*d+(a+1)*b;if((U=z-.5*d+a*b)<tt&&ot<tt||U>et&&ot>et)continue;if(U=n.convert(U),ot=n.convert(ot),!e._DataInfo.isValid(U)||!e._DataInfo.isValid(ot))continue;var at=r.convert(H),Z=new t.Rect(Math.min(U,ot),Math.min(at,G),Math.abs(ot-U),Math.abs(G-at));if(l&&c.push(new t.Point((U+ot)/2,at)),f>0){(Q=1-(J=f/h)/Z.width)<0&&(Q=0);var ht=n.convert(z);Z.left+=(ht-Z.left)*Q,Z.width=Math.min(J,Z.width)}var lt=new e._RectArea(Z);this.drawSymbol(i,Z,s,Y,new t.Point(Z.left+.5*Z.width,at)),s._setPointIndex(Y,R),R++,lt.tag=new e._DataPoint(u,Y,z,H),this.hitTester.add(lt,u)}}}l&&c&&c.length&&l(c)}},n.prototype.drawSymbol=function(t,i,n,r,s){var o=this;if(this.chart.itemFormatter){t.startGroup();var a=new e.HitTestInfo(this.chart,s,e.ChartElement.SeriesSymbol);a._setData(n,r),this.chart.itemFormatter(t,a,function(){o.drawDefaultSymbol(t,i,n)}),t.endGroup()}else this.drawDefaultSymbol(t,i,n)},n.prototype.drawDefaultSymbol=function(t,e,i){t.drawRect(e.left,e.top,e.width,e.height,null,i.symbolStyle)},n}(e._BasePlotter);e._BarPlotter=i}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(i){function n(){var t=i.call(this)||this;return t.hasSymbols=!1,t.hasLines=!0,t.isSpline=!1,t.stacking=e.Stacking.None,t.stackPos={},t.stackNeg={},t.clipping=!1,t}return __extends(n,i),n.prototype.clear=function(){i.prototype.clear.call(this),this.stackNeg={},this.stackPos={}},n.prototype.adjustLimits=function(e,i){this.dataInfo=e;var n=e.getMinX(),r=e.getMinY(),s=e.getMaxX(),o=e.getMaxY();if(this.isSpline&&!this.chart.axisY.logBase){var a=.1*(o-r);r-=a,o+=a}return this.rotated?new t.Rect(r,n,o-r,s-n):new t.Rect(n,r,s-n,o-r)},n.prototype.plotSeries=function(i,n,r,s,o,a,h,l){var c=[],u=t.asType(s,e.SeriesBase),_=this.chart.series.indexOf(s),p=s.getValues(0),d=s.getValues(1);if(p){d||(d=this.dataInfo.getXVals());var f=e._BasePlotter.cloneStyle(s.style,["fill"]),g=p.length,y=!0;d?g=Math.min(g,d.length):(y=!1,d=new Array(g));var m=this._DEFAULT_WIDTH,b=u._getSymbolFill(_),v=u._getAltSymbolFill(_)||b,x=u._getSymbolStroke(_),w=u._getAltSymbolStroke(_)||x,S=u._getSymbolSize();i.stroke=x,i.strokeWidth=m,i.fill=b;var P=new Array,C=new Array,T=new Array,M=this.rotated,A=this.stacking!=e.Stacking.None&&!u._isCustomAxisY(),N=this.stacking==e.Stacking.Stacked100pc&&!u._isCustomAxisY();void 0!==u._getChartType()&&(A=N=!1);for(var L=this.chart.interpolateNulls,I=!1,E=0;E<g;E++){var k=y?d[E]:E,D=p[E];if(e._DataInfo.isValid(k)&&e._DataInfo.isValid(D)){if(A)if(N&&(D/=this.dataInfo.getStackedAbsSum(k)),D>=0){O=isNaN(this.stackPos[k])?0:this.stackPos[k];D=this.stackPos[k]=O+D}else{var O=isNaN(this.stackNeg[k])?0:this.stackNeg[k];D=this.stackNeg[k]=O+D}var R;if(M){R=new e._DataPoint(_,E,D,k);var j=n.convert(D);D=r.convert(k),k=j}else R=new e._DataPoint(_,E,k,D),k=n.convert(k),D=r.convert(D);if(isNaN(k)||isNaN(D))I=!0,!0!==L&&(P.push(void 0),C.push(void 0)),T.push(!0);else{P.push(k),C.push(D),T.push(!1),l&&c.push(new t.Point(k,D));var F=new e._CircleArea(new t.Point(k,D),.5*S);F.tag=R,this.hitTester.add(F,_)}}else I=!0,!0!==L&&(P.push(void 0),C.push(void 0)),T.push(!0)}var V=0;if(this.hasLines)if(i.fill=null,I&&!0!==L){for(var X=[],B=[],E=0;E<g;E++)void 0===P[E]?(X.length>1&&(this._drawLines(i,X,B,null,f,this.chart._plotrectId),this.hitTester.add(new e._LinesArea(X,B),_),V++),X=[],B=[]):(X.push(P[E]),B.push(C[E]));X.length>1&&(this._drawLines(i,X,B,null,f,this.chart._plotrectId),this.hitTester.add(new e._LinesArea(X,B),_),V++)}else this._drawLines(i,P,C,null,f,this.chart._plotrectId),this.hitTester.add(new e._LinesArea(P,C),_),V++;if((this.hasSymbols||this.chart.itemFormatter)&&S>0){i.fill=b;for(var Y=0,E=0;E<g;E++)if(!L||!T[E]){var k=P[Y],D=C[Y];(!1===this.hasLines||this.chart.itemFormatter)&&(i.fill=p[E]>0?b:v,i.stroke=p[E]>0?x:w),this.isValid(k,D,n,r)&&(this._drawSymbol(i,k,D,S,u,E),s._setPointIndex(E,V),V++),Y++}}l&&c&&c.length&&l(c)}},n.prototype._drawLines=function(t,e,i,n,r,s){this.isSpline?t.drawSplines(e,i,n,r,s):t.drawLines(e,i,n,r,s)},n.prototype._drawSymbol=function(i,n,r,s,o,a){var h=this;if(this.chart.itemFormatter){i.startGroup();var l=new e.HitTestInfo(this.chart,new t.Point(n,r),e.ChartElement.SeriesSymbol);l._setData(o,a),this.chart.itemFormatter(i,l,function(){h.hasSymbols&&h._drawDefaultSymbol(i,n,r,s,o.symbolMarker,o.symbolStyle)}),i.endGroup()}else this._drawDefaultSymbol(i,n,r,s,o.symbolMarker,o.symbolStyle)},n.prototype._drawDefaultSymbol=function(t,i,n,r,s,o){s==e.Marker.Dot?t.drawEllipse(i,n,.5*r,.5*r,null,o):s==e.Marker.Box&&t.drawRect(i-.5*r,n-.5*r,r,r,null,o)},n}(e._BasePlotter);e._LinePlotter=i}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(i){function n(){var t=i.call(this)||this;return t.stacking=e.Stacking.None,t.isSpline=!1,t.stackPos={},t.stackNeg={},t}return __extends(n,i),n.prototype.adjustLimits=function(e,i){this.dataInfo=e;var n=e.getMinX(),r=e.getMinY(),s=e.getMaxX(),o=e.getMaxY();if(this.isSpline){var a=.1*(o-r);this.chart.axisY.logBase||(r-=a),o+=a}return this.rotated?new t.Rect(r,n,o-r,s-n):new t.Rect(n,r,s-n,o-r)},n.prototype.clear=function(){i.prototype.clear.call(this),this.stackNeg={},this.stackPos={}},n.prototype.plotSeries=function(i,n,r,s,o,a,h,l){var c=[],u=this.chart.series.indexOf(s),_=s,p=s.getValues(0),d=s.getValues(1);if(p){var f=p.length;if(f){d||(d=this.dataInfo.getXVals());var g=!0;d?d.length<f&&(f=d.length):(g=!1,d=new Array(f));var y=new Array,m=new Array,b=new Array,v=new Array,x=this.stacking!=e.Stacking.None&&!_._isCustomAxisY(),w=this.stacking==e.Stacking.Stacked100pc&&!_._isCustomAxisY();void 0!==_._getChartType()&&(x=w=!1);for(var S=this.rotated,P=!1,C=this.chart.interpolateNulls,T=null,M=null,A=this.chart._plotRect,N=0;N<f;N++){var L=g?d[N]:N,I=p[N];if((null===T||L>T)&&(T=L),(null===M||L<M)&&(M=L),e._DataInfo.isValid(L)&&e._DataInfo.isValid(I)){var E=S?r.convert(L):n.convert(L);if(x){w&&(I/=this.dataInfo.getStackedAbsSum(L));var k=0;I>=0?(k=isNaN(this.stackPos[L])?0:this.stackPos[L],I=this.stackPos[L]=k+I):(k=isNaN(this.stackNeg[L])?0:this.stackNeg[L],I=this.stackNeg[L]=k+I),S?(k<n.actualMin&&(k=n.actualMin),b.push(n.convert(k)),v.push(E)):(b.push(E),k<r.actualMin&&(k=r.actualMin),v.push(r.convert(k)))}if(S){D=n.convert(I);isNaN(E)||isNaN(D)?(P=!0,x||!0===C||(y.push(void 0),m.push(void 0))):(y.push(D),m.push(E),e.FlexChart._contains(A,new t.Point(D,E))&&((O=new e._CircleArea(new t.Point(D,E),this._DEFAULT_SYM_SIZE)).tag=new e._DataPoint(u,N,I,L),this.hitTester.add(O,u)))}else{var D=r.convert(I);if(isNaN(E)||isNaN(D))P=!0,x||!0===C||(y.push(void 0),m.push(void 0));else if(y.push(E),m.push(D),e.FlexChart._contains(A,new t.Point(E,D))){var O=new e._CircleArea(new t.Point(E,D),this._DEFAULT_SYM_SIZE);O.tag=new e._DataPoint(u,N,L,I),this.hitTester.add(O,u)}}}else P=!0,x||!0===C||(y.push(void 0),m.push(void 0))}l&&y.forEach(function(e,i){null!=e&&c.push(new t.Point(e,m[i]))});var R=this._DEFAULT_WIDTH,j=o._getColorLight(u),F=o._getColor(u),V=e._BasePlotter.cloneStyle(s.style,["fill"]),X=e._BasePlotter.cloneStyle(s.style,["stroke"]);if(!x&&!0!==C&&P){for(var B=[],Y=[],N=0;N<f;N++)void 0===y[N]?(B.length>1&&(this.isSpline&&(B=(z=this._convertToSpline(B,Y)).xs,Y=z.ys),i.stroke=F,i.strokeWidth=R,i.fill="none",i.drawLines(B,Y,null,V),this.hitTester.add(new e._LinesArea(B,Y),u),S?(B.push(n.convert(n.actualMin),n.convert(n.actualMin)),Y.push(r.convert(r.actualMax),r.convert(r.actualMin))):(B.push(B[B.length-1],B[0]),Y.push(r.convert(r.actualMin),r.convert(r.actualMin))),i.fill=j,i.stroke="none",i.drawPolygon(B,Y,null,X)),B=[],Y=[]):(B.push(y[N]),Y.push(m[N]));B.length>1&&(this.isSpline&&(B=(z=this._convertToSpline(B,Y)).xs,Y=z.ys),i.stroke=F,i.strokeWidth=R,i.fill="none",i.drawLines(B,Y,null,V),this.hitTester.add(new e._LinesArea(B,Y),u),S?(B.push(n.convert(n.actualMin),n.convert(n.actualMin)),Y.push(r.convert(r.actualMax),r.convert(r.actualMin))):(B.push(B[B.length-1],B[0]),Y.push(r.convert(r.actualMin),r.convert(r.actualMin))),i.fill=j,i.stroke="none",i.drawPolygon(B,Y,null,X))}else{if(this.isSpline){var z=this._convertToSpline(y,m);y=z.xs,m=z.ys}if(x){if(this.isSpline){var H=this._convertToSpline(b,v);b=H.xs,v=H.ys}y=y.concat(b.reverse()),m=m.concat(v.reverse())}else S?(y.push(n.convert(n.actualMin),n.convert(n.actualMin)),m[0]>m[m.length-1]?m.push(r.convert(T),r.convert(M)):m.push(r.convert(M),r.convert(T))):(y[0]>y[y.length-1]?y.push(n.convert(M),n.convert(T)):y.push(n.convert(T),n.convert(M)),m.push(r.convert(r.actualMin),r.convert(r.actualMin)));i.fill=j,i.stroke="none",i.drawPolygon(y,m,null,X),x?(y=y.slice(0,y.length-b.length),m=m.slice(0,m.length-v.length)):(y=y.slice(0,y.length-2),m=m.slice(0,m.length-2)),i.stroke=F,i.strokeWidth=R,i.fill="none",i.drawLines(y,m,null,V),this.hitTester.add(new e._LinesArea(y,m),u)}this._drawSymbols(i,s,u),l&&c&&c.length&&l(c)}}},n.prototype._convertToSpline=function(t,i){if(t&&i){var n=new e._Spline(t,i).calculate();return{xs:n.xs,ys:n.ys}}return{xs:t,ys:i}},n.prototype._drawSymbols=function(i,n,r){if(null!=this.chart.itemFormatter)for(var s=this.hitTester._map[r],o=0;o<s.length;o++){var a=t.tryCast(s[o],e._CircleArea);if(a){var h=a.tag;i.startGroup();var l=new e.HitTestInfo(this.chart,a.center,e.ChartElement.SeriesSymbol);l._setDataPoint(h),this.chart.itemFormatter(i,l,function(){}),i.endGroup()}}},n}(e._BasePlotter);e._AreaPlotter=i}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(i){function n(){var t=i.call(this)||this;return t._MIN_SIZE=5,t._MAX_SIZE=30,t.hasLines=!1,t.hasSymbols=!0,t.clipping=!0,t}return __extends(n,i),n.prototype.adjustLimits=function(t,n){var r=this.getNumOption("minSize","bubble");this._minSize=r||this._MIN_SIZE;var s=this.getNumOption("maxSize","bubble");this._maxSize=s||this._MAX_SIZE;for(var o=this.chart.series,a=o.length,h=NaN,l=NaN,c=0;c<a;c++){var u=o[c]._getBindingValues(1);if(u)for(var _=u.length,p=0;p<_;p++)e._DataInfo.isValid(u[p])&&((isNaN(h)||u[p]<h)&&(h=u[p]),(isNaN(l)||u[p]>l)&&(l=u[p]))}this._minValue=h,this._maxValue=l;var d=i.prototype.adjustLimits.call(this,t,n),f=this.chart.axisX,g=this.chart.axisY;if(f.logBase<=0){var y=(n.width-this._maxSize)/d.width;d.left-=.5*this._maxSize/y,d.width+=this._maxSize/y}if(g.logBase<=0){var m=(n.height-this._maxSize)/d.height;d.top-=.5*this._maxSize/m,d.height+=this._maxSize/m}return d},n.prototype._drawSymbol=function(i,n,r,s,o,a){var h=this;if(null==this._minSize){var l=this.getNumOption("minSize","bubble");this._minSize=l||this._MIN_SIZE}if(null==this._maxSize){var c=this.getNumOption("maxSize","bubble");this._maxSize=c||this._MAX_SIZE}var u=o._getItem(a);if(u){var _=o._getBinding(1);if(_){var s=u[_];if(e._DataInfo.isValid(s)){var p=this._minValue==this._maxValue?1:Math.sqrt((s-this._minValue)/(this._maxValue-this._minValue));if(s=this._minSize+(this._maxSize-this._minSize)*p,this.chart.itemFormatter){var d=new e.HitTestInfo(this.chart,new t.Point(n,r),e.ChartElement.SeriesSymbol);d._setData(o,a),i.startGroup(),this.chart.itemFormatter(i,d,function(){h._drawDefaultSymbol(i,n,r,s,o.symbolMarker,o.symbolStyle)}),i.endGroup()}else this._drawDefaultSymbol(i,n,r,s,o.symbolMarker,o.symbolStyle);var f=this.hitTester._map[this.chart.series.indexOf(o)];if(null!=f)for(var g=f.length-1;g>=0;g--){var y=f[g];if(y.tag&&y.tag.pointIndex==a){var m=t.tryCast(y,e._CircleArea);m&&m.setRadius(.5*s)}}}}}},n}(e._LinePlotter);e._BubblePlotter=i}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(i){function n(){var t=null!==i&&i.apply(this,arguments)||this;return t.isCandle=!0,t.isArms=!1,t.isEqui=!1,t.isVolume=!1,t._volHelper=null,t._symWidth=.7,t}return __extends(n,i),n.prototype.clear=function(){i.prototype.clear.call(this),this._volHelper=null},n.prototype.load=function(){if(i.prototype.load.call(this),this.isVolume){var n,r,s,o,a,h,l,c,u=null,_=null;for(h=0;h<this.chart.series.length;h++){if(n=this.chart.series[h],a=n.getDataType(1)||n.chart._xDataType,r=n._getAxisX(),s=n._getChartType(),s=null===s||t.isUndefined(s)?this.chart._getChartType():s,o=s===e.ChartType.Column?n._getBindingValues(1):s===e.ChartType.Candlestick?n._getBindingValues(4):null,a===t.DataType.Date){var p;for(l=[],c=[],h=0;h<n._getLength();h++)p=n._getItem(h)[n.bindingX].valueOf(),l.push(p),c.push({value:p,text:t.Globalize.format(new Date(p),r.format||"d")})}else l=this.dataInfo.getXVals();if(u=this.dataInfo.getMinX(),_=this.dataInfo.getMaxX(),o&&o.length>0){this._volHelper=new e._VolumeHelper(o,l,u,_,a),r._customConvert=this._volHelper.convert.bind(this._volHelper),r._customConvertBack=this._volHelper.convertBack.bind(this._volHelper),c&&c.length>0&&(this._itemsSource=r.itemsSource=c);break}}}},n.prototype.unload=function(){i.prototype.unload.call(this);for(var t,e=0;e<this.chart.series.length;e++)(t=this.chart.series[e]._getAxisX())&&(t._customConvert=null,t._customConvertBack=null,t.itemsSource&&t.itemsSource==this._itemsSource&&(this._itemsSource=t.itemsSource=null))},n.prototype.parseSymbolWidth=function(e){if(this._isPixel=void 0,e)if(t.isNumber(e)){var i=t.asNumber(e);isFinite(i)&&i>0&&(this._symWidth=i,this._isPixel=!0)}else if(t.isString(e)){var n=t.asString(e);if(n&&n.indexOf("%")>=0){n=n.replace("%","");r=parseFloat(n);isFinite(r)&&(r<0?r=0:r>100&&(r=100),this._symWidth=r/100,this._isPixel=!1)}else{var r=parseFloat(e);isFinite(r)&&r>0&&(this._symWidth=r,this._isPixel=!0)}}},n.prototype.adjustLimits=function(i,n){this.dataInfo=i;var r=i.getMinX(),s=i.getMinY(),o=i.getMaxX(),a=i.getMaxY(),h=i.getDeltaX(),l=this.chart._xDataType;h<=0&&(h=1);var c=this.chart.series,u=c.length,_=0;this.parseSymbolWidth(this.symbolWidth),!this.isVolume||this.chart._getChartType()!==e.ChartType.Column&&this.chart._getChartType()!==e.ChartType.Candlestick?this.unload():this.load();for(var p=0;p<u;p++){var d=c[p];if(!d._isCustomAxisY()){var f=d._getBinding(1),g=d._getBinding(2),y=d._getBinding(3),m=d._getLength();if(m){var b=d._getSymbolSize();b>_&&(_=b);for(var v=0;v<m;v++){var x=d._getItem(v);x&&[f?x[f]:null,g?x[g]:null,y?x[y]:null].forEach(function(t){e._DataInfo.isValid(t)&&null!==t&&((isNaN(s)||t<s)&&(s=t),(isNaN(a)||t>a)&&(a=t))})}}}}var w=o-r,S=this.chart._plotRect;if(S&&S.width&&!this.isVolume){b+=2;var P=S.width/(S.width-b)*w;r-=.5*(P-w),w=P}return l!==t.DataType.Date||!this.isVolume||this.chart._getChartType()!==e.ChartType.Column&&this.chart._getChartType()!==e.ChartType.Candlestick?this.chart._isRotated()?new t.Rect(s,r,a-s,w):new t.Rect(r,s,w,a-s):new t.Rect(r-.5*h,s,o-r+h,a-s)},n.prototype.plotSeries=function(i,n,r,s,o,a,h,l){var c=this,u=t.asType(s,e.SeriesBase),_=this.chart.series.indexOf(s),p=s.getValues(0),d=s.getValues(1),f=this._symWidth,g=this.chart._isRotated();if(p){if(d||(d=this.dataInfo.getXVals()),d){var y=this.dataInfo.getDeltaX();y>0&&!1===this._isPixel&&(f*=y)}var m=p.length,b=!0;d?m=Math.min(m,d.length):(b=!1,d=new Array(m));var v=this._DEFAULT_WIDTH,x=u._getSymbolFill(_),w=u._getAltSymbolFill(_)||"transparent",S=u._getSymbolStroke(_),P=u._getAltSymbolStroke(_)||S,C=void 0===this._isPixel?u._getSymbolSize():f;i.stroke=S,i.strokeWidth=v,i.fill=x;for(var T,M,A=u._getBinding(1),N=u._getBinding(2),L=u._getBinding(3),I=g?r.actualMin:n.actualMin,E=g?r.actualMax:n.actualMax,k=0,D=null,O=null,R=0;R<m;R++)if(D=u._getItem(R)){var j=b?d[R]:R;if(e._DataInfo.isValid(j)&&I<=j&&j<=E){var F=p[R],V=A?D[A]:null,X=N?D[N]:null,B=L?D[L]:null;if(i.startGroup(),this.isEqui&&null!==O?O[L]!==D[L]&&(T=O[L]<D[L]?w:x,M=O[L]<D[L]?P:S):(T=X<B?w:x,M=X<B?P:S),i.fill=T,i.stroke=M,this.chart.itemFormatter){var Y=new e.HitTestInfo(this.chart,new t.Point(n.convert(j),r.convert(F)),e.ChartElement.SeriesSymbol);Y._setData(u,R),this.chart.itemFormatter(i,Y,function(){c._drawSymbol(i,n,r,_,R,T,C,j,F,V,X,B)})}else this._drawSymbol(i,n,r,_,R,T,C,j,F,V,X,B);i.endGroup(),s._setPointIndex(R,k),k++}O=D}}},n.prototype._drawSymbol=function(i,n,r,s,o,a,h,l,c,u,_,p){var d,f=new e._DataPoint(s,o,l,c),g=null,y=null,m=null,b=null,v=this.chart._isRotated();if(v){var x=r;r=n,n=x}if(!1===this._isPixel&&(m=n.convert(l-.5*h),b=n.convert(l+.5*h),m>b)){var w=m;m=b,b=w}l=n.convert(l),!1!==this._isPixel&&(m=l-.5*h,b=l+.5*h),this.isCandle?(e._DataInfo.isValid(_)&&e._DataInfo.isValid(p)&&(_=r.convert(_),p=r.convert(p),y=(g=Math.min(_,p))+Math.abs(_-p),v?(i.drawRect(g,m,y-g||1,b-m||1),d=new e._RectArea(new t.Rect(g,m,y-g||1,b-m||1))):(i.drawRect(m,g,b-m||1,y-g||1),d=new e._RectArea(new t.Rect(m,g,b-m||1,y-g||1))),d.tag=f,this.hitTester.add(d,s)),e._DataInfo.isValid(c)&&(c=r.convert(c),null!==g&&(v?i.drawLine(y,l,c,l):i.drawLine(l,g,l,c))),e._DataInfo.isValid(u)&&(u=r.convert(u),null!==y&&(v?i.drawLine(g,l,u,l):i.drawLine(l,y,l,u)))):this.isEqui?e._DataInfo.isValid(c)&&e._DataInfo.isValid(u)&&(c=r.convert(c),u=r.convert(u),y=(g=Math.min(c,u))+Math.abs(c-u),i.drawRect(m,g,b-m||1,y-g||1),(d=new e._RectArea(new t.Rect(m,g,b-m||1,y-g||1))).tag=f,this.hitTester.add(d,s)):this.isArms?(e._DataInfo.isValid(_)&&e._DataInfo.isValid(p)&&(_=r.convert(_),p=r.convert(p),y=(g=Math.min(_,p))+Math.abs(_-p),i.drawRect(m,g,b-m||1,y-g||1)),e._DataInfo.isValid(c)&&null!==g&&(c=r.convert(c),i.drawLine(l,g,l,c)),e._DataInfo.isValid(u)&&null!==y&&(u=r.convert(u),i.drawLine(l,y,l,u)),e._DataInfo.isValid(c)&&e._DataInfo.isValid(u)&&(i.fill="transparent",y=(g=Math.min(c,u))+Math.abs(c-u),i.drawRect(m,g,b-m||1,y-g||1),(d=new e._RectArea(new t.Rect(m,g,b-m||1,y-g||1))).tag=f,this.hitTester.add(d,s))):(e._DataInfo.isValid(c)&&e._DataInfo.isValid(u)&&(c=r.convert(c),u=r.convert(u),y=(g=Math.min(c,u))+Math.abs(c-u),v?(i.drawLine(u,l,c,l),d=new e._RectArea(new t.Rect(g,m,y-g||1,b-m||1))):(i.drawLine(l,u,l,c),d=new e._RectArea(new t.Rect(m,g,b-m||1,y-g||1))),d.tag=f,this.hitTester.add(d,s)),e._DataInfo.isValid(_)&&(_=r.convert(_),v?i.drawLine(_,m,_,l):i.drawLine(m,_,l,_)),e._DataInfo.isValid(p)&&(p=r.convert(p),v?i.drawLine(p,l,p,b):i.drawLine(l,p,b,p)))},n}(e._BasePlotter);e._FinancePlotter=i}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){"use strict";var i=function(i){function r(){var t=null!==i&&i.apply(this,arguments)||this;return t.stacking=e.Stacking.None,t}return __extends(r,i),r.prototype.adjustLimits=function(e,i){this.dataInfo=e;var n=e.getMinX(),r=e.getMinY(),s=e.getMaxX(),o=e.getMaxY();return this.rotated?new t.Rect(r,n,o-r,s-n):new t.Rect(n,r,s-n,o-r)},r.prototype.plotSeries=function(i,r,s,o,a,h,l,c){var u=this.chart.series.indexOf(o);if(!(u>0)){var _,p,d,f,g,y=t.asType(o,e.SeriesBase),m=this.chart.options,b=o.getValues(0),v=o.getValues(1),x=this.chart._plotRect,w=m&&m.funnel&&null!=m.funnel.neckWidth?m.funnel.neckWidth:.2,S=m&&m.funnel&&null!=m.funnel.neckHeight?m.funnel.neckHeight:0,P=w*x.width,C=0,T=0,M=0,A=0,N=x.left,L=x.top,I=x.width,E=x.height;if(b){P=P||1,v||(v=this.dataInfo.getXVals());var k=b.length;for(null!=v&&(k=Math.min(k,v.length)),C=0;C<k;C++)T+=b[C];var D,O,R=0;if(m&&m.funnel&&"rectangle"===m.funnel.type){S=E/k,w=I;var j;for(C=0;C<k;C++){var F=v?v[C]:C,V=b[C],X=y._getSymbolFill(C),B=y._getAltSymbolFill(C)||X,Y=y._getSymbolStroke(C),z=y._getAltSymbolStroke(C)||Y;if(this._getSymbolStyles&&(X=(K=this._getSymbolStyles(C,k))&&K.fill?K.fill:X,B=K&&K.fill?K.fill:B,Y=K&&K.stroke?K.stroke:Y,z=K&&K.stroke?K.stroke:z),D=V>0?X:B,O=V>0?Y:z,i.fill=D,i.stroke=O,e._DataInfo.isValid(F)&&e._DataInfo.isValid(V)){j||(j=I/V);var H=j*V;N+=(w-H)/2,i.drawRect(N,L,H,S),G=new n(new t.Point(N,L),H,S,H,S),L+=S,w=H,G.tag=new e._DataPoint(u,C,F,V),this.hitTester.add(G,u),o._setPointIndex(C,R),R++}}}else for(M=x.left+x.width*(1-w)/2,A=x.top+x.height*(1-S),p=(1-w)*x.width/2/(x.height*(1-S)),!isNaN(p)&&isFinite(p)||(I=P,N=M,L=A),_=x.width*w*x.height+x.width*(1-w)/2*x.height*(1-S),C=0;C<k;C++){var G,F=v?v[C]:C,V=b[C],W=[],U=[],X=y._getSymbolFill(C),B=y._getAltSymbolFill(C)||X,Y=y._getSymbolStroke(C),z=y._getAltSymbolStroke(C)||Y;if(this._getSymbolStyles){var K=this._getSymbolStyles(C,k);X=K&&K.fill?K.fill:X,B=K&&K.fill?K.fill:B,Y=K&&K.stroke?K.stroke:Y,z=K&&K.stroke?K.stroke:z}if(D=V>0?X:B,O=V>0?Y:z,i.fill=D,i.stroke=O,e._DataInfo.isValid(F)&&e._DataInfo.isValid(V)){var q=_*V/T;I>P?(L+(f=this._getTrapezoidOffsetY(I,q,p))<A?(W=[N,N+(d=p*f),N+I-d,N+I],U=[L,L+f,L+f,L],G=new n(new t.Point(N,L),I,f,I-2*d,0),I-=2*d,N+=d,L+=f):(d=p*(f=A-L),g=(q-=this._getTrapezoidArea(I,p,f))/P,W.push(N,N+d,N+d,N+d+P,N+d+P,N+I),U.push(L,L+f,L+f+g,L+f+g,L+f,L),G=new n(new t.Point(N,L),I,f+g,P,g),I=P,N+=d,L=L+f+g),i.drawPolygon(W,U)):(g=q/P,i.drawRect(N,L,I,g),G=new n(new t.Point(N,L),P,g,P,g),L+=g),G.tag=new e._DataPoint(u,C,F,V),this.hitTester.add(G,u),o._setPointIndex(C,R),R++}}}}},r.prototype._getTrapezoidArea=function(t,e,i){var n=i*e;return n*i+(t-2*n)*i},r.prototype._getTrapezoidOffsetY=function(t,e,i){var n=Math.pow(t/2/i,2)-e/i;return t/2/i-Math.sqrt(n>=0?n:0)},r.prototype.drawSymbol=function(t,i,n,r,s){var o=this;if(this.chart.itemFormatter){t.startGroup();var a=new e.HitTestInfo(this.chart,s,e.ChartElement.SeriesSymbol);a._setData(n,r),this.chart.itemFormatter(t,a,function(){o.drawDefaultSymbol(t,i,n)}),t.endGroup()}else this.drawDefaultSymbol(t,i,n)},r.prototype.drawDefaultSymbol=function(t,e,i){t.drawRect(e.left,e.top,e.width,e.height,null,i.symbolStyle)},r.prototype._getPointAndPosition=function(t,i,n,r){var s=n;t.x=s.center.x,t.y=s.center.y,i=null==i?e.LabelPosition.Center:i},r}(e._BasePlotter);e._FunnelPlotter=i;var n=function(){function e(e,i,n,r,s){this._startPoint=e,this._width=i,this._height=n,this._neckWidth=r,this._neckHeight=s,this._center=new t.Point(this._startPoint.x+i/2,this._startPoint.y+n/2),this._offsetX=(i-r)/2,this._offsetY=n-s}return e.prototype.contains=function(t){var e=this._startPoint,i=this._offsetX,n=this._offsetY;if(t.x>=e.x&&t.x<=e.x+this._width&&t.y>=e.y&&t.y<=e.y+this._height){if(t.x>=e.x+i&&t.x<=e.x+this._width-i)return!0;if(t.y>e.y+n)return!1;if(t.x<this._center.x)return(t.y-e.y)/(t.x-e.x)<n/i;if(t.x>this._center.x)return(t.y-e.y)/(e.x+this._width-t.x)<n/i}return!1},e.prototype.distance=function(t){if(this.contains(t))return 0;var e=this._startPoint,i=this._width,n=this._height,r=this._offsetX,s=this._offsetY;return t.y<e.y?t.x<e.x?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):t.x>e.x+i?Math.sqrt(Math.pow(t.x-e.x-i,2)+Math.pow(e.y-t.y,2)):e.y-t.y:t.y>e.y+n?t.x<e.x?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(t.y-e.y-n,2)):t.x>e.x+i?Math.sqrt(Math.pow(t.x-e.x-i,2)+Math.pow(t.y-e.y-n,2)):t.y-e.y-n:t.y>e.y+s?t.x<e.x+r?e.x+r-t.x:t.x>e.x+i-r?t.x-e.x-i+r:void 0:t.x<e.x+r?Math.min(Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(t.y-e.y,2)),Math.sqrt(Math.pow(t.x-r/2-e.x,2)+Math.pow(t.y-s/2-e.y,2)),Math.sqrt(Math.pow(t.x-r-e.x,2)+Math.pow(t.y-s-e.y,2))):Math.min(Math.sqrt(Math.pow(t.x-i-e.x,2)+Math.pow(t.y-e.y,2)),Math.sqrt(Math.pow(t.x-i+r/2-e.x,2)+Math.pow(t.y-s/2-e.y,2)),Math.sqrt(Math.pow(t.x-i+r-e.x,2)+Math.pow(t.y-s-e.y,2)))},Object.defineProperty(e.prototype,"center",{get:function(){return this._center},enumerable:!0,configurable:!0}),e}();e._FunnelSegment=n}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){"use strict";var i=function(){function e(e,i,n,r,s){this._volumes=t.asArray(e),this._xVals=t.asArray(i),this._xDataMin=t.asNumber(n,!0,!1),this._xDataMax=t.asNumber(r,!0,!1),this._xDataType=t.asEnum(s,t.DataType,!0),this._calcData=[],this._init()}return e.prototype.convert=function(i,n,r){var s=void 0,o=this._calcData.length,a=-1;if(this._hasXs&&this._xDataType===t.DataType.Date){if(-1===(a=this._xVals.indexOf(i)))for(var h=0;h<this._xVals.length;h++){if(h<this._xVals.length-1&&this._xVals[h]<=i&&i<=this._xVals[h+1]){a=h;break}if(0===h&&i<=this._xVals[h]){a=h;break}if(h===this._xVals.length-1&&this._xVals[h]<=i){a=h;break}}-1===a&&(a=this._xVals.indexOf(Math.floor(i)),a=t.clamp(a,0,o-1))}else this._hasXs?-1===(a=this._xVals.indexOf(i))&&(a=this._xVals.indexOf(Math.floor(i)),a=t.clamp(a,0,o-1)):a=t.clamp(Math.round(i),0,o-1);return 0<=a&&a<o&&(this._hasXs&&(i=e.convertToRange(i,0,o-1,this._xDataMin,this._xDataMax)),s=((s=this._calcData[a].value+(i-a)*this._calcData[a].width-.5*this._calcData[a].width)-(n=this._getXVolume(n)))/((r=this._getXVolume(r))-n)),s},e.prototype.convertBack=function(t,i,n){var r,s=void 0,o=this._calcData.length,a=-1;for(r=0;r<o;r++)if(this._calcData[r].x1<=t&&t<=this._calcData[r].x2||0===r&&t<=this._calcData[r].x2||r===o-1&&this._calcData[r].x1<=t){a=r;break}return 0<=a&&a<o&&(s=t/this._calcData[a].width-this._calcData[a].value/this._calcData[a].width+.5+r,this._hasXs&&(s=e.convertToRange(s,this._xDataMin,this._xDataMax,0,o-1))),s},e.prototype._init=function(){this._hasXs=null!==this._xVals&&this._xVals.length>0,this._hasXs&&!t.isNumber(this._xDataMin)&&(this._xDataMin=Math.min.apply(null,this._xVals)),this._hasXs&&!t.isNumber(this._xDataMax)&&(this._xDataMax=Math.max.apply(null,this._xVals)),this._hasXs&&(this._hasXs=t.isNumber(this._xDataMin)&&t.isNumber(this._xDataMax)),this._hasXs&&this._xDataType===t.DataType.Date&&this._fillGaps();var e=0,i=0,n=null!==this._volumes&&this._volumes.length>0?this._volumes.length:0;for(i=0;i<n;i++)e+=this._volumes[i]||0;var r,s,o=0;for(i=0;i<n;i++)r=o+(s=(this._volumes[i]||0)/e),this._calcData.push({value:r,width:s,x1:o,x2:r}),o=this._calcData[i].value},e.prototype._getXVolume=function(i){var n=this._calcData.length,r=-1;if(this._hasXs){r=this._xVals.indexOf(i);for(var s=0;s<this._xVals.length;s++){if(s<this._xVals.length-1&&this._xVals[s]<=i&&i<=this._xVals[s+1]){r=s;break}if(0===s&&i<=this._xVals[s]){r=s;break}if(s===this._xVals.length-1&&this._xVals[s]<=i){r=s;break}}}return this._hasXs&&(i=e.convertToRange(i,0,n-1,this._xDataMin,this._xDataMax)),-1===r&&(r=t.clamp(Math.round(i),0,n-1)),this._calcData[r].value+(i-r)*this._calcData[r].width-.5*this._calcData[r].width},e.convertToRange=function(t,e,i,n,r){return e===i||n===r?0:(t-n)*(i-e)/(r-n)+e},e.prototype._fillGaps=function(){if(!(this._xDataType!==t.DataType.Date||null===this._xVals||this._xVals.length<=0)){var e,i=this._xDataMin,n=this._xDataMax;for(e=1;i<n;e++)(i=new Date(i)).setDate(i.getDate()+1),(i=i.valueOf())!==this._xVals[e]&&(this._xVals.splice(e,0,i),this._volumes.splice(e,0,0))}},e}();e._VolumeHelper=i}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){!function(i){"use strict";var n=function(i){function n(t){var n=i.call(this)||this;return n._chartType=e.ChartType.Line,n._sampleCount=100,n.initialize(t),n}return __extends(n,i),Object.defineProperty(n.prototype,"sampleCount",{get:function(){return this._sampleCount},set:function(e){(e=t.asNumber(e,!1,!0))!=this._sampleCount&&(this._sampleCount=e,this._invalidate())},enumerable:!0,configurable:!0}),n.prototype.approximate=function(t){return 0},n.prototype.getValues=function(t){var e=this,n=e.binding,r=e.bindingX;return n!==e._bind&&(e._bind=n,e.binding=n),r!==e._bindX&&(e._bindX=r,e.bindingX=r),null==e._originYValues&&(e._originYValues=i.prototype.getValues.call(this,0)),null==e._originXValues&&(e._originXValues=i.prototype.getValues.call(this,1)),null==e._originXValues||null==e._originYValues?null:(i.prototype.getValues.call(this,t),null!=e._xValues&&null!=e._yValues||e._calculateValues(),0===t?e._yValues||null:1===t?e._xValues||null:void 0)},n.prototype._calculateValues=function(){},n.prototype._invalidate=function(){i.prototype._invalidate.call(this),this._clearCalculatedValues()},n.prototype._clearValues=function(){i.prototype._clearValues.call(this),this._originXValues=null,this._originYValues=null,this._clearCalculatedValues()},n.prototype._clearCalculatedValues=function(){this._xValues=null,this._yValues=null},n}(e.SeriesBase);i.TrendLineBase=n}(e.analytics||(e.analytics={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){!function(e){"use strict";var i,n=function(){function e(){}return e.round=function(t,e){if(!t)return 0;var i=Math.pow(10,e||2);return Math.round(t*i)/i},e.avg=function(t){return e.sum(t)/t.length},e.sum=function(e){return(e=t.asArray(e,!1)).reduce(function(t,e){return t+e},0)},e.sumOfPow=function(e,i){return e=t.asArray(e,!1),i=t.asNumber(i,!1),e.reduce(function(t,e){return t+Math.pow(e,i)},0)},e.sumProduct=function(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];i.length;var r,a,o=0,s=[];for((i=t.asArray(i,!1)).forEach(function(e,i){e=t.asArray(e,!1),0===i?o=e.length:t.assert(e.length===o,"The length of the arrays must be equal")}),r=0;r<o;r++)a=1,i.some(function(e,i){var n=e[r];if(!n||!t.isNumber(n))return a=0,!0;a*=n}),s.push(a);return e.sum(s)},e.variance=function(i){i=t.asArray(i,!1);var n,r=e.avg(i);return n=i.map(function(t){return t-r}),e.sumOfSquares(n)/(i.length-1)},e.covariance=function(i,n){i=t.asArray(i,!1),n=t.asArray(n,!1),t.assert(i.length===n.length,"Length of arrays must be equal");var r,a=e.avg(i),o=e.avg(n),s=i.length,u=0;for(r=0;r<s;r++)u+=(i[r]-a)*(n[r]-o)/s;return u},e.min=function(e){return Math.min.apply(Math,t.asArray(e,!1))},e.max=function(e){return Math.max.apply(Math,t.asArray(e,!1))},e.square=function(e){return Math.pow(t.asNumber(e,!1),2)},e.sumOfSquares=function(t){return e.sumOfPow(t,2)},e.stdDev=function(t){return Math.sqrt(e.variance(t))},e}();!function(t){t[t.Linear=0]="Linear",t[t.Exponential=1]="Exponential",t[t.Logarithmic=2]="Logarithmic",t[t.Power=3]="Power",t[t.Fourier=4]="Fourier",t[t.Polynomial=5]="Polynomial",t[t.MinX=6]="MinX",t[t.MinY=7]="MinY",t[t.MaxX=8]="MaxX",t[t.MaxY=9]="MaxY",t[t.AverageX=10]="AverageX",t[t.AverageY=11]="AverageY"}(i=e.TrendLineFitType||(e.TrendLineFitType={}));var r=function(e){function n(t){var n=e.call(this)||this;return n._fitType=i.Linear,n._order=2,n.initialize(t),n}return __extends(n,e),Object.defineProperty(n.prototype,"fitType",{get:function(){return this._fitType},set:function(e){(e=t.asEnum(e,i,!1))!=this._fitType&&(this._fitType=e,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"order",{get:function(){return this._order},set:function(e){e!=this._order&&(this._order=t.asNumber(e,!1,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"coefficients",{get:function(){return this._helper?this._helper.coefficients:null},enumerable:!0,configurable:!0}),n.prototype.approximate=function(t){return this._helper?this._helper.approximate(t):NaN},n.prototype.getEquation=function(t){return(this._helper?this._helper.getEquation(t):"").replace(/\S(\+|\-)\d/g,function(t){return t[0]+" "+t[1]+" "+t[2]})},n.prototype._calculateValues=function(){var t=i[this._fitType];if(m[t]){var e=!1,n=this._originXValues;0==this._chart._xvals.length&&this._chart._xlabels.length>0&&(n=this._originXValues.map(function(t){return t+1}),e=!0);var r=new m[t](this._originYValues,n,this.sampleCount,this.order);r._isXString=e;var a=r.calculateValues();this._yValues=a[0],this._xValues=a[1],this._helper=r}},n}(e.TrendLineBase);e.TrendLine=r;var a=function(){function t(t,e){this._x=t,this._y=e}return Object.defineProperty(t.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minX",{get:function(){return null==this._minX&&(this._minX=n.min(this._x)),this._minX},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return null==this._minY&&(this._minY=n.min(this._y)),this._minY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return null==this._maxX&&(this._maxX=n.max(this._x)),this._maxX},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return null==this._maxY&&(this._maxY=n.max(this._y)),this._maxY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"averageX",{get:function(){return null==this._averageX&&(this._averageX=n.avg(this._x)),this._averageX},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"averageY",{get:function(){return null==this._averageY&&(this._averageY=n.avg(this._y)),this._averageY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sumX",{get:function(){return null==this._sumX&&(this._sumX=n.sum(this._x)),this._sumX},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sumY",{get:function(){return null==this._sumY&&(this._sumY=n.sum(this._y)),this._sumY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"LogX",{get:function(){return null==this._logX&&(this._logX=this._x.map(function(t){return Math.log(t)})),this._logX},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"LogY",{get:function(){return null==this._logY&&(this._logY=this._y.map(function(t){return Math.log(t)})),this._logY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sumLogX",{get:function(){return null==this._sumLogX&&(this._sumLogX=n.sum(this.LogX)),this._sumLogX},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sumLogY",{get:function(){return null==this._sumLogY&&(this._sumLogY=n.sum(this.LogY)),this._sumLogY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sumOfSquareX",{get:function(){return null==this._sumOfSquareX&&(this._sumOfSquareX=n.sumOfSquares(this._x)),this._sumOfSquareX},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sumOfSquareY",{get:function(){return null==this._sumOfSquareY&&(this._sumOfSquareY=n.sumOfSquares(this._y)),this._sumOfSquareY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sumOfSquareLogX",{get:function(){return null==this._sumOfSquareLogX&&(this._sumOfSquareLogX=n.sumOfSquares(this.LogX)),this._sumOfSquareLogX},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"sumOfSquareLogY",{get:function(){return null==this._sumOfSquareLogY&&(this._sumOfSquareLogY=n.sumOfSquares(this.LogY)),this._sumOfSquareLogY},enumerable:!0,configurable:!0}),t.prototype.sumProduct=function(t,e){return null==this._sumProduct&&(this._sumProduct=n.sumProduct(t,e)),this._sumProduct},t}(),o=function(){function e(e,i,n){this._coefficients=[],this.y=t.asArray(e),this.x=t.asArray(i),t.assert(e.length===i.length,"Length of X and Y arrays are not equal"),this.count=n||e.length,this._calculator=new a(i,e),this.xMin=this._calculator.minX,this.xMax=this._calculator.maxX}return Object.defineProperty(e.prototype,"calculator",{get:function(){return this._calculator},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(e){e!==this.y&&(this._y=t.asArray(e,!1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(e){e!==this.x&&(this._x=t.asArray(e,!1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},set:function(e){e!==this.count&&(this._count=t.asInt(e,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xMin",{get:function(){return this._xMin},set:function(e){e!==this.xMin&&(this._xMin=t.asNumber(e,!1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"xMax",{get:function(){return this._xMax},set:function(e){e!==this.xMax&&(this._xMax=t.asNumber(e,!1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"coefficients",{get:function(){return this._coefficients},enumerable:!0,configurable:!0}),e.prototype._calculateCoefficients=function(){var t=this.calcB(),e=this.calcA(t);this._coefficients.push(e,t)},e.prototype.calculateValues=function(){for(var t=(this.xMax-this.xMin)/(this.count-1),e=[[],[]],i=0;i<this.count;i++){var n=this.xMin+t*i,r=this.calcY(n);e[0].push(r),this._isXString?e[1].push(n-1):e[1].push(n)}return e},e.prototype.calcA=function(t){var e=this.y.length,i=this.calculator.sumX;return(this.calculator.sumY-(t=t||this.calcB())*i)/e},e.prototype.calcB=function(){var t=this.y.length,e=this.calculator,i=e.sumProduct(e.x,e.y),r=e.sumX;return(t*i-r*e.sumY)/(t*e.sumOfSquareX-n.square(r))},e.prototype.calcY=function(t){var e=this.coefficients;return e[0]+e[1]*t},e.prototype.approximate=function(t){return this.calcY(t)},e.prototype.getEquation=function(t){var t=t||this._defaultEquationFmt;return this._getEquation(t)},e.prototype._getEquation=function(t){var e=[];return this.coefficients.forEach(function(i){e.push(t(i))}),this._concatEquation(e)},e.prototype._concatEquation=function(t){return""},e.prototype._defaultEquationFmt=function(t){var e,i=Math.abs(t),n=String(i),r=0;return i>=1e5?(e=String(Math.round(i)).length-1,Math.round(t/Number("1e"+e))+"e"+e):i<1e-4?(e=n.indexOf("e")>-1?Math.abs(+n.substring(n.indexOf("e")+1)):n.match(/\.0+/)[0].length,Math.round(t*Number("1e"+e))+"e-"+e):(r=t>0?6:7,i>=1e4&&r--,String(+String(t).substring(0,r)))},e}(),s=function(e){function i(t,i,n,r){var a=e.call(this,t,i,n)||this;return a._calculateCoefficients(),a.yOffset=r,a}return __extends(i,e),Object.defineProperty(i.prototype,"yOffset",{get:function(){return this._yOffset},set:function(e){e!==this.yOffset&&(this._yOffset=t.asNumber(e,!0))},enumerable:!0,configurable:!0}),i.prototype.calcA=function(t){return null!=this.yOffset?this.yOffset:e.prototype.calcA.call(this,t)},i.prototype.calcB=function(){return null!=this.yOffset?this._calculateBSimple():e.prototype.calcB.call(this)},i.prototype._calculateBSimple=function(){var t=this.calculator,e=t.sumProduct(t.x,t.y),i=t.sumX,n=t.sumOfSquareX;return(e-this.yOffset*i)/n},i.prototype._calculateCoefficients=function(){var t=this.calcB(),e=this.calcA(t);this.coefficients.push(t,e)},i.prototype.calcY=function(t){var e=this.coefficients;return e[0]*t+e[1]},i.prototype._concatEquation=function(t){return"y = "+t[0]+"x"+(this.coefficients[1]>=0?"+":"")+t[1]},i}(o),u=function(t){function e(e,i,n){var r=t.call(this,e,i,n)||this;return r._calculateCoefficients(),r}return __extends(e,t),e.prototype.calcA=function(t){var e=this.y.length,i=this.calculator,n=i.sumY,r=i.sumLogX;return(n-(t=t||this.calcB())*r)/e},e.prototype.calcB=function(){var t=this.y.length,e=this.calculator,i=e.sumProduct(e.y,e.LogX),r=e.sumY,a=e.sumLogX;return(t*i-r*a)/(t*e.sumOfSquareLogX-n.square(a))},e.prototype._calculateCoefficients=function(){var t=this.calcB(),e=this.calcA(t);this.coefficients.push(t,e)},e.prototype.calcY=function(t){var e=this.coefficients;return Math.log(t)*e[0]+e[1]},e.prototype._concatEquation=function(t){return"y = "+t[0]+"ln(x)"+(this.coefficients[1]>=0?"+":"")+t[1]},e}(o),l=function(t){function e(e,i,n){var r=t.call(this,e,i,n)||this;return r._calculateCoefficients(),r}return __extends(e,t),e.prototype.calcA=function(){var t=this.y.length,e=this.calculator,i=e.sumLogY,r=e.sumOfSquareX,a=e.sumX,o=e.sumProduct(e.x,e.LogY);return Math.exp((i*r-a*o)/(t*r-n.square(a)))},e.prototype.calcB=function(){var t=this.y.length,e=this.calculator,i=e.sumLogY,r=e.sumOfSquareX,a=e.sumX;return(t*e.sumProduct(e.x,e.LogY)-a*i)/(t*r-n.square(a))},e.prototype.calcY=function(t){var e=this.coefficients;return e[0]*Math.exp(e[1]*t)},e.prototype._concatEquation=function(t){return"y = "+t[0]+"e<sup>"+t[1]+"x</sup>"},e}(o),c=function(t){function e(e,i,n){var r=t.call(this,e,i,n)||this;return r._calculateCoefficients(),r}return __extends(e,t),e.prototype.calcA=function(t){var e=this.calculator,i=this.y.length,n=e.sumLogX,r=e.sumLogY,t=t||this.calcB();return Math.exp((r-t*n)/i)},e.prototype.calcB=function(){var t=this.y.length,e=this.calculator,i=e.sumProduct(e.LogX,e.LogY),r=e.sumLogX;return(t*i-r*e.sumLogY)/(t*e.sumOfSquareLogX-n.square(r))},e.prototype.calcY=function(t){var e=this.coefficients;return e[0]*Math.pow(t,e[1])},e.prototype._concatEquation=function(t){return"y = "+t[0]+"x<sup>"+t[1]+"</sup>"},e}(o),h=function(e){function i(t,i,n,r){var a=e.call(this,t,i,n)||this;return a._order=null==r?2:r,a._basis=[],a._calculateCoefficients(),a}return __extends(i,e),Object.defineProperty(i.prototype,"basis",{get:function(){return this._basis},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"order",{get:function(){return this._order},set:function(e){this._order=t.asNumber(e,!0)},enumerable:!0,configurable:!0}),i.prototype._calculateCoefficients=function(){this._coefficients.length=this.order,this._createBasis(),this._normalizeAndSolveGauss()},i.prototype._createBasis=function(){var t=this.x.length,e=this.order;if(t<2)throw"Incompatible data: Less than 2 data points.";if(e<1)throw"Incompatible data: Less than 1 coefficient in the fit";if(e>t)throw"Incompatible data: Number of data points less than number of terms"},i.prototype._normalizeAndSolveGauss=function(){var t=[];if(this._computeNormalEquations(t),this._genDefValForArray(t,0),!this._solveGauss(t))throw"Incompatible data: No solution."},i.prototype._genDefValForArray=function(t,e){var i=t.length+1;t.forEach(function(t){for(var n=0;n<i;n++)null==t[n]&&(t[n]=e)})},i.prototype._computeNormalEquations=function(t){var e,i,n,r,a=this.y,o=this.basis,s=this.order,u=a.length;for(e=0;e<s;e++)for(n=0,null==t[e]&&(t[e]=[]),a.forEach(function(t,i){n+=t*o[i][e]}),t[e][s]=n,i=e;i<s;i++){for(n=0,r=0;r<u;r++)n+=o[r][i]*o[r][e];null==t[i]&&(t[i]=[]),t[i][e]=n,t[e][i]=n}},i.prototype._solveGauss=function(t){var e,i,n=t.length,r=this._coefficients,a=!0;if(r.length<n||t[0].length<n+1)throw"Dimension of matrix is not correct.";if(t.some(function(e,r){var o,s,u=r,l=Math.abs(e[r]);for(i=r+1;i<n;i++)l<(o=Math.abs(t[i][r]))&&(l=o,u=i);if(!(l>0))return a=!1,!0;for(i=r;i<=n;i++)s=t[r][i],t[r][i]=t[u][i],t[u][i]=s;for(u=r+1;u<n;u++)for(s=t[u][r]/e[r],t[u][r]=0,i=r+1;i<=n;i++)t[u][i]-=s*e[i]}),a)for(e=n-1;e>=0;e--){for(r[e]=t[e][n],i=e+1;i<n;i++)r[e]-=t[e][i]*r[i];r[e]=r[e]/t[e][e]}return a},i}(o),f=function(t){function e(e,i,n,r){return t.call(this,e,i,n,r)||this}return __extends(e,t),Object.defineProperty(e.prototype,"coefficients",{get:function(){return this._coefficients.slice(0).reverse()},enumerable:!0,configurable:!0}),e.prototype.calcY=function(t){var e=0,i=1;return this._coefficients.forEach(function(n,r){r>0&&(i*=t),e+=n*i}),e},e.prototype._calculateCoefficients=function(){this._coefficients;this.order++,t.prototype._calculateCoefficients.call(this),this.order--},e.prototype._createBasis=function(){t.prototype._createBasis.call(this);var e=this.x,i=this.basis,n=this.order;e.forEach(function(t,e){i[e]=[1];for(var r=1;r<=n;r++)i[e][r]=t*i[e][r-1]})},e.prototype._concatEquation=function(t){var e="y = ",i=t.length,n=this.coefficients;return t.forEach(function(t,r){var a,o=i-1-r;0===o?e+=t:1===o?(a=n[r+1]>=0?"+":"",e+=t+"x"+a):(a=n[r+1]>=0?"+":"",e+=t+"x<sup>"+o+"</sup>"+a)}),e},e}(h),_=function(t){function e(e,i,n,r){return r=null==r?i.length:r,t.call(this,e,i,n,r)||this}return __extends(e,t),e.prototype._createBasis=function(){t.prototype._createBasis.call(this);var e=this.x,i=this.basis,n=this.order;e.forEach(function(t,e){var r,a;for(i[e]=[1],r=1;r<n;r++)a=Math.floor((r+1)/2),r%2==1?i[e].push(Math.cos(a*t)):i[e].push(Math.sin(a*t))})},e.prototype.calcY=function(t){var e;return this._coefficients.forEach(function(i,n){var r,a=Math.floor((n+1)/2);0===n?e=i:(r=a*t,e+=n%2==1?i*Math.cos(r):i*Math.sin(r))}),e},e.prototype._concatEquation=function(t){var e="y = ",i=t.length,n=this.coefficients;return t.forEach(function(t,r){var a=r===i-1?"":n[r+1]>=0?"+":"",o="",s=Math.ceil(r/2);if(0===r)e+=t+a;else{o=r%2==1?"cos":"sin";o+="("+(1===s?"":String(s))+"x)",e+=t+o+a}}),e},e}(h),p=function(t){function e(e,i,n){var r=t.call(this,e,i,n)||this;return r._calculateCoefficients(),r}return __extends(e,t),e.prototype._setVal=function(t){this._val=t},e.prototype.calcY=function(t){return this._val},e}(o),m={TrendHelperBase:o,Linear:s,Exponential:l,Logarithmic:u,Power:c,Polynomial:f,Fourier:_,MinX:function(t){function e(e,i,n){return t.call(this,e,i,n)||this}return __extends(e,t),e.prototype.calculateValues=function(){var t,e,i=this.xMin,r=n.min(this.y),a=n.max(this.y);return this._isXString&&(i-=1),t=[i,i],e=[r,a],this._setVal(i),[e,t]},e.prototype.getEquation=function(t){var e=this.xMin;return this._isXString&&(e-=1),t&&(e=t(e)),"x = "+e},e}(p),MinY:function(t){function e(e,i,n){return t.call(this,e,i,n)||this}return __extends(e,t),e.prototype.calculateValues=function(){var t,e,i=this.xMin,r=this.xMax,a=n.min(this.y);return this._isXString&&(i-=1,r-=1),t=[i,r],e=[a,a],this._setVal(a),[e,t]},e.prototype.getEquation=function(t){var e=n.min(this.y);return t&&(e=t(e)),"y = "+e},e}(p),MaxX:function(t){function e(e,i,n){return t.call(this,e,i,n)||this}return __extends(e,t),e.prototype.calculateValues=function(){var t,e,i=this.xMax,r=n.min(this.y),a=n.max(this.y);return this._isXString&&(i-=1),t=[i,i],e=[r,a],this._setVal(i),[e,t]},e.prototype.getEquation=function(t){var e=this.xMax;return this._isXString&&(e-=1),t&&(e=t(e)),"x = "+e},e}(p),MaxY:function(t){function e(e,i,n){return t.call(this,e,i,n)||this}return __extends(e,t),e.prototype.calculateValues=function(){var t,e,i=this.xMin,r=this.xMax,a=n.max(this.y);return this._isXString&&(i-=1,r-=1),t=[i,r],e=[a,a],this._setVal(a),[e,t]},e.prototype.getEquation=function(t){var e=n.max(this.y);return t&&(e=t(e)),"y = "+e},e}(p),AverageX:function(t){function e(e,i,n){return t.call(this,e,i,n)||this}return __extends(e,t),e.prototype.calculateValues=function(){var t,e,i=n.avg(this.x),r=n.min(this.y),a=n.max(this.y);return this._isXString&&(i-=1),t=[i,i],e=[r,a],this._setVal(i),[e,t]},e.prototype._getEquation=function(t){var e=n.avg(this.x);return this._isXString&&(e-=1),t&&(e=t(e))," x ="+e},e.prototype._defaultEquationFmt=function(e){return Math.abs(e)<1e5?t.prototype._defaultEquationFmt.call(this,e):""+n.round(e,2)},e}(p),AverageY:function(t){function e(e,i,n){return t.call(this,e,i,n)||this}return __extends(e,t),e.prototype.calculateValues=function(){var t,e,i=n.avg(this.y),r=this.xMin,a=this.xMax;return this._isXString&&(r-=1,a-=1),t=[r,a],e=[i,i],this._setVal(i),[e,t]},e.prototype._getEquation=function(t){return"y = "+t(n.avg(this.y))},e.prototype._defaultEquationFmt=function(e){return Math.abs(e)<1e5?t.prototype._defaultEquationFmt.call(this,e):""+n.round(e,2)},e}(p)}}(e.analytics||(e.analytics={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){!function(e){"use strict";var i=function(e){function i(i){var n=e.call(this)||this;return n._min=0,n._max=1,n.initialize(i),null==n.itemsSource&&(n.itemsSource=[new t.Point(0,0)]),n}return __extends(i,e),Object.defineProperty(i.prototype,"min",{get:function(){return this._min},set:function(e){this._min!==e&&(this._min=t.asNumber(e,!1),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"max",{get:function(){return this._max},set:function(e){this._max!==e&&(this._max=t.asNumber(e,!1),this._invalidate())},enumerable:!0,configurable:!0}),i.prototype.getValues=function(t){var e=this;return null!=e._xValues&&null!=e._yValues||e._calculateValues(),0===t?e._yValues||null:1===t?e._xValues||null:void 0},i.prototype._calculateValues=function(){for(var t,e=this,i=e.sampleCount,n=[],r=[],a=(e.max-e.min)/(i-1),o=0;o<i;o++)t=o===i-1?this.max:this.min+a*o,n[o]=e._calculateX(t),r[o]=e._calculateY(t);e._yValues=r,e._xValues=n},i.prototype._validateValue=function(t){return isFinite(t)?t:Number.NaN},i.prototype._calculateValue=function(t,e){var i;try{i=t(e)}catch(t){i=Number.NaN}return this._validateValue(i)},i.prototype._calculateX=function(t){return 0},i.prototype._calculateY=function(t){return 0},i}(e.TrendLineBase);e.FunctionSeries=i;var n=function(e){function i(t){return e.call(this,t)||this}return __extends(i,e),Object.defineProperty(i.prototype,"func",{get:function(){return this._func},set:function(e){e&&this._func!==e&&(this._func=t.asFunction(e,!1),this._invalidate())},enumerable:!0,configurable:!0}),i.prototype._calculateX=function(t){return t},i.prototype._calculateY=function(t){return this._calculateValue(this.func,t)},i.prototype.approximate=function(t){return this._calculateValue(this.func,t)},i}(i);e.YFunctionSeries=n;var r=function(e){function i(t){return e.call(this,t)||this}return __extends(i,e),Object.defineProperty(i.prototype,"xFunc",{get:function(){return this._xFunc},set:function(e){e&&this._xFunc!==e&&(this._xFunc=t.asFunction(e,!1),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"yFunc",{get:function(){return this._yFunc},set:function(e){e&&this._yFunc!==e&&(this._yFunc=t.asFunction(e,!1),this._invalidate())},enumerable:!0,configurable:!0}),i.prototype._calculateX=function(t){return this._calculateValue(this.xFunc,t)},i.prototype._calculateY=function(t){return this._calculateValue(this.yFunc,t)},i.prototype.approximate=function(e){var i=this._calculateValue(this.xFunc,e),n=this._calculateValue(this.yFunc,e);return new t.Point(i,n)},i}(i);e.ParametricFunctionSeries=r}(e.analytics||(e.analytics={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){!function(i){"use strict";var n;!function(t){t[t.Simple=0]="Simple",t[t.Weighted=1]="Weighted",t[t.Exponential=2]="Exponential",t[t.Triangular=3]="Triangular"}(n=i.MovingAverageType||(i.MovingAverageType={}));var r=function(i){function r(t){var r=i.call(this)||this;return r._chartType=e.ChartType.Line,r._type=n.Simple,r._period=2,r.initialize(t),r}return __extends(r,i),Object.defineProperty(r.prototype,"type",{get:function(){return this._type},set:function(e){(e=t.asEnum(e,n,!1))!=this._type&&(this._type=e,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"period",{get:function(){return this._period},set:function(e){(e=t.asNumber(e,!1,!0))!=this._period&&(this._period=t.asNumber(e,!1,!0),this._invalidate())},enumerable:!0,configurable:!0}),r.prototype._checkPeriod=function(){var e=this.period,i=this._originXValues;e<=1&&t.assert(!1,"period must be greater than 1."),i&&i.length&&e>=i.length&&t.assert(!1,"period must be less than itemSource's length.")},r.prototype._calculateValues=function(){this._type;var t="_calculate"+n[this._type],e=[],i=[];this._checkPeriod(),this[t]&&this[t].call(this,e,i),this._yValues=i,this._xValues=e},r.prototype._calculateSimple=function(t,e,i){void 0===i&&(i=!1);for(var n=this._originXValues,r=this._originYValues,a=n.length,o=this._period,s=0,u=0;u<a;u++)s+=r[u]||0,u>=o&&(s-=r[u-o]||0),u>=o-1?(t.push(n[u]),e.push(s/o)):i&&(t.push(n[u]),e.push(s/(u+1)))},r.prototype._calculateWeighted=function(t,e){for(var i=this._originXValues,n=this._originYValues,r=i.length,a=this._period,o=a*(a+1)/2,s=0,u=0,l=0;l<r;l++)l>0&&(s+=n[l-1]||0),l>a&&(s-=n[l-a-1]||0),l<a-1?u+=(n[l]||0)*(l+1):(u+=(n[l]||0)*a,l>a-1&&(u-=s),t.push(i[l]),e.push(u/o))},r.prototype._calculateExponential=function(t,e){for(var i=this._originXValues,n=this._originYValues,r=i.length,a=this._period,o=0,s=0;s<r;s++)s<=a-2?(o+=n[s]||0,s===a-2&&(o/=a-1)):(o+=2/(a+1)*((n[s]||0)-o),t.push(i[s]),e.push(o))},r.prototype._calculateTriangular=function(t,e){var i=this._period,n=[],r=[],a=0;this._calculateSimple(n,r,!0);for(var o=0,s=n.length;o<s;o++)a+=r[o]||0,o>=i&&(a-=r[o-i]||0),o>=i-1&&(t.push(n[o]),e.push(a/i))},r}(i.TrendLineBase);i.MovingAverage=r}(e.analytics||(e.analytics={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){!function(i){"use strict";var n=function(i){function n(t){var n=i.call(this)||this;return n._startLabel="Start",n._relativeData=!0,n._connectorLines=!1,n._showTotal=!1,n._totalLabel="Total",n._getXValues=!1,n._showIntermediateTotal=!1,n._intermediateTotalPos=[],n._chartType=e.ChartType.Bar,n.rendering.addHandler(n._rendering,n),n.initialize(t),n}return __extends(n,i),Object.defineProperty(n.prototype,"relativeData",{get:function(){return this._relativeData},set:function(e){e!=this._relativeData&&(this._relativeData=t.asBoolean(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"start",{get:function(){return this._start},set:function(e){e!=this._start&&(this._start=t.asNumber(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"startLabel",{get:function(){return this._startLabel},set:function(e){e!=this._startLabel&&(this._startLabel=t.asString(e,!1),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showTotal",{get:function(){return this._showTotal},set:function(e){e!=this._showTotal&&(this._showTotal=t.asBoolean(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"totalLabel",{get:function(){return this._totalLabel},set:function(e){e!=this._totalLabel&&(this._totalLabel=t.asString(e,!1),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showIntermediateTotal",{get:function(){return this._showIntermediateTotal},set:function(e){e!=this._showIntermediateTotal&&(this._showIntermediateTotal=t.asBoolean(e,!1),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"intermediateTotalPositions",{get:function(){return this._intermediateTotalPositions},set:function(e){e!=this._intermediateTotalPositions&&(this._intermediateTotalPositions=t.asArray(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"intermediateTotalLabels",{get:function(){return this._intermediateTotalLabels},set:function(e){e!=this._intermediateTotalLabels&&(t.assert(null==e||t.isArray(e)||t.isString(e),"Array or string expected."),this._intermediateTotalLabels=e,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"connectorLines",{get:function(){return this._connectorLines},set:function(e){e!=this._connectorLines&&(this._connectorLines=t.asBoolean(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"styles",{get:function(){return this._styles},set:function(t){t!=this._styles&&(this._styles=t,this._invalidate())},enumerable:!0,configurable:!0}),n.prototype.getValues=function(e){var n,r,a,o,s=this,u=[],l=0;if(n=i.prototype.getValues.call(this,e),0===e){if(!this._yValues){var u=[],c=0,h=0,f=n&&n.length||0;if(this.relativeData){for(;h<f;h++)c+=isNaN(n[h])?0:n[h],u.push(c);this._yValues=u}else{for(;h<f;h++)c=isNaN(n[h])?0:n[h],u.push(c);this._yValues=u}(r=this._yValues)&&r.length>0&&(this.showIntermediateTotal&&this.intermediateTotalPositions&&this.intermediateTotalPositions.length>0&&(this._intermediateTotalPos=r.slice(),this.intermediateTotalPositions.reduceRight(function(t,e){var i=0===e?r[0]:r[e-1];return r.length>e?(r.splice(e,0,i),s._intermediateTotalPos.splice(e,0,!0)):r.length===e&&(r.push(i),s._intermediateTotalPos.push(!0)),0},0)),null!=this.start&&(r.splice(0,0,this.start),this._intermediateTotalPos.splice(0,0,!1)),this.showTotal&&r&&r.push(r[r.length-1]))}return this._yValues}if(!this._xValues&&this._getXValues&&(this._xValues=n&&n.slice(),this._getXValues=!1,this._xValues&&this._xValues.length>1&&(f=this._xValues.length,o=this._xValues[f-1],l=Math.abs(this._xValues[f-1]-this._xValues[f-2])),this.chart&&this.chart._xlabels&&this.chart._xlabels.length)){if(a=this.chart._xlabels,this.showIntermediateTotal&&this.intermediateTotalPositions&&this.intermediateTotalPositions.length>0){var _=this.intermediateTotalLabels;_&&this.intermediateTotalPositions.reduceRight(function(e,i,n){var r="";return r=t.isString(_)?_:_[n]||"",a.length>i?a.splice(i,0,r):a.length===i&&a.push(r),l&&(o+=l,s._xValues.push(o)),0},0)}null!=this.start&&(a.splice(0,0,this.startLabel),l&&(o+=l,this._xValues.push(o))),this.showTotal&&(a.push(this.totalLabel),l&&(o+=l,this._xValues.push(o)))}return this._xValues},n.prototype.legendItemLength=function(){return this.showTotal?3:2},n.prototype.measureLegendItem=function(e,i){var n=this._getName(i);return n?this._measureLegendItem(e,n):new t.Size(0,0)},n.prototype.drawLegendItem=function(t,i,n){var r=this._getLegendStyles(n);this._getName(n)&&this._drawLegendItem(t,i,e.ChartType.Bar,this._getName(n),r,this.symbolStyle)},n.prototype._clearValues=function(){i.prototype._clearValues.call(this),this._xValues=null,this._yValues=null,this._wfstyle=null,this._getXValues=!0,this._intermediateTotalPos=[],this.chart&&this.chart._performBind()},n.prototype._invalidate=function(){i.prototype._invalidate.call(this),this._clearValues()},n.prototype._rendering=function(t,e){var i=this;e.cancel=!0,this._wfstyle=null;var r,a,o,s,u,l,c=this.chart,h=this._getAxisY(),f=this._getAxisX(),_=h.origin||0,p=e.engine;if(this._barPlotter=c._getPlotter(this),o=this._barPlotter.rotated,this._barPlotter._getSymbolOrigin||(this._barPlotter._getSymbolOrigin=function(t,e,n){return 0===e?t:!0===i._intermediateTotalPos[e]?t:e===n-1&&i.showTotal?t:i._yValues[e-1]}),this._barPlotter._getSymbolStyles||(this._barPlotter._getSymbolStyles=function(t,e){var n=i._getStyles();return 0===t&&null!=i.start?n.start:!0===i._intermediateTotalPos[t]?n.intermediateTotal:t===e-1&&i.showTotal?n.total:i._yValues[t]<i._yValues[t-1]?n.falling:n.rising}),this._barPlotter.plotSeries(p,f,h,t,c,0,1),this.connectorLines){for(p.startGroup(n.CSS_CONNECTOR_LINE_GROUP),s=this._barPlotter.hitTester._map[0],l=this._yValues[0]<_,u=s[0].rect,r=1,a=s.length;r<a;r++)!0===this._intermediateTotalPos[r]&&r!==a-1||(this._drawConnectorLine(p,o,u,s[r].rect,l),u=s[r].rect,l=this._yValues[r]<this._yValues[r-1]);p.endGroup()}},n.prototype._getStyles=function(){if(this._wfstyle)return this._wfstyle;var t=this._chart.series.indexOf(this),e=this._getSymbolFill(t),i=this._getSymbolStroke(t),n=this.styles||{};return this._wfstyle={start:this._getStyleByKey(n,"start",e,i),intermediateTotal:this._getStyleByKey(n,"intermediateTotal",e,i),total:this._getStyleByKey(n,"total",e,i),falling:this._getStyleByKey(n,"falling","red","red"),rising:this._getStyleByKey(n,"rising","green","green")},this._wfstyle},n.prototype._getStyleByKey=function(t,e,i,n){return{fill:t[e]&&t[e].fill?t[e].fill:i,stroke:t[e]&&t[e].stroke?t[e].stroke:n}},n.prototype._drawConnectorLine=function(e,i,r,a,o){var s=new t.Point,u=new t.Point,l=this.chart.axisY.reversed,c=this.chart.axisX.reversed;l^=o,i?(l?(s.x=r.left,u.x=r.left):(s.x=r.left+r.width,u.x=r.left+r.width),c?(s.y=r.top,u.y=a.top+a.height):(s.y=r.top+r.height,u.y=a.top)):(l?(s.y=r.top+r.height,u.y=r.top+r.height):(s.y=r.top,u.y=r.top),c?(s.x=r.left+r.width,u.x=a.left):(s.x=r.left,u.x=a.left+a.width)),e.drawLine(s.x,s.y,u.x,u.y,n.CSS_CONNECTOR_LINE,this.styles&&this.styles.connectorLines||{stroke:"black"})},n.prototype._getLegendStyles=function(t){if(t<0||null===this.styles)return null;var e=this._getStyles();return 0===t?e.rising:1===t?e.falling:e.total},n.prototype._getName=function(t){var e=void 0;if(this.name)if(this.name.indexOf(",")){var i=this.name.split(",");i&&i.length-1>=t&&(e=i[t].trim())}else e=this.name;return e},n.CSS_CONNECTOR_LINE_GROUP="water-fall-connector-lines",n.CSS_CONNECTOR_LINE="water-fall-connector-line",n.CSS_ENDLABEL="water-fall-end-label",n}(e.SeriesBase);i.Waterfall=n}(e.analytics||(e.analytics={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){!function(i){"use strict";var n;!function(t){t[t.InclusiveMedian=0]="InclusiveMedian",t[t.ExclusiveMedian=1]="ExclusiveMedian"}(n=i.QuartileCalculation||(i.QuartileCalculation={}));var r=function(i){function r(t){var r=i.call(this)||this;return r._groupWidth=.8,r._gapWidth=.1,r._showInnerPoints=!1,r._showOutliers=!1,r._quartileCalculation=n.InclusiveMedian,r._chartType=e.ChartType.Bar,r.rendering.addHandler(r._rendering,r),r.initialize(t),r}return __extends(r,i),r.prototype._initProperties=function(e){e&&t.copy(this,e)},r.prototype._clearValues=function(){i.prototype._clearValues.call(this)},Object.defineProperty(r.prototype,"quartileCalculation",{get:function(){return this._quartileCalculation},set:function(e){(e=t.asEnum(e,n,!0))!=this._quartileCalculation&&(this._quartileCalculation=e,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"groupWidth",{get:function(){return this._groupWidth},set:function(e){e!=this._groupWidth&&e>=0&&e<=1&&(this._groupWidth=t.asNumber(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"gapWidth",{get:function(){return this._gapWidth},set:function(e){e!=this._gapWidth&&e>=0&&e<=1&&(this._gapWidth=t.asNumber(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"showMeanLine",{get:function(){return this._showMeanLine},set:function(e){e!=this._showMeanLine&&(this._showMeanLine=t.asBoolean(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"meanLineStyle",{get:function(){return this._meanLineStyle},set:function(t){t!=this._meanLineStyle&&(this._meanLineStyle=t,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"showMeanMarker",{get:function(){return this._showMeanMarker},set:function(e){e!=this._showMeanMarker&&(this._showMeanMarker=t.asBoolean(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"meanMarkerStyle",{get:function(){return this._meanMarkerStyle},set:function(t){t!=this._meanMarkerStyle&&(this._meanMarkerStyle=t,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"showInnerPoints",{get:function(){return this._showInnerPoints},set:function(e){e!=this._showInnerPoints&&(this._showInnerPoints=t.asBoolean(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"showOutliers",{get:function(){return this._showOutliers},set:function(e){e!=this._showOutliers&&(this._showOutliers=t.asBoolean(e,!0),this._invalidate())},enumerable:!0,configurable:!0}),r.prototype._rendering=function(i,n){var r=this;n.cancel=!0;var o,s,u=this,l=u.chart,c=(u.chart,u._getAxisX()),h=u._getAxisY(),f=n.index,_=n.count,p=n.engine,m=this._plotter,y=l.series.indexOf(u),d=t.asType(u,e.SeriesBase),g=this.quartileCalculation,b=this.showOutliers,v=this.groupWidth,x=(null==this.gapWidth?.2:this.gapWidth)/2;f=f||0;var P=v/(_=_||1),w=u.getValues(0),O=u.getValues(1);if(w){if(O||(O=m.dataInfo.getXVals()),O){var S=m.dataInfo.getDeltaX();S>0&&(v*=S,P*=S)}var V=d._getSymbolFill(y),M=d._getAltSymbolFill(y)||V,L=d._getSymbolStroke(y),j=d._getAltSymbolStroke(y)||L,X=w.length;null!=O&&(X=Math.min(X,O.length));var E,B,T=0,q=0;if(m.rotated){(T=c.origin||T)<c.actualMin?T=c.actualMin:T>c.actualMax&&(T=c.actualMax);c.convert(T);for(var Y=h.actualMin,A=h.actualMax,C=0;C<X;C++){var N=O?O[C]:C,k=w[C];if(null==k||0===k.length)return;if(m._getSymbolOrigin&&h.convert(m._getSymbolOrigin(T,C)),m._getSymbolStyles){var I=m._getSymbolStyles(C);V=I&&I.fill?I.fill:V,M=I&&I.fill?I.fill:M,L=I&&I.stroke?I.fill:L,j=I&&I.stroke?I.fill:j}if(E=k[0]>0?V:M,B=k[0]>0?L:j,p.fill=E,p.stroke=B,e._DataInfo.isValid(N)&&t.isArray(k)&&k.length>0&&e._DataInfo.isValid(k[0])){var F=N-.5*v+f*P,Q=N-.5*v+(f+1)*P,D=(Q-F)*x;if(F+=D,Q-=D,F<Y&&Q<Y||F>A&&Q>A)continue;F=h.convert(F),Q=h.convert(Q);var W=new a(k,g,b),R={min:c.convert(W.min),max:c.convert(W.max),firstQuartile:c.convert(W.firstQuartile),median:c.convert(W.median),thirdQuartile:c.convert(W.thirdQuartile),mean:c.convert(W.mean),outlierPoints:this._convertPoints(W.outlierPoints,c),innerPoints:this._convertPoints(W.innerPoints,c)},G=new t.Rect(Math.min(R.min,R.max),Math.min(F,Q),Math.abs(R.max-R.min),Math.abs(Q-F)),z=new e._RectArea(G),H={min:Math.min(F,Q),median:(F+Q)/2,max:Math.max(Q,F)};if(l.itemFormatter){p.startGroup();var K=new e.HitTestInfo(l,new t.Point((R.min+R.max)/2,H.median),e.ChartElement.SeriesSymbol);K._setData(u,C),l.itemFormatter(p,K,function(){r._drawBoxWhisker(p,R,H,o,s,u),o=R,s=H}),p.endGroup()}else this._drawBoxWhisker(p,R,H,o,s,u),o=R,s=H;u._setPointIndex(C,q),q++;var U=new e._DataPoint(y,C,k,N);U.item=W,z.tag=U,m.hitTester.add(z,y)}}}else{(T=h.origin||T)<h.actualMin?T=h.actualMin:T>h.actualMax&&(T=h.actualMax);h.convert(T);for(var J=c.actualMin,Z=c.actualMax,C=0;C<X;C++){N=O?O[C]:C;if(null==(k=w[C])||0===k.length)return;if(m._getSymbolOrigin&&h.convert(m._getSymbolOrigin(T,C,X)),m._getSymbolStyles&&(V=(I=m._getSymbolStyles(C,X))&&I.fill?I.fill:V,M=I&&I.fill?I.fill:M,L=I&&I.stroke?I.stroke:L,j=I&&I.stroke?I.stroke:j),E=k[0]>0?V:M,B=k[0]>0?L:j,p.fill=E,p.stroke=B,e._DataInfo.isValid(N)&&t.isArray(k)&&k.length>0&&e._DataInfo.isValid(k[0])){var $=N-.5*v+f*P,tt=N-.5*v+(f+1)*P;if($+=D=(tt-$)*x,tt-=D,$<J&&tt<J||$>Z&&tt>Z)continue;if($=c.convert($),tt=c.convert(tt),!e._DataInfo.isValid($)||!e._DataInfo.isValid(tt))continue;var W=new a(k,g,b),R={min:h.convert(W.min),max:h.convert(W.max),firstQuartile:h.convert(W.firstQuartile),median:h.convert(W.median),thirdQuartile:h.convert(W.thirdQuartile),mean:h.convert(W.mean),outlierPoints:this._convertPoints(W.outlierPoints,h),innerPoints:this._convertPoints(W.innerPoints,h)},G=new t.Rect(Math.min($,tt),Math.min(R.min,R.max),Math.abs(tt-$),Math.abs(R.max-R.min)),z=new e._RectArea(G),et={min:Math.min($,tt),median:($+tt)/2,max:Math.max($,tt)};l.itemFormatter?(p.startGroup(),(K=new e.HitTestInfo(l,new t.Point(et.median,(R.min+R.max)/2),e.ChartElement.SeriesSymbol))._setData(u,C),l.itemFormatter(p,K,function(){r._drawBoxWhisker(p,et,R,o,s,u),o=et,s=R}),p.endGroup()):(this._drawBoxWhisker(p,et,R,o,s,u),o=et,s=R),u._setPointIndex(C,q),q++,(U=new e._DataPoint(y,C,N,k)).item=W,z.tag=U,m.hitTester.add(z,y)}}}}},r.prototype._convertPoints=function(t,e){return t.map(function(t){return e.convert(t)})},r.prototype._drawBoxWhisker=function(t,e,i,n,r,a){var o=a.symbolStyle,s=this.showInnerPoints,u=this.showOutliers,l=this.showMeanLine,c=this.meanLineStyle,h=this.showMeanMarker,f=this.meanMarkerStyle,_=this._plotter;if(t.startGroup("box-plot"),_.rotated){if(t.drawLine(e.min,(i.min+i.median)/2,e.min,(i.max+i.median)/2,null,o),t.drawLine(e.min,i.median,e.firstQuartile,i.median,null,o),t.drawRect(Math.min(e.firstQuartile,e.thirdQuartile),Math.min(i.min,i.max),Math.abs(e.thirdQuartile-e.firstQuartile),Math.abs(i.max-i.min),null,o),t.drawLine(e.median,i.min,e.median,i.max,null,o),t.drawLine(e.max,i.median,e.thirdQuartile,i.median,null,o),t.drawLine(e.max,(i.min+i.median)/2,e.max,(i.max+i.median)/2,null,o),l&&n&&r&&t.drawLine(e.mean,i.median,n.mean,r.median,"box-whisker-mean-line",c||o),h){p=Math.abs(i.median-i.min)/2;t.drawLine(e.mean-p,i.median-p,e.mean+p,i.median+p,null,f||o),t.drawLine(e.mean+p,i.median-p,e.mean-p,i.median+p,null,f||o)}u&&e.outlierPoints.forEach(function(e){t.drawPieSegment(e,i.median,2,0,2*Math.PI,null,o)}),s&&e.innerPoints.forEach(function(e){t.drawPieSegment(e,i.median,2,0,2*Math.PI,null,o)})}else{if(t.drawLine((e.min+e.median)/2,i.min,(e.max+e.median)/2,i.min,null,o),t.drawLine(e.median,i.min,e.median,i.firstQuartile,null,o),t.drawRect(Math.min(e.min,e.max),Math.min(i.firstQuartile,i.thirdQuartile),Math.abs(e.max-e.min),Math.abs(i.thirdQuartile-i.firstQuartile),null,o),t.drawLine(e.min,i.median,e.max,i.median,null,o),t.drawLine(e.median,i.max,e.median,i.thirdQuartile,null,o),t.drawLine((e.min+e.median)/2,i.max,(e.max+e.median)/2,i.max,null,o),l&&n&&r&&t.drawLine(e.median,i.mean,n.median,r.mean,"box-whisker-mean-line",c||o),h){var p=Math.abs(e.median-e.min)/2;t.drawLine(e.median-p,i.mean-p,e.median+p,i.mean+p,null,f||o),t.drawLine(e.median-p,i.mean+p,e.median+p,i.mean-p,null,f||o)}u&&i.outlierPoints.forEach(function(i){t.drawPieSegment(e.median,i,2,0,2*Math.PI,null,o)}),s&&i.innerPoints.forEach(function(i){t.drawPieSegment(e.median,i,2,0,2*Math.PI,null,o)})}t.endGroup()},r.prototype._renderLabels=function(i,n,r,a){var o=this,s=this,u=this._plotter,l=n.length,c=r.dataLabel,h=c.border,f=c.offset,_=c.connectingLine,p="dataY";u.rotated&&(p="dataX"),void 0===f&&(f=_?16:0),h&&(f-=2);for(var m=0;m<l;m++){var y=n[m],d=y.tag,g=t.asType(d,e._DataPoint,!0);if(g){var b=d.item,v=d.y;if(d[p]=b.min,d.yfmt=b.min,d.y=b.min,this._plotter._renderLabel(i,y,g,r,c,s,f,a),d[p]=b.firstQuartile,d.yfmt=b.firstQuartile,d.y=b.firstQuartile,this._plotter._renderLabel(i,y,g,r,c,s,f,a),d[p]=b.median,d.yfmt=b.median,d.y=b.median,this._plotter._renderLabel(i,y,g,r,c,s,f,a),d[p]=b.thirdQuartile,d.yfmt=b.thirdQuartile,d.y=b.thirdQuartile,this._plotter._renderLabel(i,y,g,r,c,s,f,a),d[p]=b.max,d.yfmt=b.max,d.y=b.max,this._plotter._renderLabel(i,y,g,r,c,s,f,a),this.showMeanMarker){var x=Number(b.mean.toFixed(2));d[p]=x,d.yfmt=x,d.y=x,this._plotter._renderLabel(i,y,g,r,c,s,f,a)}b.showOutliers&&b.outlierPoints&&b.outlierPoints.forEach(function(t){d[p]=t,d.yfmt=t,d.y=t,o._plotter._renderLabel(i,y,g,r,c,s,f,a)}),d.y=v}}},r}(e.SeriesBase);i.BoxWhisker=r;var a=function(){function t(t,e,i){this._outlierPoints=[],this._innerPoints=[],this._data=t,this._quartileCalculation=e,this._showOutliers=i,this._parse()}return Object.defineProperty(t.prototype,"showOutliers",{get:function(){return this._showOutliers},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this._min},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._max},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mean",{get:function(){return this._mean},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstQuartile",{get:function(){return this._firstQuartile},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"thirdQuartile",{get:function(){return this._thirdQuartile},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"median",{get:function(){return this._median},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outlierPoints",{get:function(){return this._outlierPoints},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"innerPoints",{get:function(){return this._innerPoints},enumerable:!0,configurable:!0}),t.prototype._parse=function(){var t=this,e=this._data.length,i=this._data,r=0;this._outlierPoints=[],this._innerPoints=[],i.sort(function(t,e){return t-e}),i.some(function(e){return null!=e&&(t._min=e,!0)}),this._max=null==i[e-1]?0:i[e-1],this._quartileCalculation===n.InclusiveMedian?(this._firstQuartile=this._quartileInc(i,.25),this._median=this._quartileInc(i,.5),this._thirdQuartile=this._quartileInc(i,.75)):(this._firstQuartile=this._quartileExc(i,.25),this._median=this._quartileExc(i,.5),this._thirdQuartile=this._quartileExc(i,.75)),this._iqr=1.5*Math.abs(this._thirdQuartile-this._firstQuartile);var a=this._firstQuartile-this._iqr,o=this._thirdQuartile+this._iqr;if(this._showOutliers){var s=this._max;this._max=this._min,this._min=s,this._data.forEach(function(e){r+=e,e<a||e>o?t._outlierPoints.push(e):(e<t._min&&(t._min=e),e>t._max&&(t._max=e))})}else r=this._data.reduce(function(t,e){return t+e},0);this._innerPoints=this._data.filter(function(e){if(e>t._min&&e<t._max)return!0}),this._mean=r/e},t.prototype._quartileInc=function(t,e){var i,n,r,a,o=t.length;return 1===o?t[0]:(i=(o-1)*e+1,n=Math.floor(i),r=t[n-1],a=i-n,r+(t[n]-r)*a)},t.prototype._quartileExc=function(t,e){var i,n,r,a,o=t.length;return 1===o?t[0]:2===o?t[Math.round(e)]:(o+1)%4==0?t[(o+1)*e]:(i=(o+1)*e,n=Math.floor(i),r=t[n-1],a=i-n,r+(t[n]-r)*a)},t}();i._BoxPlot=a}(e.analytics||(e.analytics={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){!function(i){"use strict";var n;!function(t){t[t.FixedValue=0]="FixedValue",t[t.Percentage=1]="Percentage",t[t.StandardDeviation=2]="StandardDeviation",t[t.StandardError=3]="StandardError",t[t.Custom=4]="Custom"}(n=i.ErrorAmount||(i.ErrorAmount={}));var r;!function(t){t[t.Cap=0]="Cap",t[t.NoCap=1]="NoCap"}(r=i.ErrorBarEndStyle||(i.ErrorBarEndStyle={}));var a;!function(t){t[t.Both=0]="Both",t[t.Minus=1]="Minus",t[t.Plus=2]="Plus"}(a=i.ErrorBarDirection||(i.ErrorBarDirection={}));var o=function(e){function i(t){var i=e.call(this)||this;return i._errorAmount=n.FixedValue,i._endStyle=r.Cap,i._direction=a.Both,i.rendering.addHandler(i._rendering,i),i.initialize(t),i}return __extends(i,e),Object.defineProperty(i.prototype,"value",{get:function(){return this._value},set:function(t){t!=this._value&&(this._value=t,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"errorAmount",{get:function(){return this._errorAmount},set:function(e){(e=t.asEnum(e,n,!0))!=this._errorAmount&&(this._errorAmount=e,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"errorBarStyle",{get:function(){return this._errorBarStyle},set:function(t){t!=this._errorBarStyle&&(this._errorBarStyle=t,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"endStyle",{get:function(){return this._endStyle},set:function(e){(e=t.asEnum(e,r,!0))!=this._endStyle&&(this._endStyle=e,this._invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"direction",{get:function(){return this._direction},set:function(e){(e=t.asEnum(e,a,!0))!=this._direction&&(this._direction=e,this._invalidate())},enumerable:!0,configurable:!0}),i.prototype.getDataRect=function(e,i){if(!e)return null;this._chart;var r,a=this.errorAmount,o=0,s=0;this._paddings=[],this._calculateErrorValue();var u,l,c,h,f=this.getValues(0);if(!f)return e;for(c=0,r=f.length;c<r;c++){var _={plus:0,minus:0},p=this._value||0;switch(h=f[c],a){case n.Custom:_=this._getCustomValue(c),this._paddings.push(_);break;case n.FixedValue:this._paddings.push({plus:p,minus:p});break;case n.Percentage:this._paddings.push({plus:h*p,minus:h*p});break;case n.StandardDeviation:this._paddings.push({plus:this._errorValue*p,minus:this._errorValue*p});break;case n.StandardError:this._paddings.push({plus:this._errorValue,minus:this._errorValue})}(isNaN(u)||u>h-_.minus)&&(u=h-_.minus),(isNaN(l)||l<h+_.plus)&&(l=h+_.plus)}switch(a){case n.FixedValue:o=p,s=p;break;case n.Percentage:o=u*p,s=l*p;break;case n.StandardDeviation:o=this._errorValue*p,s=this._errorValue*p;break;case n.StandardError:o=this._errorValue,s=this._errorValue}return this._showPlus&&(l+=s),this._showMinus&&(u-=o),new t.Rect(e.left,u,e.width,l-u)},i.prototype._getCustomValue=function(e){var i,n=this.value,r={minus:0,plus:0};return null!=this._minusBindingValues||null!=this._plusBindingValues?(r.minus=this._minusBindingValues&&this._minusBindingValues[e]||0,r.plus=this._plusBindingValues&&this._plusBindingValues[e]||0,r):null==n?r:(t.isArray(n)?((i=n[e])&&i.minus&&(r.minus=i.minus),i&&i.plus&&(r.plus=i.plus)):t.isNumber(n)?(r.minus=n,r.plus=n):(n.minus&&(r.minus=n.minus),n.plus&&(r.plus=n.plus)),r)},i.prototype._calculateErrorValue=function(){var t=0,e=0,i=0;if(this._errorAmount===n.StandardDeviation||this._errorAmount===n.StandardError){var r=this.getValues(0);null!=r&&(r.forEach(function(i){t+=i,e++}),i=t/e,this._mean=i,t=0,r.forEach(function(e){t+=Math.pow(e-i,2)}),this._errorValue=Math.sqrt(t/(e-1))),this._errorAmount==n.StandardError&&(this._errorValue=this._errorValue/Math.sqrt(e))}},i.prototype._clearValues=function(){this.__errorValue=null,this._mean=null,this._plusBindingValues=null,this._minusBindingValues=null,e.prototype._clearValues.call(this)},i.prototype.getValues=function(t){if(0==t&&this.errorAmount===n.Custom){var i=this._getBinding(1),r=this._getBinding(2);if((null==this._plusBindingValues||null==this._minusBindingValues)&&i&&r)if(null!=this._cv){if(i){a=this._bindValues(this._cv.items,i);this._plusBindingValues=a.values}if(r){o=this._bindValues(this._cv.items,r);this._minusBindingValues=o.values}}else if(null!=this.binding&&null!=this._chart&&null!=this._chart.collectionView){if(i){var a=this._bindValues(this._chart.collectionView.items,i);this._plusBindingValues=a.values}if(r){var o=this._bindValues(this._chart.collectionView.items,r);this._minusBindingValues=o.values}}}return e.prototype.getValues.call(this,t)},Object.defineProperty(i.prototype,"_chart",{get:function(){return this.__chart},set:function(t){t!==this.__chart&&(this.__chart=t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_errorValue",{get:function(){return this.__errorValue},set:function(t){t!=this.__errorValue&&(this.__errorValue=t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_showPlus",{get:function(){return this.direction===a.Both||this.direction===a.Plus},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_showMinus",{get:function(){return this.direction===a.Both||this.direction===a.Minus},enumerable:!0,configurable:!0}),i.prototype._rendering=function(e,i){var a=this;i.cancel=!0;var o=this.chart,s=this._getAxisY(),u=this._getAxisX(),l=(s.origin,i.engine);this._plotter.plotSeries(l,u,s,this,o,i.index,i.count,function(e){var i,c,h,f=a._paddings,_=a._showPlus,p=a._showMinus,m=o._isRotated(),y=a.errorBarStyle&&a.errorBarStyle["stroke-width"]||2;h=(c=m?u:s).actualMax,i=c.convert(h);var d=l.stroke,g=l.strokeWidth;l.stroke="black",l.strokeWidth=1,e&&e.length&&e.forEach(function(e,o){if(null!=e.x&&null!=e.y){var s=f[o],u=s&&s.minus||0,d=s&&s.plus||0,g=Math.abs(c.convert(h-u)-i),b=Math.abs(c.convert(h+d)-i),v=new t.Point(e.x,e.y),x=new t.Point(e.x,e.y);m?(a.errorAmount===n.StandardDeviation&&(e=new t.Point(c.convert(a._mean),e.y),v.x=e.x,x.x=e.x),p&&(v.x=v.x-g),_&&(x.x=x.x+b)):(a.errorAmount===n.StandardDeviation&&(e=new t.Point(e.x,c.convert(a._mean)),v.y=e.y,x.y=e.y),p&&(v.y=v.y+g),_&&(x.y=x.y-b)),l.drawLine(v.x,v.y,x.x,x.y,"error-bar",a.errorBarStyle),a.endStyle===r.Cap&&(_&&(m?l.drawLine(x.x,x.y-y,x.x,x.y+y,"error-bar",a.errorBarStyle):l.drawLine(x.x-y,x.y,x.x+y,x.y,"error-bar",a.errorBarStyle)),p&&(m?l.drawLine(v.x,v.y-y,v.x,v.y+y,"error-bar",a.errorBarStyle):l.drawLine(v.x-y,v.y,v.x+y,v.y,"error-bar",a.errorBarStyle)))}}),l.stroke=d,l.strokeWidth=g})},i}(e.Series);i.ErrorBar=o}(e.analytics||(e.analytics={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),wijmo;!function(t){!function(e){!function(i){"use strict";var r=function(r){function o(t,e){var i=r.call(this,t,e)||this;return i._selectionIndex=0,i.applyTemplate("wj-sunburst",null,null),i.initialize(e),i.refresh(),i}return __extends(o,r),Object.defineProperty(o.prototype,"bindingName",{get:function(){return this._bindName},set:function(e){e!=this._bindName&&(t.assert(null==e||t.isArray(e)||t.isString(e),"bindingName should be an array or a string."),this._bindName=e,this._bindChart())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"childItemsPath",{get:function(){return this._childItemsPath},set:function(e){e!=this._childItemsPath&&(t.assert(null==e||t.isArray(e)||t.isString(e),"childItemsPath should be an array or a string."),this._childItemsPath=e,this._bindChart())},enumerable:!0,configurable:!0}),o.prototype._initData=function(){r.prototype._initData.call(this),this._processedData=[],this._level=1,this._legendLabels=[],this._processedItem=[]},o.prototype._performBind=function(){var t,e=this;this._initData(),this._cv&&(t=this._cv.items,this._cv.groups&&this._cv.groups.length?this._processedData=i.HierarchicalUtil.parseDataToHierarchical(this._cv,this.binding,this.bindingName,this.childItemsPath):t&&(this._processedData=i.HierarchicalUtil.parseDataToHierarchical(t,this.binding,this.bindingName,this.childItemsPath)),this._processedData&&this._processedData.length&&(this._sum=this._calculateValueAndLevel(this._processedData,1),this._processedData.forEach(function(t){e._legendLabels.push(t.name)})))},o.prototype._calculateValueAndLevel=function(t,e){var i=this,r=0,o=this._values,n=this._labels;return this._level<e&&(this._level=e),t.forEach(function(t){var a;t.items?(a=i._calculateValueAndLevel(t.items,e+1),t.value=a,o.push(a),n.push(t.name)):(a=i._getBindData(t,o,n,"value","name"),t.value=a),r+=a}),r},o.prototype._renderPie=function(t,e,i,r,o){var n=this._getCenter();this._sliceIndex=0,this._renderHierarchicalSlices(t,n.x,n.y,this._processedData,this._sum,e,i,r,2*Math.PI,o,1)},o.prototype._renderHierarchicalSlices=function(t,e,i,r,o,n,a,s,l,h,c){var u,_,p,d,m,f,g,v,C,b,w=r.length,y=s,I=1==this.reversed;p=(n-a)/this._level,u=n-(this._level-c)*p,_=a+(c-1)*p;for(var x=0;x<w;x++)v=e,C=i,g=t.startGroup("wj-slice slice-level"+c),1===c&&(t.fill=this._getColorLight(x),t.stroke=this._getColor(x)),m=r[x],f=Math.abs(m.value),d=Math.abs(f-o)<1e-10?l:l*f/o,b=I?y-.5*d:y+.5*d,h>0&&d<l&&(v+=h*Math.cos(b),C+=h*Math.sin(b)),m.items&&this._renderHierarchicalSlices(t,v,C,m.items,f,n,a,y,d,0,c+1),this._renderSlice(t,v,C,b,this._sliceIndex,u,_,y,d,l),this._processedItem.push(m.item),this._sliceIndex++,I?y-=d:y+=d,t.endGroup(),this._pels.push(g)},o.prototype._getLabelsForLegend=function(){return this._legendLabels||[]},o.prototype._highlightCurrent=function(){this.selectionMode!=e.SelectionMode.None&&this._highlight(!0,this._selectionIndex)},o.prototype.hitTest=function(t,i){var o=r.prototype.hitTest.call(this,t,i),n=this._toControl(t,i);if(e.FlexChart._contains(this._rectChart,n)){var a=o.pointIndex,s=this._processedItem[a],l=new e._DataPoint(null,a,null,null);l.item=s,o._setDataPoint(l)}return o},o}(e.FlexPie);i.Sunburst=r}(e.hierarchical||(e.hierarchical={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),wijmo;!function(t){!function(e){!function(i){"use strict";var r;!function(t){t[t.Squarified=0]="Squarified",t[t.Horizontal=1]="Horizontal",t[t.Vertical=2]="Vertical"}(r=i.TreeMapType||(i.TreeMapType={}));var o=function(o){function l(t,i){var r=o.call(this,t,null,!0)||this;return r._values=[],r._labels=[],r._areas=[],r._sum=0,r._keywords=new e._KeyWords,r._processedData=[],r._depth=1,r._itemIndex=0,r._processedItem=[],r._maxDepth=-1,r._tmItems=[],r._colRowLens=[],r._defPalette=[{titleColor:"#033884",maxColor:"#1450a7",minColor:"#83b3f9"},{titleColor:"#a83100",maxColor:"#dc4a0d",minColor:"#ffb190"},{titleColor:"#006658",maxColor:"#008d7a",minColor:"#7deddf"},{titleColor:"#a10046",maxColor:"#df0061",minColor:"#ff8cbe"},{titleColor:"#784d08",maxColor:"#99681a",minColor:"#efc989"},{titleColor:"#54156f",maxColor:"#722a90",minColor:"#cf95e7"},{titleColor:"#998605",maxColor:"#c2ac19",minColor:"#ffef8b"},{titleColor:"#9a0005",maxColor:"#c80c14",minColor:"#ff888d"}],r.applyTemplate("wj-control wj-flexchart wj-treemap",null,null),r._currentRenderEngine=new e._SvgRenderEngine(r.hostElement),r._legend=new e.Legend(r),r._legend.position=e.Position.None,r._tooltip=new e.ChartTooltip,r._tooltip.content="<b>{name}</b><br/>{value}",r._tooltip.showDelay=0,r._lbl=new e.DataLabel,r._lbl.position=e.LabelPosition.Center,r._lbl._chart=r,r.hostElement.addEventListener("mousemove",function(t){r.isTouching||r._toogleTooltip(t)}),r.hostElement.addEventListener("click",function(t){var i=!0;if(r.maxDepth>0){var o=r.hitTest(t),n=e.FlexChart._SELECTION_THRESHOLD;if(r.tooltip&&r.tooltip.threshold&&(n=r.tooltip.threshold),o.distance<=n&&o.pointIndex>=-1&&o.pointIndex<r._areas.length){var a=r._areas[o.pointIndex];r._currentItem!=a.item&&(r._currentItem=a.item,r._refreshChart(),i=!1)}}i&&r.isTouching&&r._toogleTooltip(t)}),r.hostElement.addEventListener("contextmenu",function(t){if(r.maxDepth>0){var i=r.hitTest(t),o=e.FlexChart._SELECTION_THRESHOLD;r.tooltip&&r.tooltip.threshold&&(o=r.tooltip.threshold),i.distance<=o&&r._rollUp()}return t.preventDefault(),!1}),r.hostElement.addEventListener("mouseleave",function(){r._hideToolTip()}),r.initialize(i),r.refresh(),r}return __extends(l,o),l.prototype._rollUp=function(){this._currentItem=this._currentItem&&this._currentItem.parent?this._currentItem.parent:null,this._refreshChart()},l.prototype._toogleTooltip=function(e){var i=this._tooltip;if(i.content){var r=this.hitTest(e);if(r.distance<=i.threshold){var o=this._getLabelContent(r,this.tooltip.content);this._showToolTip(o,new t.Rect(e.clientX,e.clientY,5,5))}else this._hideToolTip()}},Object.defineProperty(l.prototype,"_treeMapItems",{get:function(){return this._tmItems},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"tooltip",{get:function(){return this._tooltip},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"binding",{get:function(){return this._binding},set:function(e){e!=this._binding&&(this._binding=t.asString(e,!0),this._bindChart())},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"type",{get:function(){return null==this._type?r.Squarified:this._type},set:function(e){(e=t.asEnum(e,r))!=this._type&&(this._type=e,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"bindingName",{get:function(){return this._bindingName},set:function(e){e!=this._bindingName&&(t.assert(null==e||t.isArray(e)||t.isString(e),"bindingName should be an array or a string."),this._bindingName=e,this._bindChart())},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"dataLabel",{get:function(){return this._lbl},set:function(t){t!=this._lbl&&(this._lbl=t,this._lbl&&(this._lbl._chart=this))},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"childItemsPath",{get:function(){return this._childItemsPath},set:function(e){e!=this._childItemsPath&&(t.assert(null==e||t.isArray(e)||t.isString(e),"childItemsPath should be an array or a string."),this._childItemsPath=e,this._bindChart())},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"maxDepth",{get:function(){return this._maxDepth},set:function(e){e!=this._maxDepth&&(this._maxDepth=t.asNumber(e,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"palette",{get:function(){return this._palette},set:function(e){e!=this._palette&&(this._palette=t.asArray(e),this._tmItems&&this._tmItems.length>0&&this._calculateColorForItems(this._tmItems),this.invalidate())},enumerable:!0,configurable:!0}),l.prototype._initData=function(){this._sum=0,this._tmItems=[],this._currentItem=null,this._values=[],this._labels=[],this._processedData=[],this._depth=1,this._processedItem=[]},l.prototype._performBind=function(){var t;this._initData(),this._cv&&(t=this._cv.items,this._cv.groups&&this._cv.groups.length?this._processedData=i.HierarchicalUtil.parseDataToHierarchical(this._cv,this.binding,this.bindingName,this.childItemsPath):t&&(this._processedData=i.HierarchicalUtil.parseDataToHierarchical(t,this.binding,this.bindingName,this.childItemsPath)),this._processedData&&this._processedData.length&&(this._sum=this._calculateValueAndDepth(this._processedData,1),this._sortData(this._processedData),this._values=[],this._getTMItemsAndLabelsAndValues(this._processedData,this._tmItems,1,null),this._calculateColorForItems(this._tmItems)))},l.prototype._sortData=function(t){var e=this;t.forEach(function(t){t.items&&e._sortData(t.items)}),t.sort(function(t,e){return e.value-t.value})},l.prototype._getTMItemsAndLabelsAndValues=function(t,e,i,r,o){var a=this;t&&t.length>0&&t.forEach(function(t,o){var s,l=new n;l.items=[],l.parent=r,l.depth=i,t.items&&a._getTMItemsAndLabelsAndValues(t.items,l.items,i+1,l),s=t.name?t.name:t.value.toString(),l.label=s,l.value=t.value,null!=r&&(t.value>r.maxValue&&(r.maxValue=t.value),t.value<r.minValue&&(r.minValue=t.value)),e.push(l),a._labels.push(s),a._values.push(t.value)})},l.prototype._calculateColorForItems=function(e,i,r){var o=this,n=r;e.forEach(function(e,r){var s=i;1===e.depth&&(s=o._getColor(r)),e.palette=s;var l=e.palette;if(t.isString(l)){var h=l,c=o._getLightColor(h);e.titleFill=h,e.titleStroke=h,e.fill=c,e.stroke=h}else if(l.maxColor&&l.minColor&&l.titleColor)if(e.titleFill=l.titleColor,e.titleStroke=l.titleColor,null==e.parent)e.fill=l.maxColor,e.stroke=l.maxColor;else{null==n&&(n=new a(l.minColor,e.minValue,l.maxColor,e.maxValue));var u=n._calculateColorByVal(e.value,!0).toString();e.fill=u,e.stroke=u}if(e.items&&e.items.length>0){var _=new a(l.minColor,e.minValue,l.maxColor,e.maxValue);o._calculateColorForItems(e.items,s,_)}})},l.prototype._getBindData=function(e,i,r){var o,n=0;r&&(o=e[r]);n=0;return t.isNumber(o)?n=t.asNumber(o):o&&(n=parseFloat(o.toString())),!isNaN(n)&&isFinite(n)?i.push(n):(n=0,i.push(n)),n},l.prototype._calculateValueAndDepth=function(t,e){var i=this,r=0,o=this._values;return this._depth<e&&(this._depth=e),t.forEach(function(t){var n;t.items?(n=i._calculateValueAndDepth(t.items,e+1),t.value=n,o.push(n)):(n=i._getBindData(t,o,"value"),t.value=n),r+=n}),r},l.prototype._prepareRender=function(){this._areas=[]},l.prototype._renderChart=function(i,r,o){var n,a,s,h=this._rectChart.clone();new t.Size(h.width,h.height);this.onRendering(new e.RenderEventArgs(i));var c=r.width,u=r.height;this._tmGroup=i.startGroup(null,null,!0);var _=this._parseMargin(this.plotMargin);this.dataLabel;isNaN(_.left)&&(_.left=l._MARGIN),isNaN(_.right)&&(_.right=l._MARGIN),isNaN(_.top)&&(_.top=l._MARGIN),isNaN(_.bottom)&&(_.bottom=l._MARGIN),r.top+=_.top;u=r.height-(_.top+_.bottom);r.height=u>0?u:24,r.left+=_.left;c=r.width-(_.left+_.right);r.width=c>0?c:24,this._plotRect=r,n=this._currentItem?[this._currentItem]:this._tmItems,a=null==this._currentItem||this.maxDepth<1?this.maxDepth:this._currentItem&&this._currentItem.items&&this._currentItem.items.length&&this.maxDepth>1?this.maxDepth:this.maxDepth+1,s=this._currentItem?this._currentItem.value:this._sum,this._renderTreeMap(i,r,this._tmGroup,n,s,a),i.endGroup(),this.dataLabel.content&&this.dataLabel.position!=e.LabelPosition.None&&this._renderLabels(i),this.onRendered(new e.RenderEventArgs(i))},l.prototype._renderTreeMap=function(t,e,i,r,o,n){o>0&&(this._itemIndex=0,this._resetItemRects(this._tmItems),this._calculateItemRects(e,r,o,1,n),this._renderHierarchicalTreeMapItems(t,i,e,this._tmItems,o,1,n))},l.prototype._resetItemRects=function(e){var i=this;e.forEach(function(e){e.rect=new t.Rect(0,0,0,0),e.isTitle=!1,e.type=i.type,e.items&&e.items.length&&i._resetItemRects(e.items)})},l.prototype._calculateItemRects=function(t,e,i,o,n){var a=this;switch(this.type){case r.Horizontal:s.horizontal(e,t,i);break;case r.Vertical:s.vertical(e,t,i);break;case r.Squarified:s.squarified(e,t,i)}e.forEach(function(t,e){t.rect.clone();t.items&&t.items.length&&(o===n||o>n&&n>=1||(t.isTitle=!0,a._calculateItemRects(t.itemsRect,t.items,t.value,o+1,n)))})},l.prototype._renderHierarchicalTreeMapItems=function(t,i,r,o,n,a,s){var h,c,u,_,p,d=o.length;this.type;if(0!==d)for(var m=0;m<d;m++)h=t.startGroup(l._CSS_ITEMDEPTH+a),c=o[m],u=Math.abs(c.value),_=c.rect,c.draw(t),p=new e._RectArea(_),c.items&&this._renderHierarchicalTreeMapItems(t,h,c.itemsRect,c.items,u,a+1,s),p.tag=this._itemIndex,p.name=c.label,p.value=u,p.item=c,this._areas.push(p),this._itemIndex++,t.endGroup()},l.prototype._renderLabels=function(i){var r,o=this._areas.length,n=this.dataLabel,a=n.position,s=n.connectingLine,l=n.border,h=n.offset||0;i.stroke="null",i.fill="transparent",i.strokeWidth=1,i.startGroup("wj-data-labels");for(var c=0;c<o;c++){var u=this._areas[c];if(u){var _=u.rect,p=new e.HitTestInfo(this,r);p._setData(null,c);var d=this._getLabelContent(p,n.content);if(r=new t.Point(_.left+_.width/2,_.top+_.height/2),d&&_.width>0&&_.height>0){var m=new e.DataLabelRenderEventArgs(i,p,r,d);n.onRendering(m)&&(d=m.text,r=m.point,this._renderLabelAndBorder(i,u,_,d,a,h,r,s,2,l))}}}i.endGroup()},l.prototype._renderLabelAndBorder=function(t,i,r,o,n,a,s,l,h,c){var u,_="wj-data-label",p="wj-data-label-line";switch(n){case e.LabelPosition.Top:l&&t.drawLine(s.x,s.y,s.x,s.y-a,p),s.y-=h+a,u=this._renderText(t,i,r,o,s,1,2,_);break;case e.LabelPosition.Bottom:l&&t.drawLine(s.x,s.y,s.x,s.y+a,p),s.y+=h+a,u=this._renderText(t,i,r,o,s,1,0,_);break;case e.LabelPosition.Left:l&&t.drawLine(s.x,s.y,s.x-a,s.y,p),s.x-=h+a,u=this._renderText(t,i,r,o,s,2,1,_);break;case e.LabelPosition.Right:l&&t.drawLine(s.x,s.y,s.x+a,s.y,p),s.x+=h+a,u=this._renderText(t,i,r,o,s,0,1,_);break;case e.LabelPosition.Center:u=this._renderText(t,i,r,o,s,1,1,_)}return c&&u&&t.drawRect(u.left-h,u.top-h,u.width+2*h,u.height+2*h,"wj-data-label-border"),u},l.prototype._renderText=function(t,i,o,n,a,s,l,h){var c,u=n,_=i.item;return c=t.measureString(n,h),this.type===r.Horizontal&&_.isTitle?(c.width>o.height&&(u=this._cutText(n,c.width,o.height)),e.FlexChart._renderRotatedText(t,u,a,s,l,a,-90,h),null):(c.width>o.width&&(u=this._cutText(n,c.width,o.width)),e.FlexChart._renderText(t,u,a,s,l,h))},l.prototype._cutText=function(t,e,i){var r="",o=t.length,n=Math.floor((1-(e-i)/e)*o);return t.length>0&&(r=t[0]+(n>1?t.substring(1,n-1)+"..":"")),r},l.prototype._measureLegendItem=function(i,r){var o=new t.Size;if(o.width=e.Series._LEGEND_ITEM_WIDTH,o.height=e.Series._LEGEND_ITEM_HEIGHT,r){var n=i.measureString(r,e.FlexChart._CSS_LABEL,e.FlexChart._CSS_LEGEND);o.width+=n.width,o.height<n.height&&(o.height=n.height)}return o.width+=3*e.Series._LEGEND_ITEM_MARGIN,o.height+=2*e.Series._LEGEND_ITEM_MARGIN,o},l.prototype._getDesiredLegendSize=function(e,i,r,o){var n=new t.Size,a=new t.Size(r,o),s=this._tmItems.length,l=0,h=0;this._colRowLens=[];for(var c=0;c<s;c++){var u=this._measureLegendItem(e,this._tmItems[c].label);i?(h+u.height>o&&(n.height=o,this._colRowLens.push(l),l=0,h=0),l<u.width&&(l=u.width),h+=u.height):(l+u.width>r&&(n.width=r,this._colRowLens.push(h),h=0,l=0),h<u.height&&(h=u.height),l+=u.width)}return i?(n.height<h&&(n.height=h),this._colRowLens.push(l),n.width=this._colRowLens.reduce(function(t,e){return t+e},0),n.width>a.width/2&&(n.width=a.width/2)):(n.width<l&&(n.width=l),this._colRowLens.push(h),n.height=this._colRowLens.reduce(function(t,e){return t+e},0),n.height>a.height/2&&(n.height=a.height/2)),n},l.prototype._renderLegend=function(e,i,r,o,n,a){for(var s,l=this._rectLegend,h=this._tmItems.length,c=0,u=i.clone(),_=0;_<h;_++){s=this._tmItems[_].label;var p=this._measureLegendItem(e,s);o?u.y+p.height>l.top+l.height+1&&(u.x+=this._colRowLens[c],c++,u.y=i.y):u.x+p.width>l.left+l.width+1&&(u.y+=this._colRowLens[c],c++,u.x=i.x);var d=new t.Rect(u.x,u.y,p.width,p.height);this._drawLegendItem(e,d,_,s),r.push(d),o?u.y+=p.height:u.x+=p.width}},l.prototype._drawLegendItem=function(i,r,o,n){i.strokeWidth=1;var a=e.Series._LEGEND_ITEM_MARGIN,s=this._getColor(o),l=s&&s.maxColor?s.maxColor:s,h=this._getLightColor(l);i.fill=l,i.stroke=h;var c=r.top+.5*r.height,u=e.Series._LEGEND_ITEM_WIDTH,_=e.Series._LEGEND_ITEM_HEIGHT;i.drawRect(r.left+a,c-.5*_,u,_,null),n&&e.FlexChart._renderText(i,n,new t.Point(r.left+_+2*a,c),0,1,e.FlexChart._CSS_LABEL)},l.prototype._getLabelContent=function(e,i){return t.isString(i)?this._keywords.replace(i,e):t.isFunction(i)?i(e):null},l.prototype.hitTest=function(t,i){var r=this._toControl(t,i),o=new e.HitTestInfo(this,r),n=null;if(e.FlexChart._contains(this._rectHeader,r))o._chartElement=e.ChartElement.Header;else if(e.FlexChart._contains(this._rectFooter,r))o._chartElement=e.ChartElement.Footer;else if(e.FlexChart._contains(this._rectLegend,r))o._chartElement=e.ChartElement.Legend,null!==(n=this.legend._hitTest(r))&&n>=0&&n<this._areas.length&&o._setData(null,n);else if(e.FlexChart._contains(this._rectChart,r)){for(var a,s=this._areas.length,l=NaN,h=0;h<s;h++){var c=r.clone(),u=this._areas[h];u.contains(c)&&(o._setData(null,u.tag),o._dist=0);var _=u.distance(c);void 0!==_&&(isNaN(l)||_<l)&&(l=_,a=u)}0!==o._dist&&null!=a&&(o._setData(null,a.tag),o._dist=l),o._chartElement=e.ChartElement.ChartArea}else o._chartElement=e.ChartElement.None;return o},l.prototype._getHitTestItem=function(t){var e=null,i=null;return(e=null!=this._cv?this._cv.items:this.itemsSource)&&t<e.length&&(i=e[t]),i},l.prototype._getHitTestValue=function(t){return this._values[t]},l.prototype._getHitTestLabel=function(t){return this._labels[t]},l._CSS_ITEMDEPTH="wj-treemap-item-depth",l._MARGIN=0,l}(e.FlexChartBase);i.TreeMap=o;var n=function(){function e(){this.items=[],this.maxValue=Number.MIN_VALUE,this.minValue=Number.MAX_VALUE}return e.prototype.draw=function(t){var i=this.rect;t.strokeWidth=0,this.isTitle?(t.fill=this.titleFill,t.stroke=this.titleStroke):(t.fill=this.fill,t.stroke=this.stroke),t.drawRect(i.left,i.top,i.width,i.height,e._CLASSNAME)},Object.defineProperty(e.prototype,"itemsRect",{get:function(){var e=this.rect,i=this._rect,o=1===this.depth?2:.5;return this.isTitle?this.type===r.Horizontal?new t.Rect(e.left+e.width+1,e.top,i.width-e.width-2*o,e.height+1):new t.Rect(e.left,e.top+e.height+1,e.width+1,i.height-e.height-2*o):new t.Rect(0,0,0,0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rect",{get:function(){var e=this._rect,i=1===this.depth?2:.5,o=e.width,n=e.height,a=e.left,s=e.top;return this.isTitle?(this.type===r.Horizontal?(o=e.width>20?20:o,o=Math.max(20,o-2*i),n=n>2*i?n-2*i:0):(n=e.height>20?20:n,n=Math.max(20,n-2*i),o=o>2*i?o-2*i:0),a+=i,s+=i):(o=o>2*i?o-2*i:0,n=n>2*i?n-2*i:0),new t.Rect(a,s,o,n)},set:function(t){t!=this._rect&&(this._rect=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isTitle",{get:function(){return this._isTitle},set:function(e){var i=t.asBoolean(e,!0);i!==this._isTitle&&(this._isTitle=i)},enumerable:!0,configurable:!0}),e._CLASSNAME="wj-treemap-item",e}(),a=function(){function e(e,i,r,o,n,a){this.minColor=new t.Color(e),this.minColorValue=i,this.maxColor=new t.Color(r),this.maxColorValue=o,this.midColorValue=this.originalMidColorValue=a,this._calculateMidColorValue(),this.midColor=this.originalMidColor=new t.Color(n),this._calculateMidColor()}return e.prototype._resetminColor=function(e){this.minColor=new t.Color(e),this._calculateMidColor()},e.prototype._resetmidColor=function(e){this.midColor=this.originalMidColor=new t.Color(e),this._calculateMidColor()},e.prototype._resetmaxColor=function(e){this.maxColor=new t.Color(e),this._calculateMidColor()},e.prototype._resetminColorValue=function(t){this.minColorValue=t,this._calculateMidColorValue()},e.prototype._resetmidColorValue=function(t){this.midColorValue=this.originalMidColorValue=t,this._calculateMidColorValue()},e.prototype._resetmaxColorValue=function(t){this.maxColorValue=t,this._calculateMidColorValue()},e.prototype._calculateMidColorValue=function(){null==this.originalMidColorValue&&(this.midColorValue=(this.maxColorValue+this.minColorValue)/2)},e.prototype._calculateMidColor=function(){null==this.originalMidColor&&(this.midColor=this._calculateColorByVal(this.midColorValue,!0))},e.prototype._calculateColorByVal=function(e,i){void 0===i&&(i=!1);var r=this.maxColor,o=this.minColor,n=this.maxColorValue,a=this.minColorValue;if(e>=this.maxColorValue)return new t.Color(r.toString());if(e<=this.minColorValue)return new t.Color(o.toString());if(!i){if(e===this.midColorValue)return new t.Color(this.midColor.toString());e<this.midColorValue?(r=this.midColor,n=this.midColorValue):(o=this.midColor,a=this.midColorValue)}return this._getColor(e,r,n,o,a)},e.prototype._getColor=function(e,i,r,o,n){return t.Color.fromRgba(this._getValueByRatio(e,i.r,r,o.r,n),this._getValueByRatio(e,i.g,r,o.g,n),this._getValueByRatio(e,i.b,r,o.b,n),this._getValueByRatio(e,i.a,r,o.a,n))},e.prototype._getValueByRatio=function(t,e,i,r,o){return Math.abs(r+Math.round((t-o)*(e-r)/(i-o)))},e}(),s=function(){function e(){}return e.squarified=function(t,i,r){var o=t.slice(),n=i.clone(),a=n.width*n.height/r;do{var s=e.getRowedItems(o,n,a);e.layoutRowedItems(i,s,n,n.width>n.height)}while(o.length)},e.horizontal=function(t,i,r){var o=i.clone();t.forEach(function(t){var n=[{item:t,val:t.value*i.width*i.height/r}];e.layoutRowedItems(i,n,o,!1)})},e.vertical=function(t,i,r){var o=i.clone();t.forEach(function(t){var n=[{item:t,val:t.value*i.width*i.height/r}];e.layoutRowedItems(i,n,o,!0)})},e.getNarrowLen=function(t){return Math.min(t.width,t.height)},e.getRowedItem=function(t,e,i){return{item:t,val:i*t.value}},e.getRowedItems=function(t,i,r){var o=t.shift(),n=[],a=[],s=e.getNarrowLen(i),l=e.getRowedItem(o,i,r);if(n.push(l),a.push(l),t.length>0)do{if(a.push(e.getRowedItem(t[0],i,r)),!(e.worst(n,s)>e.worst(a,s)))break;n=a.slice(),t.shift()}while(t.length);return n},e.layoutRowedItems=function(i,r,o,n){var a,s=o.left,l=o.top,h=s+o.width,c=l+o.height,u=e.sumRowedArray(r);n?(a=0===o.height?0:u/o.height,s+a>=h&&(a=h-s),r.forEach(function(e,i){var o=0===a?0:e.val/a;(l+o>c||i===r.length-1)&&(o=c-l);var n=new t.Rect(s,l,a,o);e.item.rect=n,l+=o}),o.left+=a,o.width-=a):(a=0===o.width?0:u/o.width,l+a>=c&&(a=c-l),r.forEach(function(e,i){var o=0===a?0:e.val/a;(s+o>h||i===r.length-1)&&(o=h-s);var n=new t.Rect(s,l,o,a);e.item.rect=n,s+=o}),o.top+=a,o.height-=a)},e.sumRowedArray=function(t){for(var e=0,i=t.length,r=0;r<i;r++)e+=t[r].val;return e},e.worst=function(t,i){var r,o,n=e.sumRowedArray(t),a=n*n,s=i*i;return r=o=t[0].val,t.forEach(function(t,e){t.val>r?r=t.val:t.val<o&&(o=t.val)}),Math.max(s*r/a,a/(s*o))},e}()}(e.hierarchical||(e.hierarchical={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){!function(e){"use strict";var i=function(){function e(){}return e.parseDataToHierarchical=function(i,r,o,n){var a,s=[];return i instanceof t.collections.CollectionView&&i.groups.length>0?s=e.parseGroupCV(i,r):i.length>0&&(t.isString(o)&&o.indexOf(",")>-1&&(o=o.split(",")),n?s=e.parseItems(i,r,o,n):(a=e.convertFlatData(i,r,o),s=e.parseItems(a,"value",o,"items"))),s},e.parseGroupCV=function(t,e){for(var i=[],r=0,o=t.groups.length;r<o;r++){var n=this.parseGroups(t.groups[r],e);i.push(n)}return i},e.parseGroups=function(e,i){var r={};if(r.name=e.name,r.nameField=e.groupDescription.propertyName,r.item=e.items,e.groups&&e.groups.length){r.items=[];for(var o=0,n=e.groups.length;o<n;o++){var a=this.parseGroups(e.groups[o],i);r.items.push(a)}}else e.isBottomLevel&&(r.value=e.getAggregate(t.Aggregate.Sum,i));return r},e.parseItems=function(t,i,r,o){var n,a=[],s=t.length;for(n=0;n<s;n++)a.push(e.parseItem(t[n],i,r,o));return a},e.isFlatItem=function(e,i){return!t.isArray(e[i])},e.convertFlatData=function(i,r,o){var n,a,s=[],l={},h=i.length;for(n=0;n<h;n++)a=i[n],e.convertFlatItem(l,a,r,t.isArray(o)?o:[o]);return e.convertFlatToHierarchical(s,l),s},e.convertFlatToHierarchical=function(t,i){var r=i.flatDataOrder;r&&r.forEach(function(r){var o,n={},a=i[r];n[i.field]=r,a.flatDataOrder?(o=[],e.convertFlatToHierarchical(o,a),n.items=o):n.value=a,t.push(n)})},e.convertFlatItem=function(i,r,o,n){var a,s,l,h;return a=n.slice(),s=a.shift(),s=t.isString(s)?s.trim():s,null!=(l=null==s?o:r[s])&&(0===a.length?(i[l]=r[o]||0,i.flatDataOrder?i.flatDataOrder.push(l):i.flatDataOrder=[l],i.field=s):(null==i[l]&&(i[l]={},i.flatDataOrder?i.flatDataOrder.push(l):i.flatDataOrder=[l],i.field=s),h=i[l],e.convertFlatItem(h,r,o,a)||(i[l]=r[o])),!0)},e.parseItem=function(i,r,o,n){var a,s,l,h,c,u={};return t.isArray(n)?h=(c=n.slice()).length?c.shift().trim():"":(c=n,h=n),t.isArray(o)?(s=null==(s=(a=o.slice()).shift())?s:s.trim(),u.nameField=null==s?r:s,u.name=null==s?i[r]:i[s],l=i[h],0===a.length?u.value=i[r]:l&&t.isArray(l)&&l.length>0?u.items=e.parseItems(l,r,a,c):u.value=i[r]||0):(u.nameField=null==o?r:o,u.name=null==o?i[r]:i[o],null!=(l=i[h])&&t.isArray(l)&&l.length>0?u.items=e.parseItems(l,r,o,c):u.value=i[r]),u.item=i,u},e.parseFlatItem=function(t,e,i,r){t.items||(t.items=[])},e}();e.HierarchicalUtil=i}(e.hierarchical||(e.hierarchical={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function a(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}(),wijmo;!function(t){!function(e){!function(r){"use strict";var a;!function(t){t[t.Column=0]="Column",t[t.Scatter=1]="Scatter",t[t.Line=2]="Line",t[t.LineSymbols=3]="LineSymbols",t[t.Area=4]="Area"}(a=r.RadarChartType||(r.RadarChartType={}));var i=function(i){function n(t,e){var r=i.call(this,t,e)||this;return r._chartType=a.Line,r._startAngle=0,r._totalAngle=360,r._reversed=!1,r._areas=[],r}return __extends(n,i),Object.defineProperty(n.prototype,"_radarLinePlotter",{get:function(){return null==this.__radarLinePlotter&&(this.__radarLinePlotter=new r._RadarLinePlotter,this._initPlotter(this.__radarLinePlotter)),this.__radarLinePlotter},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"_radarColumnPlotter",{get:function(){return null==this.__radarColumnPlotter&&(this.__radarColumnPlotter=new r._RadarBarPlotter,this._initPlotter(this.__radarColumnPlotter)),this.__radarColumnPlotter},enumerable:!0,configurable:!0}),n.prototype._initAxes=function(){i.prototype._initAxes.call(this),this.axes.pop(),this.axes.pop(),this.axisX=new r.FlexRadarAxis(e.Position.Bottom),this.axisX.majorGrid=!0,this.axisY=new r.FlexRadarAxis(e.Position.Left),this.axisY.majorTickMarks=e.TickMark.Outside,this.axes.push(this.axisX),this.axes.push(this.axisY)},n.prototype._layout=function(e,r,a){i.prototype._layout.call(this,e,r,a);var n=this.axisX._height;this._plotRect.top+=n/2;var s=this._plotRect;this._radius=Math.min(s.width,s.height)/2,this._center=new t.Point(s.left+s.width/2,s.top+s.height/2)},Object.defineProperty(n.prototype,"chartType",{get:function(){return this._chartType},set:function(e){(e=t.asEnum(e,a))!=this._chartType&&(this._chartType=e,this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"startAngle",{get:function(){return this._startAngle},set:function(e){e!=this._startAngle&&(this._startAngle=t.asNumber(e,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"totalAngle",{get:function(){return this._totalAngle},set:function(e){e!=this._totalAngle&&e>=0&&(this._totalAngle=t.asNumber(e,!0),this._totalAngle<=0&&(t.assert(!1,"totalAngle must be greater than 0."),this._totalAngle=0),this._totalAngle>360&&(t.assert(!1,"totalAngle must be less than or equal to 360."),this._totalAngle=360),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"reversed",{get:function(){return this._reversed},set:function(e){e!=this._reversed&&(this._reversed=t.asBoolean(e,!0),this.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"stacking",{get:function(){return this._stacking},set:function(r){(r=t.asEnum(r,e.Stacking))!=this._stacking&&(this._stacking=r,this.invalidate())},enumerable:!0,configurable:!0}),n.prototype._getChartType=function(){var t=e.ChartType.Line;switch(this.chartType){case a.Area:t=e.ChartType.Area;break;case a.Line:t=e.ChartType.Line;break;case a.Column:t=e.ChartType.Column;break;case a.LineSymbols:t=e.ChartType.LineSymbols;break;case a.Scatter:t=e.ChartType.Scatter}return t},n.prototype._getPlotter=function(t){var e=this.chartType,r=null;if(t){var n=t.chartType;null!=n&&n!=e&&(e=n,!0)}switch(e){case a.Line:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case a.LineSymbols:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case a.Area:this._radarLinePlotter.hasSymbols=!1,this._radarLinePlotter.hasLines=!0,this._radarLinePlotter.isArea=!0,r=this._radarLinePlotter;break;case a.Scatter:this._radarLinePlotter.hasSymbols=!0,this._radarLinePlotter.hasLines=!1,this._radarLinePlotter.isArea=!1,r=this._radarLinePlotter;break;case a.Column:this._radarColumnPlotter.isVolume=!1,this._radarColumnPlotter.width=.8,r=this._radarColumnPlotter;break;default:r=i.prototype._getPlotter.call(this,t)}return r},n.prototype._convertPoint=function(e,r){var a=new t.Point,i=this._center;return a.x=i.x+e*Math.sin(r),a.y=i.y-e*Math.cos(r),a},n.prototype._createSeries=function(){return new r.FlexRadarSeries},n.prototype._clearCachedValues=function(){i.prototype._clearCachedValues.call(this),this._isPolar=!1,this._areas=[]},n.prototype._performBind=function(){i.prototype._performBind.call(this),this._xDataType===t.DataType.Number&&(this._isPolar=!0)},n.prototype._prepareRender=function(){i.prototype._prepareRender.call(this),this._areas=[]},n}(e.FlexChartCore);r.FlexRadar=i}(e.radar||(e.radar={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function a(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}(),wijmo;!function(t){!function(e){!function(r){"use strict";var a=function(a){function i(){return null!==a&&a.apply(this,arguments)||this}return __extends(i,a),Object.defineProperty(i.prototype,"chartType",{get:function(){return this._finChartType},set:function(e){(e=t.asEnum(e,r.RadarChartType,!0))!=this._finChartType&&(this._finChartType=e,this._invalidate())},enumerable:!0,configurable:!0}),i.prototype._getChartType=function(){var t;switch(this.chartType){case r.RadarChartType.Area:t=e.ChartType.Area;break;case r.RadarChartType.Line:t=e.ChartType.Line;break;case r.RadarChartType.Column:t=e.ChartType.Column;break;case r.RadarChartType.LineSymbols:t=e.ChartType.LineSymbols;break;case r.RadarChartType.Scatter:t=e.ChartType.Scatter}return t},i}(e.SeriesBase);r.FlexRadarSeries=a}(e.radar||(e.radar={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function a(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}(),wijmo;!function(t){!function(e){!function(r){"use strict";var a=function(r){function a(){var t=null!==r&&r.apply(this,arguments)||this;return t._points=[],t._axisLabels=[],t}return __extends(a,r),a.prototype._render=function(t){var a=this;if(this._hasVisibileSeries()){r.prototype._render.call(this,t);var i=this._axisLabels;if(i.length){var n=function(){var r=a.axisType==e.AxisType.X?"wj-axis-x-labels "+e.FlexChart._CSS_AXIS_X:"wj-axis-y-labels "+e.FlexChart._CSS_AXIS_Y;t.startGroup(r),i.forEach(function(r){var i=r.labelAngle;i>0?e.FlexChart._renderRotatedText(t,r.text,r.pos,r.align,r.vAlign,r.pos,i,r.class):i<0?e.FlexChart._renderRotatedText(t,r.text,r.pos,r.align,r.vAlign,r.pos,i,r.class):a._renderLabel(t,r.val,r.text,r.pos,r.align,r.vAlign,r.class)}),t.endGroup(),a._axisLabels=[],a._chart.rendered.removeHandler(n)};this._chart.rendered.addHandler(n,this)}}},a.prototype._getHeight=function(t,a){var i=r.prototype._getHeight.call(this,t,a);return this._axisType==e.AxisType.Y&&(i=4),this._height=2*i,2*i},a.prototype._updateActualLimits=function(t,e,a,i,n){var s=this;void 0===i&&(i=null),void 0===n&&(n=null),r.prototype._updateActualLimits.call(this,t,e,a,i,n);var o,l=this._chart,h=this._lbls,c=this.actualMin.valueOf?this.actualMin.valueOf():this.actualMin,_=this.actualMax.valueOf?this.actualMax.valueOf():this.actualMax;this._lbls&&this===l.axisX&&(l._angles=[],this._isTimeAxis&&0===this._lbls.length&&this._values.forEach(function(t){h.push(s._formatValue(t))}),o=h.length,l.totalAngle<360&&(o-=1),h.forEach(function(t,e){var r=c+e/o*(_-c),a=l.startAngle+e/o*l.totalAngle;isNaN(a)||isNaN(r)||l._angles.push({value:s.convert(r),angle:a})}))},a.prototype._updateActualLimitsByChartType=function(t,r,a){var i=this._chart;if(i._getChartType()!=e.ChartType.Column&&360===i.totalAngle&&this.axisType===e.AxisType.X)if(this._isTimeAxis){var n=(i._xlabels.length||i._xvals.length)-1;a+=(a-r)/(n=n<1?1:n)}else i._isPolar||(a+=1);return{min:r,max:a}},a.prototype.convert=function(t,r,a){var i=null==r?this.actualMax:r,n=null==a?this.actualMin:a,s=this._chart;if(!s)return NaN;if(i==n)return 0;if(this.axisType===e.AxisType.X)return s.reversed?(s.startAngle-(t-n)/(i-n)*s.totalAngle)*Math.PI/180:(s.startAngle+(t-n)/(i-n)*s.totalAngle)*Math.PI/180;if(this.logBase){if(t<=0)return NaN;var o=Math.log(i/n);return Math.log(t/n)/o*s._radius}return(t-n)/(i-n)*s._radius},a.prototype._renderLineAndTitle=function(t){var r=this._chart,a=e.FlexChart._CSS_LINE,i=(r.startAngle-90)*Math.PI/180,n=r.totalAngle*Math.PI/180,s=r._radius;this.axisType===e.AxisType.X&&this.axisLine&&(t.stroke=e.FlexChart._FG,r._isPolar?(i=r.reversed?i-n:i,t.drawPieSegment(r._center.x,r._center.y,s,i,n,a)):this._renderPolygon(t,s,a))},a.prototype._renderPolygon=function(t,e,r){var a=this._chart,i=a._angles,n=i.length,s=a.axisX.minorGrid,o=[],l=[];if(i.forEach(function(t,r){if(s&&r>0){var n=a._convertPoint(e,t.value-(t.value-i[r-1].value)/2);o.push(n.x),l.push(n.y)}var h=a._convertPoint(e,t.value);o.push(h.x),l.push(h.y)}),a.totalAngle<360)o.push(a._center.x),l.push(a._center.y);else if(s&&n>=2){var h=a._convertPoint(e,i[n-1].value-(i[n-2].value-i[n-1].value)/2);o.push(h.x),l.push(h.y)}t.drawPolygon(o,l,r)},a.prototype._renderMinors=function(t,r,a,i){var n,s=this,o=this._chart,l=e.FlexChart._CSS_GRIDLINE_MINOR,h=this.minorGrid,c=o._angles,_=c.length,u=o.axisX.minorGrid,p=e.FlexChart._FG,d=this._GRIDLINE_WIDTH,y=(o.startAngle,Math.PI,o.totalAngle,Math.PI,this._TICK_OVERLAP),f=this.minorTickMarks,g=!0;this._vals.minor=r,f==e.TickMark.Outside?y=1:f==e.TickMark.Inside?y=-1:f==e.TickMark.Cross?y=0:g=!1,this.axisType==e.AxisType.Y?(t.stroke=p,t.strokeWidth=d,r.forEach(function(e){var r=s.convert(e);if(h&&s._renderYGridLine(t,o,r,l),g&&(c.forEach(function(e,a){if(u&&a>0){n=e.value-(e.value-c[a-1].value)/2;var i=o._convertPoint(r,n);s._drawMinorTickLength(t,y,n,i)}n=e.value;var l=o._convertPoint(r,n);s._drawMinorTickLength(t,y,n,l)}),u&&_>=2)){n=c[_-1].value-(c[_-2].value-c[_-1].value)/2;var a=o._convertPoint(r,n);s._drawMinorTickLength(t,y,n,a)}})):(t.stroke=p,t.strokeWidth=d,r.forEach(function(e){var r=s.convert(e);h&&s._renderXGridLine(t,o,r,l)}))},a.prototype._drawMinorTickLength=function(t,r,a,i){var n=this._TICK_HEIGHT,s=e.FlexChart._CSS_TICK_MINOR,o=.5*(r-1)*n*Math.cos(a),l=.5*(1+r)*n*Math.cos(a),h=.5*(r-1)*n*Math.sin(a),c=.5*(1+r)*n*Math.sin(a);t.drawLine(i.x+o,i.y+h,i.x+l,i.y+c,s)},a.prototype._renderLabelsAndTicks=function(r,a,i,n,s,o,l,h,c){this._points=[],s=this.labelAngle||0;var _,u=this._chart,p=this.labelPadding||2,d=e.FlexChart._CSS_LABEL,y=e.FlexChart._CSS_GRIDLINE,f=e.FlexChart._CSS_TICK,g=e.FlexChart._FG,v=this._TICK_WIDTH,x=this.majorGrid,P=e.FlexChart._FG,A=this._GRIDLINE_WIDTH,m=u.startAngle*Math.PI/180,b=(u.totalAngle,Math.PI,1);if(this.axisType==e.AxisType.Y){x=i!=this.actualMin&&x&&i!=this.actualMax;var T=this.convert(i),L=u._convertPoint(T,m);if(x&&(r.stroke=P,r.strokeWidth=A,this._renderYGridLine(r,u,T,y)),r.stroke=g,r.strokeWidth=v,l){(_=(u.startAngle%360+360)%360)<=90&&_>=75||_>=270&&_<=285?b=2:(_>90&&_<=105||_<270&&_>=255)&&(b=0);M=new t.Point(L.x-p-Math.abs(h-c),L.y);this._axisLabels.push({val:i,text:n,pos:M,align:2,vAlign:b,labelAngle:s,class:d})}o!=e.TickMark.None&&r.drawLine(L.x-c*Math.cos(m),L.y-c*Math.sin(m),L.x-h*Math.cos(m),L.y-h*Math.sin(m),f)}else{var C=this.convert(i);if(x&&(r.stroke=P,r.strokeWidth=A,this._renderXGridLine(r,u,C,y)),r.stroke=g,r.strokeWidth=v,l){var S,k,w,M=u._convertPoint(u._radius+p,C);S=u._angles&&u._angles.length?u._angles[a].angle:u.startAngle+(i-this.actualMin)*u.totalAngle/(this.actualMax-this.actualMin),S=(S%=360)>=0?S:S+360,k=this._getXLabelVAlign(S),w=this._getXLabelAlign(S),u._isPolar&&(n=this._formatValue(S)),s>0?e.FlexChart._renderRotatedText(r,n,M,w,k,M,s,d):s<0?e.FlexChart._renderRotatedText(r,n,M,w,k,M,s,d):this._renderLabel(r,i,n,M,w,k,d)}}return!0},a.prototype._renderXGridLine=function(t,e,r,a){var i=e._center,n=e._convertPoint(e._radius,r);t.drawLine(i.x,i.y,n.x,n.y,a)},a.prototype._renderYGridLine=function(t,e,r,a){e._angles;var i=e._center,n=e.startAngle*Math.PI/180,s=e.totalAngle*Math.PI/180;e._isPolar?(n=(e.startAngle-90)*Math.PI/180,n=e.reversed?n-s:n,t.drawPieSegment(i.x,i.y,r,n,s,a)):this._renderPolygon(t,r,a)},a.prototype._getXLabelVAlign=function(t){var e=1,r=this._chart,a=r.startAngle;return r.reversed&&(t=(360+a+(a%360-t%360))%360),0===t?e=2:180===t&&(e=0),e},a.prototype._getXLabelAlign=function(t){var e=0,r=this._chart,a=r.startAngle;return r.reversed&&(t=(360+a+(a%360-t%360))%360),t>0&&t<180?e=-1:t>180&&t<360&&(e=1),e+1},a.prototype._createTimeLabels=function(t,a,i,n){var s=this;if(this._axisType==e.AxisType.Y)r.prototype._createTimeLabels.call(this,t,a,i,n);else{var o=this._values;this.format;if(!o||0===o.length)return;o.forEach(function(t){i.push(t),n.push(s._formatValue(t))})}},a}(e.Axis);r.FlexRadarAxis=a}(e.radar||(e.radar={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function a(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}(),wijmo;!function(t){!function(e){!function(r){"use strict";var a=function(r){function a(){var t=null!==r&&r.apply(this,arguments)||this;return t.isArea=!1,t}return __extends(a,r),a.prototype._getLabelPoint=function(t,e){var r=t._getAxisX(),a=t._getAxisY(),i=r.convert(e.dataX),n=a.convert(e.dataY);return this.chart._convertPoint(n,i)},a.prototype.plotSeries=function(r,a,i,n,s,o,l){var h=t.asType(n,e.SeriesBase),c=this.chart,_=h._getChartType()||c._getChartType(),u=c.series.indexOf(n),p=n.getValues(0),d=n.getValues(1);if(p){d||(d=this.dataInfo.getXVals());var y=e._BasePlotter.cloneStyle(n.style,["fill"]),f=p.length,g=!0;d?f=Math.min(f,d.length):(g=!1,d=new Array(f));var v=this._DEFAULT_WIDTH,x=h._getSymbolFill(u),P=h._getAltSymbolFill(u)||x,A=h._getSymbolStroke(u),m=h._getAltSymbolStroke(u)||A,b=h._getSymbolSize();r.stroke=A,r.strokeWidth=v,r.fill=x;var T=new Array,L=new Array,C=this.stacking!=e.Stacking.None&&!h._isCustomAxisY(),S=this.stacking==e.Stacking.Stacked100pc&&!h._isCustomAxisY();void 0!==h._getChartType()&&(C=S=!1);for(var k=this.chart.interpolateNulls,w=!1,M=0;M<f;M++){var I=g?d[M]:M,O=p[M];if(e._DataInfo.isValid(I)&&e._DataInfo.isValid(O)){if(C)if(S&&(O/=this.dataInfo.getStackedAbsSum(I)),O>=0){j=isNaN(this.stackPos[I])?0:this.stackPos[I];O=this.stackPos[I]=j+O}else{var j=isNaN(this.stackNeg[I])?0:this.stackNeg[I];O=this.stackNeg[I]=j+O}var N;N=new e._DataPoint(u,M,I,O);var R=a.convert(I),F=i.convert(O),X=this.chart._convertPoint(F,R);if(I=X.x,O=X.y,isNaN(I)||isNaN(O))w=!0,!0!==k&&(T.push(void 0),L.push(void 0));else{T.push(I),L.push(O);var D=new e._CircleArea(new t.Point(I,O),.5*b);D.tag=N,this.hitTester.add(D,u)}}else w=!0,!0!==k&&(T.push(void 0),L.push(void 0))}var V=0;if(this.hasLines)if(this.isArea?r.fill=x||s._getColorLight(u):r.fill="none",w&&!0!==k){for(var G=[],Y=[],M=0;M<f;M++)void 0===T[M]?(G.push(void 0),Y.push(0)):(G.push(T[M]),Y.push(L[M]));G.length>1&&(c._isPolar&&_!==e.ChartType.Area?this._drawLines(r,G,Y,null,y,this.chart._plotrectId):(c.totalAngle<360&&(G.push(c._center.x),Y.push(c._center.y)),r.drawPolygon(G,Y,null,y,this.chart._plotrectId)),this.hitTester.add(new e._LinesArea(G,Y),u),V++)}else c._isPolar&&_!==e.ChartType.Area?this._drawLines(r,T,L,null,y,this.chart._plotrectId):(c.totalAngle<360&&(T.push(c._center.x),L.push(c._center.y)),r.drawPolygon(T,L,null,y,this.chart._plotrectId)),this.hitTester.add(new e._LinesArea(T,L),u),V++;r.fill=x;for(M=0;M<f;M++){var I=T[M],O=L[M];!1===this.hasLines&&(r.fill=p[M]>0?x:P,r.stroke=p[M]>0?A:m),this.isValid(I,O,a,i)&&((this.hasSymbols||this.chart.itemFormatter)&&b>0&&this._drawSymbol(r,I,O,b,h,M),n._setPointIndex(M,V),V++)}}},a}(e._LinePlotter);r._RadarLinePlotter=a}(e.radar||(e.radar={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function a(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}(),wijmo;!function(t){!function(e){!function(r){"use strict";var a=function(r){function a(){return null!==r&&r.apply(this,arguments)||this}return __extends(a,r),a.prototype.adjustLimits=function(e,r){this.dataInfo=e;var a=e.getMinX(),i=e.getMinY(),n=e.getMaxX(),s=e.getMaxY(),o=e.getDeltaX();return o<=0&&(o=1),this.chart.totalAngle<360&&(o=0),this.unload(),this.chart.axisY.logBase||(this.origin>s?s=this.origin:this.origin<i&&(i=this.origin)),new t.Rect(a,i,n-a+o,s-i)},a.prototype._getLabelPoint=function(t,e){var r=t._getAxisX(),a=t._getAxisY(),i=r.convert(e.dataX),n=a.convert(e.dataY);return this.chart._convertPoint(n,i)},a.prototype.plotSeries=function(r,a,i,n,s,o,l){var h=this.chart.series.indexOf(n),c=t.asType(n,e.SeriesBase),_=(this.chart.options,this.width),u=this.chart,p=-90*Math.PI/180;o=o||0;var d,y=c._getAxisY()._uniqueId,f=(this.stackNegMap[y],this.stackPosMap[y]),g=this.stacking!=e.Stacking.None,v=this.stacking==e.Stacking.Stacked100pc,x=n.getValues(0),P=n.getValues(1);if(x){P||(P=this.dataInfo.getXVals());var A;(A=P?u.totalAngle/P.length:u.totalAngle/(a.actualMax-a.actualMin))>0&&(_=g?A*_*Math.PI/180:A*Math.pow(_,o+1)*Math.PI/180);var m=c._getSymbolFill(h),b=c._getAltSymbolFill(h)||m,T=c._getSymbolStroke(h),L=c._getAltSymbolStroke(h)||T,C=x.length;null!=P&&(C=Math.min(C,P.length));var S,k,w=this.origin,M=0;void 0!==c._getChartType()&&(g=v=!1),w<i.actualMin?w=i.actualMin:w>i.actualMax&&(w=i.actualMax);i.convert(w);var I=a.actualMin,O=a.actualMax;c._isCustomAxisY()&&(g=v=!1),u._areas[h]||(u._areas[h]=[]);for(var j=0;j<C;j++){var N=P?P[j]:j,R=x[j];if(this._getSymbolOrigin&&i.convert(this._getSymbolOrigin(w,j,C)),this._getSymbolStyles){var F=this._getSymbolStyles(j,C);m=F&&F.fill?F.fill:m,b=F&&F.fill?F.fill:b,T=F&&F.stroke?F.stroke:T,L=F&&F.stroke?F.stroke:L}if(S=R>0?m:b,k=R>0?T:L,r.fill=S,r.stroke=k,e._DataInfo.isValid(N)&&e._DataInfo.isValid(R)){if(g){var X=N-.5*_,D=N+.5*_;if(X<I&&D<I||X>O&&D>O)continue;if(X=a.convert(X),D=a.convert(D),!e._DataInfo.isValid(X)||!e._DataInfo.isValid(D))continue;var V,G;v&&(R/=this.dataInfo.getStackedAbsSum(N));var Y=isNaN(f[N])?0:f[N];V=Y,G=Y+R,f[N]=Y+R;var E=a.convert(N),B=i.convert(V),W=i.convert(G);E-=_/2,r.drawDonutSegment(u._center.x,u._center.y,W,B,E+p,_,null,c.symbolStyle),(d=new e._DonutSegment(new t.Point(u._center.x,u._center.y),W,B,E+p,_,u.startAngle||0)).tag=new e._DataPoint(h,j,N,Y+R),this.hitTester.add(d,h)}else{var E=a.convert(N),H=i.convert(R);u._convertPoint(H,E);E-=_/2,r.drawPieSegment(u._center.x,u._center.y,H,E+p,_,null,c.symbolStyle),(d=new e._PieSegment(new t.Point(u._center.x,u._center.y),H,E+p,_,u.startAngle)).tag=new e._DataPoint(h,j,N,R),this.hitTester.add(d,h)}u._areas[h].push(d),n._setPointIndex(j,M),M++}}}},a}(e._BarPlotter);r._RadarBarPlotter=a}(e.radar||(e.radar={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var wijmo;!function(t){!function(e){!function(n){"use strict";var i=function(){function n(t,n){void 0===n&&(n=!1),this._strokeWidth=1,this._fontSize=null,this._fontFamily=null,this._applyCanvasClip=function(t,e){var n=this._canvasRect[e];n&&(t.beginPath(),t.rect(n.left,n.top,n.width,n.height),t.clip(),t.closePath())},this._applyCanvasStyles=function(t,e,n,i,a){var r,l,o,s=this,p=s._canvas.getContext("2d"),h=s.stroke,c=s.fill,f=s.strokeWidth;e&&void 0!==e.stroke&&(h=e.stroke),e&&void 0!==e.fill&&(c=s._getOpacityColor(e.fill,e["fill-opacity"])),t&&(l=window.getComputedStyle(t),o=t.getBBox()),a?l?(p.fillStyle=l.fill,r=l.fontStyle+" "+l.fontSize+" "+l.fontFamily,p.font=r,p.font.replace(/\"/g,"'")!==r.replace(/\"/g,"'")&&(r=l.fontStyle+" "+l.fontSize+" "+(p.font.split(" ")[1]||"sans-serif"),p.font=r)):s.fontSize?(p.fillStyle=s.textFill,p.font=s.fontSize+" "+(s.fontFamily||"sans-serif")):s._canvasDefaultFont&&(p.fillStyle=s._canvasDefaultFont.textFill,r=s._canvasDefaultFont.fontSize+" "+s._canvasDefaultFont.fontFamily,p.font=r,p.font.replace(/\"/g,"'")!==r.replace(/\"/g,"'")&&(r=s._canvasDefaultFont.fontSize+" "+(p.font.split(" ")[1]||"sans-serif"),p.font=r)):(l&&(h=l.stroke&&"none"!==l.stroke?l.stroke:h,c=l.fill&&"none"!==l.fill?s._getOpacityColor(l.fill,l["fill-opacity"]):c,f=l.strokeWidth?l.strokeWidth:f),"none"!==h&&null!=h&&(this._applyColor("strokeStyle",h,o),p.lineWidth=+f.replace(/px/g,""),p.stroke()),i&&null!=c&&"transparent"!==c&&"none"!==c&&(this._applyColor("fillStyle",c,o),p.fill()))};var i=this;i._element=t,i._canvas=document.createElement("canvas"),i._svgEngine=new e._SvgRenderEngine(t),i._element.appendChild(i._canvas),i._applyCSSStyles=n}return n.prototype.beginRender=function(){var t,e=this,n=e._svgEngine.element,i=e._element;e._applyCSSStyles&&(e._svgEngine.beginRender(),i=n),e._element.appendChild(n),e._canvasRect={},t=window.getComputedStyle(i),e._canvasDefaultFont={fontSize:t.fontSize,fontFamily:t.fontFamily,textFill:t.color}},n.prototype.endRender=function(){this._applyCSSStyles&&this._svgEngine.endRender(),this._svgEngine.element.parentNode.removeChild(this._svgEngine.element)},n.prototype.setViewportSize=function(t,e){var n,i,a=this,r=a._canvas,l=(r.getContext("2d"),a.fill);a._applyCSSStyles&&a._svgEngine.setViewportSize(t,e),r.width=t,r.height=e,n=window.getComputedStyle(a._element).backgroundColor,i=a.stroke,n&&(a.stroke=null,a.fill=n,a.drawRect(0,0,t,e),a.fill=l,a.stroke=i)},Object.defineProperty(n.prototype,"element",{get:function(){return this._canvas},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fill",{get:function(){return this._fill},set:function(t){this._svgEngine.fill=t,this._fill=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._svgEngine.fontSize=t;var e=null==t||isNaN(t)?t:t+"px";this._fontSize=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(t){this._svgEngine.fontFamily=t,this._fontFamily=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"stroke",{get:function(){return this._stroke},set:function(t){this._svgEngine.stroke=t,this._stroke=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"strokeWidth",{get:function(){return this._strokeWidth},set:function(t){this._svgEngine.strokeWidth=t,this._strokeWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"textFill",{get:function(){return this._textFill},set:function(t){this._svgEngine.textFill=t,this._textFill=t},enumerable:!0,configurable:!0}),n.prototype.addClipRect=function(t,e){t&&e&&(this._applyCSSStyles&&this._svgEngine.addClipRect(t,e),this._canvasRect[e]=t.clone())},n.prototype.drawEllipse=function(t,e,n,i,a,r){var l,o=this._canvas.getContext("2d");return this._applyCSSStyles&&(l=this._svgEngine.drawEllipse(t,e,n,i,a,r)),o.save(),o.beginPath(),o.ellipse?o.ellipse(t,e,n,i,0,0,2*Math.PI):(o.translate(t,e),o.scale(1,i/n),o.translate(-t,-e),o.arc(t,e,n,0,2*Math.PI),o.scale(1,1)),this._applyCanvasStyles(l,r,a,!0),o.restore(),l},n.prototype.drawRect=function(t,e,n,i,a,r,l){var o,s=this._canvas.getContext("2d");return this._applyCSSStyles&&(o=this._svgEngine.drawRect(t,e,n,i,a,r,l)),s.save(),this._applyCanvasClip(s,l),s.beginPath(),s.rect(t,e,n,i),this._applyCanvasStyles(o,r,a,!0),s.restore(),o},n.prototype.drawLine=function(t,e,n,i,a,r){var l,o=this._canvas.getContext("2d");return this._applyCSSStyles&&(l=this._svgEngine.drawLine(t,e,n,i,a,r)),o.save(),o.beginPath(),o.moveTo(t,e),o.lineTo(n,i),this._applyCanvasStyles(l,r,a),o.restore(),l},n.prototype.drawLines=function(t,e,n,i,a){if(t&&e&&0!==t.length&&0!==e.length){var r,l,o=this._canvas.getContext("2d"),s=Math.min(t.length,e.length);for(this._applyCSSStyles&&(r=this._svgEngine.drawLines([0,1],[1,0],n,i,a)),o.save(),this._applyCanvasClip(o,a),o.beginPath(),o.moveTo(t[0],e[0]),l=1;l<s;l++)o.lineTo(t[l],e[l]);return this._applyCanvasStyles(r,i,n),o.restore(),r}},n.prototype.drawSplines=function(t,n,i,a,r){if(t&&n&&0!==t.length&&0!==n.length){var l,o,s=this._canvas.getContext("2d"),p=new e._Spline(t,n).calculate(),h=p.xs,c=p.ys,f=Math.min(h.length,c.length);for(this._applyCSSStyles&&(l=this._svgEngine.drawSplines([0,1],[1,0],i,a,r)),s.save(),this._applyCanvasClip(s,r),s.beginPath(),s.moveTo(h[0],c[0]),o=1;o<f;o++)s.lineTo(h[o],c[o]);return this._applyCanvasStyles(l,a,i),s.restore(),l}},n.prototype.drawPolygon=function(t,e,n,i,a){if(t&&e&&0!==t.length&&0!==e.length){var r,l,o=this._canvas.getContext("2d"),s=Math.min(t.length,e.length);for(this._applyCSSStyles&&(r=this._svgEngine.drawPolygon(t,e,n,i,a)),o.save(),this._applyCanvasClip(o,a),o.beginPath(),o.moveTo(t[0],e[0]),l=1;l<s;l++)o.lineTo(t[l],e[l]);return o.closePath(),this._applyCanvasStyles(r,i,n,!0),o.restore(),r}},n.prototype.drawPieSegment=function(t,e,n,i,a,r,l,o){var s,p=this._canvas.getContext("2d"),h=i,c=i+a;return this._applyCSSStyles&&(s=this._svgEngine.drawPieSegment(t,e,n,i,a,r,l,o)),p.save(),this._applyCanvasClip(p,o),p.beginPath(),p.moveTo(t,e),p.arc(t,e,n,h,c,!1),p.lineTo(t,e),this._applyCanvasStyles(s,l,r,!0),p.restore(),s},n.prototype.drawDonutSegment=function(e,n,i,a,r,l,o,s,p){var h,c,f,y=this._canvas.getContext("2d"),g=r,u=r+l;return this._applyCSSStyles&&(h=this._svgEngine.drawDonutSegment(e,n,i,a,r,l,o,s,p)),c=new t.Point(e,n),c.x+=a*Math.cos(g),c.y+=a*Math.sin(g),f=new t.Point(e,n),f.x+=a*Math.cos(u),f.y+=a*Math.sin(u),y.save(),this._applyCanvasClip(y,p),y.beginPath(),y.moveTo(c.x,c.y),y.arc(e,n,i,g,u,!1),y.lineTo(f.x,f.y),y.arc(e,n,a,u,g,!0),this._applyCanvasStyles(h,s,o,!0),y.restore(),h},n.prototype.drawString=function(t,e,n,i){var a,r=this._canvas.getContext("2d");return this._applyCSSStyles&&(a=this._svgEngine.drawString(t,e,n,i)),r.save(),r.textBaseline="bottom",this._applyCanvasStyles(a,i,n,!0,!0),r.fillText(t,e.x,e.y),r.restore(),a},n.prototype.drawStringRotated=function(t,e,n,i,a,r){var l,o=this._canvas.getContext("2d");o.measureText(t);return this._applyCSSStyles&&(l=this._svgEngine.drawStringRotated(t,e,n,i,a,r)),o.save(),o.textBaseline="bottom",o.translate(n.x,n.y),o.rotate(Math.PI/180*i),o.translate(-n.x,-n.y),this._applyCanvasStyles(l,r,a,!0,!0),o.fillText(t,e.x,e.y),o.restore(),l},n.prototype.measureString=function(e,n,i,a){var r,l=l=this._canvas.getContext("2d");return this._applyCSSStyles?this._svgEngine.measureString(e,n,i,a):(this._applyCanvasStyles(null,null,n,!0,!0),r=l.measureText(e).width,new t.Size(r,1.5*parseInt(l.font)))},n.prototype.startGroup=function(t,e,n){void 0===n&&(n=!1);var i,a=this._canvas.getContext("2d");return this._applyCSSStyles&&(i=this._svgEngine.startGroup(t,e,n)),a.save(),this._applyCanvasClip(a,e),i},n.prototype.endGroup=function(){this._applyCSSStyles&&this._svgEngine.endGroup(),this._canvas.getContext("2d").restore()},n.prototype.drawImage=function(t,e,n,i,a){var r,l=this._canvas.getContext("2d"),o=new Image;return this._applyCSSStyles&&(r=this._svgEngine.drawImage(t,e,n,i,a)),o.onload=function(){l.drawImage(o,e,n,i,a)},o.src=t,r},n.prototype._getOpacityColor=function(e,n){var i=new t.Color(e);return e.indexOf("url")>-1?this.fill:e.indexOf("-")>-1?(this.fill=e,e):(null!=n&&1===i.a&&(i.a=isNaN(n)?1:Number(n)),i.toString())},n.prototype._applyColor=function(e,n,i){var r=a.tryParse(n),l=this._canvas.getContext("2d");if(null!=r)if(t.isString(r)||null==i)l[e]=r;else{var o;if(null!=r.x1)o=r.relative?l.createLinearGradient(i.x+r.x1*i.width,i.y+r.y1*i.height,i.x+r.x2*i.width,i.y+r.y2*i.height):l.createLinearGradient(r.x1,r.y1,r.x2,r.y2);else if(null!=r.r)if(r.relative){var s=i.x+r.cx*i.width,p=i.y+r.cy*i.height,h=r.r*i.width,c=r.r*i.height/h,f=i.x+(null==r.fx?r.cx:r.fx)*i.width,y=i.y+(null==r.fy?r.cy:r.fy)*i.height,g=(null==r.fr?0:r.fr)*i.width,u=(null==r.fr?0:r.fr)*i.height,v=Math.min(g,u);o=l.createRadialGradient(f,y/c,v,s,p/c,h),l.setTransform(1,0,0,c,0,0)}else o=l.createRadialGradient(null==r.fx?r.cx:r.fx,null==r.fy?r.cy:r.fy,r.fr||0,r.cx,r.cy,r.r);r.colors&&r.colors.length>0&&null!=o&&r.colors.forEach(function(e){var n=new t.Color("#000000");null!=e.color&&(n=e.color),null!=e.opacity&&(n.a=e.opacity),o.addColorStop(e.offset,n.toString())}),l[e]=o}},n}();n._CanvasRenderEngine=i;var a=function(){function e(){}return e.tryParse=function(n){if(e.parsedColor[n])return e.parsedColor[n];if(null==n||-1===n.indexOf("-"))return n;var i,a=n.replace(/\s+/g,"").split(/\-/g),r=a[0][0],l=!1,o=a[0].match(/\(\S+\)/)[0].replace(/[\(\\)]/g,"").split(/\,/g);"l"===r||"L"===r?(i={x1:"0",y1:"0",x2:"0",y2:"0",colors:[]},"l"===r&&(l=!0),["x1","y1","x2","y2"].forEach(function(t,e){null!=o[e]&&(i[t]=+o[e])})):"r"!==r&&"R"!==r||(i={cx:"0",cy:"0",r:"0",colors:[]},"r"===r&&(l=!0),["cx","cy","r","fx","fy","fr"].forEach(function(t,e){null!=o[e]&&""!==o[e]&&(i[t]=+o[e])})),i.relative=l,e.parsedColor[n]=i;var s=a.length-1;return a.forEach(function(e,n){e.indexOf(")")>-1&&(e=e.match(/\)\S+/)[0].replace(")",""));var a=e.split(":"),r={color:new t.Color("#000000")};null!=a[0]&&(r.color=t.Color.fromString(a[0])),null!=a[1]?r.offset=+a[1]:r.offset=n/s,null!=a[2]&&(r.opacity=+a[2]),i.colors.push(r)}),i},e.parsedColor={},e}();if(t.chart.FlexChartBase&&t.chart.FlexChartBase.prototype&&t.chart.FlexChartBase.prototype._exportToImage){var r=t.chart.FlexChartBase.prototype._exportToImage;t.chart.FlexChartBase.prototype._exportToImage=function(e,n){if("svg"!==e){var i,a,l=new t.chart.render._CanvasRenderEngine(this.hostElement,!0),o=this.rendered;this.rendered=new t.Event,this._render(l,!1),(a=l.element).parentNode.removeChild(a),i=a.toDataURL("image/"+e),n.call(null,i),a=null,l=null,this.rendered=o}else r.call(this,e,n)}}}(e.render||(e.render={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var i=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.chart.FlexChart),t;n.FlexChart=i;t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.chart.FlexPie);n.FlexPie=t})(t=n.chart||(n.chart={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(i){var u=function(n){function i(){return n!==null&&n.apply(this,arguments)||this}return __extends(i,n),i.prototype._beforeInitializeControl=function(n){var f=this,i,r,u;n.itemsSource instanceof wijmo.collections.CollectionView&&(i=n.itemsSource,t.DataSourceManager._isRemoteSource(i)&&i.isEmpty&&(r=this.control,f._beforeBeginUpdate(n),r.beginUpdate(),u=function(){f._beforeEndUpdate(n);r.endUpdate();setTimeout(function(){i.collectionChanged.removeHandler(u)},0)},i.collectionChanged.addHandler(u)))},i.prototype._beforeBeginUpdate=function(){},i.prototype._beforeEndUpdate=function(){},i}(t._Initializer),r,o,s,h,f,e,c,l,a;i._FlexChartBaseInitializer=u;r=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(t._ControlWrapper);i._FlexChartBaseWrapper=r;o=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype._beforeBeginUpdate=function(n){this._selectedIndex=-1;n&&n.selectedIndex&&(this._selectedIndex=n.selectedIndex,delete n.selectedIndex)},t.prototype._beforeEndUpdate=function(){if(this._selectedIndex!=-1){var n=this.control.selectionChanged;this.control.selectionChanged=new wijmo.Event;this.control.selectedIndex=this._selectedIndex;this.control.selectionChanged=n}},t}(u);i._FlexPieInitializer=o;s=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),Object.defineProperty(i.prototype,"_initializerType",{get:function(){return n.mvc.chart._FlexPieInitializer},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_controlType",{get:function(){return n.mvc.chart.FlexPie},enumerable:!0,configurable:!0}),i}(r);i._FlexPieWrapper=s;h=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.chart.FlexPie);i.FlexPie=h;f=function(t){function i(){var n=t!==null&&t.apply(this,arguments)||this;return n._extraSeriesList=[],n}return __extends(i,t),i.prototype._beforeInitializeControl=function(n){var i=this;t.prototype._beforeInitializeControl.call(this,n);i._prepareInitialOptions(n);i._seriesLength=n.series?n.series.length:0;i._prepareExtraSeriesList(n)},i.prototype._afterInitializeControl=function(n){var t=this,o,f,u=t.control,r=u.series,i,e;if(t._setPlotArea(n.axisX,u.axisX),t._setPlotArea(n.axisY,u.axisY),t._extraSeriesList&&t._extraSeriesList.length>0){for(u.beginUpdate(),i=0;i<t._seriesLength;i++)e=t._extraSeriesList[i],e&&r.splice(i,0,e);u.endUpdate()}for(i=0;i<t._seriesLength;i++)f=t._seriesRenderingList[i],f&&typeof f=="function"&&r[i].rendering.addHandler(f),t._setPlotArea(r[i].axisX,r[i].axisX),t._setPlotArea(r[i].axisY,r[i].axisY);t._selectedIndex!=null&&n.selectionMode===wijmo.chart.SelectionMode.Series&&r&&r[t._selectedIndex]&&(o=r[t._selectedIndex],u.selection=o)},i.prototype._setPlotArea=function(n,t){var i=this.control;n&&n._plotAreaIndex!=null&&(t.plotArea=i.plotAreas[n._plotAreaIndex])},i.prototype._prepareInitialOptions=function(t){var i=this;t&&(i._prepareExtraOptions(t),i._prepareAxes(t.axisX),t.axisX&&(n._addEvent(i.control.axisX.rangeChanged,t.axisX.rangeChanged),delete t.axisX.rangeChanged),t.axisY&&(i._prepareAxes(t.axisY),n._addEvent(i.control.axisY.rangeChanged,t.axisY.rangeChanged),delete t.axisY.rangeChanged),i._prepareSelection(t),i._prepareTitleContent(t),i._prepareSeriesAxes(t.series),i._preparePloteAreas(t._plotAreas))},i.prototype._preparePloteAreas=function(n){var i,u,t,r;if(n)for(i=wijmo.asArray(n),u=this.control,t=0;t<i.length;t++)r=new wijmo.chart.PlotArea,wijmo.copy(r,i[t]),u.plotAreas.push(r)},i.prototype._prepareExtraOptions=function(){throw"Should implement this method in the derived class.";},i.prototype._prepareAxes=function(n){n&&n.itemsSource&&(n.itemsSource=n.itemsSource.items||n.itemsSource)},i.prototype._prepareSelection=function(n){var t=0,i=n?n.series:undefined;if(this._selectedIndex=n?n.selectionIndex:undefined,delete n.selectionIndex,this._seriesRenderingList=[],i&&i.length)for(;t<i.length;t++)this._seriesRenderingList[t]=i[t].rendering,delete i[t].rendering},i.prototype._prepareTitleContent=function(n){if(n&&n.tooltip&&n.tooltip.content){var t=n.tooltip.content;typeof window[t]=="function"&&(n.tooltip.content=window[t])}},i.prototype._prepareSeriesAxes=function(n){var u=this,t,i,r;if(n&&n.length)for(t=0;t<n.length;t++)i=u._createAxisObj(n[t].axisX,wijmo.chart.Position.Bottom),i&&(n[t].axisX=i),r=u._createAxisObj(n[t].axisY,wijmo.chart.Position.Left),r&&(n[t].axisY=r)},i.prototype._createAxisObj=function(t,i){var o=this,r,f=["min","max","axisLine","format","itemFormatter","labelAngle","labels","majorGrid","minorGrid","origin","reversed","majorUnit","minorUnit","name","title","majorTickMarks","minorTickMarks","overlappingLabels","binding","itemsSource","_plotAreaIndex"],u,e;if(!t)return undefined;switch(t.position){case"None":case 0:r=new wijmo.chart.Axis(0);break;case"Left":case 1:r=new wijmo.chart.Axis(1);break;case"Top":case 2:r=new wijmo.chart.Axis(2);break;case"Right":case 3:r=new wijmo.chart.Axis(3);break;case"Bottom":case 4:r=new wijmo.chart.Axis(4);break;default:r=new wijmo.chart.Axis(i)}for(o._prepareAxes(t),u=0;u<f.length;u++)e=t[f[u]],e!=null&&(r[f[u]]=e);return n._addEvent(r.rangeChanged,t.rangeChanged),delete t.rangeChanged,r},i.prototype._prepareExtraSeriesList=function(n){var u=this,t,i=n.series?n.series.concat():null,r;if(i&&i.length){for(r=[],t=0;t<i.length;t++)i[t].extraSeriesTypeName?(i[t].bindingX||(i[t].bindingX=n.bindingX),u._extraSeriesList[t]=u._createExtraSeriesObj(i[t])):r.push(i[t]);n.series=r}},i.prototype._createExtraSeriesObj=function(n){var i,t,f=n.extraSeriesTypeName,u=["func","xFunc","yFunc"],r;for(delete n.extraSeriesTypeName,i=0;i<u.length;i++)r=n[u[i]],r&&typeof window[r]=="function"&&(n[u[i]]=window[r]);switch(f){case"TrendLine":t=new wijmo.chart.analytics.TrendLine;break;case"MovingAverage":t=new wijmo.chart.analytics.MovingAverage;break;case"YFunctionSeries":t=new wijmo.chart.analytics.YFunctionSeries;break;case"ParametricFunctionSeries":t=new wijmo.chart.analytics.ParametricFunctionSeries;break;case"Fibonacci":t=new wijmo.chart.finance.analytics.Fibonacci;break;case"FibonacciArcs":t=new wijmo.chart.finance.analytics.FibonacciArcs;break;case"FibonacciFans":t=new wijmo.chart.finance.analytics.FibonacciFans;break;case"FibonacciTimeZones":t=new wijmo.chart.finance.analytics.FibonacciTimeZones;break;case"BollingerBands":t=new wijmo.chart.finance.analytics.BollingerBands;break;case"ATR":t=new wijmo.chart.finance.analytics.ATR;break;case"CCI":t=new wijmo.chart.finance.analytics.CCI;break;case"Envelopes":t=new wijmo.chart.finance.analytics.Envelopes;break;case"Macd":t=new wijmo.chart.finance.analytics.Macd;break;case"MacdHistogram":t=new wijmo.chart.finance.analytics.MacdHistogram;break;case"Stochastic":t=new wijmo.chart.finance.analytics.Stochastic;break;case"WilliamsR":t=new wijmo.chart.finance.analytics.WilliamsR;break;case"RSI":t=new wijmo.chart.finance.analytics.RSI;break;case"Waterfall":t=new wijmo.chart.analytics.Waterfall;break;case"BoxWhisker":t=new wijmo.chart.analytics.BoxWhisker;break;case"ErrorBar":t=new wijmo.chart.analytics.ErrorBar}return wijmo.copy(t,n),t},i}(u);i._FlexChartCoreInitializer=f;e=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),Object.defineProperty(i.prototype,"_initializerType",{get:function(){return n.mvc.chart._FlexChartCoreInitializer},enumerable:!0,configurable:!0}),i}(r);i._FlexChartCoreWrapper=e;c=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype._prepareExtraOptions=function(n){var t=n.options,i,r,u={};t&&(i=t.bubbleMaxSize,r=t.bubbleMinSize,(i!=null||r!=null)&&(u.bubble={minSize:r,maxSize:i}),t.funnel!=null&&(u.funnel=t.funnel),n.options=u)},t}(f);i._FlexChartInitializer=c;l=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),Object.defineProperty(i.prototype,"_initializerType",{get:function(){return n.mvc.chart._FlexChartInitializer},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_controlType",{get:function(){return n.mvc.chart.FlexChart},enumerable:!0,configurable:!0}),i}(e);i._FlexChartWrapper=l;a=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.chart.FlexChart);i.FlexChart=a})(i=t.chart||(t.chart={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var t;(function(n){var i=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.chart.hierarchical.Sunburst),t;n.Sunburst=i;t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.chart.hierarchical.TreeMap);n.TreeMap=t})(t=n.hierarchical||(n.hierarchical={}))})(t=n.chart||(n.chart={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(i){var r;(function(r){var h=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),Object.defineProperty(i.prototype,"_controlType",{get:function(){return n.mvc.chart.hierarchical.Sunburst},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_initializerType",{get:function(){return n.mvc.chart.hierarchical._SunburstInitializer},enumerable:!0,configurable:!0}),i}(i._FlexPieWrapper),u,f,e,o,s;r._SunburstWrapper=h;u=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype._beforeInitializeControl=function(n){var t=n.childItemsPath;t&&t.indexOf(",")>0&&(n.childItemsPath=t.split(","))},t}(t._Initializer);r._SunburstInitializer=u;f=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.chart.hierarchical.Sunburst);r.Sunburst=f;e=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),Object.defineProperty(i.prototype,"_controlType",{get:function(){return n.mvc.chart.hierarchical.TreeMap},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_initializerType",{get:function(){return n.mvc.chart.hierarchical._TreeMapInitializer},enumerable:!0,configurable:!0}),i}(i._FlexChartBaseWrapper);r._TreeMapWrapper=e;o=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype._beforeInitializeControl=function(n){var i=n.childItemsPath,t;i&&i.length==1&&(n.childItemsPath=i[0]);t=n.bindingName;t&&t.length==1&&(n.bindingName=t[0])},t}(t._Initializer);r._TreeMapInitializer=o;s=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.chart.hierarchical.TreeMap);r.TreeMap=s})(r=i.hierarchical||(i.hierarchical={}))})(i=t.chart||(t.chart={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.chart.radar.FlexRadar);n.FlexRadar=t})(t=n.radar||(n.radar={}))})(t=n.chart||(n.chart={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(t){var i;(function(i){var u=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),Object.defineProperty(i.prototype,"_controlType",{get:function(){return n.mvc.chart.radar.FlexRadar},enumerable:!0,configurable:!0}),i}(t._FlexChartWrapper),r;i._FlexRadarWrapper=u;r=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.chart.radar.FlexRadar);i.FlexRadar=r})(i=t.radar||(t.radar={}))})(i=t.chart||(t.chart={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var wijmo;!function(t){!function(i){!function(i){"use strict";var e=function(){function i(i,e,s,n){this._isVisible=!0,this._buttonsVisible=!0,this._minScale=0,this._maxScale=1,this._seamless=!1,this._rsContainer=null,this._rsEle=null,this._decBtn=null,this._incBtn=null,this._rsContent=null,this._minHandler=null,this._rangeHandler=null,this._maxHandler=null,this._wrapperSliderMousedown=null,this._wrapperDocMouseMove=null,this._wrapperDocMouseup=null,this._wrapperBtnMousedown=null,this._wrapperRangeSpaceMousedown=null,this._wrapperRangeMouseleave=null,this._isTouch=!1,this._slidingInterval=null,this._rangeSliderRect=null,this._isHorizontal=!0,this._isBtnMousedown=!1,this._needSpaceClick=!1,this._hasButtons=!0,this._movingEle=null,this._movingOffset=null,this._range=null,this._startPt=null,this._minPos=0,this._maxPos=1,this.rangeChanged=new t.Event,this.rangeChanging=new t.Event,i||t.assert(!1,"The container cannot be null."),this._isTouch="ontouchstart"in window,this._needSpaceClick=e,this._hasButtons=s,t.copy(this,n),this._createSlider(i)}return Object.defineProperty(i.prototype,"buttonsVisible",{get:function(){return this._buttonsVisible},set:function(i){if(i!=this._buttonsVisible){if(this._buttonsVisible=t.asBoolean(i),!this._rsContainer||!this._hasButtons)return;this._refresh()}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isHorizontal",{get:function(){return this._isHorizontal},set:function(i){if(i!=this._isHorizontal){if(this._isHorizontal=t.asBoolean(i),!this._rsContainer)return;this._invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isVisible",{get:function(){return this._isVisible},set:function(i){if(i!=this._isVisible){if(this._isVisible=t.asBoolean(i),!this._rsContainer)return;this._rsContainer.style.visibility=this._isVisible?"visible":"hidden"}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minScale",{get:function(){return this._minScale},set:function(i){i>=0&&i!=this._minScale&&(this._minScale=t.asNumber(i))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxScale",{get:function(){return this._maxScale},set:function(i){i>=0&&i!=this._maxScale&&(this._maxScale=t.asNumber(i))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"seamless",{get:function(){return this._seamless},set:function(i){i!=this._seamless&&(this._seamless=t.asBoolean(i))},enumerable:!0,configurable:!0}),i.prototype.onRangeChanged=function(t){this.rangeChanged.raise(this,t)},i.prototype.onRangeChanging=function(t){this.rangeChanging.raise(this,t)},Object.defineProperty(i.prototype,"_isSliding",{get:function(){return null!==this._startPt},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_handleWidth",{get:function(){return this._minHandler.offsetWidth},enumerable:!0,configurable:!0}),i.prototype._createSlider=function(e){var s=this._isHorizontal?i._HRANGESLIDER:i._VRANGESLIDER,n=this._isHorizontal?"wj-glyph-left":"wj-glyph-down",a=this._isHorizontal?"wj-glyph-right":"wj-glyph-up";this._rsContainer=e,this._rsContainer.style.visibility=this._isVisible?"visible":"hidden",this._rsEle=t.createElement('<div class="wj-chart-rangeslider '+s+'"></div>'),this._rsContainer.appendChild(this._rsEle),this._hasButtons&&(this._decBtn=t.createElement('<button class="wj-rangeslider-decbtn wj-btn wj-btn-default" type="button" tabindex="-1"><span class="'+n+" "+i._RANGESLIDER_DECBTN+'"></span></button>'),this._rsEle.appendChild(this._decBtn),this._incBtn=t.createElement('<button class="wj-rangeslider-incbtn wj-btn wj-btn-default" type="button" tabindex="-1"><span class="'+a+" "+i._RANGESLIDER_INCBTN+'"></span></button>'),this._rsEle.appendChild(this._incBtn)),this._rsContent=t.createElement('<div class="wj-rangeslider-content"><div class="wj-rangeslider-rangehandle"></div><div class="wj-rangeslider-minhandle"></div><div class="wj-rangeslider-maxhandle"></div>'),this._rsEle.appendChild(this._rsContent),this._minHandler=this._rsContent.querySelector("."+i._RANGESLIDER_MINHANDLE),this._rangeHandler=this._rsContent.querySelector("."+i._RANGESLIDER_RANGEHANDLE),this._maxHandler=this._rsContent.querySelector("."+i._RANGESLIDER_MAXHANDLE),this._wrapperSliderMousedown=this._onSliderMousedown.bind(this),this._wrapperDocMouseMove=this._onDocMouseMove.bind(this),this._wrapperDocMouseup=this._onDocMouseup.bind(this),this._wrapperRangeSpaceMousedown=this._onRangeSpaceMousedown.bind(this),this._wrapperRangeMouseleave=this._onRangeMouseleave.bind(this),this._wrapperBtnMousedown=this._onBtnMousedown.bind(this),this._switchEvent(!0)},i.prototype._switchEvent=function(t){var i=t?"addEventListener":"removeEventListener";this._rsContainer&&(this._needSpaceClick&&this._rsEle[i]("mousedown",this._wrapperRangeSpaceMousedown),this._rsEle[i]("mouseleave",this._wrapperRangeMouseleave),this._rsContent[i]("mousedown",this._wrapperSliderMousedown),this._hasButtons&&(this._decBtn[i]("mousedown",this._wrapperBtnMousedown),this._incBtn[i]("mousedown",this._wrapperBtnMousedown)),document[i]("mousemove",this._wrapperDocMouseMove),document[i]("mouseup",this._wrapperDocMouseup),"ontouchstart"in window&&(this._needSpaceClick&&this._rsEle[i]("touchstart",this._wrapperRangeSpaceMousedown),this._rsContent[i]("touchstart",this._wrapperSliderMousedown),this._hasButtons&&(this._decBtn[i]("touchstart",this._wrapperBtnMousedown),this._incBtn[i]("touchstart",this._wrapperBtnMousedown)),document[i]("touchmove",this._wrapperDocMouseMove),document[i]("touchend",this._wrapperDocMouseup)))},i.prototype._onSliderMousedown=function(e){this._isVisible&&(this._movingEle=e.srcElement||e.target,this._startPt=e instanceof MouseEvent?new t.Point(e.pageX,e.pageY):new t.Point(e.changedTouches[0].pageX,e.changedTouches[0].pageY),t.removeClass(this._minHandler,i._RANGESLIDER_HANDLE_ACTIVE),t.removeClass(this._maxHandler,i._RANGESLIDER_HANDLE_ACTIVE),this._movingOffset=t.getElementRect(this._movingEle),this._movingEle!=this._rangeHandler?(this._isHorizontal?this._movingOffset.left+=.5*this._movingEle.offsetWidth:this._movingOffset.top+=.5*this._movingEle.offsetHeight,t.addClass(this._movingEle,i._RANGESLIDER_HANDLE_ACTIVE)):this._range=this._maxPos-this._minPos,e.preventDefault())},i.prototype._onDocMouseMove=function(i){if(this._isVisible&&this._startPt){var e=i instanceof MouseEvent?new t.Point(i.pageX,i.pageY):new t.Point(i.changedTouches[0].pageX,i.changedTouches[0].pageY);this._onMove(e)}},i.prototype._onMove=function(e){var s,n=this,a=this._startPt,h=this._movingOffset,o=this._plotBox,r=this._range,_=this._movingEle,l=this._minHandler,c=this._rangeHandler,p=this._maxHandler;a&&h&&((s=this._isHorizontal?(h.left+e.x-a.x-o.x)/o.width:1-(h.top+e.y-a.y-o.y)/o.height)<0?s=0:s>1&&(s=1),_===l?this._seamless&&0===this._minScale&&s>=this._maxPos?(n._minPos=n._maxPos,n._movingEle=p,t.removeClass(this._minHandler,i._RANGESLIDER_HANDLE_ACTIVE),t.addClass(this._maxHandler,i._RANGESLIDER_HANDLE_ACTIVE)):(s>this._maxPos-this._minScale&&(s=this._maxPos-this._minScale),s<this._maxPos-this._maxScale&&(s=this._maxPos-this._maxScale),this._minPos=s):_===p?this._seamless&&0===this._minScale&&s<=this._minPos?(n._maxPos=n._minPos,n._movingEle=l,t.removeClass(this._maxHandler,i._RANGESLIDER_HANDLE_ACTIVE),t.addClass(this._minHandler,i._RANGESLIDER_HANDLE_ACTIVE)):(s<this._minPos+this._minScale&&(s=this._minPos+this._minScale),s>this._minPos+this._maxScale&&(s=this._minPos+this._maxScale),this._maxPos=s):_===c&&(this._isHorizontal?(this._minPos=s,this._maxPos=this._minPos+r,this._maxPos>=1&&(this._maxPos=1,this._minPos=this._maxPos-r)):(this._maxPos=s,this._minPos=this._maxPos-r,this._minPos<=0&&(this._minPos=0,this._maxPos=this._minPos+r))),this._updateElesPosition(),this.onRangeChanging())},i.prototype._onDocMouseup=function(e){this._isVisible&&(this._clearInterval(),this._isBtnMousedown=!1,this._startPt&&(this.onRangeChanged(),this._startPt=null,this._movingOffset=null),t.removeClass(this._minHandler,i._RANGESLIDER_HANDLE_ACTIVE),t.removeClass(this._maxHandler,i._RANGESLIDER_HANDLE_ACTIVE))},i.prototype._onRangeSpaceMousedown=function(i){var e=i instanceof MouseEvent?new t.Point(i.pageX,i.pageY):new t.Point(i.changedTouches[0].pageX,i.changedTouches[0].pageY),s=t.getElementRect(this._rsContent),n=t.getElementRect(this._rangeHandler),a=i.srcElement||i.target,h=0;i.stopPropagation(),i.preventDefault(),a!==this._rsContent&&a!==this._rsEle||(this._isHorizontal?(h=n.width/s.width,e.x<n.left?h*=-1:e.x>n.left+n.width&&(h*=1)):(h=n.height/s.height,e.y<n.top?h*=1:e.y>n.top+n.height&&(h*=-1)),0!==h&&this._doSliding(h,e))},i.prototype._onRangeMouseleave=function(t){t.stopPropagation(),t.preventDefault(),this._isBtnMousedown&&(this._clearInterval(),this.onRangeChanged())},i.prototype._onBtnMousedown=function(e){var s=e.srcElement||e.target,n=0;if(e.stopPropagation(),e.preventDefault(),t.hasClass(s,i._RANGESLIDER_DECBTN)){if(0===this._minPos)return;n=-.05}else if(t.hasClass(s,i._RANGESLIDER_INCBTN)){if(1===this._maxPos)return;n=.05}this._isBtnMousedown=!0,0!==n&&this._doSliding(n)},i.prototype._refresh=function(i){var e,s,n=0,a=t.getElementRect(this._rsContainer);i&&(this._rangeSliderRect=i),this._rangeSliderRect&&(this._hasButtons&&this._buttonsVisible?(this._decBtn.style.display="block",this._incBtn.style.display="block",n=this._isHorizontal?this._decBtn.offsetWidth+this._minHandler.offsetWidth/2:this._decBtn.offsetHeight+this._minHandler.offsetHeight/2):(this._hasButtons&&(this._decBtn.style.display="none",this._incBtn.style.display="none"),n=this._isHorizontal?this._minHandler.offsetWidth/2:this._minHandler.offsetHeight/2),e=this._getRsRect(),this._isHorizontal?(e.left-=this._minHandler.offsetWidth/2,e.width+=this._minHandler.offsetWidth,s={left:n,width:e.width-2*n}):(e.top-=this._minHandler.offsetHeight/2,e.height+=this._minHandler.offsetHeight,s={top:n,height:e.height-2*n}),t.setCss(this._rsEle,e),t.setCss(this._rsContent,s),a=t.getElementRect(this._rsContent),this._plotBox={x:a.left,y:a.top,width:a.width,height:a.height},this._updateElesPosition())},i.prototype._updateElesPosition=function(){var t,i,e,s=this._minHandler,n=(this._rangeHandler,this._maxHandler),a=this._plotBox,h=this._isHorizontal;a&&(t=h?{left:this._minPos*a.width-.5*s.offsetWidth}:{top:(1-this._minPos)*a.height-.5*n.offsetHeight},i=h?{left:this._minPos*a.width,width:(this._maxPos-this._minPos)*a.width}:{top:(1-this._maxPos)*a.height,height:(this._maxPos-this._minPos)*a.height},e=h?{left:this._maxPos*a.width-.5*n.offsetWidth}:{top:(1-this._maxPos)*a.height-.5*s.offsetHeight},this._refreshSlider(t,i,e))},i.prototype._refreshSlider=function(i,e,s){t.setCss(this._minHandler,i),t.setCss(this._rangeHandler,e),t.setCss(this._maxHandler,s)},i.prototype._invalidate=function(){var e,s;this._rsContainer&&(e=this._isHorizontal?i._HRANGESLIDER:i._VRANGESLIDER,s=this._isHorizontal?i._VRANGESLIDER:i._HRANGESLIDER,t.removeClass(this._rsEle,s),t.addClass(this._rsEle,e),[this._rsEle,this._rsContent,this._minHandler,this._maxHandler,this._rangeHandler].forEach(function(t){t.removeAttribute("style")}),this._refresh())},i.prototype._changeRange=function(t){var i=this._maxPos-this._minPos;t<0&&0===this._minPos||t>0&&1===this._maxPos||(t<0?(this._minPos+=t,this._minPos=this._minPos<0?0:this._minPos,this._maxPos=this._minPos+i):(this._maxPos+=t,this._maxPos=this._maxPos>1?1:this._maxPos,this._minPos=this._maxPos-i),this._updateElesPosition())},i.prototype._doSliding=function(i,e){t.getElementRect(this._rsContent),t.getElementRect(this._rangeHandler);this._clearInterval(),this._startPt=new t.Point,this._changeRange(i),this.onRangeChanged(),this._setSlidingInterval(i,e)},i.prototype._setSlidingInterval=function(i,e){var s,n,a=this;this._slidingInterval=window.setInterval(function(){if(e)if(s=t.getElementRect(a._rsContent),n=t.getElementRect(a._rangeHandler),a._isHorizontal){if(e.x>=n.left&&e.x<=n.left+n.width)return void a._clearInterval()}else if(e.y>=n.top&&e.y<=n.top+n.height)return void a._clearInterval();a._changeRange(i),a.onRangeChanged()},200)},i.prototype._clearInterval=function(){this._slidingInterval&&window.clearInterval(this._slidingInterval)},i.prototype._getRsRect=function(){var t=this._rangeSliderRect,i={};if(t)return["left","top","width","height"].forEach(function(e){t[e]&&(i[e]=t[e])}),i},i._HRANGESLIDER="wj-chart-hrangeslider",i._VRANGESLIDER="wj-chart-vrangeslider",i._RANGESLIDER_DECBTN="wj-rangeslider-decbtn",i._RANGESLIDER_INCBTN="wj-rangeslider-incbtn",i._RANGESLIDER_RANGEHANDLE="wj-rangeslider-rangehandle",i._RANGESLIDER_MINHANDLE="wj-rangeslider-minhandle",i._RANGESLIDER_MAXHANDLE="wj-rangeslider-maxhandle",i._RANGESLIDER_HANDLE_ACTIVE="wj-rangeslider-handle-active",i}();i._RangeSlider=e}(i.interaction||(i.interaction={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(i){!function(e){"use strict";var s;!function(t){t[t.X=0]="X",t[t.Y=1]="Y"}(s=e.Orientation||(e.Orientation={}));var n=function(){function n(e,n){this._isVisible=!0,this._orientation=s.X,this._seamless=!1,this._minScale=0,this._maxScale=1,this.rangeChanged=new t.Event,this._chart=t.asType(e,i.FlexChartCore,!1),this._createRangeSelector(),t.copy(this,n)}return Object.defineProperty(n.prototype,"isVisible",{get:function(){return this._isVisible},set:function(i){i!=this._isVisible&&(this._isVisible=t.asBoolean(i),this._rangeSlider&&(this._rangeSlider.isVisible=i))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"min",{get:function(){return this._min},set:function(i){if((i=t.asNumber(i,!0,!1))!=this._min){var e=!1;null==i||void 0===i||isNaN(i)||null==this._max?(this._min=i,e=!0):i<=this._max&&(this._min=i,e=!0),this._rangeSlider&&e&&this._changeRange()}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"max",{get:function(){return this._max},set:function(i){if((i=t.asNumber(i,!0,!1))!=this._max){var e=!1;null==i||isNaN(i)?(this._max=i,e=!0):i>=this._min&&(this._max=i,e=!0),this._rangeSlider&&e&&this._changeRange()}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"orientation",{get:function(){return this._orientation},set:function(i){(i=t.asEnum(i,s))!==this._orientation&&(this._orientation=i,this._rangeSlider&&(this._rangeSlider.isHorizontal=i==s.X))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"seamless",{get:function(){return this._seamless},set:function(i){(i=t.asBoolean(i,!0))!=this._seamless&&(this._seamless=i,this._rangeSlider&&(this._rangeSlider.seamless=i))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"minScale",{get:function(){return this._minScale},set:function(i){(i=t.asNumber(i))<=1&&i>=0&&i!=this._minScale&&i<this._maxScale&&(this._minScale=i,this._rangeSlider&&(this._rangeSlider.minScale=t.asNumber(i),this._updateMinAndMaxWithScale(!0)))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxScale",{get:function(){return this._maxScale},set:function(i){(i=t.asNumber(i))<=1&&i>=0&&i!=this._maxScale&&i>this._minScale&&(this._maxScale=i,this._rangeSlider&&(this._rangeSlider.maxScale=t.asNumber(i),this._updateMinAndMaxWithScale(!0)))},enumerable:!0,configurable:!0}),n.prototype.remove=function(){this._rangeSelectorEle&&(this._chart.hostElement.removeChild(this._rangeSelectorEle),this._switchEvent(!1),this._rangeSelectorEle=null,this._rangeSlider=null)},n.prototype.onRangeChanged=function(t){this.rangeChanged.raise(this,t)},n.prototype._createRangeSelector=function(){var i=this._chart.hostElement,n=this._orientation===s.X;this._rangeSelectorEle=t.createElement('<div class="wj-chart-rangeselector-container"></div>'),this._rangeSlider=new e._RangeSlider(this._rangeSelectorEle,!1,!1,{isHorizontal:n,isVisible:this._isVisible,seamless:this._seamless}),i.appendChild(this._rangeSelectorEle),this._switchEvent(!0)},n.prototype._switchEvent=function(t){var i=t?"addHandler":"removeHandler";this._chart.hostElement&&(this._rangeSlider.rangeChanged[i](this._updateRange,this),this._chart.rendered[i](this._refresh,this))},n.prototype._refresh=function(){var e,s,n,a=this._chart.hostElement,h=t.getElementRect(this._rangeSelectorEle);e=a.querySelector("."+i.FlexChart._CSS_PLOT_AREA),s=t.getElementRect(e),(n=e.getBBox())&&n.width&&n.height&&(this._adjustMinAndMax(),this._rangeSlider._refresh({left:n.x,top:s.top-h.top,width:n.width,height:n.height}))},n.prototype._adjustMinAndMax=function(){var i=this,e=i._chart,n=i._rangeSlider,a=i._min,h=i._max,o=i._orientation===s.X?e.axisX:e.axisY,r=t.isDate(o.actualMin)?o.actualMin.valueOf():o.actualMin,_=t.isDate(o.actualMax)?o.actualMax.valueOf():o.actualMax;i._min=null===a||isNaN(a)||void 0===a||a<r||a>_?r:a,i._max=null===h||isNaN(h)||void 0===h||h<r||h>_?_:h;var l=this._chart._plotRect;if(l){var c=void 0,p=void 0;this._orientation===s.X?(c=(o.convert(i._min)-l.left)/l.width,p=(o.convert(i._max)-l.left)/l.width):(c=(l.top-o.convert(i._min))/l.height+1,p=(l.top-o.convert(i._max))/l.height+1),n._minPos=isNaN(c)?0:c,n._maxPos=isNaN(p)?1:p,this._updateMinAndMaxWithScale(!1)}},n.prototype._updateMinAndMaxWithScale=function(t){var i,e=this._rangeSlider,s=!1;if(0!==this._minScale&&e._minPos+this._minScale>e._maxPos&&((i=e._minPos+this._minScale)>1?(e._maxPos=1,e._minPos=1-this._minScale):e._maxPos=i,s=!0),1!==this._maxScale&&e._minPos+this._maxScale<e._maxPos&&((i=e._minPos+this._maxScale)>1?(e._maxPos=1,e._minPos=1-this._maxScale):e._maxPos=i,s=!0),s){var n=this._getMinAndMax();this._min=n.min,this._max=n.max,t&&this._rangeSelectorEle&&(this._rangeSlider._refresh(),this.onRangeChanged())}},n.prototype._changeRange=function(){this._adjustMinAndMax(),this._rangeSelectorEle&&(this._rangeSlider._refresh(),this.onRangeChanged())},n.prototype._updateRange=function(){var t;this._rangeSlider;t=this._chart,this._orientation===s.X?t.axisX:t.axisY;var i=this._getMinAndMax();this._min=i.min,this._max=i.max,this.onRangeChanged()},n.prototype._getMinAndMax=function(){var t=this._rangeSlider,i=this._chart,e=i._plotRect,n=null,a=null;return e&&(this._orientation===s.X?(n=i.axisX.convertBack(e.left+t._minPos*e.width),a=i.axisX.convertBack(e.left+t._maxPos*e.width)):(n=i.axisY.convertBack(e.top+(1-t._minPos)*e.height),a=i.axisY.convertBack(e.top+(1-t._maxPos)*e.height))),{min:n,max:a}},n}();e.RangeSelector=n}(i.interaction||(i.interaction={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(i){!function(e){var s;!function(t){t[t.Zoom=0]="Zoom",t[t.Pan=1]="Pan"}(s=e.MouseAction||(e.MouseAction={}));var n;!function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.XY=2]="XY"}(n=e.InteractiveAxes||(e.InteractiveAxes={}));var a=function(){function e(i,e){this._chart=null,this._zoomEle=null,this._overlayEle=null,this._wrapperMousedown=null,this._wrapperMouseMove=null,this._wrapperMouseup=null,this._wrapperPointerdown=null,this._wrapperPointerMove=null,this._wrapperPointerup=null,this._wrapperTouchStart=null,this._wrapperTouchMove=null,this._wrapperTouchEnd=null,this._wrapperMouseWheel=null,this._startFirstPt=null,this._minX=null,this._maxX=null,this._minY=null,this._maxY=null,this._threadHold=20,this._clip={},this._selection={},this._startPointers=[],this._mvPointers=[],this._pinchStartEvents=[],this._minXRange=null,this._minYRange=null,this._innerUpdating=!1,this._lastMinX=null,this._lastMaxX=null,this._lastMinY=null,this._lastMaxY=null,this._mouseAction=s.Zoom,this._interactiveAxes=n.X,this._enable=!0,this._scaleX=1,this._scaleY=1,this._posX=0,this._posY=0,i||t.assert(!1,"The FlexChart cannot be null."),this._chart=i,t.copy(this,e),this._initialize()}return Object.defineProperty(e.prototype,"mouseAction",{get:function(){return this._mouseAction},set:function(i){this._mouseAction=t.asEnum(i,s)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interactiveAxes",{get:function(){return this._interactiveAxes},set:function(i){i!==this._interactiveAxes&&(this._interactiveAxes=t.asEnum(i,n))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"enable",{get:function(){return this._enable},set:function(i){i!==this._enable&&(this._enable=t.asBoolean(i,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scaleX",{get:function(){return this._scaleX},set:function(i){i!==this._scaleX&&(this._scaleX=i<0?0:i>1?1:t.asNumber(i),this._seriesGroup&&this._initAxisRangeWithPosAndScale(!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scaleY",{get:function(){return this._scaleY},set:function(i){i!==this._scaleY&&(this._scaleY=i<0?0:i>1?1:t.asNumber(i),this._seriesGroup&&this._initAxisRangeWithPosAndScale(!1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"posX",{get:function(){return this._posX},set:function(i){i!==this._posX&&(this._posX=i<0?0:i>1?1:t.asNumber(i),this._seriesGroup&&this._initAxisRangeWithPosAndScale(!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"posY",{get:function(){return this._posY},set:function(i){i!==this._posY&&(this._posY=i<0?0:i>1?1:t.asNumber(i),this._seriesGroup&&this._initAxisRangeWithPosAndScale(!1))},enumerable:!0,configurable:!0}),e.prototype.remove=function(){this._zoomEle&&(this._chart.hostElement.removeChild(this._zoomEle),this._zoomEle=null),t.removeClass(this._chart.hostElement,e._CSS_TOUCH_DISABLED),this._switchEvent(!1),this._wrapperMousedown=null,this._wrapperMouseMove=null,this._wrapperMouseup=null,this._wrapperPointerdown=null,this._wrapperPointerMove=null,this._wrapperPointerup=null,this._wrapperTouchStart=null,this._wrapperTouchMove=null,this._wrapperTouchEnd=null,this._wrapperMouseWheel=null},e.prototype.reset=function(){var t=this._chart,i=t.axisX,e=t.axisY;this._maxX&&(i.max=this._maxX),this._minX&&(i.min=this._minX),this._maxY&&(e.max=this._maxY),this._minY&&(e.min=this._minY),this._initAxisRangeWithPosAndScale(!0),this._initAxisRangeWithPosAndScale(!1)},e.prototype._refreshChart=function(){var t=this._chart,i=t.axisX,e=t.axisY;this._minX=this._getAxisMin(i),this._maxX=this._getAxisMax(i),this._minY=this._getAxisMin(e),this._maxY=this._getAxisMax(e),this._minXRange=.005*(this._maxX-this._minX),this._minYRange=.005*(this._maxY-this._minY),this._initAxisRangeWithPosAndScale(!0),this._initAxisRangeWithPosAndScale(!1)},e.prototype._initialize=function(){var i=this._chart.hostElement;this._zoomEle=t.createElement('<div class="'+e._CSS_ZOOM+'"><div class="'+e._CSS_ZOOM_OVERLAY+'"></div>'),this._zoomEle.style.visibility="visible",i.appendChild(this._zoomEle),t.addClass(i,e._CSS_TOUCH_DISABLED),this._overlayEle=this._zoomEle.querySelector("."+e._CSS_ZOOM_OVERLAY),this._wrapperMousedown=this._onMousedown.bind(this),this._wrapperMouseMove=this._onMouseMove.bind(this),this._wrapperMouseup=this._onMouseup.bind(this),this._wrapperPointerdown=this._onPointerdown.bind(this),this._wrapperPointerMove=this._onPointerMove.bind(this),this._wrapperPointerup=this._onPointerup.bind(this),this._wrapperMouseWheel=this._onMouseWheel.bind(this),this._wrapperTouchStart=this._onTouchStart.bind(this),this._wrapperTouchMove=this._onTouchMove.bind(this),this._wrapperTouchEnd=this._onTouchEnd.bind(this),this._switchEvent(!0)},e.prototype._switchEvent=function(t){var i=this._chart.hostElement,e=t?"addEventListener":"removeEventListener",s=t?"addHandler":"removeHandler";i&&(i[e]("mousedown",this._wrapperMousedown),i[e]("mousemove",this._wrapperMouseMove),document[e]("mouseup",this._wrapperMouseup),"onpointerdown"in window&&(i[e]("pointerdown",this._wrapperPointerdown),i[e]("pointermove",this._wrapperPointerMove),document[e]("pointerup",this._wrapperPointerup)),i[e]("wheel",this._wrapperMouseWheel),"ontouchstart"in window&&(i[e]("touchstart",this._wrapperTouchStart),i[e]("touchmove",this._wrapperTouchMove),document[e]("touchend",this._wrapperTouchEnd)),this._chart.rendered[s](this._refresh,this))},e.prototype._refresh=function(){var e,s,n,a=this._chart,h=a.axisX,o=a.axisY,r=a.hostElement;this._seriesGroup=r.querySelector(".wj-series-group"),e=r.querySelector("."+i.FlexChart._CSS_PLOT_AREA),this._plotOffset=t.getElementRect(e),this._plotBox=e.getBBox(),this._zoomEleOffset=t.getElementRect(this._zoomEle),this._overlayEle&&this._overlayEle.removeAttribute("style"),this._innerUpdating?this._innerUpdating=!1:(s=!1,n=!1,(null===this._minX||isNaN(this._minX)||0===this._minX||-1===this._minX||this._lastMinX!==this._getAxisMin(h))&&(this._minX=this._getAxisMin(h),null===this._minX||isNaN(this._minX)||0===this._minX||-1===this._minX||(s=!0)),(null===this._maxX||isNaN(this._maxX)||0===this._maxX||-1===this._maxX||this._lastMaxX!==this._getAxisMax(h))&&(this._maxX=this._getAxisMax(h),null===this._maxX||isNaN(this._maxX)||0===this._maxX||-1===this._maxX||(s=!0)),(null===this._minY||isNaN(this._minY)||this._lastMinY!==this._getAxisMin(o))&&(this._minY=this._getAxisMin(o),isNaN(this._minY)||(n=!0)),(null===this._maxY||isNaN(this._maxY)||this._lastMaxY!==this._getAxisMax(o))&&(this._maxY=this._getAxisMax(o),isNaN(this._maxY)||(n=!0)),this._minXRange=.005*(this._maxX-this._minX),this._minYRange=.005*(this._maxY-this._minY),s&&null!==this._scaleX&&void 0!==this._scaleX&&1!==this._scaleX&&null!==this._posX&&void 0!==this._posX&&0!==this._posX&&this._initAxisRangeWithPosAndScale(!0),n&&null!==this._scaleY&&void 0!==this._scaleY&&1!==this._scaleY&&null!==this._posY&&void 0!==this._posY&&0!==this._posY&&this._initAxisRangeWithPosAndScale(!1))},e.prototype._onMousedown=function(t){this._enable&&(this._disabledOthersInteraction(!0),this._mouseDown(t),t.preventDefault())},e.prototype._onMouseMove=function(t){this._enable&&(this._mouseMove(t),t.preventDefault())},e.prototype._onMouseup=function(t){this._enable&&(this._mouseup(t),this._disabledOthersInteraction(!1))},e.prototype._onMouseWheel=function(t){var i=-t.deltaY>0?.05:-.05;this._enable&&(this._scaling=!0,this._interactiveAxes!==n.X&&this._interactiveAxes!==n.XY||this._updateAxisByChg(!0,i,-i),this._interactiveAxes!==n.Y&&this._interactiveAxes!==n.XY||this._updateAxisByChg(!1,i,-i),this._scaling=!1,t.preventDefault())},e.prototype._mouseDown=function(i){this._startFirstPt=this._getPoint(i),this._updatePoint(this._startFirstPt),this._mouseAction===s.Zoom?this._initOverlay():(this._seriesGroup.setAttribute("clip-path","url(#"+this._chart._plotrectId+")"),t.toggleClass(this._chart.hostElement,e._CSS_PANABLE,this._mouseAction===s.Pan))},e.prototype._mouseMove=function(i){var e;this._startFirstPt&&(e=this._getPoint(i),this._updatePoint(e),this._endPoint=new t.Point(e.x,e.y),this._mouseAction===s.Zoom?this._updateOverLay(e):(this._panning=!0,this._panningChart(e.x-this._startFirstPt.x,e.y-this._startFirstPt.y)))},e.prototype._mouseup=function(i){var n=this._endPoint;this._chart.axisX;if(!this._startFirstPt||!n)return t.removeClass(this._chart.hostElement,e._CSS_PANABLE),void this._reset();this._mouseAction===s.Zoom?(this._zoomedChart(n),this._reset()):(this._pannedChart(n.x-this._startFirstPt.x,n.y-this._startFirstPt.y),this._reset()),t.removeClass(this._chart.hostElement,e._CSS_PANABLE)},e.prototype._onPointerdown=function(t){if(this._enable){switch(this._disabledOthersInteraction(!0),t.pointerType){case"touch":this._pointerDown(t);break;case"mouse":this._mouseDown(t)}t.preventDefault()}},e.prototype._onPointerMove=function(t){if(this._enable){switch(t.pointerType){case"touch":this._pointerMove(t);break;case"mouse":this._mouseMove(t)}t.preventDefault()}},e.prototype._onPointerup=function(t){if(this._enable){switch(t.pointerType){case"touch":this._pointerUp(t);break;case"mouse":this._mouseup(t)}this._disabledOthersInteraction(!1),t.preventDefault()}},e.prototype._pointerDown=function(t){t.preventManipulation&&t.preventManipulation(),this._seriesGroup.setAttribute("clip-path","url(#"+this._chart._plotrectId+")"),this._startPointers.push({id:t.pointerId,x:t.pageX,y:t.pageY}),1===this._startPointers.length?(this._scaling=!1,this._panning=!0):2===this._startPointers.length&&(this._panning=!1,this._scaling=!0,this._startDistance={x:this._startPointers[0].x-this._startPointers[1].x,y:this._startPointers[0].y-this._startPointers[1].y})},e.prototype._pointerMove=function(i){var e,s,a,h,o=new t.Point(i.pageX,i.pageY),r={},_={};if(i.preventManipulation&&i.preventManipulation(),this._panning){if(!this._pointInPlotArea(o))return;this._endPoint=new t.Point(i.pageX,i.pageY),this._panningChart(this._endPoint.x-this._startPointers[0].x,this._endPoint.y-this._startPointers[0].y)}else this._scaling&&(e=this._startPointers[0].id+"",s=this._startPointers[1].id+"",this._mvPointers[i.pointerId+""]={x:i.pageX,y:i.pageY},this._mvPointers[e]&&this._mvPointers[s]&&(Math.abs(this._startDistance.x)>this._threadHold&&this._interactiveAxes!==n.Y&&(a=this._mvPointers[e].x-this._plotOffset.left,h=this._startPointers[0].x-this._plotOffset.left,_.x=Math.abs((this._mvPointers[e].x-this._mvPointers[s].x)/this._startDistance.x),r.x=a-_.x*h,this._clip.x=(this._plotBox.x-a)/_.x+h,this._selection.w=this._plotBox.width/_.x),Math.abs(this._startDistance.y)>this._threadHold&&this._interactiveAxes!==n.X&&(a=this._mvPointers[e].y-this._plotOffset.top,h=this._startPointers[0].y-this._plotOffset.top,_.y=Math.abs((this._mvPointers[e].y-this._mvPointers[s].y)/this._startDistance.y),r.y=a-_.y*h,this._clip.y=(this._plotBox.y-a)/_.y+h,this._selection.h=this._plotBox.height/_.y),this._scalingChart(_,r)))},e.prototype._pointerUp=function(t){t.preventManipulation&&t.preventManipulation(),this._panning?(this._endPoint&&this._pannedChart(this._endPoint.x-this._startPointers[0].x,this._endPoint.y-this._startPointers[0].y),this._reset()):this._scaling&&(this._scaledChart(t),this._reset())},e.prototype._onTouchStart=function(t){if(this._enable)return this._disabledOthersInteraction(!0),1==t.touches.length?(this._scaling=!1,this._panning=!0,this._startFirstPt=this._getPoint(t)):2==t.touches.length&&(this._pinchStartEvents=this._getTouchPair(t),this._startDistance=this._touchDistance(t),this._panning=!1,this._scaling=!0),this._seriesGroup&&this._seriesGroup.setAttribute("clip-path","url(#"+this._chart._plotrectId+")"),this._chart._hideToolTip(),!0},e.prototype._onTouchMove=function(i){if(this._enable){var e,s,a,h,o,r={},_={},l=i.touches[0],c=new t.Point(l.pageX,l.pageY);if(i.preventDefault(),this._panning){if(this._startFirstPt){if(!this._pointInPlotArea(c))return;this._endPoint=new t.Point(l.pageX,l.pageY),this._panningChart(this._endPoint.x-this._startFirstPt.x,this._endPoint.y-this._startFirstPt.y)}}else this._scaling&&(a=this._touchDistance(i),h=this._getTouchPair(i)[0],o=this._pinchStartEvents[0],Math.abs(this._startDistance.x)>this._threadHold&&this._interactiveAxes!==n.Y&&(e=h.pageX-this._plotOffset.left,s=o.pageX-this._plotOffset.left,r.x=Math.abs(a.x/this._startDistance.x),_.x=e-r.x*s,this._clip.x=(this._plotBox.x-e)/r.x+s,this._selection.w=this._plotBox.width/r.x),Math.abs(this._startDistance.y)>this._threadHold&&this._interactiveAxes!==n.X&&(e=h.pageY-this._plotOffset.top,s=o.pageY-this._plotOffset.top,r.y=Math.abs(a.y/this._startDistance.y),_.y=e-r.y*s,this._clip.y=(this._plotBox.y-e)/r.y+s,this._selection.h=this._plotBox.height/r.y),this._scalingChart(r,_));return!0}},e.prototype._onTouchEnd=function(t){if(this._enable){var i=this._endPoint;if(this._panning){if(!this._startFirstPt||!i)return void this._reset();this._pannedChart(i.x-this._startFirstPt.x,i.y-this._startFirstPt.y)}else this._scaling&&this._scaledChart(t);return this._reset(),this._disabledOthersInteraction(!1),!0}},e.prototype._initOverlay=function(){switch(this._zoomEle.style.visibility="visible",this._interactiveAxes){case n.X:this._overlayEle.style.left=this._startFirstPt.x-this._zoomEleOffset.left+"px",this._overlayEle.style.top=this._plotOffset.top-this._zoomEleOffset.top+"px";break;case n.Y:this._overlayEle.style.left=this._plotBox.x+"px",this._overlayEle.style.top=this._startFirstPt.y-this._zoomEleOffset.top+"px";break;case n.XY:this._overlayEle.style.left=this._startFirstPt.x-this._zoomEleOffset.left+"px",this._overlayEle.style.top=this._startFirstPt.y-this._zoomEleOffset.top+"px"}},e.prototype._updateOverLay=function(i){var e=this._startFirstPt.x-i.x,s=this._startFirstPt.y-i.y,a={};switch(this._interactiveAxes){case n.X:if(Math.abs(e)<this._threadHold)return;a=e<=0?{width:Math.abs(e)+"px",height:this._plotBox.height+"px"}:{left:i.x-this._zoomEleOffset.left+"px",width:e+"px",height:this._plotBox.height+"px"};break;case n.Y:if(Math.abs(s)<this._threadHold)return;a=s<=0?{height:Math.abs(s)+"px",width:this._plotBox.width+"px"}:{top:i.y-this._zoomEleOffset.top+"px",height:s+"px",width:this._plotBox.width+"px"};break;case n.XY:Math.abs(e)>=this._threadHold&&(a.width=Math.abs(e)+"px",e>0&&(a.left=i.x-this._zoomEleOffset.left+"px")),Math.abs(s)>=this._threadHold&&(a.height=Math.abs(s)+"px",s>0&&(a.top=i.y-this._zoomEleOffset.top+"px"))}t.setCss(this._overlayEle,a)},e.prototype._updatePoint=function(t){var i=this._plotOffset;t.x<i.left&&(t.x=i.left),t.x>i.left+i.width&&(t.x=i.left+i.width),t.y<i.top&&(t.y=i.top),t.y>i.top+i.height&&(t.y=i.top+i.height)},e.prototype._pointInPlotArea=function(t){var i=this._plotOffset;return t.x>=i.left&&t.x<=i.left+i.width&&t.y>=i.top&&t.y<=i.top+i.height},e.prototype._zoomedChart=function(t){t&&(this._interactiveAxes!==n.X&&this._interactiveAxes!==n.XY||this._zoomedAxis(t,!0),this._interactiveAxes!==n.Y&&this._interactiveAxes!==n.XY||this._zoomedAxis(t,!1),this._startFirstPt=null)},e.prototype._zoomedAxis=function(t,i){var e,s,n=i?this._chart.axisX:this._chart.axisY,a=i?"x":"y",h=i?"left":"top";t&&Math.abs(this._startFirstPt[a]-t[a])>this._threadHold&&(e=n.convertBack(this._startFirstPt[a]-this._plotOffset[h]+this._plotBox[a]),(s=n.convertBack(t[a]-this._plotOffset[h]+this._plotBox[a]))-e!=0&&this._updateAxisRange(n,Math.min(e,s),Math.max(e,s)))},e.prototype._panningChart=function(t,i){var e=this._chart.axisX,s=this._chart.axisY,a=this._getTransFormGroups();t=Math.abs(t)<this._threadHold?0:t,i=Math.abs(i)<this._threadHold?0:i,this._interactiveAxes===n.X&&(i=0),this._interactiveAxes===n.Y&&(t=0),t>0&&e.actualMin.valueOf()===this._minX&&(t=0),t<0&&e.actualMax.valueOf()===this._maxX&&(t=0),i>0&&s.actualMax.valueOf()===this._maxY&&(i=0),i<0&&s.actualMin.valueOf()===this._minY&&(i=0);for(var h=0;h<a.length;h++)a[h].setAttribute("transform","translate("+t+","+i+")")},e.prototype._pannedChart=function(t,i){this._interactiveAxes!==n.X&&this._interactiveAxes!==n.XY||this._updateAxisByDistance(!0,t),this._interactiveAxes!==n.Y&&this._interactiveAxes!==n.XY||this._updateAxisByDistance(!1,-i)},e.prototype._scalingChart=function(t,i){var e,s,n,a=this._chart.axisX,h=this._chart.axisY,o=void 0!==i.x?i.x:0,r=void 0!==i.y?i.y:0;if(t){e=this._getTransFormGroups(),void 0!==t.x&&t.x<1&&a.actualMin.valueOf()===this._minX&&a.actualMax.valueOf()===this._maxX&&(t.x=1,o=0),void 0!==t.y&&t.y<1&&h.actualMin.valueOf()===this._minY&&h.actualMax.valueOf()===this._maxY&&(t.y=1,r=0),s=void 0!==t.x?t.x:1,n=void 0!==t.y?t.y:1;for(var _=0;_<e.length;_++)e[_].setAttribute("transform","translate("+o+", "+r+") scale("+s+", "+n+")")}},e.prototype._scaledChart=function(t){var i,e,s=this._chart,a=s.axisX,h=s.axisY;this._clip&&(this._interactiveAxes!==n.Y&&void 0!==this._clip.x&&(i=Math.max(this._minX,a.convertBack(this._clip.x)))-(e=Math.min(this._maxX,a.convertBack(this._clip.x+this._selection.w)))!=0&&this._updateAxisRange(a,i,e),this._interactiveAxes!==n.X&&void 0!==this._clip.y&&(e=Math.min(this._maxY,h.convertBack(this._clip.y)),(i=Math.max(this._minY,h.convertBack(this._clip.y+this._selection.h)))-e!=0&&this._updateAxisRange(h,i,e)))},e.prototype._updateAxisByDistance=function(t,i){var e,s=t?this._chart.axisX:this._chart.axisY,n=t?this._minX:this._minY,a=t?this._maxX:this._maxY,h=s.actualMin.valueOf(),o=s.actualMax.valueOf();if(0!==i){if(i>0&&n===h||i<0&&a===o)return this._innerUpdating=!0,void this._chart.invalidate();e=i/(t?this._plotBox.width:this._plotBox.height),this._updateAxisByChg(t,-e,-e)}},e.prototype._updateAxisByChg=function(t,i,e){var s,n,a=t?this._chart.axisX:this._chart.axisY,h=t?this._minX:this._minY,o=t?this._maxX:this._maxY,r=a.actualMin.valueOf(),_=(a.actualMax.valueOf(),this._chart._plotRect),l=t?_.left:_.top,c=t?_.width:_.height,p=t?this._minXRange:this._minYRange;isNaN(i)||isNaN(e)||(this._panning?i<0?(s=t?a.convertBack(l+i*c):a.convertBack(l+c-i*c))<h?(s=h,n=t?a.convertBack(a.convert(s)+c):a.convertBack(a.convert(s)-c)):n=t?a.convertBack(l+c+e*c):a.convertBack(l-e*c):(n=t?a.convertBack(l+c+e*c):a.convertBack(l-e*c))>o?(n=o,s=t?a.convertBack(a.convert(n)-c):a.convertBack(a.convert(n)+c)):s=t?a.convertBack(l+i*c):a.convertBack(l+c-i*c):this._scaling&&(s=t?a.convertBack(l+i*c):a.convertBack(l+c-i*c),n=t?a.convertBack(l+c+e*c):a.convertBack(l-e*c),s<h&&(s=h),n>o&&(n=o),n-s<p&&(s=n-p)),this._updateAxisRange(a,s,n))},e.prototype._initAxisRangeWithPosAndScale=function(t){var i,e,s,n;t?(e=(i=this._maxX-this._minX)*this._scaleX,n=(s=this._minX+this._posX*(i-e))+e,this._innerUpdating=!0,this._chart.axisX.min=s,this._chart.axisX.max=n,this._lastMinX=s,this._lastMaxX=n):(e=(i=this._maxY-this._minY)*this._scaleY,n=(s=this._minY+this._posY*(i-e))+e,this._innerUpdating=!0,this._chart.axisY.min=s,this._chart.axisY.max=n,this._lastMinY=s,this._lastMaxY=n)},e.prototype._updateAxisRange=function(t,i,e){this._chart.beginUpdate(),t.min=i,t.max=e,t===this._chart.axisX?(this._lastMinX=i,this._lastMaxX=e):(this._lastMinY=i,this._lastMaxY=e),this._innerUpdating=!0,this._chart.endUpdate()},e.prototype._reset=function(){this._scaling=!1,this._panning=!1,this._startDistance=0,this._startFirstPt=null,this._pinchStartEvents=[],this._startPointers=[],this._mvPointers=[],this._endPoint=null,this._clip={},this._selection={}},e.prototype._getAxisMin=function(i){return t.isDate(i.actualMin)?i.actualMin.valueOf():i.actualMin},e.prototype._getAxisMax=function(i){return t.isDate(i.actualMax)?i.actualMax.valueOf():i.actualMax},e.prototype._getTransFormGroups=function(){var t=this._seriesGroup.querySelectorAll("g[clip-path]");return 0===t.length&&(t=this._seriesGroup.querySelectorAll("g")),t},e.prototype._disabledOthersInteraction=function(i){var s=this._chart.hostElement;if(null!==s&&void 0!==s)for(var n=s.querySelectorAll(".wj-chart-linemarker-container"),a=0;a<n.length;a++)i?t.addClass(n[a],e._CSS_BLOCK_INTERACTION):t.removeClass(n[a],e._CSS_BLOCK_INTERACTION)},e.prototype._getPoint=function(i){return i instanceof MouseEvent?new t.Point(i.pageX,i.pageY):new t.Point(i.changedTouches[0].pageX,i.changedTouches[0].pageY)},e.prototype._getTouchPair=function(i){var e=[];return t.isArray(i)?(e[0]=i[0],e[1]=i[1]):"touchend"===i.type?1===i.touches.length?(e[0]=i.touches[0],e[1]=i.changedTouches[0]):0===i.touches.length&&(e[0]=i.changedTouches[0],e[1]=i.changedTouches[1]):(e[0]=i.touches[0],e[1]=i.touches[1]),e},e.prototype._touchDistance=function(t){var i=this._getTouchPair(t),e=0,s=0;return i[0]&&void 0!==i[0].pageX&&i[1]&&void 0!==i[1].pageX&&(e=i[0].pageX-i[1].pageX),i[0]&&void 0!==i[0].pageY&&i[1]&&void 0!==i[1].pageY&&(s=i[0].pageY-i[1].pageY),{x:e,y:s}},e._CSS_ZOOM="wj-zoom",e._CSS_ZOOM_OVERLAY="wj-zoom-overlay",e._CSS_PANABLE="wj-panable",e._CSS_TOUCH_DISABLED="wj-flexchart-touch-disabled",e._CSS_BLOCK_INTERACTION="wj-block-other-interaction",e}();e.ChartGestures=a}(i.interaction||(i.interaction={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var t;(function(n){var i=function(n){function t(t,i){var r=n.call(this,t,i)||this;return r.__chart=t,r}return __extends(t,n),t.prototype.initialize=function(n){wijmo.copy(this,n);this.__chart.refresh()},t.prototype._copy=function(n,t){return n==="rangeChanged"?(typeof t=="function"&&this.rangeChanged.addHandler(t),!0):!1},t}(wijmo.chart.interaction.RangeSelector),t;n.RangeSelector=i;t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.chart.interaction.ChartGestures);n.ChartGestures=t})(t=n.interaction||(n.interaction={}))})(t=n.chart||(n.chart={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(t){var i;(function(t){var r=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.chart.interaction.RangeSelector),i;t.RangeSelector=r;i=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.chart.interaction.ChartGestures);t.ChartGestures=i})(i=t.interaction||(t.interaction={}))})(i=t.chart||(t.chart={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ChartGestures||(n.ChartGestures={}))})(t=n.interaction||(n.interaction={}))})(t=n.chart||(n.chart={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.RangeSelector||(n.RangeSelector={}))})(t=n.interaction||(n.interaction={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FlexChartCore||(n.FlexChartCore={}))})(t=n.chart||(n.chart={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FlexChartBase||(n.FlexChartBase={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FlexChart||(n.FlexChart={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Axis||(n.Axis={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.DataLabelBase||(n.DataLabelBase={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.DataLabel||(n.DataLabel={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.PieDataLabel||(n.PieDataLabel={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ChartTooltip||(n.ChartTooltip={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FlexPie||(n.FlexPie={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.HitTestInfo||(n.HitTestInfo={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.IRenderEngine||(n.IRenderEngine={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Legend||(n.Legend={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.LineMarker||(n.LineMarker={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.PlotArea||(n.PlotArea={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.SeriesBase||(n.SeriesBase={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Series||(n.Series={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.SeriesEventArgs||(n.SeriesEventArgs={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.RenderEventArgs||(n.RenderEventArgs={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.SeriesRenderingEventArgs||(n.SeriesRenderingEventArgs={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.DataLabelRenderEventArgs||(n.DataLabelRenderEventArgs={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.BoxWhisker||(n.BoxWhisker={}))})(t=n.analytics||(n.analytics={}))})(t=n.chart||(n.chart={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ErrorBar||(n.ErrorBar={}))})(t=n.analytics||(n.analytics={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FunctionSeries||(n.FunctionSeries={}))})(t=n.analytics||(n.analytics={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ParametricFunctionSeries||(n.ParametricFunctionSeries={}))})(t=n.analytics||(n.analytics={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.YFunctionSeries||(n.YFunctionSeries={}))})(t=n.analytics||(n.analytics={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.MovingAverage||(n.MovingAverage={}))})(t=n.analytics||(n.analytics={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.TrendLineBase||(n.TrendLineBase={}))})(t=n.analytics||(n.analytics={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.TrendLine||(n.TrendLine={}))})(t=n.analytics||(n.analytics={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Waterfall||(n.Waterfall={}))})(t=n.analytics||(n.analytics={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Sunburst||(n.Sunburst={}))})(t=n.hierarchical||(n.hierarchical={}))})(t=n.chart||(n.chart={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.TreeMap||(n.TreeMap={}))})(t=n.hierarchical||(n.hierarchical={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FlexRadar||(n.FlexRadar={}))})(t=n.radar||(n.radar={}))})(t=n.chart||(n.chart={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FlexRadarAxis||(n.FlexRadarAxis={}))})(t=n.radar||(n.radar={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FlexRadarSeries||(n.FlexRadarSeries={}))})(t=n.radar||(n.radar={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var wijmo;!function(t){!function(t){!function(t){"use strict"}(t.filter||(t.filter={}))}(t.grid||(t.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){!function(i){"use strict";var n=function(){function i(e){this._maxValues=250,this._sortValues=!0,this._col=e,this._bnd=e.binding?new t.Binding(e.binding):null}return Object.defineProperty(i.prototype,"showValues",{get:function(){return this._values},set:function(t){this._values=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filterText",{get:function(){return this._filterText},set:function(e){this._filterText=t.asString(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"maxValues",{get:function(){return this._maxValues},set:function(e){this._maxValues=t.asNumber(e,!1,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"uniqueValues",{get:function(){return this._uniqueValues},set:function(e){this._uniqueValues=t.asArray(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sortValues",{get:function(){return this._sortValues},set:function(e){this._sortValues=t.asBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dataMap",{get:function(){return this._map},set:function(i){this._map=t.asType(i,e.DataMap,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"column",{get:function(){return this._col},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isActive",{get:function(){return null!=this._values&&Object.keys(this._values).length>0},enumerable:!0,configurable:!0}),i.prototype.apply=function(e){var i=this.column;return!(this._bnd&&this._values&&Object.keys(this._values).length)||(e=this._bnd.getValue(e),e=this.dataMap?this.dataMap.getDisplayValue(e):i.dataMap?i.dataMap.getDisplayValue(e):t.Globalize.format(e,i.format),void 0!=this._values[e])},i.prototype.clear=function(){this.showValues=null,this.filterText=null},i.prototype.implementsInterface=function(t){return"IColumnFilter"==t},i.prototype._getUniqueValues=function(e,i){var n=[];if(this.uniqueValues){for(var r=this.uniqueValues,o=0;o<r.length;o++){d=r[o];n.push({value:d,text:d.toString()})}return n}var l={},a=e.collectionView,s=a?a.sourceCollection:[];if(i&&a&&a.sourceCollection&&a.filter){var c=this.showValues;this.showValues=null;for(var u=[],o=0;o<s.length;o++)a.filter(s[o])&&u.push(s[o]);s=u,this.showValues=c}for(o=0;o<s.length;o++){var d=e._binding.getValue(s[o]),p=this.dataMap?this.dataMap.getDisplayValue(d):e.dataMap?e.dataMap.getDisplayValue(d):t.Globalize.format(d,e.format);l[p]||(l[p]=!0,n.push({value:d,text:p}))}return n},i}();i.ValueFilter=n}(e.filter||(e.filter={}))}(t.grid||(t.grid={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){!function(e){"use strict";var i=function(i){function n(n,r){var o=i.call(this,n)||this;o._filter=t.asType(r,e.ValueFilter,!1);var l=o.getTemplate();if(o.applyTemplate("wj-control",l,{_divFilter:"div-filter",_cbSelectAll:"cb-select-all",_spSelectAll:"sp-select-all",_divValues:"div-values"}),o._cbSelectAll.tabIndex=0,t.setText(o._spSelectAll,t.culture.FlexGridFilter.selectAll),o._view=new t.collections.CollectionView,r.sortValues){var a=r.column.dataMap||r.dataMap?"text":"value",s=r.column.dataType!=t.DataType.Boolean;o._view.sortDescriptions.push(new t.collections.SortDescription(a,s))}return o._view.filter=o._filterValues.bind(o),o._view.collectionChanged.addHandler(o._updateSelectAllCheck,o),o._filterText="",o._cmbFilter=new t.input.ComboBox(o._divFilter,{placeholder:t.culture.FlexGridFilter.search}),o._lbValues=new t.input.ListBox(o._divValues,{displayMemberPath:"text",checkedMemberPath:"show",itemsSource:o._view,itemFormatter:function(e,i){return i||t.culture.FlexGridFilter.null}}),o._cmbFilter.textChanged.addHandler(o._filterTextChanged,o),o._cbSelectAll.addEventListener("click",o._cbSelectAllClicked.bind(o)),o.updateEditor(),o}return __extends(n,i),Object.defineProperty(n.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),n.prototype.updateEditor=function(){var t=this,e=this._filter.column,i=this._filter._getUniqueValues(e,!0);this._lbValues.isContentHtml=e.isContentHtml;var n=this._filter.showValues;if(n&&0!=Object.keys(n).length){for(var r in n)for(o=0;o<i.length;o++)if(i[o].text==r){i[o].show=!0;break}}else for(var o=0;o<i.length;o++)i[o].show=!0;this._view.pageSize=20,this._view.sourceCollection=i,this._view.moveCurrentTo(null),setTimeout(function(){t._view.pageSize=t._filter.maxValues,t._cmbFilter.text=t._filter.filterText,t._filterText=t._cmbFilter.text.toLowerCase()})},n.prototype.clearEditor=function(){this._cmbFilter.text="",this._filterText="",this._view.pageSize=0,this._view.refresh();for(var t=this._view.items,e=0;e<t.length;e++)t[e].show=!1;this._view.pageSize=this._filter.maxValues},n.prototype.updateFilter=function(){var t=null,e=this._view.items;if(this._filterText||this._cbSelectAll.indeterminate){t={};for(var i=0;i<e.length;i++){var n=e[i];n.show&&(t[n.text]=!0)}}this._filter.showValues=t,this._filter.filterText=""},n.prototype._filterTextChanged=function(){var t=this;this._toText&&clearTimeout(this._toText),this._toText=setTimeout(function(){var e=t._cmbFilter.text.toLowerCase(),i=e!=t._filterText;t._filterText=e,t._view.refresh(),i&&(t._cbSelectAll.checked=!0,t._cbSelectAllClicked())},300)},n.prototype._filterValues=function(t){return!this._filterText||!(!t||!t.text)&&t.text.toLowerCase().indexOf(this._filterText)>-1},n.prototype._cbSelectAllClicked=function(){for(var t=this._cbSelectAll.checked,e=this._view.items,i=0;i<e.length;i++)e[i].show=t;this._view.refresh()},n.prototype._updateSelectAllCheck=function(){for(var t=0,e=this._view.items,i=0;i<e.length;i++)e[i].show&&t++;0==t?(this._cbSelectAll.checked=!1,this._cbSelectAll.indeterminate=!1):t==e.length?(this._cbSelectAll.checked=!0,this._cbSelectAll.indeterminate=!1):this._cbSelectAll.indeterminate=!0},n.controlTemplate='<div><div wj-part="div-filter"></div><div class="wj-listbox-item"><label><input wj-part="cb-select-all" type="checkbox"> <span wj-part="sp-select-all"></span></label></div><div wj-part="div-values"></div></div>',n}(t.Control);e.ValueFilterEditor=i}(e.filter||(e.filter={}))}(t.grid||(t.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){!function(i){"use strict";var n=function(){function n(e){this._c1=new i.FilterCondition(this),this._c2=new i.FilterCondition(this),this._and=!0,this._col=e,this._bnd=e.binding?new t.Binding(e.binding):null}return Object.defineProperty(n.prototype,"condition1",{get:function(){return this._c1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"condition2",{get:function(){return this._c2},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"and",{get:function(){return this._and},set:function(e){this._and=t.asBoolean(e),this._bnd=this._col&&this._col.binding?new t.Binding(this._col.binding):null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dataMap",{get:function(){return this._map},set:function(i){this._map=t.asType(i,e.DataMap,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"column",{get:function(){return this._col},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isActive",{get:function(){return this._c1.isActive||this._c2.isActive},enumerable:!0,configurable:!0}),n.prototype.apply=function(e){var i=this._col,n=this._c1,r=this._c2;if(!this._bnd||!this.isActive)return!0;e=this._bnd.getValue(e),i.dataMap?e=i.dataMap.getDisplayValue(e):t.isDate(e)?(t.isString(n.value)||t.isString(r.value))&&(e=t.Globalize.format(e,i.format)):t.isNumber(e)&&(e=t.Globalize.parseFloat(t.Globalize.format(e,i.format)));var o=n.apply(e),l=r.apply(e);return n.isActive&&r.isActive?this._and?o&&l:o||l:n.isActive?o:!r.isActive||l},n.prototype.clear=function(){this._c1.clear(),this._c2.clear(),this.and=!0},n.prototype.implementsInterface=function(t){return"IColumnFilter"==t},n}();i.ConditionFilter=n}(e.filter||(e.filter={}))}(t.grid||(t.grid={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){!function(e){"use strict";var i=function(i){function n(n,r){var o=i.call(this,n)||this;o._filter=t.asType(r,e.ConditionFilter,!1);var l=o.getTemplate();o.applyTemplate("wj-control",l,{_divHdr:"div-hdr",_divCmb1:"div-cmb1",_divVal1:"div-val1",_btnAnd:"btn-and",_btnOr:"btn-or",_spAnd:"sp-and",_spOr:"sp-or",_divCmb2:"div-cmb2",_divVal2:"div-val2"});var a=t.culture.FlexGridFilter;t.setText(o._divHdr,a.header),t.setText(o._spAnd,a.and),t.setText(o._spOr,a.or),o._cmb1=o._createOperatorCombo(o._divCmb1),o._cmb2=o._createOperatorCombo(o._divCmb2),o._val1=o._createValueInput(o._divVal1),o._val2=o._createValueInput(o._divVal2);var s=o.hostElement;return o.addEventListener(s,"change",o._btnAndOrChanged.bind(o)),o.addEventListener(s,"keydown",o._keydown.bind(o)),o.updateEditor(),o}return __extends(n,i),Object.defineProperty(n.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),n.prototype.updateEditor=function(){var e=this._filter.condition1,i=this._filter.condition2;this._cmb1.selectedValue=e.operator,this._cmb2.selectedValue=i.operator,this._val1 instanceof t.input.ComboBox?(this._val1.text=t.changeType(e.value,t.DataType.String,null),this._val2.text=t.changeType(i.value,t.DataType.String,null)):(this._val1.value=e.value,this._val2.value=i.value);var n=this._filter.and;this._checkRadio(this._btnAnd,n),this._checkRadio(this._btnOr,!n)},n.prototype.clearEditor=function(){this._cmb1.selectedValue=this._cmb2.selectedValue=null,this._val1.text=this._val2.text=null,this._checkRadio(this._btnAnd,!0),this._checkRadio(this._btnOr,!1)},n.prototype.updateFilter=function(){var e=this._filter.column,i=this._filter.condition1,n=this._filter.condition2;if(i.operator=this._cmb1.selectedValue,n.operator=this._cmb2.selectedValue,this._val1 instanceof t.input.ComboBox){var r=e.dataType==t.DataType.Date?t.DataType.String:e.dataType;i.value=t.changeType(this._val1.text,r,e.format),n.value=t.changeType(this._val2.text,r,e.format)}else i.value=this._val1.value,n.value=this._val2.value;this._filter.and=this._btnAnd.checked},n.prototype._createOperatorCombo=function(e){var i=this._filter.column,n=t.culture.FlexGridFilter.stringOperators;i.dataType!=t.DataType.Date||this._isTimeFormat(i.format)?i.dataType!=t.DataType.Number||i.dataMap?i.dataType!=t.DataType.Boolean||i.dataMap||(n=t.culture.FlexGridFilter.booleanOperators):n=t.culture.FlexGridFilter.numberOperators:n=t.culture.FlexGridFilter.dateOperators;var r=new t.input.ComboBox(e);return r.itemsSource=n,r.displayMemberPath="name",r.selectedValuePath="op",r},n.prototype._createValueInput=function(e){var i=this._filter.column,n=this._filter.dataMap||i.dataMap,r=null;return i.dataType!=t.DataType.Date||this._isTimeFormat(i.format)?i.dataType!=t.DataType.Number||n?(r=new t.input.ComboBox(e),n?(r.itemsSource=n.getDisplayValues(),r.isEditable=!0):i.dataType==t.DataType.Boolean&&(r.itemsSource=[!0,!1])):(r=new t.input.InputNumber(e)).format=i.format:(r=new t.input.InputDate(e)).format=i.format,r.isRequired=!1,r},n.prototype._isTimeFormat=function(e){return!!e&&(e=t.culture.Globalize.calendar.patterns[e]||e,/[Hmst]+/.test(e))},n.prototype._btnAndOrChanged=function(t){var e=t.target==this._btnAnd,i=t.target==this._btnOr;(e||i)&&(this._checkRadio(this._btnAnd,e),this._checkRadio(this._btnOr,i))},n.prototype._checkRadio=function(t,e){t.checked=e,t.setAttribute("aria-checked",e.toString()),t.setAttribute("tabindex",e?"1":"-1")},n.prototype._keydown=function(e){var i=e.target==this._btnAnd,n=e.target==this._btnOr;if(i||n)switch(e.keyCode){case t.Key.Left:case t.Key.Right:case t.Key.Up:case t.Key.Down:var r=i?this._btnOr:this._btnAnd;r.click(),r.focus(),e.preventDefault()}},n.controlTemplate='<div><div wj-part="div-hdr"></div><div wj-part="div-cmb1"></div><br/><div wj-part="div-val1"></div><br/><div role="radiogroup" style="text-align:center"><label><input wj-part="btn-and" type="radio" role="radio"> <span wj-part="sp-and"></span> </label>&nbsp;&nbsp;&nbsp;<label><input wj-part="btn-or" type="radio" role="radio"> <span wj-part="sp-or"></span> </label></div><div wj-part="div-cmb2"></div><br/><div wj-part="div-val2"></div><br/></div>',n}(t.Control);e.ConditionFilterEditor=i}(e.filter||(e.filter={}))}(t.grid||(t.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){!function(e){"use strict";var i=function(){function e(t){this._op=null,this._filter=t}return Object.defineProperty(e.prototype,"operator",{get:function(){return this._op},set:function(e){this._op=t.asEnum(e,n,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._val},set:function(e){if(this._val=e,this._strVal=t.isString(e)?e.toString().toLowerCase():null,this._mapVal=null,this._filter){var i=this._filter.dataMap||this._filter.column.dataMap;i&&(this._mapVal=i.getDisplayValue(e),t.isString(this._mapVal)&&(this._strVal=this._mapVal=this._mapVal.toLowerCase()))}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isActive",{get:function(){switch(this._op){case null:return!1;case n.EQ:case n.NE:return!0;default:return null!=this._val||null!=this._strVal}},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.operator=null,this.value=null},e.prototype.apply=function(e){var i=this._mapVal||this._strVal||this._val;switch(t.isString(e)&&(e=e.toLowerCase()),t.isString(i)&&null==e&&(e=""),this._op){case null:return!0;case n.EQ:return t.isDate(e)&&t.isDate(i)?t.DateTime.sameDate(e,i):e==i;case n.NE:return e!=i;case n.GT:return e>i;case n.GE:return e>=i;case n.LT:return e<i;case n.LE:return e<=i;case n.BW:return!(!this._strVal||!t.isString(e))&&0==e.indexOf(this._strVal);case n.EW:return!!(this._strVal&&t.isString(e)&&e.length>=this._strVal.length)&&e.substr(e.length-this._strVal.length)==i;case n.CT:return!(!this._strVal||!t.isString(e))&&e.indexOf(this._strVal)>-1;case n.NC:return!(!this._strVal||!t.isString(e))&&e.indexOf(this._strVal)<0}throw"Unknown operator"},e}();e.FilterCondition=i;var n;!function(t){t[t.EQ=0]="EQ",t[t.NE=1]="NE",t[t.GT=2]="GT",t[t.GE=3]="GE",t[t.LT=4]="LT",t[t.LE=5]="LE",t[t.BW=6]="BW",t[t.EW=7]="EW",t[t.CT=8]="CT",t[t.NC=9]="NC"}(n=e.Operator||(e.Operator={}))}(e.filter||(e.filter={}))}(t.grid||(t.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){!function(e){"use strict";var i=function(){function i(t,i){this._owner=t,this._col=i,this._valueFilter=new e.ValueFilter(i),this._conditionFilter=new e.ConditionFilter(i)}return Object.defineProperty(i.prototype,"filterType",{get:function(){return null!=this._filterType?this._filterType:this._owner.defaultFilterType},set:function(i){if((i=t.asEnum(i,e.FilterType,!0))!=this._filterType){var n=this.isActive;this.clear(),this._filterType=i,n?this._owner.apply():this._col.grid&&this._col.grid.invalidate()}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dataMap",{get:function(){return this.conditionFilter.dataMap||this.valueFilter.dataMap},set:function(t){this.conditionFilter.dataMap=t,this.valueFilter.dataMap=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"valueFilter",{get:function(){return this._valueFilter},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"conditionFilter",{get:function(){return this._conditionFilter},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"column",{get:function(){return this._col},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isActive",{get:function(){return this._conditionFilter.isActive||this._valueFilter.isActive},enumerable:!0,configurable:!0}),i.prototype.apply=function(t){return this._conditionFilter.apply(t)&&this._valueFilter.apply(t)},i.prototype.clear=function(){this._valueFilter.clear(),this._conditionFilter.clear()},i.prototype.implementsInterface=function(t){return"IColumnFilter"==t},i}();e.ColumnFilter=i}(e.filter||(e.filter={}))}(t.grid||(t.grid={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(t){!function(e){!function(i){"use strict";t.culture.FlexGridFilter=window.wijmo.culture.FlexGridFilter||{ascending:"↑ Ascending",descending:"↓ Descending",apply:"Apply",cancel:"Cancel",clear:"Clear",conditions:"Filter by Condition",values:"Filter by Value",search:"Search",selectAll:"Select All",null:"(nothing)",header:"Show items where the value",and:"And",or:"Or",stringOperators:[{name:"(not set)",op:null},{name:"Equals",op:i.Operator.EQ},{name:"Does not equal",op:i.Operator.NE},{name:"Begins with",op:i.Operator.BW},{name:"Ends with",op:i.Operator.EW},{name:"Contains",op:i.Operator.CT},{name:"Does not contain",op:i.Operator.NC}],numberOperators:[{name:"(not set)",op:null},{name:"Equals",op:i.Operator.EQ},{name:"Does not equal",op:i.Operator.NE},{name:"Is Greater than",op:i.Operator.GT},{name:"Is Greater than or equal to",op:i.Operator.GE},{name:"Is Less than",op:i.Operator.LT},{name:"Is Less than or equal to",op:i.Operator.LE}],dateOperators:[{name:"(not set)",op:null},{name:"Equals",op:i.Operator.EQ},{name:"Is Before",op:i.Operator.LT},{name:"Is After",op:i.Operator.GT}],booleanOperators:[{name:"(not set)",op:null},{name:"Equals",op:i.Operator.EQ},{name:"Does not equal",op:i.Operator.NE}]};var n=function(n){function r(e,r,o){void 0===o&&(o=!0);var l=n.call(this,e,null,!0)||this;l.filterChanged=new t.Event,l.buttonClicked=new t.Event,l._filter=t.asType(r,i.ColumnFilter);var a=l.getTemplate();l.applyTemplate("wj-control wj-content wj-columnfiltereditor",a,{_divSort:"div-sort",_btnAsc:"btn-asc",_btnDsc:"btn-dsc",_divType:"div-type",_aVal:"a-val",_aCnd:"a-cnd",_divEdtVal:"div-edt-val",_divEdtCnd:"div-edt-cnd",_btnApply:"btn-apply",_btnCancel:"btn-cancel",_btnClear:"btn-clear"});var s=t.culture.FlexGridFilter;t.setText(l._btnAsc,s.ascending),t.setText(l._btnDsc,s.descending),t.setText(l._aVal,s.values),t.setText(l._aCnd,s.conditions),t.setText(l._btnApply,s.apply),t.setText(l._btnCancel,s.cancel),t.setText(l._btnClear,s.clear);var c=l.filter.conditionFilter.isActive||0==(r.filterType&i.FilterType.Value)?i.FilterType.Condition:i.FilterType.Value;l._showFilter(c);var u=l.filter.column.grid.collectionView;o&&u&&u.canSort||(l._divSort.style.display="none");var d=l._btnClicked.bind(l);return l._btnApply.addEventListener("click",d),l._btnCancel.addEventListener("click",d),l._btnClear.addEventListener("click",d),l._btnAsc.addEventListener("click",d),l._btnDsc.addEventListener("click",d),l._aVal.addEventListener("click",d),l._aCnd.addEventListener("click",d),l.hostElement.addEventListener("keydown",function(e){if(!e.defaultPrevented)switch(e.keyCode){case t.Key.Enter:switch(e.target.tagName){case"A":case"BUTTON":l._btnClicked(e);break;default:l.updateFilter(),l.onFilterChanged(),l.onButtonClicked()}e.preventDefault();break;case t.Key.Escape:l.onButtonClicked(),e.preventDefault();break;case t.Key.Tab:t.moveFocus(l.hostElement,e.shiftKey?-1:1),e.preventDefault()}}),l}return __extends(r,n),Object.defineProperty(r.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),r.prototype.updateEditor=function(){this._edtVal&&this._edtVal.updateEditor(),this._edtCnd&&this._edtCnd.updateEditor()},r.prototype.updateFilter=function(){switch(this._getFilterType()){case i.FilterType.Value:this._edtVal.updateFilter(),this.filter.conditionFilter.clear();break;case i.FilterType.Condition:this._edtCnd.updateFilter(),this.filter.valueFilter.clear()}},r.prototype.onFilterChanged=function(t){this.filterChanged.raise(this,t)},r.prototype.onButtonClicked=function(t){this.buttonClicked.raise(this,t)},r.prototype._handleResize=function(){this.isTouching||this._wasTouching||this.onButtonClicked()},r.prototype._showFilter=function(t){switch(this._wasTouching=this.isTouching,t==i.FilterType.Value&&null==this._edtVal&&(this._edtVal=new i.ValueFilterEditor(this._divEdtVal,this.filter.valueFilter)),t==i.FilterType.Condition&&null==this._edtCnd&&(this._edtCnd=new i.ConditionFilterEditor(this._divEdtCnd,this.filter.conditionFilter)),0!=(t&this.filter.filterType)&&(t==i.FilterType.Value?(this._divEdtVal.style.display="",this._divEdtCnd.style.display="none",this._enableLink(this._aVal,!1),this._enableLink(this._aCnd,!0),this._edtVal.focus()):(this._divEdtVal.style.display="none",this._divEdtCnd.style.display="",this._enableLink(this._aVal,!0),this._enableLink(this._aCnd,!1),this._edtCnd.focus())),this.filter.filterType){case i.FilterType.None:case i.FilterType.Condition:case i.FilterType.Value:this._divType.style.display="none";break;default:this._divType.style.display=""}},r.prototype._enableLink=function(e,i){t.setCss(e,{textDecoration:i?"":"none",fontWeight:i?"":"bold",color:i?"":"inherit"}),t.toggleClass(e,"wj-state-disabled",!i),t.setAttribute(e,"href",i?"":null),t.setAttribute(e,"disabled",i?null:"disabled")},r.prototype._getFilterType=function(){var t=e.filter.FilterType;return"none"!=this._divEdtVal.style.display?t.Value:t.Condition},r.prototype._btnClicked=function(e){if(e.preventDefault(),e.stopPropagation(),!t.hasClass(e.target,"wj-state-disabled")){if(e.target==this._aVal)return this._showFilter(i.FilterType.Value),void t.moveFocus(this._edtVal.hostElement,0);if(e.target==this._aCnd)return this._showFilter(i.FilterType.Condition),void t.moveFocus(this._edtCnd.hostElement,0);if(e.target==this._btnAsc||e.target==this._btnDsc){var n=this.filter.column,r=n.sortMemberPath?n.sortMemberPath:n.binding,o=n.grid.collectionView,l=new t.collections.SortDescription(r,e.target==this._btnAsc);o.sortDescriptions.deferUpdate(function(){o.sortDescriptions.clear(),o.sortDescriptions.push(l)})}e.target==this._btnApply?(this.updateFilter(),this.onFilterChanged()):e.target==this._btnClear?this.filter.isActive&&(this.filter.clear(),this.onFilterChanged()):this.updateEditor(),this.onButtonClicked()}},r.controlTemplate='<div><div wj-part="div-sort"><a wj-part="btn-asc" class="wj-btn" href="" style="min-width:95px" draggable="false"></a>&nbsp;&nbsp;&nbsp;<a wj-part="btn-dsc" class="wj-btn" href="" style="min-width:95px" draggable="false"></a></div><div style="text-align:right;margin:10px 0px;font-size:80%"><div wj-part="div-type"><a wj-part="a-cnd" href="" draggable="false"></a>&nbsp;|&nbsp;<a wj-part="a-val" href="" draggable="false"></a></div></div><div wj-part="div-edt-val" tabindex="-1"></div><div wj-part="div-edt-cnd" tabindex="-1"></div><div style="text-align:right;margin-top:10px"><a wj-part="btn-apply" class="wj-btn" href="" draggable="false"></a>&nbsp;&nbsp;<a wj-part="btn-cancel" class="wj-btn" href="" draggable="false"></a>&nbsp;&nbsp;<a wj-part="btn-clear" class="wj-btn" href="" draggable="false"></a></div>',r}(t.Control);i.ColumnFilterEditor=n}(e.filter||(e.filter={}))}(t.grid||(t.grid={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){!function(i){"use strict";var n;!function(t){t[t.None=0]="None",t[t.Condition=1]="Condition",t[t.Value=2]="Value",t[t.Both=3]="Both"}(n=i.FilterType||(i.FilterType={}));var r=function(){function r(i,r){this._showIcons=!0,this._showSort=!0,this._defFilterType=n.Both,this.filterApplied=new t.Event,this.filterChanging=new t.Event,this.filterChanged=new t.Event;var o="Missing dependency: FlexGridFilter requires ";t.assert(null!=t.grid,o+"wijmo.grid."),t.assert(null!=t.input,o+"wijmo.input."),this._filters=[],this._g=t.asType(i,e.FlexGrid,!1),this._g.formatItem.addHandler(this._formatItem.bind(this)),this._g.itemsSourceChanged.addHandler(this.clear.bind(this));var l=this._g.hostElement;i.addEventListener(l,"mousedown",this._mousedown.bind(this),!0),i.addEventListener(l,"click",this._click.bind(this),!0),i.addEventListener(l,"keydown",this._keydown.bind(this),!0),this._g.invalidate(),r&&t.copy(this,r)}return Object.defineProperty(r.prototype,"grid",{get:function(){return this._g},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"filterColumns",{get:function(){return this._filterColumns},set:function(e){this._filterColumns=t.asArray(e),this.clear()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"showFilterIcons",{get:function(){return this._showIcons},set:function(e){e!=this.showFilterIcons&&(this._showIcons=t.asBoolean(e),this._g&&this._g.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"showSortButtons",{get:function(){return this._showSort},set:function(e){this._showSort=t.asBoolean(e)},enumerable:!0,configurable:!0}),r.prototype.getColumnFilter=function(t,e){void 0===e&&(e=!0),t=this._asColumn(t);for(var n=0;n<this._filters.length;n++)if(this._filters[n].column==t)return this._filters[n];if(e&&t.binding){var r=new i.ColumnFilter(this,t);return this._filters.push(r),r}return null},Object.defineProperty(r.prototype,"defaultFilterType",{get:function(){return this._defFilterType},set:function(e){(e=t.asEnum(e,n,!1))!=this.defaultFilterType&&(this._defFilterType=e,this._g.invalidate(),this.clear())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"filterDefinition",{get:function(){for(var t={defaultFilterType:this.defaultFilterType,filters:[]},e=0;e<this._filters.length;e++){var i=this._filters[e];if(i&&i.column&&i.column.binding)if(i.conditionFilter.isActive){var n=i.conditionFilter;t.filters.push({binding:i.column.binding,type:"condition",condition1:{operator:n.condition1.operator,value:n.condition1.value},and:n.and,condition2:{operator:n.condition2.operator,value:n.condition2.value}})}else if(i.valueFilter.isActive){var r=i.valueFilter;t.filters.push({binding:i.column.binding,type:"value",filterText:r.filterText,showValues:r.showValues})}}return JSON.stringify(t)},set:function(e){if(e=t.asString(e),this.clear(),e){var i=JSON.parse(e);this.defaultFilterType=i.defaultFilterType;for(var n=0;n<i.filters.length;n++){var r=i.filters[n],o=this._g.getColumn(r.binding),l=this.getColumnFilter(o,!0);if(l)switch(r.type){case"condition":var a=l.conditionFilter;a.condition1.value=o.dataType==t.DataType.Date?t.changeType(r.condition1.value,o.dataType,null):r.condition1.value,a.condition1.operator=r.condition1.operator,a.and=r.and,a.condition2.value=o.dataType==t.DataType.Date?t.changeType(r.condition2.value,o.dataType,null):r.condition2.value,a.condition2.operator=r.condition2.operator;break;case"value":var s=l.valueFilter;s.filterText=r.filterText,s.showValues=r.showValues}}}this.apply()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"activeEditor",{get:function(){return t.Control.getControl(this._divEdt)},enumerable:!0,configurable:!0}),r.prototype.editColumnFilter=function(n,r){var o=this;this.closeEditor(),n=this._asColumn(n);var l=document.createElement("div"),a=this.getColumnFilter(n),s=new i.ColumnFilterEditor(l,a,this.showSortButtons);t.addClass(l,"wj-dropdown-panel"),l.setAttribute("role","dialog"),this._divEdt=l,this._edtCol=n;var c=new e.CellRangeEventArgs(this._g.cells,new e.CellRange(-1,n.index));if(this.onFilterChanging(c)){c.cancel=!0,this._g.rightToLeft&&(l.dir="rtl"),s.filterChanged.addHandler(function(){c.cancel=!1,setTimeout(function(){c.cancel||o.apply()})}),s.buttonClicked.addHandler(function(){o.closeEditor(),o._g.focus(),o.onFilterChanged(c)}),s.lostFocus.addHandler(function(){setTimeout(function(){var e=t.Control.getControl(o._divEdt);e&&!e.containsFocus()&&o.closeEditor()},10)});var u=this._g;u._edtHdl._commitRowEdits(),u.scrollIntoView(-1,n.index,!0);var d=this._g.columnHeaders,p=r?r.row:d.rows.length-1,h=r?r.col:n.index,f=d.getCellBoundingRect(p,h),_=d.getCellElement(p,h);_?t.showPopup(l,_,!1,!1,!1):t.showPopup(l,f),s.focus()}else this._divEdt=this._edtCol=null},r.prototype.closeEditor=function(){if(this._divEdt){var e=t.Control.getControl(this._divEdt);e&&t.hidePopup(e.hostElement,function(){e.dispose()}),this._divEdt=null,this._edtCol=null}},r.prototype.apply=function(){var e=this._g.collectionView;if(e){var i=this._g.editableCollectionView;i&&(i.commitEdit(),i.commitNew()),e.filter?e.refresh():e.filter=this._filter.bind(this)}var n=e?e.updateFilterDefinition:null;t.isFunction(n)&&n.call(e,this),this.onFilterApplied()},r.prototype.clear=function(){this._filters.length&&(this._filters=[],this.apply())},r.prototype.onFilterApplied=function(t){this.filterApplied.raise(this,t)},r.prototype.onFilterChanging=function(t){return this.filterChanging.raise(this,t),!t.cancel},r.prototype.onFilterChanged=function(t){this.filterChanged.raise(this,t)},r.prototype._asColumn=function(i){return t.isString(i)?this._g.getColumn(i):t.isNumber(i)?this._g.columns[i]:t.asType(i,e.Column,!1)},r.prototype._filter=function(t){for(var e=0;e<this._filters.length;e++)if(!this._filters[e].apply(t))return!1;return!0},r.prototype._formatItem=function(i,o){if(o.panel.cellType==e.CellType.ColumnHeader){var l=this._g,a=l.getMergedRange(o.panel,o.row,o.col)||new e.CellRange(o.row,o.col),s=l.columns[a.col],c=l._getBindingColumn(o.panel,o.row,s);if(a.row2==o.panel.rows.length-1||s!=c){var u=this.getColumnFilter(c,this.defaultFilterType!=n.None);if(this._filterColumns&&this._filterColumns.indexOf(c.binding)<0&&(u=null),u&&u.filterType!=n.None){if(this._showIcons){r._filterGlyph||(r._filterGlyph=t.createElement('<div role="button" class="'+r._WJC_FILTER+'"><span class="wj-glyph-filter"></span></div> '));var d=o.cell.querySelector("div")||o.cell;d.querySelector(".wj-glyph-filter")||d.insertBefore(r._filterGlyph.cloneNode(!0),d.firstChild)}t.toggleClass(o.cell,"wj-filter-on",u.isActive),t.toggleClass(o.cell,"wj-filter-off",!u.isActive)}else t.removeClass(o.cell,"wj-filter-on"),t.removeClass(o.cell,"wj-filter-off")}}},r.prototype._mousedown=function(t){this._toggleEditor(t)&&(this._tmd=!0,t.stopPropagation(),t.preventDefault())},r.prototype._click=function(t){(this._tmd||this._toggleEditor(t))&&(t.stopPropagation(),t.preventDefault()),this._tmd=!1},r.prototype._toggleEditor=function(i){var n=this;if(this._tmd=!1,!i.defaultPrevented&&0==i.button)if(t.closestClass(i.target,r._WJC_FILTER)){var o=this._g,l=new e.HitTestInfo(i.target,null);if(l.panel||(l=o.hitTest(i,!0)),l.panel==o.columnHeaders){var a=o.columns[l.col],s=o._getBindingColumn(l.panel,l.row,a);return this._divEdt&&this._edtCol==s?(this.closeEditor(),o.focus()):setTimeout(function(){n.editColumnFilter(s,l)},this._divEdt?100:0),!0}}else this.closeEditor();return!1},r.prototype._keydown=function(e){if(!e.defaultPrevented&&!e.ctrlKey&&e.altKey&&(e.keyCode==t.Key.Down||e.keyCode==t.Key.Up)){var i=this.grid.selection,n=i.col>-1?this.grid.columns[i.col]:null;n&&!n.dataMap&&this.getColumnFilter(n,!0)&&(this.editColumnFilter(n),e.preventDefault(),e.stopPropagation())}},r._WJC_FILTER="wj-elem-filter",r}();i.FlexGridFilter=r}(e.filter||(e.filter={}))}(t.grid||(t.grid={}))}(wijmo||(wijmo={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.grid.filter.FlexGridFilter);n.FlexGridFilter=t})(t=n.filter||(n.filter={}))})(t=n.grid||(n.grid={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(i){var r;(function(i){var r="__trueTypeShowValues",f=function(n,t){return n[r]=t},e=function(n){return n[r]},u="__columnData",o=function(n,t){return n[u]=t},s=function(n){return n[u]||[]},h=function(i){function r(n){var t=i.call(this,n)||this;return t._flexGrid=wijmo.asType(n,wijmo.grid.FlexGrid,!1),t._addHandlers(),t._flexGrid.itemsSourceChanged.addHandler(function(){t._removeHandlers();t._addHandlers()}),t}return __extends(r,i),r.prototype._addHandlers=function(){this._collectionView=wijmo.asType(this._flexGrid.collectionView,n.mvc.collections.RemoteCollectionView,!0);this._collectionView&&this._collectionView._isDisableServerRead&&!this._collectionView._isDisableServerRead()&&this._collectionView.queryData.addHandler(this._collectFilters,this)},r.prototype._removeHandlers=function(){this._collectionView&&this._collectionView.queryData.removeHandler(this._collectFilters,this)},r.prototype.initialize=function(n){var r=this,t,u,i;if(n&&(t=n.columnFilters,delete n.columnFilters,wijmo.copy(r,n),t))for(u=t.length,i=0;i<u;i++)r._createColumnFilter(t[i])},r.prototype._createColumnFilter=function(n){var t=this,i=t.getColumnFilter(t._getColumn(n.column),!0);return i.filterType=n.filterType,t._updateValueFilter(i.valueFilter,n.valueFilter),i},r.prototype._updateValueFilter=function(n,t){t&&wijmo.copy(n,t)},r.prototype._shouldGetAllColumnData=function(n){var i=this,t=i._collectionView,r=i.getColumnFilter(n),u=r.filterType;return u&wijmo.grid.filter.FilterType.Value&&t&&t._isDisableServerRead&&!t._isDisableServerRead()&&!r.valueFilter.uniqueValues},r.prototype.editColumnFilter=function(n,t){var c=this,u,r,l,y=[],e,s,w=c._collectionView,a,h,p,v;if((i.prototype.editColumnFilter.call(this,n,t),u=document.body.getElementsByClassName("wj-columnfiltereditor")[0],u)&&(l=wijmo.Control.getControl('.wj-columnfiltereditor [wj-part="div-edt-val"] [wj-part="div-values"]'),l)){if(r=l.itemsSource,h=function(){f(s,r.items)},v=function(n){n===undefined&&(n=[],r.sourceCollection&&r.sourceCollection.forEach(function(t){return n.push(t.value)}));o(s,n)},s=c.getColumnFilter(n),a=wijmo.Control.getControl('.wj-columnfiltereditor [wj-part="div-edt-val"] [wj-part="div-filter"]'),a&&a.textChanged.addHandler(function(){setTimeout(h,500)}),!c._shouldGetAllColumnData(n)){h();v();return}p=u.style.left;u.style.left="-9999px";e=s.valueFilter.showValues;w.getColumnData(n.binding,!0,function(t){t.columnData.forEach(function(t){var u=n.dataMap?n.dataMap.getDisplayValue(t):wijmo.Globalize.format(t,n.format),i,r;if(i={value:t,text:u},e&&Object.keys(e).length!==0)for(r in e)i.text===r&&(i.show=!0);else i.show=!0;y.push(i)});v(t.columnData);r.sourceCollection=y;h();r.moveCurrentToPosition(-1);u.style.left=p})}},r.prototype._getColumn=function(n){for(var u=this,r=u._flexGrid._getBindingColumns(),f=r.length,i,n=n.toLowerCase(),t=0;t<f;t++)if(i=r[t],i.name&&i.name.toLowerCase()===n)return i;for(t=0;t<r.length;t++)if(i=r[t],i.binding&&i.binding.toLowerCase()===n)return i},r.prototype._getServerComponentName=function(){return"FlexGridFilter"},r.prototype._collectFilters=function(n,t){t.extraRequestData==null&&(t.extraRequestData={});t.extraRequestData[this._getServerComponentName()]=this._getFilterSettings()},r.prototype._getFilterSettings=function(){for(var i=this,r=i._flexGrid._getBindingColumns(),f=r.length,u=[],t,n=0;n<f;n++)t=i.getColumnFilter(r[n],!1),t&&t.isActive&&u.push(i._getColumnFilterSetting(t));return u},r.prototype._getColumnFilterSetting=function(t){var i=t.column,u=this,r={};if(i.binding)return r.column=i.binding,r.format=i.format,t.conditionFilter.isActive&&n.mvc.Utils.extend(r,{conditionFilter:{and:t.conditionFilter.and,condition1:u._getConditionSetting(t.conditionFilter.condition1,i),condition2:u._getConditionSetting(t.conditionFilter.condition2,i)}}),t.valueFilter.isActive&&n.mvc.Utils.extend(r,{valueFilter:{showValues:u._getShowValues(t)}}),r},r.prototype._getShowValues=function(n){var t=[],r,f=e(n),u,o,h,c,i,l;if(f)for(r=0;r<f.length;r++)u=f[r],u&&u.show&&t.push(u.value);if(t.length||(t=s(n)),o=n.column,o.dataType===wijmo.DataType.Date)for(h=this._getDateKind(o),c=t.length,i=0;i<c;i++)l=t[i],l&&(t[i].dateKind=h);return t},r.prototype._getDateKind=function(n){if(n.dataType===wijmo.DataType.Date){var i=n.binding?new wijmo.Binding(n.binding):null;if(i!=null)return this._collectionView._dataInfo!=null?i.getValue(this._collectionView._dataInfo):t.DateKind.Unspecified}},r.prototype._getConditionSetting=function(n,t){var i=n.value;return t.dataType===wijmo.DataType.Boolean?i=wijmo.changeType(i,wijmo.DataType.Boolean,null):t.dataType===wijmo.DataType.Date&&i instanceof Date&&(i.dateKind=this._getDateKind(t)),{operator:n.operator,value:i}},r}(n.grid.filter.FlexGridFilter);i.FlexGridFilter=h})(r=i.filter||(i.filter={}))})(i=t.grid||(t.grid={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ConditionFilter||(n.ConditionFilter={}))})(t=n.filter||(n.filter={}))})(t=n.grid||(n.grid={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ValueFilter||(n.ValueFilter={}))})(t=n.filter||(n.filter={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ColumnFilter||(n.ColumnFilter={}))})(t=n.filter||(n.filter={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FlexGridFilter||(n.FlexGridFilter={}))})(t=n.filter||(n.filter={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FilterCondition||(n.FilterCondition={}))})(t=n.filter||(n.filter={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ColumnFilterEditor||(n.ColumnFilterEditor={}))})(t=n.filter||(n.filter={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ConditionFilterEditor||(n.ConditionFilterEditor={}))})(t=n.filter||(n.filter={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ValueFilterEditor||(n.ValueFilterEditor={}))})(t=n.filter||(n.filter={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),wijmo;!function(e){!function(t){!function(i){"use strict";var r=function(i){function r(r,n){var o=i.call(this,r)||this;o._hideGroupedCols=!0,o._maxGroups=6,o._hiddenCols=[];e.assert(null!=t,"Missing dependency: GroupPanel requires wijmo.grid.");var s=o.getTemplate();o.applyTemplate("wj-grouppanel wj-control",s,{_divMarkers:"div-markers",_divPH:"div-ph"});var a=o.hostElement;return o.addEventListener(a,"dragstart",o._dragStart.bind(o)),o.addEventListener(a,"dragover",o._dragOver.bind(o)),o.addEventListener(a,"drop",o._drop.bind(o)),o.addEventListener(a,"dragend",o._dragEnd.bind(o)),o.addEventListener(a,"click",o._click.bind(o)),o.initialize(n),o}return __extends(r,i),Object.defineProperty(r.prototype,"hideGroupedColumns",{get:function(){return this._hideGroupedCols},set:function(t){t!=this._hideGroupedCols&&(this._hideGroupedCols=e.asBoolean(t))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"maxGroups",{get:function(){return this._maxGroups},set:function(t){t!=this._maxGroups&&(this._maxGroups=e.asNumber(t))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"placeholder",{get:function(){return this._divPH.textContent},set:function(e){this._divPH.textContent=e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"grid",{get:function(){return this._g},set:function(i){(i=e.asType(i,t.FlexGrid,!0))!=this._g&&(this._g&&(this._g.draggingColumn.removeHandler(this._draggingColumn),this._g.sortedColumn.removeHandler(this.invalidate),this._g.itemsSourceChanging.removeHandler(this._itemsSourceChanging),this._g.itemsSourceChanged.removeHandler(this._itemsSourceChanged),this._g.columns.collectionChanged.removeHandler(this._itemsSourceChanged)),this._g=i,this._hiddenCols=[],this._g&&(this._g.draggingColumn.addHandler(this._draggingColumn,this),this._g.sortedColumn.addHandler(this.invalidate,this),this._g.itemsSourceChanging.addHandler(this._itemsSourceChanging,this),this._g.itemsSourceChanged.addHandler(this._itemsSourceChanged,this),this._g.columns.collectionChanged.addHandler(this._itemsSourceChanged,this)),this._itemsSourceChanged(this._g,null))},enumerable:!0,configurable:!0}),r.prototype.refresh=function(){if(i.prototype.refresh.call(this),this._divMarkers.innerHTML="",this._dragMarker=this._dragCol=null,this._gds){for(var t=0;t<this._gds.length;t++){for(var r=this._gds[t],n=this._g.columnHeaders,o=-1,s=-1,a=n.rows.length-1;a>=0&&s<0;a--)for(var d=0;d<n.columns.length&&s<0;d++){var l=this._g._getBindingColumn(n,a,n.columns[d]);if(l&&l.binding==r.propertyName){s=d,o=a;break}}if(s>-1&&o>-1){var h=document.createElement("div");this._g.cellFactory.updateCell(this._g.columnHeaders,o,s,h),h.setAttribute("class","wj-cell wj-header wj-groupmarker"),e.setCss(h,{position:"static",display:"inline-block",verticalAlign:"top",left:"",top:"",right:"",height:"auto",width:"auto"});var g=h.querySelector(".wj-elem-filter");g&&e.removeChild(g);e.createElement('<span wj-remove="" style="font-weight:normal;cursor:pointer;pointer;padding:12px;padding-right:3px">&times;</span>',h);this._divMarkers.appendChild(h)}}this._divMarkers.children.length>0?(this._divPH.style.display="none",this._divMarkers.style.display=""):(this._divPH.style.display="",this._divMarkers.style.display="none")}},r.prototype._addGroup=function(t,i){for(var r=this._getIndex(i),n=this._gds,o=0;o<n.length;o++)if(n[o].propertyName==t.binding){n.removeAt(o),o<r&&r--;break}for(o=this.maxGroups-1;o<n.length;o++)this._removeGroup(o,n),o<r&&r--;n.deferUpdate(function(){var i=new e.collections.PropertyGroupDescription(t.binding);n.insert(r,i)}),t&&this.hideGroupedColumns&&(t.visible=!1,this._hiddenCols.push(t)),this.invalidate()},r.prototype._moveGroup=function(e,t){var i=this._gds,r=this._getElementIndex(this._dragMarker),n=this._getIndex(t);n>r&&n--,n>=this._gds.length&&(n=this._gds.length),r!=n&&i.deferUpdate(function(){var e=i[r];i.removeAt(r),i.insert(n,e)})},r.prototype._removeGroup=function(e,t){void 0===t&&(t=this._gds);var i=null;t&&e>-1&&(i=t[e],t.removeAt(e));var r=i?i.propertyName:null,n=r?this._g.columns.getColumn(r):null;if(n){n.visible=!0;var o=this._hiddenCols.indexOf(n);o>-1&&this._hiddenCols.splice(o,1)}},r.prototype._getIndex=function(e){for(var t=this._divMarkers.children,i=0;i<t.length;i++){var r=t[i].getBoundingClientRect();if(e.clientX<r.left+r.width/2)return i}return t.length},r.prototype._getElementIndex=function(e){if(e&&e.parentElement)for(var t=e.parentElement.children,i=0;i<t.length;i++)if(t[i]==e)return i;return-1},r.prototype._draggingColumn=function(e,t){var i=this._g,r=i._getBindingColumn(t.panel,t.row,i.columns[t.col]);this._dragCol=r.binding?r:null},r.prototype._itemsSourceChanging=function(e,t){this._hiddenCols.forEach(function(e){e.visible=!0}),this._hiddenCols=[]},r.prototype._itemsSourceChanged=function(e,t){this._gds&&this._gds.collectionChanged.removeHandler(this._groupsChanged),this._gds=null,this._g.collectionView&&(this._gds=this._g.collectionView.groupDescriptions,this._gds.collectionChanged.addHandler(this._groupsChanged,this)),this.invalidate()},r.prototype._groupsChanged=function(e,t){this.invalidate()},r.prototype._dragStart=function(t){e._startDrag(t.dataTransfer,"move"),this._dragMarker=t.target,this._dragCol=null},r.prototype._dragOver=function(e){(this._dragCol||this._dragMarker)&&(e.dataTransfer.dropEffect="move",e.preventDefault(),e.stopPropagation())},r.prototype._drop=function(e){this._dragMarker?this._moveGroup(this._dragMarker,e):this._dragCol&&this._addGroup(this._dragCol,e)},r.prototype._dragEnd=function(e){this._dragMarker=this._dragCol=null},r.prototype._click=function(t){var i=t.target,r=null!=i.getAttribute("wj-remove"),n=e.closest(i,".wj-cell");if(e.hasClass(n,"wj-cell")){var o=this._getElementIndex(n),s=this._g.collectionView.sortDescriptions;if(r)this._removeGroup(o);else if(t.ctrlKey)s.clear(),this.invalidate();else{for(var a=this._gds[o],d=!0,l=0;l<s.length;l++)if(s[l].property==a.propertyName){d=!s[l].ascending;break}var h=new e.collections.SortDescription(a.propertyName,d);s.splice(0,s.length,h),this.invalidate()}}},r.controlTemplate='<div style="cursor:default;overflow:hidden;height:100%;width:100%;min-height:1em"><div wj-part="div-ph"></div><div wj-part="div-markers"></div></div>',r}(e.Control);i.GroupPanel=r}(t.grouppanel||(t.grouppanel={}))}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(t,i){var r=n.call(this,t)||this;return r.grid=i,r}return __extends(t,n),t.prototype.initialize=function(n){n&&(n.selector&&delete n.selector,wijmo.copy(this,n))},t}(wijmo.grid.grouppanel.GroupPanel);n.GroupPanel=t})(t=n.grouppanel||(n.grouppanel={}))})(t=n.grid||(n.grid={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(t){var i;(function(t){var i=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.grid.grouppanel.GroupPanel);t.GroupPanel=i})(i=t.grouppanel||(t.grouppanel={}))})(i=t.grid||(t.grid={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.GroupPanel||(n.GroupPanel={}))})(t=n.grouppanel||(n.grouppanel={}))})(t=n.grid||(n.grid={}))})(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var wijmo;!function(e){!function(t){!function(i){"use strict";var n;!function(e){e[e.Code=0]="Code",e[e.Selection=1]="Selection",e[e.ExpandSingle=2]="ExpandSingle",e[e.ExpandMulti=3]="ExpandMulti"}(n=i.DetailVisibilityMode||(i.DetailVisibilityMode={}));var o=function(){function o(t,o){var l=this;this._mode=n.ExpandSingle,this._animated=!1,this._g=t,t.mergeManager=new i.DetailMergeManager(t),t.rowHeaders.hostElement.addEventListener("click",this._hdrClick.bind(this)),t.formatItem.addHandler(this._formatItem,this),t.selectionChanged.addHandler(this._selectionChanged,this),t.resizedRow.addHandler(this._resizedRow,this),t.loadingRows.addHandler(function(){l.hideDetail()}),t.draggingRow.addHandler(function(e,t){t.row<e.rows.length-1&&e.rows[t.row+1]instanceof i.DetailRow&&(t.cancel=!0,l.hideDetail(t.row))}),t.formatItem.addHandler(function(e,t){t.panel==e.cells&&e.rows[t.row]instanceof i.DetailRow&&(t.cell.style.left="0")}),o&&e.copy(this,o)}return Object.defineProperty(o.prototype,"grid",{get:function(){return this._g},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"detailVisibilityMode",{get:function(){return this._mode},set:function(t){(t=e.asEnum(t,n))!=this._mode&&(this._mode=t,this.hideDetail(),this._g.invalidate())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"maxHeight",{get:function(){return this._maxHeight},set:function(t){this._maxHeight=e.asNumber(t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isAnimated",{get:function(){return this._animated},set:function(t){t!=this._animated&&(this._animated=e.asBoolean(t))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"createDetailCell",{get:function(){return this._createDetailCellFn},set:function(t){this._createDetailCellFn=e.asFunction(t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"disposeDetailCell",{get:function(){return this._disposeDetailCellFn},set:function(t){this._disposeDetailCellFn=e.asFunction(t,!0)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"rowHasDetail",{get:function(){return this._rowHasDetailFn},set:function(t){this._rowHasDetailFn=e.asFunction(t,!0)},enumerable:!0,configurable:!0}),o.prototype.getDetailRow=function(e){var t=this._g.rows;return e=this._toIndex(e),t[e]instanceof i.DetailRow?t[e]:e<t.length-1&&t[e+1]instanceof i.DetailRow?t[e+1]:null},o.prototype.isDetailVisible=function(e){return null!=this.getDetailRow(e)},o.prototype.isDetailAvailable=function(e){this._g.rows;return e=this._toIndex(e),this._hasDetail(e)},o.prototype.hideDetail=function(t){var n=this._g.rows;if(null!=t){!(n[t=this._toIndex(t)]instanceof i.DetailRow)&&t<n.length-1&&n[t+1]instanceof i.DetailRow&&t++;var o=n[t];o instanceof i.DetailRow&&(this.disposeDetailCell&&this.disposeDetailCell(o),e.Control.disposeAll(o.detail),n.removeAt(t))}else for(var l=0;l<n.length;l++)n[l]instanceof i.DetailRow&&this.hideDetail(l)},o.prototype.showDetail=function(t,n){void 0===n&&(n=!1);var o=this._g,l=o.rows;if((t=this._toIndex(t))>0&&l[t]instanceof i.DetailRow&&t--,n){for(var a=o.selection,r=!1,s=0;s<l.length-1;s++)s!=t&&l[s+1]instanceof i.DetailRow&&(this.hideDetail(s),s<t&&t--,s<a.row&&(a.row--,a.row2--,r=!0));r&&o.select(a,!1)}if(!this.isDetailVisible(t)&&this._hasDetail(t)){var c=new i.DetailRow(l[t]);if(c.detail=this._createDetailCell(l[t]),c.detail)if(l.insert(t+1,c),this._animated){var d=c.detail.style;d.transform="translateY(-100%)",d.opacity="0",e.animate(function(i){i<1?(d.transform="translateY("+(100*-(1-i)).toFixed(0)+"%)",d.opacity=(i*i).toString()):(d.transform="",d.opacity="",e.Control.invalidateAll(c.detail),o.scrollIntoView(t+1,-1))})}else o.scrollIntoView(t+1,-1)}},o.prototype._toIndex=function(i){return i instanceof t.Row&&(i=i.index),e.asNumber(i,!1,!0)},o.prototype._hdrClick=function(e){if(!e.defaultPrevented)switch(this._mode){case n.ExpandMulti:case n.ExpandSingle:var i=this._g,o=i.hitTest(e);if(o.row>-1){i.rows[o.row];this.isDetailVisible(o.row)?this.hideDetail(o.row):(i.select(new t.CellRange(o.row,0,o.row,i.columns.length-1)),this.showDetail(o.row,this._mode==n.ExpandSingle)),e.preventDefault()}}},o.prototype._selectionChanged=function(e,t){var i=this;this._mode==n.Selection&&(this._toSel&&clearTimeout(this._toSel),this._toSel=setTimeout(function(){e.selection.row>-1?i.showDetail(e.selection.row,!0):i.hideDetail()},300))},o.prototype._formatItem=function(t,o){var l=this._g,a=o.panel.rows[o.row];if(o.panel==l.cells&&a instanceof i.DetailRow&&null!=a.detail)if(e.addClass(o.cell,"wj-detail"),o.cell.textContent="",o.cell.style.textAlign="",o.cell.appendChild(a.detail),null==a.height){e.Control.refreshAll(o.cell);var r=getComputedStyle(o.cell),s=a.detail.scrollHeight+parseInt(r.paddingTop)+parseInt(r.paddingBottom);this._maxHeight>0&&s>this._maxHeight&&(s=this._maxHeight),a.height=s,a.detail.style.height||(a.detail.style.height="100%");var c=a.detail.querySelector(".wj-flexgrid");c&&!c.style.height&&(c.style.height="100%")}else setTimeout(function(){e.Control.refreshAll(a.detail)});if((this._mode==n.ExpandMulti||this._mode==n.ExpandSingle)&&o.panel==l.rowHeaders&&0==o.col&&this._hasDetail(o.row)){var d=o.row<l.rows.length-1&&l.rows[o.row+1]instanceof i.DetailRow;o.cell.innerHTML=d?'<span class="wj-glyph-minus"></span>':'<span class="wj-glyph-plus"></span>'}},o.prototype._resizedRow=function(t,n){var o=n.panel.rows[n.row];o instanceof i.DetailRow&&o.detail&&e.Control.refreshAll(o.detail)},o.prototype._hasVisibleDetail=function(e){return!(e instanceof i.DetailRow||e instanceof t.GroupRow||e instanceof t._NewRowTemplate)},o.prototype._hasDetail=function(t){return!e.isFunction(this._rowHasDetailFn)||this._rowHasDetailFn(this._g.rows[t])},o.prototype._createDetailCell=function(e,t){return this.createDetailCell?this.createDetailCell(e,t):null},o}();i.FlexGridDetailProvider=o}(t.detail||(t.detail={}))}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(e){!function(e){!function(t){"use strict";var i=function(i){function n(e){return i.call(this,e)||this}return __extends(n,i),n.prototype.getMergedRange=function(n,o,l,a){switch(void 0===a&&(a=!0),n.cellType){case e.CellType.Cell:if(n.rows[o]instanceof t.DetailRow)return new e.CellRange(o,0,o,n.columns.length-1);break;case e.CellType.RowHeader:if(n.rows[o]instanceof t.DetailRow)return new e.CellRange(o-1,l,o,l);if(o<n.rows.length-1&&n.rows[o+1]instanceof t.DetailRow)return new e.CellRange(o,l,o+1,l)}return i.prototype.getMergedRange.call(this,n,o,l,a)},n}(e.MergeManager);t.DetailMergeManager=i}(e.detail||(e.detail={}))}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),wijmo;!function(e){!function(e){!function(t){"use strict";var i=function(e){function t(t){var i=e.call(this)||this;return i.isReadOnly=!0,i}return __extends(t,e),Object.defineProperty(t.prototype,"detail",{get:function(){return this._detail},set:function(e){this._detail=e},enumerable:!0,configurable:!0}),t}(e.Row);t.DetailRow=i}(e.detail||(e.detail={}))}(e.grid||(e.grid={}))}(wijmo||(wijmo={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.grid.detail.FlexGridDetailProvider);n.FlexGridDetailProvider=t})(t=n.detail||(n.detail={}))})(t=n.grid||(n.grid={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(t){var i;(function(t){var i=function(t){function i(){return t!==null&&t.apply(this,arguments)||this}return __extends(i,t),i.prototype.initialize=function(t){var i=this;i.uniqueId=i.grid.hostElement.id;i.template=t.detailRowTemplateId||t.detailRowTemplateContent;t&&(!t.createDetailCell&&i.template&&(t.createDetailCell=function(t){var r,u={};return r=document.createElement("div"),i.grid.hostElement.appendChild(r),u[n.mvc.Template.UID]=i.uniqueId+"_DetailRow_"+t.index,u[n.mvc.Template.DATACONTEXT]=t.dataItem,i.template.applyTo(r,u),r.parentElement.removeChild(r),r}),delete t.detailRowTemplateId,delete t.detailRowTemplateContent,wijmo.copy(i,t))},i}(n.grid.detail.FlexGridDetailProvider);t.FlexGridDetailProvider=i})(i=t.detail||(t.detail={}))})(i=t.grid||(t.grid={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.DetailMergeManager||(n.DetailMergeManager={}))})(t=n.detail||(n.detail={}))})(t=n.grid||(n.grid={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.DetailRow||(n.DetailRow={}))})(t=n.detail||(n.detail={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FlexGridDetailProvider||(n.FlexGridDetailProvider={}))})(t=n.detail||(n.detail={}))})(t=n.grid||(n.grid={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wijmo;!function(t){!function(e){!function(n){var i;!function(t){t[t.Linear=0]="Linear",t[t.Swing=1]="Swing",t[t.EaseInQuad=2]="EaseInQuad",t[t.EaseOutQuad=3]="EaseOutQuad",t[t.EaseInOutQuad=4]="EaseInOutQuad",t[t.EaseInCubic=5]="EaseInCubic",t[t.EaseOutCubic=6]="EaseOutCubic",t[t.EaseInOutCubic=7]="EaseInOutCubic",t[t.EaseInQuart=8]="EaseInQuart",t[t.EaseOutQuart=9]="EaseOutQuart",t[t.EaseInOutQuart=10]="EaseInOutQuart",t[t.EaseInQuint=11]="EaseInQuint",t[t.EaseOutQuint=12]="EaseOutQuint",t[t.EaseInOutQuint=13]="EaseInOutQuint",t[t.EaseInSine=14]="EaseInSine",t[t.EaseOutSine=15]="EaseOutSine",t[t.EaseInOutSine=16]="EaseInOutSine",t[t.EaseInExpo=17]="EaseInExpo",t[t.EaseOutExpo=18]="EaseOutExpo",t[t.EaseInOutExpo=19]="EaseInOutExpo",t[t.EaseInCirc=20]="EaseInCirc",t[t.EaseOutCirc=21]="EaseOutCirc",t[t.EaseInOutCirc=22]="EaseInOutCirc",t[t.EaseInBack=23]="EaseInBack",t[t.EaseOutBack=24]="EaseOutBack",t[t.EaseInOutBack=25]="EaseInOutBack",t[t.EaseInBounce=26]="EaseInBounce",t[t.EaseOutBounce=27]="EaseOutBounce",t[t.EaseInOutBounce=28]="EaseInOutBounce",t[t.EaseInElastic=29]="EaseInElastic",t[t.EaseOutElastic=30]="EaseOutElastic",t[t.EaseInOutElastic=31]="EaseInOutElastic"}(i=n.Easing||(n.Easing={}));var a;!function(t){t[t.All=0]="All",t[t.Point=1]="Point",t[t.Series=2]="Series"}(a=n.AnimationMode||(n.AnimationMode={}));var o=function(){function n(n,i){this._play=!0;var a=this,o=n.hostElement,r=new t.Size(o.offsetWidth,o.offsetHeight);a._chart=n,a._updateEventArgs=[],n instanceof e.FlexPie?a._animation=new s(n,a._updateEventArgs):(t.chart.radar&&t.chart.radar.FlexRadar&&n instanceof t.chart.radar.FlexRadar?a._animation=new l(n,a._updateEventArgs):a._animation=new u(n,a._updateEventArgs),a._chartType=n.chartType),i&&a._initOptions(i),n.beginUpdate(),window.setTimeout(function(){n.rendered.addHandler(a._playAnimation,a),n.endUpdate()},0),a._setCV(n.collectionView),window.addEventListener("resize",function(e){var n=new t.Size(o.offsetWidth,o.offsetHeight);r.equals(n)||(a._play=!1,r=n)})}return n.prototype._initOptions=function(t){t.duration&&(this.duration=t.duration),t.easing&&(this.easing=t.easing),t.animationMode&&(this.animationMode=t.animationMode)},n.prototype._setCV=function(t){this._cv=t,this._animation._clearState()},Object.defineProperty(n.prototype,"animationMode",{get:function(){return this._animation.animationMode},set:function(e){(e=t.asEnum(e,a))!=this.animationMode&&(this._animation.animationMode=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"easing",{get:function(){return this._animation.easing},set:function(e){(e=t.asEnum(e,i))!=this.easing&&(this._animation.easing=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"duration",{get:function(){return this._animation.duration},set:function(e){(e=t.asNumber(e))!=this.duration&&(this._animation.duration=e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"axisAnimation",{get:function(){return this._animation.axisAnimation},set:function(e){(e=t.asBoolean(e))!=this.axisAnimation&&(this._animation.axisAnimation=e)},enumerable:!0,configurable:!0}),n.prototype._playAnimation=function(){var t=this,e=t._chart,n=e.chartType;t._cv!==e.collectionView&&t._setCV(e.collectionView),null!=t._chartType&&t._chartType!==n&&(t._chartType=n,t._animation._clearState()),t._play?t._animation.playAnimation():t._play=!0},n.prototype.animate=function(){var t=this._chart;if(t){var e=t.itemsSource;t.beginUpdate(),t.itemsSource=null,t.itemsSource=e,t.endUpdate()}},n}();n.ChartAnimation=o;var r=function(){function e(t,e){this._axisAnimation=!0,this._chart=t,this._timers=[]}return Object.defineProperty(e.prototype,"animationMode",{get:function(){return this._animationMode||a.All},set:function(e){(e=t.asEnum(e,a,!1))!==this._animationMode&&(this._clearState(),this._animationMode=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"easing",{get:function(){return null==this._easing?i.Swing:this._easing},set:function(e){e!==this._easing&&(this._easing=t.asEnum(e,i,!1))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration||400},set:function(e){e!==this._duration&&(this._duration=t.asNumber(e,!1,!0))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"axisAnimation",{get:function(){return!!this._axisAnimation},set:function(e){e!==this._axisAnimation&&(this._axisAnimation=t.asBoolean(e,!1))},enumerable:!0,configurable:!0}),e.prototype.playAnimation=function(){},e.prototype._clearState=function(){this._previousState&&(this._previousState=null),this._currentState&&(this._currentState=null)},e.prototype._setInitState=function(t,e,n){var i=c.parseAttrs(e,n);c.setElementAttr(t,i,0)},e.prototype._getAnimation=function(t,e){return t[e]||(t[e]=[]),t[e]},e.prototype._toggleVisibility=function(t,e){e?c.playAnimation(t,{opacity:0},{opacity:1},null,i.Swing,100):t.setAttribute("opacity","0")},e.prototype._toggleDataLabelVisibility=function(t){var e=this._chart.hostElement,n=e&&e.querySelector(".wj-data-labels");n&&this._toggleVisibility(n,t)},e.prototype._playAnimation=function(e){var n,i=this,a=this,o=a.duration,r=a.easing,s=e.length;a._toggleDataLabelVisibility(!1),n=a._getDurationAndDelay(e.length,o),this._timers&&this._timers.length&&(this._timers.forEach(function(t){return window.clearInterval(t)}),this._timers.length=0),e.forEach(function(e,o){var u;e&&(u=window.setTimeout(function(){var u;e.forEach(function(e,l){if(e&&e.ele){if(o===s-1&&0===l){var p=e.done;e.done=function(){a._toggleDataLabelVisibility(!0),p&&p()}}t.isArray(e.ele)?(u=c.playAnimations(e.ele,e.from,e.to,e.done,r,n.duration),i._timers=i._timers.concat.apply(u)):(u=c.playAnimation(e.ele,e.from,e.to,e.done,r,n.duration),i._timers.push(u))}})},n.delay*o),i._timers.push(u))})},e.prototype._getDurationAndDelay=function(t,e){var n={duration:e,delay:0};return t>1&&(this._previousState?(n.duration=e/t,n.delay=e/t):(n.duration=.5*e,n.delay=.5*e/(t-1))),n},e}(),s=function(t){function e(e,n){var i=t.call(this,e,n)||this;return e.selectionChanged.addHandler(i._selectionChanged,i),i}return __extends(e,t),e.prototype._selectionChanged=function(){this._isSelectionChanged=!0},e.prototype._clearState=function(){t.prototype._clearState.call(this),this._isSelectionChanged=!1},e.prototype._getElementRotate=function(t){var e,n=t.getAttribute("transform");return n=n&&n.indexOf("rotate")>-1?(n=n.replace("rotate(","").replace(")","")).indexOf(",")>-1?n.split(",").map(function(t){return+t}):n.split(" ").map(function(t){return+t}):[0,(e=this._chart._areas[0].center).x,e.y]},e.prototype._getDurationAndDelay=function(t,e){var n={duration:e,delay:0};return this.animationMode===a.Point&&t>1&&(n.duration=e/t,n.delay=e/t),n},e.prototype.playAnimation=function(){t.prototype.playAnimation.call(this);var e=this,n=[];e._playPieAnimation(n),n.length&&e._playAnimation(n)},e.prototype._playPieAnimation=function(t){var e=this,n=e._chart,i=!0;if(e._previousState=e._currentState,e._currentState={areas:n._areas,pels:n._pels,rotate:n._pels.length&&e._getElementRotate(n._pels[0].parentNode)},e._previousState&&(i=!1),e._isSelectionChanged)return n.isAnimated||e._playSelectPieAnimation(t),void(e._isSelectionChanged=!1);i?e._playLoadPieAnimation(t):e._playUpdatePieAnimation(t)},e.prototype._playSelectPieAnimation=function(t){if(null!=this._previousState){var e,n,i,a=this,o=a._chart._pels[0].parentNode,r=a._previousState.rotate,s=a._getElementRotate(o),u=r[0],l=s[0];u!==l&&(u-l>180?s[0]+=360:l-u>180&&(r[0]+=360),e=a._getAnimation(t,0),n={rotate:r},i={rotate:s},a._setInitState(o,n,i),e.push({ele:o,from:n,to:i}))}},e.prototype._playUpdatePieAnimation=function(t){var e,n,i,a,o=this,r=o._chart,s=o._previousState,u=r._areas,l=r._pels,p=s.areas.length,h=u.length,m=Math.max(h,p),d=o._getAnimation(t,0),f=0;if(0!==h&&0!==p)for(o._playSelectPieAnimation(t),e=0;e<m;e++)n={},l[e]&&l[e].childNodes&&l[e].childNodes.length>0&&(e<h&&e<p&&(i=u[0],0===e&&(f=i.angle),1===p?l[e].childNodes[0].setAttribute("d",c.getPathDescOfPie(i.center.x,i.center.y,i.radius,f,2*Math.PI,i.innerRadius||0)):l[e].childNodes[0].setAttribute("d",s.pels[e].childNodes[0].getAttribute("d"))),e<h?(i=u[e],n.to={pie:[i.center.x,i.center.y,i.radius,i.angle,i.sweep,i.innerRadius||0]},n.ele=l[e].childNodes[0]):(i=u[0],a=s.pels[e],n.to={pie:[i.center.x,i.center.y,i.radius,f+2*Math.PI,0,i.innerRadius||0]},l[0].parentNode.appendChild(a),n.done=function(t){return function(){t.parentNode.removeChild(t)}}(a),n.ele=a.childNodes[0]),e<p?(i=s.areas[e],n.from={pie:[i.center.x,i.center.y,i.radius,i.angle,i.sweep,i.innerRadius||0]}):(l[e].childNodes[0].setAttribute("d",c.getPathDescOfPie(i.center.x,i.center.y,i.radius,2*Math.PI+f,0,i.innerRadius||0)),i=s.areas[0],n.from={pie:[i.center.x,i.center.y,i.radius,2*Math.PI+f,0,i.innerRadius||0]}),d.push(n))},e.prototype._playLoadPieAnimation=function(t){var e=this,n=e._chart,i=e.animationMode,o=n._areas;n._pels.forEach(function(n,r){var s,u=n.childNodes[0],l={},c={};u&&(i===a.Point?(e._parsePathByAngle(o[r],l,c),s=e._getAnimation(t,r)):(e._parsePathByRadius(o[r],l,c),s=e._getAnimation(t,0)),e._setInitState(u,l,c),s.push({ele:u,from:l,to:c}))})},e.prototype._parsePathByRadius=function(t,e,n){var i,a,o=t.center.x,r=t.center.y,s=t.radius,u=t.angle,l=t.sweep;i=[o,r,0,u,l,0],a=[o,r,s,u,l,t.innerRadius||0],e.pie=i,n.pie=a},e.prototype._parsePathByAngle=function(t,e,n){var i,a,o=t.center.x,r=t.center.y,s=t.radius,u=t.angle,l=t.sweep,c=t.innerRadius;i=[o,r,s,u,0,c||0],a=[o,r,s,u,l,c||0],e.pie=i,e["stroke-width"]=0,n.pie=a,n["stroke-width"]=1},e}(r),u=function(n){function o(t,e){return n.call(this,t,e)||this}return __extends(o,n),o.prototype._clearState=function(){n.prototype._clearState.call(this);var t=this;t._prevAxesStates&&(t._prevAxesStates=null),t._currAxesStates&&(t._currAxesStates=null)},o.prototype.playAnimation=function(){n.prototype.playAnimation.call(this);var e,i,a,o,r,s,u,l,c,p=this,h=!0,m=p._chart,d=t.chart.finance&&t.chart.finance.FinancialChart&&m instanceof t.chart.finance.FinancialChart,f=m.series,_=f.length,y=[];for(p._previousState=p._currentState,p._previousXVal=p._currentXVal,p._currentState=[],p._addStart=0,p._removeStart=0,p._currentXVal=m._xlabels.slice(),p._previousState&&p._previousState.length&&(h=!1,r=(s=p._previousState).length,u=p._previousXVal,l=p._currentXVal,u.length>2&&l.length>2&&((e=l.indexOf(u[0]))>0&&e<l.length-2?l[e+1]===u[1]&&l[e+2]===u[2]&&(p._addStart=e):(e=u.indexOf(l[0]))>0&&e<u.length-2&&u[e+1]===l[1]&&u[e+2]===l[2]&&(p._removeStart=e))),e=0;e<_;e++)if(i=f[e],o=null!=i._getChartType()?i._getChartType():m._getChartType(),a=p._getChartType(o),p._currentState.push({seriesType:o,ele:i.hostElement}),d)p._playDefaultAnimation(y,e);else{if(c=s&&s[e],"Default"===a){p._playDefaultAnimation(y,e);continue}if(h||c&&c.seriesType!==o)p._playLoadAnimation(y,e,a);else if(p._playUpdateAnimation(y,e,a,i,c&&c.ele||null),e===_-1&&e<r-1)for(e++;e<=r-1;e++)p._playUpdateAnimation(y,e,a,null,c.ele)}p._adjustAnimations(a,y),y.length&&p._playAnimation(y),p.axisAnimation&&p._playAxesAnimation()},o.prototype._playAxesAnimation=function(){var e,n,i,a=this,o=a._chart.axes,r=o.length;for(a._prevAxesStates=a._currAxesStates,a._currAxesStates=[],n=0;n<r;n++)(e=o[n]).hostElement&&a._currAxesStates.push({ele:e.hostElement,vals:e._vals,axis:e,maxValue:t.isDate(e.actualMax)?e.actualMax.getTime():e.actualMax,minValue:t.isDate(e.actualMin)?e.actualMin.getTime():e.actualMin});if(a._prevAxesStates)for(i=Math.max(a._prevAxesStates.length,a._currAxesStates.length),n=0;n<i;n++)a._playAxisAnimation(a._prevAxesStates[n],a._currAxesStates[n])},o.prototype._playAxisAnimation=function(t,e){var n,i=this,a=[],o=[];e&&e.maxValue-e.minValue&&(n=i._parseAxisState(e),i._convertAxisAnimation(a,n.major,e.axis,t.maxValue,t.minValue),i._convertAxisAnimation(a,n.minor,e.axis,t.maxValue,t.minValue)),t&&t.maxValue-t.minValue&&(n=i._parseAxisState(t),i._convertAxisAnimation(o,n.major,t.axis),i._convertAxisAnimation(o,n.minor,t.axis)),a&&o&&i._combineAxisAnimations(a,o),i._playCurrAxisAnimation(a),i._playPrevAxisAnimation(o)},o.prototype._combineAxisAnimations=function(t,e){var n,i,a=this,o=e.length;for(n=o-1;n>=0;n--)(i=e[n]).text&&t.some(function(t){if(t.text&&t.text===i.text)return a._combineAxisAnimation(t,i),e.splice(n,1),!0})},o.prototype._combineAxisAnimation=function(t,e){var n=this;["label","majorGrid","tick"].forEach(function(i){t[i]&&e[i]&&n._resetExistAxisAttrs(t[i],e[i])})},o.prototype._resetExistAxisAttrs=function(t,e){var n=t.ele,i=e.ele,a={},o={};["x","y","x1","x2","y1","y2"].forEach(function(t){var e=n.getAttribute(t),r=i.getAttribute(t);e!==r&&(a[t]=r,o[t]=e)}),t.calcPos=a,t.elePos=o},o.prototype._convertAxisAnimation=function(t,n,i,a,o){var r,s=this,u=i.hostElement,l=i.axisType==e.AxisType.Y;n.forEach(function(e,n){var c=i.convert(e.val,a,o);isNaN(c)||(r={},e.majorGrid&&(r.majorGrid=s._getAxisAnimationAttrs(e.majorGrid,u,c,l)),e.label&&(r.label=s._getAxisAnimationAttrs(e.label,u,c,l),r.text=e.label.innerHTML||e.label.textContent),e.tick&&(r.tick=s._getAxisAnimationAttrs(e.tick,u,c,l)),t.push(r))})},o.prototype._getAxisAnimationAttrs=function(t,e,n,i){var a,o,r;return a={ele:t,parent:e,elePos:{},calcPos:{}},"text"===t.nodeName?(o=i?"y":"x",r=Number(t.getAttribute(o)),a.elePos[o]=r,a.calcPos[o]=n):(o=i?"y1":"x1",r=Number(t.getAttribute(o)),i?(a.elePos={y1:r,y2:r},a.calcPos={y1:n,y2:n}):(a.elePos={x1:r,x2:r},a.calcPos={x1:n,x2:n})),a.elePos.opacity=1,a.calcPos.opacity=0,a},o.prototype._playCurrAxisAnimation=function(t){var e=this.duration;t&&0!==t.length&&t.forEach(function(t){["majorGrid","label","tick"].forEach(function(n){var a=t[n];if(a){a.parent;var o=a.ele,r=a.elePos,s=a.calcPos;c.playAnimation(o,s,r,null,i.Swing,e)}})})},o.prototype._playPrevAxisAnimation=function(t){var e=this.duration;t&&0!==t.length&&t.forEach(function(t){["majorGrid","label","tick"].forEach(function(n){var a=t[n];if(a){var o=a.parent,r=a.ele,s=a.elePos,u=a.calcPos;o.appendChild(r),c.playAnimation(r,s,u,function(){r.parentNode===o&&o.removeChild(r)},i.Swing,e)}})})},o.prototype._parseAxisState=function(n){if(null==n)return null;var i=n.vals,a=n.axis,o=a.axisType==e.AxisType.Y,r=n.ele.childNodes,s=0,u=i.major,l=i.minor,c=i.hasLbls,p=[],h=[];return u&&u.forEach(function(n,i){var u,l={},h=!!c[i];p.push(l),l.val=n,u=r[s],a.majorGrid&&t.hasClass(u,e.FlexChart._CSS_GRIDLINE)&&(l.majorGrid=u,u=r[++s]),o?(h&&u&&a.majorTickMarks!==e.TickMark.None&&t.hasClass(u,e.FlexChart._CSS_TICK)&&(l.tick=u,u=r[++s]),h&&u&&(t.hasClass(u,e.FlexChart._CSS_LABEL)||u.querySelector("."+e.FlexChart._CSS_LABEL))&&(l.label=u,s++)):(h&&u&&(t.hasClass(u,e.FlexChart._CSS_LABEL)||u.querySelector("."+e.FlexChart._CSS_LABEL))&&(l.label=u,u=r[++s]),h&&u&&a.majorTickMarks!==e.TickMark.None&&t.hasClass(u,e.FlexChart._CSS_TICK)&&(l.tick=u,s++))}),l&&l.forEach(function(n,i){var o,u={};h.push(u),u.val=n,o=r[s],a.minorTickMarks!==e.TickMark.None&&t.hasClass(o,e.FlexChart._CSS_TICK_MINOR)&&(u.tick=o,o=r[++s]),a.minorGrid&&t.hasClass(o,e.FlexChart._CSS_GRIDLINE_MINOR)&&(u.majorGrid=o,s++)}),{major:p,minor:h}},o.prototype._playLoadAnimation=function(t,e,n){this["_playLoad"+n+"Animation"](t,e)},o.prototype._playUpdateAnimation=function(t,e,n,i,a){null==i||null==a?null==i?this["_play"+n+"RemoveAnimation"](t,a):this["_play"+n+"AddAnimation"](t,i):this["_play"+n+"MoveAnimation"](t,i,a)},o.prototype._adjustAnimations=function(t,e){var n,i=e.length;if("Column"===t||"Bar"===t)for(n=i-1;n>=0;n--)null==e[n]&&e.splice(n,1)},o.prototype._getChartType=function(t){var n="Default",i=this._chart._isRotated();switch(t){case e.ChartType.Scatter:case e.ChartType.Bubble:case e.ChartType.Candlestick:case e.ChartType.HighLowOpenClose:n="Scatter";break;case e.ChartType.Column:case e.ChartType.Bar:n=i?"Bar":"Column";break;case e.ChartType.Line:case e.ChartType.LineSymbols:case e.ChartType.Area:case e.ChartType.Spline:case e.ChartType.SplineSymbols:case e.ChartType.SplineArea:n="Line";break;default:n="Default"}return n},o.prototype._playLoadLineAnimation=function(t,e){var n,i=this,o=i._chart.series[e],r=i.animationMode,s=o.hostElement;r===a.Point?i._playDefaultAnimation(t,e):(n=r===a.All?i._getAnimation(t,0):i._getAnimation(t,e),[].slice.call(s.childNodes).forEach(function(t){i._setLineRiseDiveAnimation(n,t,!0)}))},o.prototype._setLineRiseDiveAnimation=function(t,e,n){var i,a,o,r,s,u,l,c=this,p=this,h=p._chart,m=e.nodeName,d=[],f=[],_=p._chart._plotRect,y=_.top+_.height,A=_.left,g={},v={};if("g"===m&&e.childNodes)[].slice.call(e.childNodes).forEach(function(e){c._setLineRiseDiveAnimation(t,e,n)});else{if("polyline"===m||"polygon"===m){for(o=(u=e.points).length||u.numberOfItems,r=0;r<o;r++)s=u[r]||u.getItem(r),h.rotated?d.push({x:A,y:s.y}):d.push({x:s.x,y:y}),f.push({x:s.x,y:s.y});g[m]=d,v[m]=f}else"ellipse"===m&&(p._toggleVisibility(e,!1),n&&(l=function(){p._toggleVisibility(e,!0)}));i=n?g:v,a=n?v:g,p._setInitState(e,i,a),t.push({ele:e,from:i,to:a,done:l})}},o.prototype._setLineMoveAnimation=function(t,e,n,i,a){if(null!=e&&null!=n){var o,r,s,u,l,c,p,h,m,d=this,f=e.nodeName,_=[],y=[],A={},g={};for(m="polygon"===f,s=e.points,c=n.points,o=s.length||s.numberOfItems,u=c.length||c.numberOfItems,h=Math.max(o,u),p=0;p<h;p++)p<o&&(r=s[p]||s.getItem(p),_.push({x:r.x,y:r.y})),p<u&&(l=c[p]||c.getItem(p),y.push({x:l.x,y:l.y}));d._addStart?(d._adjustStartLinePoints(d._addStart,_,s),o+=d._addStart):d._removeStart&&(d._adjustStartLinePoints(d._removeStart,y,c),u+=d._removeStart),u>o?d._adjustEndLinePoints(u,o,_,s,m):u<o&&d._adjustEndLinePoints(o,u,y,c,m),A[f]=_,g[f]=y,d._setInitState(i,A,g),t.push({ele:i,from:A,to:g,done:a})}},o.prototype._adjustStartLinePoints=function(t,e,n){for(var i=n[0]||n.getItem(0);t;)e.splice(0,0,{x:i.x,y:i.y}),t--},o.prototype._adjustEndLinePoints=function(t,e,n,i,a){var o,r,s;for(a&&(i.length>=3||i.numberOfItems>=3)?(r=n.pop(),o=n.pop(),s=i[i.length-3]||i.getItem(i.numberOfItems-3)):(i.length>0||i.numberOfItems>0)&&(s=i[i.length-1]||i.getItem(i.numberOfItems-1));t>e&&s;)n.push({x:s.x,y:s.y}),e++;a&&r&&o&&(n.push(o),n.push(r))},o.prototype._playLineRemoveAnimation=function(t,e){var n,i=this,a=i._chart.series[0].hostElement.parentNode,o=i._getAnimation(t,0);a.appendChild(e),[].slice.call(e.childNodes).forEach(function(t){i._setLineRiseDiveAnimation(o,t,!1)}),o.length&&(n=o[0].done,o[0].done=function(){e&&e.parentNode===a&&a.removeChild(e),n&&n()})},o.prototype._playLineAddAnimation=function(t,e){var n=this,i=e.hostElement,a=this._getAnimation(t,0);[].slice.call(i.childNodes).forEach(function(t){n._setLineRiseDiveAnimation(a,t,!0)})},o.prototype._playLineMoveAnimation=function(t,e,n){var i,a,o,r,s=this,u=(s._chart,s._getAnimation(t,0)),l=[];i=e.hostElement,a=[].slice.call(n.childNodes),[].slice.call(i.childNodes).forEach(function(t,e){r=t.nodeName,o=a[e],"g"===r&&t.nodeChilds?[].slice.call(t.nodeChilds).forEach(function(t,e){o&&(l.push(t),s._toggleVisibility(t,!1))}):"polygon"===r||"polyline"===r?s._setLineMoveAnimation(u,o,t,t,0===e?function(){l.forEach(function(t){s._toggleVisibility(t,!0)}),l=null}:null):o&&(l.push(t),s._toggleVisibility(t,!1))})},o.prototype._playLoadColumnAnimation=function(t,e){this._playLoadBarAnimation(t,e,!0)},o.prototype._playLoadBarAnimation=function(t,e,n){void 0===n&&(n=!1);var i=this,o=i._chart.series[e],r=i.animationMode,s=o.hostElement;[].slice.call(s.childNodes).forEach(function(o,s){var u,l=o.nodeName;u=r===a.Point?i._getAnimation(t,s):r===a.Series?i._getAnimation(t,e):i._getAnimation(t,0),"g"===l?o.childNodes&&[].slice.call(o.childNodes).forEach(function(t,e){i._setLoadBarAnimation(u,t,n)}):i._setLoadBarAnimation(u,o,n)})},o.prototype._setBarAnimation=function(t,e,n,i,a){this._setInitState(e,n,i),t.push({ele:e,from:n,to:i,done:a})},o.prototype._setLoadBarAnimation=function(t,e,n,i,a){void 0===i&&(i=!1);var o,r,s=this,u=n?"height":"width",l=n?"y":"x",c=e.getAttribute(u),p=e.getAttribute(l),h=n?"top":"left",m=s._chart._plotRect,d={},f={};d[u]=0,f[u]=Number(c),n&&(d[l]=m[u]+m[h],f[l]=Number(p)),o=i?f:d,r=i?d:f,"g"===e.nodeName?e.childNodes&&[].slice.call(e.childNodes).forEach(function(e){s._setBarAnimation(t,e,o,r,a)}):s._setBarAnimation(t,e,o,r,a)},o.prototype._setMoveBarAnimation=function(t,e,n){var i={},a={};null!=e&&null!=n&&(["width","height","x","y","top","left"].forEach(function(t){var o=e.getAttribute(t),r=n.getAttribute(t);o!==r&&(i[t]=Number(o),a[t]=Number(r))}),this._setInitState(n,i,a),t.push({ele:n,from:i,to:a}))},o.prototype._playColumnRemoveAnimation=function(t,e){this._playBarRemoveAnimation(t,e,!0)},o.prototype._playColumnAddAnimation=function(t,e){this._playBarAddAnimation(t,e,!0)},o.prototype._playColumnMoveAnimation=function(t,e,n){this._playBarMoveAnimation(t,e,n,!0)},o.prototype._playBarRemoveAnimation=function(t,e,n){void 0===n&&(n=!1);var i=this,a=i._chart.series[0].hostElement.parentNode,o=i._getAnimation(t,0);a.appendChild(e),[].slice.call(e.childNodes).forEach(function(t){i._setLoadBarAnimation(o,t,n,!0)}),o.length&&(o[0].done=function(){e&&e.parentNode===a&&a.removeChild(e)})},o.prototype._playBarAddAnimation=function(t,e,n){var i=this;void 0===n&&(n=!1);var a=e.hostElement,o=this._getAnimation(t,2);[].slice.call(a.childNodes).forEach(function(t){i._setLoadBarAnimation(o,t,n,!1)})},o.prototype._playBarMoveAnimation=function(t,e,n,i){void 0===i&&(i=!1);var a,o,r,s,u,l,c,p=this;p._chart;if(a=e.hostElement,r=[].slice.call(n.childNodes),p._addStart)for(c=0,s=r[0];c<p._addStart;)r.splice(0,0,s),c++;if(p._removeStart)for(c=0,s=r[r.length-1];c<p._removeStart;){var h=r.shift();r.push(h),c++}u=r.length,o=[].slice.call(a.childNodes),l=o.length,o.forEach(function(e,n){var a;if(n<u){if(s=r[n],n<p._addStart?(a=p._getAnimation(t,2),p._setLoadBarAnimation(a,e,i,!1)):n>=u-p._removeStart?(a=p._getAnimation(t,2),p._setLoadBarAnimation(a,e,i,!1),a=p._getAnimation(t,0),p._removeBarAnimation(a,e,s,i)):(a=p._getAnimation(t,1),p._setMoveBarAnimation(a,s,e)),n===l-1&&n<u-1)for(a=p._getAnimation(t,0),n++;n<u;n++)s=r[n],p._removeBarAnimation(a,e,s,i)}else a=p._getAnimation(t,2),p._setLoadBarAnimation(a,e,i,!1)})},o.prototype._removeBarAnimation=function(t,e,n,i){var a=e.parentNode;a.appendChild(n),this._setLoadBarAnimation(t,n,i,!0,function(t){return function(){t.parentNode&&t.parentNode===a&&a.removeChild(t)}}(n))},o.prototype._playLoadScatterAnimation=function(t,e){var n=this,i=n._chart,o=i.series[e],r=n.animationMode,s=o.hostElement,u=o._xValues||i._xvals;0===u.length&&(u=o._pointIndexes),[].slice.call(s.childNodes).forEach(function(i,o){var s;s=r===a.Point?n._getScatterAnimation(t,u[o]):r===a.Series?n._getAnimation(t,e):n._getAnimation(t,0),n._setLoadScatterAnimation(s,i,!1)})},o.prototype._setLoadScatterAnimation=function(t,e,n,i){var a=this;void 0===n&&(n=!1);var o,r,s={},u={};"g"===e.nodeName&&e.childNodes?[].slice.call(e.childNodes).forEach(function(e){a._setLoadScatterAnimation(t,e,n,i)}):(["rx","ry","stroke-width"].forEach(function(t){var n=e.getAttribute(t);s[t]=0,u[t]=Number(n)}),o=n?u:s,r=n?s:u,this._setInitState(e,o,r),t.push({ele:e,from:o,to:r,done:i}))},o.prototype._setUpdateScatterAnimation=function(t,e,n,i){var a={},o={};["cx","cy"].forEach(function(t){var i=e.getAttribute(t),r=n.getAttribute(t);i!==r&&(a[t]=Number(i),o[t]=Number(r))}),this._setInitState(n,a,o),t.push({ele:n,from:a,to:o,done:i})},o.prototype._getScatterAnimation=function(t,e){var n=this._getScatterAnimationIndex(t,e);return t[n]||(t[n]=[]),t[n]},o.prototype._getScatterAnimationIndex=function(t,e){var n=this._chart.axisX,i=null==n.min?n.actualMin:n.min,a=null==n.max?n.actualMax:n.max;return Math.ceil((e-i)/((a-i)/20))},o.prototype._playScatterRemoveAnimation=function(t,e){var n=this,i=n._chart.series[0].hostElement.parentNode,a=n._getAnimation(t,0);i.appendChild(e),[].slice.call(e.childNodes).forEach(function(t){n._setLoadScatterAnimation(a,t,!0)}),a.length&&(a[0].done=function(){e&&e.parentNode===i&&i.removeChild(e)})},o.prototype._playScatterAddAnimation=function(t,e){var n=this,i=e.hostElement,a=this._getAnimation(t,0);[].slice.call(i.childNodes).forEach(function(t){n._setLoadScatterAnimation(a,t,!1)})},o.prototype._playScatterMoveAnimation=function(t,e,n){var i,a,o,r,s,u,l,c=this,p=(c._chart,c._getAnimation(t,0));if(i=e.hostElement,o=[].slice.call(n.childNodes),c._addStart)for(l=0,r=o[0];l<c._addStart;)o.splice(0,0,r),l++;if(c._removeStart)for(l=0,r=o[o.length-1];l<c._removeStart;){var h=o.shift();o.push(h),l++}s=o.length,a=[].slice.call(i.childNodes),u=a.length,a.forEach(function(t,e){if(e<s){if(e<c._addStart?c._setLoadScatterAnimation(p,t,!1):e>=s-c._removeStart?(c._setLoadScatterAnimation(p,t,!1),r=o[e],c._removeScatterAnimation(p,t,r)):(r=o[e],c._setUpdateScatterAnimation(p,r,t)),e===u-1&&e<s-1)for(e++;e<s;e++)r=o[e],c._removeScatterAnimation(p,t,r)}else c._setLoadScatterAnimation(p,t,!1)})},o.prototype._removeScatterAnimation=function(t,e,n){var i=e.parentNode;i.appendChild(n),this._setLoadScatterAnimation(t,n,!0,function(t){return function(){t.parentNode&&t.parentNode===i&&i.removeChild(t)}}(n))},o.prototype._playDefaultAnimation=function(e,n){var i,a=this._chart,o=a.series[n].hostElement,r=a._plotRect,s=a._currentRenderEngine,u=o.getAttribute("clip-path"),l="clipPath"+(1e6*Math.random()).toFixed();s.addClipRect(new t.Rect(r.left,r.top,0,r.height),l),o.setAttribute("clip-path","url(#"+l+")"),i=a.hostElement.querySelector("#"+l),this._getAnimation(e,0).push({ele:i.querySelector("rect"),from:{width:0},to:{width:r.width},done:function(){o&&(u?o.setAttribute("clip-path",u):o.removeAttribute("clip-path"),i&&i.parentNode&&i.parentNode.removeChild(i))}})},o}(r),l=function(t){function e(e,n){return t.call(this,e,n)||this}return __extends(e,t),e.prototype._getDurationAndDelay=function(e,n){var i=t.prototype._getDurationAndDelay.call(this,e,n);return this.animationMode===a.Point&&(i.duration=n/e,i.delay=n/e),i},e.prototype._playAxesAnimation=function(){},e.prototype._getChartType=function(e){var n=t.prototype._getChartType.call(this,e);return"Bar"===n&&(n="Column"),n},e.prototype._playLoadLineAnimation=function(t,e){var n,i,o,r=this,s=r._chart,u=r._chart.series[e],l=u._xValues||s._xvals,c=r.animationMode,p=u.hostElement;c===a.Point?(0===l.length&&(l=u._pointIndexes),o=[].slice.call(p.childNodes),i=o.length-p.querySelectorAll("ellipse").length,o.forEach(function(e,n){r._setRadarLinePointAnimation(t,e,n,l,i)})):(n=c===a.All?r._getAnimation(t,0):r._getAnimation(t,e),[].slice.call(p.childNodes).forEach(function(t){r._setLineRiseDiveAnimation(n,t,!0)}))},e.prototype._setRadarLinePointAnimation=function(t,e,n,i,a){var o,r,s,u,l,c,p,h=this,m=h._chart,d=e.nodeName,f=[],_=[],y=[],A=[],g=m._center,v=[],x=!1,E={},S={},b=0;if("polyline"===d||"polygon"===d){for(o=(u=e.points).length||u.numberOfItems,r=0;r<o;r++)v[p=h._getScatterAnimationIndex(t,i[r])]||(v[p]=[]),v[p].push(r),s=u[r]||u.getItem(r),f.push({x:g.x,y:g.y}),_.push({x:s.x,y:s.y});for(r=0,o=v.length;r<o;r++)v[r]&&(c=h._getAnimation(t,b),y=A.length?A.slice():f.slice(),A=y.slice(),v[r].forEach(function(t){var e=_[t];A[t]={x:e.x,y:e.y}}),S={},(E={})[d]=y,S[d]=A,x||(h._setInitState(e,E,S),x=!0),c.push({ele:e,from:E,to:S,done:l}),b++)}else if("ellipse"===d){if((r=n-(a||0))<0)return;c=m._isPolar?h._getScatterAnimation(t,i[r]):h._getScatterAnimation(t,r),h._toggleVisibility(e,!1),l=function(){h._toggleVisibility(e,!0)},c.push({ele:e,from:E,to:S,done:l})}},e.prototype._setLineRiseDiveAnimation=function(t,e,n){var i,a,o,r,s,u,l,c=this,p=c._chart,h=e.nodeName,m=[],d=[],f=p._center,_={},y={};if("polyline"===h||"polygon"===h){for(o=(u=e.points).length||u.numberOfItems,r=0;r<o;r++)s=u[r]||u.getItem(r),m.push({x:f.x,y:f.y}),d.push({x:s.x,y:s.y});_[h]=m,y[h]=d}else"ellipse"===h&&(c._toggleVisibility(e,!1),n&&(l=function(){c._toggleVisibility(e,!0)}));i=n?_:y,a=n?y:_,c._setInitState(e,i,a),t.push({ele:e,from:i,to:a,done:l})},e.prototype._parsePathByRadius=function(t,e,n){var i,a,o=t.center.x,r=t.center.y,s=t.radius,u=t.angle,l=t.sweep;i=[o,r,0,u,l,0],a=[o,r,s,u,l,t.innerRadius||0],e.pie=i,n.pie=a},e.prototype._playUpdateAnimation=function(e,n,i,a,o){if("Bar"===i||"Column"===i){if(null==a)return;this._playLoadBarAnimation(e,n,!1)}else t.prototype._playUpdateAnimation.call(this,e,n,i,a,o)},e.prototype._playLoadBarAnimation=function(t,e,n){void 0===n&&(n=!1);var i=this,o=i._chart,r=o.series[e],s=o._areas[e],u=i.animationMode,l=r.hostElement;[].slice.call(l.childNodes).forEach(function(n,o){var r,l,c={},p={};r=u===a.Point?i._getAnimation(t,o):u===a.Series?i._getAnimation(t,e):i._getAnimation(t,0),l=s[o],i._parsePathByRadius(l,c,p),i._setInitState(n,c,p),r.push({ele:n,from:c,to:p})})},e}(u),c=function(){function e(){}return e.playAnimations=function(t,n,a,o,r,s,u){void 0===r&&(r=i.Swing);var l=t.length,c=0,p=[];return t.forEach(function(t,i){var h=e.playAnimation(t,n[i],a[i],function(){c===l-1&&o&&o(),c++},r,s,u);p.push(h)}),p},e.playAnimation=function(t,n,a,o,r,s,u){void 0===r&&(r=i.Swing);var l=e.parseAttrs(n,a);return e.animate(function(n){e.setElementAttr(t,l,n)},o,r,s,u)},e.setElementAttr=function(t,n,i){var a,o;for(o in n)a=n[o],e.calcValue(a,i),t.setAttribute(o,a.getValue(a.value,i))},e.getPathDescOfPie=function(e,n,i,a,o,r){void 0===r&&(r=0);var s=!1;o>=2*Math.PI&&(s=!0,o=2*Math.PI-.001);var u=new t.Point(e,n);u.x+=i*Math.cos(a),u.y+=i*Math.sin(a);var l=a+o,c=new t.Point(e,n);if(c.x+=i*Math.cos(l),c.y+=i*Math.sin(l),r){var p=new t.Point(e,n);p.x+=r*Math.cos(l),p.y+=r*Math.sin(l);var h=new t.Point(e,n);h.x+=r*Math.cos(a),h.y+=r*Math.sin(a)}var m=" 0 0,1 ",d=" 0 0,0 ";Math.abs(o)>Math.PI&&(m=" 0 1,1 ",d=" 0 1,0 ");var f="M "+u.x.toFixed(3)+","+u.y.toFixed(3);return f+=" A "+i.toFixed(3)+","+i.toFixed(3)+m,f+=c.x.toFixed(3)+","+c.y.toFixed(3),r?(f+=s?" M "+p.x.toFixed(3)+","+p.y.toFixed(3):" L "+p.x.toFixed(3)+","+p.y.toFixed(3),f+=" A "+r.toFixed(3)+","+r.toFixed(3)+d,f+=h.x.toFixed(3)+","+h.y.toFixed(3)):f+=" L "+e.toFixed(3)+","+n.toFixed(3),s||(f+=" z"),f},e.parseAttrs=function(t,n){var i={};for(var a in t)if(null!=n[a])switch(a){case"polyline":i.points=e.parseAttr(t[a],n[a],function(t,e){if(1===e){for(var n,i,a;t.length>1;){if(i=t[0],a=t[1],i.x!==a.x||i.y!==a.y){i=null,a=null;break}t.splice(1,1)}for(n=t.length-1;n>0;n--)if(i=a,a=t[n],i){if(i.x!==a.x||i.y!==a.y)break;t.pop()}}return t.map(function(t){return t.x+","+t.y}).join(" ")});break;case"polygon":i.points=e.parseAttr(t[a],n[a],function(t,e){if(1===e){var n,i,a,o,r;for(o=t.pop(),r=t.pop();t.length>1;){if(i=t[0],a=t[1],i.x!==a.x||i.y!==a.y){i=null,a=null;break}t.splice(1,1)}for(n=t.length-1;n>=0;n--)if(i=a,a=t[n],i){if(i.x!==a.x||i.y!==i.y)break;t.splice(n,1)}t.push(r),t.push(o)}return t.map(function(t){return t.x+","+t.y}).join(" ")});break;case"d":i[a]=e.parseAttr(t[a],n[a],function(t){return t.map(function(t){return"string"==typeof t?t:t[0]+","+t[1]}).join(" ")});break;case"pie":i.d=e.parseAttr(t[a],n[a],function(t){return e.getPathDescOfPie.apply(e,t)});break;case"rotate":i.transform=e.parseAttr(t[a],n[a],function(t){return"rotate("+t.join(" ")+")"});break;case"width":case"height":case"rx":case"ry":case"stroke-width":i[a]=e.parseAttr(t[a],n[a],function(t){return Math.abs(t)});break;default:i[a]=e.parseAttr(t[a],n[a])}return i},e.animate=function(e,n,a,o,r){void 0===a&&(a=i.Swing),void 0===o&&(o=400),void 0===r&&(r=16),t.asFunction(e),t.asNumber(o,!1,!0),t.asNumber(r,!1,!0);var s=0,u=setInterval(function(){Date.now();var t=s/o;t=p[i[a]](t),e(t),(s+=r)>=o&&(clearInterval(u),(t<1||t>1)&&e(1),n&&n())},r);return u},e.calcValue=function(n,i){var a=n.from,o=n.diff,r=n.value;t.isNumber(a)?n.value=0===o?a:a+o*i:t.isArray(a)&&e.parseArrayAttr(r,a,o,function(t,e){return"number"==typeof t?t+e*i:t})},e.parseAttr=function(n,i,a){var o,r,s,u;return t.isArray(n)&&t.isArray(i)?(r=i,s=[],u=(o=n).slice(),e.parseArrayAttr(s,o,r,function(t,e){return t===e?0:e-t})):(u=o=Number(n),s=(r=Number(i))-o),{from:o,to:r,value:u,diff:s,getValue:a||function(t,e){return t}}},e.parseArrayAttr=function(e,n,i,a){n.forEach(function(n,o){var r={},s=[],u=i[o];t.isNumber(n)||"string"==typeof n?e[o]=a(n,u):t.isArray(n)?(n.forEach(function(t,e){s[e]=a(n[e],u[e])}),e[o]=s):(Object.getOwnPropertyNames(n).forEach(function(t){r[t]=a(n[t],u[t])}),e[o]=r)})},e}(),p=function(){function t(){}return t.Linear=function(t){return t},t.Swing=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},t.EaseInQuad=function(t){return t*t},t.EaseOutQuad=function(t){return t*(2-t)},t.EaseInOutQuad=function(t){return t<.5?2*t*t:(4-2*t)*t-1},t.EaseInCubic=function(t){return t*t*t},t.EaseOutCubic=function(t){return--t*t*t+1},t.EaseInOutCubic=function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},t.EaseInQuart=function(t){return t*t*t*t},t.EaseOutQuart=function(t){return 1- --t*t*t*t},t.EaseInOutQuart=function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},t.EaseInQuint=function(t){return t*t*t*t*t},t.EaseOutQuint=function(t){return 1+--t*t*t*t*t},t.EaseInOutQuint=function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t},t.EaseInSine=function(t){return 1-Math.cos(t*(Math.PI/2))},t.EaseOutSine=function(t){return Math.sin(t*(Math.PI/2))},t.EaseInOutSine=function(t){return-.5*(Math.cos(Math.PI*t)-1)},t.EaseInExpo=function(t){return 0==t?0:Math.pow(2,10*(t-1))},t.EaseOutExpo=function(t){return 1==t?1:1-Math.pow(2,-10*t)},t.EaseInOutExpo=function(t){return t==!!t?t:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},t.EaseInCirc=function(t){return-(Math.sqrt(1-t*t)-1)},t.EaseOutCirc=function(t){return Math.sqrt(1-Math.pow(t-1,2))},t.EaseInOutCirc=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},t.EaseInBack=function(t){var e=1.70158;return t*t*((e+1)*t-e)},t.EaseOutBack=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},t.EaseInOutBack=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},t.EaseInBounce=function(e){return 1-t.EaseOutBounce(1-e)},t.EaseOutBounce=function(t){var e=7.5625;return t<1/2.75?e*t*t:t<2/2.75?e*(t-=1.5/2.75)*t+.75:t<2.5/2.75?e*(t-=2.25/2.75)*t+.9375:e*(t-=2.625/2.75)*t+.984375},t.EaseInOutBounce=function(e){return e<.5?.5*t.EaseInBounce(2*e):.5*t.EaseOutBounce(2*e-1)+.5},t.EaseInElastic=function(t){return t==!!t?t:-Math.pow(2,10*(t-=1))*Math.sin((t-.075)*(2*Math.PI)/.3)},t.EaseOutElastic=function(t){return t==!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1},t.EaseInOutElastic=function(t){return t==!!t?t:(t*=2)<1?Math.pow(2,10*(t-=1))*Math.sin((t-.1125)*(2*Math.PI)/.45)*-.5:Math.pow(2,-10*(t-=1))*Math.sin((t-.1125)*(2*Math.PI)/.45)*.5+1},t}()}(e.animation||(e.animation={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.chart.animation.ChartAnimation);n.ChartAnimation=t})(t=n.animation||(n.animation={}))})(t=n.chart||(n.chart={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(t){var i;(function(t){var i=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.chart.animation.ChartAnimation);t.ChartAnimation=i})(i=t.animation||(t.animation={}))})(i=t.chart||(t.chart={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.ChartAnimation||(n.ChartAnimation={}))})(t=n.animation||(n.animation={}))})(t=n.chart||(n.chart={}))})(wijmo||(wijmo={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.initialize=function(n){var t=n.content;typeof window[t]=="function"&&(n.content=window[t]);wijmo.copy(this,n)},t.prototype._copy=function(n,t){return n==="positionChanged"?(typeof t=="function"&&this.positionChanged.addHandler(t),!0):!1},t}(wijmo.chart.LineMarker);n.LineMarker=t})(t=n.chart||(n.chart={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(t){var i=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.chart.LineMarker);t.LineMarker=i})(i=t.chart||(t.chart={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wijmo;!function(t){!function(e){!function(n){"use strict";var i;!function(t){t[t.DataIndex=0]="DataIndex",t[t.DataCoordinate=1]="DataCoordinate",t[t.Relative=2]="Relative",t[t.Absolute=3]="Absolute"}(i=n.AnnotationAttachment||(n.AnnotationAttachment={}));var o;!function(t){t[t.Center=0]="Center",t[t.Top=1]="Top",t[t.Bottom=2]="Bottom",t[t.Left=4]="Left",t[t.Right=8]="Right"}(o=n.AnnotationPosition||(n.AnnotationPosition={}));var r=function(){function n(t){this._resetDefaultValue(),t&&this._copy(this,t)}return Object.defineProperty(n.prototype,"attachment",{get:function(){return this._attachment},set:function(e){(e=t.asEnum(e,i))!=this._attachment&&(this._attachment=e,this._repaint())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"point",{get:function(){return this._point},set:function(t){null!=t.x&&null!=t.y&&(t.x===this._point.x&&t.y===this._point.y||(this._point=t,this._repaint()))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"seriesIndex",{get:function(){return this._seriesIndex},set:function(e){(e=t.asNumber(e,!1,!0))!=this._seriesIndex&&(this._seriesIndex=e,this._repaint())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pointIndex",{get:function(){return this._pointIndex},set:function(e){e!==this._pointIndex&&(this._pointIndex=t.asNumber(e,!1,!0),this._repaint())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"position",{get:function(){return this._position},set:function(t){t!=this._position&&(this._position=t,this._repaint())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"offset",{get:function(){return this._offset},set:function(t){null!=t.x&&null!=t.y&&(t.x===this._offset.x&&t.y===this._offset.y||(this._offset=t,this._repaint()))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"style",{get:function(){return null==this._style&&(this._style={}),this._style},set:function(t){t!=this._style&&(this._style=t,this._repaint())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){(e=t.asBoolean(e,!1))!=this._isVisible&&(this._isVisible=e,this._toggleVisibility(e))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tooltip",{get:function(){return this._tooltip},set:function(t){this._tooltip=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},set:function(t){this._name=t},enumerable:!0,configurable:!0}),n.prototype.render=function(t){var o,r=this;r._element=t.startGroup(r._getCSSClass()),t.fill="#88bde6",t.strokeWidth=1,t.stroke="#000000",r._render(t),t.endGroup(),r._element[n._DATA_KEY]=this,r._isVisible?r._attachment===i.DataIndex&&(!(o=r._layer._chart.series[r._seriesIndex])||o.visibility!==e.SeriesVisibility.Legend&&o.visibility!==e.SeriesVisibility.Hidden||r._toggleVisibility(!1)):r._toggleVisibility(!1)},n.prototype.destroy=function(){},n.prototype._copy=function(t,e){for(var n in e)n in t&&this._processOptions(n,t,e)},n.prototype._processOptions=function(t,e,n){e[t]=n[t]},n.prototype._resetDefaultValue=function(){var n=this;n._attachment=i.Absolute,n._point=new e.DataPoint(0,0),n._seriesIndex=0,n._pointIndex=0,n._position=o.Center,n._offset=new t.Point(0,0),n._isVisible=!0,n._tooltip=""},n.prototype._toggleVisibility=function(t){var e=t?"visible":"hidden";this._element&&this._element.setAttribute("visibility",e)},n.prototype._getCSSClass=function(){return n._CSS_ANNOTATION},n.prototype._render=function(t){this._element=null},n.prototype._repaint=function(){this._layer&&this._layer._renderAnnotation(this)},n.prototype._convertPoint=function(e){var n,o,r,s,a,_,l,h=this,p=h._attachment,u=new t.Point;switch(h._layer&&h._layer._chart&&(o=(n=h._layer._chart)._plotRect),p){case i.DataIndex:if(!n.series||n.series.length<=h.seriesIndex)break;if(a=n.series[h.seriesIndex],!(_=a._getItem(h.pointIndex)))break;r=a.axisX||n.axisX,s=a.axisY||n.axisY,"string"==typeof(l=_[a.bindingX]||_.x)&&(l=h.pointIndex),u.x=h._convertDataToLen(o.width,r,l),u.y=h._convertDataToLen(o.height,s,_[a._getBinding(0)]||s.actualMin+.25,!0);break;case i.DataCoordinate:r=n.axisX,s=n.axisY,u.x=h._convertDataToLen(o.width,r,e.x),u.y=h._convertDataToLen(o.height,s,e.y,!0);break;case i.Relative:u.x=o.width*e.x,u.y=o.height*e.y;break;case i.Absolute:default:u.x=e.x,u.y=e.y}return u},n.prototype._convertDataToLen=function(t,e,n,i){void 0===i&&(i=!1);var o=null==e.min?e.actualMin:e.min,r=null==e.max?e.actualMax:e.max;return i?t*(1-(n-o)/(r-o)):t*(n-o)/(r-o)},n.prototype._renderCenteredText=function(t,e,n,i,o,r){var s,a;this._isValidPoint(n)&&(o?e.drawStringRotated(t,n,n,o,i,r):e.drawString(t,n,i,r),(s=this._element.querySelector("text"))&&(a=s.getBBox(),s.setAttribute("x",(n.x-a.width/2).toFixed(1)),s.setAttribute("y",(n.y+a.height/6).toFixed(1))))},n.prototype._adjustOffset=function(t,e){t.x=t.x+e.x,t.y=t.y+e.y},n.prototype._getOffset=function(e){var n=this._getPositionOffset(e);return new t.Point(this._offset.x+n.x,this._offset.y+n.y)},n.prototype._getPositionOffset=function(e){var n=new t.Point(0,0),i=this.position,r=this._getSize(e);return(i&o.Top)===o.Top?n.y-=r.height/2:(i&o.Bottom)===o.Bottom&&(n.y+=r.height/2),(i&o.Left)===o.Left?n.x-=r.width/2:(i&o.Right)===o.Right&&(n.x+=r.width/2),n},n.prototype._getSize=function(e){return new t.Size},n.prototype._isValidPoint=function(t){return isFinite(t.x)&&isFinite(t.y)},n.prototype._measureString=function(t,e,n){var i,o=t;return o._textGroup&&null==o._textGroup.parentNode?(o._svg.appendChild(o._textGroup),i=o.measureString(e,n,null,this.style),o.endRender()):i=o.measureString(e,n,null,this.style),i},n._DATA_KEY="wj-chart-annotation",n._CSS_ANNOTATION="wjchart-annotation",n._CSS_ANNO_TEXT="anno-text",n._CSS_ANNO_SHAPE="anno-shape",n}();n.AnnotationBase=r;var s=function(e){function n(t){return e.call(this,t)||this}return __extends(n,e),n.prototype._resetDefaultValue=function(){e.prototype._resetDefaultValue.call(this),this._text="",this.position=o.Top},n.prototype._getCSSClass=function(){return e.prototype._getCSSClass.call(this)+" "+n._CSS_TEXT},Object.defineProperty(n.prototype,"text",{get:function(){return this._text},set:function(t){var e=this;t!==e._text&&(e._text=t,e._repaint())},enumerable:!0,configurable:!0}),n.prototype._render=function(t){var e,n=this,i=n._convertPoint(n.point);e=n._getOffset(t),n._adjustOffset(i,e),n._renderCenteredText(n._text,t,i,r._CSS_ANNO_TEXT,null,n.style)},n.prototype._getSize=function(e){return e?this._measureString(e,this._text,r._CSS_ANNO_TEXT):new t.Size},n._CSS_TEXT="wjchart-anno-text",n}(r);n.Text=s;var a=function(t){function e(e){return t.call(this,e)||this}return __extends(e,t),e.prototype._resetDefaultValue=function(){t.prototype._resetDefaultValue.call(this),this._content=""},e.prototype._getCSSClass=function(){return t.prototype._getCSSClass.call(this)+" "+e._CSS_SHAPE},Object.defineProperty(e.prototype,"content",{get:function(){return this._content},set:function(t){var e=this;t!==e._content&&(e._content=t,e._repaint())},enumerable:!0,configurable:!0}),e.prototype._render=function(t){var e=this;e._shapeContainer=t.startGroup(),t.stroke="#000",e._renderShape(t),t.stroke=null,t.endGroup(),e._content&&e._renderText(t)},e.prototype._getContentCenter=function(){return this.point},e.prototype._renderShape=function(t){},e.prototype._renderText=function(t){var e,n,i=this;e=i._convertPoint(i._getContentCenter()),i._isValidPoint(e)&&(n=i._getOffset(),i._adjustOffset(e,n),i._renderCenteredText(i._content,t,e,r._CSS_ANNO_TEXT))},e._CSS_SHAPE="wjchart-anno-shape",e}(r);n.Shape=a;var _=function(e){function n(t){return e.call(this,t)||this}return __extends(n,e),Object.defineProperty(n.prototype,"width",{get:function(){return this._width},set:function(e){e!==this._width&&(this._width=t.asNumber(e,!1,!0),this._repaint())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this._height},set:function(e){e!==this._height&&(this._height=t.asNumber(e,!1,!0),this._repaint())},enumerable:!0,configurable:!0}),n.prototype._resetDefaultValue=function(){e.prototype._resetDefaultValue.call(this),this._width=100,this._height=80},n.prototype._getCSSClass=function(){return e.prototype._getCSSClass.call(this)+" "+n._CSS_ELLIPSE},n.prototype._renderShape=function(t){e.prototype._renderShape.call(this,t);var n=this,i=n._convertPoint(n.point),o=n._width,s=n._height,a=n._getOffset();n._adjustOffset(i,a),n._isValidPoint(i)&&t.drawEllipse(i.x,i.y,o/2,s/2,r._CSS_ANNO_SHAPE,n.style)},n.prototype._getSize=function(){return new t.Size(this.width,this.height)},n._CSS_ELLIPSE="wjchart-anno-ellipse",n}(a);n.Ellipse=_;var l=function(e){function n(t){return e.call(this,t)||this}return __extends(n,e),Object.defineProperty(n.prototype,"width",{get:function(){return this._width},set:function(e){e!==this._width&&(this._width=t.asNumber(e,!1,!0),this._repaint())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this._height},set:function(e){e!==this._height&&(this._height=t.asNumber(e,!1,!0),this._repaint())},enumerable:!0,configurable:!0}),n.prototype._resetDefaultValue=function(){e.prototype._resetDefaultValue.call(this),this._width=100,this._height=80},n.prototype._getCSSClass=function(){return e.prototype._getCSSClass.call(this)+" "+n._CSS_RECTANGLE},n.prototype._renderShape=function(t){e.prototype._renderShape.call(this,t);var n=this,i=n._convertPoint(n.point),o=n._width,s=n._height,a=n._getOffset();n._adjustOffset(i,a),n._isValidPoint(i)&&t.drawRect(i.x-o/2,i.y-s/2,n._width,n._height,r._CSS_ANNO_SHAPE,n.style)},n.prototype._getSize=function(){return new t.Size(this.width,this.height)},n._CSS_RECTANGLE="wjchart-anno-rectangle",n}(a);n.Rectangle=l;var h=function(n){function i(t){return n.call(this,t)||this}return __extends(i,n),Object.defineProperty(i.prototype,"start",{get:function(){return this._start},set:function(t){var e=this;null!=t.x&&null!=t.y&&(t.x===e._start.x&&t.y===e._start.y||(e._start=t,e._repaint()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"end",{get:function(){return this._end},set:function(t){var e=this;null!=t.x&&null!=t.y&&(t.x===e._end.x&&t.y===e._end.y||(e._end=t,e._repaint()))},enumerable:!0,configurable:!0}),i.prototype._resetDefaultValue=function(){n.prototype._resetDefaultValue.call(this),this._start=new e.DataPoint(0,0),this._end=new e.DataPoint(0,0),this.position=o.Top},i.prototype._getCSSClass=function(){return n.prototype._getCSSClass.call(this)+" "+i._CSS_LINE},i.prototype._getContentCenter=function(){var t=this.start,n=this.end;return new e.DataPoint((t.x+n.x)/2,(t.y+n.y)/2)},i.prototype._renderShape=function(t){n.prototype._renderShape.call(this,t);var e,i=this,o=i._convertPoint(i._start),s=i._convertPoint(i._end);i._cS=o,i._cE=s,e=i._getOffset(),i._adjustOffset(o,e),i._adjustOffset(s,e),i._isValidPoint(o)&&i._isValidPoint(s)&&t.drawLine(o.x,o.y,s.x,s.y,r._CSS_ANNO_SHAPE,i.style)},i.prototype._getSize=function(){var e=this._cS,n=this._cE;return new t.Size(Math.abs(e.x-n.x),Math.abs(e.y-n.y))},i.prototype._renderText=function(t){var e,n,i,o=this,s=o._cS,a=o._cE;e=o._convertPoint(o._getContentCenter()),n=o._getOffset(),o._adjustOffset(e,n),o._isValidPoint(e)&&(i=(i=180*Math.atan2(a.y-s.y,a.x-s.x)/Math.PI)<-90?i+180:i>90?i-180:i,o._renderCenteredText(o.content,t,e,r._CSS_ANNO_TEXT,i))},i.prototype._renderCenteredText=function(t,e,i,o,r,s){if(null!=r){var a,_,l,h;l=this._measureString(e,t,o).height/2,h=r*Math.PI/180,a=l*Math.sin(h),_=l*Math.cos(h),i.x=i.x+a,i.y=i.y-_}n.prototype._renderCenteredText.call(this,t,e,i,o,r,s)},i._CSS_LINE="wjchart-anno-line",i}(a);n.Line=h;var p=function(n){function i(t){return n.call(this,t)||this}return __extends(i,n),i.prototype._processOptions=function(e,i,o){var r=this;if("points"===e){var s=o[e];t.isArray(s)&&s.forEach(function(t){r.points.push(t)})}else n.prototype._processOptions.call(this,e,i,o)},Object.defineProperty(i.prototype,"points",{get:function(){return this._points},enumerable:!0,configurable:!0}),i.prototype._resetDefaultValue=function(){var e=this;n.prototype._resetDefaultValue.call(this),e._points=new t.collections.ObservableArray,e._points.collectionChanged.addHandler(function(){e._element&&e._repaint()})},i.prototype._getCSSClass=function(){return n.prototype._getCSSClass.call(this)+" "+i._CSS_POLYGON},i.prototype._getContentCenter=function(){var t,n=this.points,i=n.length,o=0,r=0;for(t=0;t<i;t++)o+=n[t].x,r+=n[t].y;return new e.DataPoint(o/i,r/i)},i.prototype._renderShape=function(t){n.prototype._renderShape.call(this,t);var e,i,o=this,s=[],a=[],_=o._points,l=_.length,h=o._getOffset();for(e=0;e<l;e++){if(i=o._convertPoint(_[e]),!o._isValidPoint(i))return;o._adjustOffset(i,h),s.push(i.x),a.push(i.y)}t.drawPolygon(s,a,r._CSS_ANNO_SHAPE,o.style)},i.prototype._getSize=function(){var e,n,i,o,r,s,a,_=this,l=_._points.length;for(a=[].map.call(_._points,function(t){return _._convertPoint(t)}),r=0;r<l;r++)s=a[r],0!==r?(s.x<e?e=s.x:s.x>n&&(n=s.x),s.y<i?i=s.y:s.y>o&&(o=s.y)):(e=n=s.x,i=o=s.y);return new t.Size(n-e,o-i)},i._CSS_POLYGON="wjchart-anno-polygon",i}(a);n.Polygon=p;var u=function(e){function n(t){return e.call(this,t)||this}return __extends(n,e),Object.defineProperty(n.prototype,"radius",{get:function(){return this._radius},set:function(e){e!==this._radius&&(this._radius=t.asNumber(e,!1,!0),this._repaint())},enumerable:!0,configurable:!0}),n.prototype._resetDefaultValue=function(){e.prototype._resetDefaultValue.call(this),this._radius=100},n.prototype._getCSSClass=function(){return e.prototype._getCSSClass.call(this)+" "+n._CSS_CIRCLE},n.prototype._renderShape=function(t){e.prototype._renderShape.call(this,t);var n=this,i=n._convertPoint(n.point),o=n._getOffset();n._adjustOffset(i,o),n._isValidPoint(i)&&t.drawPieSegment(i.x,i.y,n.radius,0,360,r._CSS_ANNO_SHAPE,n.style)},n.prototype._getSize=function(){var e=2*this.radius;return new t.Size(e,e)},n._CSS_CIRCLE="wjchart-anno-circle",n}(a);n.Circle=u;var c=function(e){function n(t){return e.call(this,t)||this}return __extends(n,e),Object.defineProperty(n.prototype,"length",{get:function(){return this._length},set:function(e){e!==this._length&&(this._length=t.asNumber(e,!1,!0),this._repaint())},enumerable:!0,configurable:!0}),n.prototype._resetDefaultValue=function(){e.prototype._resetDefaultValue.call(this),this._length=100},n.prototype._getCSSClass=function(){return e.prototype._getCSSClass.call(this)+" "+n._CSS_SQUARE},n.prototype._renderShape=function(t){e.prototype._renderShape.call(this,t);var n=this,i=n._convertPoint(n.point),o=n.length,s=n._getOffset();n._adjustOffset(i,s),n._isValidPoint(i)&&t.drawRect(i.x-o/2,i.y-o/2,o,o,r._CSS_ANNO_SHAPE,n.style)},n.prototype._getSize=function(){return new t.Size(this.length,this.length)},n._CSS_SQUARE="wjchart-anno-square",n}(a);n.Square=c;var f=function(e){function n(t){return e.call(this,t)||this}return __extends(n,e),Object.defineProperty(n.prototype,"width",{get:function(){return this._width},set:function(e){e!==this._width&&(this._width=t.asNumber(e,!1,!0),this._repaint())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this._height},set:function(e){e!==this._height&&(this._height=t.asNumber(e,!1,!0),this._repaint())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"href",{get:function(){return this._href},set:function(t){t!==this._href&&(this._href=t,this._repaint())},enumerable:!0,configurable:!0}),n.prototype._resetDefaultValue=function(){e.prototype._resetDefaultValue.call(this),this._width=100,this._height=100,this._href=""},n.prototype._getCSSClass=function(){return e.prototype._getCSSClass.call(this)+" "+n._CSS_IMAGE},n.prototype._renderShape=function(t){e.prototype._renderShape.call(this,t);var n=this,i=n._convertPoint(n.point),o=n._href,r=n.width,s=n.height,a=n._getOffset();o.length>0&&n._isValidPoint(i)&&(n._adjustOffset(i,a),t.drawImage(o,i.x-r/2,i.y-s/2,r,s)),n._applyStyle(n._element,n.style)},n.prototype._getSize=function(){return new t.Size(this.width,this.height)},n.prototype._applyStyle=function(t,e){if(e)for(var n in e)t.setAttribute(this._deCase(n),e[n])},n.prototype._deCase=function(t){return t.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()})},n._CSS_IMAGE="wjchart-anno-image",n}(a);n.Image=f}(e.annotation||(e.annotation={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));var wijmo;!function(t){!function(e){!function(n){"use strict";var i=function(){function i(e,n){var i=this;i._init(e),i._renderGroup(),i._bindTooltip(),n&&t.isArray(n)&&n.forEach(function(e){var n,o=e.type||"Circle";t.chart.annotation[o]&&(n=new t.chart.annotation[o](e),i._items.push(n))})}return i.prototype._init=function(e){var n=this;n._items=new t.collections.ObservableArray,n._items.collectionChanged.addHandler(n._itemsChanged,n),n._chart=e,n._forceTTShowing=!1,n._annoTTShowing=!1,n._engine=e._currentRenderEngine,e.rendered.addHandler(n._renderAnnotations,n),e.lostFocus.addHandler(n._lostFocus,n)},i.prototype._lostFocus=function(t){this._toggleTooltip(this._tooltip,t,this._chart.hostElement)},Object.defineProperty(i.prototype,"items",{get:function(){return this._items},enumerable:!0,configurable:!0}),i.prototype.getItem=function(t){var e=this.getItems(t);return e.length>0?e[0]:null},i.prototype.getItems=function(t){var e=[];if(0===this._items.length||!t||""===t)return e;for(var n=0;n<this._items.length;n++)t===this._items[n].name&&e.push(this._items[n]);return e},i.prototype._bindTooltip=function(){var n,i=this,o=i._chart.hostElement,r=i._tooltip;r||(r=i._tooltip=new e.ChartTooltip,n=t.Tooltip.prototype.hide,t.Tooltip.prototype.hide=function(){i._forceTTShowing||n.call(r)}),o&&(o.addEventListener("click",function(t){i._toggleTooltip(r,t,o)}),o.addEventListener("mousemove",function(t){i._showTooltip()&&i._toggleTooltip(r,t,o)}))},i.prototype._showTooltip=function(){return!this._chart.isTouching},i.prototype._toggleTooltip=function(e,n,i){var o=this,r=o._getAnnotation(n.target,i);if(r&&r.tooltip)o._forceTTShowing=!0,o._annoTTShowing=!0,e.show(o._layerEle,r.tooltip,new t.Rect(n.clientX,n.clientY,5,5));else{if(!o._annoTTShowing)return;o._annoTTShowing=!1,o._forceTTShowing=!1,e.hide()}},i.prototype._getAnnotation=function(t,e){var i=this._getAnnotationElement(t,e);return null==i?null:i[n.AnnotationBase._DATA_KEY]},i.prototype._getAnnotationElement=function(e,i){if(!e||!i)return null;var o=e.parentNode;return t.hasClass(e,n.AnnotationBase._CSS_ANNOTATION)?e:null==o||o===document.body||o===document||o===i?null:this._getAnnotationElement(o,i)},i.prototype._itemsChanged=function(e,n){var i=n.action,o=n.item;switch(i){case t.collections.NotifyCollectionChangedAction.Add:case t.collections.NotifyCollectionChangedAction.Change:o._layer=this,this._renderAnnotation(o);break;case t.collections.NotifyCollectionChangedAction.Remove:this._destroyAnnotation(o)}},i.prototype._renderAnnotations=function(){var t,e=this.items,n=e.length;for(this._renderGroup(),t=0;t<n;t++)this._renderAnnotation(e[t])},i.prototype._renderGroup=function(){var t=this,e=t._engine,n=t._chart._plotRect;n&&(t._layerEle&&null!=t._layerEle.parentNode||(t._plotrectId="plotRect"+(1e6*Math.random()).toFixed(),e.addClipRect({left:0,top:0,width:n.width,height:n.height},t._plotrectId),t._layerEle=e.startGroup(i._CSS_Layer,t._plotrectId),t._layerEle.setAttribute("transform","translate("+n.left+", "+n.top+")"),e.endGroup()))},i.prototype._renderAnnotation=function(t){this._layerEle&&null!=this._layerEle.parentNode&&(t._element&&t._element.parentNode==this._layerEle&&this._layerEle.removeChild(t._element),t.render(this._engine),this._layerEle.appendChild(t._element))},i.prototype._destroyAnnotations=function(){var t,e=this.items,n=e.length;for(t=0;t<n;t++)this._destroyAnnotation(e[t])},i.prototype._destroyAnnotation=function(t){this._layerEle&&this._layerEle.removeChild(t._element),t.destroy()},i._CSS_Layer="wj-chart-annotationlayer",i}();n.AnnotationLayer=i}(e.annotation||(e.annotation={}))}(t.chart||(t.chart={}))}(wijmo||(wijmo={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var t;(function(n){var t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.chart.annotation.AnnotationLayer);n.AnnotationLayer=t})(t=n.annotation||(n.annotation={}))})(t=n.chart||(n.chart={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(t){var i;(function(t){var i=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(n.chart.annotation.AnnotationLayer);t.AnnotationLayer=i})(i=t.annotation||(t.annotation={}))})(i=t.chart||(t.chart={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.AnnotationBase||(n.AnnotationBase={}))})(t=n.annotation||(n.annotation={}))})(t=n.chart||(n.chart={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Circle||(n.Circle={}))})(t=n.annotation||(n.annotation={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Ellipse||(n.Ellipse={}))})(t=n.annotation||(n.annotation={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Image||(n.Image={}))})(t=n.annotation||(n.annotation={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Line||(n.Line={}))})(t=n.annotation||(n.annotation={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Polygon||(n.Polygon={}))})(t=n.annotation||(n.annotation={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Rectangle||(n.Rectangle={}))})(t=n.annotation||(n.annotation={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Shape||(n.Shape={}))})(t=n.annotation||(n.annotation={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Square||(n.Square={}))})(t=n.annotation||(n.annotation={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.Text||(n.Text={}))})(t=n.annotation||(n.annotation={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.AnnotationLayer||(n.AnnotationLayer={}))})(t=n.annotation||(n.annotation={}))})(t=n.chart||(n.chart={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wijmo;!function(e){!function(t){var n=function(n){function i(r,s){var o=n.call(this,r)||this;o._itmPath=new t._BindingArray("items"),o._dspPath=new t._BindingArray("header"),o._imgPath=new t._BindingArray,o._html=!1,o._animated=!0,o._xpndOnClick=!0,o._autoColl=!0,o._showChk=!1,o._srch="",o._isReadOnly=!0,o.itemsSourceChanged=new e.Event,o.loadingItems=new e.Event,o.loadedItems=new e.Event,o.itemClicked=new e.Event,o.selectedItemChanged=new e.Event,o.checkedItemsChanged=new e.Event,o.isCollapsedChanging=new e.Event,o.isCollapsedChanged=new e.Event,o.isCheckedChanging=new e.Event,o.isCheckedChanged=new e.Event,o.formatItem=new e.Event,o.dragStart=new e.Event,o.dragOver=new e.Event,o.drop=new e.Event,o.dragEnd=new e.Event,o.nodeEditStarting=new e.Event,o.nodeEditStarted=new e.Event,o.nodeEditEnding=new e.Event,o.nodeEditEnded=new e.Event;var a=o.getTemplate();o.applyTemplate("wj-control wj-content wj-treeview",a,{_root:"root"});var l=o.hostElement;return e.setAttribute(l,"role","tree",!0),e.addClass(o._root,i._CNDL),e.setAttribute(o._root,"role","group",!0),o.addEventListener(l,"mousedown",o._mousedown.bind(o)),o.addEventListener(l,"click",o._click.bind(o)),o.addEventListener(l,"keydown",o._keydown.bind(o)),o.addEventListener(l,"keypress",o._keypress.bind(o)),o.addEventListener(l,"wheel",function(e){l.scrollHeight>l.offsetHeight&&(e.deltaY<0&&0==l.scrollTop||e.deltaY>0&&l.scrollTop+l.offsetHeight>=l.scrollHeight)&&(e.preventDefault(),e.stopPropagation())}),o.addEventListener(l,"blur",function(t){o._edtNode&&!e.contains(o._edtNode.element,e.getActiveElement())&&o.finishEditing()},!0),o.initialize(s),o.refresh(),o}return __extends(i,n),Object.defineProperty(i.prototype,"itemsSource",{get:function(){return this._items},set:function(t){this._items!=t&&(this._items=e.asArray(t),this.onItemsSourceChanged(),this._reload())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"childItemsPath",{get:function(){return this._itmPath.path},set:function(e){e!=this.childItemsPath&&(this._itmPath.path=e,this._reload())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"displayMemberPath",{get:function(){return this._dspPath.path},set:function(e){e!=this.displayMemberPath&&(this._dspPath.path=e,this._reload())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"imageMemberPath",{get:function(){return this._imgPath.path},set:function(e){e!=this.imageMemberPath&&(this._imgPath.path=e,this._reload())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isContentHtml",{get:function(){return this._html},set:function(t){t!=this._html&&(this._html=e.asBoolean(t),this._reload())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"showCheckboxes",{get:function(){return this._showChk},set:function(t){t!=this._showChk&&(this._showChk=e.asBoolean(t),this._reload())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"autoCollapse",{get:function(){return this._autoColl},set:function(t){this._autoColl=e.asBoolean(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAnimated",{get:function(){return this._animated},set:function(t){t!=this._animated&&(this._animated=e.asBoolean(t))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isReadOnly",{get:function(){return this._isReadOnly},set:function(t){this._isReadOnly=e.asBoolean(t),e.toggleClass(this.hostElement,"wj-state-readonly",this.isReadOnly)},enumerable:!0,configurable:!0}),i.prototype.startEditing=function(n){if(this.isReadOnly)return!1;if(n||(n=this.selectedNode),!n||n.isDisabled)return!1;if(!this.finishEditing())return!1;var r=n.element.querySelector("."+i._CNDT);if(!r)return!1;var s=new t.TreeNodeEventArgs(n);if(!this.onNodeEditStarting(s))return!1;r.tabIndex=0,r.focus(),r.contentEditable="true",r.style.cursor="auto";var o=document.createRange();o.selectNodeContents(r);var a=getSelection();return a.removeAllRanges(),a.addRange(o),r.focus(),e.setAttribute(r,"autocomplete","off"),e.setAttribute(r,"autocorrect","off"),this._edtNode=n,this.onNodeEditStarted(s),!0},i.prototype.finishEditing=function(e){var n=this._edtNode;if(n){var r=n.element.querySelector("."+i._CNDT);if(!r)return!1;var s=new t.TreeNodeEventArgs(n);if(!this.onNodeEditEnding(s))return!1;var o=n.dataItem,a=n.level;this.isContentHtml?e?r.innerHTML=this._dspPath.getValue(o,a):this._dspPath.setValue(o,a,r.innerHTML):e?r.textContent=this._dspPath.getValue(o,a):this._dspPath.setValue(o,a,r.textContent),document.createRange().selectNodeContents(r),getSelection().removeAllRanges(),r.contentEditable="false",r.style.cursor="",this._edtNode=null,this.onNodeEditEnded(s)}return!0},Object.defineProperty(i.prototype,"allowDragging",{get:function(){return null!=this._dd},set:function(n){if(n!=this.allowDragging){e.asBoolean(n)?this._dd=new t._TreeDragDropManager(this):(this._dd.dispose(),this._dd=null);for(var r=this.hostElement.querySelectorAll("."+i._CND),s=0;s<r.length;s++){var o=r[s];e.setAttribute(o,"draggable",!!this._dd||null)}}},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"expandOnClick",{get:function(){return this._xpndOnClick},set:function(t){this._xpndOnClick=e.asBoolean(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedItem",{get:function(){return this._selNode?this._selNode.dataItem:null},set:function(e){e!=this.selectedItem&&(this.selectedNode=e?this.getNode(e):null)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedNode",{get:function(){return this._selNode},set:function(t){t!=this.selectedNode&&(this._prevSel=this._selNode,t?t.select():this._selNode&&(e.removeClass(this._selNode.element,i._CSEL),this._selNode=null,this.onSelectedItemChanged()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedPath",{get:function(){for(var e=[],t=this.selectedNode;t;t=t.parentNode){var n=this._dspPath.getValue(t.dataItem,t.level);e.splice(0,0,n)}return e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"checkedItems",{get:function(){if(null==this._chkItems){var e=i,t="."+e._CND+"."+e._CEMP+" > input:checked."+e._CNDC,n=this._root.querySelectorAll(t);this._chkItems=[];for(var r=0;r<n.length;r++){var s=n[r].parentElement[e._DATAITEM_KEY];this._chkItems.push(s)}}return this._chkItems},set:function(e){if(this.showCheckboxes)for(var n=i,r="."+n._CND+"."+n._CEMP,s=this._root.querySelectorAll(r),o=0;o<s.length;o++){var a=new t.TreeNode(this,s[o]),l=e.indexOf(a.dataItem)>-1;a.isChecked!=l&&(a.isChecked=l)}},enumerable:!0,configurable:!0}),i.prototype.checkAllItems=function(e){if(this.showCheckboxes)for(var n=i,r="."+n._CND+"."+n._CEMP,s=this._root.querySelectorAll(r),o=0;o<s.length;o++){var a=new t.TreeNode(this,s[o]);a.isChecked!=e&&(a.isChecked=e)}},Object.defineProperty(i.prototype,"totalItemCount",{get:function(){return this.hostElement.querySelectorAll("."+i._CND).length},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"lazyLoadFunction",{get:function(){return this._lazyLoad},set:function(t){t!=this._lazyLoad&&(this._lazyLoad=e.asFunction(t),this._reload())},enumerable:!0,configurable:!0}),i.prototype.getFirstNode=function(e,n){var r=this.hostElement.querySelector("."+i._CND),s=r?new t.TreeNode(this,r):null;return e&&s&&!s.element.offsetHeight&&(s=s.next(e,n)),n&&s&&s.isDisabled&&(s=s.next(e,n)),s},i.prototype.getLastNode=function(e,n){var r=this.hostElement.querySelectorAll("."+i._CND+":last-child"),s=r.length?new t.TreeNode(this,r[r.length-1]):null;return e&&s&&!s.element.offsetHeight&&(s=s.previous(e,n)),n&&s&&s.isDisabled&&(s=s.previous(e,n)),s},Object.defineProperty(i.prototype,"nodes",{get:function(){return t.TreeNode._getChildNodes(this,this._root)},enumerable:!0,configurable:!0}),i.prototype.getNode=function(e){this._isDirty&&this._loadTree();for(var n=this.hostElement.querySelectorAll("."+i._CND),r=0;r<n.length;r++){var s=n[r];if(s[i._DATAITEM_KEY]==e)return new t.TreeNode(this,s)}return null},i.prototype.addChildNode=function(e,n){var i=this._createNode(n),r=this.nodes;return r?e<r.length?i.move(r[e],t.DropPosition.Before):i.move(r[r.length-1],t.DropPosition.After):i.move(this,t.DropPosition.Into),i},i.prototype.collapseToLevel=function(e){var t=this._animated,n=this._autoColl;this._animated=this._autoColl=!1,this._collapseToLevel(this.nodes,e,0),this._animated=t,this._autoColl=n},i.prototype.loadTree=function(e){this._loadTree(e)},i.prototype.onItemsSourceChanged=function(e){this.itemsSourceChanged.raise(this,e)},i.prototype.onLoadingItems=function(e){return this.loadingItems.raise(this,e),!e.cancel},i.prototype.onLoadedItems=function(e){this.loadedItems.raise(this,e)},i.prototype.onItemClicked=function(e){this.itemClicked.raise(this,e)},i.prototype.onSelectedItemChanged=function(e){this.selectedItemChanged.raise(this,e)},i.prototype.onCheckedItemsChanged=function(e){this._chkItems=null,this.checkedItemsChanged.raise(this,e)},i.prototype.onIsCollapsedChanging=function(e){return this.isCollapsedChanging.raise(this,e),!e.cancel},i.prototype.onIsCollapsedChanged=function(e){this.isCollapsedChanged.raise(this,e)},i.prototype.onIsCheckedChanging=function(e){return this.isCheckedChanging.raise(this,e),!e.cancel},i.prototype.onIsCheckedChanged=function(e){this.isCheckedChanged.raise(this,e)},i.prototype.onFormatItem=function(e){this.formatItem.raise(this,e)},i.prototype.onDragStart=function(e){return this.dragStart.raise(this,e),!e.cancel},i.prototype.onDragOver=function(e){return this.dragOver.raise(this,e),!e.cancel},i.prototype.onDrop=function(e){return this.drop.raise(this,e),!e.cancel},i.prototype.onDragEnd=function(e){this.dragEnd.raise(this,e)},i.prototype.onNodeEditStarting=function(e){return this.nodeEditStarting.raise(this,e),!e.cancel},i.prototype.onNodeEditStarted=function(e){this.nodeEditStarted.raise(this,e)},i.prototype.onNodeEditEnding=function(e){return this.nodeEditEnding.raise(this,e),!e.cancel},i.prototype.onNodeEditEnded=function(e){this.nodeEditEnded.raise(this,e)},i.prototype.refresh=function(e){void 0===e&&(e=!0),n.prototype.refresh.call(this,e),!this.isUpdating&&this._isDirty&&this._loadTree()},i.prototype._raiseCheckedItemsChanged=function(){var e=this;this._toItemsChanged&&clearTimeout(this._toItemsChanged),this._toItemsChanged=setTimeout(function(){e._toItemsChanged=null,e.onCheckedItemsChanged()},10)},i.prototype._reload=function(){this._isDirty=!0,this.invalidate()},i.prototype._createNode=function(e){return new i(document.createElement("div"),{childItemsPath:this.childItemsPath,displayMemberPath:this.displayMemberPath,imageMemberPath:this.imageMemberPath,isContentHtml:this.isContentHtml,showCheckboxes:this.showCheckboxes,itemsSource:[e]}).getFirstNode()},i.prototype._mousedown=function(n){if(!n.defaultPrevented){var r=e.closest(n.target,"input."+i._CNDC),s=e.closestClass(n.target,i._CND),o=s?new t.TreeNode(this,s):null;o&&!o.isDisabled&&(this.selectedNode=o),this._dnIndet=r&&r.indeterminate}},i.prototype._click=function(n){if(!n.defaultPrevented){var r=e.closestClass(n.target,i._CND);if(r){var s=new t.TreeNode(this,r),o=e.closest(n.target,"input."+i._CNDC);if(s.isDisabled)return;if(!o&&s.equals(this._edtNode))return;if(r.focus(),o&&(n.preventDefault(),n.stopPropagation(),setTimeout(function(){o.indeterminate=!1,s.isChecked=!s.isChecked})),!o){var a=n.target,l=(n.ctrlKey||n.metaKey)&&!s.hasPendingChildren,d=r.getBoundingClientRect(),h=!1;(this.rightToLeft?d.right-n.clientX:n.clientX-d.left)<=a.offsetHeight?(l?this.collapseToLevel(s.isCollapsed?s.level+1:s.level):s.isCollapsed=!s.isCollapsed,h=!0):this.expandOnClick&&s.isCollapsed&&(l?this.collapseToLevel(s.level):s.isCollapsed=!1,h=!0),h&&l&&this.selectedNode&&this.selectedNode.ensureVisible(),h||this.isReadOnly||this.selectedNode&&this.selectedNode.equals(this._prevSel)&&this.startEditing()}this.selectedItem&&this.onItemClicked()}}},i.prototype._keydown=function(t){if(!t.defaultPrevented){var n=this._selNode,i=void 0,r=t.keyCode,s=!0;if(n&&!n.isDisabled){switch(r){case e.Key.F2:this.startEditing(),t.preventDefault();break;case e.Key.Escape:this.finishEditing(!0),t.preventDefault();break;case e.Key.Up:case e.Key.Down:this.finishEditing();break;case e.Key.Enter:this._edtNode?(this.finishEditing(),r=e.Key.Down):(this.startEditing(),t.preventDefault())}if(this._edtNode)return;if(this.rightToLeft)switch(r){case e.Key.Left:r=e.Key.Right;break;case e.Key.Right:r=e.Key.Left}switch(r){case e.Key.Left:!n.isCollapsed&&n.hasChildren?n.setCollapsed(!0):(n=n.parentNode)&&n.select();break;case e.Key.Right:n.setCollapsed(!1);break;case e.Key.Up:i=n.previous(!0,!0);break;case e.Key.Down:i=n.next(!0,!0);break;case e.Key.Home:i=this.getFirstNode(!0,!0);break;case e.Key.End:i=this.getLastNode(!0,!0);break;case e.Key.Space:if(this.selectedItem){var o=n.checkBox;o&&(n.isChecked=!o.checked)}break;case e.Key.Enter:this.selectedItem&&this.onItemClicked();break;default:s=!1}s&&(t.preventDefault(),i&&i.select())}}},i.prototype._keypress=function(t){var n=this;if(!t.defaultPrevented){if(t.ctrlKey||t.metaKey||t.altKey)return;if(t.target instanceof HTMLInputElement)return;if(this._edtNode)return;if(t.charCode>32&&this.startEditing(this.selectedNode)){var r=e.getActiveElement();if(e.contains(this._edtNode.element,r)){r.textContent=String.fromCharCode(t.charCode),t.preventDefault();var s=document.createRange();s.selectNodeContents(r),s.collapse(!1);var o=getSelection();o.removeAllRanges(),o.addRange(s)}return}if(t.charCode>32||32==t.charCode&&this._srch){t.preventDefault(),this._srch+=String.fromCharCode(t.charCode).toLowerCase(),this._toSrch&&clearTimeout(this._toSrch),this._toSrch=setTimeout(function(){n._toSrch=null,n._srch=""},i._AS_DLY);var a=this._findNext();null==a&&this._srch.length>1&&(this._srch=this._srch[this._srch.length-1],a=this._findNext()),null!=a&&(this.selectedItem=a)}}},i.prototype._findNext=function(){if(this.hostElement&&this.selectedItem){var e=this.getNode(this.selectedItem),t=e,n=!1,i=!1;for(1==this._srch.length&&(i=!0);t;){if(!t.isDisabled&&!i&&0==t.element.textContent.trim().toLowerCase().indexOf(this._srch))return t.dataItem;var r=t.next(!0,!0);if(r==e&&n)break;r||n||(r=this.getFirstNode(!0,!0),n=!0),t=r,i=!1}}return null},i.prototype._loadTree=function(n){var r=this._root;if(r){if(!this.onLoadingItems(new e.CancelEventArgs))return;this._isDirty=!1;var s=this.containsFocus(),o=this.selectedItem;this.selectedItem=null,this._chkItems=null,this._ldLvl=-1;var a=void 0;if(n&&e.isFunction(window.Map)){a=new Map;for(var l=this.hostElement.querySelectorAll("."+i._CND),d=0;d<l.length;d++){h=l[d];e.hasClass(h,i._CCLD)&&a.set(h[i._DATAITEM_KEY],!0)}}if(r.innerHTML="",this._items)for(d=0;d<this._items.length;d++)this._addItem(r,0,this._items[d]);if(a)for(var l=this.hostElement.querySelectorAll("."+i._CND),d=0;d<l.length;d++){var h=l[d],c=t.TreeNode._isNodeList(h),u=a.get(h[i._DATAITEM_KEY]);e.toggleClass(h,i._CCLD,1==u),e.setAttribute(h,"aria-expanded",c?(!u).toString():null)}s&&!this.containsFocus()&&this.focus(),this.selectedItem=o,this.onLoadedItems(),this._ldLvl=-1}},i.prototype._addItem=function(n,r,s){var o=this._dspPath.getValue(s,r),a=this._imgPath.getValue(s,r),l=e.asArray(this._itmPath.getValue(s,r),!0),d=document.createElement("div");e.addClass(d,i._CND),d.tabIndex=0,e.setAttribute(d,"role","treeitem",!0);var h=document.createElement("span");if(this.isContentHtml?h.innerHTML=o:h.textContent=o,e.addClass(h,i._CNDT),d.appendChild(h),a){var c=document.createElement("img");c.src=a,d.insertBefore(c,d.firstChild)}if(this._showChk&&!this._lazyLoad){var u=document.createElement("input");u.type="checkbox",u.tabIndex=-1,e.addClass(u,i._CNDC),d.insertBefore(u,d.firstChild)}if(this._dd&&d.setAttribute("draggable","true"),n.appendChild(d),d[i._DATAITEM_KEY]=s,l&&0==l.length&&!this.lazyLoadFunction&&(l=null),l){var p=!0;if(r>this._ldLvl?(this._ldLvl=r,0==l.length&&(e.addClass(d,i._CCLD),p=!1)):(e.addClass(d,i._CCLD),p=!1,r<this._ldLvl&&(this._ldLvl=1e4)),l.length>0){var _=document.createElement("div");e.addClass(_,i._CNDL);for(var f=0;f<l.length;f++)this._addItem(_,r+1,l[f]);n.appendChild(_),e.setAttribute(d,"aria-expanded",p.toString(),!0),e.setAttribute(_,"role","group",!0)}}else e.addClass(d,i._CEMP);this.formatItem.hasHandlers&&this.onFormatItem(new t.FormatNodeEventArgs(s,d,r))},i.prototype._collapseToLevel=function(e,t,n){for(var i=0;i<e.length;i++){var r=e[i];r.hasPendingChildren||(r.isCollapsed=n>=t,r.hasChildren&&this._collapseToLevel(r.nodes,t,n+1))}},i.prototype._lazyLoadNode=function(t){var n=this.hostElement;e.hasClass(n,i._CLDG)||(e.addClass(n,i._CLDG),e.addClass(t.element,i._CLDG),this.lazyLoadFunction(t,this._lazyLoadCallback.bind(t)))},i.prototype._lazyLoadCallback=function(e){var t=this;t.treeView._lazyLoadNodeDone(t,e)},i.prototype._lazyLoadNodeDone=function(t,n){var r=i;e.removeClass(t.element,r._CLDG),e.removeClass(this.hostElement,r._CLDG);var s=t.dataItem,o=t.level,a=e.asArray(n,!0);if(null==a||0==a.length)this._itmPath.setValue(s,o,null),e.addClass(t.element,r._CEMP);else if(a.length){this._itmPath.setValue(s,o,a);var l=document.createElement("div"),d=t.element;e.addClass(l,r._CNDL),d.parentElement.insertBefore(l,d.nextSibling);for(var h=0;h<a.length;h++)this._addItem(l,o+1,a[h]);t.isCollapsed=!1}},i._DATAITEM_KEY="wj-Data-Item",i._AS_DLY=600,i._AN_DLY=200,i._CND="wj-node",i._CNDL="wj-nodelist",i._CEMP="wj-state-empty",i._CNDT="wj-node-text",i._CNDC="wj-node-check",i._CSEL="wj-state-selected",i._CCLD="wj-state-collapsed",i._CCLG="wj-state-collapsing",i._CLDG="wj-state-loading",i.controlTemplate='<div wj-part="root"></div>',i}(e.Control);t.TreeView=n}(e.nav||(e.nav={}))}(wijmo||(wijmo={}));var wijmo;!function(e){!function(t){var n=function(){function n(t,i){e.hasClass(i,"wj-treeview")?(t=e.Control.getControl(i),i=null):n._assertNode(i),this._t=t,this._e=i}return Object.defineProperty(n.prototype,"dataItem",{get:function(){return this._e[t.TreeView._DATAITEM_KEY]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"element",{get:function(){return this._e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"treeView",{get:function(){return this._t},enumerable:!0,configurable:!0}),n.prototype.ensureVisible=function(){for(var e=this.parentNode;e;e=e.parentNode)e.isCollapsed=!1;var t=this._t.hostElement,n=this.element.getBoundingClientRect(),i=t.getBoundingClientRect();n.bottom>i.bottom?t.scrollTop+=n.bottom-i.bottom:n.top<i.top&&(t.scrollTop-=i.top-n.top)},n.prototype.equals=function(e){return null!=e&&e.element==this.element},n.prototype.select=function(){var n=this._t,i=n._selNode;this.equals(i)||(i&&e.removeClass(i.element,t.TreeView._CSEL),n._selNode=this,e.addClass(this.element,t.TreeView._CSEL),this.ensureVisible(),n.containsFocus()&&this.element.focus(),n.onSelectedItemChanged())},Object.defineProperty(n.prototype,"index",{get:function(){for(var e=0,t=this._pse(this.element);t;t=this._pse(t))n._isNode(t)&&e++;return e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"parentNode",{get:function(){var e=null;if(this._e){var t=this._e.parentElement;n._assertNodeList(t),e=this._pse(t)}return e?new n(this._t,e):null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"level",{get:function(){for(var e=-1,t=this;t;t=t.parentNode)e++;return e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hasChildren",{get:function(){return n._isNode(this._e)&&!n._isEmpty(this._e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hasPendingChildren",{get:function(){return this.isCollapsed&&this.hasChildren&&!n._isNodeList(this.element.nextElementSibling)&&e.isFunction(this._t.lazyLoadFunction)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nodes",{get:function(){return this.hasChildren?n._getChildNodes(this._t,this._e.nextSibling):null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"checkBox",{get:function(){return this._e.querySelector("input."+t.TreeView._CNDC)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isCollapsed",{get:function(){return this.hasChildren&&e.hasClass(this._e,t.TreeView._CCLD)},set:function(n){if(n!=this.isCollapsed){var i=this._t,r=new t.TreeNodeEventArgs(this);i.onIsCollapsedChanging(r)&&(this.setCollapsed(e.asBoolean(n),i.isAnimated,i.autoCollapse),i.onIsCollapsedChanged(r))}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isChecked",{get:function(){var e=this.checkBox;return e&&!e.indeterminate?e.checked:null},set:function(n){if(n!=this.isChecked){var i=this._t,r=new t.TreeNodeEventArgs(this);i.onIsCheckedChanging(r)&&(this.setChecked(e.asBoolean(n),!0),i.onIsCheckedChanged(r))}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isDisabled",{get:function(){return this._e&&null!=this._e.getAttribute("disabled")},set:function(t){(t=e.asBoolean(t,!0))!=this.isDisabled&&e.enable(this._e,!t)},enumerable:!0,configurable:!0}),n.prototype.previous=function(e,t){var i=this._pse(this._e);if(!i&&n._isNodeList(this._e.parentElement)&&(i=this._pse(this._e.parentElement)),n._isNodeList(i)){for(;n._isNodeList(i)&&i.childElementCount;)i=i.lastChild;n._isNodeList(i)&&(i=this._pse(i))}var r=n._isNode(i)?new n(this._t,i):null;return e&&r&&!r.element.offsetHeight&&(r=r.previous(e,t)),t&&r&&r.isDisabled&&(r=r.previous(e,t)),r},n.prototype.next=function(e,t){var i=this._e.nextSibling;if(n._isNodeList(i)&&(i=i.childElementCount?i.firstChild:i.nextSibling),!i)for(var r=this._e.parentElement;!i&&n._isNodeList(r);r=r.parentElement)i=r.nextSibling;var s=n._isNode(i)?new n(this._t,i):null;return e&&s&&!s.element.offsetHeight&&(s=s.next(e,t)),t&&s&&s.isDisabled&&(s=s.next(e,t)),s},n.prototype.previousSibling=function(){for(var e=this._pse(this.element);n._isNodeList(e);)e=this._pse(e);return e?new n(this._t,e):null},n.prototype.nextSibling=function(){var e=this.element.nextSibling;return n._isNodeList(e)&&(e=e.nextSibling),e?new n(this._t,e):null},n.prototype.setCollapsed=function(i,r,s){var o=this._t,a=this._e,l=this._e.nextElementSibling,d=n._isNodeList(l);if(e.setAttribute(a,"aria-expanded",d?(!i).toString():null),i!=this.isCollapsed)if(i||d||!e.isFunction(o.lazyLoadFunction)){if(null==r&&(r=o.isAnimated),null==s&&(s=o.autoCollapse),r){if(d){var h=l.offsetHeight,c=l.style;i?(e.toggleClass(a,t.TreeView._CCLG,!0),e.animate(function(n){n<1?(n=1-n,c.height=(n*h).toFixed(0)+"px"):(c.height=c.opacity="",e.toggleClass(a,t.TreeView._CCLD,!0),e.toggleClass(a,t.TreeView._CCLG,!1))},t.TreeView._AN_DLY)):(e.toggleClass(a,t.TreeView._CCLD,!1),c.height=c.opacity="0",e.animate(function(e){c.height=e>=1?c.opacity="":(e*h).toFixed(0)+"px"},t.TreeView._AN_DLY))}}else e.toggleClass(a,t.TreeView._CCLD,i);if(!i&&s){var u=a.parentElement;if(n._isNodeList(u))for(var p=0;p<u.children.length;p++){var _=u.children[p];_!=a&&n._isNode(_)&&(e.toggleClass(_,t.TreeView._CCLD,!0),_.setAttribute("aria-expanded","false"))}}}else o._lazyLoadNode(this)},n.prototype.setChecked=function(e,t){var n=this.checkBox,i=n.checked!=e;if(n.checked=e,n.indeterminate=!1,this.hasChildren)for(var r=this.nodes,s=0;s<r.length;s++)r[s].setChecked(e,!1);if(t){var o=this.parentNode;o&&o._updateCheckedState()}this._t&&i&&this._t._raiseCheckedItemsChanged()},n.prototype.remove=function(){var t=this._t,i=this.parentNode,r=this._getArray(),s=r.indexOf(this.dataItem);t.selectedNode==this&&(t.selectedNode=this.nextSibling()||this.previousSibling()||i);var o=this.element.nextSibling;n._isNodeList(o)&&e.removeChild(o),e.removeChild(this.element),i&&i._updateState(),r.splice(s,1),this._t=null},n.prototype.addChildNode=function(e,n){var i=this._t._createNode(n),r=this.nodes;return r?e<r.length?i.move(r[e],t.DropPosition.Before):i.move(r[r.length-1],t.DropPosition.After):i.move(this,t.DropPosition.Into),i},n.prototype.refresh=function(t){var n=this._getArray();t&&(n[this.index]=t),t=n[this.index];var i=this._t._createNode(t),r=this.hasChildren&&!this.hasPendingChildren?this.element.nextSibling:null;r&&e.removeChild(r),(r=i.hasChildren&&!i.hasPendingChildren?i.element.nextSibling:null)&&this.element.parentElement.insertBefore(r,this.element.nextSibling),this.element.innerHTML=i.element.innerHTML,this._updateState()},n.prototype.move=function(e,t){if(e instanceof n&&this._contains(e))return!1;var i=this.parentNode,r=this._getArray();this._moveElements(e,t);var s=this.parentNode,o=this._getArray();i&&i._updateState(),s&&s._updateState();var a=this.dataItem,l=r.indexOf(a);return r.splice(l,1),o.splice(this.index,0,a),e.treeView&&(this._t=e.treeView),!0},Object.defineProperty(n.prototype,"itemsSource",{get:function(){return this._getArray()},enumerable:!0,configurable:!0}),n.prototype._pse=function(e){return e.previousElementSibling},n.prototype._contains=function(e){for(;e;e=e.parentNode)if(e.element==this.element)return!0;return!1},n.prototype._getArray=function(){var e=this._t,t=this.parentNode,n=e.itemsSource;if(t){var i=e._itmPath;(n=i.getValue(t.dataItem,this.level))||(n=[],i.setValue(t.dataItem,this.level,n))}return n},n.prototype._moveElements=function(i,r){var s=document.createDocumentFragment(),o=this.hasChildren&&!this.hasPendingChildren?this.element.nextSibling:null;if(s.appendChild(this.element),o&&(n._assertNodeList(o),s.appendChild(o)),i instanceof t.TreeView)i._root.insertBefore(s,null);else{var a=i.element,l=a?a.parentElement:i.treeView._root;n._assertNodeList(l);var d=t.DropPosition;switch(r){case d.Before:l.insertBefore(s,a);break;case d.After:a=(i=i.nextSibling())?i.element:null,l.insertBefore(s,a);break;case d.Into:i.hasChildren&&!i.hasPendingChildren||(o=document.createElement("div"),e.addClass(o,t.TreeView._CNDL),l.insertBefore(o,a.nextSibling)),l=i.element.nextSibling,n._assertNodeList(l),l.insertBefore(s,null)}}},n.prototype._updateState=function(){this._updateEmptyState(),this._updateCheckedState()},n.prototype._updateEmptyState=function(){var i=this.element.nextSibling,r=!1;n._isNodeList(i)&&(i.childElementCount?r=!0:e.removeChild(i)),e.toggleClass(this.element,t.TreeView._CEMP,!r),r||this.element.removeAttribute("aria-expanded")},n.prototype._updateCheckedState=function(){var e=this.checkBox,t=this.nodes,n=0,i=0;if(e&&t){for(var r=0;r<t.length;r++)switch(t[r].isChecked){case!0:n++;break;case!1:i++}n==t.length?(e.checked=!0,e.indeterminate=!1):i==t.length?(e.checked=!1,e.indeterminate=!1):(e.checked=!1,e.indeterminate=!0)}var s=this.parentNode;s&&s._updateCheckedState()},n._getChildNodes=function(e,t){n._assertNodeList(t);var i=[];if(n._isNodeList(t))for(var r=t.children,s=0;s<r.length;s++){var o=r[s];n._isNode(o)&&i.push(new n(e,o))}return i},n._isNode=function(n){return n&&e.hasClass(n,t.TreeView._CND)},n._isNodeList=function(n){return n&&e.hasClass(n,t.TreeView._CNDL)},n._isEmpty=function(i){return n._isNode(i)&&e.hasClass(i,t.TreeView._CEMP)},n._isCollapsed=function(i){return n._isNode(i)&&!n._isEmpty(i)&&e.hasClass(i,t.TreeView._CCLD)},n._assertNode=function(t){e.assert(n._isNode(t),"node expected")},n._assertNodeList=function(t){e.assert(n._isNodeList(t),"nodeList expected")},n}();t.TreeNode=n}(e.nav||(e.nav={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wijmo;!function(e){!function(t){var n=function(t){function n(n,i,r){var s=t.call(this)||this;return s._data=n,s._e=e.asType(i,HTMLElement),s._level=r,s}return __extends(n,t),Object.defineProperty(n.prototype,"dataItem",{get:function(){return this._data},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"element",{get:function(){return this._e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"level",{get:function(){return this._level},enumerable:!0,configurable:!0}),n}(e.EventArgs);t.FormatNodeEventArgs=n;var i=function(e){function t(t){var n=e.call(this)||this;return n._node=t,n}return __extends(t,e),Object.defineProperty(t.prototype,"node",{get:function(){return this._node},enumerable:!0,configurable:!0}),t}(e.CancelEventArgs);t.TreeNodeEventArgs=i;var r=function(n){function i(i,r,s){var o=n.call(this)||this;return o._src=e.asType(i,t.TreeNode),o._tgt=e.asType(r,t.TreeNode),o._pos=s,o}return __extends(i,n),Object.defineProperty(i.prototype,"dragSource",{get:function(){return this._src},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"dropTarget",{get:function(){return this._tgt},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"position",{get:function(){return this._pos},set:function(t){this._pos=e.asEnum(t,s)},enumerable:!0,configurable:!0}),i}(e.CancelEventArgs);t.TreeNodeDragDropEventArgs=r;var s;!function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.Into=2]="Into"}(s=t.DropPosition||(t.DropPosition={}))}(e.nav||(e.nav={}))}(wijmo||(wijmo={}));var wijmo;!function(e){!function(t){var n=function(){function n(n){this._tree=e.asType(n,t.TreeView),this._dragstartBnd=this._dragstart.bind(this),this._dragoverBnd=this._dragover.bind(this),this._dropBnd=this._drop.bind(this),this._dragendBnd=this._dragend.bind(this);var i=this._tree,r=i.hostElement;i.addEventListener(r,"dragstart",this._dragstartBnd),i.addEventListener(r,"dragover",this._dragoverBnd),i.addEventListener(r,"dragleave",this._dragoverBnd),i.addEventListener(r,"drop",this._dropBnd),i.addEventListener(r,"dragend",this._dragendBnd),i.addEventListener(r,"keydown",this._keydown)}return n.prototype.dispose=function(){var e=this._tree,t=e.hostElement;e.removeEventListener(t,"dragstart",this._dragstartBnd),e.removeEventListener(t,"dragover",this._dragoverBnd),e.removeEventListener(t,"dragleave",this._dragoverBnd),e.removeEventListener(t,"drop",this._dropBnd),e.removeEventListener(t,"dragend",this._dragendBnd),e.removeEventListener(t,"keydown",this._keydown),this._showDragMarker()},n.prototype._dragstart=function(i){if(!i.defaultPrevented){var r=this._tree,s=e.closestClass(i.target,t.TreeView._CND),o=n;if(o._drgSrc=t.TreeNode._isNode(s)?new t.TreeNode(r,s):null,o._drgSrc){var a=new t.TreeNodeEventArgs(o._drgSrc);r.onDragStart(a)||(o._drgSrc=null)}o._drgSrc&&i.dataTransfer?(e._startDrag(i.dataTransfer,"copyMove"),i.stopPropagation()):i.preventDefault()}},n.prototype._dragover=function(e){this._handleDragDrop(e,!1)},n.prototype._drop=function(e){this._handleDragDrop(e,!0)},n.prototype._dragend=function(e){n._drgSrc=null,this._showDragMarker(),this._tree.onDragEnd()},n.prototype._keydown=function(t){t.defaultPrevented||t.keyCode==e.Key.Escape&&this._dragendBnd(null)},n.prototype._handleDragDrop=function(i,r){var s,o,a=this._tree,l=n,d=t.DropPosition,h=d.Into;if(!i.defaultPrevented&&l._drgSrc){var c=document.elementFromPoint(i.clientX,i.clientY),u=e.closestClass(c,t.TreeView._CND);if(null==u){var p=e.Control.getControl(e.closest(c,".wj-treeview"));p instanceof t.TreeView&&0==p.totalItemCount&&(u=p.hostElement)}if(u==l._drgSrc.element&&(u=null),u){o=u.getBoundingClientRect();var _=new t.TreeNode(a,u),f=_.hasPendingChildren?o.height/2:o.height/3;null==_.element?((o=e.Rect.fromBoundingRect(o)).inflate(-12,-12),h=d.Before):i.clientY<o.top+f?h=d.Before:(i.clientY>o.bottom-f||_.hasPendingChildren)&&(h=d.After,!_.hasChildren||_.isCollapsed||_.hasPendingChildren||(h=d.Before,o=(u=(_=_.next(!0,!1)).element).getBoundingClientRect())),l._drgSrc._contains(_)?u=null:((s=new t.TreeNodeDragDropEventArgs(l._drgSrc,_,h)).cancel=l._drgSrc.treeView!=_.treeView,a.onDragOver(s)||(u=null))}if(u)if((h=s.position)==d.Before){var g=s.dragSource.next(!0,!1);g&&g.element==u&&(u=null)}else if(h==d.After){var m=s.dragSource.previous(!0,!1);m&&m.element==u&&(u=null)}if(u&&!r?(i.dataTransfer.dropEffect="move",i.preventDefault(),i.stopPropagation(),this._showDragMarker(o,h)):this._showDragMarker(),u&&r&&a.onDrop(s)){a.hostElement.focus();var v=s.dragSource;v.move(s.dropTarget,s.position),v.select()}}},n.prototype._showDragMarker=function(i,r){var s=this._tree,o=n._dMarker.parentElement;if(i){var a=s.hostElement.getBoundingClientRect(),l=r==t.DropPosition.After?i.bottom:i.top,d={top:Math.round(l-a.top+s.hostElement.scrollTop-2),width:"75%",height:r==t.DropPosition.Into?i.height:4,opacity:r==t.DropPosition.Into?"0.15":""};s.rightToLeft?d.right=Math.round(a.right-i.right):d.left=Math.round(i.left-a.left),e.setCss(n._dMarker,d),o!=s._root&&s._root.appendChild(n._dMarker)}else o&&o.removeChild(n._dMarker)},n._dMarker=e.createElement('<div class="wj-marker">&nbsp;</div>'),n}();t._TreeDragDropManager=n}(e.nav||(e.nav={}))}(wijmo||(wijmo={}));var wijmo;!function(e){!function(t){var n=function(){function t(e){this.path=e}return Object.defineProperty(t.prototype,"path",{get:function(){return this._path},set:function(t){if(this._path=t,e.isString(t))this._bindings=[new e.Binding(t)];else if(e.isArray(t)){this._bindings=[];for(var n=0;n<t.length;n++)this._bindings.push(new e.Binding(t[n]))}else null!=t&&e.assert(!1,"Path should be a string or an array of strings.");this._maxLevel=this._bindings?this._bindings.length-1:-1},enumerable:!0,configurable:!0}),t.prototype.getValue=function(e,t){var n=Math.min(t,this._maxLevel);return n>-1?this._bindings[n].getValue(e):null},t.prototype.setValue=function(e,t,n){var i=Math.min(t,this._maxLevel);i>-1&&this._bindings[i].setValue(e,n)},t}();t._BindingArray=n}(e.nav||(e.nav={}))}(wijmo||(wijmo={}));var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),wijmo;!function(e){!function(t){"use strict";var n=function(t){function n(n,r,s){var o=t.call(this,n,null,!0)||this;o._tabs=new e.collections.ObservableArray,o._selectedIndex=-1,o._animated=!0,o._autoSwitch=!0,o.selectedIndexChanged=new e.Event;var a=o.hostElement,l=[];if(!s)for(;a.firstElementChild;){var d=a.firstElementChild;a.removeChild(d),l.push(d)}var h=o.getTemplate();return o.applyTemplate("wj-control wj-tabpanel",h,{_dRoot:"root",_dTabHeaders:"tabheaders",_dTabPanes:"tabpanes"}),o._tabIndex=a.tabIndex,a.tabIndex=-1,o._dRoot.tabIndex=o._dTabHeaders.tabIndex=o._dTabPanes.tabIndex=-1,o.addEventListener(a,"click",o._click.bind(o)),o.addEventListener(a,"keydown",o._keydown.bind(o)),o._tabs.collectionChanged.addHandler(o._populateControl.bind(o)),o.tabs.deferUpdate(function(){l.forEach(function(t){e.assert(2==t.childElementCount,"TabPanel children should contain header and pane elements"),o.tabs.push(new i(t.children[0],t.children[1]))})}),o.initialize(r),o.selectedIndex<0&&o.tabs.length?o.selectedIndex=0:o.onSelectedIndexChanged(),o}return __extends(n,t),Object.defineProperty(n.prototype,"tabs",{get:function(){return this._tabs},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(t){(t=e.asInt(t,!1))!=this._selectedIndex?(this._selectedIndex=t,this._updateContent(),this.onSelectedIndexChanged()):this._updateContent()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectedTab",{get:function(){var e=this._selectedIndex;return e>-1?this._tabs[e]:null},set:function(e){for(var t=-1,n=0;n<this._tabs.length&&t<0;n++)this._tabs[n]==e&&(t=n);this.selectedIndex=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isAnimated",{get:function(){return this._animated},set:function(t){this._animated=e.asBoolean(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"autoSwitch",{get:function(){return this._autoSwitch},set:function(t){t!=this._autoSwitch&&(this._autoSwitch=e.asBoolean(t),this._updateContent())},enumerable:!0,configurable:!0}),n.prototype.getTab=function(e){for(t=0;t<this._tabs.length;t++)if((n=this._tabs[t]).header.id==e||n.pane.id==e)return n;for(var t=0;t<this._tabs.length;t++){var n=this._tabs[t];if(n.header.textContent==e)return n}return null},n.prototype.onSelectedIndexChanged=function(e){this.selectedIndexChanged.raise(this,e)},n.prototype._populateControl=function(){var t=this;this._removeChildren(this._dTabHeaders),this._removeChildren(this._dTabPanes);var n=-1;this._tabs.forEach(function(r,s){e.assert(r instanceof i,"tabs array must contain Tab objects."),r._setPanel(t);var o=r.header,a=r.pane;e.addClass(o,"wj-tabheader"),e.setAttribute(o,"role","tab"),e.setAttribute(o,"aria-controls",a.id?a.id:null),t._dTabHeaders.appendChild(o),e.addClass(a,"wj-tabpane"),e.setAttribute(a,"role","tabpanel"),e.setAttribute(a,"aria-labelledby",o.id?o.id:null),t._dTabPanes.appendChild(a),n<0&&(e.hasClass(o,"wj-state-active")||"true"==o.getAttribute("aria-selected"))&&(n=s)}),n<0&&this._tabs.length>0&&(n=0),n>-1?this.selectedIndex=n:this.selectedIndex>-1&&this.selectedIndex<this._tabs.length&&this._updateContent(),this._validateSelection()},n.prototype._validateSelection=function(){var e=this.selectedTab;if(e&&(e.isDisabled||!e.isVisible)){var t=this._getNextIndex(this.selectedIndex,1);t<0&&(t=this._getNextIndex(this.selectedIndex,-1)),this.selectedIndex=t}},n.prototype._updateContent=function(){var t=this,n=e.contains(this._dTabHeaders,e.getActiveElement()),i=this._dTabHeaders.children,r=this._dTabPanes.children,s=this._selectedIndex;if(s>-1&&s<r.length){var o=(h=r[s]).style;this.isAnimated?(o.opacity="0",this._toAnim&&clearInterval(this._toAnim),this._toAnim=e.animate(function(e){1==e?(o.opacity="",t._toAnim=null):o.opacity=e.toString()})):o.opacity=""}for(var a=0;a<i.length;a++){var l=a==s,d=i[a],h=r[a];e.setAttribute(d,"aria-selected",l),e.toggleClass(d,"wj-state-active",l),e.toggleClass(h,"wj-state-active",l),d.tabIndex=l||!this._autoSwitch?this._tabIndex:-1,l&&(n&&d.focus(),e.Control.invalidateAll(h))}},n.prototype._removeChildren=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},n.prototype._click=function(e){var t=this._getTabIndex(e.target);t>-1&&(this.selectedIndex=t)},n.prototype._keydown=function(t){if(!t.defaultPrevented){var n=this._getTabIndex(e.getActiveElement());if(n>-1){var i=t.keyCode;if(this.rightToLeft)switch(i){case e.Key.Left:i=e.Key.Right;break;case e.Key.Right:i=e.Key.Left}switch(i){case e.Key.Left:case e.Key.Up:case e.Key.Right:case e.Key.Down:case e.Key.Home:case e.Key.PageUp:case e.Key.End:case e.Key.PageDown:switch(i){case e.Key.Left:case e.Key.Up:n=this._getNextIndex(n,-1);break;case e.Key.Right:case e.Key.Down:n=this._getNextIndex(n,1);break;case e.Key.Home:case e.Key.PageUp:n=this._getNextIndex(-1,1);break;case e.Key.End:case e.Key.PageDown:n=this._getNextIndex(this._tabs.length,-1)}n>-1&&(this._autoSwitch?this.selectedIndex=n:this._tabs[n].header.focus()),t.preventDefault();break;case e.Key.Enter:case e.Key.Space:n>-1&&this._tabs[n].header.click(),t.preventDefault()}}}},n.prototype._getTabIndex=function(t){var n=e.closest(t,".wj-tabheader");if(n&&e.closest(n,".wj-tabpanel")==this.hostElement)for(var i=0;i<this._tabs.length;i++)if(this._tabs[i].header==n)return i;return-1},n.prototype._getNextIndex=function(e,t){for(var n=e+t;n>-1&&n<this._tabs.length;n+=t){var i=this._tabs[n];if(!i.isDisabled&&i.isVisible)return n}return-1},n.controlTemplate='<div wj-part="root"><div wj-part="tabheaders" class="wj-tabheaders" role="tablist"></div><div wj-part="tabpanes" class="wj-tabpanes"></div></div>',n}(e.Control);t.TabPanel=n;var i=function(){function t(t,n){this._hdr=e.asType(e.getElement(t),HTMLElement),this._pane=e.asType(e.getElement(n),HTMLElement)}return Object.defineProperty(t.prototype,"tabPanel",{get:function(){return this._p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"header",{get:function(){return this._hdr},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pane",{get:function(){return this._pane},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDisabled",{get:function(){return e.hasClass(this._hdr,"wj-state-disabled")},set:function(t){e.toggleClass(this._hdr,"wj-state-disabled",e.asBoolean(t)),this._p&&this._p._validateSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return"none"!=this._hdr.style.display},set:function(t){this._hdr.style.display=e.asBoolean(t)?"":"none",this._p&&this._p._validateSelection()},enumerable:!0,configurable:!0}),t.prototype._setParts=function(t,n){if(t=e.asType(e.getElement(t),HTMLElement),n=e.asType(e.getElement(n),HTMLElement,!1),this._hdr!==t||this._pane!==n){var i=this.isDisabled,r=this.isVisible;this._hdr=t,this._pane=n,this.isDisabled=i,this.isVisible=r;var s=this.tabPanel;s&&!s.tabs.isUpdating&&s._populateControl()}},t.prototype._setPanel=function(e){this._p=e},t}();t.Tab=i}(e.nav||(e.nav={}))}(wijmo||(wijmo={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(n){var t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t}(wijmo.nav.TreeView);n.TreeView=t})(t=n.nav||(n.nav={}))})(c1||(c1={}));
var __extends=this&&this.__extends||function(){var n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),c1;(function(n){var t;(function(t){var i;(function(i){var u=function(n){function t(){var t=n!==null&&n.apply(this,arguments)||this;return t.requestDataStringifying=new wijmo.Event,t.reponseTextParsing=new wijmo.Event,t}return __extends(t,n),t}(n.nav.TreeView),f,r;i.TreeView=u;f=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),Object.defineProperty(t.prototype,"_controlType",{get:function(){return u},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_initializerType",{get:function(){return r},enumerable:!0,configurable:!0}),t}(t._ControlWrapper);i._TreeViewWrapper=f;r=function(n){function t(t){var i=n.call(this,t)||this;return i._treeView=i.control,i}return __extends(t,n),t.prototype._beforeInitializeControl=function(t){n.prototype._beforeInitializeControl.call(this,t);t&&(t.lazyLoadActionUrl&&(this._lazyLoadActionUrl=t.lazyLoadActionUrl),delete t.lazyLoadActionUrl,t.loadActionUrl&&(this._loadActionUrl=t.loadActionUrl),delete t.loadActionUrl)},t.prototype._afterInitializeControl=function(t){n.prototype._afterInitializeControl.call(this,t);this._init()},t.prototype._lazyLoad=function(n,t){this._load(this._lazyLoadActionUrl,n,t)},t.prototype._load=function(n,t,i){this._request&&this._request.readyState!=4&&(this._request.abort(),this._request=null);this._request=this._ajax({url:n,data:t&&{level:t.level,isChecked:t.isChecked,dataItem:t.dataItem},async:!0,type:"POST",dataType:"json",postType:"json",success:i})},t.prototype._init=function(){var n=this;this._loadActionUrl&&this._load(this._loadActionUrl,null,function(t){n._treeView.itemsSource=t});this._lazyLoadActionUrl&&(this._treeView.lazyLoadFunction=this._lazyLoad.bind(this))},t}(t._SourceInitializer);i._TreeViewInitializer=r})(i=t.nav||(t.nav={}))})(t=n.mvc||(n.mvc={}))})(c1||(c1={}));
var wijmo;(function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.TreeNode||(n.TreeNode={}))})(t=n.nav||(n.nav={}))})(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.TreeView||(n.TreeView={}))})(t=n.nav||(n.nav={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.FormatNodeEventArgs||(n.FormatNodeEventArgs={}))})(t=n.nav||(n.nav={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.TreeNodeEventArgs||(n.TreeNodeEventArgs={}))})(t=n.nav||(n.nav={}))}(wijmo||(wijmo={})),function(n){var t;(function(n){var t;(function(n){function t(n){return n}n.cast=t})(t=n.TreeNodeDragDropEventArgs||(n.TreeNodeDragDropEventArgs={}))})(t=n.nav||(n.nav={}))}(wijmo||(wijmo={}));
/*
    * Copyright(c) GrapeCity, Inc.  All rights reserved.
    */
var wijmo;!function(e){window.wijmo||(window.wijmo=e),e.culture=window.wijmo.culture={Globalize:{name:"en",displayName:"English",numberFormat:{".":".",",":",","-":"-","+":"+","%":"%",percent:{pattern:["-n%","n%"]},currency:{decimals:2,symbol:"$",pattern:["($n)","$n"]}},calendar:{"/":"/",":":":",firstDay:0,days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],am:["AM","A"],pm:["PM","P"],eras:["A.D."],patterns:{d:"M/d/yyyy",D:"dddd, MMMM d, yyyy",f:"dddd, MMMM d, yyyy h:mm tt",F:"dddd, MMMM d, yyyy h:mm:ss tt",t:"h:mm tt",T:"h:mm:ss tt",m:"MMMM d",M:"MMMM d",y:"MMMM yyyy",Y:"MMMM yyyy",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt",s:'yyyy"-"MM"-"dd"T"HH":"mm":"ss'},fiscalYearOffsets:[-3,-3]}},Licensing:{cls:"CLOSE",ctc:'Please contact GrapeCity: <a href="mailto:us.sales@grapecity.com">us.sales@grapecity.com</a>.',dmn:"The Wijmo license in this application is not valid for the current domain. The license domain is <b>{licDomain}</b>; the current domain is <b>{domain}</b>.",evl:"Wijmo Evaluation Version ({version})",exp:"The Wijmo license in this application has expired. The license expiration date is <b>{expDate:d}</b>.",hdr:"Wijmo License",lic:"The Wijmo license in this application is invalid.",mss:"The Wijmo license in this application is not set.",prd:"The Wijmo license in this application is not valid for the <b>{control}</b> control.",ver:"The Wijmo license in this application is not valid for the version in use. The license version is <b>{licVer}</b>; the product version is <b>{version}</b>."},MultiSelect:{itemsSelected:"{count:n0} items selected",selectAll:"Select All"},FlexGrid:{groupHeaderFormat:"{name}: <b>{value}</b> ({count:n0} items)"},FlexGridFilter:{ascending:"↑ Ascending",descending:"↓ Descending",apply:"Apply",cancel:"Cancel",clear:"Clear",conditions:"Filter by Condition",values:"Filter by Value",search:"Search",selectAll:"Select All",null:"(nothing)",header:"Show items where the value",and:"And",or:"Or",stringOperators:[{name:"(not set)",op:null},{name:"Equals",op:0},{name:"Does not equal",op:1},{name:"Begins with",op:6},{name:"Ends with",op:7},{name:"Contains",op:8},{name:"Does not contain",op:9}],numberOperators:[{name:"(not set)",op:null},{name:"Equals",op:0},{name:"Does not equal",op:1},{name:"Is greater than",op:2},{name:"Is greater than or equal to",op:3},{name:"Is less than",op:4},{name:"Is less than or equal to",op:5}],dateOperators:[{name:"(not set)",op:null},{name:"Equals",op:0},{name:"Is Before",op:4},{name:"Is After",op:2}],booleanOperators:[{name:"(not set)",op:null},{name:"Equals",op:0},{name:"Does not equal",op:1}]},olap:{PivotFieldEditor:{dialogHeader:"Field settings:",header:"Header:",summary:"Summary:",showAs:"Show As:",weighBy:"Weigh by:",sort:"Sort:",filter:"Filter:",format:"Format:",sample:"Sample:",edit:"Edit…",clear:"Clear",ok:"OK",cancel:"Cancel",none:"(none)",sorts:{asc:"Ascending",desc:"Descending"},aggs:{sum:"Sum",cnt:"Count",avg:"Average",max:"Max",min:"Min",rng:"Range",std:"StdDev",var:"Var",stdp:"StdDevPop",varp:"VarPop",first:"First",last:"Last"},calcs:{noCalc:"No Calculation",dRow:"Difference from previous row",dRowPct:"% Difference from previous row",dCol:"Difference from previous column",dColPct:"% Difference from previous column",dPctGrand:"% of grand total",dPctRow:"% of row total",dPctCol:"% of column total",dRunTot:"Running total",dRunTotPct:"% running total"},formats:{n0:"Integer (n0)",n2:"Float (n2)",c:"Currency (c)",p0:"Percentage (p0)",p2:"Percentage (p2)",n2c:"Thousands (n2,)",n2cc:"Millions (n2,,)",n2ccc:"Billions (n2,,,)",d:"Date (d)",MMMMddyyyy:"Month Day Year (MMMM dd, yyyy)",dMyy:"Day Month Year (d/M/yy)",ddMyy:"Day Month Year (dd/M/yy)",dMyyyy:"Day Month Year (dd/M/yyyy)",MMMyyyy:"Month Year (MMM yyyy)",MMMMyyyy:"Month Year (MMMM yyyy)",yyyyQq:'Year Quarter (yyyy "Q"q)',FYEEEEQU:'Fiscal Year Quarter ("FY"EEEE "Q"U)'}},PivotEngine:{grandTotal:"Grand Total",subTotal:"Subtotal"},PivotPanel:{fields:"Choose fields to add to report:",drag:"Drag fields between areas below:",filters:"Filters",cols:"Columns",rows:"Rows",vals:"Values",defer:"Defer Updates",update:"Update"},_ListContextMenu:{up:"Move Up",down:"Move Down",first:"Move to Beginning",last:"Move to End",filter:"Move to Report Filter",rows:"Move to Row Labels",cols:"Move to Column Labels",vals:"Move to Values",remove:"Remove Field",edit:"Field Settings…",detail:"Show Detail…"},PivotChart:{by:"by",and:"and"},DetailDialog:{header:"Detail View:",ok:"OK",items:"{cnt:n0} items",item:"{cnt} item",row:"Row",col:"Column"}},Viewer:{cancel:"Cancel",ok:"OK",bottom:"Bottom:",top:"Top:",right:"Right:",left:"Left:",margins:"Margins (inches)",orientation:"Orientation:",paperKind:"Paper Kind:",pageSetup:"Page Setup",landscape:"Landscape",portrait:"Portrait",pageNumber:"Page Number",zoomFactor:"Zoom Factor",paginated:"Paginated",print:"Print",search:"Search",matchCase:"Match case",wholeWord:"Match whole word only",searchResults:"Search Results",previousPage:"Previous Page",nextPage:"Next Page",firstPage:"First Page",lastPage:"Last Page",backwardHistory:"Backward",forwardHistory:"Forward",pageCount:"Page Count",selectTool:"Select Tool",moveTool:"Move Tool",continuousMode:"Continuous Page View",singleMode:"Single Page View",wholePage:"Fit Whole Page",pageWidth:"Fit Page Width",zoomOut:"Zoom Out",zoomIn:"Zoom In",rubberbandTool:"Zoom by Selection",magnifierTool:"Magnifier",rotatePage:"Rotate Page",rotateDocument:"Rotate Document",exports:"Export",fullScreen:"Full Screen",exitFullScreen:"Exit Full Screen",hamburgerMenu:"Tools",showSearchBar:"Show Search Bar",viewMenu:"Layout Options",searchOptions:"Search Options",matchCaseMenuItem:"Match Case",wholeWordMenuItem:"Match Whole Word",thumbnails:"Page Thumbnails",outlines:"Document Map",loading:"Loading…",pdfExportName:"Adobe PDF",docxExportName:"Open XML Word",xlsxExportName:"Open XML Excel",docExportName:"Microsoft Word",xlsExportName:"Microsoft Excel",mhtmlExportName:"Web archive (MHTML)",htmlExportName:"HTML document",rtfExportName:"RTF document",metafileExportName:"Compressed metafiles",csvExportName:"CSV",tiffExportName:"Tiff images",bmpExportName:"BMP images",emfExportName:"Enhanced metafile",gifExportName:"GIF images",jpgExportName:"JPEG images",jpegExportName:"JPEG images",pngExportName:"PNG images",abstractMethodException:"This is an abstract method, please implement it.",cannotRenderPageNoViewPage:"Cannot render page without document source and view page.",cannotRenderPageNoDoc:"Cannot render page without document source and view page.",exportFormat:"Export format:",exportOptionTitle:"Export options",documentRestrictionsGroup:"Document restrictions",passwordSecurityGroup:"Password security",outputRangeGroup:"Output range",documentInfoGroup:"Document info",generalGroup:"General",docInfoTitle:"Title",docInfoAuthor:"Author",docInfoManager:"Manager",docInfoOperator:"Operator",docInfoCompany:"Company",docInfoSubject:"Subject",docInfoComment:"Comment",docInfoCreator:"Creator",docInfoProducer:"Producer",docInfoCreationTime:"Creation time",docInfoRevisionTime:"Revision time",docInfoKeywords:"Keywords",embedFonts:"Embed TrueType fonts",pdfACompatible:"PDF/A compatible (level 2B)",useCompression:"Use compression",useOutlines:"Generate outlines",allowCopyContent:"Allow content copying or extraction",allowEditAnnotations:"Allow annotation editing",allowEditContent:"Allow content editing",allowPrint:"Allow printing",ownerPassword:"Permissions (owner) password:",userPassword:"Document open (user) password:",encryptionType:"Encryption level:",paged:"Paged",showNavigator:"Show Navigator",navigatorPosition:"Navigator Position",singleFile:"Single File",tolerance:"Tolerance when detecting text bounds (points):",pictureLayer:"Use separate picture layer",metafileType:"Metafile Type:",monochrome:"Monochrome",resolution:"Resolution:",outputRange:"Page range:",outputRangeInverted:"Inverted",showZoomBar:"Zoom Bar",searchPrev:"Search Previous",searchNext:"Search Next",checkMark:"✓",exportOk:"Export…",cannotSearch:"Search requires a document source to be specified.",parameters:"Parameters",requiringParameters:"Please input parameters.",nullParameterError:"Value cannot be null.",invalidParameterError:"Invalid input.",parameterNoneItemsSelected:"(none)",parameterAllItemsSelected:"(all)",parameterSelectAllItemText:"(Select All)",selectParameterValue:"(select value)",apply:"Apply",errorOccured:"An error has occurred."}};var o=window.wijmo._updateCulture;o&&o()}(wijmo||(wijmo={}));
