PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.9.2
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.9.2
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | classes/Visualizer/Gutenberg/build/block.js +11 -11 3.10.43.9.2 View file →
@@ -1,5 +1,5 @@
1 -!function(e){function t(t){for(var r,i,s=t[0],l=t[1],u=t[2],d=0,p=[];d<s.length;d++)i=s[d],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&p.push(a[i][0]),a[i]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(c&&c(t);p.length;)p.shift()();return o.push.apply(o,u||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,s=1;s<n.length;s++){var l=n[s];0!==a[l]&&(r=!1)}r&&(o.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},a={1:0},o=[];function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var s=window.webpackJsonp=window.webpackJsonp||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var u=0;u<s.length;u++)t(s[u]);var c=l;o.push([154,0]),n()}([function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function a(){return t.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function p(e,t){for(var n in t)d(t,n)&&(e[n]=t[n]);return d(t,"toString")&&(e.toString=t.toString),d(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t,n,r){return kt(e,t,n,r,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function f(e){if(null==e._isValid){var t=h(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(a=a&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return a;e._isValid=a}return e._isValid}function _(e){var t=m(NaN);return null!=e?p(h(t),e):h(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var y=a.momentProperties=[];function b(e,t){var n,r,a;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=h(t)),s(t._locale)||(e._locale=t._locale),y.length>0)for(n=0;n<y.length;n++)s(a=t[r=y[n]])||(e[r]=a);return e}var v=!1;function g(e){b(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,a.updateOffset(this),v=!1)}function w(e){return e instanceof g||null!=e&&null!=e._isAMomentObject}function M(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=M(t)),n}function L(e,t,n){var r,a=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),i=0;for(r=0;r<a;r++)(n&&e[r]!==t[r]||!n&&k(e[r])!==k(t[r]))&&i++;return i+o}function Y(e){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,t){var n=!0;return p((function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,e),n){for(var r,o=[],i=0;i<arguments.length;i++){if(r="","object"==typeof arguments[i]){for(var s in r+="\n["+i+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[i];o.push(r)}Y(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var S,D={};function O(e,t){null!=a.deprecationHandler&&a.deprecationHandler(e,t),D[e]||(Y(t),D[e]=!0)}function j(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function x(e,t){var n,r=p({},e);for(n in t)d(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)d(e,n)&&!d(t,n)&&i(e[n])&&(r[n]=p({},r[n]));return r}function E(e){null!=e&&this.set(e)}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,S=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)d(e,t)&&n.push(t);return n};var P={};function C(e,t){var n=e.toLowerCase();P[n]=P[n+"s"]=P[t]=e}function H(e){return"string"==typeof e?P[e]||P[e.toLowerCase()]:void 0}function z(e){var t,n,r={};for(n in e)d(e,n)&&(t=H(n))&&(r[t]=e[n]);return r}var A={};function R(e,t){A[e]=t}function N(e,t,n){var r=""+Math.abs(e),a=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+r}var F=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,I={},B={};function J(e,t,n,r){var a=r;"string"==typeof r&&(a=function(){return this[r]()}),e&&(B[e]=a),t&&(B[t[0]]=function(){return N(a.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=G(t,e.localeData()),I[t]=I[t]||function(e){var t,n,r,a=e.match(F);for(t=0,n=a.length;t<n;t++)B[a[t]]?a[t]=B[a[t]]:a[t]=(r=a[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,o="";for(r=0;r<n;r++)o+=j(a[r])?a[r].call(t,e):a[r];return o}}(t),I[t](e)):e.localeData().invalidDate()}function G(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(W.lastIndex=0;n>=0&&W.test(e);)e=e.replace(W,r),W.lastIndex=0,n-=1;return e}var V=/\d/,q=/\d\d/,$=/\d{3}/,K=/\d{4}/,Z=/[+-]?\d{6}/,Q=/\d\d?/,X=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,ae=/\d+/,oe=/[+-]?\d+/,ie=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function ce(e,t,n){ue[e]=j(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(ue,e)?ue[e](t._strict,t._locale):new RegExp(pe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,a){return t||n||r||a}))))}function pe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var me={};function he(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=k(e)}),n=0;n<e.length;n++)me[e[n]]=r}function fe(e,t){he(e,(function(e,n,r,a){r._w=r._w||{},t(e,r._w,r,a)}))}function _e(e,t,n){null!=t&&d(me,e)&&me[e](t,n._a,n,e)}function ye(e){return be(e)?366:365}function be(e){return e%4==0&&e%100!=0||e%400==0}J("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),J(0,["YY",2],0,(function(){return this.year()%100})),J(0,["YYYY",4],0,"year"),J(0,["YYYYY",5],0,"year"),J(0,["YYYYYY",6,!0],0,"year"),C("year","y"),R("year",1),ce("Y",oe),ce("YY",Q,q),ce("YYYY",ne,K),ce("YYYYY",re,Z),ce("YYYYYY",re,Z),he(["YYYYY","YYYYYY"],0),he("YYYY",(function(e,t){t[0]=2===e.length?a.parseTwoDigitYear(e):k(e)})),he("YY",(function(e,t){t[0]=a.parseTwoDigitYear(e)})),he("Y",(function(e,t){t[0]=parseInt(e,10)})),a.parseTwoDigitYear=function(e){return k(e)+(k(e)>68?1900:2e3)};var ve,ge=we("FullYear",!0);function we(e,t){return function(n){return null!=n?(ke(this,e,n),a.updateOffset(this,t),this):Me(this,e)}}function Me(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function ke(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&be(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Le(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Le(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?be(e)?29:28:31-r%7%2}ve=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},J("M",["MM",2],"Mo",(function(){return this.month()+1})),J("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),J("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),C("month","M"),R("month",8),ce("M",Q),ce("MM",Q,q),ce("MMM",(function(e,t){return t.monthsShortRegex(e)})),ce("MMMM",(function(e,t){return t.monthsRegex(e)})),he(["M","MM"],(function(e,t){t[1]=k(e)-1})),he(["MMM","MMMM"],(function(e,t,n,r){var a=n._locale.monthsParse(e,r,n._strict);null!=a?t[1]=a:h(n).invalidMonth=e}));var Ye=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Te="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Se="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function De(e,t,n){var r,a,o,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(a=ve.call(this._shortMonthsParse,i))?a:null:-1!==(a=ve.call(this._longMonthsParse,i))?a:null:"MMM"===t?-1!==(a=ve.call(this._shortMonthsParse,i))||-1!==(a=ve.call(this._longMonthsParse,i))?a:null:-1!==(a=ve.call(this._longMonthsParse,i))||-1!==(a=ve.call(this._shortMonthsParse,i))?a:null}function Oe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=k(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Le(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function je(e){return null!=e?(Oe(this,e),a.updateOffset(this,!0),this):Me(this,"Month")}var xe=le,Ee=le;function Pe(){function e(e,t){return t.length-e.length}var t,n,r=[],a=[],o=[];for(t=0;t<12;t++)n=m([2e3,t]),r.push(this.monthsShort(n,"")),a.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(e),a.sort(e),o.sort(e),t=0;t<12;t++)r[t]=pe(r[t]),a[t]=pe(a[t]);for(t=0;t<24;t++)o[t]=pe(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ce(e,t,n,r,a,o,i){var s=new Date(e,t,n,r,a,o,i);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function He(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function ze(e,t,n){var r=7+t-n;return-(7+He(e,0,r).getUTCDay()-t)%7+r-1}function Ae(e,t,n,r,a){var o,i,s=1+7*(t-1)+(7+n-r)%7+ze(e,r,a);return s<=0?i=ye(o=e-1)+s:s>ye(e)?(o=e+1,i=s-ye(e)):(o=e,i=s),{year:o,dayOfYear:i}}function Re(e,t,n){var r,a,o=ze(e.year(),t,n),i=Math.floor((e.dayOfYear()-o-1)/7)+1;return i<1?r=i+Ne(a=e.year()-1,t,n):i>Ne(e.year(),t,n)?(r=i-Ne(e.year(),t,n),a=e.year()+1):(a=e.year(),r=i),{week:r,year:a}}function Ne(e,t,n){var r=ze(e,t,n),a=ze(e+1,t,n);return(ye(e)-r+a)/7}J("w",["ww",2],"wo","week"),J("W",["WW",2],"Wo","isoWeek"),C("week","w"),C("isoWeek","W"),R("week",5),R("isoWeek",5),ce("w",Q),ce("ww",Q,q),ce("W",Q),ce("WW",Q,q),fe(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=k(e)})),J("d",0,"do","day"),J("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),J("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),J("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),J("e",0,0,"weekday"),J("E",0,0,"isoWeekday"),C("day","d"),C("weekday","e"),C("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),ce("d",Q),ce("e",Q),ce("E",Q),ce("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ce("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ce("dddd",(function(e,t){return t.weekdaysRegex(e)})),fe(["dd","ddd","dddd"],(function(e,t,n,r){var a=n._locale.weekdaysParse(e,r,n._strict);null!=a?t.d=a:h(n).invalidWeekday=e})),fe(["d","e","E"],(function(e,t,n,r){t[r]=k(e)}));var Fe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),We="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ie="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Be(e,t,n){var r,a,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(a=ve.call(this._weekdaysParse,i))?a:null:"ddd"===t?-1!==(a=ve.call(this._shortWeekdaysParse,i))?a:null:-1!==(a=ve.call(this._minWeekdaysParse,i))?a:null:"dddd"===t?-1!==(a=ve.call(this._weekdaysParse,i))||-1!==(a=ve.call(this._shortWeekdaysParse,i))||-1!==(a=ve.call(this._minWeekdaysParse,i))?a:null:"ddd"===t?-1!==(a=ve.call(this._shortWeekdaysParse,i))||-1!==(a=ve.call(this._weekdaysParse,i))||-1!==(a=ve.call(this._minWeekdaysParse,i))?a:null:-1!==(a=ve.call(this._minWeekdaysParse,i))||-1!==(a=ve.call(this._weekdaysParse,i))||-1!==(a=ve.call(this._shortWeekdaysParse,i))?a:null}var Je=le,Ue=le,Ge=le;function Ve(){function e(e,t){return t.length-e.length}var t,n,r,a,o,i=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=m([2e3,1]).day(t),r=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),o=this.weekdays(n,""),i.push(r),s.push(a),l.push(o),u.push(r),u.push(a),u.push(o);for(i.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=pe(s[t]),l[t]=pe(l[t]),u[t]=pe(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function qe(){return this.hours()%12||12}function $e(e,t){J(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Ke(e,t){return t._meridiemParse}J("H",["HH",2],0,"hour"),J("h",["hh",2],0,qe),J("k",["kk",2],0,(function(){return this.hours()||24})),J("hmm",0,0,(function(){return""+qe.apply(this)+N(this.minutes(),2)})),J("hmmss",0,0,(function(){return""+qe.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)})),J("Hmm",0,0,(function(){return""+this.hours()+N(this.minutes(),2)})),J("Hmmss",0,0,(function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)})),$e("a",!0),$e("A",!1),C("hour","h"),R("hour",13),ce("a",Ke),ce("A",Ke),ce("H",Q),ce("h",Q),ce("k",Q),ce("HH",Q,q),ce("hh",Q,q),ce("kk",Q,q),ce("hmm",X),ce("hmmss",ee),ce("Hmm",X),ce("Hmmss",ee),he(["H","HH"],3),he(["k","kk"],(function(e,t,n){var r=k(e);t[3]=24===r?0:r})),he(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),he(["h","hh"],(function(e,t,n){t[3]=k(e),h(n).bigHour=!0})),he("hmm",(function(e,t,n){var r=e.length-2;t[3]=k(e.substr(0,r)),t[4]=k(e.substr(r)),h(n).bigHour=!0})),he("hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[3]=k(e.substr(0,r)),t[4]=k(e.substr(r,2)),t[5]=k(e.substr(a)),h(n).bigHour=!0})),he("Hmm",(function(e,t,n){var r=e.length-2;t[3]=k(e.substr(0,r)),t[4]=k(e.substr(r))})),he("Hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[3]=k(e.substr(0,r)),t[4]=k(e.substr(r,2)),t[5]=k(e.substr(a))}));var Ze,Qe=we("Hours",!0),Xe={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:Se,week:{dow:0,doy:6},weekdays:Fe,weekdaysMin:Ie,weekdaysShort:We,meridiemParse:/[ap]\.?m?\.?/i},et={},tt={};function nt(e){return e?e.toLowerCase().replace("_","-"):e}function rt(t){var r=null;if(!et[t]&&void 0!==e&&e&&e.exports)try{r=Ze._abbr,n(149)("./"+t),at(r)}catch(e){}return et[t]}function at(e,t){var n;return e&&(n=s(t)?it(e):ot(e,t))&&(Ze=n),Ze._abbr}function ot(e,t){if(null!==t){var n=Xe;if(t.abbr=e,null!=et[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=et[e]._config;else if(null!=t.parentLocale){if(null==et[t.parentLocale])return tt[t.parentLocale]||(tt[t.parentLocale]=[]),tt[t.parentLocale].push({name:e,config:t}),null;n=et[t.parentLocale]._config}return et[e]=new E(x(n,t)),tt[e]&&tt[e].forEach((function(e){ot(e.name,e.config)})),at(e),et[e]}return delete et[e],null}function it(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ze;if(!o(e)){if(t=rt(e))return t;e=[e]}return function(e){for(var t,n,r,a,o=0;o<e.length;){for(t=(a=nt(e[o]).split("-")).length,n=(n=nt(e[o+1]))?n.split("-"):null;t>0;){if(r=rt(a.slice(0,t).join("-")))return r;if(n&&n.length>=t&&L(a,n,!0)>=t-1)break;t--}o++}return null}(e)}function st(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Le(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,h(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),h(e)._overflowWeeks&&-1===t&&(t=7),h(e)._overflowWeekday&&-1===t&&(t=8),h(e).overflow=t),e}function lt(e,t,n){return null!=e?e:null!=t?t:n}function ut(e){var t,n,r,o,i,s=[];if(!e._d){for(r=function(e){var t=new Date(a.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,a,o,i,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,i=4,n=lt(t.GG,e._a[0],Re(Lt(),1,4).year),r=lt(t.W,1),((a=lt(t.E,1))<1||a>7)&&(l=!0);else{o=e._locale._week.dow,i=e._locale._week.doy;var u=Re(Lt(),o,i);n=lt(t.gg,e._a[0],u.year),r=lt(t.w,u.week),null!=t.d?((a=t.d)<0||a>6)&&(l=!0):null!=t.e?(a=t.e+o,(t.e<0||t.e>6)&&(l=!0)):a=o}r<1||r>Ne(n,o,i)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(s=Ae(n,r,a,o,i),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(i=lt(e._a[0],r[0]),(e._dayOfYear>ye(i)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=He(i,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?He:Ce).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(h(e).weekdayMismatch=!0)}}var ct=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pt=/Z|[+-]\d\d(?::?\d\d)?/,mt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ht=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ft=/^\/?Date\((\-?\d+)/i;function _t(e){var t,n,r,a,o,i,s=e._i,l=ct.exec(s)||dt.exec(s);if(l){for(h(e).iso=!0,t=0,n=mt.length;t<n;t++)if(mt[t][1].exec(l[1])){a=mt[t][0],r=!1!==mt[t][2];break}if(null==a)return void(e._isValid=!1);if(l[3]){for(t=0,n=ht.length;t<n;t++)if(ht[t][1].exec(l[3])){o=(l[2]||" ")+ht[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(l[4]){if(!pt.exec(l[4]))return void(e._isValid=!1);i="Z"}e._f=a+(o||"")+(i||""),wt(e)}else e._isValid=!1}var yt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function bt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var vt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function gt(e){var t,n,r,a,o,i,s,l=yt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(l){var u=(t=l[4],n=l[3],r=l[2],a=l[5],o=l[6],i=l[7],s=[bt(t),Se.indexOf(n),parseInt(r,10),parseInt(a,10),parseInt(o,10)],i&&s.push(parseInt(i,10)),s);if(!function(e,t,n){return!e||We.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(h(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],u,e))return;e._a=u,e._tzm=function(e,t,n){if(e)return vt[e];if(t)return 0;var r=parseInt(n,10),a=r%100;return(r-a)/100*60+a}(l[8],l[9],l[10]),e._d=He.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function wt(e){if(e._f!==a.ISO_8601)if(e._f!==a.RFC_2822){e._a=[],h(e).empty=!0;var t,n,r,o,i,s=""+e._i,l=s.length,u=0;for(r=G(e._f,e._locale).match(F)||[],t=0;t<r.length;t++)o=r[t],(n=(s.match(de(o,e))||[])[0])&&((i=s.substr(0,s.indexOf(n))).length>0&&h(e).unusedInput.push(i),s=s.slice(s.indexOf(n)+n.length),u+=n.length),B[o]?(n?h(e).empty=!1:h(e).unusedTokens.push(o),_e(o,n,e)):e._strict&&!n&&h(e).unusedTokens.push(o);h(e).charsLeftOver=l-u,s.length>0&&h(e).unusedInput.push(s),e._a[3]<=12&&!0===h(e).bigHour&&e._a[3]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),ut(e),st(e)}else gt(e);else _t(e)}function Mt(e){var t=e._i,n=e._f;return e._locale=e._locale||it(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new g(st(t)):(u(t)?e._d=t:o(n)?function(e){var t,n,r,a,o;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<e._f.length;a++)o=0,t=b({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],wt(t),f(t)&&(o+=h(t).charsLeftOver,o+=10*h(t).unusedTokens.length,h(t).score=o,(null==r||o<r)&&(r=o,n=t));p(e,n||t)}(e):n?wt(e):function(e){var t=e._i;s(t)?e._d=new Date(a.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=ft.exec(e._i);null===t?(_t(e),!1===e._isValid&&(delete e._isValid,gt(e),!1===e._isValid&&(delete e._isValid,a.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):o(t)?(e._a=c(t.slice(0),(function(e){return parseInt(e,10)})),ut(e)):i(t)?function(e){if(!e._d){var t=z(e._i);e._a=c([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),ut(e)}}(e):l(t)?e._d=new Date(t):a.createFromInputFallback(e)}(e),f(e)||(e._d=null),e))}function kt(e,t,n,r,a){var s,l={};return!0!==n&&!1!==n||(r=n,n=void 0),(i(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=n,l._i=e,l._f=t,l._strict=r,(s=new g(st(Mt(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Lt(e,t,n,r){return kt(e,t,n,r,!1)}a.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),a.ISO_8601=function(){},a.RFC_2822=function(){};var Yt=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Lt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),Tt=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Lt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));function St(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Lt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Dt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ot(e){var t=z(e),n=t.year||0,r=t.quarter||0,a=t.month||0,o=t.week||0,i=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===ve.call(Dt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<Dt.length;++r)if(e[Dt[r]]){if(n)return!1;parseFloat(e[Dt[r]])!==k(e[Dt[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+i+7*o,this._months=+a+3*r+12*n,this._data={},this._locale=it(),this._bubble()}function jt(e){return e instanceof Ot}function xt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Et(e,t){J(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+N(~~(e/60),2)+t+N(~~e%60,2)}))}Et("Z",":"),Et("ZZ",""),ce("Z",se),ce("ZZ",se),he(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Ct(se,e)}));var Pt=/([\+\-]|\d\d)/gi;function Ct(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Pt)||["-",0,0],a=60*r[1]+k(r[2]);return 0===a?0:"+"===r[0]?a:-a}function Ht(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(w(e)||u(e)?e.valueOf():Lt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),a.updateOffset(n,!1),n):Lt(e).local()}function zt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function At(){return!!this.isValid()&&this._isUTC&&0===this._offset}a.updateOffset=function(){};var Rt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Nt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ft(e,t){var n,r,a,o,i,s,u=e,c=null;return jt(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(u={},t?u[t]=e:u.milliseconds=e):(c=Rt.exec(e))?(n="-"===c[1]?-1:1,u={y:0,d:k(c[2])*n,h:k(c[3])*n,m:k(c[4])*n,s:k(c[5])*n,ms:k(xt(1e3*c[6]))*n}):(c=Nt.exec(e))?(n="-"===c[1]?-1:(c[1],1),u={y:Wt(c[2],n),M:Wt(c[3],n),w:Wt(c[4],n),d:Wt(c[5],n),h:Wt(c[6],n),m:Wt(c[7],n),s:Wt(c[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(o=Lt(u.from),i=Lt(u.to),a=o.isValid()&&i.isValid()?(i=Ht(i,o),o.isBefore(i)?s=It(o,i):((s=It(i,o)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=a.milliseconds,u.M=a.months),r=new Ot(u),jt(e)&&d(e,"_locale")&&(r._locale=e._locale),r}function Wt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function It(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Bt(e,t){return function(n,r){var a;return null===r||isNaN(+r)||(O(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),Jt(this,Ft(n="string"==typeof n?+n:n,r),e),this}}function Jt(e,t,n,r){var o=t._milliseconds,i=xt(t._days),s=xt(t._months);e.isValid()&&(r=null==r||r,s&&Oe(e,Me(e,"Month")+s*n),i&&ke(e,"Date",Me(e,"Date")+i*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&a.updateOffset(e,i||s))}Ft.fn=Ot.prototype,Ft.invalid=function(){return Ft(NaN)};var Ut=Bt(1,"add"),Gt=Bt(-1,"subtract");function Vt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=it(e))&&(this._locale=t),this)}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var $t=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function Kt(){return this._locale}function Zt(e,t){J(0,[e,e.length],0,t)}function Qt(e,t,n,r,a){var o;return null==e?Re(this,r,a).year:(t>(o=Ne(e,r,a))&&(t=o),Xt.call(this,e,t,n,r,a))}function Xt(e,t,n,r,a){var o=Ae(e,t,n,r,a),i=He(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}J(0,["gg",2],0,(function(){return this.weekYear()%100})),J(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Zt("gggg","weekYear"),Zt("ggggg","weekYear"),Zt("GGGG","isoWeekYear"),Zt("GGGGG","isoWeekYear"),C("weekYear","gg"),C("isoWeekYear","GG"),R("weekYear",1),R("isoWeekYear",1),ce("G",oe),ce("g",oe),ce("GG",Q,q),ce("gg",Q,q),ce("GGGG",ne,K),ce("gggg",ne,K),ce("GGGGG",re,Z),ce("ggggg",re,Z),fe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=k(e)})),fe(["gg","GG"],(function(e,t,n,r){t[r]=a.parseTwoDigitYear(e)})),J("Q",0,"Qo","quarter"),C("quarter","Q"),R("quarter",7),ce("Q",V),he("Q",(function(e,t){t[1]=3*(k(e)-1)})),J("D",["DD",2],"Do","date"),C("date","D"),R("date",9),ce("D",Q),ce("DD",Q,q),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),he(["D","DD"],2),he("Do",(function(e,t){t[2]=k(e.match(Q)[0])}));var en=we("Date",!0);J("DDD",["DDDD",3],"DDDo","dayOfYear"),C("dayOfYear","DDD"),R("dayOfYear",4),ce("DDD",te),ce("DDDD",$),he(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=k(e)})),J("m",["mm",2],0,"minute"),C("minute","m"),R("minute",14),ce("m",Q),ce("mm",Q,q),he(["m","mm"],4);var tn=we("Minutes",!1);J("s",["ss",2],0,"second"),C("second","s"),R("second",15),ce("s",Q),ce("ss",Q,q),he(["s","ss"],5);var nn,rn=we("Seconds",!1);for(J("S",0,0,(function(){return~~(this.millisecond()/100)})),J(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),J(0,["SSS",3],0,"millisecond"),J(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),J(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),J(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),J(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),J(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),J(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),C("millisecond","ms"),R("millisecond",16),ce("S",te,V),ce("SS",te,q),ce("SSS",te,$),nn="SSSS";nn.length<=9;nn+="S")ce(nn,ae);function an(e,t){t[6]=k(1e3*("0."+e))}for(nn="S";nn.length<=9;nn+="S")he(nn,an);var on=we("Milliseconds",!1);J("z",0,0,"zoneAbbr"),J("zz",0,0,"zoneName");var sn=g.prototype;function ln(e){return e}sn.add=Ut,sn.calendar=function(e,t){var n=e||Lt(),r=Ht(n,this).startOf("day"),o=a.calendarFormat(this,r)||"sameElse",i=t&&(j(t[o])?t[o].call(this,n):t[o]);return this.format(i||this.localeData().calendar(o,this,Lt(n)))},sn.clone=function(){return new g(this)},sn.diff=function(e,t,n){var r,a,o;if(!this.isValid())return NaN;if(!(r=Ht(e,this)).isValid())return NaN;switch(a=6e4*(r.utcOffset()-this.utcOffset()),t=H(t)){case"year":o=Vt(this,r)/12;break;case"month":o=Vt(this,r);break;case"quarter":o=Vt(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-a)/864e5;break;case"week":o=(this-r-a)/6048e5;break;default:o=this-r}return n?o:M(o)},sn.endOf=function(e){return void 0===(e=H(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},sn.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},sn.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Lt(e).isValid())?Ft({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},sn.fromNow=function(e){return this.from(Lt(),e)},sn.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Lt(e).isValid())?Ft({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},sn.toNow=function(e){return this.to(Lt(),e)},sn.get=function(e){return j(this[e=H(e)])?this[e]():this},sn.invalidAt=function(){return h(this).overflow},sn.isAfter=function(e,t){var n=w(e)?e:Lt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(s(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},sn.isBefore=function(e,t){var n=w(e)?e:Lt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(s(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},sn.isBetween=function(e,t,n,r){return("("===(r=r||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===r[1]?this.isBefore(t,n):!this.isAfter(t,n))},sn.isSame=function(e,t){var n,r=w(e)?e:Lt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=H(t||"millisecond"))?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},sn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},sn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},sn.isValid=function(){return f(this)},sn.lang=$t,sn.locale=qt,sn.localeData=Kt,sn.max=Tt,sn.min=Yt,sn.parsingFlags=function(){return p({},h(this))},sn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:A[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=z(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(j(this[e=H(e)]))return this[e](t);return this},sn.startOf=function(e){switch(e=H(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},sn.subtract=Gt,sn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},sn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},sn.toDate=function(){return new Date(this.valueOf())},sn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):j(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},sn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+a)},sn.toJSON=function(){return this.isValid()?this.toISOString():null},sn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},sn.unix=function(){return Math.floor(this.valueOf()/1e3)},sn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},sn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},sn.year=ge,sn.isLeapYear=function(){return be(this.year())},sn.weekYear=function(e){return Qt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},sn.isoWeekYear=function(e){return Qt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},sn.quarter=sn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},sn.month=je,sn.daysInMonth=function(){return Le(this.year(),this.month())},sn.week=sn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},sn.isoWeek=sn.isoWeeks=function(e){var t=Re(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},sn.weeksInYear=function(){var e=this.localeData()._week;return Ne(this.year(),e.dow,e.doy)},sn.isoWeeksInYear=function(){return Ne(this.year(),1,4)},sn.date=en,sn.day=sn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},sn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},sn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},sn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},sn.hour=sn.hours=Qe,sn.minute=sn.minutes=tn,sn.second=sn.seconds=rn,sn.millisecond=sn.milliseconds=on,sn.utcOffset=function(e,t,n){var r,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ct(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=zt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==e&&(!t||this._changeInProgress?Jt(this,Ft(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:zt(this)},sn.utc=function(e){return this.utcOffset(0,e)},sn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(zt(this),"m")),this},sn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ct(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},sn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Lt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},sn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},sn.isLocal=function(){return!!this.isValid()&&!this._isUTC},sn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},sn.isUtc=At,sn.isUTC=At,sn.zoneAbbr=function(){return this._isUTC?"UTC":""},sn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},sn.dates=T("dates accessor is deprecated. Use date instead.",en),sn.months=T("months accessor is deprecated. Use month instead",je),sn.years=T("years accessor is deprecated. Use year instead",ge),sn.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),sn.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(b(e,this),(e=Mt(e))._a){var t=e._isUTC?m(e._a):Lt(e._a);this._isDSTShifted=this.isValid()&&L(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var un=E.prototype;function cn(e,t,n,r){var a=it(),o=m().set(r,t);return a[n](o,e)}function dn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");var r,a=[];for(r=0;r<12;r++)a[r]=cn(e,r,n,"month");return a}function pn(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var a,o=it(),i=e?o._week.dow:0;if(null!=n)return cn(t,(n+i)%7,r,"day");var s=[];for(a=0;a<7;a++)s[a]=cn(t,(a+i)%7,r,"day");return s}un.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return j(r)?r.call(t,n):r},un.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},un.invalidDate=function(){return this._invalidDate},un.ordinal=function(e){return this._ordinal.replace("%d",e)},un.preparse=ln,un.postformat=ln,un.relativeTime=function(e,t,n,r){var a=this._relativeTime[n];return j(a)?a(e,t,n,r):a.replace(/%d/i,e)},un.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return j(n)?n(t):n.replace(/%s/i,t)},un.set=function(e){var t,n;for(n in e)j(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},un.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ye).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},un.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ye.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},un.monthsParse=function(e,t,n){var r,a,o;if(this._monthsParseExact)return De.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(a=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},un.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Pe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Ee),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},un.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Pe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=xe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},un.week=function(e){return Re(e,this._week.dow,this._week.doy).week},un.firstDayOfYear=function(){return this._week.doy},un.firstDayOfWeek=function(){return this._week.dow},un.weekdays=function(e,t){return e?o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},un.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},un.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},un.weekdaysParse=function(e,t,n){var r,a,o;if(this._weekdaysParseExact)return Be.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(a,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(a,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(a,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},un.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ve.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Je),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},un.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ve.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ue),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},un.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ve.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ge),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},un.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},un.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},at("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),a.lang=T("moment.lang is deprecated. Use moment.locale instead.",at),a.langData=T("moment.langData is deprecated. Use moment.localeData instead.",it);var mn=Math.abs;function hn(e,t,n,r){var a=Ft(t,n);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function fn(e){return e<0?Math.floor(e):Math.ceil(e)}function _n(e){return 4800*e/146097}function yn(e){return 146097*e/4800}function bn(e){return function(){return this.as(e)}}var vn=bn("ms"),gn=bn("s"),wn=bn("m"),Mn=bn("h"),kn=bn("d"),Ln=bn("w"),Yn=bn("M"),Tn=bn("y");function Sn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Dn=Sn("milliseconds"),On=Sn("seconds"),jn=Sn("minutes"),xn=Sn("hours"),En=Sn("days"),Pn=Sn("months"),Cn=Sn("years"),Hn=Math.round,zn={ss:44,s:45,m:45,h:22,d:26,M:11};function An(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}var Rn=Math.abs;function Nn(e){return(e>0)-(e<0)||+e}function Fn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Rn(this._milliseconds)/1e3,r=Rn(this._days),a=Rn(this._months);e=M(n/60),t=M(e/60),n%=60,e%=60;var o=M(a/12),i=a%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var p=d<0?"-":"",m=Nn(this._months)!==Nn(d)?"-":"",h=Nn(this._days)!==Nn(d)?"-":"",f=Nn(this._milliseconds)!==Nn(d)?"-":"";return p+"P"+(o?m+o+"Y":"")+(i?m+i+"M":"")+(s?h+s+"D":"")+(l||u||c?"T":"")+(l?f+l+"H":"")+(u?f+u+"M":"")+(c?f+c+"S":"")}var Wn=Ot.prototype;return Wn.isValid=function(){return this._isValid},Wn.abs=function(){var e=this._data;return this._milliseconds=mn(this._milliseconds),this._days=mn(this._days),this._months=mn(this._months),e.milliseconds=mn(e.milliseconds),e.seconds=mn(e.seconds),e.minutes=mn(e.minutes),e.hours=mn(e.hours),e.months=mn(e.months),e.years=mn(e.years),this},Wn.add=function(e,t){return hn(this,e,t,1)},Wn.subtract=function(e,t){return hn(this,e,t,-1)},Wn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=H(e))||"year"===e)return t=this._days+r/864e5,n=this._months+_n(t),"month"===e?n:n/12;switch(t=this._days+Math.round(yn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Wn.asMilliseconds=vn,Wn.asSeconds=gn,Wn.asMinutes=wn,Wn.asHours=Mn,Wn.asDays=kn,Wn.asWeeks=Ln,Wn.asMonths=Yn,Wn.asYears=Tn,Wn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},Wn._bubble=function(){var e,t,n,r,a,o=this._milliseconds,i=this._days,s=this._months,l=this._data;return o>=0&&i>=0&&s>=0||o<=0&&i<=0&&s<=0||(o+=864e5*fn(yn(s)+i),i=0,s=0),l.milliseconds=o%1e3,e=M(o/1e3),l.seconds=e%60,t=M(e/60),l.minutes=t%60,n=M(t/60),l.hours=n%24,i+=M(n/24),a=M(_n(i)),s+=a,i-=fn(yn(a)),r=M(s/12),s%=12,l.days=i,l.months=s,l.years=r,this},Wn.clone=function(){return Ft(this)},Wn.get=function(e){return e=H(e),this.isValid()?this[e+"s"]():NaN},Wn.milliseconds=Dn,Wn.seconds=On,Wn.minutes=jn,Wn.hours=xn,Wn.days=En,Wn.weeks=function(){return M(this.days()/7)},Wn.months=Pn,Wn.years=Cn,Wn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Ft(e).abs(),a=Hn(r.as("s")),o=Hn(r.as("m")),i=Hn(r.as("h")),s=Hn(r.as("d")),l=Hn(r.as("M")),u=Hn(r.as("y")),c=a<=zn.ss&&["s",a]||a<zn.s&&["ss",a]||o<=1&&["m"]||o<zn.m&&["mm",o]||i<=1&&["h"]||i<zn.h&&["hh",i]||s<=1&&["d"]||s<zn.d&&["dd",s]||l<=1&&["M"]||l<zn.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=n,An.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Wn.toISOString=Fn,Wn.toString=Fn,Wn.toJSON=Fn,Wn.locale=qt,Wn.localeData=Kt,Wn.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Fn),Wn.lang=$t,J("X",0,0,"unix"),J("x",0,0,"valueOf"),ce("x",oe),ce("X",/[+-]?\d+(\.\d{1,3})?/),he("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),he("x",(function(e,t,n){n._d=new Date(k(e))})),a.version="2.20.1",t=Lt,a.fn=sn,a.min=function(){var e=[].slice.call(arguments,0);return St("isBefore",e)},a.max=function(){var e=[].slice.call(arguments,0);return St("isAfter",e)},a.now=function(){return Date.now?Date.now():+new Date},a.utc=m,a.unix=function(e){return Lt(1e3*e)},a.months=function(e,t){return dn(e,t,"months")},a.isDate=u,a.locale=at,a.invalid=_,a.duration=Ft,a.isMoment=w,a.weekdays=function(e,t,n){return pn(e,t,n,"weekdays")},a.parseZone=function(){return Lt.apply(null,arguments).parseZone()},a.localeData=it,a.isDuration=jt,a.monthsShort=function(e,t){return dn(e,t,"monthsShort")},a.weekdaysMin=function(e,t,n){return pn(e,t,n,"weekdaysMin")},a.defineLocale=ot,a.updateLocale=function(e,t){if(null!=t){var n,r,a=Xe;null!=(r=rt(e))&&(a=r._config),t=x(a,t),(n=new E(t)).parentLocale=et[e],et[e]=n,at(e)}else null!=et[e]&&(null!=et[e].parentLocale?et[e]=et[e].parentLocale:null!=et[e]&&delete et[e]);return et[e]},a.locales=function(){return S(et)},a.weekdaysShort=function(e,t,n){return pn(e,t,n,"weekdaysShort")},a.normalizeUnits=H,a.relativeTimeRounding=function(e){return void 0===e?Hn:"function"==typeof e&&(Hn=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==zn[e]&&(void 0===t?zn[e]:(zn[e]=t,"s"===e&&(zn.ss=t-1),!0))},a.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},a.prototype=sn,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},a}()}).call(this,n(9)(e))},function(e,t,n){"use strict";e.exports=n(135)},function(e,t){function n(e,t=null,n=null){var r=[];function a(e,t,n,o=0){let i;if(null!==n&&o<n)y(e)&&(i=Object.keys(e),i.forEach(r=>{a(e[r],t,n,o+1)}));else{if(null!==n&&o==n)return 0==n?void(r=a(e,t,null,o)):void(y(e)&&r.push(a(e,t,n,o+1)));switch(w(e)){case"array":var s=[];if(i=Object.keys(e),null===t||o<t)for(var l=0,u=i.length;l<u;l++){const r=i[l],u=e[r];s[r]=a(u,t,n,o+1)}return s;case"object":var c={};if(i=Object.keys(e),null===t||o<t)for(l=0,u=i.length;l<u;l++){const r=i[l],s=e[r];c[r]=a(s,t,n,o+1)}return c;case"string":return""+e;case"number":return 0+e;case"boolean":return!!e;case"null":return null;case"undefined":return}}}return null===n?a(e,t,n,0):(a(e,t,n,0),r)}function r(e,t,n=null){if("string"===w(t)&&""!==t){var r=[];return function e(t,n,a="",o="",i=null,s=0){if(a===n&&(r[r.length]=o),null!==i&&s>=i)return!1;if(y(t))for(var l=0,u=Object.keys(t),c=u.length;l<c;l++){const r=u[l];e(t[r],n,r,(""===o?o:o+".")+r,i,s+1)}}(e,t,"","",n),0!==(r=r.map(e=>"boolean"===w(e)||""===e?e:((e=e.split(".")).pop(),e=e.join(".")))).length&&r}}function a(e,t,n=null){if("string"===w(t)&&""!==t){var r=function e(t,n,r="",a,o=0){if(r===n)return r;var i=!1;if(null!==a&&o>=a)return i;if(y(t))for(var s=0,l=Object.keys(t),u=l.length;s<u;s++){const u=l[s],c=e(t[u],n,u,a,o+1);if(c){i=(r=""===r?r:r+".")+c;break}}return i}(e,t,"",n,0);return"boolean"===w(r)||""===r?r:((r=r.split(".")).pop(),r=r.join("."))}}function o(e,t,n=null){if(!u(t=s(t)))return function e(t,n,r,a=0){if(_(t,[n]))return u(t[n]);if(null!==r&&a>=r)return!1;if(y(t))for(var o=0,i=Object.keys(t),s=i.length;o<s;o++){if(e(t[i[o]],n,r,a+1))return!0}return!1}(e,t,n)}function i(e,t,n=null){if(!u(t=s(t)))return function e(t,n,r,a=0){if(_(t,[n]))return l(t[n]);if(null!==r&&a>=r)return!1;if(y(t))for(var o=0,i=Object.keys(t),s=i.length;o<s;o++){if(e(t[i[o]],n,r,a+1))return!0}return!1}(e,t,n,0)}function s(e){const t=c(e);return!(t>1)&&(1===t?Object.keys(e)[0]:0===t&&["string","number"].indexOf(w(e))>-1&&e)}function l(e){return!u(e)}function u(e){return!1===function(e){return y(e)?e:!(["null","undefined"].indexOf(w(e))>-1)&&(!(["",0,!1].indexOf(e)>-1)&&e)}(e)}function c(e){return-1===["array","object"].indexOf(w(e))?0:Object.keys(e).length}function d(e,t,n=null,r=0){if(b(e,t))return!0;if(y(t)&&g(e,t)&&_(e,Object.keys(t))){if(b(f(e,Object.keys(t)),t))return!0}if((null===n||r<n)&&y(e))for(var a=0,o=Object.keys(e),i=o.length;a<i;a++){if(d(e[o[a]],t,n,r+1))return!0}return!1}function p(e,t,n=null){var r=m(e,t,n);if(!1===r)return;return r.map(n=>{if(""===n)return e;n=n.split("."),-1===["array","object"].indexOf(w(t))&&n.splice(-1,1);var r=e;return Array.isArray(n)?(n.forEach(e=>{r=r[e]}),r):r[n]})}function m(e,t,n=null){var r=[];return function e(t,n,a="",o,i){if(y(n)&&g(t,n)&&_(t,Object.keys(n))){b(f(t,Object.keys(n)),n)&&(r[r.length]=a)}if(b(t,n)&&(r[r.length]=a),null!==o&&i>=o)return!1;if(y(t))for(var s=0,l=Object.keys(t),u=l.length;s<u;s++){const r=l[s];e(t[r],n,(""===a?a:a+".")+r,o,i+1)}}(e,t,"",n,0),0!==r.length&&r}function h(e,t,n=null){return function e(t,n,r="",a,o){if(y(n)&&g(t,n)&&_(t,Object.keys(n))){if(b(f(t,Object.keys(n)),n))return r}if(b(t,n))return r;var i=!1;if(null!==a&&o>=a)return i;if(y(t))for(var s=0,l=Object.keys(t),u=l.length;s<u;s++){const u=l[s],c=e(t[u],n,u,a,o+1);if(c){i=(r=""===r?r:r+".")+c;break}}return i}(e,t,"",n,0)}function f(e,t){const n=w(e);if(-1===["array","object"].indexOf(n))return;if(0!==t.length){var r;switch(n){case"object":r={},t.forEach(t=>{t in e&&(r[t]=e[t])});break;case"array":r=[],t.forEach(t=>{t in e&&r.push(e[t])})}return r}}function _(e,t){const n=t.length;if(0===n||!y(e))return!1;const r=Object.keys(e);for(var a=!0,o=0;o<n;o++){const e=""+t[o];if(-1===r.indexOf(e)){a=!1;break}}return a}function y(e){return-1!==["array","object"].indexOf(w(e))&&0!==Object.keys(e).length}function b(e,t){const n=v(e,t);if(!1===n)return n;if(-1===["array","object"].indexOf(n))return e===t;const r=Object.keys(e),a=r.length;for(var o=!0,i=0;i<a;i++){const n=r[i],a=b(e[n],t[n]);if(!1===a){o=a;break}}return o}function v(e,t){const n=g(e,t);if(!1===n)return!1;if(["array","object"].indexOf(n)>-1){const n=Object.keys(e),a=Object.keys(t),o=n.length;if(o!==a.length)return!1;if(0===o)return!0;for(var r=0;r<o;r++)if(n[r]!==a[r])return!1}return n}function g(e,t){const n=w(e);return n===w(t)&&n}function w(e){if(null===e)return"null";const t=typeof e;return"object"===t&&Array.isArray(e)?"array":t}var M={getType:function(e){return w(e)},sameType:function(e,t){return g(e,t)},sameStructure:function(e,t){return v(e,t)},identical:function(e,t){return b(e,t)},isIterable:function(e){return y(e)},containsKeys:function(e,t){return _(e,t)},trim:function(e,t){return f(e,t)},locate:function(e,t,n){return h(e,t,n)},deepGet:function(e,t,n){return function(e,t,n=null){var r=h(e,t,n);if(!1!==r){if(""===r)return e;r=r.split("."),-1===["array","object"].indexOf(w(t))&&r.splice(-1,1);var a=e;return Array.isArray(r)?(r.forEach(e=>{a=a[e]}),a):a[r]}}(e,t,n)},locateAll:function(e,t,n){return m(e,t,n)},deepFilter:function(e,t,n){return p(e,t,n)},exists:function(e,t,n){return d(e,t,n)},onlyExisting:function(e,t,n){return function(e,t,n=null){if("array"===w(t)){let r=[];return t.forEach(t=>{d(e,t,n)&&r.push(t)}),r}if("object"===w(t)){let r={};return Object.keys(t).forEach(a=>{let o=t[a];d(e,o,n)&&(r[a]=o)}),r}if(d(e,t,n))return t}(e,t,n)},onlyMissing:function(e,t,n){return function(e,t,n=null){if("array"===w(t)){let r=[];return t.forEach(t=>{d(e,t,n)||r.push(t)}),r}if("object"===w(t)){let r={};return Object.keys(t).forEach(a=>{let o=t[a];d(e,o,n)||(r[a]=o)}),r}if(!d(e,t,n))return t}(e,t,n)},length:function(e){return c(e)},isFalsy:function(e){return u(e)},isTruthy:function(e){return l(e)},foundTruthy:function(e,t,n){return i(e,t,n)},onlyTruthy:function(e,t,n,r){return function(e,t,n,r=null){if("array"===w(t)){let a=[];return t.forEach(t=>{const o=p(e,t);l(o)&&i(o,n,r)&&a.push(t)}),a}if("object"===w(t)){let a={};return Object.keys(t).forEach(o=>{const s=t[o],u=p(e,s);l(u)&&i(u,n,r)&&(a[o]=s)}),a}if(i(e,n,r))return t}(e,t,n,r)},foundFalsy:function(e,t,n){return o(e,t,n)},onlyFalsy:function(e,t,n,r){return function(e,t,n,r=null){if("array"===w(t)){let a=[];return t.forEach(t=>{const i=p(e,t);l(i)&&o(i,n,r)&&a.push(t)}),a}if("object"===w(t)){let a={};return Object.keys(t).forEach(i=>{const s=t[i],u=p(e,s);l(u)&&o(u,n,r)&&(a[i]=s)}),a}if(o(e,n,r))return t}(e,t,n,r)},countMatches:function(e,t,n,r){return function(e,t,n=null,r=null){var a=null===n,o=null===r,i=m(e,t,a&&o?null:a||o?n||r:n<r?n:r);if(!1===i)return 0;if(null===n)return i.length;if("number"===w(n)){let e=0;return i.forEach(t=>{(t=t.split(".")).length===n&&e++}),e}}(e,t,n,r)},matchDepth:function(e,t,n){return function(e,t,n=null){var r=h(e,t,n);return!1!==r&&(""===r?0:(r=r.split(".")).length)}(e,t,n)},maxDepth:function(e,t){return function(e,t=null){let n=0;return function e(t,r,a=0){n<a&&(n=a),null!==r&&a>=r||y(t)&&Object.keys(t).forEach(n=>{e(t[n],r,a+1)})}(e,t),n}(e,t)},locate_Key:function(e,t,n){return a(e,t,n)},deepGet_Key:function(e,t,n){return function(e,t,n=null){if("string"===w(t)&&""!==t){var r=a(e,t,n);if(!1!==r){""===r?r=t:r+="."+t,r=r.split(".");var o=e;return Array.isArray(r)?(r.forEach(e=>{o=o[e]}),o):o[r]}}}(e,t,n)},locateAll_Key:function(e,t,n){return r(e,t,n)},deepFilter_Key:function(e,t,n){return function(e,t,n=null){if("string"!==w(t))return;if(""===t)return;var a=r(e,t,n);if(!1===a)return;return a.map(n=>{if(!1!==n){""===n?n=t:n+="."+t,n=n.split(".");var r=e;return Array.isArray(n)?(n.forEach(e=>{r=r[e]}),r):r[n]}})}(e,t,n)},deepClone:function(e,t,r){return n(e,t,r)},renameKey:function(e,t,n,r){return function(e,t,n,r=null){if("string"===w(t)&&"string"===w(n)&&""!==t&&""!==n){var a=!1;return function e(t,n,r,o,i=0){let s;switch(w(t)){case"array":var l=[];s=Object.keys(t);for(var u=0,c=s.length;u<c;u++){let a=s[u],c=t[a];l[a]=e(c,n,r,o,i+1)}return l;case"object":var d={};s=Object.keys(t);for(u=0,c=s.length;u<c;u++){let l=s[u],c=t[l];(null===o||i<o)&&(a||l===n&&(l=r,a=!0)),d[l]=e(c,n,r,o,i+1)}return d;case"string":return""+t;case"number":return 0+t;case"boolean":return!!t;case"null":return null;case"undefined":return}}(e,t,n,r,0)}}(e,t,n,r)},renameKeys:function(e,t,n,r){return function(e,t,n,r=null){if("string"===w(t)&&"string"===w(n)&&""!==t&&""!==n)return function e(t,n,r,a,o=0){let i;switch(w(t)){case"array":var s=[];i=Object.keys(t);for(var l=0,u=i.length;l<u;l++){let u=i[l],c=t[u];s[u]=e(c,n,r,a,o+1)}return s;case"object":var c={};i=Object.keys(t);for(l=0,u=i.length;l<u;l++){let s=i[l],u=t[s];(null===a||o<a)&&s===n&&(s=r),c[s]=e(u,n,r,a,o+1)}return c;case"string":return""+t;case"number":return 0+t;case"boolean":return!!t;case"null":return null;case"undefined":return}}(e,t,n,r,0)}(e,t,n,r)},deepRemove_Key:function(e,t,r){return function(e,t,r){if("string"!==w(t))return;if(""===t)return;let o=n(e);var i=a(o,t,r);if(!1===i)return o;""===i?i=t:i+="."+t,i=i.split(".");var s=o;return Array.isArray(i)||delete s[i],i.forEach((e,t)=>{t<i.length-1?s=s[e]:delete s[e]}),o}(e,t,r)},deepRemoveAll_Key:function(e,t,a){return function(e,t,a){if("string"!==w(t))return;if(""===t)return;let o=n(e);var i=r(o,t,a);return i===[]||!1===i||i.forEach(e=>{""===e?e=t:e+="."+t,e=e.split(".");var n=o;Array.isArray(e)||delete n[e];for(var r=0;r<e.length;r++){var a=e[r];if(!(a in n))break;r<e.length-1?n=n[a]:delete n[a]}}),o}(e,t,a)}};e.exports=M},function(e,t,n){(function(e){!function(t){var n=function(e){return a(!0===e,!1,arguments)};function r(e,t){if("object"!==o(e))return t;for(var n in t)"object"===o(e[n])&&"object"===o(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function a(e,t,a){var i=a[0],s=a.length;(e||"object"!==o(i))&&(i={});for(var l=0;l<s;++l){var u=a[l];if("object"===o(u))for(var c in u)if("__proto__"!==c){var d=e?n.clone(u[c]):u[c];i[c]=t?r(i[c],d):d}}return i}function o(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}n.recursive=function(e){return a(!0===e,!0,arguments)},n.clone=function(e){var t,r,a=e,i=o(e);if("array"===i)for(a=[],r=e.length,t=0;t<r;++t)a[t]=n.clone(e[t]);else if("object"===i)for(t in a={},e)a[t]=n.clone(e[t]);return a},t?e.exports=n:window.merge=n}(e&&"object"==typeof e.exports&&e.exports)}).call(this,n(9)(e))},function(e,t,n){"use strict";
1 +!function(e){function t(t){for(var r,i,s=t[0],l=t[1],u=t[2],d=0,p=[];d<s.length;d++)i=s[d],Object.prototype.hasOwnProperty.call(a,i)&&a[i]&&p.push(a[i][0]),a[i]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(c&&c(t);p.length;)p.shift()();return o.push.apply(o,u||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,s=1;s<n.length;s++){var l=n[s];0!==a[l]&&(r=!1)}r&&(o.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},a={1:0},o=[];function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var s=window.webpackJsonp=window.webpackJsonp||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var u=0;u<s.length;u++)t(s[u]);var c=l;o.push([154,0]),n()}([function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function a(){return t.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function p(e,t){for(var n in t)d(t,n)&&(e[n]=t[n]);return d(t,"toString")&&(e.toString=t.toString),d(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t,n,r){return kt(e,t,n,r,!0).utc()}function h(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function f(e){if(null==e._isValid){var t=h(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),a=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(a=a&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return a;e._isValid=a}return e._isValid}function _(e){var t=m(NaN);return null!=e?p(h(t),e):h(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var y=a.momentProperties=[];function b(e,t){var n,r,a;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=h(t)),s(t._locale)||(e._locale=t._locale),y.length>0)for(n=0;n<y.length;n++)s(a=t[r=y[n]])||(e[r]=a);return e}var g=!1;function v(e){b(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===g&&(g=!0,a.updateOffset(this),g=!1)}function w(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function M(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=M(t)),n}function L(e,t,n){var r,a=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),i=0;for(r=0;r<a;r++)(n&&e[r]!==t[r]||!n&&k(e[r])!==k(t[r]))&&i++;return i+o}function Y(e){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,t){var n=!0;return p((function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,e),n){for(var r,o=[],i=0;i<arguments.length;i++){if(r="","object"==typeof arguments[i]){for(var s in r+="\n["+i+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[i];o.push(r)}Y(e+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var D,S={};function O(e,t){null!=a.deprecationHandler&&a.deprecationHandler(e,t),S[e]||(Y(t),S[e]=!0)}function j(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function x(e,t){var n,r=p({},e);for(n in t)d(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)d(e,n)&&!d(t,n)&&i(e[n])&&(r[n]=p({},r[n]));return r}function E(e){null!=e&&this.set(e)}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,D=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)d(e,t)&&n.push(t);return n};var P={};function C(e,t){var n=e.toLowerCase();P[n]=P[n+"s"]=P[t]=e}function H(e){return"string"==typeof e?P[e]||P[e.toLowerCase()]:void 0}function z(e){var t,n,r={};for(n in e)d(e,n)&&(t=H(n))&&(r[t]=e[n]);return r}var A={};function R(e,t){A[e]=t}function N(e,t,n){var r=""+Math.abs(e),a=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+r}var F=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,I={},B={};function J(e,t,n,r){var a=r;"string"==typeof r&&(a=function(){return this[r]()}),e&&(B[e]=a),t&&(B[t[0]]=function(){return N(a.apply(this,arguments),t[1],t[2])}),n&&(B[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=G(t,e.localeData()),I[t]=I[t]||function(e){var t,n,r,a=e.match(F);for(t=0,n=a.length;t<n;t++)B[a[t]]?a[t]=B[a[t]]:a[t]=(r=a[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,o="";for(r=0;r<n;r++)o+=j(a[r])?a[r].call(t,e):a[r];return o}}(t),I[t](e)):e.localeData().invalidDate()}function G(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(W.lastIndex=0;n>=0&&W.test(e);)e=e.replace(W,r),W.lastIndex=0,n-=1;return e}var V=/\d/,q=/\d\d/,$=/\d{3}/,K=/\d{4}/,Z=/[+-]?\d{6}/,Q=/\d\d?/,X=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,ae=/\d+/,oe=/[+-]?\d+/,ie=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function ce(e,t,n){ue[e]=j(t)?t:function(e,r){return e&&n?n:t}}function de(e,t){return d(ue,e)?ue[e](t._strict,t._locale):new RegExp(pe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,a){return t||n||r||a}))))}function pe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var me={};function he(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=k(e)}),n=0;n<e.length;n++)me[e[n]]=r}function fe(e,t){he(e,(function(e,n,r,a){r._w=r._w||{},t(e,r._w,r,a)}))}function _e(e,t,n){null!=t&&d(me,e)&&me[e](t,n._a,n,e)}function ye(e){return be(e)?366:365}function be(e){return e%4==0&&e%100!=0||e%400==0}J("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),J(0,["YY",2],0,(function(){return this.year()%100})),J(0,["YYYY",4],0,"year"),J(0,["YYYYY",5],0,"year"),J(0,["YYYYYY",6,!0],0,"year"),C("year","y"),R("year",1),ce("Y",oe),ce("YY",Q,q),ce("YYYY",ne,K),ce("YYYYY",re,Z),ce("YYYYYY",re,Z),he(["YYYYY","YYYYYY"],0),he("YYYY",(function(e,t){t[0]=2===e.length?a.parseTwoDigitYear(e):k(e)})),he("YY",(function(e,t){t[0]=a.parseTwoDigitYear(e)})),he("Y",(function(e,t){t[0]=parseInt(e,10)})),a.parseTwoDigitYear=function(e){return k(e)+(k(e)>68?1900:2e3)};var ge,ve=we("FullYear",!0);function we(e,t){return function(n){return null!=n?(ke(this,e,n),a.updateOffset(this,t),this):Me(this,e)}}function Me(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function ke(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&be(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Le(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Le(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?be(e)?29:28:31-r%7%2}ge=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},J("M",["MM",2],"Mo",(function(){return this.month()+1})),J("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),J("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),C("month","M"),R("month",8),ce("M",Q),ce("MM",Q,q),ce("MMM",(function(e,t){return t.monthsShortRegex(e)})),ce("MMMM",(function(e,t){return t.monthsRegex(e)})),he(["M","MM"],(function(e,t){t[1]=k(e)-1})),he(["MMM","MMMM"],(function(e,t,n,r){var a=n._locale.monthsParse(e,r,n._strict);null!=a?t[1]=a:h(n).invalidMonth=e}));var Ye=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Te="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),De="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Se(e,t,n){var r,a,o,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(a=ge.call(this._shortMonthsParse,i))?a:null:-1!==(a=ge.call(this._longMonthsParse,i))?a:null:"MMM"===t?-1!==(a=ge.call(this._shortMonthsParse,i))||-1!==(a=ge.call(this._longMonthsParse,i))?a:null:-1!==(a=ge.call(this._longMonthsParse,i))||-1!==(a=ge.call(this._shortMonthsParse,i))?a:null}function Oe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=k(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Le(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function je(e){return null!=e?(Oe(this,e),a.updateOffset(this,!0),this):Me(this,"Month")}var xe=le,Ee=le;function Pe(){function e(e,t){return t.length-e.length}var t,n,r=[],a=[],o=[];for(t=0;t<12;t++)n=m([2e3,t]),r.push(this.monthsShort(n,"")),a.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(e),a.sort(e),o.sort(e),t=0;t<12;t++)r[t]=pe(r[t]),a[t]=pe(a[t]);for(t=0;t<24;t++)o[t]=pe(o[t]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ce(e,t,n,r,a,o,i){var s=new Date(e,t,n,r,a,o,i);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function He(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function ze(e,t,n){var r=7+t-n;return-(7+He(e,0,r).getUTCDay()-t)%7+r-1}function Ae(e,t,n,r,a){var o,i,s=1+7*(t-1)+(7+n-r)%7+ze(e,r,a);return s<=0?i=ye(o=e-1)+s:s>ye(e)?(o=e+1,i=s-ye(e)):(o=e,i=s),{year:o,dayOfYear:i}}function Re(e,t,n){var r,a,o=ze(e.year(),t,n),i=Math.floor((e.dayOfYear()-o-1)/7)+1;return i<1?r=i+Ne(a=e.year()-1,t,n):i>Ne(e.year(),t,n)?(r=i-Ne(e.year(),t,n),a=e.year()+1):(a=e.year(),r=i),{week:r,year:a}}function Ne(e,t,n){var r=ze(e,t,n),a=ze(e+1,t,n);return(ye(e)-r+a)/7}J("w",["ww",2],"wo","week"),J("W",["WW",2],"Wo","isoWeek"),C("week","w"),C("isoWeek","W"),R("week",5),R("isoWeek",5),ce("w",Q),ce("ww",Q,q),ce("W",Q),ce("WW",Q,q),fe(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=k(e)})),J("d",0,"do","day"),J("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),J("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),J("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),J("e",0,0,"weekday"),J("E",0,0,"isoWeekday"),C("day","d"),C("weekday","e"),C("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),ce("d",Q),ce("e",Q),ce("E",Q),ce("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ce("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ce("dddd",(function(e,t){return t.weekdaysRegex(e)})),fe(["dd","ddd","dddd"],(function(e,t,n,r){var a=n._locale.weekdaysParse(e,r,n._strict);null!=a?t.d=a:h(n).invalidWeekday=e})),fe(["d","e","E"],(function(e,t,n,r){t[r]=k(e)}));var Fe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),We="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ie="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Be(e,t,n){var r,a,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(a=ge.call(this._weekdaysParse,i))?a:null:"ddd"===t?-1!==(a=ge.call(this._shortWeekdaysParse,i))?a:null:-1!==(a=ge.call(this._minWeekdaysParse,i))?a:null:"dddd"===t?-1!==(a=ge.call(this._weekdaysParse,i))||-1!==(a=ge.call(this._shortWeekdaysParse,i))||-1!==(a=ge.call(this._minWeekdaysParse,i))?a:null:"ddd"===t?-1!==(a=ge.call(this._shortWeekdaysParse,i))||-1!==(a=ge.call(this._weekdaysParse,i))||-1!==(a=ge.call(this._minWeekdaysParse,i))?a:null:-1!==(a=ge.call(this._minWeekdaysParse,i))||-1!==(a=ge.call(this._weekdaysParse,i))||-1!==(a=ge.call(this._shortWeekdaysParse,i))?a:null}var Je=le,Ue=le,Ge=le;function Ve(){function e(e,t){return t.length-e.length}var t,n,r,a,o,i=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=m([2e3,1]).day(t),r=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),o=this.weekdays(n,""),i.push(r),s.push(a),l.push(o),u.push(r),u.push(a),u.push(o);for(i.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=pe(s[t]),l[t]=pe(l[t]),u[t]=pe(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function qe(){return this.hours()%12||12}function $e(e,t){J(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Ke(e,t){return t._meridiemParse}J("H",["HH",2],0,"hour"),J("h",["hh",2],0,qe),J("k",["kk",2],0,(function(){return this.hours()||24})),J("hmm",0,0,(function(){return""+qe.apply(this)+N(this.minutes(),2)})),J("hmmss",0,0,(function(){return""+qe.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)})),J("Hmm",0,0,(function(){return""+this.hours()+N(this.minutes(),2)})),J("Hmmss",0,0,(function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)})),$e("a",!0),$e("A",!1),C("hour","h"),R("hour",13),ce("a",Ke),ce("A",Ke),ce("H",Q),ce("h",Q),ce("k",Q),ce("HH",Q,q),ce("hh",Q,q),ce("kk",Q,q),ce("hmm",X),ce("hmmss",ee),ce("Hmm",X),ce("Hmmss",ee),he(["H","HH"],3),he(["k","kk"],(function(e,t,n){var r=k(e);t[3]=24===r?0:r})),he(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),he(["h","hh"],(function(e,t,n){t[3]=k(e),h(n).bigHour=!0})),he("hmm",(function(e,t,n){var r=e.length-2;t[3]=k(e.substr(0,r)),t[4]=k(e.substr(r)),h(n).bigHour=!0})),he("hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[3]=k(e.substr(0,r)),t[4]=k(e.substr(r,2)),t[5]=k(e.substr(a)),h(n).bigHour=!0})),he("Hmm",(function(e,t,n){var r=e.length-2;t[3]=k(e.substr(0,r)),t[4]=k(e.substr(r))})),he("Hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[3]=k(e.substr(0,r)),t[4]=k(e.substr(r,2)),t[5]=k(e.substr(a))}));var Ze,Qe=we("Hours",!0),Xe={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:De,week:{dow:0,doy:6},weekdays:Fe,weekdaysMin:Ie,weekdaysShort:We,meridiemParse:/[ap]\.?m?\.?/i},et={},tt={};function nt(e){return e?e.toLowerCase().replace("_","-"):e}function rt(t){var r=null;if(!et[t]&&void 0!==e&&e&&e.exports)try{r=Ze._abbr,n(149)("./"+t),at(r)}catch(e){}return et[t]}function at(e,t){var n;return e&&(n=s(t)?it(e):ot(e,t))&&(Ze=n),Ze._abbr}function ot(e,t){if(null!==t){var n=Xe;if(t.abbr=e,null!=et[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=et[e]._config;else if(null!=t.parentLocale){if(null==et[t.parentLocale])return tt[t.parentLocale]||(tt[t.parentLocale]=[]),tt[t.parentLocale].push({name:e,config:t}),null;n=et[t.parentLocale]._config}return et[e]=new E(x(n,t)),tt[e]&&tt[e].forEach((function(e){ot(e.name,e.config)})),at(e),et[e]}return delete et[e],null}function it(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ze;if(!o(e)){if(t=rt(e))return t;e=[e]}return function(e){for(var t,n,r,a,o=0;o<e.length;){for(t=(a=nt(e[o]).split("-")).length,n=(n=nt(e[o+1]))?n.split("-"):null;t>0;){if(r=rt(a.slice(0,t).join("-")))return r;if(n&&n.length>=t&&L(a,n,!0)>=t-1)break;t--}o++}return null}(e)}function st(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Le(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,h(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),h(e)._overflowWeeks&&-1===t&&(t=7),h(e)._overflowWeekday&&-1===t&&(t=8),h(e).overflow=t),e}function lt(e,t,n){return null!=e?e:null!=t?t:n}function ut(e){var t,n,r,o,i,s=[];if(!e._d){for(r=function(e){var t=new Date(a.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,a,o,i,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,i=4,n=lt(t.GG,e._a[0],Re(Lt(),1,4).year),r=lt(t.W,1),((a=lt(t.E,1))<1||a>7)&&(l=!0);else{o=e._locale._week.dow,i=e._locale._week.doy;var u=Re(Lt(),o,i);n=lt(t.gg,e._a[0],u.year),r=lt(t.w,u.week),null!=t.d?((a=t.d)<0||a>6)&&(l=!0):null!=t.e?(a=t.e+o,(t.e<0||t.e>6)&&(l=!0)):a=o}r<1||r>Ne(n,o,i)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(s=Ae(n,r,a,o,i),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(i=lt(e._a[0],r[0]),(e._dayOfYear>ye(i)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=He(i,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?He:Ce).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(h(e).weekdayMismatch=!0)}}var ct=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pt=/Z|[+-]\d\d(?::?\d\d)?/,mt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ht=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ft=/^\/?Date\((\-?\d+)/i;function _t(e){var t,n,r,a,o,i,s=e._i,l=ct.exec(s)||dt.exec(s);if(l){for(h(e).iso=!0,t=0,n=mt.length;t<n;t++)if(mt[t][1].exec(l[1])){a=mt[t][0],r=!1!==mt[t][2];break}if(null==a)return void(e._isValid=!1);if(l[3]){for(t=0,n=ht.length;t<n;t++)if(ht[t][1].exec(l[3])){o=(l[2]||" ")+ht[t][0];break}if(null==o)return void(e._isValid=!1)}if(!r&&null!=o)return void(e._isValid=!1);if(l[4]){if(!pt.exec(l[4]))return void(e._isValid=!1);i="Z"}e._f=a+(o||"")+(i||""),wt(e)}else e._isValid=!1}var yt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function bt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var gt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vt(e){var t,n,r,a,o,i,s,l=yt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(l){var u=(t=l[4],n=l[3],r=l[2],a=l[5],o=l[6],i=l[7],s=[bt(t),De.indexOf(n),parseInt(r,10),parseInt(a,10),parseInt(o,10)],i&&s.push(parseInt(i,10)),s);if(!function(e,t,n){return!e||We.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(h(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],u,e))return;e._a=u,e._tzm=function(e,t,n){if(e)return gt[e];if(t)return 0;var r=parseInt(n,10),a=r%100;return(r-a)/100*60+a}(l[8],l[9],l[10]),e._d=He.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function wt(e){if(e._f!==a.ISO_8601)if(e._f!==a.RFC_2822){e._a=[],h(e).empty=!0;var t,n,r,o,i,s=""+e._i,l=s.length,u=0;for(r=G(e._f,e._locale).match(F)||[],t=0;t<r.length;t++)o=r[t],(n=(s.match(de(o,e))||[])[0])&&((i=s.substr(0,s.indexOf(n))).length>0&&h(e).unusedInput.push(i),s=s.slice(s.indexOf(n)+n.length),u+=n.length),B[o]?(n?h(e).empty=!1:h(e).unusedTokens.push(o),_e(o,n,e)):e._strict&&!n&&h(e).unusedTokens.push(o);h(e).charsLeftOver=l-u,s.length>0&&h(e).unusedInput.push(s),e._a[3]<=12&&!0===h(e).bigHour&&e._a[3]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),ut(e),st(e)}else vt(e);else _t(e)}function Mt(e){var t=e._i,n=e._f;return e._locale=e._locale||it(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new v(st(t)):(u(t)?e._d=t:o(n)?function(e){var t,n,r,a,o;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<e._f.length;a++)o=0,t=b({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],wt(t),f(t)&&(o+=h(t).charsLeftOver,o+=10*h(t).unusedTokens.length,h(t).score=o,(null==r||o<r)&&(r=o,n=t));p(e,n||t)}(e):n?wt(e):function(e){var t=e._i;s(t)?e._d=new Date(a.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=ft.exec(e._i);null===t?(_t(e),!1===e._isValid&&(delete e._isValid,vt(e),!1===e._isValid&&(delete e._isValid,a.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):o(t)?(e._a=c(t.slice(0),(function(e){return parseInt(e,10)})),ut(e)):i(t)?function(e){if(!e._d){var t=z(e._i);e._a=c([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),ut(e)}}(e):l(t)?e._d=new Date(t):a.createFromInputFallback(e)}(e),f(e)||(e._d=null),e))}function kt(e,t,n,r,a){var s,l={};return!0!==n&&!1!==n||(r=n,n=void 0),(i(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=n,l._i=e,l._f=t,l._strict=r,(s=new v(st(Mt(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Lt(e,t,n,r){return kt(e,t,n,r,!1)}a.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),a.ISO_8601=function(){},a.RFC_2822=function(){};var Yt=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Lt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),Tt=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Lt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));function Dt(e,t){var n,r;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Lt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var St=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ot(e){var t=z(e),n=t.year||0,r=t.quarter||0,a=t.month||0,o=t.week||0,i=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===ge.call(St,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<St.length;++r)if(e[St[r]]){if(n)return!1;parseFloat(e[St[r]])!==k(e[St[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+i+7*o,this._months=+a+3*r+12*n,this._data={},this._locale=it(),this._bubble()}function jt(e){return e instanceof Ot}function xt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Et(e,t){J(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+N(~~(e/60),2)+t+N(~~e%60,2)}))}Et("Z",":"),Et("ZZ",""),ce("Z",se),ce("ZZ",se),he(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Ct(se,e)}));var Pt=/([\+\-]|\d\d)/gi;function Ct(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Pt)||["-",0,0],a=60*r[1]+k(r[2]);return 0===a?0:"+"===r[0]?a:-a}function Ht(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(w(e)||u(e)?e.valueOf():Lt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),a.updateOffset(n,!1),n):Lt(e).local()}function zt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function At(){return!!this.isValid()&&this._isUTC&&0===this._offset}a.updateOffset=function(){};var Rt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Nt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ft(e,t){var n,r,a,o,i,s,u=e,c=null;return jt(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(u={},t?u[t]=e:u.milliseconds=e):(c=Rt.exec(e))?(n="-"===c[1]?-1:1,u={y:0,d:k(c[2])*n,h:k(c[3])*n,m:k(c[4])*n,s:k(c[5])*n,ms:k(xt(1e3*c[6]))*n}):(c=Nt.exec(e))?(n="-"===c[1]?-1:(c[1],1),u={y:Wt(c[2],n),M:Wt(c[3],n),w:Wt(c[4],n),d:Wt(c[5],n),h:Wt(c[6],n),m:Wt(c[7],n),s:Wt(c[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(o=Lt(u.from),i=Lt(u.to),a=o.isValid()&&i.isValid()?(i=Ht(i,o),o.isBefore(i)?s=It(o,i):((s=It(i,o)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=a.milliseconds,u.M=a.months),r=new Ot(u),jt(e)&&d(e,"_locale")&&(r._locale=e._locale),r}function Wt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function It(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Bt(e,t){return function(n,r){var a;return null===r||isNaN(+r)||(O(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),Jt(this,Ft(n="string"==typeof n?+n:n,r),e),this}}function Jt(e,t,n,r){var o=t._milliseconds,i=xt(t._days),s=xt(t._months);e.isValid()&&(r=null==r||r,s&&Oe(e,Me(e,"Month")+s*n),i&&ke(e,"Date",Me(e,"Date")+i*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&a.updateOffset(e,i||s))}Ft.fn=Ot.prototype,Ft.invalid=function(){return Ft(NaN)};var Ut=Bt(1,"add"),Gt=Bt(-1,"subtract");function Vt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=it(e))&&(this._locale=t),this)}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var $t=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function Kt(){return this._locale}function Zt(e,t){J(0,[e,e.length],0,t)}function Qt(e,t,n,r,a){var o;return null==e?Re(this,r,a).year:(t>(o=Ne(e,r,a))&&(t=o),Xt.call(this,e,t,n,r,a))}function Xt(e,t,n,r,a){var o=Ae(e,t,n,r,a),i=He(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}J(0,["gg",2],0,(function(){return this.weekYear()%100})),J(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Zt("gggg","weekYear"),Zt("ggggg","weekYear"),Zt("GGGG","isoWeekYear"),Zt("GGGGG","isoWeekYear"),C("weekYear","gg"),C("isoWeekYear","GG"),R("weekYear",1),R("isoWeekYear",1),ce("G",oe),ce("g",oe),ce("GG",Q,q),ce("gg",Q,q),ce("GGGG",ne,K),ce("gggg",ne,K),ce("GGGGG",re,Z),ce("ggggg",re,Z),fe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=k(e)})),fe(["gg","GG"],(function(e,t,n,r){t[r]=a.parseTwoDigitYear(e)})),J("Q",0,"Qo","quarter"),C("quarter","Q"),R("quarter",7),ce("Q",V),he("Q",(function(e,t){t[1]=3*(k(e)-1)})),J("D",["DD",2],"Do","date"),C("date","D"),R("date",9),ce("D",Q),ce("DD",Q,q),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),he(["D","DD"],2),he("Do",(function(e,t){t[2]=k(e.match(Q)[0])}));var en=we("Date",!0);J("DDD",["DDDD",3],"DDDo","dayOfYear"),C("dayOfYear","DDD"),R("dayOfYear",4),ce("DDD",te),ce("DDDD",$),he(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=k(e)})),J("m",["mm",2],0,"minute"),C("minute","m"),R("minute",14),ce("m",Q),ce("mm",Q,q),he(["m","mm"],4);var tn=we("Minutes",!1);J("s",["ss",2],0,"second"),C("second","s"),R("second",15),ce("s",Q),ce("ss",Q,q),he(["s","ss"],5);var nn,rn=we("Seconds",!1);for(J("S",0,0,(function(){return~~(this.millisecond()/100)})),J(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),J(0,["SSS",3],0,"millisecond"),J(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),J(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),J(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),J(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),J(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),J(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),C("millisecond","ms"),R("millisecond",16),ce("S",te,V),ce("SS",te,q),ce("SSS",te,$),nn="SSSS";nn.length<=9;nn+="S")ce(nn,ae);function an(e,t){t[6]=k(1e3*("0."+e))}for(nn="S";nn.length<=9;nn+="S")he(nn,an);var on=we("Milliseconds",!1);J("z",0,0,"zoneAbbr"),J("zz",0,0,"zoneName");var sn=v.prototype;function ln(e){return e}sn.add=Ut,sn.calendar=function(e,t){var n=e||Lt(),r=Ht(n,this).startOf("day"),o=a.calendarFormat(this,r)||"sameElse",i=t&&(j(t[o])?t[o].call(this,n):t[o]);return this.format(i||this.localeData().calendar(o,this,Lt(n)))},sn.clone=function(){return new v(this)},sn.diff=function(e,t,n){var r,a,o;if(!this.isValid())return NaN;if(!(r=Ht(e,this)).isValid())return NaN;switch(a=6e4*(r.utcOffset()-this.utcOffset()),t=H(t)){case"year":o=Vt(this,r)/12;break;case"month":o=Vt(this,r);break;case"quarter":o=Vt(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-a)/864e5;break;case"week":o=(this-r-a)/6048e5;break;default:o=this-r}return n?o:M(o)},sn.endOf=function(e){return void 0===(e=H(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},sn.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},sn.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Lt(e).isValid())?Ft({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},sn.fromNow=function(e){return this.from(Lt(),e)},sn.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Lt(e).isValid())?Ft({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},sn.toNow=function(e){return this.to(Lt(),e)},sn.get=function(e){return j(this[e=H(e)])?this[e]():this},sn.invalidAt=function(){return h(this).overflow},sn.isAfter=function(e,t){var n=w(e)?e:Lt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(s(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},sn.isBefore=function(e,t){var n=w(e)?e:Lt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(s(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},sn.isBetween=function(e,t,n,r){return("("===(r=r||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===r[1]?this.isBefore(t,n):!this.isAfter(t,n))},sn.isSame=function(e,t){var n,r=w(e)?e:Lt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=H(t||"millisecond"))?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},sn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},sn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},sn.isValid=function(){return f(this)},sn.lang=$t,sn.locale=qt,sn.localeData=Kt,sn.max=Tt,sn.min=Yt,sn.parsingFlags=function(){return p({},h(this))},sn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:A[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=z(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(j(this[e=H(e)]))return this[e](t);return this},sn.startOf=function(e){switch(e=H(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},sn.subtract=Gt,sn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},sn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},sn.toDate=function(){return new Date(this.valueOf())},sn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):j(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},sn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+a)},sn.toJSON=function(){return this.isValid()?this.toISOString():null},sn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},sn.unix=function(){return Math.floor(this.valueOf()/1e3)},sn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},sn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},sn.year=ve,sn.isLeapYear=function(){return be(this.year())},sn.weekYear=function(e){return Qt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},sn.isoWeekYear=function(e){return Qt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},sn.quarter=sn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},sn.month=je,sn.daysInMonth=function(){return Le(this.year(),this.month())},sn.week=sn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},sn.isoWeek=sn.isoWeeks=function(e){var t=Re(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},sn.weeksInYear=function(){var e=this.localeData()._week;return Ne(this.year(),e.dow,e.doy)},sn.isoWeeksInYear=function(){return Ne(this.year(),1,4)},sn.date=en,sn.day=sn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},sn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},sn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},sn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},sn.hour=sn.hours=Qe,sn.minute=sn.minutes=tn,sn.second=sn.seconds=rn,sn.millisecond=sn.milliseconds=on,sn.utcOffset=function(e,t,n){var r,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ct(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=zt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==e&&(!t||this._changeInProgress?Jt(this,Ft(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:zt(this)},sn.utc=function(e){return this.utcOffset(0,e)},sn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(zt(this),"m")),this},sn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ct(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},sn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Lt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},sn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},sn.isLocal=function(){return!!this.isValid()&&!this._isUTC},sn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},sn.isUtc=At,sn.isUTC=At,sn.zoneAbbr=function(){return this._isUTC?"UTC":""},sn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},sn.dates=T("dates accessor is deprecated. Use date instead.",en),sn.months=T("months accessor is deprecated. Use month instead",je),sn.years=T("years accessor is deprecated. Use year instead",ve),sn.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),sn.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(b(e,this),(e=Mt(e))._a){var t=e._isUTC?m(e._a):Lt(e._a);this._isDSTShifted=this.isValid()&&L(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var un=E.prototype;function cn(e,t,n,r){var a=it(),o=m().set(r,t);return a[n](o,e)}function dn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");var r,a=[];for(r=0;r<12;r++)a[r]=cn(e,r,n,"month");return a}function pn(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var a,o=it(),i=e?o._week.dow:0;if(null!=n)return cn(t,(n+i)%7,r,"day");var s=[];for(a=0;a<7;a++)s[a]=cn(t,(a+i)%7,r,"day");return s}un.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return j(r)?r.call(t,n):r},un.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},un.invalidDate=function(){return this._invalidDate},un.ordinal=function(e){return this._ordinal.replace("%d",e)},un.preparse=ln,un.postformat=ln,un.relativeTime=function(e,t,n,r){var a=this._relativeTime[n];return j(a)?a(e,t,n,r):a.replace(/%d/i,e)},un.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return j(n)?n(t):n.replace(/%s/i,t)},un.set=function(e){var t,n;for(n in e)j(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},un.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ye).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},un.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ye.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},un.monthsParse=function(e,t,n){var r,a,o;if(this._monthsParseExact)return Se.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(a=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},un.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Pe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Ee),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},un.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Pe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=xe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},un.week=function(e){return Re(e,this._week.dow,this._week.doy).week},un.firstDayOfYear=function(){return this._week.doy},un.firstDayOfWeek=function(){return this._week.dow},un.weekdays=function(e,t){return e?o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},un.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},un.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},un.weekdaysParse=function(e,t,n){var r,a,o;if(this._weekdaysParseExact)return Be.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(a,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(a,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(a,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},un.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ve.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Je),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},un.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ve.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ue),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},un.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Ve.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ge),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},un.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},un.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},at("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),a.lang=T("moment.lang is deprecated. Use moment.locale instead.",at),a.langData=T("moment.langData is deprecated. Use moment.localeData instead.",it);var mn=Math.abs;function hn(e,t,n,r){var a=Ft(t,n);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function fn(e){return e<0?Math.floor(e):Math.ceil(e)}function _n(e){return 4800*e/146097}function yn(e){return 146097*e/4800}function bn(e){return function(){return this.as(e)}}var gn=bn("ms"),vn=bn("s"),wn=bn("m"),Mn=bn("h"),kn=bn("d"),Ln=bn("w"),Yn=bn("M"),Tn=bn("y");function Dn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Sn=Dn("milliseconds"),On=Dn("seconds"),jn=Dn("minutes"),xn=Dn("hours"),En=Dn("days"),Pn=Dn("months"),Cn=Dn("years"),Hn=Math.round,zn={ss:44,s:45,m:45,h:22,d:26,M:11};function An(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}var Rn=Math.abs;function Nn(e){return(e>0)-(e<0)||+e}function Fn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Rn(this._milliseconds)/1e3,r=Rn(this._days),a=Rn(this._months);e=M(n/60),t=M(e/60),n%=60,e%=60;var o=M(a/12),i=a%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var p=d<0?"-":"",m=Nn(this._months)!==Nn(d)?"-":"",h=Nn(this._days)!==Nn(d)?"-":"",f=Nn(this._milliseconds)!==Nn(d)?"-":"";return p+"P"+(o?m+o+"Y":"")+(i?m+i+"M":"")+(s?h+s+"D":"")+(l||u||c?"T":"")+(l?f+l+"H":"")+(u?f+u+"M":"")+(c?f+c+"S":"")}var Wn=Ot.prototype;return Wn.isValid=function(){return this._isValid},Wn.abs=function(){var e=this._data;return this._milliseconds=mn(this._milliseconds),this._days=mn(this._days),this._months=mn(this._months),e.milliseconds=mn(e.milliseconds),e.seconds=mn(e.seconds),e.minutes=mn(e.minutes),e.hours=mn(e.hours),e.months=mn(e.months),e.years=mn(e.years),this},Wn.add=function(e,t){return hn(this,e,t,1)},Wn.subtract=function(e,t){return hn(this,e,t,-1)},Wn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=H(e))||"year"===e)return t=this._days+r/864e5,n=this._months+_n(t),"month"===e?n:n/12;switch(t=this._days+Math.round(yn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Wn.asMilliseconds=gn,Wn.asSeconds=vn,Wn.asMinutes=wn,Wn.asHours=Mn,Wn.asDays=kn,Wn.asWeeks=Ln,Wn.asMonths=Yn,Wn.asYears=Tn,Wn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},Wn._bubble=function(){var e,t,n,r,a,o=this._milliseconds,i=this._days,s=this._months,l=this._data;return o>=0&&i>=0&&s>=0||o<=0&&i<=0&&s<=0||(o+=864e5*fn(yn(s)+i),i=0,s=0),l.milliseconds=o%1e3,e=M(o/1e3),l.seconds=e%60,t=M(e/60),l.minutes=t%60,n=M(t/60),l.hours=n%24,i+=M(n/24),a=M(_n(i)),s+=a,i-=fn(yn(a)),r=M(s/12),s%=12,l.days=i,l.months=s,l.years=r,this},Wn.clone=function(){return Ft(this)},Wn.get=function(e){return e=H(e),this.isValid()?this[e+"s"]():NaN},Wn.milliseconds=Sn,Wn.seconds=On,Wn.minutes=jn,Wn.hours=xn,Wn.days=En,Wn.weeks=function(){return M(this.days()/7)},Wn.months=Pn,Wn.years=Cn,Wn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Ft(e).abs(),a=Hn(r.as("s")),o=Hn(r.as("m")),i=Hn(r.as("h")),s=Hn(r.as("d")),l=Hn(r.as("M")),u=Hn(r.as("y")),c=a<=zn.ss&&["s",a]||a<zn.s&&["ss",a]||o<=1&&["m"]||o<zn.m&&["mm",o]||i<=1&&["h"]||i<zn.h&&["hh",i]||s<=1&&["d"]||s<zn.d&&["dd",s]||l<=1&&["M"]||l<zn.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=n,An.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Wn.toISOString=Fn,Wn.toString=Fn,Wn.toJSON=Fn,Wn.locale=qt,Wn.localeData=Kt,Wn.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Fn),Wn.lang=$t,J("X",0,0,"unix"),J("x",0,0,"valueOf"),ce("x",oe),ce("X",/[+-]?\d+(\.\d{1,3})?/),he("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),he("x",(function(e,t,n){n._d=new Date(k(e))})),a.version="2.20.1",t=Lt,a.fn=sn,a.min=function(){var e=[].slice.call(arguments,0);return Dt("isBefore",e)},a.max=function(){var e=[].slice.call(arguments,0);return Dt("isAfter",e)},a.now=function(){return Date.now?Date.now():+new Date},a.utc=m,a.unix=function(e){return Lt(1e3*e)},a.months=function(e,t){return dn(e,t,"months")},a.isDate=u,a.locale=at,a.invalid=_,a.duration=Ft,a.isMoment=w,a.weekdays=function(e,t,n){return pn(e,t,n,"weekdays")},a.parseZone=function(){return Lt.apply(null,arguments).parseZone()},a.localeData=it,a.isDuration=jt,a.monthsShort=function(e,t){return dn(e,t,"monthsShort")},a.weekdaysMin=function(e,t,n){return pn(e,t,n,"weekdaysMin")},a.defineLocale=ot,a.updateLocale=function(e,t){if(null!=t){var n,r,a=Xe;null!=(r=rt(e))&&(a=r._config),t=x(a,t),(n=new E(t)).parentLocale=et[e],et[e]=n,at(e)}else null!=et[e]&&(null!=et[e].parentLocale?et[e]=et[e].parentLocale:null!=et[e]&&delete et[e]);return et[e]},a.locales=function(){return D(et)},a.weekdaysShort=function(e,t,n){return pn(e,t,n,"weekdaysShort")},a.normalizeUnits=H,a.relativeTimeRounding=function(e){return void 0===e?Hn:"function"==typeof e&&(Hn=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==zn[e]&&(void 0===t?zn[e]:(zn[e]=t,"s"===e&&(zn.ss=t-1),!0))},a.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},a.prototype=sn,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},a}()}).call(this,n(9)(e))},function(e,t,n){"use strict";e.exports=n(135)},function(e,t){function n(e,t=null,n=null){var r=[];function a(e,t,n,o=0){let i;if(null!==n&&o<n)y(e)&&(i=Object.keys(e),i.forEach(r=>{a(e[r],t,n,o+1)}));else{if(null!==n&&o==n)return 0==n?void(r=a(e,t,null,o)):void(y(e)&&r.push(a(e,t,n,o+1)));switch(w(e)){case"array":var s=[];if(i=Object.keys(e),null===t||o<t)for(var l=0,u=i.length;l<u;l++){const r=i[l],u=e[r];s[r]=a(u,t,n,o+1)}return s;case"object":var c={};if(i=Object.keys(e),null===t||o<t)for(l=0,u=i.length;l<u;l++){const r=i[l],s=e[r];c[r]=a(s,t,n,o+1)}return c;case"string":return""+e;case"number":return 0+e;case"boolean":return!!e;case"null":return null;case"undefined":return}}}return null===n?a(e,t,n,0):(a(e,t,n,0),r)}function r(e,t,n=null){if("string"===w(t)&&""!==t){var r=[];return function e(t,n,a="",o="",i=null,s=0){if(a===n&&(r[r.length]=o),null!==i&&s>=i)return!1;if(y(t))for(var l=0,u=Object.keys(t),c=u.length;l<c;l++){const r=u[l];e(t[r],n,r,(""===o?o:o+".")+r,i,s+1)}}(e,t,"","",n),0!==(r=r.map(e=>"boolean"===w(e)||""===e?e:((e=e.split(".")).pop(),e=e.join(".")))).length&&r}}function a(e,t,n=null){if("string"===w(t)&&""!==t){var r=function e(t,n,r="",a,o=0){if(r===n)return r;var i=!1;if(null!==a&&o>=a)return i;if(y(t))for(var s=0,l=Object.keys(t),u=l.length;s<u;s++){const u=l[s],c=e(t[u],n,u,a,o+1);if(c){i=(r=""===r?r:r+".")+c;break}}return i}(e,t,"",n,0);return"boolean"===w(r)||""===r?r:((r=r.split(".")).pop(),r=r.join("."))}}function o(e,t,n=null){if(!u(t=s(t)))return function e(t,n,r,a=0){if(_(t,[n]))return u(t[n]);if(null!==r&&a>=r)return!1;if(y(t))for(var o=0,i=Object.keys(t),s=i.length;o<s;o++){if(e(t[i[o]],n,r,a+1))return!0}return!1}(e,t,n)}function i(e,t,n=null){if(!u(t=s(t)))return function e(t,n,r,a=0){if(_(t,[n]))return l(t[n]);if(null!==r&&a>=r)return!1;if(y(t))for(var o=0,i=Object.keys(t),s=i.length;o<s;o++){if(e(t[i[o]],n,r,a+1))return!0}return!1}(e,t,n,0)}function s(e){const t=c(e);return!(t>1)&&(1===t?Object.keys(e)[0]:0===t&&["string","number"].indexOf(w(e))>-1&&e)}function l(e){return!u(e)}function u(e){return!1===function(e){return y(e)?e:!(["null","undefined"].indexOf(w(e))>-1)&&(!(["",0,!1].indexOf(e)>-1)&&e)}(e)}function c(e){return-1===["array","object"].indexOf(w(e))?0:Object.keys(e).length}function d(e,t,n=null,r=0){if(b(e,t))return!0;if(y(t)&&v(e,t)&&_(e,Object.keys(t))){if(b(f(e,Object.keys(t)),t))return!0}if((null===n||r<n)&&y(e))for(var a=0,o=Object.keys(e),i=o.length;a<i;a++){if(d(e[o[a]],t,n,r+1))return!0}return!1}function p(e,t,n=null){var r=m(e,t,n);if(!1===r)return;return r.map(n=>{if(""===n)return e;n=n.split("."),-1===["array","object"].indexOf(w(t))&&n.splice(-1,1);var r=e;return Array.isArray(n)?(n.forEach(e=>{r=r[e]}),r):r[n]})}function m(e,t,n=null){var r=[];return function e(t,n,a="",o,i){if(y(n)&&v(t,n)&&_(t,Object.keys(n))){b(f(t,Object.keys(n)),n)&&(r[r.length]=a)}if(b(t,n)&&(r[r.length]=a),null!==o&&i>=o)return!1;if(y(t))for(var s=0,l=Object.keys(t),u=l.length;s<u;s++){const r=l[s];e(t[r],n,(""===a?a:a+".")+r,o,i+1)}}(e,t,"",n,0),0!==r.length&&r}function h(e,t,n=null){return function e(t,n,r="",a,o){if(y(n)&&v(t,n)&&_(t,Object.keys(n))){if(b(f(t,Object.keys(n)),n))return r}if(b(t,n))return r;var i=!1;if(null!==a&&o>=a)return i;if(y(t))for(var s=0,l=Object.keys(t),u=l.length;s<u;s++){const u=l[s],c=e(t[u],n,u,a,o+1);if(c){i=(r=""===r?r:r+".")+c;break}}return i}(e,t,"",n,0)}function f(e,t){const n=w(e);if(-1===["array","object"].indexOf(n))return;if(0!==t.length){var r;switch(n){case"object":r={},t.forEach(t=>{t in e&&(r[t]=e[t])});break;case"array":r=[],t.forEach(t=>{t in e&&r.push(e[t])})}return r}}function _(e,t){const n=t.length;if(0===n||!y(e))return!1;const r=Object.keys(e);for(var a=!0,o=0;o<n;o++){const e=""+t[o];if(-1===r.indexOf(e)){a=!1;break}}return a}function y(e){return-1!==["array","object"].indexOf(w(e))&&0!==Object.keys(e).length}function b(e,t){const n=g(e,t);if(!1===n)return n;if(-1===["array","object"].indexOf(n))return e===t;const r=Object.keys(e),a=r.length;for(var o=!0,i=0;i<a;i++){const n=r[i],a=b(e[n],t[n]);if(!1===a){o=a;break}}return o}function g(e,t){const n=v(e,t);if(!1===n)return!1;if(["array","object"].indexOf(n)>-1){const n=Object.keys(e),a=Object.keys(t),o=n.length;if(o!==a.length)return!1;if(0===o)return!0;for(var r=0;r<o;r++)if(n[r]!==a[r])return!1}return n}function v(e,t){const n=w(e);return n===w(t)&&n}function w(e){if(null===e)return"null";const t=typeof e;return"object"===t&&Array.isArray(e)?"array":t}var M={getType:function(e){return w(e)},sameType:function(e,t){return v(e,t)},sameStructure:function(e,t){return g(e,t)},identical:function(e,t){return b(e,t)},isIterable:function(e){return y(e)},containsKeys:function(e,t){return _(e,t)},trim:function(e,t){return f(e,t)},locate:function(e,t,n){return h(e,t,n)},deepGet:function(e,t,n){return function(e,t,n=null){var r=h(e,t,n);if(!1!==r){if(""===r)return e;r=r.split("."),-1===["array","object"].indexOf(w(t))&&r.splice(-1,1);var a=e;return Array.isArray(r)?(r.forEach(e=>{a=a[e]}),a):a[r]}}(e,t,n)},locateAll:function(e,t,n){return m(e,t,n)},deepFilter:function(e,t,n){return p(e,t,n)},exists:function(e,t,n){return d(e,t,n)},onlyExisting:function(e,t,n){return function(e,t,n=null){if("array"===w(t)){let r=[];return t.forEach(t=>{d(e,t,n)&&r.push(t)}),r}if("object"===w(t)){let r={};return Object.keys(t).forEach(a=>{let o=t[a];d(e,o,n)&&(r[a]=o)}),r}if(d(e,t,n))return t}(e,t,n)},onlyMissing:function(e,t,n){return function(e,t,n=null){if("array"===w(t)){let r=[];return t.forEach(t=>{d(e,t,n)||r.push(t)}),r}if("object"===w(t)){let r={};return Object.keys(t).forEach(a=>{let o=t[a];d(e,o,n)||(r[a]=o)}),r}if(!d(e,t,n))return t}(e,t,n)},length:function(e){return c(e)},isFalsy:function(e){return u(e)},isTruthy:function(e){return l(e)},foundTruthy:function(e,t,n){return i(e,t,n)},onlyTruthy:function(e,t,n,r){return function(e,t,n,r=null){if("array"===w(t)){let a=[];return t.forEach(t=>{const o=p(e,t);l(o)&&i(o,n,r)&&a.push(t)}),a}if("object"===w(t)){let a={};return Object.keys(t).forEach(o=>{const s=t[o],u=p(e,s);l(u)&&i(u,n,r)&&(a[o]=s)}),a}if(i(e,n,r))return t}(e,t,n,r)},foundFalsy:function(e,t,n){return o(e,t,n)},onlyFalsy:function(e,t,n,r){return function(e,t,n,r=null){if("array"===w(t)){let a=[];return t.forEach(t=>{const i=p(e,t);l(i)&&o(i,n,r)&&a.push(t)}),a}if("object"===w(t)){let a={};return Object.keys(t).forEach(i=>{const s=t[i],u=p(e,s);l(u)&&o(u,n,r)&&(a[i]=s)}),a}if(o(e,n,r))return t}(e,t,n,r)},countMatches:function(e,t,n,r){return function(e,t,n=null,r=null){var a=null===n,o=null===r,i=m(e,t,a&&o?null:a||o?n||r:n<r?n:r);if(!1===i)return 0;if(null===n)return i.length;if("number"===w(n)){let e=0;return i.forEach(t=>{(t=t.split(".")).length===n&&e++}),e}}(e,t,n,r)},matchDepth:function(e,t,n){return function(e,t,n=null){var r=h(e,t,n);return!1!==r&&(""===r?0:(r=r.split(".")).length)}(e,t,n)},maxDepth:function(e,t){return function(e,t=null){let n=0;return function e(t,r,a=0){n<a&&(n=a),null!==r&&a>=r||y(t)&&Object.keys(t).forEach(n=>{e(t[n],r,a+1)})}(e,t),n}(e,t)},locate_Key:function(e,t,n){return a(e,t,n)},deepGet_Key:function(e,t,n){return function(e,t,n=null){if("string"===w(t)&&""!==t){var r=a(e,t,n);if(!1!==r){""===r?r=t:r+="."+t,r=r.split(".");var o=e;return Array.isArray(r)?(r.forEach(e=>{o=o[e]}),o):o[r]}}}(e,t,n)},locateAll_Key:function(e,t,n){return r(e,t,n)},deepFilter_Key:function(e,t,n){return function(e,t,n=null){if("string"!==w(t))return;if(""===t)return;var a=r(e,t,n);if(!1===a)return;return a.map(n=>{if(!1!==n){""===n?n=t:n+="."+t,n=n.split(".");var r=e;return Array.isArray(n)?(n.forEach(e=>{r=r[e]}),r):r[n]}})}(e,t,n)},deepClone:function(e,t,r){return n(e,t,r)},renameKey:function(e,t,n,r){return function(e,t,n,r=null){if("string"===w(t)&&"string"===w(n)&&""!==t&&""!==n){var a=!1;return function e(t,n,r,o,i=0){let s;switch(w(t)){case"array":var l=[];s=Object.keys(t);for(var u=0,c=s.length;u<c;u++){let a=s[u],c=t[a];l[a]=e(c,n,r,o,i+1)}return l;case"object":var d={};s=Object.keys(t);for(u=0,c=s.length;u<c;u++){let l=s[u],c=t[l];(null===o||i<o)&&(a||l===n&&(l=r,a=!0)),d[l]=e(c,n,r,o,i+1)}return d;case"string":return""+t;case"number":return 0+t;case"boolean":return!!t;case"null":return null;case"undefined":return}}(e,t,n,r,0)}}(e,t,n,r)},renameKeys:function(e,t,n,r){return function(e,t,n,r=null){if("string"===w(t)&&"string"===w(n)&&""!==t&&""!==n)return function e(t,n,r,a,o=0){let i;switch(w(t)){case"array":var s=[];i=Object.keys(t);for(var l=0,u=i.length;l<u;l++){let u=i[l],c=t[u];s[u]=e(c,n,r,a,o+1)}return s;case"object":var c={};i=Object.keys(t);for(l=0,u=i.length;l<u;l++){let s=i[l],u=t[s];(null===a||o<a)&&s===n&&(s=r),c[s]=e(u,n,r,a,o+1)}return c;case"string":return""+t;case"number":return 0+t;case"boolean":return!!t;case"null":return null;case"undefined":return}}(e,t,n,r,0)}(e,t,n,r)},deepRemove_Key:function(e,t,r){return function(e,t,r){if("string"!==w(t))return;if(""===t)return;let o=n(e);var i=a(o,t,r);if(!1===i)return o;""===i?i=t:i+="."+t,i=i.split(".");var s=o;return Array.isArray(i)||delete s[i],i.forEach((e,t)=>{t<i.length-1?s=s[e]:delete s[e]}),o}(e,t,r)},deepRemoveAll_Key:function(e,t,a){return function(e,t,a){if("string"!==w(t))return;if(""===t)return;let o=n(e);var i=r(o,t,a);return i===[]||!1===i||i.forEach(e=>{""===e?e=t:e+="."+t,e=e.split(".");var n=o;Array.isArray(e)||delete n[e];for(var r=0;r<e.length;r++){var a=e[r];if(!(a in n))break;r<e.length-1?n=n[a]:delete n[a]}}),o}(e,t,a)}};e.exports=M},function(e,t,n){(function(e){!function(t){var n=function(e){return a(!0===e,!1,arguments)};function r(e,t){if("object"!==o(e))return t;for(var n in t)"object"===o(e[n])&&"object"===o(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function a(e,t,a){var i=a[0],s=a.length;(e||"object"!==o(i))&&(i={});for(var l=0;l<s;++l){var u=a[l];if("object"===o(u))for(var c in u)if("__proto__"!==c){var d=e?n.clone(u[c]):u[c];i[c]=t?r(i[c],d):d}}return i}function o(e){return{}.toString.call(e).slice(8,-1).toLowerCase()}n.recursive=function(e){return a(!0===e,!0,arguments)},n.clone=function(e){var t,r,a=e,i=o(e);if("array"===i)for(a=[],r=e.length,t=0;t<r;++t)a[t]=n.clone(e[t]);else if("object"===i)for(t in a={},e)a[t]=n.clone(e[t]);return a},t?e.exports=n:window.merge=n}(e&&"object"==typeof e.exports&&e.exports)}).call(this,n(9)(e))},function(e,t,n){"use strict";
2 2 /*!
3 3 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
4 4 *
5 5 * Copyright (c) 2014-2017, Jon Schlinkert.
@@ -32,12 +32,12 @@
32 32 * Version: 1.1.0 (built at Fri Aug 17 2018 10:16:29 GMT+0200 (CEST))
33 33 */
34 34 !function(e,t,n){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t,n=n&&n.hasOwnProperty("default")?n.default:n;var r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},i=function(){function e(){r(this,e),this.registeredHooks=t.hooks.getRegistered()}return a(e,[{key:"getSettings",value:function(e){var t={};if(e.settings){var n=e.settings;for(var r in n)n.hasOwnProperty(r)&&(t[this.trimHookPrefix(r)]=n[r])}for(var a in e)"settings"!==a&&e.hasOwnProperty(a)&&(t[this.trimHookPrefix(a)]=e[a]);return t}},{key:"trimHookPrefix",value:function(e){if(0===e.indexOf("on")){var t=e.charAt(2).toLowerCase()+e.slice(3,e.length);if(this.registeredHooks.indexOf(t)>-1)return t}return e}}]),e}(),s=function(e){function s(){r(this,s);var e=o(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments));return e.settingsMapper=new i,e.id=null,e.hotInstance=null,e.hotElementRef=null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(s,e),a(s,[{key:"setHotElementRef",value:function(e){this.hotElementRef=e}},{key:"componentDidMount",value:function(){var e=this.settingsMapper.getSettings(this.props);this.hotInstance=new t(this.hotElementRef,e)}},{key:"shouldComponentUpdate",value:function(e,t){return this.updateHot(this.settingsMapper.getSettings(e)),!1}},{key:"componentWillUnmount",value:function(){this.hotInstance.destroy()}},{key:"render",value:function(){return this.id=this.props.id||"hot-"+Math.random().toString(36).substring(5),this.className=this.props.className||"",this.style=this.props.style||{},n.createElement("div",{ref:this.setHotElementRef.bind(this),id:this.id,className:this.className,style:this.style})}},{key:"updateHot",value:function(e){this.hotInstance.updateSettings(e,!1)}}]),s}(n.Component);e.HotTable=s,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(146),n(1))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={format:"{reason} at line {line}",symbols:{colon:"colon",comma:"comma",semicolon:"semicolon",slash:"slash",backslash:"backslash",brackets:{round:"round brackets",square:"square brackets",curly:"curly brackets",angle:"angle brackets"},period:"period",quotes:{single:"single quote",double:"double quote",grave:"grave accent"},space:"space",ampersand:"ampersand",asterisk:"asterisk",at:"at sign",equals:"equals sign",hash:"hash",percent:"percent",plus:"plus",minus:"minus",dash:"dash",hyphen:"hyphen",tilde:"tilde",underscore:"underscore",bar:"vertical bar"},types:{key:"key",value:"value",number:"number",string:"string",primitive:"primitive",boolean:"boolean",character:"character",integer:"integer",array:"array",float:"float"},invalidToken:{tokenSequence:{prohibited:"'{firstToken}' token cannot be followed by '{secondToken}' token(s)",permitted:"'{firstToken}' token can only be followed by '{secondToken}' token(s)"},termSequence:{prohibited:"A {firstTerm} cannot be followed by a {secondTerm}",permitted:"A {firstTerm} can only be followed by a {secondTerm}"},double:"'{token}' token cannot be followed by another '{token}' token",useInstead:"'{badToken}' token is not accepted. Use '{goodToken}' instead",unexpected:"Unexpected '{token}' token found"},brace:{curly:{missingOpen:"Missing '{' open curly brace",missingClose:"Open '{' curly brace is missing closing '}' curly brace",cannotWrap:"'{token}' token cannot be wrapped in '{}' curly braces"},square:{missingOpen:"Missing '[' open square brace",missingClose:"Open '[' square brace is missing closing ']' square brace",cannotWrap:"'{token}' token cannot be wrapped in '[]' square braces"}},string:{missingOpen:"Missing/invalid opening string '{quote}' token",missingClose:"Missing/invalid closing string '{quote}' token",mustBeWrappedByQuotes:"Strings must be wrapped by quotes",nonAlphanumeric:"Non-alphanumeric token '{token}' is not allowed outside string notation",unexpectedKey:"Unexpected key found at string position"},key:{numberAndLetterMissingQuotes:"Key beginning with number and containing letters must be wrapped by quotes",spaceMissingQuotes:"Key containing space must be wrapped by quotes",unexpectedString:"Unexpected string found at key position"},noTrailingOrLeadingComma:"Trailing or leading commas in arrays and objects are not permitted"}},function(e,t,n){var r;
35 35 /*!
36 - Copyright (c) 2018 Jed Watson.
37 - Licensed under the MIT License (MIT), see
38 - http://jedwatson.github.io/classnames
39 -*/!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var i=a.apply(null,r);i&&e.push(i)}}else if("object"===o){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";
36 + Copyright (c) 2018 Jed Watson.
37 + Licensed under the MIT License (MIT), see
38 + http://jedwatson.github.io/classnames
39 +*/!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var i=a.apply(null,r);i&&e.push(i)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var s in r)n.call(r,s)&&r[s]&&e.push(s);else e.push(r.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";
40 40 /** @license React v16.4.1
41 41 * react.production.min.js
42 42 *
43 43 * Copyright (c) 2013-present, Facebook, Inc.
@@ -43,27 +43,27 @@
43 43 * Copyright (c) 2013-present, Facebook, Inc.
44 44 *
45 45 * This source code is licensed under the MIT license found in the
46 46 * LICENSE file in the root directory of this source tree.
47 - */var r=n(136),a=n(137),o=n(138),i=n(139),s="function"==typeof Symbol&&Symbol.for,l=s?Symbol.for("react.element"):60103,u=s?Symbol.for("react.portal"):60106,c=s?Symbol.for("react.fragment"):60107,d=s?Symbol.for("react.strict_mode"):60108,p=s?Symbol.for("react.profiler"):60114,m=s?Symbol.for("react.provider"):60109,h=s?Symbol.for("react.context"):60110,f=s?Symbol.for("react.async_mode"):60111,_=s?Symbol.for("react.forward_ref"):60112;s&&Symbol.for("react.timeout");var y="function"==typeof Symbol&&Symbol.iterator;function b(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);a(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function g(e,t,n){this.props=e,this.context=t,this.refs=o,this.updater=n||v}function w(){}function M(e,t,n){this.props=e,this.context=t,this.refs=o,this.updater=n||v}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&b("85"),this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=g.prototype;var k=M.prototype=new w;k.constructor=M,r(k,g.prototype),k.isPureReactComponent=!0;var L={current:null},Y=Object.prototype.hasOwnProperty,T={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r=void 0,a={},o=null,i=null;if(null!=t)for(r in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(o=""+t.key),t)Y.call(t,r)&&!T.hasOwnProperty(r)&&(a[r]=t[r]);var s=arguments.length-2;if(1===s)a.children=n;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];a.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===a[r]&&(a[r]=s[r]);return{$$typeof:l,type:e,key:o,ref:i,props:a,_owner:L.current}}function D(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var O=/\/+/g,j=[];function x(e,t,n,r){if(j.length){var a=j.pop();return a.result=e,a.keyPrefix=t,a.func=n,a.context=r,a.count=0,a}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function E(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>j.length&&j.push(e)}function P(e,t,n,r){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var o=!1;if(null===e)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case l:case u:o=!0}}if(o)return n(r,e,""===t?"."+C(e,0):t),1;if(o=0,t=""===t?".":t+":",Array.isArray(e))for(var i=0;i<e.length;i++){var s=t+C(a=e[i],i);o+=P(a,s,n,r)}else if(null==e?s=null:s="function"==typeof(s=y&&e[y]||e["@@iterator"])?s:null,"function"==typeof s)for(e=s.call(e),i=0;!(a=e.next()).done;)o+=P(a=a.value,s=t+C(a,i++),n,r);else"object"===a&&b("31","[object Object]"===(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return o}function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function H(e,t){e.func.call(e.context,t,e.count++)}function z(e,t,n){var r=e.result,a=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?A(e,r,n,i.thatReturnsArgument):null!=e&&(D(e)&&(t=a+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(O,"$&/")+"/")+n,e={$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function A(e,t,n,r,a){var o="";null!=n&&(o=(""+n).replace(O,"$&/")+"/"),t=x(t,o,r,a),null==e||P(e,"",z,t),E(t)}var R={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return A(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=x(null,null,t,n),null==e||P(e,"",H,t),E(t)},count:function(e){return null==e?0:P(e,"",i.thatReturnsNull,null)},toArray:function(e){var t=[];return A(e,t,null,i.thatReturnsArgument),t},only:function(e){return D(e)||b("143"),e}},createRef:function(){return{current:null}},Component:g,PureComponent:M,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:h,_calculateChangedBits:t,_defaultValue:e,_currentValue:e,_currentValue2:e,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null}).Provider={$$typeof:m,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:_,render:e}},Fragment:c,StrictMode:d,unstable_AsyncMode:f,unstable_Profiler:p,createElement:S,cloneElement:function(e,t,n){null==e&&b("267",e);var a=void 0,o=r({},e.props),i=e.key,s=e.ref,u=e._owner;if(null!=t){void 0!==t.ref&&(s=t.ref,u=L.current),void 0!==t.key&&(i=""+t.key);var c=void 0;for(a in e.type&&e.type.defaultProps&&(c=e.type.defaultProps),t)Y.call(t,a)&&!T.hasOwnProperty(a)&&(o[a]=void 0===t[a]&&void 0!==c?c[a]:t[a])}if(1===(a=arguments.length-2))o.children=n;else if(1<a){c=Array(a);for(var d=0;d<a;d++)c[d]=arguments[d+2];o.children=c}return{$$typeof:l,type:e.type,key:i,ref:s,props:o,_owner:u}},createFactory:function(e){var t=S.bind(null,e);return t.type=e,t},isValidElement:D,version:"16.4.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:L,assign:r}},N={default:R},F=N&&R||N;e.exports=F.default?F.default:F},function(e,t,n){"use strict";
47 + */var r=n(136),a=n(137),o=n(138),i=n(139),s="function"==typeof Symbol&&Symbol.for,l=s?Symbol.for("react.element"):60103,u=s?Symbol.for("react.portal"):60106,c=s?Symbol.for("react.fragment"):60107,d=s?Symbol.for("react.strict_mode"):60108,p=s?Symbol.for("react.profiler"):60114,m=s?Symbol.for("react.provider"):60109,h=s?Symbol.for("react.context"):60110,f=s?Symbol.for("react.async_mode"):60111,_=s?Symbol.for("react.forward_ref"):60112;s&&Symbol.for("react.timeout");var y="function"==typeof Symbol&&Symbol.iterator;function b(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);a(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function v(e,t,n){this.props=e,this.context=t,this.refs=o,this.updater=n||g}function w(){}function M(e,t,n){this.props=e,this.context=t,this.refs=o,this.updater=n||g}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&b("85"),this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=v.prototype;var k=M.prototype=new w;k.constructor=M,r(k,v.prototype),k.isPureReactComponent=!0;var L={current:null},Y=Object.prototype.hasOwnProperty,T={key:!0,ref:!0,__self:!0,__source:!0};function D(e,t,n){var r=void 0,a={},o=null,i=null;if(null!=t)for(r in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(o=""+t.key),t)Y.call(t,r)&&!T.hasOwnProperty(r)&&(a[r]=t[r]);var s=arguments.length-2;if(1===s)a.children=n;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];a.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===a[r]&&(a[r]=s[r]);return{$$typeof:l,type:e,key:o,ref:i,props:a,_owner:L.current}}function S(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var O=/\/+/g,j=[];function x(e,t,n,r){if(j.length){var a=j.pop();return a.result=e,a.keyPrefix=t,a.func=n,a.context=r,a.count=0,a}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function E(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>j.length&&j.push(e)}function P(e,t,n,r){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var o=!1;if(null===e)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case l:case u:o=!0}}if(o)return n(r,e,""===t?"."+C(e,0):t),1;if(o=0,t=""===t?".":t+":",Array.isArray(e))for(var i=0;i<e.length;i++){var s=t+C(a=e[i],i);o+=P(a,s,n,r)}else if(null==e?s=null:s="function"==typeof(s=y&&e[y]||e["@@iterator"])?s:null,"function"==typeof s)for(e=s.call(e),i=0;!(a=e.next()).done;)o+=P(a=a.value,s=t+C(a,i++),n,r);else"object"===a&&b("31","[object Object]"===(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return o}function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function H(e,t){e.func.call(e.context,t,e.count++)}function z(e,t,n){var r=e.result,a=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?A(e,r,n,i.thatReturnsArgument):null!=e&&(S(e)&&(t=a+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(O,"$&/")+"/")+n,e={$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function A(e,t,n,r,a){var o="";null!=n&&(o=(""+n).replace(O,"$&/")+"/"),t=x(t,o,r,a),null==e||P(e,"",z,t),E(t)}var R={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return A(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=x(null,null,t,n),null==e||P(e,"",H,t),E(t)},count:function(e){return null==e?0:P(e,"",i.thatReturnsNull,null)},toArray:function(e){var t=[];return A(e,t,null,i.thatReturnsArgument),t},only:function(e){return S(e)||b("143"),e}},createRef:function(){return{current:null}},Component:v,PureComponent:M,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:h,_calculateChangedBits:t,_defaultValue:e,_currentValue:e,_currentValue2:e,_changedBits:0,_changedBits2:0,Provider:null,Consumer:null}).Provider={$$typeof:m,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:_,render:e}},Fragment:c,StrictMode:d,unstable_AsyncMode:f,unstable_Profiler:p,createElement:D,cloneElement:function(e,t,n){null==e&&b("267",e);var a=void 0,o=r({},e.props),i=e.key,s=e.ref,u=e._owner;if(null!=t){void 0!==t.ref&&(s=t.ref,u=L.current),void 0!==t.key&&(i=""+t.key);var c=void 0;for(a in e.type&&e.type.defaultProps&&(c=e.type.defaultProps),t)Y.call(t,a)&&!T.hasOwnProperty(a)&&(o[a]=void 0===t[a]&&void 0!==c?c[a]:t[a])}if(1===(a=arguments.length-2))o.children=n;else if(1<a){c=Array(a);for(var d=0;d<a;d++)c[d]=arguments[d+2];o.children=c}return{$$typeof:l,type:e.type,key:i,ref:s,props:o,_owner:u}},createFactory:function(e){var t=D.bind(null,e);return t.type=e,t},isValidElement:S,version:"16.4.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:L,assign:r}},N={default:R},F=N&&R||N;e.exports=F.default?F.default:F},function(e,t,n){"use strict";
48 48 /*
49 49 object-assign
50 50 (c) Sindre Sorhus
51 51 @license MIT
52 -*/var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=i(e),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))a.call(n,c)&&(l[c]=n[c]);if(r){s=r(n);for(var d=0;d<s.length;d++)o.call(n,s[d])&&(l[s[d]]=n[s[d]])}}return l}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,a,o,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,o,i,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";function r(e){return function(){return e}}var a=function(){};a.thatReturns=r,a.thatReturnsFalse=r(!1),a.thatReturnsTrue=r(!0),a.thatReturnsNull=r(null),a.thatReturnsThis=function(){return this},a.thatReturnsArgument=function(e){return e},e.exports=a},function(e,t,n){e.exports=n(141)()},function(e,t,n){"use strict";var r=n(142);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r,a,o=n(5),i=n(6),s=0,l=0;e.exports=function(e,t,n){var u=t&&n||0,c=t||[],d=(e=e||{}).node||r,p=void 0!==e.clockseq?e.clockseq:a;if(null==d||null==p){var m=o();null==d&&(d=r=[1|m[0],m[1],m[2],m[3],m[4],m[5]]),null==p&&(p=a=16383&(m[6]<<8|m[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:l+1,_=h-s+(f-l)/1e4;if(_<0&&void 0===e.clockseq&&(p=p+1&16383),(_<0||h>s)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=h,l=f,a=p;var y=(1e4*(268435455&(h+=122192928e5))+f)%4294967296;c[u++]=y>>>24&255,c[u++]=y>>>16&255,c[u++]=y>>>8&255,c[u++]=255&y;var b=h/4294967296*1e4&268435455;c[u++]=b>>>8&255,c[u++]=255&b,c[u++]=b>>>24&15|16,c[u++]=b>>>16&255,c[u++]=p>>>8|128,c[u++]=255&p;for(var v=0;v<6;++v)c[u+v]=d[v];return t||i(c)}},function(e,t,n){var r=n(5),a=n(6);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||r)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var s=0;s<16;++s)t[o+s]=i[s];return t||a(i)}},function(e,t,n){"use strict";
52 +*/var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=i(e),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))a.call(n,c)&&(l[c]=n[c]);if(r){s=r(n);for(var d=0;d<s.length;d++)o.call(n,s[d])&&(l[s[d]]=n[s[d]])}}return l}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,a,o,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,o,i,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";function r(e){return function(){return e}}var a=function(){};a.thatReturns=r,a.thatReturnsFalse=r(!1),a.thatReturnsTrue=r(!0),a.thatReturnsNull=r(null),a.thatReturnsThis=function(){return this},a.thatReturnsArgument=function(e){return e},e.exports=a},function(e,t,n){e.exports=n(141)()},function(e,t,n){"use strict";var r=n(142);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r,a,o=n(5),i=n(6),s=0,l=0;e.exports=function(e,t,n){var u=t&&n||0,c=t||[],d=(e=e||{}).node||r,p=void 0!==e.clockseq?e.clockseq:a;if(null==d||null==p){var m=o();null==d&&(d=r=[1|m[0],m[1],m[2],m[3],m[4],m[5]]),null==p&&(p=a=16383&(m[6]<<8|m[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:l+1,_=h-s+(f-l)/1e4;if(_<0&&void 0===e.clockseq&&(p=p+1&16383),(_<0||h>s)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=h,l=f,a=p;var y=(1e4*(268435455&(h+=122192928e5))+f)%4294967296;c[u++]=y>>>24&255,c[u++]=y>>>16&255,c[u++]=y>>>8&255,c[u++]=255&y;var b=h/4294967296*1e4&268435455;c[u++]=b>>>8&255,c[u++]=255&b,c[u++]=b>>>24&15|16,c[u++]=b>>>16&255,c[u++]=p>>>8|128,c[u++]=255&p;for(var g=0;g<6;++g)c[u+g]=d[g];return t||i(c)}},function(e,t,n){var r=n(5),a=n(6);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||r)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var s=0;s<16;++s)t[o+s]=i[s];return t||a(i)}},function(e,t,n){"use strict";
53 53 /*!
54 54 * isobject <https://github.com/jonschlinkert/isobject>
55 55 *
56 56 * Copyright (c) 2014-2017, Jon Schlinkert.
57 57 * Released under the MIT License.
58 - */e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},,function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,a,o,i,s,l=1,u={},c=!1,d=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(a=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):r=function(e){setTimeout(h,0,e)}:(i="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&h(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(i+t,"*")}),p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var a={callback:e,args:t};return u[l]=a,r(l),l++},p.clearImmediate=m}function m(e){delete u[e]}function h(e){if(c)setTimeout(h,0,e);else{var t=u[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{m(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(8),n(148))},function(e,t){var n,r,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var l,u=[],c=!1,d=-1;function p(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&m())}function m(){if(!c){var e=s(p);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function f(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||c||s(m)},h.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=f,a.addListener=f,a.once=f,a.off=f,a.removeListener=f,a.removeAllListeners=f,a.emit=f,a.prependListener=f,a.prependOnceListener=f,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,n){var r={"./af":10,"./af.js":10,"./ar":11,"./ar-dz":12,"./ar-dz.js":12,"./ar-kw":13,"./ar-kw.js":13,"./ar-ly":14,"./ar-ly.js":14,"./ar-ma":15,"./ar-ma.js":15,"./ar-sa":16,"./ar-sa.js":16,"./ar-tn":17,"./ar-tn.js":17,"./ar.js":11,"./az":18,"./az.js":18,"./be":19,"./be.js":19,"./bg":20,"./bg.js":20,"./bm":21,"./bm.js":21,"./bn":22,"./bn.js":22,"./bo":23,"./bo.js":23,"./br":24,"./br.js":24,"./bs":25,"./bs.js":25,"./ca":26,"./ca.js":26,"./cs":27,"./cs.js":27,"./cv":28,"./cv.js":28,"./cy":29,"./cy.js":29,"./da":30,"./da.js":30,"./de":31,"./de-at":32,"./de-at.js":32,"./de-ch":33,"./de-ch.js":33,"./de.js":31,"./dv":34,"./dv.js":34,"./el":35,"./el.js":35,"./en-au":36,"./en-au.js":36,"./en-ca":37,"./en-ca.js":37,"./en-gb":38,"./en-gb.js":38,"./en-ie":39,"./en-ie.js":39,"./en-nz":40,"./en-nz.js":40,"./eo":41,"./eo.js":41,"./es":42,"./es-do":43,"./es-do.js":43,"./es-us":44,"./es-us.js":44,"./es.js":42,"./et":45,"./et.js":45,"./eu":46,"./eu.js":46,"./fa":47,"./fa.js":47,"./fi":48,"./fi.js":48,"./fo":49,"./fo.js":49,"./fr":50,"./fr-ca":51,"./fr-ca.js":51,"./fr-ch":52,"./fr-ch.js":52,"./fr.js":50,"./fy":53,"./fy.js":53,"./gd":54,"./gd.js":54,"./gl":55,"./gl.js":55,"./gom-latn":56,"./gom-latn.js":56,"./gu":57,"./gu.js":57,"./he":58,"./he.js":58,"./hi":59,"./hi.js":59,"./hr":60,"./hr.js":60,"./hu":61,"./hu.js":61,"./hy-am":62,"./hy-am.js":62,"./id":63,"./id.js":63,"./is":64,"./is.js":64,"./it":65,"./it.js":65,"./ja":66,"./ja.js":66,"./jv":67,"./jv.js":67,"./ka":68,"./ka.js":68,"./kk":69,"./kk.js":69,"./km":70,"./km.js":70,"./kn":71,"./kn.js":71,"./ko":72,"./ko.js":72,"./ky":73,"./ky.js":73,"./lb":74,"./lb.js":74,"./lo":75,"./lo.js":75,"./lt":76,"./lt.js":76,"./lv":77,"./lv.js":77,"./me":78,"./me.js":78,"./mi":79,"./mi.js":79,"./mk":80,"./mk.js":80,"./ml":81,"./ml.js":81,"./mr":82,"./mr.js":82,"./ms":83,"./ms-my":84,"./ms-my.js":84,"./ms.js":83,"./mt":85,"./mt.js":85,"./my":86,"./my.js":86,"./nb":87,"./nb.js":87,"./ne":88,"./ne.js":88,"./nl":89,"./nl-be":90,"./nl-be.js":90,"./nl.js":89,"./nn":91,"./nn.js":91,"./pa-in":92,"./pa-in.js":92,"./pl":93,"./pl.js":93,"./pt":94,"./pt-br":95,"./pt-br.js":95,"./pt.js":94,"./ro":96,"./ro.js":96,"./ru":97,"./ru.js":97,"./sd":98,"./sd.js":98,"./se":99,"./se.js":99,"./si":100,"./si.js":100,"./sk":101,"./sk.js":101,"./sl":102,"./sl.js":102,"./sq":103,"./sq.js":103,"./sr":104,"./sr-cyrl":105,"./sr-cyrl.js":105,"./sr.js":104,"./ss":106,"./ss.js":106,"./sv":107,"./sv.js":107,"./sw":108,"./sw.js":108,"./ta":109,"./ta.js":109,"./te":110,"./te.js":110,"./tet":111,"./tet.js":111,"./th":112,"./th.js":112,"./tl-ph":113,"./tl-ph.js":113,"./tlh":114,"./tlh.js":114,"./tr":115,"./tr.js":115,"./tzl":116,"./tzl.js":116,"./tzm":117,"./tzm-latn":118,"./tzm-latn.js":118,"./tzm.js":117,"./uk":119,"./uk.js":119,"./ur":120,"./ur.js":120,"./uz":121,"./uz-latn":122,"./uz-latn.js":122,"./uz.js":121,"./vi":123,"./vi.js":123,"./x-pseudo":124,"./x-pseudo.js":124,"./yo":125,"./yo.js":125,"./zh-cn":126,"./zh-cn.js":126,"./zh-hk":127,"./zh-hk.js":127,"./zh-tw":128,"./zh-tw.js":128};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=149},function(e,t,n){e.exports=function e(t,n,r){function a(i,s){if(!n[i]){if(!t[i]){if(o)return o(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[i]={exports:{}};t[i][0].call(u.exports,(function(e){return a(t[i][1][e]||e)}),u,u.exports,e,t,n,r)}return n[i].exports}for(var o=!1,i=0;i<r.length;i++)a(r[i]);return a}({1:[function(e,t,n){!function(e){"use strict";var n,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=Math.ceil,i=Math.floor,s="[BigNumber Error] ",l=s+"Number primitive has more than 15 significant digits: ",u=1e14,c=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,h=1e9;function f(e){var t=0|e;return 0<e||e===t?t:t-1}function _(e){for(var t,n,r=1,a=e.length,o=e[0]+"";r<a;){for(t=e[r++]+"",n=c-t.length;n--;t="0"+t);o+=t}for(a=o.length;48===o.charCodeAt(--a););return o.slice(0,a+1||1)}function y(e,t){var n,r,a=e.c,o=t.c,i=e.s,s=t.s,l=e.e,u=t.e;if(!i||!s)return null;if(n=a&&!a[0],r=o&&!o[0],n||r)return n?r?0:-s:i;if(i!=s)return i;if(n=i<0,r=l==u,!a||!o)return r?0:!a^n?1:-1;if(!r)return u<l^n?1:-1;for(s=(l=a.length)<(u=o.length)?l:u,i=0;i<s;i++)if(a[i]!=o[i])return a[i]>o[i]^n?1:-1;return l==u?0:u<l^n?1:-1}function b(e,t,n,r){if(e<t||n<e||e!==i(e))throw Error(s+(r||"Argument")+("number"==typeof e?e<t||n<e?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return f(e.e/c)==t&&e.c[t]%2!=0}function g(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function w(e,t,n){var r,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(n=function e(t){var n,M,k,L,Y,T,S,D,O,j,x,E=U.prototype={constructor:U,toString:null,valueOf:null},P=new U(1),C=20,H=4,z=-7,A=21,R=-1e7,N=1e7,F=!1,W=1,I=0,B={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},J="0123456789abcdefghijklmnopqrstuvwxyz";function U(e,t){var n,a,o,s,u,p,m,h,f=this;if(!(f instanceof U))return new U(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>N?f.c=f.e=null:e.e<R?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((p="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,u=e;10<=u;u/=10,s++);return void(N<s?f.c=f.e=null:(f.e=s,f.c=[e]))}h=String(e)}else{if(!r.test(h=String(e)))return k(f,h,p);f.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}-1<(s=h.indexOf("."))&&(h=h.replace(".","")),0<(u=h.search(/e/i))?(s<0&&(s=u),s+=+h.slice(u+1),h=h.substring(0,u)):s<0&&(s=h.length)}else{if(b(t,2,J.length,"Base"),10==t)return X(f=new U(e),C+f.e+1,H);if(h=String(e),p="number"==typeof e){if(0*e!=0)return k(f,h,p,t);if(f.s=1/e<0?(h=h.slice(1),-1):1,U.DEBUG&&15<h.replace(/^0\.0*|\./,"").length)throw Error(l+e)}else f.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(n=J.slice(0,t),s=u=0,m=h.length;u<m;u++)if(n.indexOf(a=h.charAt(u))<0){if("."==a){if(s<u){s=m;continue}}else if(!o&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){o=!0,u=-1,s=0;continue}return k(f,String(e),p,t)}p=!1,-1<(s=(h=M(h,t,10,f.s)).indexOf("."))?h=h.replace(".",""):s=h.length}for(u=0;48===h.charCodeAt(u);u++);for(m=h.length;48===h.charCodeAt(--m););if(h=h.slice(u,++m)){if(m-=u,p&&U.DEBUG&&15<m&&(d<e||e!==i(e)))throw Error(l+f.s*e);if((s=s-u-1)>N)f.c=f.e=null;else if(s<R)f.c=[f.e=0];else{if(f.e=s,f.c=[],u=(s+1)%c,s<0&&(u+=c),u<m){for(u&&f.c.push(+h.slice(0,u)),m-=c;u<m;)f.c.push(+h.slice(u,u+=c));u=c-(h=h.slice(u)).length}else u-=m;for(;u--;h+="0");f.c.push(+h)}}else f.c=[f.e=0]}function G(e,t,n,r){for(var a,o,i=[0],s=0,l=e.length;s<l;){for(o=i.length;o--;i[o]*=t);for(i[0]+=r.indexOf(e.charAt(s++)),a=0;a<i.length;a++)i[a]>n-1&&(null==i[a+1]&&(i[a+1]=0),i[a+1]+=i[a]/n|0,i[a]%=n)}return i.reverse()}function V(e,t,n){var r,a,o,i,s=0,l=e.length,u=t%m,c=t/m|0;for(e=e.slice();l--;)s=((a=u*(o=e[l]%m)+(r=c*o+(i=e[l]/m|0)*u)%m*m+s)/n|0)+(r/m|0)+c*i,e[l]=a%n;return s&&(e=[s].concat(e)),e}function q(e,t,n,r){var a,o;if(n!=r)o=r<n?1:-1;else for(a=o=0;a<n;a++)if(e[a]!=t[a]){o=e[a]>t[a]?1:-1;break}return o}function $(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&1<e.length;e.splice(0,1));}function K(e,t,n,r){var a,o,i,s,l;if(null==n?n=H:b(n,0,8),!e.c)return e.toString();if(a=e.c[0],i=e.e,null==t)l=_(e.c),l=1==r||2==r&&(i<=z||A<=i)?g(l,i):w(l,i,"0");else if(o=(e=X(new U(e),t,n)).e,s=(l=_(e.c)).length,1==r||2==r&&(t<=o||o<=z)){for(;s<t;l+="0",s++);l=g(l,o)}else if(t-=i,l=w(l,o,"0"),s<o+1){if(0<--t)for(l+=".";t--;l+="0");}else if(0<(t+=o-s))for(o+1==s&&(l+=".");t--;l+="0");return e.s<0&&a?"-"+l:l}function Z(e,t){for(var n,r=1,a=new U(e[0]);r<e.length;r++){if(!(n=new U(e[r])).s){a=n;break}t.call(a,n)&&(a=n)}return a}function Q(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];10<=a;a/=10,r++);return(n=r+n*c-1)>N?e.c=e.e=null:n<R?e.c=[e.e=0]:(e.e=n,e.c=t),e}function X(e,t,n,r){var a,s,l,d,m,h,f,_=e.c,y=p;if(_){e:{for(a=1,d=_[0];10<=d;d/=10,a++);if((s=t-a)<0)s+=c,l=t,f=(m=_[h=0])/y[a-l-1]%10|0;else if((h=o((s+1)/c))>=_.length){if(!r)break e;for(;_.length<=h;_.push(0));m=f=0,l=(s%=c)-c+(a=1)}else{for(m=d=_[h],a=1;10<=d;d/=10,a++);f=(l=(s%=c)-c+a)<0?0:m/y[a-l-1]%10|0}if(r=r||t<0||null!=_[h+1]||(l<0?m:m%y[a-l-1]),r=n<4?(f||r)&&(0==n||n==(e.s<0?3:2)):5<f||5==f&&(4==n||r||6==n&&(0<s?0<l?m/y[a-l]:0:_[h-1])%10&1||n==(e.s<0?8:7)),t<1||!_[0])return _.length=0,r?(t-=e.e+1,_[0]=y[(c-t%c)%c],e.e=-t||0):_[0]=e.e=0,e;if(0==s?(_.length=h,d=1,h--):(_.length=h+1,d=y[c-s],_[h]=0<l?i(m/y[a-l]%y[l])*d:0),r)for(;;){if(0==h){for(s=1,l=_[0];10<=l;l/=10,s++);for(l=_[0]+=d,d=1;10<=l;l/=10,d++);s!=d&&(e.e++,_[0]==u&&(_[0]=1));break}if(_[h]+=d,_[h]!=u)break;_[h--]=0,d=1}for(s=_.length;0===_[--s];_.pop());}e.e>N?e.c=e.e=null:e.e<R&&(e.c=[e.e=0])}return e}function ee(e){var t,n=e.e;return null===n?e.toString():(t=_(e.c),t=n<=z||A<=n?g(t,n):w(t,n,"0"),e.s<0?"-"+t:t)}return U.clone=e,U.ROUND_UP=0,U.ROUND_DOWN=1,U.ROUND_CEIL=2,U.ROUND_FLOOR=3,U.ROUND_HALF_UP=4,U.ROUND_HALF_DOWN=5,U.ROUND_HALF_EVEN=6,U.ROUND_HALF_CEIL=7,U.ROUND_HALF_FLOOR=8,U.EUCLID=9,U.config=U.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(s+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(b(n=e[t],0,h,t),C=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(b(n=e[t],0,8,t),H=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(b(n[0],-h,0,t),b(n[1],0,h,t),z=n[0],A=n[1]):(b(n,-h,h,t),z=-(A=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)b(n[0],-h,-1,t),b(n[1],1,h,t),R=n[0],N=n[1];else{if(b(n,-h,h,t),!n)throw Error(s+t+" cannot be zero: "+n);R=-(N=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(s+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw F=!n,Error(s+"crypto unavailable");F=n}else F=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(b(n=e[t],0,9,t),W=n),e.hasOwnProperty(t="POW_PRECISION")&&(b(n=e[t],0,h,t),I=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(s+t+" not an object: "+n);B=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(s+t+" invalid: "+n);J=n}}return{DECIMAL_PLACES:C,ROUNDING_MODE:H,EXPONENTIAL_AT:[z,A],RANGE:[R,N],CRYPTO:F,MODULO_MODE:W,POW_PRECISION:I,FORMAT:B,ALPHABET:J}},U.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!U.DEBUG)return!0;var t,n,r=e.c,a=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&-h<=a&&a<=h&&a===i(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%c)<1&&(t+=c),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||u<=n||n!==i(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===o||1===o||-1===o))return!0;throw Error(s+"Invalid BigNumber: "+e)},U.maximum=U.max=function(){return Z(arguments,E.lt)},U.minimum=U.min=function(){return Z(arguments,E.gt)},U.random=(L=9007199254740992,Y=Math.random()*L&2097151?function(){return i(Math.random()*L)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,l,u=0,d=[],m=new U(P);if(null==e?e=C:b(e,0,h),a=o(e/c),F)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u<a;)9e15<=(l=131072*t[u]+(t[u+1]>>>11))?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(d.push(l%1e14),u+=2);u=a/2}else{if(!crypto.randomBytes)throw F=!1,Error(s+"crypto unavailable");for(t=crypto.randomBytes(a*=7);u<a;)9e15<=(l=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])?crypto.randomBytes(7).copy(t,u):(d.push(l%1e14),u+=7);u=a/7}if(!F)for(;u<a;)(l=Y())<9e15&&(d[u++]=l%1e14);for(a=d[--u],e%=c,a&&e&&(l=p[c-e],d[u]=i(a/l)*l);0===d[u];d.pop(),u--);if(u<0)d=[r=0];else{for(r=-1;0===d[0];d.splice(0,1),r-=c);for(u=1,l=d[0];10<=l;l/=10,u++);u<c&&(r-=c-u)}return m.e=r,m.c=d,m}),U.sum=function(){for(var e=1,t=arguments,n=new U(t[0]);e<t.length;)n=n.plus(t[e++]);return n},T="0123456789",M=function(e,t,r,a,o){var i,s,l,u,c,d,p,m,h=e.indexOf("."),f=C,y=H;for(0<=h&&(u=I,I=0,e=e.replace(".",""),d=(m=new U(t)).pow(e.length-h),I=u,m.c=G(w(_(d.c),d.e,"0"),10,r,T),m.e=m.c.length),l=u=(p=G(e,t,r,o?(i=J,T):(i=T,J))).length;0==p[--u];p.pop());if(!p[0])return i.charAt(0);if(h<0?--l:(d.c=p,d.e=l,d.s=a,p=(d=n(d,m,f,y,r)).c,c=d.r,l=d.e),h=p[s=l+f+1],u=r/2,c=c||s<0||null!=p[s+1],c=y<4?(null!=h||c)&&(0==y||y==(d.s<0?3:2)):u<h||h==u&&(4==y||c||6==y&&1&p[s-1]||y==(d.s<0?8:7)),s<1||!p[0])e=c?w(i.charAt(1),-f,i.charAt(0)):i.charAt(0);else{if(p.length=s,c)for(--r;++p[--s]>r;)p[s]=0,s||(++l,p=[1].concat(p));for(u=p.length;!p[--u];);for(h=0,e="";h<=u;e+=i.charAt(p[h++]));e=w(e,l,i.charAt(0))}return e},n=function(e,t,n,r,a){var o,s,l,d,p,m,h,_,y,b,v,g,w,M,k,L,Y,T=e.s==t.s?1:-1,S=e.c,D=t.c;if(!(S&&S[0]&&D&&D[0]))return new U(e.s&&t.s&&(S?!D||S[0]!=D[0]:D)?S&&0==S[0]||!D?0*T:T/0:NaN);for(y=(_=new U(T)).c=[],T=n+(s=e.e-t.e)+1,a||(a=u,s=f(e.e/c)-f(t.e/c),T=T/c|0),l=0;D[l]==(S[l]||0);l++);if(D[l]>(S[l]||0)&&s--,T<0)y.push(1),d=!0;else{for(M=S.length,L=D.length,T+=2,1<(p=i(a/(D[l=0]+1)))&&(D=V(D,p,a),S=V(S,p,a),L=D.length,M=S.length),w=L,v=(b=S.slice(0,L)).length;v<L;b[v++]=0);Y=D.slice(),Y=[0].concat(Y),k=D[0],D[1]>=a/2&&k++;do{if(p=0,(o=q(D,b,L,v))<0){if(g=b[0],L!=v&&(g=g*a+(b[1]||0)),1<(p=i(g/k)))for(a<=p&&(p=a-1),h=(m=V(D,p,a)).length,v=b.length;1==q(m,b,h,v);)p--,$(m,L<h?Y:D,h,a),h=m.length,o=1;else 0==p&&(o=p=1),h=(m=D.slice()).length;if(h<v&&(m=[0].concat(m)),$(b,m,v,a),v=b.length,-1==o)for(;q(D,b,L,v)<1;)p++,$(b,L<v?Y:D,v,a),v=b.length}else 0===o&&(p++,b=[0]);y[l++]=p,b[0]?b[v++]=S[w]||0:(b=[S[w]],v=1)}while((w++<M||null!=b[0])&&T--);d=null!=b[0],y[0]||y.splice(0,1)}if(a==u){for(l=1,T=y[0];10<=T;T/=10,l++);X(_,n+(_.e=l+s*c-1)+1,r,d)}else _.e=s,_.r=+d;return _},S=/^(-?)0([xbo])(?=\w[\w.]*$)/i,D=/^([^.]+)\.$/,O=/^\.([^.]+)$/,j=/^-?(Infinity|NaN)$/,x=/^\s*\+(?=[\w.])|^\s+|\s+$/g,k=function(e,t,n,r){var a,o=n?t:t.replace(x,"");if(j.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!n&&(o=o.replace(S,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,o=o.replace(D,"$1").replace(O,"0.$1")),t!=o))return new U(o,a);if(U.DEBUG)throw Error(s+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},E.absoluteValue=E.abs=function(){var e=new U(this);return e.s<0&&(e.s=1),e},E.comparedTo=function(e,t){return y(this,new U(e,t))},E.decimalPlaces=E.dp=function(e,t){var n,r,a;if(null!=e)return b(e,0,h),null==t?t=H:b(t,0,8),X(new U(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((a=n.length-1)-f(this.e/c))*c,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},E.dividedBy=E.div=function(e,t){return n(this,new U(e,t),C,H)},E.dividedToIntegerBy=E.idiv=function(e,t){return n(this,new U(e,t),0,1)},E.exponentiatedBy=E.pow=function(e,t){var n,r,a,l,u,d,p,m,h=this;if((e=new U(e)).c&&!e.isInteger())throw Error(s+"Exponent not an integer: "+ee(e));if(null!=t&&(t=new U(t)),u=14<e.e,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return m=new U(Math.pow(+ee(h),u?2-v(e):+ee(e))),t?m.mod(t):m;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new U(NaN);(r=!d&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(9<e.e&&(0<h.e||h.e<-1||(0==h.e?1<h.c[0]||u&&24e7<=h.c[1]:h.c[0]<8e13||u&&h.c[0]<=9999975e7)))return l=h.s<0&&v(e)?-0:0,-1<h.e&&(l=1/l),new U(d?1/l:l);I&&(l=o(I/c+2))}for(p=u?(n=new U(.5),d&&(e.s=1),v(e)):(a=Math.abs(+ee(e)))%2,m=new U(P);;){if(p){if(!(m=m.times(h)).c)break;l?m.c.length>l&&(m.c.length=l):r&&(m=m.mod(t))}if(a){if(0===(a=i(a/2)))break;p=a%2}else if(X(e=e.times(n),e.e+1,1),14<e.e)p=v(e);else{if(0==(a=+ee(e)))break;p=a%2}h=h.times(h),l?h.c&&h.c.length>l&&(h.c.length=l):r&&(h=h.mod(t))}return r?m:(d&&(m=P.div(m)),t?m.mod(t):l?X(m,I,H,void 0):m)},E.integerValue=function(e){var t=new U(this);return null==e?e=H:b(e,0,8),X(t,t.e+1,e)},E.isEqualTo=E.eq=function(e,t){return 0===y(this,new U(e,t))},E.isFinite=function(){return!!this.c},E.isGreaterThan=E.gt=function(e,t){return 0<y(this,new U(e,t))},E.isGreaterThanOrEqualTo=E.gte=function(e,t){return 1===(t=y(this,new U(e,t)))||0===t},E.isInteger=function(){return!!this.c&&f(this.e/c)>this.c.length-2},E.isLessThan=E.lt=function(e,t){return y(this,new U(e,t))<0},E.isLessThanOrEqualTo=E.lte=function(e,t){return-1===(t=y(this,new U(e,t)))||0===t},E.isNaN=function(){return!this.s},E.isNegative=function(){return this.s<0},E.isPositive=function(){return 0<this.s},E.isZero=function(){return!!this.c&&0==this.c[0]},E.minus=function(e,t){var n,r,a,o,i=this,s=i.s;if(t=(e=new U(e,t)).s,!s||!t)return new U(NaN);if(s!=t)return e.s=-t,i.plus(e);var l=i.e/c,d=e.e/c,p=i.c,m=e.c;if(!l||!d){if(!p||!m)return p?(e.s=-t,e):new U(m?i:NaN);if(!p[0]||!m[0])return m[0]?(e.s=-t,e):new U(p[0]?i:3==H?-0:0)}if(l=f(l),d=f(d),p=p.slice(),s=l-d){for((a=(o=s<0)?(s=-s,p):(d=l,m)).reverse(),t=s;t--;a.push(0));a.reverse()}else for(r=(o=(s=p.length)<(t=m.length))?s:t,s=t=0;t<r;t++)if(p[t]!=m[t]){o=p[t]<m[t];break}if(o&&(a=p,p=m,m=a,e.s=-e.s),0<(t=(r=m.length)-(n=p.length)))for(;t--;p[n++]=0);for(t=u-1;s<r;){if(p[--r]<m[r]){for(n=r;n&&!p[--n];p[n]=t);--p[n],p[r]+=u}p[r]-=m[r]}for(;0==p[0];p.splice(0,1),--d);return p[0]?Q(e,p,d):(e.s=3==H?-1:1,e.c=[e.e=0],e)},E.modulo=E.mod=function(e,t){var r,a,o=this;return e=new U(e,t),!o.c||!e.s||e.c&&!e.c[0]?new U(NaN):!e.c||o.c&&!o.c[0]?new U(o):(9==W?(a=e.s,e.s=1,r=n(o,e,0,3),e.s=a,r.s*=a):r=n(o,e,0,W),(e=o.minus(r.times(e))).c[0]||1!=W||(e.s=o.s),e)},E.multipliedBy=E.times=function(e,t){var n,r,a,o,i,s,l,d,p,h,_,y,b,v,g,w=this,M=w.c,k=(e=new U(e,t)).c;if(!(M&&k&&M[0]&&k[0]))return!w.s||!e.s||M&&!M[0]&&!k||k&&!k[0]&&!M?e.c=e.e=e.s=null:(e.s*=w.s,M&&k?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=f(w.e/c)+f(e.e/c),e.s*=w.s,(l=M.length)<(h=k.length)&&(b=M,M=k,k=b,a=l,l=h,h=a),a=l+h,b=[];a--;b.push(0));for(v=u,g=m,a=h;0<=--a;){for(n=0,_=k[a]%g,y=k[a]/g|0,o=a+(i=l);a<o;)n=((d=_*(d=M[--i]%g)+(s=y*d+(p=M[i]/g|0)*_)%g*g+b[o]+n)/v|0)+(s/g|0)+y*p,b[o--]=d%v;b[o]=n}return n?++r:b.splice(0,1),Q(e,b,r)},E.negated=function(){var e=new U(this);return e.s=-e.s||null,e},E.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new U(e,t)).s,!a||!t)return new U(NaN);if(a!=t)return e.s=-t,r.minus(e);var o=r.e/c,i=e.e/c,s=r.c,l=e.c;if(!o||!i){if(!s||!l)return new U(a/0);if(!s[0]||!l[0])return l[0]?e:new U(s[0]?r:0*a)}if(o=f(o),i=f(i),s=s.slice(),a=o-i){for((n=0<a?(i=o,l):(a=-a,s)).reverse();a--;n.push(0));n.reverse()}for((a=s.length)-(t=l.length)<0&&(n=l,l=s,s=n,t=a),a=0;t;)a=(s[--t]=s[t]+l[t]+a)/u|0,s[t]=u===s[t]?0:s[t]%u;return a&&(s=[a].concat(s),++i),Q(e,s,i)},E.precision=E.sd=function(e,t){var n,r,a;if(null!=e&&e!==!!e)return b(e,1,h),null==t?t=H:b(t,0,8),X(new U(this),e,t);if(!(n=this.c))return null;if(r=(a=n.length-1)*c+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];10<=a;a/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},E.shiftedBy=function(e){return b(e,-d,d),this.times("1e"+e)},E.squareRoot=E.sqrt=function(){var e,t,r,a,o,i=this,s=i.c,l=i.s,u=i.e,c=C+4,d=new U("0.5");if(1!==l||!s||!s[0])return new U(!l||l<0&&(!s||s[0])?NaN:s?i:1/0);if((r=0==(l=Math.sqrt(+ee(i)))||l==1/0?(((t=_(s)).length+u)%2==0&&(t+="0"),l=Math.sqrt(+t),u=f((u+1)/2)-(u<0||u%2),new U(t=l==1/0?"1e"+u:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+u)):new U(l+"")).c[0])for((l=(u=r.e)+c)<3&&(l=0);;)if(o=r,r=d.times(o.plus(n(i,o,c,1))),_(o.c).slice(0,l)===(t=_(r.c)).slice(0,l)){if(r.e<u&&--l,"9999"!=(t=t.slice(l-3,l+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(X(r,r.e+C+2,1),e=!r.times(r).eq(i));break}if(!a&&(X(o,o.e+C+2,0),o.times(o).eq(i))){r=o;break}c+=4,l+=4,a=1}return X(r,r.e+C+1,H,e)},E.toExponential=function(e,t){return null!=e&&(b(e,0,h),e++),K(this,e,t,1)},E.toFixed=function(e,t){return null!=e&&(b(e,0,h),e=e+this.e+1),K(this,e,t)},E.toFormat=function(e,t,n){var r;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=B;else if("object"!=typeof n)throw Error(s+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var a,o=r.split("."),i=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",c=o[0],d=o[1],p=this.s<0,m=p?c.slice(1):c,h=m.length;if(l&&(a=i,i=l,h-=l=a),0<i&&0<h){for(a=h%i||i,c=m.substr(0,a);a<h;a+=i)c+=u+m.substr(a,i);0<l&&(c+=u+m.slice(a)),p&&(c="-"+c)}r=d?c+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):c}return(n.prefix||"")+r+(n.suffix||"")},E.toFraction=function(e){var t,r,a,o,i,l,u,d,m,h,f,y,b=this,v=b.c;if(null!=e&&(!(u=new U(e)).isInteger()&&(u.c||1!==u.s)||u.lt(P)))throw Error(s+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+ee(u));if(!v)return new U(b);for(t=new U(P),m=r=new U(P),a=d=new U(P),y=_(v),i=t.e=y.length-b.e-1,t.c[0]=p[(l=i%c)<0?c+l:l],e=!e||0<u.comparedTo(t)?0<i?t:m:u,l=N,N=1/0,u=new U(y),d.c[0]=0;h=n(u,t,0,1),1!=(o=r.plus(h.times(a))).comparedTo(e);)r=a,a=o,m=d.plus(h.times(o=m)),d=o,t=u.minus(h.times(o=t)),u=o;return o=n(e.minus(r),a,0,1),d=d.plus(o.times(m)),r=r.plus(o.times(a)),d.s=m.s=b.s,f=n(m,a,i*=2,H).minus(b).abs().comparedTo(n(d,r,i,H).minus(b).abs())<1?[m,a]:[d,r],N=l,f},E.toNumber=function(){return+ee(this)},E.toPrecision=function(e,t){return null!=e&&b(e,1,h),K(this,e,t,2)},E.toString=function(e){var t,n=this,r=n.s,a=n.e;return null===a?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(t=null==e?a<=z||A<=a?g(_(n.c),a):w(_(n.c),a,"0"):10===e?w(_((n=X(new U(n),C+a+1,H)).c),n.e,"0"):(b(e,2,J.length,"Base"),M(w(_(n.c),a,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},E.valueOf=E.toJSON=function(){return ee(this)},E._isBigNumber=!0,a&&(E[Symbol.toStringTag]="BigNumber",E[Symbol.for("nodejs.util.inspect.custom")]=E.valueOf),null!=t&&U.set(t),U}()).default=n.BigNumber=n,void 0!==t&&t.exports?t.exports=n:(e=e||("undefined"!=typeof self&&self?self:window)).BigNumber=n}(this)},{}],2:[function(e,t,n){"use strict";t.exports={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}},{}],3:[function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,a=!1,o=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw o}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var a=e("./globalState"),o=e("./validating"),i=e("./parsing"),s=e("bignumber.js"),l={trillion:Math.pow(10,12),billion:Math.pow(10,9),million:Math.pow(10,6),thousand:Math.pow(10,3)},u={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},c=a.currentBytes(),d=c.binarySuffixes,p=c.decimalSuffixes,m={general:{scale:1024,suffixes:p,marker:"bd"},binary:{scale:1024,suffixes:d,marker:"b"},decimal:{scale:1e3,suffixes:p,marker:"d"}};function h(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length?arguments[2]:void 0;if("string"==typeof t&&(t=i.parseFormat(t)),!o.validateFormat(t))return"ERROR: invalid format";var r=t.prefix||"",s=t.postfix||"",l=function(e,t,n){switch(t.output){case"currency":return function(e,t,n){var r=n.currentCurrency(),a=Object.assign({},t),o=Object.assign({},u,a),i=void 0,s="",l=!!o.totalLength||!!o.forceAverage||o.average,c=a.currencyPosition||r.position,d=a.currencySymbol||r.symbol,p=void 0!==o.spaceSeparatedCurrency?o.spaceSeparatedCurrency:o.spaceSeparated;void 0===a.lowPrecision&&(a.lowPrecision=!1),p&&(s=" "),"infix"===c&&(i=s+d+s);var m=b({instance:e,providedFormat:a,state:n,decimalSeparator:i});return"prefix"===c&&(m=e._value<0&&"sign"===o.negative?"-".concat(s).concat(d).concat(m.slice(1)):0<e._value&&o.forceSign?"+".concat(s).concat(d).concat(m.slice(1)):d+s+m),c&&"postfix"!==c||(m=m+(s=!o.spaceSeparatedAbbreviation&&l?"":s)+d),m}(e,t=v(t,a.currentCurrencyDefaultFormat()),a);case"percent":return function(e,t,n,r){var a=t.prefixSymbol,o=b({instance:r(100*e._value),providedFormat:t,state:n}),i=Object.assign({},u,t);return a?"%".concat(i.spaceSeparated?" ":"").concat(o):"".concat(o).concat(i.spaceSeparated?" ":"","%")}(e,t=v(t,a.currentPercentageDefaultFormat()),a,n);case"byte":return function(e,t,n,r){var a=t.base||"binary",o=Object.assign({},u,t),i=n.currentBytes(),s=i.binarySuffixes,l=i.decimalSuffixes,c={general:{scale:1024,suffixes:l||p,marker:"bd"},binary:{scale:1024,suffixes:s||d,marker:"b"},decimal:{scale:1e3,suffixes:l||p,marker:"d"}}[a],m=f(e._value,c.suffixes,c.scale),h=m.value,_=m.suffix,y=b({instance:r(h),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()});return"".concat(y).concat(o.spaceSeparated?" ":"").concat(_)}(e,t=v(t,a.currentByteDefaultFormat()),a,n);case"time":return t=v(t,a.currentTimeDefaultFormat()),function(e){var t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return"".concat(t,":").concat(n<10?"0":"").concat(n,":").concat(r<10?"0":"").concat(r)}(e);case"ordinal":return function(e,t,n){var r=n.currentOrdinal(),a=Object.assign({},u,t),o=b({instance:e,providedFormat:t,state:n}),i=r(e._value);return"".concat(o).concat(a.spaceSeparated?" ":"").concat(i)}(e,t=v(t,a.currentOrdinalDefaultFormat()),a);case"number":default:return b({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return(l=r+l)+s}function f(e,t,n){var r=t[0],a=Math.abs(e);if(n<=a){for(var o=1;o<t.length;++o){var i=Math.pow(n,o),s=Math.pow(n,o+1);if(i<=a&&a<s){r=t[o],e/=i;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function _(e){for(var t="",n=0;n<e;n++)t+="0";return t}function y(e,t,n){var a=2<arguments.length&&void 0!==n?n:Math.round;return-1!==e.toString().indexOf("e")?function(e,t){var n=e.toString(),a=r(n.split("e"),2),o=a[0],i=a[1],s=r(o.split("."),2),l=s[0],u=s[1],c=void 0===u?"":u;if(0<+i)n=l+c+_(i-c.length);else{var d=".";d=+l<0?"-0".concat(d):"0".concat(d);var p=(_(-i-1)+Math.abs(l)+c).substr(0,t);p.length<t&&(p+=_(t-p.length)),n=d+p}return 0<+i&&0<t&&(n+=".".concat(_(t))),n}(e,t):new s(a(+"".concat(e,"e+").concat(t))/Math.pow(10,t)).toFixed(t)}function b(e){var t=e.instance,n=e.providedFormat,o=e.state,i=void 0===o?a:o,s=e.decimalSeparator,c=e.defaults,d=void 0===c?i.currentDefaults():c,p=t._value;if(0===p&&i.hasZeroFormat())return i.getZeroFormat();if(!isFinite(p))return p.toString();var m,h,f,_,b,v,g,w,M=Object.assign({},u,d,n),k=M.totalLength,L=k?0:M.characteristic,Y=M.optionalCharacteristic,T=M.forceAverage,S=M.lowPrecision,D=!!k||!!T||M.average,O=k?-1:D&&void 0===n.mantissa?0:M.mantissa,j=!k&&(void 0===n.optionalMantissa?-1===O:M.optionalMantissa),x=M.trimMantissa,E=M.thousandSeparated,P=M.spaceSeparated,C=M.negative,H=M.forceSign,z=M.exponential,A=M.roundingFunction,R="";if(D){var N=function(e){var t=e.value,n=e.forceAverage,r=e.lowPrecision,a=void 0===r||r,o=e.abbreviations,i=e.spaceSeparated,s=void 0!==i&&i,u=e.totalLength,c=void 0===u?0:u,d=e.roundingFunction,p=void 0===d?Math.round:d,m="",h=Math.abs(t),f=-1;if(n&&o[n]&&l[n]?(m=o[n],t/=l[n]):h>=l.trillion||a&&1===p(h/l.trillion)?(m=o.trillion,t/=l.trillion):h<l.trillion&&h>=l.billion||a&&1===p(h/l.billion)?(m=o.billion,t/=l.billion):h<l.billion&&h>=l.million||a&&1===p(h/l.million)?(m=o.million,t/=l.million):(h<l.million&&h>=l.thousand||a&&1===p(h/l.thousand))&&(m=o.thousand,t/=l.thousand),m=m&&(s?" ":"")+m,c){var _=t<0,y=t.toString().split(".")[0],b=_?y.length-1:y.length;f=Math.max(c-b,0)}return{value:t,abbreviation:m,mantissaPrecision:f}}({value:p,forceAverage:T,lowPrecision:S,abbreviations:i.currentAbbreviations(),spaceSeparated:P,roundingFunction:A,totalLength:k});p=N.value,R+=N.abbreviation,k&&(O=N.mantissaPrecision)}if(z){var F=(h=(m={value:p,characteristicPrecision:L}).value,_=void 0===(f=m.characteristicPrecision)?0:f,v=(b=r(h.toExponential().split("e"),2))[0],g=b[1],w=+v,_&&1<_&&(w*=Math.pow(10,_-1),g=0<=(g-=_-1)?"+".concat(g):g),{value:w,abbreviation:"e".concat(g)});p=F.value,R=F.abbreviation+R}var W,I,B,J=function(e,t,n,a,o,i){if(-1===a)return e;var s=y(t,a,i),l=r(s.toString().split("."),2),u=l[0],c=l[1],d=void 0===c?"":c;if(d.match(/^0+$/)&&(n||o))return u;var p=d.match(/0+$/);return o&&p?"".concat(u,".").concat(d.toString().slice(0,p.index)):s.toString()}(p.toString(),p,j,O,x,A);return J=function(e,t,n,r,a){var o=r.currentDelimiters(),i=o.thousands;a=a||o.decimal;var s=o.thousandsSize||3,l=e.toString(),u=l.split(".")[0],c=l.split(".")[1],d=t<0&&0===u.indexOf("-");return n&&(d&&(u=u.slice(1)),function(e,t){for(var n=[],r=0,a=e;0<a;a--)r===t&&(n.unshift(a),r=0),r++;return n}(u.length,s).forEach((function(e,t){u=u.slice(0,e+t)+i+u.slice(e+t)})),d&&(u="-".concat(u))),c?u+a+c:u}(J=function(e,t,n,a){var o=e,i=r(o.toString().split("."),2),s=i[0],l=i[1];if(s.match(/^-?0$/)&&n)return l?"".concat(s.replace("0",""),".").concat(l):s.replace("0","");var u=t<0&&0===s.indexOf("-");if(u&&(s=s.slice(1),o=o.slice(1)),s.length<a)for(var c=a-s.length,d=0;d<c;d++)o="0".concat(o);return u&&(o="-".concat(o)),o.toString()}(J,p,Y,L),p,E,i,s),(D||z)&&(J+=R),(H||p<0)&&(W=J,B=C,J=0===(I=p)?W:0==+W?W.replace("-",""):0<I?"+".concat(W):"sign"===B?W:"(".concat(W.replace("-",""),")")),J}function v(e,t){if(!e)return t;var n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}t.exports=function(e){return{format:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return h.apply(void 0,n.concat([e]))},getByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=m.general;return f(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getBinaryByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=m.binary;return f(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getDecimalByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=m.decimal;return f(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},formatOrDefault:v}}},{"./globalState":4,"./parsing":8,"./validating":10,"bignumber.js":1}],4:[function(e,t,n){"use strict";var r=e("./en-US"),a=e("./validating"),o=e("./parsing"),i={},s=void 0,l={},u=null,c={};function d(e){s=e}function p(){return l[s]}i.languages=function(){return Object.assign({},l)},i.currentLanguage=function(){return s},i.currentBytes=function(){return p().bytes||{}},i.currentCurrency=function(){return p().currency},i.currentAbbreviations=function(){return p().abbreviations},i.currentDelimiters=function(){return p().delimiters},i.currentOrdinal=function(){return p().ordinal},i.currentDefaults=function(){return Object.assign({},p().defaults,c)},i.currentOrdinalDefaultFormat=function(){return Object.assign({},i.currentDefaults(),p().ordinalFormat)},i.currentByteDefaultFormat=function(){return Object.assign({},i.currentDefaults(),p().byteFormat)},i.currentPercentageDefaultFormat=function(){return Object.assign({},i.currentDefaults(),p().percentageFormat)},i.currentCurrencyDefaultFormat=function(){return Object.assign({},i.currentDefaults(),p().currencyFormat)},i.currentTimeDefaultFormat=function(){return Object.assign({},i.currentDefaults(),p().timeFormat)},i.setDefaults=function(e){e=o.parseFormat(e),a.validateFormat(e)&&(c=e)},i.getZeroFormat=function(){return u},i.setZeroFormat=function(e){return u="string"==typeof e?e:null},i.hasZeroFormat=function(){return null!==u},i.languageData=function(e){if(e){if(l[e])return l[e];throw new Error('Unknown tag "'.concat(e,'"'))}return p()},i.registerLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!a.validateLanguage(e))throw new Error("Invalid language data");l[e.languageTag]=e,t&&d(e.languageTag)},i.setLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r.languageTag;if(!l[e]){var n=e.split("-")[0],a=Object.keys(l).find((function(e){return e.split("-")[0]===n}));return l[a]?void d(a):void d(t)}d(e)},i.registerLanguage(r),s=r.languageTag,t.exports=i},{"./en-US":2,"./parsing":8,"./validating":10}],5:[function(e,t,n){"use strict";t.exports=function(t){return{loadLanguagesInNode:function(n){return r=t,void n.forEach((function(t){var n=void 0;try{n=e("../languages/".concat(t))}catch(n){console.error('Unable to load "'.concat(t,'". No matching language file found.'))}n&&r.registerLanguage(n)}));var r}}}},{}],6:[function(e,t,n){"use strict";var r=e("bignumber.js");function a(e,t,n){var a=new r(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new r(o),e._value=a.minus(o).toNumber(),e}t.exports=function(e){return{add:function(t,n){return o=n,i=e,s=new r((a=t)._value),l=o,i.isNumbro(o)&&(l=o._value),l=new r(l),a._value=s.plus(l).toNumber(),a;var a,o,i,s,l},subtract:function(t,n){return a(t,n,e)},multiply:function(t,n){return o=n,i=e,s=new r((a=t)._value),l=o,i.isNumbro(o)&&(l=o._value),l=new r(l),a._value=s.times(l).toNumber(),a;var a,o,i,s,l},divide:function(t,n){return o=n,i=e,s=new r((a=t)._value),l=o,i.isNumbro(o)&&(l=o._value),l=new r(l),a._value=s.dividedBy(l).toNumber(),a;var a,o,i,s,l},set:function(t,n){return r=t,o=a=n,e.isNumbro(a)&&(o=a._value),r._value=o,r;var r,a,o},difference:function(t,n){return r=n,a(i=(o=e)(t._value),r,o),Math.abs(i._value);var r,o,i},BigNumber:r}}},{"bignumber.js":1}],7:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=e("./globalState"),o=e("./validating"),i=e("./loading")(m),s=e("./unformatting"),l=e("./formatting")(m),u=e("./manipulating")(m),c=e("./parsing"),d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._value=t}var t,n;return t=e,(n=[{key:"clone",value:function(){return m(this._value)}},{key:"format",value:function(e){var t=0<arguments.length&&void 0!==e?e:{};return l.format(this,t)}},{key:"formatCurrency",value:function(e){return"string"==typeof e&&(e=c.parseFormat(e)),(e=l.formatOrDefault(e,a.currentCurrencyDefaultFormat())).output="currency",l.format(this,e)}},{key:"formatTime",value:function(e){var t=0<arguments.length&&void 0!==e?e:{};return t.output="time",l.format(this,t)}},{key:"binaryByteUnits",value:function(){return l.getBinaryByteUnit(this)}},{key:"decimalByteUnits",value:function(){return l.getDecimalByteUnit(this)}},{key:"byteUnits",value:function(){return l.getByteUnit(this)}},{key:"difference",value:function(e){return u.difference(this,e)}},{key:"add",value:function(e){return u.add(this,e)}},{key:"subtract",value:function(e){return u.subtract(this,e)}},{key:"multiply",value:function(e){return u.multiply(this,e)}},{key:"divide",value:function(e){return u.divide(this,e)}},{key:"set",value:function(e){return u.set(this,p(e))}},{key:"value",value:function(){return this._value}},{key:"valueOf",value:function(){return this._value}}])&&r(t.prototype,n),e}();function p(e){var t=e;return m.isNumbro(e)?t=e._value:"string"==typeof e?t=m.unformat(e):isNaN(e)&&(t=NaN),t}function m(e){return new d(p(e))}m.version="2.3.6",m.isNumbro=function(e){return e instanceof d},m.language=a.currentLanguage,m.registerLanguage=a.registerLanguage,m.setLanguage=a.setLanguage,m.languages=a.languages,m.languageData=a.languageData,m.zeroFormat=a.setZeroFormat,m.defaultFormat=a.currentDefaults,m.setDefaults=a.setDefaults,m.defaultCurrencyFormat=a.currentCurrencyDefaultFormat,m.validate=o.validate,m.loadLanguagesInNode=i.loadLanguagesInNode,m.unformat=s.unformat,m.BigNumber=u.BigNumber,t.exports=m},{"./formatting":3,"./globalState":4,"./loading":5,"./manipulating":6,"./parsing":8,"./unformatting":9,"./validating":10}],8:[function(e,t,n){"use strict";t.exports={parseFormat:function(e){var t,n,r,a,o,i,s,l,u,c,d,p,m,h,f,_,y,b,v,g,w,M,k=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(n=k,o=k,function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",t.base="general"):-1!==e.indexOf("b")?(t.output="byte",t.base="binary"):-1!==e.indexOf("d")?(t.output="byte",t.base="decimal"):-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time";t.output="percent"}else t.output="currency"}(e=(i=(a=e=(r=(t=e).match(/^{([^}]*)}/))?(n.prefix=r[1],t.slice(r[0].length)):t).match(/{([^}]*)}$/))?(o.postfix=i[1],a.slice(0,-i[0].length)):a,k),s=k,(l=e.match(/[1-9]+[0-9]*/))&&(s.totalLength=+l[0]),u=k,(c=e.split(".")[0].match(/0+/))&&(u.characteristic=c[0].length),function(e,t){if(-1!==e.indexOf(".")){var n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,k),d=k,-1!==e.indexOf("a")&&(d.average=!0),m=k,-1!==(p=e).indexOf("K")?m.forceAverage="thousand":-1!==p.indexOf("M")?m.forceAverage="million":-1!==p.indexOf("B")?m.forceAverage="billion":-1!==p.indexOf("T")&&(m.forceAverage="trillion"),function(e,t){var n=e.split(".")[1];if(n){var r=n.match(/0+/);r&&(t.mantissa=r[0].length)}}(e,k),f=k,(h=e).match(/\[\.]/)?f.optionalMantissa=!0:h.match(/\./)&&(f.optionalMantissa=!1),_=k,(y=e.split(".")[1])&&(_.trimMantissa=-1!==y.indexOf("[")),b=k,-1!==e.indexOf(",")&&(b.thousandSeparated=!0),v=k,-1!==e.indexOf(" ")&&(v.spaceSeparated=!0,v.spaceSeparatedCurrency=!0,(v.average||v.forceAverage)&&(v.spaceSeparatedAbbreviation=!0)),w=k,(g=e).match(/^\+?\([^)]*\)$/)&&(w.negative="parenthesis"),g.match(/^\+?-/)&&(w.negative="sign"),M=k,e.match(/^\+/)&&(M.forceSign=!0),k)}}},{}],9:[function(e,t,n){"use strict";var r=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function a(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}t.exports={unformat:function(t,n){var o,i,s,l=e("./globalState"),u=l.currentDelimiters(),c=l.currentCurrency().symbol,d=l.currentOrdinal(),p=l.getZeroFormat(),m=l.currentAbbreviations(),h=void 0;if("string"==typeof t)h=function(e,t){if(e.indexOf(":")&&":"!==t.thousands){var n=e.split(":");if(3===n.length){var r=+n[0],a=+n[1],o=+n[2];return!isNaN(r)&&!isNaN(a)&&!isNaN(o)}}}(t,u)?(i=+(o=t.split(":"))[0],s=+o[1],+o[2]+60*s+3600*i):function(e,t,n,o,i,s,l){var u=2<arguments.length&&void 0!==n?n:"",c=3<arguments.length?o:void 0,d=4<arguments.length?i:void 0,p=5<arguments.length?s:void 0,m=6<arguments.length?l:void 0;if(""!==e)return e===d?0:function e(t,n,o,i,s,l,u){var c=2<arguments.length&&void 0!==o?o:"",d=3<arguments.length?i:void 0,p=4<arguments.length?s:void 0,m=5<arguments.length?l:void 0,h=6<arguments.length?u:void 0;if(!isNaN(+t))return+t;var f="",_=t.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(_!==t)return-1*e(_,n,c,d,p,m,h);for(var y=0;y<r.length;y++){var b=r[y];if((f=t.replace(RegExp("([0-9 ])(".concat(b.key,")$")),"$1"))!==t)return e(f,n,c,d,p,m,h)*b.factor}if((f=t.replace("%",""))!==t)return e(f,n,c,d,p,m,h)/100;var v=parseFloat(t);if(!isNaN(v)){var g=d(v);if(g&&"."!==g&&(f=t.replace(new RegExp("".concat(a(g),"$")),""))!==t)return e(f,n,c,d,p,m,h);var w={};Object.keys(m).forEach((function(e){w[m[e]]=e}));for(var M=Object.keys(w).sort().reverse(),k=M.length,L=0;L<k;L++){var Y=M[L],T=w[Y];if((f=t.replace(Y,""))!==t){var S=void 0;switch(T){case"thousand":S=Math.pow(10,3);break;case"million":S=Math.pow(10,6);break;case"billion":S=Math.pow(10,9);break;case"trillion":S=Math.pow(10,12)}return e(f,n,c,d,p,m,h)*S}}}}(function(e,t,n){var r=2<arguments.length&&void 0!==n?n:"",o=e.replace(r,"");return(o=o.replace(new RegExp("([0-9])".concat(a(t.thousands),"([0-9])"),"g"),"$1$2")).replace(t.decimal,".")}(e,t,u),t,u,c,d,p,m)}(t,u,c,d,p,m,n);else{if("number"!=typeof t)return;h=t}if(void 0!==h)return h}}},{"./globalState":4}],10:[function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=e("./unformatting"),i=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,s={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:function(e,t){return"byte"===t.output},message:"`base` must be provided only when the output is `byte`",mandatory:function(e){return"byte"===e.output}},characteristic:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",lowPrecision:{type:"boolean",restriction:function(e,t){return!0===t.average},message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:function(e){return 0<=e},message:"value must be positive"},{restriction:function(e,t){return!t.exponential},message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:function(e,t){return"percent"===t.output},message:"`prefixSymbol` can be provided only when the output is `percent`"}},l={languageTag:{type:"string",mandatory:!0,restriction:function(e){return e.match(i)},message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function u(e){return void 0!==o.unformat(e)}function c(e,t,n,o){var i=3<arguments.length&&void 0!==o&&o,l=Object.keys(e).map((function(r){if(!t[r])return console.error("".concat(n," Invalid key: ").concat(r)),!1;var o=e[r],i=t[r];if("string"==typeof i&&(i={type:i}),"format"===i.type){if(!c(o,s,"[Validate ".concat(r,"]"),!0))return!1}else if(a(o)!==i.type)return console.error("".concat(n," ").concat(r,' type mismatched: "').concat(i.type,'" expected, "').concat(a(o),'" provided')),!1;if(i.restrictions&&i.restrictions.length)for(var l=i.restrictions.length,u=0;u<l;u++){var d=i.restrictions[u],p=d.restriction,m=d.message;if(!p(o,e))return console.error("".concat(n," ").concat(r," invalid value: ").concat(m)),!1}return i.restriction&&!i.restriction(o,e)?(console.error("".concat(n," ").concat(r," invalid value: ").concat(i.message)),!1):i.validValues&&-1===i.validValues.indexOf(o)?(console.error("".concat(n," ").concat(r," invalid value: must be among ").concat(JSON.stringify(i.validValues),', "').concat(o,'" provided')),!1):!(i.children&&!c(o,i.children,"[Validate ".concat(r,"]")))}));return i||l.push.apply(l,r(Object.keys(t).map((function(r){var a=t[r];if("string"==typeof a&&(a={type:a}),a.mandatory){var o=a.mandatory;if("function"==typeof o&&(o=o(e)),o&&void 0===e[r])return console.error("".concat(n,' Missing mandatory key "').concat(r,'"')),!1}return!0})))),l.reduce((function(e,t){return e&&t}),!0)}function d(e){return c(e,s,"[Validate format]")}t.exports={validate:function(e,t){var n=u(e),r=d(t);return n&&r},validateFormat:d,validateInput:u,validateLanguage:function(e){return c(e,l,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7)},function(e,t,n){
58 + */e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},,function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,a,o,i,s,l=1,u={},c=!1,d=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){h(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){o.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(a=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){h(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):r=function(e){setTimeout(h,0,e)}:(i="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&h(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(i+t,"*")}),p.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var a={callback:e,args:t};return u[l]=a,r(l),l++},p.clearImmediate=m}function m(e){delete u[e]}function h(e){if(c)setTimeout(h,0,e);else{var t=u[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{m(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(8),n(148))},function(e,t){var n,r,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var l,u=[],c=!1,d=-1;function p(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&m())}function m(){if(!c){var e=s(p);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function f(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||c||s(m)},h.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=f,a.addListener=f,a.once=f,a.off=f,a.removeListener=f,a.removeAllListeners=f,a.emit=f,a.prependListener=f,a.prependOnceListener=f,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,n){var r={"./af":10,"./af.js":10,"./ar":11,"./ar-dz":12,"./ar-dz.js":12,"./ar-kw":13,"./ar-kw.js":13,"./ar-ly":14,"./ar-ly.js":14,"./ar-ma":15,"./ar-ma.js":15,"./ar-sa":16,"./ar-sa.js":16,"./ar-tn":17,"./ar-tn.js":17,"./ar.js":11,"./az":18,"./az.js":18,"./be":19,"./be.js":19,"./bg":20,"./bg.js":20,"./bm":21,"./bm.js":21,"./bn":22,"./bn.js":22,"./bo":23,"./bo.js":23,"./br":24,"./br.js":24,"./bs":25,"./bs.js":25,"./ca":26,"./ca.js":26,"./cs":27,"./cs.js":27,"./cv":28,"./cv.js":28,"./cy":29,"./cy.js":29,"./da":30,"./da.js":30,"./de":31,"./de-at":32,"./de-at.js":32,"./de-ch":33,"./de-ch.js":33,"./de.js":31,"./dv":34,"./dv.js":34,"./el":35,"./el.js":35,"./en-au":36,"./en-au.js":36,"./en-ca":37,"./en-ca.js":37,"./en-gb":38,"./en-gb.js":38,"./en-ie":39,"./en-ie.js":39,"./en-nz":40,"./en-nz.js":40,"./eo":41,"./eo.js":41,"./es":42,"./es-do":43,"./es-do.js":43,"./es-us":44,"./es-us.js":44,"./es.js":42,"./et":45,"./et.js":45,"./eu":46,"./eu.js":46,"./fa":47,"./fa.js":47,"./fi":48,"./fi.js":48,"./fo":49,"./fo.js":49,"./fr":50,"./fr-ca":51,"./fr-ca.js":51,"./fr-ch":52,"./fr-ch.js":52,"./fr.js":50,"./fy":53,"./fy.js":53,"./gd":54,"./gd.js":54,"./gl":55,"./gl.js":55,"./gom-latn":56,"./gom-latn.js":56,"./gu":57,"./gu.js":57,"./he":58,"./he.js":58,"./hi":59,"./hi.js":59,"./hr":60,"./hr.js":60,"./hu":61,"./hu.js":61,"./hy-am":62,"./hy-am.js":62,"./id":63,"./id.js":63,"./is":64,"./is.js":64,"./it":65,"./it.js":65,"./ja":66,"./ja.js":66,"./jv":67,"./jv.js":67,"./ka":68,"./ka.js":68,"./kk":69,"./kk.js":69,"./km":70,"./km.js":70,"./kn":71,"./kn.js":71,"./ko":72,"./ko.js":72,"./ky":73,"./ky.js":73,"./lb":74,"./lb.js":74,"./lo":75,"./lo.js":75,"./lt":76,"./lt.js":76,"./lv":77,"./lv.js":77,"./me":78,"./me.js":78,"./mi":79,"./mi.js":79,"./mk":80,"./mk.js":80,"./ml":81,"./ml.js":81,"./mr":82,"./mr.js":82,"./ms":83,"./ms-my":84,"./ms-my.js":84,"./ms.js":83,"./mt":85,"./mt.js":85,"./my":86,"./my.js":86,"./nb":87,"./nb.js":87,"./ne":88,"./ne.js":88,"./nl":89,"./nl-be":90,"./nl-be.js":90,"./nl.js":89,"./nn":91,"./nn.js":91,"./pa-in":92,"./pa-in.js":92,"./pl":93,"./pl.js":93,"./pt":94,"./pt-br":95,"./pt-br.js":95,"./pt.js":94,"./ro":96,"./ro.js":96,"./ru":97,"./ru.js":97,"./sd":98,"./sd.js":98,"./se":99,"./se.js":99,"./si":100,"./si.js":100,"./sk":101,"./sk.js":101,"./sl":102,"./sl.js":102,"./sq":103,"./sq.js":103,"./sr":104,"./sr-cyrl":105,"./sr-cyrl.js":105,"./sr.js":104,"./ss":106,"./ss.js":106,"./sv":107,"./sv.js":107,"./sw":108,"./sw.js":108,"./ta":109,"./ta.js":109,"./te":110,"./te.js":110,"./tet":111,"./tet.js":111,"./th":112,"./th.js":112,"./tl-ph":113,"./tl-ph.js":113,"./tlh":114,"./tlh.js":114,"./tr":115,"./tr.js":115,"./tzl":116,"./tzl.js":116,"./tzm":117,"./tzm-latn":118,"./tzm-latn.js":118,"./tzm.js":117,"./uk":119,"./uk.js":119,"./ur":120,"./ur.js":120,"./uz":121,"./uz-latn":122,"./uz-latn.js":122,"./uz.js":121,"./vi":123,"./vi.js":123,"./x-pseudo":124,"./x-pseudo.js":124,"./yo":125,"./yo.js":125,"./zh-cn":126,"./zh-cn.js":126,"./zh-hk":127,"./zh-hk.js":127,"./zh-tw":128,"./zh-tw.js":128};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=149},function(e,t,n){e.exports=function e(t,n,r){function a(i,s){if(!n[i]){if(!t[i]){if(o)return o(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[i]={exports:{}};t[i][0].call(u.exports,(function(e){return a(t[i][1][e]||e)}),u,u.exports,e,t,n,r)}return n[i].exports}for(var o=!1,i=0;i<r.length;i++)a(r[i]);return a}({1:[function(e,t,n){!function(e){"use strict";var n,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=Math.ceil,i=Math.floor,s="[BigNumber Error] ",l=s+"Number primitive has more than 15 significant digits: ",u=1e14,c=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,h=1e9;function f(e){var t=0|e;return 0<e||e===t?t:t-1}function _(e){for(var t,n,r=1,a=e.length,o=e[0]+"";r<a;){for(t=e[r++]+"",n=c-t.length;n--;t="0"+t);o+=t}for(a=o.length;48===o.charCodeAt(--a););return o.slice(0,a+1||1)}function y(e,t){var n,r,a=e.c,o=t.c,i=e.s,s=t.s,l=e.e,u=t.e;if(!i||!s)return null;if(n=a&&!a[0],r=o&&!o[0],n||r)return n?r?0:-s:i;if(i!=s)return i;if(n=i<0,r=l==u,!a||!o)return r?0:!a^n?1:-1;if(!r)return u<l^n?1:-1;for(s=(l=a.length)<(u=o.length)?l:u,i=0;i<s;i++)if(a[i]!=o[i])return a[i]>o[i]^n?1:-1;return l==u?0:u<l^n?1:-1}function b(e,t,n,r){if(e<t||n<e||e!==i(e))throw Error(s+(r||"Argument")+("number"==typeof e?e<t||n<e?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function g(e){var t=e.c.length-1;return f(e.e/c)==t&&e.c[t]%2!=0}function v(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function w(e,t,n){var r,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(n=function e(t){var n,M,k,L,Y,T,D,S,O,j,x,E=U.prototype={constructor:U,toString:null,valueOf:null},P=new U(1),C=20,H=4,z=-7,A=21,R=-1e7,N=1e7,F=!1,W=1,I=0,B={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},J="0123456789abcdefghijklmnopqrstuvwxyz";function U(e,t){var n,a,o,s,u,p,m,h,f=this;if(!(f instanceof U))return new U(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>N?f.c=f.e=null:e.e<R?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((p="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,u=e;10<=u;u/=10,s++);return void(N<s?f.c=f.e=null:(f.e=s,f.c=[e]))}h=String(e)}else{if(!r.test(h=String(e)))return k(f,h,p);f.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}-1<(s=h.indexOf("."))&&(h=h.replace(".","")),0<(u=h.search(/e/i))?(s<0&&(s=u),s+=+h.slice(u+1),h=h.substring(0,u)):s<0&&(s=h.length)}else{if(b(t,2,J.length,"Base"),10==t)return X(f=new U(e),C+f.e+1,H);if(h=String(e),p="number"==typeof e){if(0*e!=0)return k(f,h,p,t);if(f.s=1/e<0?(h=h.slice(1),-1):1,U.DEBUG&&15<h.replace(/^0\.0*|\./,"").length)throw Error(l+e)}else f.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(n=J.slice(0,t),s=u=0,m=h.length;u<m;u++)if(n.indexOf(a=h.charAt(u))<0){if("."==a){if(s<u){s=m;continue}}else if(!o&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){o=!0,u=-1,s=0;continue}return k(f,String(e),p,t)}p=!1,-1<(s=(h=M(h,t,10,f.s)).indexOf("."))?h=h.replace(".",""):s=h.length}for(u=0;48===h.charCodeAt(u);u++);for(m=h.length;48===h.charCodeAt(--m););if(h=h.slice(u,++m)){if(m-=u,p&&U.DEBUG&&15<m&&(d<e||e!==i(e)))throw Error(l+f.s*e);if((s=s-u-1)>N)f.c=f.e=null;else if(s<R)f.c=[f.e=0];else{if(f.e=s,f.c=[],u=(s+1)%c,s<0&&(u+=c),u<m){for(u&&f.c.push(+h.slice(0,u)),m-=c;u<m;)f.c.push(+h.slice(u,u+=c));u=c-(h=h.slice(u)).length}else u-=m;for(;u--;h+="0");f.c.push(+h)}}else f.c=[f.e=0]}function G(e,t,n,r){for(var a,o,i=[0],s=0,l=e.length;s<l;){for(o=i.length;o--;i[o]*=t);for(i[0]+=r.indexOf(e.charAt(s++)),a=0;a<i.length;a++)i[a]>n-1&&(null==i[a+1]&&(i[a+1]=0),i[a+1]+=i[a]/n|0,i[a]%=n)}return i.reverse()}function V(e,t,n){var r,a,o,i,s=0,l=e.length,u=t%m,c=t/m|0;for(e=e.slice();l--;)s=((a=u*(o=e[l]%m)+(r=c*o+(i=e[l]/m|0)*u)%m*m+s)/n|0)+(r/m|0)+c*i,e[l]=a%n;return s&&(e=[s].concat(e)),e}function q(e,t,n,r){var a,o;if(n!=r)o=r<n?1:-1;else for(a=o=0;a<n;a++)if(e[a]!=t[a]){o=e[a]>t[a]?1:-1;break}return o}function $(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&1<e.length;e.splice(0,1));}function K(e,t,n,r){var a,o,i,s,l;if(null==n?n=H:b(n,0,8),!e.c)return e.toString();if(a=e.c[0],i=e.e,null==t)l=_(e.c),l=1==r||2==r&&(i<=z||A<=i)?v(l,i):w(l,i,"0");else if(o=(e=X(new U(e),t,n)).e,s=(l=_(e.c)).length,1==r||2==r&&(t<=o||o<=z)){for(;s<t;l+="0",s++);l=v(l,o)}else if(t-=i,l=w(l,o,"0"),s<o+1){if(0<--t)for(l+=".";t--;l+="0");}else if(0<(t+=o-s))for(o+1==s&&(l+=".");t--;l+="0");return e.s<0&&a?"-"+l:l}function Z(e,t){for(var n,r=1,a=new U(e[0]);r<e.length;r++){if(!(n=new U(e[r])).s){a=n;break}t.call(a,n)&&(a=n)}return a}function Q(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];10<=a;a/=10,r++);return(n=r+n*c-1)>N?e.c=e.e=null:n<R?e.c=[e.e=0]:(e.e=n,e.c=t),e}function X(e,t,n,r){var a,s,l,d,m,h,f,_=e.c,y=p;if(_){e:{for(a=1,d=_[0];10<=d;d/=10,a++);if((s=t-a)<0)s+=c,l=t,f=(m=_[h=0])/y[a-l-1]%10|0;else if((h=o((s+1)/c))>=_.length){if(!r)break e;for(;_.length<=h;_.push(0));m=f=0,l=(s%=c)-c+(a=1)}else{for(m=d=_[h],a=1;10<=d;d/=10,a++);f=(l=(s%=c)-c+a)<0?0:m/y[a-l-1]%10|0}if(r=r||t<0||null!=_[h+1]||(l<0?m:m%y[a-l-1]),r=n<4?(f||r)&&(0==n||n==(e.s<0?3:2)):5<f||5==f&&(4==n||r||6==n&&(0<s?0<l?m/y[a-l]:0:_[h-1])%10&1||n==(e.s<0?8:7)),t<1||!_[0])return _.length=0,r?(t-=e.e+1,_[0]=y[(c-t%c)%c],e.e=-t||0):_[0]=e.e=0,e;if(0==s?(_.length=h,d=1,h--):(_.length=h+1,d=y[c-s],_[h]=0<l?i(m/y[a-l]%y[l])*d:0),r)for(;;){if(0==h){for(s=1,l=_[0];10<=l;l/=10,s++);for(l=_[0]+=d,d=1;10<=l;l/=10,d++);s!=d&&(e.e++,_[0]==u&&(_[0]=1));break}if(_[h]+=d,_[h]!=u)break;_[h--]=0,d=1}for(s=_.length;0===_[--s];_.pop());}e.e>N?e.c=e.e=null:e.e<R&&(e.c=[e.e=0])}return e}function ee(e){var t,n=e.e;return null===n?e.toString():(t=_(e.c),t=n<=z||A<=n?v(t,n):w(t,n,"0"),e.s<0?"-"+t:t)}return U.clone=e,U.ROUND_UP=0,U.ROUND_DOWN=1,U.ROUND_CEIL=2,U.ROUND_FLOOR=3,U.ROUND_HALF_UP=4,U.ROUND_HALF_DOWN=5,U.ROUND_HALF_EVEN=6,U.ROUND_HALF_CEIL=7,U.ROUND_HALF_FLOOR=8,U.EUCLID=9,U.config=U.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(s+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(b(n=e[t],0,h,t),C=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(b(n=e[t],0,8,t),H=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(b(n[0],-h,0,t),b(n[1],0,h,t),z=n[0],A=n[1]):(b(n,-h,h,t),z=-(A=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)b(n[0],-h,-1,t),b(n[1],1,h,t),R=n[0],N=n[1];else{if(b(n,-h,h,t),!n)throw Error(s+t+" cannot be zero: "+n);R=-(N=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(s+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw F=!n,Error(s+"crypto unavailable");F=n}else F=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(b(n=e[t],0,9,t),W=n),e.hasOwnProperty(t="POW_PRECISION")&&(b(n=e[t],0,h,t),I=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(s+t+" not an object: "+n);B=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(s+t+" invalid: "+n);J=n}}return{DECIMAL_PLACES:C,ROUNDING_MODE:H,EXPONENTIAL_AT:[z,A],RANGE:[R,N],CRYPTO:F,MODULO_MODE:W,POW_PRECISION:I,FORMAT:B,ALPHABET:J}},U.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!U.DEBUG)return!0;var t,n,r=e.c,a=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&-h<=a&&a<=h&&a===i(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%c)<1&&(t+=c),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||u<=n||n!==i(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===o||1===o||-1===o))return!0;throw Error(s+"Invalid BigNumber: "+e)},U.maximum=U.max=function(){return Z(arguments,E.lt)},U.minimum=U.min=function(){return Z(arguments,E.gt)},U.random=(L=9007199254740992,Y=Math.random()*L&2097151?function(){return i(Math.random()*L)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,l,u=0,d=[],m=new U(P);if(null==e?e=C:b(e,0,h),a=o(e/c),F)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u<a;)9e15<=(l=131072*t[u]+(t[u+1]>>>11))?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(d.push(l%1e14),u+=2);u=a/2}else{if(!crypto.randomBytes)throw F=!1,Error(s+"crypto unavailable");for(t=crypto.randomBytes(a*=7);u<a;)9e15<=(l=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])?crypto.randomBytes(7).copy(t,u):(d.push(l%1e14),u+=7);u=a/7}if(!F)for(;u<a;)(l=Y())<9e15&&(d[u++]=l%1e14);for(a=d[--u],e%=c,a&&e&&(l=p[c-e],d[u]=i(a/l)*l);0===d[u];d.pop(),u--);if(u<0)d=[r=0];else{for(r=-1;0===d[0];d.splice(0,1),r-=c);for(u=1,l=d[0];10<=l;l/=10,u++);u<c&&(r-=c-u)}return m.e=r,m.c=d,m}),U.sum=function(){for(var e=1,t=arguments,n=new U(t[0]);e<t.length;)n=n.plus(t[e++]);return n},T="0123456789",M=function(e,t,r,a,o){var i,s,l,u,c,d,p,m,h=e.indexOf("."),f=C,y=H;for(0<=h&&(u=I,I=0,e=e.replace(".",""),d=(m=new U(t)).pow(e.length-h),I=u,m.c=G(w(_(d.c),d.e,"0"),10,r,T),m.e=m.c.length),l=u=(p=G(e,t,r,o?(i=J,T):(i=T,J))).length;0==p[--u];p.pop());if(!p[0])return i.charAt(0);if(h<0?--l:(d.c=p,d.e=l,d.s=a,p=(d=n(d,m,f,y,r)).c,c=d.r,l=d.e),h=p[s=l+f+1],u=r/2,c=c||s<0||null!=p[s+1],c=y<4?(null!=h||c)&&(0==y||y==(d.s<0?3:2)):u<h||h==u&&(4==y||c||6==y&&1&p[s-1]||y==(d.s<0?8:7)),s<1||!p[0])e=c?w(i.charAt(1),-f,i.charAt(0)):i.charAt(0);else{if(p.length=s,c)for(--r;++p[--s]>r;)p[s]=0,s||(++l,p=[1].concat(p));for(u=p.length;!p[--u];);for(h=0,e="";h<=u;e+=i.charAt(p[h++]));e=w(e,l,i.charAt(0))}return e},n=function(e,t,n,r,a){var o,s,l,d,p,m,h,_,y,b,g,v,w,M,k,L,Y,T=e.s==t.s?1:-1,D=e.c,S=t.c;if(!(D&&D[0]&&S&&S[0]))return new U(e.s&&t.s&&(D?!S||D[0]!=S[0]:S)?D&&0==D[0]||!S?0*T:T/0:NaN);for(y=(_=new U(T)).c=[],T=n+(s=e.e-t.e)+1,a||(a=u,s=f(e.e/c)-f(t.e/c),T=T/c|0),l=0;S[l]==(D[l]||0);l++);if(S[l]>(D[l]||0)&&s--,T<0)y.push(1),d=!0;else{for(M=D.length,L=S.length,T+=2,1<(p=i(a/(S[l=0]+1)))&&(S=V(S,p,a),D=V(D,p,a),L=S.length,M=D.length),w=L,g=(b=D.slice(0,L)).length;g<L;b[g++]=0);Y=S.slice(),Y=[0].concat(Y),k=S[0],S[1]>=a/2&&k++;do{if(p=0,(o=q(S,b,L,g))<0){if(v=b[0],L!=g&&(v=v*a+(b[1]||0)),1<(p=i(v/k)))for(a<=p&&(p=a-1),h=(m=V(S,p,a)).length,g=b.length;1==q(m,b,h,g);)p--,$(m,L<h?Y:S,h,a),h=m.length,o=1;else 0==p&&(o=p=1),h=(m=S.slice()).length;if(h<g&&(m=[0].concat(m)),$(b,m,g,a),g=b.length,-1==o)for(;q(S,b,L,g)<1;)p++,$(b,L<g?Y:S,g,a),g=b.length}else 0===o&&(p++,b=[0]);y[l++]=p,b[0]?b[g++]=D[w]||0:(b=[D[w]],g=1)}while((w++<M||null!=b[0])&&T--);d=null!=b[0],y[0]||y.splice(0,1)}if(a==u){for(l=1,T=y[0];10<=T;T/=10,l++);X(_,n+(_.e=l+s*c-1)+1,r,d)}else _.e=s,_.r=+d;return _},D=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,O=/^\.([^.]+)$/,j=/^-?(Infinity|NaN)$/,x=/^\s*\+(?=[\w.])|^\s+|\s+$/g,k=function(e,t,n,r){var a,o=n?t:t.replace(x,"");if(j.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!n&&(o=o.replace(D,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,o=o.replace(S,"$1").replace(O,"0.$1")),t!=o))return new U(o,a);if(U.DEBUG)throw Error(s+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},E.absoluteValue=E.abs=function(){var e=new U(this);return e.s<0&&(e.s=1),e},E.comparedTo=function(e,t){return y(this,new U(e,t))},E.decimalPlaces=E.dp=function(e,t){var n,r,a;if(null!=e)return b(e,0,h),null==t?t=H:b(t,0,8),X(new U(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((a=n.length-1)-f(this.e/c))*c,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},E.dividedBy=E.div=function(e,t){return n(this,new U(e,t),C,H)},E.dividedToIntegerBy=E.idiv=function(e,t){return n(this,new U(e,t),0,1)},E.exponentiatedBy=E.pow=function(e,t){var n,r,a,l,u,d,p,m,h=this;if((e=new U(e)).c&&!e.isInteger())throw Error(s+"Exponent not an integer: "+ee(e));if(null!=t&&(t=new U(t)),u=14<e.e,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return m=new U(Math.pow(+ee(h),u?2-g(e):+ee(e))),t?m.mod(t):m;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new U(NaN);(r=!d&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(9<e.e&&(0<h.e||h.e<-1||(0==h.e?1<h.c[0]||u&&24e7<=h.c[1]:h.c[0]<8e13||u&&h.c[0]<=9999975e7)))return l=h.s<0&&g(e)?-0:0,-1<h.e&&(l=1/l),new U(d?1/l:l);I&&(l=o(I/c+2))}for(p=u?(n=new U(.5),d&&(e.s=1),g(e)):(a=Math.abs(+ee(e)))%2,m=new U(P);;){if(p){if(!(m=m.times(h)).c)break;l?m.c.length>l&&(m.c.length=l):r&&(m=m.mod(t))}if(a){if(0===(a=i(a/2)))break;p=a%2}else if(X(e=e.times(n),e.e+1,1),14<e.e)p=g(e);else{if(0==(a=+ee(e)))break;p=a%2}h=h.times(h),l?h.c&&h.c.length>l&&(h.c.length=l):r&&(h=h.mod(t))}return r?m:(d&&(m=P.div(m)),t?m.mod(t):l?X(m,I,H,void 0):m)},E.integerValue=function(e){var t=new U(this);return null==e?e=H:b(e,0,8),X(t,t.e+1,e)},E.isEqualTo=E.eq=function(e,t){return 0===y(this,new U(e,t))},E.isFinite=function(){return!!this.c},E.isGreaterThan=E.gt=function(e,t){return 0<y(this,new U(e,t))},E.isGreaterThanOrEqualTo=E.gte=function(e,t){return 1===(t=y(this,new U(e,t)))||0===t},E.isInteger=function(){return!!this.c&&f(this.e/c)>this.c.length-2},E.isLessThan=E.lt=function(e,t){return y(this,new U(e,t))<0},E.isLessThanOrEqualTo=E.lte=function(e,t){return-1===(t=y(this,new U(e,t)))||0===t},E.isNaN=function(){return!this.s},E.isNegative=function(){return this.s<0},E.isPositive=function(){return 0<this.s},E.isZero=function(){return!!this.c&&0==this.c[0]},E.minus=function(e,t){var n,r,a,o,i=this,s=i.s;if(t=(e=new U(e,t)).s,!s||!t)return new U(NaN);if(s!=t)return e.s=-t,i.plus(e);var l=i.e/c,d=e.e/c,p=i.c,m=e.c;if(!l||!d){if(!p||!m)return p?(e.s=-t,e):new U(m?i:NaN);if(!p[0]||!m[0])return m[0]?(e.s=-t,e):new U(p[0]?i:3==H?-0:0)}if(l=f(l),d=f(d),p=p.slice(),s=l-d){for((a=(o=s<0)?(s=-s,p):(d=l,m)).reverse(),t=s;t--;a.push(0));a.reverse()}else for(r=(o=(s=p.length)<(t=m.length))?s:t,s=t=0;t<r;t++)if(p[t]!=m[t]){o=p[t]<m[t];break}if(o&&(a=p,p=m,m=a,e.s=-e.s),0<(t=(r=m.length)-(n=p.length)))for(;t--;p[n++]=0);for(t=u-1;s<r;){if(p[--r]<m[r]){for(n=r;n&&!p[--n];p[n]=t);--p[n],p[r]+=u}p[r]-=m[r]}for(;0==p[0];p.splice(0,1),--d);return p[0]?Q(e,p,d):(e.s=3==H?-1:1,e.c=[e.e=0],e)},E.modulo=E.mod=function(e,t){var r,a,o=this;return e=new U(e,t),!o.c||!e.s||e.c&&!e.c[0]?new U(NaN):!e.c||o.c&&!o.c[0]?new U(o):(9==W?(a=e.s,e.s=1,r=n(o,e,0,3),e.s=a,r.s*=a):r=n(o,e,0,W),(e=o.minus(r.times(e))).c[0]||1!=W||(e.s=o.s),e)},E.multipliedBy=E.times=function(e,t){var n,r,a,o,i,s,l,d,p,h,_,y,b,g,v,w=this,M=w.c,k=(e=new U(e,t)).c;if(!(M&&k&&M[0]&&k[0]))return!w.s||!e.s||M&&!M[0]&&!k||k&&!k[0]&&!M?e.c=e.e=e.s=null:(e.s*=w.s,M&&k?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=f(w.e/c)+f(e.e/c),e.s*=w.s,(l=M.length)<(h=k.length)&&(b=M,M=k,k=b,a=l,l=h,h=a),a=l+h,b=[];a--;b.push(0));for(g=u,v=m,a=h;0<=--a;){for(n=0,_=k[a]%v,y=k[a]/v|0,o=a+(i=l);a<o;)n=((d=_*(d=M[--i]%v)+(s=y*d+(p=M[i]/v|0)*_)%v*v+b[o]+n)/g|0)+(s/v|0)+y*p,b[o--]=d%g;b[o]=n}return n?++r:b.splice(0,1),Q(e,b,r)},E.negated=function(){var e=new U(this);return e.s=-e.s||null,e},E.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new U(e,t)).s,!a||!t)return new U(NaN);if(a!=t)return e.s=-t,r.minus(e);var o=r.e/c,i=e.e/c,s=r.c,l=e.c;if(!o||!i){if(!s||!l)return new U(a/0);if(!s[0]||!l[0])return l[0]?e:new U(s[0]?r:0*a)}if(o=f(o),i=f(i),s=s.slice(),a=o-i){for((n=0<a?(i=o,l):(a=-a,s)).reverse();a--;n.push(0));n.reverse()}for((a=s.length)-(t=l.length)<0&&(n=l,l=s,s=n,t=a),a=0;t;)a=(s[--t]=s[t]+l[t]+a)/u|0,s[t]=u===s[t]?0:s[t]%u;return a&&(s=[a].concat(s),++i),Q(e,s,i)},E.precision=E.sd=function(e,t){var n,r,a;if(null!=e&&e!==!!e)return b(e,1,h),null==t?t=H:b(t,0,8),X(new U(this),e,t);if(!(n=this.c))return null;if(r=(a=n.length-1)*c+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];10<=a;a/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},E.shiftedBy=function(e){return b(e,-d,d),this.times("1e"+e)},E.squareRoot=E.sqrt=function(){var e,t,r,a,o,i=this,s=i.c,l=i.s,u=i.e,c=C+4,d=new U("0.5");if(1!==l||!s||!s[0])return new U(!l||l<0&&(!s||s[0])?NaN:s?i:1/0);if((r=0==(l=Math.sqrt(+ee(i)))||l==1/0?(((t=_(s)).length+u)%2==0&&(t+="0"),l=Math.sqrt(+t),u=f((u+1)/2)-(u<0||u%2),new U(t=l==1/0?"1e"+u:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+u)):new U(l+"")).c[0])for((l=(u=r.e)+c)<3&&(l=0);;)if(o=r,r=d.times(o.plus(n(i,o,c,1))),_(o.c).slice(0,l)===(t=_(r.c)).slice(0,l)){if(r.e<u&&--l,"9999"!=(t=t.slice(l-3,l+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(X(r,r.e+C+2,1),e=!r.times(r).eq(i));break}if(!a&&(X(o,o.e+C+2,0),o.times(o).eq(i))){r=o;break}c+=4,l+=4,a=1}return X(r,r.e+C+1,H,e)},E.toExponential=function(e,t){return null!=e&&(b(e,0,h),e++),K(this,e,t,1)},E.toFixed=function(e,t){return null!=e&&(b(e,0,h),e=e+this.e+1),K(this,e,t)},E.toFormat=function(e,t,n){var r;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=B;else if("object"!=typeof n)throw Error(s+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var a,o=r.split("."),i=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",c=o[0],d=o[1],p=this.s<0,m=p?c.slice(1):c,h=m.length;if(l&&(a=i,i=l,h-=l=a),0<i&&0<h){for(a=h%i||i,c=m.substr(0,a);a<h;a+=i)c+=u+m.substr(a,i);0<l&&(c+=u+m.slice(a)),p&&(c="-"+c)}r=d?c+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):c}return(n.prefix||"")+r+(n.suffix||"")},E.toFraction=function(e){var t,r,a,o,i,l,u,d,m,h,f,y,b=this,g=b.c;if(null!=e&&(!(u=new U(e)).isInteger()&&(u.c||1!==u.s)||u.lt(P)))throw Error(s+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+ee(u));if(!g)return new U(b);for(t=new U(P),m=r=new U(P),a=d=new U(P),y=_(g),i=t.e=y.length-b.e-1,t.c[0]=p[(l=i%c)<0?c+l:l],e=!e||0<u.comparedTo(t)?0<i?t:m:u,l=N,N=1/0,u=new U(y),d.c[0]=0;h=n(u,t,0,1),1!=(o=r.plus(h.times(a))).comparedTo(e);)r=a,a=o,m=d.plus(h.times(o=m)),d=o,t=u.minus(h.times(o=t)),u=o;return o=n(e.minus(r),a,0,1),d=d.plus(o.times(m)),r=r.plus(o.times(a)),d.s=m.s=b.s,f=n(m,a,i*=2,H).minus(b).abs().comparedTo(n(d,r,i,H).minus(b).abs())<1?[m,a]:[d,r],N=l,f},E.toNumber=function(){return+ee(this)},E.toPrecision=function(e,t){return null!=e&&b(e,1,h),K(this,e,t,2)},E.toString=function(e){var t,n=this,r=n.s,a=n.e;return null===a?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(t=null==e?a<=z||A<=a?v(_(n.c),a):w(_(n.c),a,"0"):10===e?w(_((n=X(new U(n),C+a+1,H)).c),n.e,"0"):(b(e,2,J.length,"Base"),M(w(_(n.c),a,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},E.valueOf=E.toJSON=function(){return ee(this)},E._isBigNumber=!0,a&&(E[Symbol.toStringTag]="BigNumber",E[Symbol.for("nodejs.util.inspect.custom")]=E.valueOf),null!=t&&U.set(t),U}()).default=n.BigNumber=n,void 0!==t&&t.exports?t.exports=n:(e=e||("undefined"!=typeof self&&self?self:window)).BigNumber=n}(this)},{}],2:[function(e,t,n){"use strict";t.exports={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}},{}],3:[function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,a=!1,o=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw o}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var a=e("./globalState"),o=e("./validating"),i=e("./parsing"),s=e("bignumber.js"),l={trillion:Math.pow(10,12),billion:Math.pow(10,9),million:Math.pow(10,6),thousand:Math.pow(10,3)},u={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},c=a.currentBytes(),d=c.binarySuffixes,p=c.decimalSuffixes,m={general:{scale:1024,suffixes:p,marker:"bd"},binary:{scale:1024,suffixes:d,marker:"b"},decimal:{scale:1e3,suffixes:p,marker:"d"}};function h(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length?arguments[2]:void 0;if("string"==typeof t&&(t=i.parseFormat(t)),!o.validateFormat(t))return"ERROR: invalid format";var r=t.prefix||"",s=t.postfix||"",l=function(e,t,n){switch(t.output){case"currency":return function(e,t,n){var r=n.currentCurrency(),a=Object.assign({},t),o=Object.assign({},u,a),i=void 0,s="",l=!!o.totalLength||!!o.forceAverage||o.average,c=a.currencyPosition||r.position,d=a.currencySymbol||r.symbol,p=void 0!==o.spaceSeparatedCurrency?o.spaceSeparatedCurrency:o.spaceSeparated;void 0===a.lowPrecision&&(a.lowPrecision=!1),p&&(s=" "),"infix"===c&&(i=s+d+s);var m=b({instance:e,providedFormat:a,state:n,decimalSeparator:i});return"prefix"===c&&(m=e._value<0&&"sign"===o.negative?"-".concat(s).concat(d).concat(m.slice(1)):0<e._value&&o.forceSign?"+".concat(s).concat(d).concat(m.slice(1)):d+s+m),c&&"postfix"!==c||(m=m+(s=!o.spaceSeparatedAbbreviation&&l?"":s)+d),m}(e,t=g(t,a.currentCurrencyDefaultFormat()),a);case"percent":return function(e,t,n,r){var a=t.prefixSymbol,o=b({instance:r(100*e._value),providedFormat:t,state:n}),i=Object.assign({},u,t);return a?"%".concat(i.spaceSeparated?" ":"").concat(o):"".concat(o).concat(i.spaceSeparated?" ":"","%")}(e,t=g(t,a.currentPercentageDefaultFormat()),a,n);case"byte":return function(e,t,n,r){var a=t.base||"binary",o=Object.assign({},u,t),i=n.currentBytes(),s=i.binarySuffixes,l=i.decimalSuffixes,c={general:{scale:1024,suffixes:l||p,marker:"bd"},binary:{scale:1024,suffixes:s||d,marker:"b"},decimal:{scale:1e3,suffixes:l||p,marker:"d"}}[a],m=f(e._value,c.suffixes,c.scale),h=m.value,_=m.suffix,y=b({instance:r(h),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()});return"".concat(y).concat(o.spaceSeparated?" ":"").concat(_)}(e,t=g(t,a.currentByteDefaultFormat()),a,n);case"time":return t=g(t,a.currentTimeDefaultFormat()),function(e){var t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return"".concat(t,":").concat(n<10?"0":"").concat(n,":").concat(r<10?"0":"").concat(r)}(e);case"ordinal":return function(e,t,n){var r=n.currentOrdinal(),a=Object.assign({},u,t),o=b({instance:e,providedFormat:t,state:n}),i=r(e._value);return"".concat(o).concat(a.spaceSeparated?" ":"").concat(i)}(e,t=g(t,a.currentOrdinalDefaultFormat()),a);case"number":default:return b({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return(l=r+l)+s}function f(e,t,n){var r=t[0],a=Math.abs(e);if(n<=a){for(var o=1;o<t.length;++o){var i=Math.pow(n,o),s=Math.pow(n,o+1);if(i<=a&&a<s){r=t[o],e/=i;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function _(e){for(var t="",n=0;n<e;n++)t+="0";return t}function y(e,t,n){var a=2<arguments.length&&void 0!==n?n:Math.round;return-1!==e.toString().indexOf("e")?function(e,t){var n=e.toString(),a=r(n.split("e"),2),o=a[0],i=a[1],s=r(o.split("."),2),l=s[0],u=s[1],c=void 0===u?"":u;if(0<+i)n=l+c+_(i-c.length);else{var d=".";d=+l<0?"-0".concat(d):"0".concat(d);var p=(_(-i-1)+Math.abs(l)+c).substr(0,t);p.length<t&&(p+=_(t-p.length)),n=d+p}return 0<+i&&0<t&&(n+=".".concat(_(t))),n}(e,t):new s(a(+"".concat(e,"e+").concat(t))/Math.pow(10,t)).toFixed(t)}function b(e){var t=e.instance,n=e.providedFormat,o=e.state,i=void 0===o?a:o,s=e.decimalSeparator,c=e.defaults,d=void 0===c?i.currentDefaults():c,p=t._value;if(0===p&&i.hasZeroFormat())return i.getZeroFormat();if(!isFinite(p))return p.toString();var m,h,f,_,b,g,v,w,M=Object.assign({},u,d,n),k=M.totalLength,L=k?0:M.characteristic,Y=M.optionalCharacteristic,T=M.forceAverage,D=M.lowPrecision,S=!!k||!!T||M.average,O=k?-1:S&&void 0===n.mantissa?0:M.mantissa,j=!k&&(void 0===n.optionalMantissa?-1===O:M.optionalMantissa),x=M.trimMantissa,E=M.thousandSeparated,P=M.spaceSeparated,C=M.negative,H=M.forceSign,z=M.exponential,A=M.roundingFunction,R="";if(S){var N=function(e){var t=e.value,n=e.forceAverage,r=e.lowPrecision,a=void 0===r||r,o=e.abbreviations,i=e.spaceSeparated,s=void 0!==i&&i,u=e.totalLength,c=void 0===u?0:u,d=e.roundingFunction,p=void 0===d?Math.round:d,m="",h=Math.abs(t),f=-1;if(n&&o[n]&&l[n]?(m=o[n],t/=l[n]):h>=l.trillion||a&&1===p(h/l.trillion)?(m=o.trillion,t/=l.trillion):h<l.trillion&&h>=l.billion||a&&1===p(h/l.billion)?(m=o.billion,t/=l.billion):h<l.billion&&h>=l.million||a&&1===p(h/l.million)?(m=o.million,t/=l.million):(h<l.million&&h>=l.thousand||a&&1===p(h/l.thousand))&&(m=o.thousand,t/=l.thousand),m=m&&(s?" ":"")+m,c){var _=t<0,y=t.toString().split(".")[0],b=_?y.length-1:y.length;f=Math.max(c-b,0)}return{value:t,abbreviation:m,mantissaPrecision:f}}({value:p,forceAverage:T,lowPrecision:D,abbreviations:i.currentAbbreviations(),spaceSeparated:P,roundingFunction:A,totalLength:k});p=N.value,R+=N.abbreviation,k&&(O=N.mantissaPrecision)}if(z){var F=(h=(m={value:p,characteristicPrecision:L}).value,_=void 0===(f=m.characteristicPrecision)?0:f,g=(b=r(h.toExponential().split("e"),2))[0],v=b[1],w=+g,_&&1<_&&(w*=Math.pow(10,_-1),v=0<=(v-=_-1)?"+".concat(v):v),{value:w,abbreviation:"e".concat(v)});p=F.value,R=F.abbreviation+R}var W,I,B,J=function(e,t,n,a,o,i){if(-1===a)return e;var s=y(t,a,i),l=r(s.toString().split("."),2),u=l[0],c=l[1],d=void 0===c?"":c;if(d.match(/^0+$/)&&(n||o))return u;var p=d.match(/0+$/);return o&&p?"".concat(u,".").concat(d.toString().slice(0,p.index)):s.toString()}(p.toString(),p,j,O,x,A);return J=function(e,t,n,r,a){var o=r.currentDelimiters(),i=o.thousands;a=a||o.decimal;var s=o.thousandsSize||3,l=e.toString(),u=l.split(".")[0],c=l.split(".")[1],d=t<0&&0===u.indexOf("-");return n&&(d&&(u=u.slice(1)),function(e,t){for(var n=[],r=0,a=e;0<a;a--)r===t&&(n.unshift(a),r=0),r++;return n}(u.length,s).forEach((function(e,t){u=u.slice(0,e+t)+i+u.slice(e+t)})),d&&(u="-".concat(u))),c?u+a+c:u}(J=function(e,t,n,a){var o=e,i=r(o.toString().split("."),2),s=i[0],l=i[1];if(s.match(/^-?0$/)&&n)return l?"".concat(s.replace("0",""),".").concat(l):s.replace("0","");var u=t<0&&0===s.indexOf("-");if(u&&(s=s.slice(1),o=o.slice(1)),s.length<a)for(var c=a-s.length,d=0;d<c;d++)o="0".concat(o);return u&&(o="-".concat(o)),o.toString()}(J,p,Y,L),p,E,i,s),(S||z)&&(J+=R),(H||p<0)&&(W=J,B=C,J=0===(I=p)?W:0==+W?W.replace("-",""):0<I?"+".concat(W):"sign"===B?W:"(".concat(W.replace("-",""),")")),J}function g(e,t){if(!e)return t;var n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}t.exports=function(e){return{format:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return h.apply(void 0,n.concat([e]))},getByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=m.general;return f(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getBinaryByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=m.binary;return f(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getDecimalByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=m.decimal;return f(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},formatOrDefault:g}}},{"./globalState":4,"./parsing":8,"./validating":10,"bignumber.js":1}],4:[function(e,t,n){"use strict";var r=e("./en-US"),a=e("./validating"),o=e("./parsing"),i={},s=void 0,l={},u=null,c={};function d(e){s=e}function p(){return l[s]}i.languages=function(){return Object.assign({},l)},i.currentLanguage=function(){return s},i.currentBytes=function(){return p().bytes||{}},i.currentCurrency=function(){return p().currency},i.currentAbbreviations=function(){return p().abbreviations},i.currentDelimiters=function(){return p().delimiters},i.currentOrdinal=function(){return p().ordinal},i.currentDefaults=function(){return Object.assign({},p().defaults,c)},i.currentOrdinalDefaultFormat=function(){return Object.assign({},i.currentDefaults(),p().ordinalFormat)},i.currentByteDefaultFormat=function(){return Object.assign({},i.currentDefaults(),p().byteFormat)},i.currentPercentageDefaultFormat=function(){return Object.assign({},i.currentDefaults(),p().percentageFormat)},i.currentCurrencyDefaultFormat=function(){return Object.assign({},i.currentDefaults(),p().currencyFormat)},i.currentTimeDefaultFormat=function(){return Object.assign({},i.currentDefaults(),p().timeFormat)},i.setDefaults=function(e){e=o.parseFormat(e),a.validateFormat(e)&&(c=e)},i.getZeroFormat=function(){return u},i.setZeroFormat=function(e){return u="string"==typeof e?e:null},i.hasZeroFormat=function(){return null!==u},i.languageData=function(e){if(e){if(l[e])return l[e];throw new Error('Unknown tag "'.concat(e,'"'))}return p()},i.registerLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!a.validateLanguage(e))throw new Error("Invalid language data");l[e.languageTag]=e,t&&d(e.languageTag)},i.setLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r.languageTag;if(!l[e]){var n=e.split("-")[0],a=Object.keys(l).find((function(e){return e.split("-")[0]===n}));return l[a]?void d(a):void d(t)}d(e)},i.registerLanguage(r),s=r.languageTag,t.exports=i},{"./en-US":2,"./parsing":8,"./validating":10}],5:[function(e,t,n){"use strict";t.exports=function(t){return{loadLanguagesInNode:function(n){return r=t,void n.forEach((function(t){var n=void 0;try{n=e("../languages/".concat(t))}catch(n){console.error('Unable to load "'.concat(t,'". No matching language file found.'))}n&&r.registerLanguage(n)}));var r}}}},{}],6:[function(e,t,n){"use strict";var r=e("bignumber.js");function a(e,t,n){var a=new r(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new r(o),e._value=a.minus(o).toNumber(),e}t.exports=function(e){return{add:function(t,n){return o=n,i=e,s=new r((a=t)._value),l=o,i.isNumbro(o)&&(l=o._value),l=new r(l),a._value=s.plus(l).toNumber(),a;var a,o,i,s,l},subtract:function(t,n){return a(t,n,e)},multiply:function(t,n){return o=n,i=e,s=new r((a=t)._value),l=o,i.isNumbro(o)&&(l=o._value),l=new r(l),a._value=s.times(l).toNumber(),a;var a,o,i,s,l},divide:function(t,n){return o=n,i=e,s=new r((a=t)._value),l=o,i.isNumbro(o)&&(l=o._value),l=new r(l),a._value=s.dividedBy(l).toNumber(),a;var a,o,i,s,l},set:function(t,n){return r=t,o=a=n,e.isNumbro(a)&&(o=a._value),r._value=o,r;var r,a,o},difference:function(t,n){return r=n,a(i=(o=e)(t._value),r,o),Math.abs(i._value);var r,o,i},BigNumber:r}}},{"bignumber.js":1}],7:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=e("./globalState"),o=e("./validating"),i=e("./loading")(m),s=e("./unformatting"),l=e("./formatting")(m),u=e("./manipulating")(m),c=e("./parsing"),d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._value=t}var t,n;return t=e,(n=[{key:"clone",value:function(){return m(this._value)}},{key:"format",value:function(e){var t=0<arguments.length&&void 0!==e?e:{};return l.format(this,t)}},{key:"formatCurrency",value:function(e){return"string"==typeof e&&(e=c.parseFormat(e)),(e=l.formatOrDefault(e,a.currentCurrencyDefaultFormat())).output="currency",l.format(this,e)}},{key:"formatTime",value:function(e){var t=0<arguments.length&&void 0!==e?e:{};return t.output="time",l.format(this,t)}},{key:"binaryByteUnits",value:function(){return l.getBinaryByteUnit(this)}},{key:"decimalByteUnits",value:function(){return l.getDecimalByteUnit(this)}},{key:"byteUnits",value:function(){return l.getByteUnit(this)}},{key:"difference",value:function(e){return u.difference(this,e)}},{key:"add",value:function(e){return u.add(this,e)}},{key:"subtract",value:function(e){return u.subtract(this,e)}},{key:"multiply",value:function(e){return u.multiply(this,e)}},{key:"divide",value:function(e){return u.divide(this,e)}},{key:"set",value:function(e){return u.set(this,p(e))}},{key:"value",value:function(){return this._value}},{key:"valueOf",value:function(){return this._value}}])&&r(t.prototype,n),e}();function p(e){var t=e;return m.isNumbro(e)?t=e._value:"string"==typeof e?t=m.unformat(e):isNaN(e)&&(t=NaN),t}function m(e){return new d(p(e))}m.version="2.3.6",m.isNumbro=function(e){return e instanceof d},m.language=a.currentLanguage,m.registerLanguage=a.registerLanguage,m.setLanguage=a.setLanguage,m.languages=a.languages,m.languageData=a.languageData,m.zeroFormat=a.setZeroFormat,m.defaultFormat=a.currentDefaults,m.setDefaults=a.setDefaults,m.defaultCurrencyFormat=a.currentCurrencyDefaultFormat,m.validate=o.validate,m.loadLanguagesInNode=i.loadLanguagesInNode,m.unformat=s.unformat,m.BigNumber=u.BigNumber,t.exports=m},{"./formatting":3,"./globalState":4,"./loading":5,"./manipulating":6,"./parsing":8,"./unformatting":9,"./validating":10}],8:[function(e,t,n){"use strict";t.exports={parseFormat:function(e){var t,n,r,a,o,i,s,l,u,c,d,p,m,h,f,_,y,b,g,v,w,M,k=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(n=k,o=k,function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",t.base="general"):-1!==e.indexOf("b")?(t.output="byte",t.base="binary"):-1!==e.indexOf("d")?(t.output="byte",t.base="decimal"):-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time";t.output="percent"}else t.output="currency"}(e=(i=(a=e=(r=(t=e).match(/^{([^}]*)}/))?(n.prefix=r[1],t.slice(r[0].length)):t).match(/{([^}]*)}$/))?(o.postfix=i[1],a.slice(0,-i[0].length)):a,k),s=k,(l=e.match(/[1-9]+[0-9]*/))&&(s.totalLength=+l[0]),u=k,(c=e.split(".")[0].match(/0+/))&&(u.characteristic=c[0].length),function(e,t){if(-1!==e.indexOf(".")){var n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,k),d=k,-1!==e.indexOf("a")&&(d.average=!0),m=k,-1!==(p=e).indexOf("K")?m.forceAverage="thousand":-1!==p.indexOf("M")?m.forceAverage="million":-1!==p.indexOf("B")?m.forceAverage="billion":-1!==p.indexOf("T")&&(m.forceAverage="trillion"),function(e,t){var n=e.split(".")[1];if(n){var r=n.match(/0+/);r&&(t.mantissa=r[0].length)}}(e,k),f=k,(h=e).match(/\[\.]/)?f.optionalMantissa=!0:h.match(/\./)&&(f.optionalMantissa=!1),_=k,(y=e.split(".")[1])&&(_.trimMantissa=-1!==y.indexOf("[")),b=k,-1!==e.indexOf(",")&&(b.thousandSeparated=!0),g=k,-1!==e.indexOf(" ")&&(g.spaceSeparated=!0,g.spaceSeparatedCurrency=!0,(g.average||g.forceAverage)&&(g.spaceSeparatedAbbreviation=!0)),w=k,(v=e).match(/^\+?\([^)]*\)$/)&&(w.negative="parenthesis"),v.match(/^\+?-/)&&(w.negative="sign"),M=k,e.match(/^\+/)&&(M.forceSign=!0),k)}}},{}],9:[function(e,t,n){"use strict";var r=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function a(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}t.exports={unformat:function(t,n){var o,i,s,l=e("./globalState"),u=l.currentDelimiters(),c=l.currentCurrency().symbol,d=l.currentOrdinal(),p=l.getZeroFormat(),m=l.currentAbbreviations(),h=void 0;if("string"==typeof t)h=function(e,t){if(e.indexOf(":")&&":"!==t.thousands){var n=e.split(":");if(3===n.length){var r=+n[0],a=+n[1],o=+n[2];return!isNaN(r)&&!isNaN(a)&&!isNaN(o)}}}(t,u)?(i=+(o=t.split(":"))[0],s=+o[1],+o[2]+60*s+3600*i):function(e,t,n,o,i,s,l){var u=2<arguments.length&&void 0!==n?n:"",c=3<arguments.length?o:void 0,d=4<arguments.length?i:void 0,p=5<arguments.length?s:void 0,m=6<arguments.length?l:void 0;if(""!==e)return e===d?0:function e(t,n,o,i,s,l,u){var c=2<arguments.length&&void 0!==o?o:"",d=3<arguments.length?i:void 0,p=4<arguments.length?s:void 0,m=5<arguments.length?l:void 0,h=6<arguments.length?u:void 0;if(!isNaN(+t))return+t;var f="",_=t.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(_!==t)return-1*e(_,n,c,d,p,m,h);for(var y=0;y<r.length;y++){var b=r[y];if((f=t.replace(RegExp("([0-9 ])(".concat(b.key,")$")),"$1"))!==t)return e(f,n,c,d,p,m,h)*b.factor}if((f=t.replace("%",""))!==t)return e(f,n,c,d,p,m,h)/100;var g=parseFloat(t);if(!isNaN(g)){var v=d(g);if(v&&"."!==v&&(f=t.replace(new RegExp("".concat(a(v),"$")),""))!==t)return e(f,n,c,d,p,m,h);var w={};Object.keys(m).forEach((function(e){w[m[e]]=e}));for(var M=Object.keys(w).sort().reverse(),k=M.length,L=0;L<k;L++){var Y=M[L],T=w[Y];if((f=t.replace(Y,""))!==t){var D=void 0;switch(T){case"thousand":D=Math.pow(10,3);break;case"million":D=Math.pow(10,6);break;case"billion":D=Math.pow(10,9);break;case"trillion":D=Math.pow(10,12)}return e(f,n,c,d,p,m,h)*D}}}}(function(e,t,n){var r=2<arguments.length&&void 0!==n?n:"",o=e.replace(r,"");return(o=o.replace(new RegExp("([0-9])".concat(a(t.thousands),"([0-9])"),"g"),"$1$2")).replace(t.decimal,".")}(e,t,u),t,u,c,d,p,m)}(t,u,c,d,p,m,n);else{if("number"!=typeof t)return;h=t}if(void 0!==h)return h}}},{"./globalState":4}],10:[function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=e("./unformatting"),i=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,s={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:function(e,t){return"byte"===t.output},message:"`base` must be provided only when the output is `byte`",mandatory:function(e){return"byte"===e.output}},characteristic:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",lowPrecision:{type:"boolean",restriction:function(e,t){return!0===t.average},message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:function(e){return 0<=e},message:"value must be positive"},{restriction:function(e,t){return!t.exponential},message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:function(e,t){return"percent"===t.output},message:"`prefixSymbol` can be provided only when the output is `percent`"}},l={languageTag:{type:"string",mandatory:!0,restriction:function(e){return e.match(i)},message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function u(e){return void 0!==o.unformat(e)}function c(e,t,n,o){var i=3<arguments.length&&void 0!==o&&o,l=Object.keys(e).map((function(r){if(!t[r])return console.error("".concat(n," Invalid key: ").concat(r)),!1;var o=e[r],i=t[r];if("string"==typeof i&&(i={type:i}),"format"===i.type){if(!c(o,s,"[Validate ".concat(r,"]"),!0))return!1}else if(a(o)!==i.type)return console.error("".concat(n," ").concat(r,' type mismatched: "').concat(i.type,'" expected, "').concat(a(o),'" provided')),!1;if(i.restrictions&&i.restrictions.length)for(var l=i.restrictions.length,u=0;u<l;u++){var d=i.restrictions[u],p=d.restriction,m=d.message;if(!p(o,e))return console.error("".concat(n," ").concat(r," invalid value: ").concat(m)),!1}return i.restriction&&!i.restriction(o,e)?(console.error("".concat(n," ").concat(r," invalid value: ").concat(i.message)),!1):i.validValues&&-1===i.validValues.indexOf(o)?(console.error("".concat(n," ").concat(r," invalid value: must be among ").concat(JSON.stringify(i.validValues),', "').concat(o,'" provided')),!1):!(i.children&&!c(o,i.children,"[Validate ".concat(r,"]")))}));return i||l.push.apply(l,r(Object.keys(t).map((function(r){var a=t[r];if("string"==typeof a&&(a={type:a}),a.mandatory){var o=a.mandatory;if("function"==typeof o&&(o=o(e)),o&&void 0===e[r])return console.error("".concat(n,' Missing mandatory key "').concat(r,'"')),!1}return!0})))),l.reduce((function(e,t){return e&&t}),!0)}function d(e){return c(e,s,"[Validate format]")}t.exports={validate:function(e,t){var n=u(e),r=d(t);return n&&r},validateFormat:d,validateInput:u,validateLanguage:function(e){return c(e,l,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7)},function(e,t,n){
59 59 /*!
60 60 * Pikaday
61 61 *
62 62 * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
63 63 */
64 -!function(t,r){"use strict";var a;try{a=n(0)}catch(e){}e.exports=function(e){var t="function"==typeof e,n=!!window.addEventListener,r=window.document,a=window.setTimeout,o=function(e,t,r,a){n?e.addEventListener(t,r,!!a):e.attachEvent("on"+t,r)},i=function(e,t,r,a){n?e.removeEventListener(t,r,!!a):e.detachEvent("on"+t,r)},s=function(e,t,n){var a;r.createEvent?((a=r.createEvent("HTMLEvents")).initEvent(t,!0,!1),a=_(a,n),e.dispatchEvent(a)):r.createEventObject&&(a=r.createEventObject(),a=_(a,n),e.fireEvent("on"+t,a))},l=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},u=function(e){return/Array/.test(Object.prototype.toString.call(e))},c=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},d=function(e){var t=e.getDay();return 0===t||6===t},p=function(e){return e%4==0&&e%100!=0||e%400==0},m=function(e,t){return[31,p(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},h=function(e){c(e)&&e.setHours(0,0,0,0)},f=function(e,t){return e.getTime()===t.getTime()},_=function(e,t,n){var r,a;for(r in t)(a=void 0!==e[r])&&"object"==typeof t[r]&&null!==t[r]&&void 0===t[r].nodeName?c(t[r])?n&&(e[r]=new Date(t[r].getTime())):u(t[r])?n&&(e[r]=t[r].slice(0)):e[r]=_({},t[r],n):!n&&a||(e[r]=t[r]);return e},y=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},b={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},v=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},g=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},w=function(e,t){return"<tr>"+(t?e.reverse():e).join("")+"</tr>"},M=function(e,t,n,r,a,o){var i,s,l,c,d,p=e._o,m=n===p.minYear,h=n===p.maxYear,f='<div id="'+o+'" class="pika-title" role="heading" aria-live="assertive">',_=!0,y=!0;for(l=[],i=0;i<12;i++)l.push('<option value="'+(n===a?i-t:12+i-t)+'"'+(i===r?' selected="selected"':"")+(m&&i<p.minMonth||h&&i>p.maxMonth?'disabled="disabled"':"")+">"+p.i18n.months[i]+"</option>");for(c='<div class="pika-label">'+p.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",u(p.yearRange)?(i=p.yearRange[0],s=p.yearRange[1]+1):(i=n-p.yearRange,s=1+n+p.yearRange),l=[];i<s&&i<=p.maxYear;i++)i>=p.minYear&&l.push('<option value="'+i+'"'+(i===n?' selected="selected"':"")+">"+i+"</option>");return d='<div class="pika-label">'+n+p.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",p.showMonthAfterYear?f+=d+c:f+=c+d,m&&(0===r||p.minMonth>=r)&&(_=!1),h&&(11===r||p.maxMonth<=r)&&(y=!1),0===t&&(f+='<button class="pika-prev'+(_?"":" is-disabled")+'" type="button">'+p.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(f+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+p.i18n.nextMonth+"</button>"),f+"</div>"},k=function(i){var s=this,u=s.config(i);s._onMouseDown=function(e){if(s._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(l(t,"is-disabled")||(!l(t,"pika-button")||l(t,"is-empty")||l(t.parentNode,"is-disabled")?l(t,"pika-prev")?s.prevMonth():l(t,"pika-next")&&s.nextMonth():(s.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),u.bound&&a((function(){s.hide(),u.field&&u.field.blur()}),100))),l(t,"pika-select"))s._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},s._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(l(t,"pika-select-month")?s.gotoMonth(t.value):l(t,"pika-select-year")&&s.gotoYear(t.value))},s._onKeyChange=function(e){if(e=e||window.event,s.isVisible())switch(e.keyCode){case 13:case 27:u.field.blur();break;case 37:e.preventDefault(),s.adjustDate("subtract",1);break;case 38:s.adjustDate("subtract",7);break;case 39:s.adjustDate("add",1);break;case 40:s.adjustDate("add",7)}},s._onInputChange=function(n){var r;n.firedBy!==s&&(r=t?(r=e(u.field.value,u.format,u.formatStrict))&&r.isValid()?r.toDate():null:new Date(Date.parse(u.field.value)),c(r)&&s.setDate(r),s._v||s.show())},s._onInputFocus=function(){s.show()},s._onInputClick=function(){s.show()},s._onInputBlur=function(){var e=r.activeElement;do{if(l(e,"pika-single"))return}while(e=e.parentNode);s._c||(s._b=a((function(){s.hide()}),50)),s._c=!1},s._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,r=t;if(t){!n&&l(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),o(t,"change",s._onChange)));do{if(l(r,"pika-single")||r===u.trigger)return}while(r=r.parentNode);s._v&&t!==u.trigger&&r!==u.trigger&&s.hide()}},s.el=r.createElement("div"),s.el.className="pika-single"+(u.isRTL?" is-rtl":"")+(u.theme?" "+u.theme:""),o(s.el,"mousedown",s._onMouseDown,!0),o(s.el,"touchend",s._onMouseDown,!0),o(s.el,"change",s._onChange),o(r,"keydown",s._onKeyChange),u.field&&(u.container?u.container.appendChild(s.el):u.bound?r.body.appendChild(s.el):u.field.parentNode.insertBefore(s.el,u.field.nextSibling),o(u.field,"change",s._onInputChange),u.defaultDate||(t&&u.field.value?u.defaultDate=e(u.field.value,u.format).toDate():u.defaultDate=new Date(Date.parse(u.field.value)),u.setDefaultDate=!0));var d=u.defaultDate;c(d)?u.setDefaultDate?s.setDate(d,!0):s.gotoDate(d):s.gotoDate(new Date),u.bound?(this.hide(),s.el.className+=" is-bound",o(u.trigger,"click",s._onInputClick),o(u.trigger,"focus",s._onInputFocus),o(u.trigger,"blur",s._onInputBlur)):this.show()};return k.prototype={config:function(e){this._o||(this._o=_({},b,!0));var t=_(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,c(t.minDate)||(t.minDate=!1),c(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),u(t.yearRange)){var r=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||r,t.yearRange[1]=parseInt(t.yearRange[1],10)||r}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||b.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(n){return c(this._d)?t?e(this._d).format(n||this._o.format):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,r){t&&e.isMoment(n)&&this.setDate(n.toDate(),r)},getDate:function(){return c(this._d)?new Date(this._d.getTime()):new Date},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",s(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),c(e)){var n=this._o.minDate,r=this._o.maxDate;c(n)&&e<n?e=n:c(r)&&e>r&&(e=r),this._d=new Date(e.getTime()),h(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),s(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(c(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),a=e.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),t=a<n.getTime()||r.getTime()<a}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(n,r){var a,o=this.getDate(),i=24*parseInt(r)*60*60*1e3;"add"===n?a=new Date(o.valueOf()+i):"subtract"===n&&(a=new Date(o.valueOf()-i)),t&&("add"===n?a=e(o).add(r,"days").toDate():"subtract"===n&&(a=e(o).subtract(r,"days").toDate())),this.setDate(a)},adjustCalendars:function(){this.calendars[0]=y(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=y({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(h(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=b.minDate,this._o.minYear=b.minYear,this._o.minMonth=b.minMonth,this._o.startRange=b.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(h(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=b.maxDate,this._o.maxYear=b.maxYear,this._o.maxMonth=b.maxMonth,this._o.endRange=b.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(this._v||e){var t,n=this._o,r=n.minYear,o=n.maxYear,i=n.minMonth,s=n.maxMonth,l="";this._y<=r&&(this._y=r,!isNaN(i)&&this._m<i&&(this._m=i)),this._y>=o&&(this._y=o,!isNaN(s)&&this._m>s&&(this._m=s)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var u=0;u<n.numberOfMonths;u++)l+='<div class="pika-lendar">'+M(this,u,this.calendars[u].year,this.calendars[u].month,this.calendars[0].year,t)+this.render(this.calendars[u].year,this.calendars[u].month,t)+"</div>";this.el.innerHTML=l,n.bound&&"hidden"!==n.field.type&&a((function(){n.trigger.focus()}),1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label","Use the arrow keys to pick a date")}},adjustPosition:function(){var e,t,n,a,o,i,s,l,u,c;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,n=this.el.offsetWidth,a=this.el.offsetHeight,o=window.innerWidth||r.documentElement.clientWidth,i=window.innerHeight||r.documentElement.clientHeight,s=window.pageYOffset||r.body.scrollTop||r.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)l=(c=e.getBoundingClientRect()).left+window.pageXOffset,u=c.bottom+window.pageYOffset;else for(l=t.offsetLeft,u=t.offsetTop+t.offsetHeight;t=t.offsetParent;)l+=t.offsetLeft,u+=t.offsetTop;(this._o.reposition&&l+n>o||this._o.position.indexOf("right")>-1&&l-n+e.offsetWidth>0)&&(l=l-n+e.offsetWidth),(this._o.reposition&&u+a>i+s||this._o.position.indexOf("top")>-1&&u-a-e.offsetHeight>0)&&(u=u-a-e.offsetHeight),this.el.style.left=l+"px",this.el.style.top=u+"px"}},render:function(e,t,n){var r=this._o,a=new Date,o=m(e,t),i=new Date(e,t,1).getDay(),s=[],l=[];h(a),r.firstDay>0&&(i-=r.firstDay)<0&&(i+=7);for(var u,p,_,y,b=0===t?11:t-1,M=11===t?0:t+1,k=0===t?e-1:e,L=11===t?e+1:e,Y=m(k,b),T=o+i,S=T;S>7;)S-=7;T+=7-S;for(var D=0,O=0;D<T;D++){var j=new Date(e,t,D-i+1),x=!!c(this._d)&&f(j,this._d),E=f(j,a),P=D<i||D>=o+i,C=D-i+1,H=t,z=e,A=r.startRange&&f(r.startRange,j),R=r.endRange&&f(r.endRange,j),N=r.startRange&&r.endRange&&r.startRange<j&&j<r.endRange;P&&(D<i?(C=Y+C,H=b,z=k):(C-=o,H=M,z=L));var F={day:C,month:H,year:z,isSelected:x,isToday:E,isDisabled:r.minDate&&j<r.minDate||r.maxDate&&j>r.maxDate||r.disableWeekends&&d(j)||r.disableDayFn&&r.disableDayFn(j),isEmpty:P,isStartRange:A,isEndRange:R,isInRange:N,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};l.push(g(F)),7==++O&&(r.showWeekNumber&&l.unshift((u=D-i,p=t,_=e,y=void 0,void 0,y=new Date(_,0,1),'<td class="pika-week">'+Math.ceil(((new Date(_,p,u)-y)/864e5+y.getDay()+1)/7)+"</td>")),s.push(w(l,r.isRTL)),l=[],O=0)}return function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+function(e){var t,n=[];e.showWeekNumber&&n.push("<th></th>");for(t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+v(e,t)+'">'+v(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"}(e)+(r=t,"<tbody>"+r.join("")+"</tbody></table>");var r}(r,s,n)},isVisible:function(){return this._v},show:function(){var e,t,n;this.isVisible()||(e=this.el,t="is-hidden",e.className=(n=(" "+e.className+" ").replace(" "+t+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,""),this._v=!0,this.draw(),this._o.bound&&(o(r,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e,t,n=this._v;!1!==n&&(this._o.bound&&i(r,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",e=this.el,l(e,t="is-hidden")||(e.className=""===e.className?t:e.className+" "+t),this._v=!1,void 0!==n&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),i(this.el,"mousedown",this._onMouseDown,!0),i(this.el,"touchend",this._onMouseDown,!0),i(this.el,"change",this._onChange),this._o.field&&(i(this._o.field,"change",this._onInputChange),this._o.bound&&(i(this._o.trigger,"click",this._onInputClick),i(this._o.trigger,"focus",this._onInputFocus),i(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},k}(a)}()},,function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(1),a=n.n(r),o=n(129),i=n.n(o),s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function l(e,t){function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function c(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?a(e.value):new n((function(t){t(e.value)})).then(i,s)}l((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,r=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var p={graph_id:null,legend_toggle:!1,graphID:null,options:{colors:null},data:null,rows:null,columns:null,diffdata:null,chartEvents:null,legendToggle:!1,chartActions:null,getChartWrapper:function(e,t){},getChartEditor:null,className:"",style:{},formatters:null,spreadSheetUrl:null,spreadSheetQueryParameters:{headers:1,gid:1},rootProps:{},chartWrapperParams:{},controls:null,render:null,toolbarItems:null,toolbarID:null},m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleGoogleChartsLoaderScriptLoaded=function(e){var n=t.props,r=n.chartVersion,a=n.chartPackages,o=n.chartLanguage,i=n.mapsApiKey,s=n.onLoad;e.charts.load(r||"current",{packages:a||["corechart","controls"],language:o||"en",mapsApiKey:i}),e.charts.setOnLoadCallback((function(){s(e)}))},t}return l(t,e),t.prototype.shouldComponentUpdate=function(e){return e.chartPackages===this.props.chartPackages},t.prototype.render=function(){var e=this,t=this.props.onError;return Object(r.createElement)(i.a,{url:"https://www.gstatic.com/charts/loader.js",onError:t,onLoad:function(){var t=window;t.google&&e.handleGoogleChartsLoaderScriptLoaded(t.google)}})},t}(r.Component),h=0,f=function(){return"reactgooglegraph-"+(h+=1)},_=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#3B3EAC"],y=function(e,t,n){return void 0===n&&(n={}),c(void 0,void 0,void 0,(function(){return d(this,(function(r){return[2,new Promise((function(r,a){var o=n.headers?"headers="+n.headers:"headers=0",i=n.query?"&tq="+encodeURIComponent(n.query):"",s=n.gid?"&gid="+n.gid:"",l=n.sheet?"&sheet="+n.sheet:"",u=n.access_token?"&access_token="+n.access_token:"",c=t+"/gviz/tq?"+(""+o+s+l+i+u);new e.visualization.Query(c).send((function(e){e.isError()?a("Error in query: "+e.getMessage()+" "+e.getDetailedMessage()):r(e.getDataTable())}))}))]}))}))},b=Object(r.createContext)(p),v=b.Provider,g=b.Consumer,w=function(e){var t=e.children,n=e.value;return Object(r.createElement)(v,{value:n},t)},M=function(e){var t=e.render;return Object(r.createElement)(g,null,(function(e){return t(e)}))},k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={hiddenColumns:[]},t.listenToLegendToggle=function(){var e=t.props,n=e.google,r=e.googleChartWrapper;n.visualization.events.addListener(r,"select",(function(){var e=r.getChart().getSelection(),n=r.getDataTable();if(0!==e.length&&null===e[0].row&&null!==n){var a=e[0].column,o=t.getColumnID(n,a);t.state.hiddenColumns.includes(o)?t.setState((function(e){return u({},e,{hiddenColumns:e.hiddenColumns.filter((function(e){return e!==o})).slice()})})):t.setState((function(e){return u({},e,{hiddenColumns:e.hiddenColumns.concat([o])})}))}}))},t.applyFormatters=function(e,n){for(var r=t.props.google,a=0,o=n;a<o.length;a++){var i=o[a];switch(i.type){case"ArrowFormat":(s=new r.visualization.ArrowFormat(i.options)).format(e,i.column);break;case"BarFormat":(s=new r.visualization.BarFormat(i.options)).format(e,i.column);break;case"ColorFormat":for(var s=new r.visualization.ColorFormat(i.options),l=0,u=i.ranges;l<u.length;l++){var c=u[l];s.addRange.apply(s,c)}s.format(e,i.column);break;case"DateFormat":(s=new r.visualization.DateFormat(i.options)).format(e,i.column);break;case"NumberFormat":(s=new r.visualization.NumberFormat(i.options)).format(e,i.column);break;case"PatternFormat":(s=new r.visualization.PatternFormat(i.options)).format(e,i.column)}}},t.getColumnID=function(e,t){return e.getColumnId(t)||e.getColumnLabel(t)},t.draw=function(e){var n=e.data,r=e.diffdata,a=e.rows,o=e.columns,i=e.options,s=e.legend_toggle,l=e.legendToggle,u=e.chartType,p=e.formatters,m=e.spreadSheetUrl,h=e.spreadSheetQueryParameters;return c(t,void 0,void 0,(function(){var e,t,c,f,_,b,v,g,w,M,k,L,Y,T;return d(this,(function(d){switch(d.label){case 0:return e=this.props,t=e.google,c=e.googleChartWrapper,_=null,null!==r&&(b=t.visualization.arrayToDataTable(r.old),v=t.visualization.arrayToDataTable(r.new),_=t.visualization[u].prototype.computeDiff(b,v)),null===n?[3,1]:(f=Array.isArray(n)?t.visualization.arrayToDataTable(n):new t.visualization.DataTable(n),[3,5]);case 1:return null===a||null===o?[3,2]:(f=t.visualization.arrayToDataTable([o].concat(a)),[3,5]);case 2:return null===m?[3,4]:[4,y(t,m,h)];case 3:return f=d.sent(),[3,5];case 4:f=t.visualization.arrayToDataTable([]),d.label=5;case 5:for(g=f.getNumberOfColumns(),w=0;w<g;w+=1)M=this.getColumnID(f,w),this.state.hiddenColumns.includes(M)&&(k=f.getColumnLabel(w),L=f.getColumnId(w),Y=f.getColumnType(w),f.removeColumn(w),f.addColumn({label:k,id:L,type:Y}));return T=c.getChart(),"Timeline"===c.getChartType()&&T&&T.clearChart(),c.setChartType(u),c.setOptions(i),c.setDataTable(f),c.draw(),null!==this.props.googleChartDashboard&&this.props.googleChartDashboard.draw(f),null!==_&&(c.setDataTable(_),c.draw()),null!==p&&(this.applyFormatters(f,p),c.setDataTable(f),c.draw()),!0!==l&&!0!==s||this.grayOutHiddenColumns({options:i}),[2]}}))}))},t.grayOutHiddenColumns=function(e){var n=e.options,r=t.props.googleChartWrapper,a=r.getDataTable();if(null!==a){var o=a.getNumberOfColumns();if(!1!==t.state.hiddenColumns.length>0){var i=Array.from({length:o-1}).map((function(e,r){var o=t.getColumnID(a,r+1);return t.state.hiddenColumns.includes(o)?"#CCCCCC":void 0!==n.colors&&null!==n.colors?n.colors[r]:_[r]}));r.setOptions(u({},n,{colors:i})),r.draw()}}},t.onResize=function(){t.props.googleChartWrapper.draw()},t}return l(t,e),t.prototype.componentDidMount=function(){this.draw(this.props),window.addEventListener("resize",this.onResize),(this.props.legend_toggle||this.props.legendToggle)&&this.listenToLegendToggle()},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.google,n=e.googleChartWrapper;window.removeEventListener("resize",this.onResize),t.visualization.events.removeAllListeners(n),"Timeline"===n.getChartType()&&n.getChart()&&n.getChart().clearChart()},t.prototype.componentDidUpdate=function(){this.draw(this.props)},t.prototype.render=function(){return null},t}(r.Component),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.componentDidMount=function(){},t.prototype.componentWillUnmount=function(){},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){var e=this.props,t=e.google,n=e.googleChartWrapper,a=e.googleChartDashboard;return Object(r.createElement)(M,{render:function(e){return Object(r.createElement)(k,u({},e,{google:t,googleChartWrapper:n,googleChartDashboard:a}))}})},t}(r.Component),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.listenToEvents=function(e){var t=this,n=e.chartEvents,r=e.google,a=e.googleChartWrapper;if(null!==n){r.visualization.events.removeAllListeners(a);for(var o=function(e){var n=e.eventName,o=e.callback;r.visualization.events.addListener(a,n,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];o({chartWrapper:a,props:t.props,google:r,eventArgs:e})}))},i=0,s=n;i<s.length;i++){o(s[i])}}},t.prototype.render=function(){var e=this,t=this.props,n=t.google,a=t.googleChartWrapper;return Object(r.createElement)(M,{render:function(t){return e.listenToEvents({chartEvents:t.chartEvents||null,google:n,googleChartWrapper:a}),null}})},t}(r.Component),T=0,S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={googleChartWrapper:null,googleChartDashboard:null,googleChartControls:null,googleChartEditor:null,isReady:!1},t.graphID=null,t.dashboard_ref=Object(r.createRef)(),t.toolbar_ref=Object(r.createRef)(),t.getGraphID=function(){var e,n=t.props,r=n.graphID,a=n.graph_id;return e=null===r&&null===a?null===t.graphID?f():t.graphID:null!==r&&null===a?r:null!==a&&null===r?a:r,t.graphID=e,t.graphID},t.getControlID=function(e,t){return T+=1,void 0===e?"googlechart-control-"+t+"-"+T:e},t.addControls=function(e,n){var r=t.props,a=r.google,o=r.controls,i=null===o?null:o.map((function(e,n){var r=e.controlID,o=e.controlType,i=e.options,s=e.controlWrapperParams,l=t.getControlID(r,n);return{controlProp:e,control:new a.visualization.ControlWrapper(u({containerId:l,controlType:o,options:i},s))}}));if(null===i)return null;n.bind(i.map((function(e){return e.control})),e);for(var s=function(n){for(var r=n.control,o=n.controlProp.controlEvents,i=function(n){var o=n.callback,i=n.eventName;a.visualization.events.removeListener(r,i,o),a.visualization.events.addListener(r,i,(function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];o({chartWrapper:e,controlWrapper:r,props:t.props,google:a,eventArgs:n})}))},s=0,l=void 0===o?[]:o;s<l.length;s++){i(l[s])}},l=0,c=i;l<c.length;l++){s(c[l])}return i},t.renderChart=function(){var e=t.props,n=e.width,a=e.height,o=e.options,i=e.style,s=e.className,l=e.rootProps,c=e.google,d=u({height:a||o&&o.height,width:n||o&&o.width},i);return Object(r.createElement)("div",u({id:t.getGraphID(),style:d,className:s},l),t.state.isReady&&null!==t.state.googleChartWrapper?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(L,{googleChartWrapper:t.state.googleChartWrapper,google:c,googleChartDashboard:t.state.googleChartDashboard}),Object(r.createElement)(Y,{googleChartWrapper:t.state.googleChartWrapper,google:c})):null)},t.renderControl=function(e){return void 0===e&&(e=function(e){e.control,e.controlProp;return!0}),t.state.isReady&&null!==t.state.googleChartControls?Object(r.createElement)(r.Fragment,null,t.state.googleChartControls.filter((function(t){var n=t.controlProp,r=t.control;return e({control:r,controlProp:n})})).map((function(e){var t=e.control;e.controlProp;return Object(r.createElement)("div",{key:t.getContainerId(),id:t.getContainerId()})}))):null},t.renderToolBar=function(){return null===t.props.toolbarItems?null:Object(r.createElement)("div",{ref:t.toolbar_ref})},t}return l(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.options,n=e.google,r=e.chartType,a=e.chartWrapperParams,o=e.toolbarItems,i=e.getChartEditor,s=e.getChartWrapper,l=u({chartType:r,options:t,containerId:this.getGraphID()},a),c=new n.visualization.ChartWrapper(l);c.setOptions(t),s(c,n);var d=new n.visualization.Dashboard(this.dashboard_ref),p=this.addControls(c,d);null!==o&&n.visualization.drawToolbar(this.toolbar_ref.current,o);var m=null;null!==i&&i({chartEditor:m=new n.visualization.ChartEditor,chartWrapper:c,google:n}),this.setState({googleChartEditor:m,googleChartControls:p,googleChartDashboard:d,googleChartWrapper:c,isReady:!0})},t.prototype.componentDidUpdate=function(){if(null!==this.state.googleChartWrapper&&null!==this.state.googleChartDashboard&&null!==this.state.googleChartControls)for(var e=this.props.controls,t=0;t<e.length;t+=1){var n=e[t],r=n.controlType,a=n.options,o=n.controlWrapperParams;o&&"state"in o&&this.state.googleChartControls[t].control.setState(o.state),this.state.googleChartControls[t].control.setOptions(a),this.state.googleChartControls[t].control.setControlType(r)}},t.prototype.shouldComponentUpdate=function(e,t){return this.state.isReady!==t.isReady||e.controls!==this.props.controls},t.prototype.render=function(){var e=this.props,t=e.width,n=e.height,a=e.options,o=e.style,i=u({height:n||a&&a.height,width:t||a&&a.width},o);return null!==this.props.render?Object(r.createElement)("div",{ref:this.dashboard_ref,style:i},Object(r.createElement)("div",{ref:this.toolbar_ref,id:"toolbar"}),this.props.render({renderChart:this.renderChart,renderControl:this.renderControl,renderToolbar:this.renderToolBar})):Object(r.createElement)("div",{ref:this.dashboard_ref,style:i},this.renderControl((function(e){return"bottom"!==e.controlProp.controlPosition})),this.renderChart(),this.renderControl((function(e){return"bottom"===e.controlProp.controlPosition})),this.renderToolBar())},t}(r.Component),D=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._isMounted=!1,t.state={loadingStatus:"loading",google:null},t.onLoad=function(e){if(t.isFullyLoaded(e))t.onSuccess(e);else var n=setInterval((function(){var e=window.google;t._isMounted?e&&t.isFullyLoaded(e)&&(clearInterval(n),t.onSuccess(e)):clearInterval(n)}),1e3)},t.onSuccess=function(e){t.setState({loadingStatus:"ready",google:e})},t.onError=function(){t.setState({loadingStatus:"errored"})},t}return l(t,e),t.prototype.render=function(){var e=this.props,t=e.chartLanguage,n=e.chartPackages,a=e.chartVersion,o=e.mapsApiKey,i=e.loader,s=e.errorElement;return Object(r.createElement)(w,{value:this.props},"ready"===this.state.loadingStatus&&null!==this.state.google?Object(r.createElement)(S,u({},this.props,{google:this.state.google})):"errored"===this.state.loadingStatus&&s?s:i,Object(r.createElement)(m,u({},{chartLanguage:t,chartPackages:n,chartVersion:a,mapsApiKey:o},{onLoad:this.onLoad,onError:this.onError})))},t.prototype.componentDidMount=function(){this._isMounted=!0},t.prototype.componentWillUnmount=function(){this._isMounted=!1},t.prototype.isFullyLoaded=function(e){var t=this.props,n=t.controls,r=t.toolbarItems,a=t.getChartEditor;return e&&e.visualization&&e.visualization.ChartWrapper&&e.visualization.Dashboard&&(!n||e.visualization.ChartWrapper)&&(!a||e.visualization.ChartEditor)&&(!r||e.visualization.drawToolbar)},t.defaultProps=p,t}(r.Component),O=n(130),j=n.n(O);function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===x(o)?o:String(o)),r)}var a,o}function C(e,t){return(C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function H(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=R(e);if(t){var a=R(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return z(this,n)}}function z(e,t){if(t&&("object"===x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R(e){return(R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var N=wp.element,F=N.Component,W=N.Fragment,I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(o,e);var t,n,r,a=H(o);function o(){var e;return E(this,o),(e=a.apply(this,arguments)).initDataTable=e.initDataTable.bind(A(e)),e.dataRenderer=e.dataRenderer.bind(A(e)),e.table,e.uniqueId=j()(),e}return t=o,(n=[{key:"componentDidMount",value:function(){this.initDataTable(this.props.columns,this.props.rows)}},{key:"componentWillUnmount",value:function(){this.table.destroy()}},{key:"componentDidUpdate",value:function(e){this.props!==e&&(this.props.options.responsive_bool!==e.options.responsive_bool&&"true"===e.options.responsive_bool&&document.getElementById("dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)).classList.remove("collapsed"),this.table.destroy(),document.getElementById("dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)).innerHTML="",this.initDataTable(this.props.columns,this.props.rows))}},{key:"initDataTable",value:function(e,t){var n=this,r=this.props.options,a=e.map((function(e,t){var r=e.type;switch(e.type){case"number":r="num";break;case"date":case"datetime":case"timeofday":r="date"}return{title:e.label,data:e.label,type:r,render:n.dataRenderer(r,t)}})),o=t.map((function(e){var t={};return a.forEach((function(n,r){var a=e[r];void 0===a&&(a=e[n.data]),t[n.data]=a})),t}));this.table=jQuery("#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)).DataTable({destroy:!0,data:o,columns:a,paging:"true"===r.paging_bool,pageLength:r.pageLength_int||10,pagingType:r.pagingType,ordering:"false"!==r.ordering_bool,fixedHeader:"true"===r.fixedHeader_bool,scrollCollapse:!(!this.props.chartsScreen&&"true"!==r.scrollCollapse_bool),scrollY:(this.props.chartsScreen?180:"true"===r.scrollCollapse_bool&&Number(r.scrollY_int))||!1,responsive:!(!this.props.chartsScreen&&"true"!==r.responsive_bool),searching:!1,select:!1,lengthChange:!1,bFilter:!1,bInfo:!1})}},{key:"dataRenderer",value:function(e,t){var n,r=this.props.options,a=null;if(void 0===r.series||void 0===r.series[t]||void 0===r.series[t].format)return a;switch(e){case"date":case"datetime":case"timeofday":a=r.series[t].format&&r.series[t].format.from&&r.series[t].format.to?jQuery.fn.dataTable.render.moment(r.series[t].format.from,r.series[t].format.to):jQuery.fn.dataTable.render.moment("MM-DD-YYYY");break;case"num":var o=["","","","",""];r.series[t].format.thousands&&(o[0]=r.series[t].format.thousands),r.series[t].format.decimal&&(o[1]=r.series[t].format.decimal),r.series[t].format.precision&&0<parseInt(r.series[t].format.precision)&&(o[2]=r.series[t].format.precision),r.series[t].format.prefix&&(o[3]=r.series[t].format.prefix),r.series[t].format.suffix&&(o[4]=r.series[t].format.suffix),a=(n=jQuery.fn.dataTable.render).number.apply(n,o);break;case"boolean":jQuery.fn.dataTable.render.extra=function(e,n,a){return!0!==e&&"true"!==e||""===r.series[t].format.truthy?!1!==e&&"false"!==e||""===r.series[t].format.falsy?e:r.series[t].format.falsy.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""):r.series[t].format.truthy.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"")},a=jQuery.fn.dataTable.render.extra}return a}},{key:"render",value:function(){var e=this.props.options;return wp.element.createElement(W,null,e.customcss&&wp.element.createElement("style",null,e.customcss.oddTableRow&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr.odd {\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow.color?"color: ".concat(e.customcss.oddTableRow.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow["background-color"]?"background-color: ".concat(e.customcss.oddTableRow["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow.transform?"transform: rotate( ".concat(e.customcss.oddTableRow.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}"),e.customcss.evenTableRow&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr.even {\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow.color?"color: ".concat(e.customcss.evenTableRow.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow["background-color"]?"background-color: ".concat(e.customcss.evenTableRow["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow.transform?"transform: rotate( ".concat(e.customcss.evenTableRow.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}"),e.customcss.tableCell&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr td,\n\t\t\t\t\t\t\t#dataTable-instances-").concat(this.props.id,"-").concat(this.uniqueId,"_wrapper tr th {\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell.color?"color: ".concat(e.customcss.tableCell.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell["background-color"]?"background-color: ".concat(e.customcss.tableCell["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell.transform?"transform: rotate( ".concat(e.customcss.tableCell.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}")),wp.element.createElement("table",{id:"dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)}))}}])&&P(t.prototype,n),r&&P(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(F),B=n(4),J=n.n(B),U=n(131),G=n.n(U),V=function(e){return Object.keys(e["visualizer-series"]).map((function(t){void 0!==e["visualizer-series"][t].type&&"date"===e["visualizer-series"][t].type&&Object.keys(e["visualizer-data"]).map((function(n){return e["visualizer-data"][n][t]=new Date(e["visualizer-data"][n][t])}))})),e},q=function(e){var t;if(Array.isArray(e))return 0<e.length;if(J()(e)){for(t in e)return!0;return!1}return"string"==typeof e?0<e.length:null!=e},$=function(e){return G()(e,q)},K=function(e){return e.width="",e.height="",e.backgroundColor={},e.chartArea={},$(e)},Z=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},Q=function(e,t){return!0===e[t]||"true"===e[t]||"1"===e[t]||1===e[t]},X=function(e){switch(e["visualizer-chart-library"]){case"GoogleCharts":return ee(e)}},ee=function(e){var t=e["visualizer-settings"],n=e["visualizer-chart-type"],r=e["visualizer-series"],a=[];if(t.series)switch(n){case"tabular":for(var o in t.series)if(r[(o=parseInt(o))+1]&&t.series[o].format&&""!==t.series[o].format){var i=o+1,s=te(r[o+1].type);s&&a.push({type:s,options:{pattern:t.series[o].format},column:i})}break;default:for(var l=0;l<t.series.length;l++)if(r[l+1]&&void 0!==t.series[l]&&t.series[l].format&&""!==t.series[l].format){var u=l+1,c=te(r[l+1].type);c&&a.push({type:c,options:{pattern:t.series[l].format},column:u})}}else"pie"===n&&t.format&&""!==t.format&&a.push({type:te("number"),options:{pattern:t.format},column:1});if(t.hAxis&&r[0]){var d=te(r[0].type);d&&a.push({type:d,options:{pattern:t.hAxis.format},column:0})}return a},te=function(e){switch(e){case"number":return"NumberFormat";case"date":case"datetime":case"timeofday":return"DateFormat"}return null},ne=function(e){if(-1===e.indexOf("#")){var t=e.match(/\((.*)\)/).pop();if(t)return getComputedStyle(document.body).getPropertyValue(t)}return e};function re(e){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ae(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ae=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),s=new Y(a||[]);return r(i,"_invoke",{value:w(e,n,s)}),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function p(){}function m(){}function h(){}var f={};l(f,o,(function(){return this}));var _=Object.getPrototypeOf,y=_&&_(_(T([])));y&&y!==t&&n.call(y,o)&&(f=y);var b=h.prototype=p.prototype=Object.create(f);function v(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,s){var l=c(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==re(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=M(i,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function M(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var a=c(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return m.prototype=h,r(b,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:m,configurable:!0}),m.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},v(g.prototype),l(g.prototype,i,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new g(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(b),l(b,s,"Generator"),l(b,o,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=T,Y.prototype={constructor:Y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;L(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function oe(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function ie(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){oe(o,r,a,i,s,"next",e)}function s(e){oe(o,r,a,i,s,"throw",e)}i(void 0)}))}}function se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==re(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==re(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===re(o)?o:String(o)),r)}var a,o}function ue(e,t){return(ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=me(e);if(t){var a=me(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return de(this,n)}}function de(e,t){if(t&&("object"===re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pe(e)}function pe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var he=lodash.startCase,fe=wp.i18n.__,_e=wp.apiFetch,ye=wp.element,be=ye.Component,ve=ye.Fragment,ge=wp.components,we=ge.Button,Me=ge.Dashicon,ke=ge.ExternalLink,Le=ge.Notice,Ye=ge.Placeholder,Te=ge.Spinner,Se=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ue(e,t)}(s,e);var t,n,r,a,o,i=ce(s);function s(){var e;return se(this,s),(e=i.apply(this,arguments)).loadMoreCharts=e.loadMoreCharts.bind(pe(e)),e.state={charts:null,isBusy:!1,chartsLoaded:!1,perPage:visualizerLocalize.chartsPerPage},e}return t=s,(n=[{key:"componentDidMount",value:(o=ie(ae().mark((function e(){var t,n;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=visualizerLocalize.chartsPerPage,e.next=3,_e({path:"wp/v2/visualizer/?per_page="+t+"&meta_key=visualizer-chart-library&meta_value=ChartJS"});case 3:n=e.sent,this.setState({charts:n});case 5:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"loadMoreCharts",value:(a=ie(ae().mark((function e(){var t,n,r,a;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.state.charts.length,n=this.state.chartsLoaded,r=this.state.perPage,this.setState({isBusy:!0}),e.next=6,_e({path:"wp/v2/visualizer/?per_page=".concat(r,"&meta_key=visualizer-chart-library&meta_value=ChartJS&offset=").concat(t)});case 6:a=e.sent,r>a.length&&(n=!0),this.setState({charts:this.state.charts.concat(a),isBusy:!1,chartsLoaded:n});case 9:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"render",value:function(){var e=this,t="undefined"!=typeof google?google.visualization.Version:"current",n=this.state,r=n.charts,a=n.isBusy,o=n.chartsLoaded,i=n.perPage;return wp.element.createElement("div",{className:"visualizer-settings__charts"},wp.element.createElement(Le,{status:"warning",isDismissible:!1},fe("ChartJS charts are currently not available for selection here, you must visit the library, get the shortcode, and add the chart here in a shortcode tag."),wp.element.createElement(ke,{href:visualizerLocalize.adminPage},fe("Click here to visit Visualizer Charts Library."))),null!==r?1<=r.length?wp.element.createElement(ve,null,wp.element.createElement("div",{className:"visualizer-settings__charts-grid"},Object.keys(r).map((function(n){var a,o,i,s=V(r[n].chart_data);if(a=s["visualizer-settings"].title?s["visualizer-settings"].title:"#".concat(r[n].id),0<=["gauge","tabular","timeline"].indexOf(s["visualizer-chart-type"])?"DataTable"===s["visualizer-chart-library"]?o=s["visualizer-chart-type"]:("tabular"===(o=s["visualizer-chart-type"])&&(o="table"),o=he(o)):o="".concat(he(s["visualizer-chart-type"]),"Chart"),!s["visualizer-chart-library"]||"ChartJS"!==s["visualizer-chart-library"])return s["visualizer-data-exploded"]&&(i=fe("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement("div",{className:"visualizer-settings__charts-single","data-chart-type":o,key:"chart-".concat(r[n].id)},wp.element.createElement("div",{className:"visualizer-settings__charts-title"},a),"DataTable"===s["visualizer-chart-library"]?wp.element.createElement(I,{id:r[n].id,rows:s["visualizer-data"],columns:s["visualizer-series"],chartsScreen:!0,options:s["visualizer-settings"]}):(s["visualizer-data-exploded"],wp.element.createElement(D,{chartVersion:t,chartType:o,rows:s["visualizer-data"],columns:s["visualizer-series"],options:K(s["visualizer-settings"]),formatters:X(s)})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,i)),wp.element.createElement("div",{className:"visualizer-settings__charts-controls",title:fe("Insert Chart"),onClick:function(){return e.props.getChart(r[n].id)}},wp.element.createElement(Me,{icon:"upload"})))}))),!o&&i-1<r.length&&wp.element.createElement(we,{isPrimary:!0,isLarge:!0,onClick:this.loadMoreCharts,isBusy:a},fe("Load More"))):wp.element.createElement("p",{className:"visualizer-no-charts"},fe("No charts found.")):wp.element.createElement(Ye,null,wp.element.createElement(Te,null)))}}])&&le(t.prototype,n),r&&le(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(be);function De(e){return(De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==De(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==De(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===De(o)?o:String(o)),r)}var a,o}function xe(e,t){return(xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ee(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=He(e);if(t){var a=He(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Pe(this,n)}}function Pe(e,t){if(t&&("object"===De(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ce(e)}function Ce(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ze=wp.i18n.__,Ae=wp.element.Component,Re=wp.components,Ne=Re.Button,Fe=Re.ExternalLink,We=Re.PanelBody,Ie=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xe(e,t)}(o,e);var t,n,r,a=Ee(o);function o(){var e;return Oe(this,o),(e=a.apply(this,arguments)).uploadInput=React.createRef(),e.fileUploaded=e.fileUploaded.bind(Ce(e)),e.uploadImport=e.uploadImport.bind(Ce(e)),e.state={uploadLabel:ze("Upload")},e}return t=o,(n=[{key:"fileUploaded",value:function(e){"text/csv"===e.target.files[0].type&&this.setState({uploadLabel:ze("Upload")})}},{key:"uploadImport",value:function(){this.props.readUploadedFile(this.uploadInput),this.setState({uploadLabel:ze("Uploaded")})}},{key:"render",value:function(){return wp.element.createElement(We,{title:ze("Import data from file"),initialOpen:!1},wp.element.createElement("p",null,ze("Select and upload your data CSV file here. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).")),wp.element.createElement("p",null,ze("If you are unsure about how to format your data CSV then please take a look at this sample: "),wp.element.createElement(Fe,{href:"".concat(visualizerLocalize.absurl,"samples/").concat(this.props.chart["visualizer-chart-type"],".csv")},"".concat(this.props.chart["visualizer-chart-type"],".csv"))),wp.element.createElement("input",{type:"file",accept:"text/csv",ref:this.uploadInput,onChange:this.fileUploaded}),wp.element.createElement(Ne,{isPrimary:!0,onClick:this.uploadImport},this.state.uploadLabel))}}])&&je(t.prototype,n),r&&je(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ae);function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach((function(t){Ue(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ue(e,t,n){return(t=Qe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ge(e){return(Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ve(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Ve=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),s=new Y(a||[]);return r(i,"_invoke",{value:w(e,n,s)}),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function p(){}function m(){}function h(){}var f={};l(f,o,(function(){return this}));var _=Object.getPrototypeOf,y=_&&_(_(T([])));y&&y!==t&&n.call(y,o)&&(f=y);var b=h.prototype=p.prototype=Object.create(f);function v(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,s){var l=c(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==Ge(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=M(i,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function M(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var a=c(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return m.prototype=h,r(b,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:m,configurable:!0}),m.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},v(g.prototype),l(g.prototype,i,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new g(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(b),l(b,s,"Generator"),l(b,o,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=T,Y.prototype={constructor:Y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;L(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function qe(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function $e(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){qe(o,r,a,i,s,"next",e)}function s(e){qe(o,r,a,i,s,"throw",e)}i(void 0)}))}}function Ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Qe(r.key),r)}}function Qe(e){var t=function(e,t){if("object"!==Ge(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Ge(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ge(t)?t:String(t)}function Xe(e,t){return(Xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function et(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rt(e);if(t){var a=rt(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return tt(this,n)}}function tt(e,t){if(t&&("object"===Ge(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return nt(e)}function nt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rt(e){return(rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var at=wp.i18n.__,ot=wp,it=(ot.apiFetch,ot.apiRequest),st=wp.element.Component,lt=wp.components,ut=lt.Button,ct=lt.ExternalLink,dt=lt.IconButton,pt=lt.Modal,mt=lt.PanelBody,ht=lt.SelectControl,ft=lt.TextControl,_t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xe(e,t)}(c,e);var t,n,r,a,o,i,s,l,u=et(c);function c(){var e;return Ke(this,c),(e=u.apply(this,arguments)).openModal=e.openModal.bind(nt(e)),e.initTable=e.initTable.bind(nt(e)),e.onToggle=e.onToggle.bind(nt(e)),e.toggleHeaders=e.toggleHeaders.bind(nt(e)),e.getJSONRoot=e.getJSONRoot.bind(nt(e)),e.getJSONData=e.getJSONData.bind(nt(e)),e.getTableData=e.getTableData.bind(nt(e)),e.state={isOpen:!1,isLoading:!1,isFirstStepOpen:!0,isSecondStepOpen:!1,isThirdStepOpen:!1,isFourthStepOpen:!1,isHeaderPanelOpen:!1,endpointRoots:[],endpointPaging:[],table:null,requestHeaders:{method:"GET",username:"",password:"",auth:""}},e}return t=c,(n=[{key:"openModal",value:(l=$e(Ve().mark((function e(){var t;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setState({isOpen:!0});case 2:t=document.querySelector("#visualizer-json-query-table"),this.state.isFourthStepOpen&&null!==this.state.table&&(t.innerHTML=this.state.table,this.initTable());case 4:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"initTable",value:function(){jQuery("#visualizer-json-query-table table").DataTable({paging:!1,searching:!1,ordering:!1,select:!1,scrollX:"600px",scrollY:"400px",info:!1,colReorder:{fixedColumnsLeft:1},dom:"Bt",buttons:[{extend:"colvis",columns:":gt(0)",collectionLayout:"four-column"}]})}},{key:"onToggle",value:(s=$e(Ve().mark((function e(t){var n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===this.state.table&&this.state.endpointRoots&&0<this.state.endpointRoots.length&&("isFirstStepOpen"===t||"isSecondStepOpen"===t)&&this.setState({isFirstStepOpen:"isFirstStepOpen"===t,isSecondStepOpen:"isSecondStepOpen"===t,isThirdStepOpen:!1,isFourthStepOpen:!1}),null===this.state.table){e.next=5;break}return e.next=4,this.setState({isFirstStepOpen:"isFirstStepOpen"===t,isSecondStepOpen:"isSecondStepOpen"===t,isThirdStepOpen:"isThirdStepOpen"===t,isFourthStepOpen:"isFourthStepOpen"===t});case 4:"isFourthStepOpen"===t&&(n=document.querySelector("#visualizer-json-query-table"),this.state.isFourthStepOpen&&(n.innerHTML=this.state.table,this.initTable()));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"toggleHeaders",value:function(){this.setState({isHeaderPanelOpen:!this.state.isHeaderPanelOpen})}},{key:"getJSONRoot",value:(i=$e(Ve().mark((function e(){var t,n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0,endpointRoots:[],endpointPaging:[],table:null}),e.next=3,it({path:"/visualizer/v1/get-json-root?url=".concat(this.props.chart["visualizer-json-url"]),data:{method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth},method:"GET"});case 3:(t=e.sent).success?(n=Object.keys(t.data.roots).map((function(e){return{label:t.data.roots[e].replace(/>/g," ➤ "),value:t.data.roots[e]}})),this.setState({isLoading:!1,isFirstStepOpen:!1,isSecondStepOpen:!0,endpointRoots:n})):(this.setState({isLoading:!1}),alert(t.data.msg));case 5:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getJSONData",value:(o=$e(Ve().mark((function e(){var t,n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),e.next=3,it({path:"/visualizer/v1/get-json-data?url=".concat(this.props.chart["visualizer-json-url"],"&chart=").concat(this.props.id),data:{root:this.props.chart["visualizer-json-root"]||this.state.endpointRoots[0].value,method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth},method:"GET"});case 3:(t=e.sent).success?(n=[{label:at("Don't use pagination"),value:0}],t.data.paging&&"root>next"===t.data.paging[0]&&n.push({label:at("Get first 5 pages using root ➤ next"),value:"root>next"}),this.setState({isLoading:!1,isSecondStepOpen:!1,isFourthStepOpen:!0,endpointPaging:n,table:t.data.table}),document.querySelector("#visualizer-json-query-table").innerHTML=t.data.table,this.initTable()):(this.setState({isLoading:!1}),alert(t.data.msg));case 5:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getTableData",value:(a=$e(Ve().mark((function e(){var t,n,r,a,o;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),t=document.querySelectorAll("#visualizer-json-query-table input"),n=document.querySelectorAll("#visualizer-json-query-table select"),r=[],a={},t.forEach((function(e){return r.push(e.value)})),n.forEach((function(e){return a[e.name]=e.value})),e.next=9,it({path:"/visualizer/v1/set-json-data",data:Je({url:this.props.chart["visualizer-json-url"],method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth,root:this.props.chart["visualizer-json-root"]||this.state.endpointRoots[0].value,paging:this.props.chart["visualizer-json-paging"]||0,header:r},a),method:"GET"});case 9:(o=e.sent).success?(this.props.JSONImportData(o.data.name,JSON.parse(o.data.series),JSON.parse(o.data.data)),this.setState({isOpen:!1,isLoading:!1})):(alert(o.data.msg),this.setState({isLoading:!1}));case 11:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"render",value:function(){var e=this;return wp.element.createElement(mt,{title:at("Import from JSON"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,at("You can choose here to import or synchronize your chart data with a remote JSON source.")),wp.element.createElement("p",null,wp.element.createElement(ct,{href:"https://docs.themeisle.com/article/1052-how-to-generate-charts-from-json-data-rest-endpoints"},at("For more info check this tutorial."))),wp.element.createElement(ht,{label:at("How often do you want to check the url?"),value:this.props.chart["visualizer-json-schedule"]?this.props.chart["visualizer-json-schedule"]:1,options:[{label:at("One-time"),value:"-1"},{label:at("Live"),value:"0"},{label:at("Each hour"),value:"1"},{label:at("Each 12 hours"),value:"12"},{label:at("Each day"),value:"24"},{label:at("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(ut,{isPrimary:!0,isLarge:!0,onClick:this.openModal},at("Modify Parameters")),this.state.isOpen&&wp.element.createElement(pt,{title:at("Import from JSON"),className:"visualizer-json-query-modal",shouldCloseOnClickOutside:!1,onRequestClose:function(){e.setState({isOpen:!1,isTableRendered:!1})}},wp.element.createElement(mt,{title:at("Step 1: Specify the JSON endpoint/URL"),opened:this.state.isFirstStepOpen,onToggle:function(){return e.onToggle("isFirstStepOpen")}},wp.element.createElement("p",null,at("If you want to add authentication, add headers to the endpoint or change the request in any way, please refer to our document here:")),wp.element.createElement("p",null,wp.element.createElement(ct,{href:"https://docs.themeisle.com/article/1043-visualizer-how-to-extend-rest-endpoints-with-json-response"},at("How to extend REST endpoints with JSON response"))),wp.element.createElement(ft,{placeholder:at("Please enter the URL of your JSON file"),value:this.props.chart["visualizer-json-url"]?this.props.chart["visualizer-json-url"]:"",onChange:this.props.editJSONURL}),wp.element.createElement(dt,{icon:"arrow-right-alt2",label:at("Add Headers"),onClick:this.toggleHeaders},at("Add Headers")),this.state.isHeaderPanelOpen&&wp.element.createElement("div",{className:"visualizer-json-query-modal-headers-panel"},wp.element.createElement(ht,{label:at("Request Type"),value:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,options:[{value:"GET",label:at("GET")},{value:"POST",label:at("POST")}],onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.method=t,r=Je(Je({},r),{},{method:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,at("Credentials")),wp.element.createElement(ft,{label:at("Username"),placeholder:at("Username/Access Key"),value:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth={username:t,password:e.props.chart["visualizer-json-headers"]&&"object"===Ge(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.password:e.state.requestHeaders.password},r=Je(Je({},r),{},{username:t,password:n.password}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("span",{className:"visualizer-json-query-modal-field-separator"},at("&")),wp.element.createElement(ft,{label:at("Password"),placeholder:at("Password/Secret Key"),type:"password",value:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth={username:e.props.chart["visualizer-json-headers"]&&"object"===Ge(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.username:e.state.requestHeaders.username,password:t},r=Je(Je({},r),{},{username:n.username,password:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,at("OR")),wp.element.createElement(ft,{label:at("Authorization"),placeholder:at("e.g. SharedKey <AccountName>:<Signature>"),value:this.props.chart["visualizer-json-headers"]&&"object"!==Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth,onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth=t,r=Je(Je({},r),{},{auth:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}})),wp.element.createElement(ut,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONRoot},at("Fetch Endpoint"))),wp.element.createElement(mt,{title:at("Step 2: Choose the JSON root"),initialOpen:!1,opened:this.state.isSecondStepOpen,onToggle:function(){return e.onToggle("isSecondStepOpen")}},wp.element.createElement("p",null,at("If you see Invalid Data, you may have selected the wrong root to fetch data from. Please select an alternative.")),wp.element.createElement(ht,{value:this.props.chart["visualizer-json-root"],options:this.state.endpointRoots,onChange:this.props.editJSONRoot}),wp.element.createElement(ut,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONData},at("Parse Endpoint"))),wp.element.createElement(mt,{title:at("Step 3: Specify miscellaneous parameters"),initialOpen:!1,opened:this.state.isThirdStepOpen,onToggle:function(){return e.onToggle("isThirdStepOpen")}},"community"!==visualizerLocalize.isPro?wp.element.createElement(ht,{value:this.props.chart["visualizer-json-paging"]||0,options:this.state.endpointPaging,onChange:this.props.editJSONPaging}):wp.element.createElement("p",null,at("Enable this feature in PRO version!"))),wp.element.createElement(mt,{title:at("Step 4: Select the data to display in the chart"),initialOpen:!1,opened:this.state.isFourthStepOpen,onToggle:function(){return e.onToggle("isFourthStepOpen")}},wp.element.createElement("ul",null,wp.element.createElement("li",null,at("Select whether to include the data in the chart. Each column selected will form one series.")),wp.element.createElement("li",null,at("If a column is selected to be included, specify its data type.")),wp.element.createElement("li",null,at("You can use drag/drop to reorder the columns but this column position is not saved. So when you reload the table, you may have to reorder again.")),wp.element.createElement("li",null,at("You can select any number of columns but the chart type selected will determine how many will display in the chart."))),wp.element.createElement("div",{id:"visualizer-json-query-table"}),wp.element.createElement(ut,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getTableData},at("Save & Show Chart")))))}}])&&Ze(t.prototype,n),r&&Ze(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(st);function yt(e){return(yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==yt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==yt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===yt(o)?o:String(o)),r)}var a,o}function gt(e,t){return(gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kt(e);if(t){var a=kt(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Mt(this,n)}}function Mt(e,t){if(t&&("object"===yt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function kt(e){return(kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Lt=wp.i18n.__,Yt=wp.element.Component,Tt=wp.components,St=Tt.Button,Dt=Tt.ExternalLink,Ot=Tt.PanelBody,jt=Tt.SelectControl,xt=Tt.TextControl,Et=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gt(e,t)}(o,e);var t,n,r,a=wt(o);function o(){return bt(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this;return wp.element.createElement(Ot,{title:Lt("Import data from URL"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ot,{title:Lt("One Time Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,Lt("You can use this to import data from a remote CSV file. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).")),wp.element.createElement("p",null,Lt("If you are unsure about how to format your data CSV then please take a look at this sample: "),wp.element.createElement(Dt,{href:"".concat(visualizerLocalize.absurl,"samples/").concat(this.props.chart["visualizer-chart-type"],".csv")},"".concat(this.props.chart["visualizer-chart-type"],".csv"))),wp.element.createElement("p",null,Lt("You can also import data from Google Spreadsheet.")),wp.element.createElement(xt,{placeholder:Lt("Please enter the URL of your CSV file"),value:this.props.chart["visualizer-chart-url"]?this.props.chart["visualizer-chart-url"]:"",onChange:this.props.editURL}),wp.element.createElement(St,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!1)}},Lt("Import Data"))),"business"===visualizerLocalize.isPro?wp.element.createElement(Ot,{title:Lt("Schedule Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,Lt("You can choose here to synchronize your chart data with a remote CSV file. ")),wp.element.createElement("p",null,Lt("You can also synchronize with your Google Spreadsheet file.")),wp.element.createElement("p",null,Lt("We will update the chart data based on your time interval preference by overwritting the current data with the one from the URL.")),wp.element.createElement(xt,{placeholder:Lt("Please enter the URL of your CSV file"),value:this.props.chart["visualizer-chart-url"]?this.props.chart["visualizer-chart-url"]:"",onChange:this.props.editURL}),wp.element.createElement(jt,{label:Lt("How often do you want to check the url?"),value:this.props.chart["visualizer-chart-schedule"]?this.props.chart["visualizer-chart-schedule"]:1,options:[{label:Lt("Each hour"),value:"1"},{label:Lt("Each 12 hours"),value:"12"},{label:Lt("Each day"),value:"24"},{label:Lt("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(St,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!0)}},Lt("Save Schedule"))):wp.element.createElement(Ot,{title:Lt("Schedule Import"),icon:"lock",className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,Lt("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(St,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},Lt("Buy Now"))),wp.element.createElement(_t,{id:this.props.id,chart:this.props.chart,editSchedule:this.props.editJSONSchedule,editJSONURL:this.props.editJSONURL,editJSONHeaders:this.props.editJSONHeaders,editJSONRoot:this.props.editJSONRoot,editJSONPaging:this.props.editJSONPaging,JSONImportData:this.props.JSONImportData}))}}])&&vt(t.prototype,n),r&&vt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Yt);function Pt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Pt=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),s=new Y(a||[]);return r(i,"_invoke",{value:w(e,n,s)}),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function p(){}function m(){}function h(){}var f={};l(f,o,(function(){return this}));var _=Object.getPrototypeOf,y=_&&_(_(T([])));y&&y!==t&&n.call(y,o)&&(f=y);var b=h.prototype=p.prototype=Object.create(f);function v(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,s){var l=c(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==Ct(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=M(i,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function M(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var a=c(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return m.prototype=h,r(b,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:m,configurable:!0}),m.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},v(g.prototype),l(g.prototype,i,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new g(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(b),l(b,s,"Generator"),l(b,o,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=T,Y.prototype={constructor:Y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;L(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function Ct(e){return(Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ht(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function zt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function At(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==Ct(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Ct(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===Ct(o)?o:String(o)),r)}var a,o}function Rt(e,t){return(Rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wt(e);if(t){var a=Wt(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Ft(this,n)}}function Ft(e,t){if(t&&("object"===Ct(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Wt(e){return(Wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var It=wp.i18n.__,Bt=wp.apiFetch,Jt=wp.element,Ut=Jt.Component,Gt=Jt.Fragment,Vt=wp.components,qt=Vt.Button,$t=Vt.PanelBody,Kt=Vt.Placeholder,Zt=Vt.SelectControl,Qt=Vt.Spinner,Xt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rt(e,t)}(s,e);var t,n,r,a,o,i=Nt(s);function s(){var e;return zt(this,s),(e=i.apply(this,arguments)).state={id:"",charts:[]},e}return t=s,(n=[{key:"componentDidMount",value:(a=Pt().mark((function e(){var t,n;return Pt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Bt({path:"wp/v2/visualizer/?per_page=100"});case 2:t=(t=e.sent).map((function(e,t){var r=e.chart_data["visualizer-settings"].title?e.chart_data["visualizer-settings"].title:"#".concat(e.id);return"object"===Ct(r)&&(r="#".concat(e.id)),0===t&&(n=e.id),{value:e.id,label:r}})),this.setState({id:n,charts:t});case 5:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=a.apply(e,t);function i(e){Ht(o,n,r,i,s,"next",e)}function s(e){Ht(o,n,r,i,s,"throw",e)}i(void 0)}))},function(){return o.apply(this,arguments)})},{key:"render",value:function(){var e=this;return"community"!==visualizerLocalize.isPro?wp.element.createElement($t,{title:It("Import from other chart"),initialOpen:!1},1<=this.state.charts.length?wp.element.createElement(Gt,null,wp.element.createElement(Zt,{label:It("You can import here data from your previously created charts."),value:this.state.id,options:this.state.charts,onChange:function(t){return e.setState({id:t})}}),wp.element.createElement(qt,{isPrimary:!0,isLarge:!0,isBusy:"getChartData"===this.props.isLoading,onClick:function(){return e.props.getChartData(e.state.id)}},It("Import Chart"))):wp.element.createElement(Kt,null,wp.element.createElement(Qt,null))):wp.element.createElement($t,{title:It("Import from other chart"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,It("Enable this feature in PRO version!")),wp.element.createElement(qt,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},It("Buy Now")))}}])&&At(t.prototype,n),r&&At(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(Ut);function en(e){return(en="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */tn=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),s=new Y(a||[]);return r(i,"_invoke",{value:w(e,n,s)}),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function p(){}function m(){}function h(){}var f={};l(f,o,(function(){return this}));var _=Object.getPrototypeOf,y=_&&_(_(T([])));y&&y!==t&&n.call(y,o)&&(f=y);var b=h.prototype=p.prototype=Object.create(f);function v(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,s){var l=c(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==en(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=M(i,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function M(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var a=c(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return m.prototype=h,r(b,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:m,configurable:!0}),m.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},v(g.prototype),l(g.prototype,i,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new g(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(b),l(b,s,"Generator"),l(b,o,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=T,Y.prototype={constructor:Y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;L(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function nn(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function rn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function an(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==en(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==en(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===en(o)?o:String(o)),r)}var a,o}function on(e,t){return(on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function sn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cn(e);if(t){var a=cn(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ln(this,n)}}function ln(e,t){if(t&&("object"===en(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return un(e)}function un(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cn(e){return(cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dn=wp.i18n.__,pn=wp.apiRequest,mn=wp.components,hn=mn.Button,fn=mn.ExternalLink,_n=wp.element,yn=_n.Component,bn=_n.Fragment,vn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&on(e,t)}(s,e);var t,n,r,a,o,i=sn(s);function s(){var e;return rn(this,s),(e=i.apply(this,arguments)).onSave=e.onSave.bind(un(e)),e.state={isLoading:!1,success:!1,query:"",name:"",series:{},data:[]},e}return t=s,(n=[{key:"componentDidMount",value:function(){var e=wp.CodeMirror||CodeMirror,t=document.querySelector(".visualizer-db-query"),n=e.fromTextArea(t,{autofocus:!0,mode:"text/x-mysql",lineWrapping:!0,dragDrop:!1,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-Space":"autocomplete"},hintOptions:{tables:visualizerLocalize.sqlTable}});n.on("inputRead",(function(){n.save()}))}},{key:"onSave",value:(a=tn().mark((function e(){var t,n,r;return tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=document.querySelector(".visualizer-db-query").value,(n=document.querySelector("#visualizer-db-query-table")).innerHTML="",e.next=5,this.setState({isLoading:!0});case 5:return e.next=7,pn({path:"/visualizer/v1/get-query-data",data:{query:t},method:"GET"});case 7:return r=e.sent,e.next=10,this.setState({isLoading:!1,success:r.success,query:t,name:r.data.name||"",series:r.data.series||{},data:r.data.data||[]});case 10:n.innerHTML=r.data.table||r.data.msg,this.state.success&&jQuery("#results").DataTable({paging:!1});case 12:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=a.apply(e,t);function i(e){nn(o,n,r,i,s,"next",e)}function s(e){nn(o,n,r,i,s,"throw",e)}i(void 0)}))},function(){return o.apply(this,arguments)})},{key:"render",value:function(){var e=this;return wp.element.createElement(bn,null,wp.element.createElement("textarea",{className:"visualizer-db-query",placeholder:dn("Your query goes here…")},this.props.chart["visualizer-db-query"]),wp.element.createElement("div",{className:"visualizer-db-query-actions"},wp.element.createElement(hn,{isLarge:!0,isDefault:!0,isBusy:this.state.isLoading,onClick:this.onSave},dn("Show Results")),wp.element.createElement(hn,{isLarge:!0,isPrimary:!0,disabled:!this.state.success,onClick:function(){return e.props.save(e.state.query,e.state.name,e.state.series,e.state.data)}},dn("Save"))),wp.element.createElement("ul",null,wp.element.createElement("li",null,wp.element.createElement(fn,{href:"https://docs.themeisle.com/article/970-visualizer-sample-queries-to-generate-charts"},dn("Examples of queries and links to resources that you can use with this feature."))),wp.element.createElement("li",null,dn("Use Control+Space for autocompleting keywords or table names."))),wp.element.createElement("div",{id:"visualizer-db-query-table",className:!this.state.success&&"db-wizard-error"}))}}])&&an(t.prototype,n),r&&an(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(yn);function gn(e){return(gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==gn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==gn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===gn(o)?o:String(o)),r)}var a,o}function kn(e,t){return(kn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ln(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sn(e);if(t){var a=Sn(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Yn(this,n)}}function Yn(e,t){if(t&&("object"===gn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Tn(e)}function Tn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sn(e){return(Sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dn=wp.i18n.__,On=wp.element.Component,jn=wp.components,xn=jn.Button,En=jn.Modal,Pn=jn.PanelBody,Cn=jn.SelectControl,Hn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kn(e,t)}(o,e);var t,n,r,a=Ln(o);function o(){var e;return wn(this,o),(e=a.apply(this,arguments)).save=e.save.bind(Tn(e)),e.state={isOpen:!1},e}return t=o,(n=[{key:"save",value:function(e,t,n,r){this.props.databaseImportData(e,t,n,r),this.setState({isOpen:!1})}},{key:"render",value:function(){var e=this;return"business"!==visualizerLocalize.isPro?wp.element.createElement(Pn,{title:Dn("Import data from database"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,Dn("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(xn,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},Dn("Buy Now"))):wp.element.createElement(Pn,{title:Dn("Import data from database"),initialOpen:!1},wp.element.createElement("p",null,Dn("You can import data from the database here.")),wp.element.createElement("p",null,Dn("How often do you want to refresh the data from the database.")),wp.element.createElement(Cn,{label:Dn("How often do you want to check the url?"),value:this.props.chart["visualizer-db-schedule"]?this.props.chart["visualizer-db-schedule"]:0,options:[{label:Dn("Live"),value:"0"},{label:Dn("Each hour"),value:"1"},{label:Dn("Each 12 hours"),value:"12"},{label:Dn("Each day"),value:"24"},{label:Dn("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(xn,{isPrimary:!0,isLarge:!0,onClick:function(){return e.setState({isOpen:!0})}},Dn("Create Query")),this.state.isOpen&&wp.element.createElement(En,{title:Dn("Import from database"),onRequestClose:function(){return e.setState({isOpen:!1})},className:"visualizer-db-query-modal",shouldCloseOnClickOutside:!1},wp.element.createElement(vn,{chart:this.props.chart,changeQuery:this.props.changeQuery,save:this.save})))}}])&&Mn(t.prototype,n),r&&Mn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(On),zn=n(132);n(152);function An(e){return(An="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==An(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==An(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===An(o)?o:String(o)),r)}var a,o}function Fn(e,t){return(Fn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bn(e);if(t){var a=Bn(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return In(this,n)}}function In(e,t){if(t&&("object"===An(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Bn(e){return(Bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Jn=wp.i18n.__,Un=wp.element.Component,Gn=wp.components,Vn=Gn.Button,qn=Gn.ButtonGroup,$n=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fn(e,t)}(o,e);var t,n,r,a=Wn(o);function o(){var e;return Rn(this,o),(e=a.apply(this,arguments)).data=[],e.dates=[],e.types=["string","number","boolean","date","datetime","timeofday"],e}return t=o,(n=[{key:"componentWillMount",value:function(){var e=this;this.data[this.data.length]=[],this.data[this.data.length]=[],this.props.chart["visualizer-series"].map((function(t,n){e.data[0][n]=t.label,e.data[1][n]=t.type,"date"===t.type&&e.dates.push(n)})),this.props.chart["visualizer-data"].map((function(t){e.data[e.data.length]=t}))}},{key:"render",value:function(){var e=this;return wp.element.createElement("div",{className:"visualizer-chart-editor"},wp.element.createElement(zn.HotTable,{data:this.data,allowInsertRow:!0,contextMenu:!0,rowHeaders:!0,colHeaders:!0,allowInvalid:!1,className:"htEditor",height:"auto",cells:function(t,n,r){var a;return 1===t&&(a={type:"autocomplete",source:e.types,strict:!1}),0<=e.dates.indexOf(n)&&1<t&&(a={type:"date",dateFormat:"YYYY-MM-DD",correctFormat:!0}),a}}),wp.element.createElement(qn,null,wp.element.createElement(Vn,{isDefault:!0,isLarge:!0,onClick:this.props.toggleModal},Jn("Close")),wp.element.createElement(Vn,{isPrimary:!0,isLarge:!0,onClick:function(t){e.props.toggleModal(),e.props.editChartData(e.data,"Visualizer_Source_Csv")}},Jn("Save"))))}}])&&Nn(t.prototype,n),r&&Nn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Un);function Kn(e){return(Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==Kn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Kn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===Kn(o)?o:String(o)),r)}var a,o}function Xn(e,t){return(Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function er(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rr(e);if(t){var a=rr(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return tr(this,n)}}function tr(e,t){if(t&&("object"===Kn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return nr(e)}function nr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rr(e){return(rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ar=wp.i18n.__,or=wp.element,ir=or.Component,sr=or.Fragment,lr=wp.components,ur=lr.Button,cr=lr.Modal,dr=lr.PanelBody,pr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xn(e,t)}(o,e);var t,n,r,a=er(o);function o(){var e;return Zn(this,o),(e=a.apply(this,arguments)).toggleModal=e.toggleModal.bind(nr(e)),e.state={isOpen:!1},e}return t=o,(n=[{key:"toggleModal",value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:"render",value:function(){return"community"!==visualizerLocalize.isPro?wp.element.createElement(sr,null,wp.element.createElement(dr,{title:ar("Manual Data"),initialOpen:!1},wp.element.createElement("p",null,ar("You can manually edit the chart data using a spreadsheet like editor.")),wp.element.createElement(ur,{isPrimary:!0,isLarge:!0,isBusy:this.state.isOpen,onClick:this.toggleModal},ar("View Editor"))),this.state.isOpen&&wp.element.createElement(cr,{title:"Chart Editor",onRequestClose:this.toggleModal,shouldCloseOnClickOutside:!1},wp.element.createElement($n,{chart:this.props.chart,editChartData:this.props.editChartData,toggleModal:this.toggleModal}))):wp.element.createElement(dr,{title:ar("Manual Data"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,ar("Enable this feature in PRO version!")),wp.element.createElement(ur,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},ar("Buy Now")))}}])&&Qn(t.prototype,n),r&&Qn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ir);function mr(e){return(mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==mr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==mr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===mr(o)?o:String(o)),r)}var a,o}function _r(e,t){return(_r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function yr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vr(e);if(t){var a=vr(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return br(this,n)}}function br(e,t){if(t&&("object"===mr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function vr(e){return(vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gr=wp.i18n.__,wr=wp.element.Component,Mr=(wp.blockEditor||wp.editor).ColorPalette,kr=wp.components,Lr=kr.BaseControl,Yr=kr.CheckboxControl,Tr=kr.PanelBody,Sr=kr.SelectControl,Dr=kr.TextControl,Or=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_r(e,t)}(o,e);var t,n,r,a=yr(o);function o(){return hr(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"],r=[{label:gr("The tooltip will be displayed when the user hovers over an element"),value:"focus"}];-1>=["timeline"].indexOf(t)&&(r[1]={label:gr("The tooltip will be displayed when the user selects an element"),value:"selection"}),r[2]={label:gr("The tooltip will not be displayed"),value:"none"};var a=[{label:gr("Left of the chart"),value:"left"},{label:gr("Right of the chart"),value:"right"},{label:gr("Above the chart"),value:"top"},{label:gr("Below the chart"),value:"bottom"},{label:gr("Omit the legend"),value:"none"}];"pie"!==t&&a.push({label:gr("Inside the chart"),value:"in"}),"bubble"===t&&(a=a.filter((function(e){return"left"!==e.value})));var o=gr("Text to display above the chart.");return 0<=["tabular","dataTable","gauge","geo","timeline"].indexOf(t)&&(o=gr("Text to display in the back-end admin area")),wp.element.createElement(Tr,{title:gr("General Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Tr,{title:gr("Title"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Dr,{label:gr("Chart Title"),help:o,value:n.title,onChange:function(t){n.title=t,e.props.edit(n)}}),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Sr,{label:gr("Chart Title Position"),help:gr("Where to place the chart title, compared to the chart area."),value:n.titlePosition?n.titlePosition:"out",options:[{label:gr("Inside the chart"),value:"in"},{label:gr("Outside the chart"),value:"out"},{label:gr("None"),value:"none"}],onChange:function(t){n.titlePosition=t,e.props.edit(n)}}),-1>=["tabular","dataTable","gauge","geo","timeline"].indexOf(t)&&wp.element.createElement(Lr,{label:gr("Chart Title Color")},wp.element.createElement(Mr,{value:n.titleTextStyle.color,onChange:function(t){n.titleTextStyle.color=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Sr,{label:gr("Axes Titles Position"),help:gr("Determines where to place the axis titles, compared to the chart area."),value:n.axisTitlesPosition?n.axisTitlesPosition:"out",options:[{label:gr("Inside the chart"),value:"in"},{label:gr("Outside the chart"),value:"out"},{label:gr("None"),value:"none"}],onChange:function(t){n.axisTitlesPosition=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Tr,{title:gr("Font Styles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Sr,{label:gr("Font Family"),help:gr("The default font family for all text in the chart."),value:n.fontName?n.fontName:"Arial",options:[{label:gr("Arial"),value:"Arial"},{label:gr("Sans Serif"),value:"Sans Serif"},{label:gr("Serif"),value:"serif"},{label:gr("Arial"),value:"Arial"},{label:gr("Wide"),value:"Arial black"},{label:gr("Narrow"),value:"Arial Narrow"},{label:gr("Comic Sans MS"),value:"Comic Sans MS"},{label:gr("Courier New"),value:"Courier New"},{label:gr("Garamond"),value:"Garamond"},{label:gr("Georgia"),value:"Georgia"},{label:gr("Tahoma"),value:"Tahoma"},{label:gr("Verdana"),value:"Verdana"}],onChange:function(t){n.fontName=t,e.props.edit(n)}}),wp.element.createElement(Sr,{label:gr("Font Size"),help:gr("The default font size for all text in the chart."),value:n.fontSize?n.fontSize:"15",options:[{label:"7",value:"7"},{label:"8",value:"8"},{label:"9",value:"9"},{label:"10",value:"10"},{label:"11",value:"11"},{label:"12",value:"12"},{label:"13",value:"13"},{label:"14",value:"14"},{label:"15",value:"15"},{label:"16",value:"16"},{label:"17",value:"17"},{label:"18",value:"18"},{label:"19",value:"19"},{label:"20",value:"20"}],onChange:function(t){n.fontSize=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","timeline"].indexOf(t)&&wp.element.createElement(Tr,{title:gr("Legend"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Sr,{label:gr("Position"),help:gr("Determines where to place the legend, compared to the chart area."),value:n.legend.position?n.legend.position:"right",options:a,onChange:function(r){if("pie"!==t){var a="left"===r?1:0;n.series&&Object.keys(n.series).map((function(e){n.series[e].targetAxisIndex=a}))}n.legend.position=r,e.props.edit(n)}}),wp.element.createElement(Sr,{label:gr("Alignment"),help:gr("Determines the alignment of the legend."),value:n.legend.alignment?n.legend.alignment:"15",options:[{label:gr("Aligned to the start of the allocated area"),value:"start"},{label:gr("Centered in the allocated area"),value:"center"},{label:gr("Aligned to the end of the allocated area"),value:"end"}],onChange:function(t){n.legend.alignment=t,e.props.edit(n)}}),wp.element.createElement(Lr,{label:gr("Font Color")},wp.element.createElement(Mr,{value:n.legend.textStyle.color,onChange:function(t){n.legend.textStyle.color=t,e.props.edit(n)}}))),-1>=["tabular","gauge","geo","dataTable","timeline"].indexOf(t)&&wp.element.createElement(Tr,{title:gr("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Sr,{label:gr("Trigger"),help:gr("Determines the user interaction that causes the tooltip to be displayed."),value:n.tooltip.trigger?n.tooltip.trigger:"focus",options:r,onChange:function(t){n.tooltip.trigger=t,e.props.edit(n)}}),wp.element.createElement(Sr,{label:gr("Show Color Code"),help:gr("If set to yes, will show colored squares next to the slice information in the tooltip."),value:n.tooltip.showColorCode?n.tooltip.showColorCode:"0",options:[{label:gr("Yes"),value:"1"},{label:gr("No"),value:"0"}],onChange:function(t){n.tooltip.showColorCode=t,e.props.edit(n)}}),0<=["pie"].indexOf(t)&&wp.element.createElement(Sr,{label:gr("Text"),help:gr("Determines what information to display when the user hovers over a pie slice."),value:n.tooltip.text?n.tooltip.text:"both",options:[{label:gr("Display both the absolute value of the slice and the percentage of the whole"),value:"both"},{label:gr("Display only the absolute value of the slice"),value:"value"},{label:gr("Display only the percentage of the whole represented by the slice"),value:"percentage"}],onChange:function(t){n.tooltip.text=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Tr,{title:gr("Animation"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Yr,{label:gr("Animate on startup?"),help:gr("Determines if the chart will animate on the initial draw."),checked:Number(n.animation.startup),onChange:function(t){n.animation.startup=t?"1":"0",e.props.edit(n)}}),wp.element.createElement(Dr,{label:gr("Duration"),help:gr("The duration of the animation, in milliseconds."),type:"number",value:n.animation.duration,onChange:function(t){n.animation.duration=t,e.props.edit(n)}}),wp.element.createElement(Sr,{label:gr("Easing"),help:gr("The easing function applied to the animation."),value:n.animation.easing?n.animation.easing:"linear",options:[{label:gr("Constant speed"),value:"linear"},{label:gr("Start slow and speed up"),value:"in"},{label:gr("Start fast and slow down"),value:"out"},{label:gr("Start slow, speed up, then slow down"),value:"inAndOut"}],onChange:function(t){n.animation.easing=t,e.props.edit(n)}})))}}])&&fr(t.prototype,n),r&&fr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(wr);function jr(e){return(jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Er(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==jr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==jr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===jr(o)?o:String(o)),r)}var a,o}function Pr(e,t){return(Pr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Cr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zr(e);if(t){var a=zr(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Hr(this,n)}}function Hr(e,t){if(t&&("object"===jr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function zr(e){return(zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ar=wp.i18n.__,Rr=wp.element.Component,Nr=wp.components,Fr=Nr.PanelBody,Wr=Nr.Notice,Ir=Nr.TextControl,Br=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pr(e,t)}(o,e);var t,n,r,a=Cr(o);function o(){return xr(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Fr,{title:Ar("Instance Settings"),initialOpen:!0,className:"visualizer-instance-panel"},wp.element.createElement(Wr,{status:"info",isDismissible:!1},wp.element.createElement("p",null,Ar("These settings are valid only for this instance of the chart.")),wp.element.createElement("p",null,Ar("This means that if you insert this chart again elsewhere, these values will not persist."))),wp.element.createElement(Ir,{label:Ar("Should this instance lazy Load?"),help:Ar("-1: do not lazy load. Any number greater than -1 will lazy load the chart once the viewport is that many pixels away from the chart"),value:this.props.attributes.lazy?Number(this.props.attributes.lazy):-1,type:"number",min:"-1",max:"1000",step:"1",onChange:function(n){e.props.attributes.lazy=n,e.props.edit(t)}}))}}])&&Er(t.prototype,n),r&&Er(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Rr);function Jr(e){return(Jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ur(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==Jr(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Jr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===Jr(o)?o:String(o)),r)}var a,o}function Vr(e,t){return(Vr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function qr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Kr(e);if(t){var a=Kr(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return $r(this,n)}}function $r(e,t){if(t&&("object"===Jr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Kr(e){return(Kr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zr=wp.i18n.__,Qr=wp.element,Xr=Qr.Component,ea=Qr.Fragment,ta=(wp.blockEditor||wp.editor).ColorPalette,na=wp.components,ra=na.BaseControl,aa=na.ExternalLink,oa=na.PanelBody,ia=na.SelectControl,sa=na.TextControl,la=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vr(e,t)}(o,e);var t,n,r,a=qr(o);function o(){return Ur(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(oa,{title:Zr("Horizontal Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(oa,{title:Zr("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(sa,{label:Zr("Axis Title"),help:Zr("The title of the horizontal axis."),value:n.hAxis.title,onChange:function(t){n.hAxis.title=t,e.props.edit(n)}}),wp.element.createElement(ia,{label:Zr("Text Position"),help:Zr("Position of the horizontal axis text, relative to the chart area."),value:n.hAxis.textPosition?n.hAxis.textPosition:"out",options:[{label:Zr("Inside the chart"),value:"in"},{label:Zr("Outside the chart"),value:"out"},{label:Zr("None"),value:"none"}],onChange:function(t){n.hAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(ia,{label:Zr("Direction"),help:Zr("The direction in which the values along the horizontal axis grow."),value:n.hAxis.direction?n.hAxis.direction:"1",options:[{label:Zr("Identical Direction"),value:"1"},{label:Zr("Reverse Direction"),value:"-1"}],onChange:function(t){n.hAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(ra,{label:Zr("Base Line Color")},wp.element.createElement(ta,{value:n.vAxis.baselineColor,onChange:function(t){n.vAxis.baselineColor=ne(t),e.props.edit(n)}})),wp.element.createElement(ra,{label:Zr("Axis Text Color")},wp.element.createElement(ta,{value:n.hAxis.textStyle.color||n.hAxis.textStyle,onChange:function(t){n.hAxis.textStyle={},n.hAxis.textStyle.color=ne(t),e.props.edit(n)}})),-1>=["column"].indexOf(t)&&wp.element.createElement(ea,null,wp.element.createElement(sa,{label:Zr("Number Format"),help:Zr("Enter custom format pattern to apply to horizontal axis labels."),value:n.hAxis.format,onChange:function(t){n.hAxis.format=t,e.props.edit(n)}}),wp.element.createElement("p",null,Zr("For number axis labels, this is a subset of the formatting "),wp.element.createElement(aa,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Zr("ICU pattern set.")),Zr(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,Zr("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(aa,{href:"https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax"},Zr("ICU date and time format."))))),-1>=["column"].indexOf(t)&&wp.element.createElement(ea,null,wp.element.createElement(oa,{title:Zr("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(sa,{label:Zr("Count"),help:Zr("The approximate number of horizontal gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between gridlines."),value:n.hAxis.gridlines?n.hAxis.gridlines.count:"",onChange:function(t){n.hAxis.gridlines||(n.hAxis.gridlines={}),n.hAxis.gridlines.count=t,e.props.edit(n)}}),wp.element.createElement(ra,{label:Zr("Color")},wp.element.createElement(ta,{value:n.hAxis.gridlines?n.hAxis.gridlines.color:"",onChange:function(t){n.hAxis.gridlines||(n.hAxis.gridlines={}),n.hAxis.gridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(oa,{title:Zr("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(sa,{label:Zr("Count"),help:Zr("Specify 0 to disable the minor gridlines."),value:n.hAxis.minorGridlines?n.hAxis.minorGridlines.count:"",onChange:function(t){n.hAxis.minorGridlines||(n.hAxis.minorGridlines={}),n.hAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(ra,{label:Zr("Color")},wp.element.createElement(ta,{value:n.hAxis.minorGridlines?n.hAxis.minorGridlines.color:"",onChange:function(t){n.hAxis.minorGridlines||(n.hAxis.minorGridlines={}),n.hAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(oa,{title:Zr("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(sa,{label:Zr("Maximun Value"),help:Zr("The maximum vertical data value to render."),value:n.hAxis.viewWindow?n.hAxis.viewWindow.max:"",onChange:function(t){n.hAxis.viewWindow||(n.hAxis.viewWindow={}),n.hAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(sa,{label:Zr("Minimum Value"),help:Zr("The minimum vertical data value to render."),value:n.hAxis.viewWindow?n.hAxis.viewWindow.min:"",onChange:function(t){n.hAxis.viewWindow||(n.hAxis.viewWindow={}),n.hAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&Gr(t.prototype,n),r&&Gr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Xr);function ua(e){return(ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ca(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function da(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==ua(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ua(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===ua(o)?o:String(o)),r)}var a,o}function pa(e,t){return(pa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ma(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fa(e);if(t){var a=fa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ha(this,n)}}function ha(e,t){if(t&&("object"===ua(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function fa(e){return(fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _a=wp.i18n.__,ya=wp.element,ba=ya.Component,va=ya.Fragment,ga=(wp.blockEditor||wp.editor).ColorPalette,wa=wp.components,Ma=wa.BaseControl,ka=wa.ExternalLink,La=wa.PanelBody,Ya=wa.SelectControl,Ta=wa.TextControl,Sa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pa(e,t)}(o,e);var t,n,r,a=ma(o);function o(){return ca(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(La,{title:_a("Vertical Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(La,{title:_a("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ta,{label:_a("Axis Title"),help:_a("The title of the Vertical axis."),value:n.vAxis.title,onChange:function(t){n.vAxis.title=t,e.props.edit(n)}}),wp.element.createElement(Ya,{label:_a("Text Position"),help:_a("Position of the Vertical axis text, relative to the chart area."),value:n.vAxis.textPosition?n.vAxis.textPosition:"out",options:[{label:_a("Inside the chart"),value:"in"},{label:_a("Outside the chart"),value:"out"},{label:_a("None"),value:"none"}],onChange:function(t){n.vAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(Ya,{label:_a("Direction"),help:_a("The direction in which the values along the Vertical axis grow."),value:n.vAxis.direction?n.vAxis.direction:"1",options:[{label:_a("Identical Direction"),value:"1"},{label:_a("Reverse Direction"),value:"-1"}],onChange:function(t){n.vAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(Ma,{label:_a("Base Line Color")},wp.element.createElement(ga,{value:n.hAxis.baselineColor,onChange:function(t){n.hAxis.baselineColor=ne(t),e.props.edit(n)}})),wp.element.createElement(Ma,{label:_a("Axis Text Color")},wp.element.createElement(ga,{value:n.vAxis.textStyle.color||n.vAxis.textStyle,onChange:function(t){n.vAxis.textStyle={},n.vAxis.textStyle.color=ne(t),e.props.edit(n)}})),-1>=["bar"].indexOf(t)&&wp.element.createElement(va,null,wp.element.createElement(Ta,{label:_a("Number Format"),help:_a("Enter custom format pattern to apply to Vertical axis labels."),value:n.vAxis.format,onChange:function(t){n.vAxis.format=t,e.props.edit(n)}}),wp.element.createElement("p",null,_a("For number axis labels, this is a subset of the formatting "),wp.element.createElement(ka,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},_a("ICU pattern set.")),_a(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,_a("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(ka,{href:"https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax"},_a("ICU date and time format."))))),-1>=["bar"].indexOf(t)&&wp.element.createElement(va,null,wp.element.createElement(La,{title:_a("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ta,{label:_a("Count"),help:_a("The approximate number of vertical gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between gridlines."),value:n.vAxis.gridlines?n.vAxis.gridlines.count:"",onChange:function(t){n.vAxis.gridlines||(n.vAxis.gridlines={}),n.vAxis.gridlines.count=t,e.props.edit(n)}}),wp.element.createElement(Ma,{label:_a("Color")},wp.element.createElement(ga,{value:n.vAxis.gridlines?n.vAxis.gridlines.color:"",onChange:function(t){n.vAxis.gridlines||(n.vAxis.gridlines={}),n.vAxis.gridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(La,{title:_a("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ta,{label:_a("Count"),help:_a("Specify 0 to disable the minor gridlines."),value:n.vAxis.minorGridlines?n.vAxis.minorGridlines.count:"",onChange:function(t){n.vAxis.minorGridlines||(n.vAxis.minorGridlines={}),n.vAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(Ma,{label:_a("Color")},wp.element.createElement(ga,{value:n.vAxis.minorGridlines?n.vAxis.minorGridlines.color:"",onChange:function(t){n.vAxis.minorGridlines||(n.vAxis.minorGridlines={}),n.vAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(La,{title:_a("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ta,{label:_a("Maximun Value"),help:_a("The maximum vertical data value to render."),value:n.vAxis.viewWindow?n.vAxis.viewWindow.max:"",onChange:function(t){n.vAxis.viewWindow||(n.vAxis.viewWindow={}),n.vAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(Ta,{label:_a("Minimum Value"),help:_a("The minimum vertical data value to render."),value:n.vAxis.viewWindow?n.vAxis.viewWindow.min:"",onChange:function(t){n.vAxis.viewWindow||(n.vAxis.viewWindow={}),n.vAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&da(t.prototype,n),r&&da(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ba);function Da(e){return(Da="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Oa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ja(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==Da(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Da(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===Da(o)?o:String(o)),r)}var a,o}function xa(e,t){return(xa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ea(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ca(e);if(t){var a=Ca(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Pa(this,n)}}function Pa(e,t){if(t&&("object"===Da(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ca(e){return(Ca=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ha=wp.i18n.__,za=wp.element,Aa=za.Component,Ra=za.Fragment,Na=(wp.blockEditor||wp.editor).ColorPalette,Fa=wp.components,Wa=Fa.BaseControl,Ia=Fa.ExternalLink,Ba=Fa.PanelBody,Ja=Fa.SelectControl,Ua=Fa.TextControl,Ga=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xa(e,t)}(o,e);var t,n,r,a=Ea(o);function o(){return Oa(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Ba,{title:Ha("Pie Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ra,null,wp.element.createElement(Ua,{label:Ha("Number Format"),help:Ha("Enter custom format pattern to apply to chart labels."),value:t.format,onChange:function(n){t.format=n,e.props.edit(t)}}),wp.element.createElement("p",null,Ha("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Ia,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Ha("ICU pattern set.")),Ha(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,Ha("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Ia,{href:"https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax"},Ha("ICU date and time format.")))),wp.element.createElement(Ja,{label:Ha("Is 3D"),help:Ha("If set to yes, displays a three-dimensional chart."),value:t.is3D?t.is3D:"0",options:[{label:Ha("Yes"),value:"1"},{label:Ha("No"),value:"0"}],onChange:function(n){t.is3D=n,e.props.edit(t)}}),wp.element.createElement(Ja,{label:Ha("Reverse Categories"),help:Ha("If set to yes, will draw slices counterclockwise."),value:t.reverseCategories?t.reverseCategories:"0",options:[{label:Ha("Yes"),value:"1"},{label:Ha("No"),value:"0"}],onChange:function(n){t.reverseCategories=n,e.props.edit(t)}}),wp.element.createElement(Ja,{label:Ha("Slice Text"),help:Ha("The content of the text displayed on the slice."),value:t.pieSliceText?t.pieSliceText:"percentage",options:[{label:Ha("The percentage of the slice size out of the total"),value:"percentage"},{label:Ha("The quantitative value of the slice"),value:"value"},{label:Ha("The name of the slice"),value:"label"},{label:Ha("The quantitative value and percentage of the slice"),value:"value-and-percentage"},{label:Ha("No text is displayed"),value:"none"}],onChange:function(n){t.pieSliceText=n,e.props.edit(t)}}),wp.element.createElement(Ua,{label:Ha("Pie Hole"),help:Ha("If between 0 and 1, displays a donut chart. The hole with have a radius equal to number times the radius of the chart. Only applicable when the chart is two-dimensional."),placeholder:Ha("0.5"),value:t.pieHole,onChange:function(n){t.pieHole=n,e.props.edit(t)}}),wp.element.createElement(Ua,{label:Ha("Start Angle"),help:Ha("The angle, in degrees, to rotate the chart by. The default of 0 will orient the leftmost edge of the first slice directly up."),value:t.pieStartAngle,onChange:function(n){t.pieStartAngle=n,e.props.edit(t)}}),wp.element.createElement(Wa,{label:Ha("Slice Border Color")},wp.element.createElement(Na,{value:t.pieSliceBorderColor,onChange:function(n){t.pieSliceBorderColor=n,e.props.edit(t)}})))}}])&&ja(t.prototype,n),r&&ja(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Aa);function Va(e){return(Va="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==Va(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Va(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===Va(o)?o:String(o)),r)}var a,o}function Ka(e,t){return(Ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Za(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xa(e);if(t){var a=Xa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Qa(this,n)}}function Qa(e,t){if(t&&("object"===Va(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xa(e){return(Xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var eo=wp.i18n.__,to=wp.element.Component,no=(wp.blockEditor||wp.editor).ColorPalette,ro=wp.components,ao=ro.BaseControl,oo=ro.PanelBody,io=ro.TextControl,so=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ka(e,t)}(o,e);var t,n,r,a=Za(o);function o(){return qa(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(oo,{title:eo("Residue Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(io,{label:eo("Visibility Threshold"),help:eo("The slice relative part, below which a slice will not show individually. All slices that have not passed this threshold will be combined to a single slice, whose size is the sum of all their sizes. Default is not to show individually any slice which is smaller than half a degree."),placeholder:eo("0.001388889"),value:t.sliceVisibilityThreshold,onChange:function(n){t.sliceVisibilityThreshold=n,e.props.edit(t)}}),wp.element.createElement(io,{label:eo("Residue Slice Label"),help:eo("A label for the combination slice that holds all slices below slice visibility threshold."),value:t.pieResidueSliceLabel,onChange:function(n){t.pieResidueSliceLabel=n,e.props.edit(t)}}),wp.element.createElement(ao,{label:eo("Residue Slice Color")},wp.element.createElement(no,{value:t.pieResidueSliceColor,onChange:function(n){t.pieResidueSliceColor=n,e.props.edit(t)}})))}}])&&$a(t.prototype,n),r&&$a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(to);function lo(e){return(lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function co(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==lo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==lo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===lo(o)?o:String(o)),r)}var a,o}function po(e,t){return(po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fo(e);if(t){var a=fo(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ho(this,n)}}function ho(e,t){if(t&&("object"===lo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function fo(e){return(fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _o=wp.i18n.__,yo=wp.element,bo=yo.Component,vo=yo.Fragment,go=wp.components,wo=go.PanelBody,Mo=go.SelectControl,ko=go.TextControl,Lo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&po(e,t)}(o,e);var t,n,r,a=mo(o);function o(){return uo(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(wo,{title:_o("Lines Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ko,{label:_o("Line Width"),help:_o("Data line width in pixels. Use zero to hide all lines."),value:n.lineWidth,onChange:function(t){n.lineWidth=t,e.props.edit(n)}}),wp.element.createElement(ko,{label:_o("Point Size"),help:_o("Diameter of displayed points in pixels. Use zero to hide all the points."),value:n.pointSize,onChange:function(t){n.pointSize=t,e.props.edit(n)}}),-1>=["area"].indexOf(t)&&wp.element.createElement(Mo,{label:_o("Curve Type"),help:_o("Determines whether the series has to be presented in the legend or not."),value:n.curveType?n.curveType:"none",options:[{label:_o("Straight line without curve"),value:"none"},{label:_o("The angles of the line will be smoothed"),value:"function"}],onChange:function(t){n.curveType=t,e.props.edit(n)}}),-1>=["scatter"].indexOf(t)&&wp.element.createElement(Mo,{label:_o("Focus Target"),help:_o("The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click."),value:n.focusTarget?n.focusTarget:"datum",options:[{label:_o("Focus on a single data point."),value:"datum"},{label:_o("Focus on a grouping of all data points along the major axis."),value:"category"}],onChange:function(t){n.focusTarget=t,e.props.edit(n)}}),wp.element.createElement(Mo,{label:_o("Selection Mode"),help:_o("Determines how many data points an user can select on a chart."),value:n.selectionMode?n.selectionMode:"single",options:[{label:_o("Single data point"),value:"single"},{label:_o("Multiple data points"),value:"multiple"}],onChange:function(t){n.selectionMode=t,e.props.edit(n)}}),wp.element.createElement(Mo,{label:_o("Aggregation Target"),help:_o("Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element."),value:n.aggregationTarget?n.aggregationTarget:"auto",options:[{label:_o("Group selected data by x-value"),value:"category"},{label:_o("Group selected data by series"),value:"series"},{label:_o("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:_o("Show only one tooltip per selection"),value:"none"}],onChange:function(t){n.aggregationTarget=t,e.props.edit(n)}}),wp.element.createElement(ko,{label:_o("Point Opacity"),help:_o("The transparency of data points, with 1.0 being completely opaque and 0.0 fully transparent."),value:n.dataOpacity,onChange:function(t){n.dataOpacity=t,e.props.edit(n)}}),-1>=["scatter","line"].indexOf(t)&&wp.element.createElement(vo,null,wp.element.createElement(ko,{label:_o("Area Opacity"),help:_o("The default opacity of the colored area under an area chart series, where 0.0 is fully transparent and 1.0 is fully opaque. To specify opacity for an individual series, set the area opacity value in the series property."),value:n.areaOpacity,onChange:function(t){n.areaOpacity=t,e.props.edit(n)}}),wp.element.createElement(Mo,{label:_o("Is Stacked"),help:_o("If set to yes, series elements are stacked."),value:n.isStacked?n.isStacked:"0",options:[{label:_o("Yes"),value:"1"},{label:_o("No"),value:"0"}],onChange:function(t){n.isStacked=t,e.props.edit(n)}})),-1>=["scatter","area"].indexOf(t)&&wp.element.createElement(Mo,{label:_o("Interpolate Nulls"),help:_o("Whether to guess the value of missing points. If yes, it will guess the value of any missing data based on neighboring points. If no, it will leave a break in the line at the unknown point."),value:n.interpolateNulls?n.interpolateNulls:"0",options:[{label:_o("Yes"),value:"1"},{label:_o("No"),value:"0"}],onChange:function(t){n.interpolateNulls=t,e.props.edit(n)}}))}}])&&co(t.prototype,n),r&&co(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(bo);function Yo(e){return(Yo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function To(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function So(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==Yo(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Yo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===Yo(o)?o:String(o)),r)}var a,o}function Do(e,t){return(Do=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Oo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xo(e);if(t){var a=xo(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return jo(this,n)}}function jo(e,t){if(t&&("object"===Yo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function xo(e){return(xo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Eo=wp.i18n.__,Po=wp.element.Component,Co=wp.components,Ho=Co.PanelBody,zo=Co.SelectControl,Ao=Co.TextControl,Ro=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Do(e,t)}(o,e);var t,n,r,a=Oo(o);function o(){return To(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Ho,{title:Eo("Bars Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(zo,{label:Eo("Focus Target"),help:Eo("The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click."),value:t.focusTarget?t.focusTarget:"datum",options:[{label:Eo("Focus on a single data point."),value:"datum"},{label:Eo("Focus on a grouping of all data points along the major axis."),value:"category"}],onChange:function(n){t.focusTarget=n,e.props.edit(t)}}),wp.element.createElement(zo,{label:Eo("Is Stacked"),help:Eo("If set to yes, series elements are stacked."),value:t.isStacked?t.isStacked:"0",options:[{label:Eo("Yes"),value:"1"},{label:Eo("No"),value:"0"}],onChange:function(n){t.isStacked=n,e.props.edit(t)}}),wp.element.createElement(Ao,{label:Eo("Bars Opacity"),help:Eo("Bars transparency, with 1.0 being completely opaque and 0.0 fully transparent."),value:t.dataOpacity,onChange:function(n){t.dataOpacity=n,e.props.edit(t)}}))}}])&&So(t.prototype,n),r&&So(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Po);function No(e){return(No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==No(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==No(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===No(o)?o:String(o)),r)}var a,o}function Io(e,t){return(Io=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Bo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Uo(e);if(t){var a=Uo(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Jo(this,n)}}function Jo(e,t){if(t&&("object"===No(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Uo(e){return(Uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Go=wp.i18n.__,Vo=wp.element.Component,qo=(wp.blockEditor||wp.editor).ColorPalette,$o=wp.components,Ko=$o.BaseControl,Zo=$o.PanelBody,Qo=$o.SelectControl,Xo=$o.TextControl,ei=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Io(e,t)}(o,e);var t,n,r,a=Bo(o);function o(){return Fo(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Zo,{title:Go("Candles Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Zo,{title:Go("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Qo,{label:Go("Focus Target"),help:Go("The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click."),value:t.focusTarget?t.focusTarget:"datum",options:[{label:Go("Focus on a single data point."),value:"datum"},{label:Go("Focus on a grouping of all data points along the major axis."),value:"category"}],onChange:function(n){t.focusTarget=n,e.props.edit(t)}}),wp.element.createElement(Qo,{label:Go("Selection Mode"),help:Go("Determines how many data points an user can select on a chart."),value:t.selectionMode?t.selectionMode:"single",options:[{label:Go("Single data point"),value:"single"},{label:Go("Multiple data points"),value:"multiple"}],onChange:function(n){t.selectionMode=n,e.props.edit(t)}}),wp.element.createElement(Qo,{label:Go("Aggregation Target"),help:Go("Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element."),value:t.aggregationTarget?t.aggregationTarget:"auto",options:[{label:Go("Group selected data by x-value"),value:"category"},{label:Go("Group selected data by series"),value:"series"},{label:Go("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:Go("Show only one tooltip per selection"),value:"none"}],onChange:function(n){t.aggregationTarget=n,e.props.edit(t)}})),wp.element.createElement(Zo,{title:Go("Failing Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Xo,{label:Go("Stroke Width"),help:Go("The stroke width of falling candles."),value:t.candlestick.fallingColor.strokeWidth,onChange:function(n){t.candlestick.fallingColor.strokeWidth=n,e.props.edit(t)}}),wp.element.createElement(Ko,{label:Go("Stroke Color")},wp.element.createElement(qo,{value:t.candlestick.fallingColor.stroke,onChange:function(n){t.candlestick.fallingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement(Ko,{label:Go("Fill Color")},wp.element.createElement(qo,{value:t.candlestick.fallingColor.fill,onChange:function(n){t.candlestick.fallingColor.fill=n,e.props.edit(t)}}))),wp.element.createElement(Zo,{title:Go("Rising Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Xo,{label:Go("Stroke Width"),help:Go("The stroke width of rising candles."),value:t.candlestick.risingColor.strokeWidth,onChange:function(n){t.candlestick.risingColor.strokeWidth=n,e.props.edit(t)}}),wp.element.createElement(Ko,{label:Go("Stroke Color")},wp.element.createElement(qo,{value:t.candlestick.risingColor.stroke,onChange:function(n){t.candlestick.risingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement(Ko,{label:Go("Fill Color")},wp.element.createElement(qo,{value:t.candlestick.risingColor.fill,onChange:function(n){t.candlestick.risingColor.fill=n,e.props.edit(t)}}))))}}])&&Wo(t.prototype,n),r&&Wo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Vo);function ti(e){return(ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ni(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ri(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==ti(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ti(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===ti(o)?o:String(o)),r)}var a,o}function ai(e,t){return(ai=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=si(e);if(t){var a=si(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ii(this,n)}}function ii(e,t){if(t&&("object"===ti(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function si(e){return(si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var li=wp.i18n.__,ui=wp.element.Component,ci=wp.components,di=ci.ExternalLink,pi=ci.PanelBody,mi=ci.SelectControl,hi=ci.TextControl,fi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ai(e,t)}(o,e);var t,n,r,a=oi(o);function o(){return ni(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(pi,{title:li("Map Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(pi,{title:li("API"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(hi,{label:li("API Key"),help:li("Add the Google Maps API key."),value:t.map_api_key,onChange:function(n){t.map_api_key=n,e.props.edit(t)}}),wp.element.createElement(di,{href:"https://developers.google.com/maps/documentation/javascript/get-api-key"},li("Get API Keys"))),wp.element.createElement(pi,{title:li("Region"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,li("A map of the entire world using 'world'.")),wp.element.createElement("li",null,li("A continent or a sub-continent, specified by its 3-digit code, e.g., '011' for Western Africa. "),wp.element.createElement(di,{href:"https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart#Continent_Hierarchy"},li("More info here."))),wp.element.createElement("li",null,li("A country, specified by its ISO 3166-1 alpha-2 code, e.g., 'AU' for Australia. "),wp.element.createElement(di,{href:"http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"},li("More info here."))),wp.element.createElement("li",null,li("A state in the United States, specified by its ISO 3166-2:US code, e.g., 'US-AL' for Alabama. Note that the resolution option must be set to either 'provinces' or 'metros'. "),wp.element.createElement(di,{href:"http://en.wikipedia.org/wiki/ISO_3166-2:US"},li("More info here.")))),wp.element.createElement(hi,{label:li("Reigion"),help:li("Configure the region area to display on the map. (Surrounding areas will be displayed as well.)"),value:t.region,onChange:function(n){t.region=n,e.props.edit(t)}})),wp.element.createElement(pi,{title:li("Resolution"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,li("'countries' - Supported for all regions, except for US state regions.")),wp.element.createElement("li",null,li("'provinces' - Supported only for country regions and US state regions. Not supported for all countries; please test a country to see whether this option is supported.")),wp.element.createElement("li",null,li("'metros' - Supported for the US country region and US state regions only."))),wp.element.createElement(mi,{label:li("Resolution"),help:li("The resolution of the map borders."),value:t.resolution?t.resolution:"countries",options:[{label:li("Countries"),value:"countries"},{label:li("Provinces"),value:"provinces"},{label:li("Metros"),value:"metros"}],onChange:function(n){t.resolution=n,e.props.edit(t)}})),wp.element.createElement(pi,{title:li("Display Mode"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,li("'auto' - Choose based on the format of the data.")),wp.element.createElement("li",null,li("'regions' - This is a region map.")),wp.element.createElement("li",null,li("'markers' - This is a marker map."))),wp.element.createElement(mi,{label:li("Display Mode"),help:li("Determines which type of map this is."),value:t.displayMode?t.displayMode:"auto",options:[{label:li("Auto"),value:"auto"},{label:li("Regions"),value:"regions"},{label:li("Markers"),value:"markers"}],onChange:function(n){t.displayMode=n,e.props.edit(t)}})),wp.element.createElement(pi,{title:li("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(mi,{label:li("Trigger"),help:li("Determines the user interaction that causes the tooltip to be displayed."),value:t.tooltip.trigger?t.tooltip.trigger:"focus",options:[{label:li("The tooltip will be displayed when the user hovers over an element"),value:"focus"},{label:li("The tooltip will not be displayed"),value:"none"}],onChange:function(n){t.tooltip.trigger=n,e.props.edit(t)}})))}}])&&ri(t.prototype,n),r&&ri(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ui);function _i(e){return(_i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==_i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==_i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===_i(o)?o:String(o)),r)}var a,o}function vi(e,t){return(vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function gi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mi(e);if(t){var a=Mi(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return wi(this,n)}}function wi(e,t){if(t&&("object"===_i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Mi(e){return(Mi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ki=wp.i18n.__,Li=wp.element.Component,Yi=(wp.blockEditor||wp.editor).ColorPalette,Ti=wp.components,Si=Ti.BaseControl,Di=Ti.PanelBody,Oi=Ti.TextControl,ji=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vi(e,t)}(o,e);var t,n,r,a=gi(o);function o(){return yi(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Di,{title:ki("Color Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Oi,{label:ki("Minimum Values"),help:ki("Determines the minimum values of color axis."),value:t.colorAxis.minValue,onChange:function(n){t.colorAxis.minValue=n,e.props.edit(t)}}),wp.element.createElement(Oi,{label:ki("Maximum Values"),help:ki("Determines the maximum values of color axis."),value:t.colorAxis.maxValue,onChange:function(n){t.colorAxis.maxValue=n,e.props.edit(t)}}),wp.element.createElement(Si,{label:ki("Minimum Value")},wp.element.createElement(Yi,{value:t.colorAxis.colors[0],onChange:function(n){t.colorAxis.colors[0]=n,e.props.edit(t)}})),wp.element.createElement(Si,{label:ki("Intermediate Value")},wp.element.createElement(Yi,{value:t.colorAxis.colors[1],onChange:function(n){t.colorAxis.colors[1]=n,e.props.edit(t)}})),wp.element.createElement(Si,{label:ki("Maximum Value")},wp.element.createElement(Yi,{value:t.colorAxis.colors[2],onChange:function(n){t.colorAxis.colors[2]=n,e.props.edit(t)}})),wp.element.createElement(Si,{label:ki("Dateless Region")},wp.element.createElement(Yi,{value:t.datalessRegionColor,onChange:function(n){t.datalessRegionColor=n,e.props.edit(t)}})))}}])&&bi(t.prototype,n),r&&bi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Li);function xi(e){return(xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ei(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==xi(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==xi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===xi(o)?o:String(o)),r)}var a,o}function Ci(e,t){return(Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Hi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ai(e);if(t){var a=Ai(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return zi(this,n)}}function zi(e,t){if(t&&("object"===xi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ai(e){return(Ai=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ri=wp.i18n.__,Ni=wp.element,Fi=Ni.Component,Wi=Ni.Fragment,Ii=wp.components,Bi=Ii.ExternalLink,Ji=Ii.PanelBody,Ui=Ii.TextControl,Gi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ci(e,t)}(o,e);var t,n,r,a=Hi(o);function o(){return Ei(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Ji,{title:Ri("Size Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ui,{label:Ri("Minimum Values"),help:Ri("Determines the minimum values of size axis."),value:t.sizeAxis.minValue,onChange:function(n){t.sizeAxis.minValue=n,e.props.edit(t)}}),wp.element.createElement(Ui,{label:Ri("Maximum Values"),help:Ri("Determines the maximum values of size axis."),value:t.sizeAxis.maxValue,onChange:function(n){t.sizeAxis.maxValue=n,e.props.edit(t)}}),wp.element.createElement(Ui,{label:Ri("Minimum Marker Radius"),help:Ri("Determines the radius of the smallest possible bubbles, in pixels."),value:t.sizeAxis.minSize,onChange:function(n){t.sizeAxis.minSize=n,e.props.edit(t)}}),wp.element.createElement(Ui,{label:Ri("Maximum Marker Radius"),help:Ri("Determines the radius of the largest possible bubbles, in pixels."),value:t.sizeAxis.maxSize,onChange:function(n){t.sizeAxis.maxSize=n,e.props.edit(t)}}),wp.element.createElement(Ui,{label:Ri("Marker Opacity"),help:Ri("The opacity of the markers, where 0.0 is fully transparent and 1.0 is fully opaque."),value:t.markerOpacity,onChange:function(n){t.markerOpacity=n,e.props.edit(t)}}),wp.element.createElement(Wi,null,wp.element.createElement(Ui,{label:Ri("Number Format"),help:Ri("Enter custom format pattern to apply to this series value."),value:t.series[0].format,onChange:function(n){t.series[0].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,Ri("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Bi,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Ri("ICU pattern set.")),Ri(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100."))))}}])&&Pi(t.prototype,n),r&&Pi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Fi);function Vi(e){return(Vi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==Vi(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Vi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===Vi(o)?o:String(o)),r)}var a,o}function Ki(e,t){return(Ki=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Zi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xi(e);if(t){var a=Xi(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Qi(this,n)}}function Qi(e,t){if(t&&("object"===Vi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xi(e){return(Xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var es=wp.i18n.__,ts=wp.element.Component,ns=wp.components,rs=ns.PanelBody,as=ns.SelectControl,os=ns.TextControl,is=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ki(e,t)}(o,e);var t,n,r,a=Zi(o);function o(){return qi(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(rs,{title:es("Magnifying Glass"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(as,{label:es("Enabled"),help:es("If yes, when the user lingers over a cluttered marker, a magnifiying glass will be opened."),value:t.magnifyingGlass.enable?t.magnifyingGlass.enable:"1",options:[{label:es("Yes"),value:"1"},{label:es("No"),value:"0"}],onChange:function(n){t.magnifyingGlass.enable=n,e.props.edit(t)}}),wp.element.createElement(os,{label:es("Zoom Factor"),help:es("The zoom factor of the magnifying glass. Can be any number greater than 0."),value:t.magnifyingGlass.zoomFactor,onChange:function(n){t.magnifyingGlass.zoomFactor=n,e.props.edit(t)}}))}}])&&$i(t.prototype,n),r&&$i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ts);function ss(e){return(ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ls(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function us(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==ss(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ss(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===ss(o)?o:String(o)),r)}var a,o}function cs(e,t){return(cs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ds(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ms(e);if(t){var a=ms(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ps(this,n)}}function ps(e,t){if(t&&("object"===ss(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ms(e){return(ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hs=wp.i18n.__,fs=wp.element,_s=fs.Component,ys=fs.Fragment,bs=(wp.blockEditor||wp.editor).ColorPalette,vs=wp.components,gs=vs.BaseControl,ws=vs.ExternalLink,Ms=vs.PanelBody,ks=vs.TextControl,Ls=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cs(e,t)}(o,e);var t,n,r,a=ds(o);function o(){return ls(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Ms,{title:hs("Gauge Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ms,{title:hs("Tick Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ks,{label:hs("Minimum Values"),help:hs("Determines the minimum values of gauge."),value:t.min,onChange:function(n){t.min=n,e.props.edit(t)}}),wp.element.createElement(ks,{label:hs("Maximum Values"),help:hs("Determines the maximum values of gauge."),value:t.max,onChange:function(n){t.max=n,e.props.edit(t)}}),wp.element.createElement(ks,{label:hs("Minor Ticks"),help:hs("The number of minor tick section in each major tick section."),value:t.minorTicks,onChange:function(n){t.minorTicks=n,e.props.edit(t)}}),wp.element.createElement(ys,null,wp.element.createElement(ks,{label:hs("Number Format"),help:hs("Enter custom format pattern to apply to this series value."),value:t.series[0].format,onChange:function(n){t.series[0].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,hs("For number axis labels, this is a subset of the formatting "),wp.element.createElement(ws,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},hs("ICU pattern set.")),hs(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")))),wp.element.createElement(Ms,{title:hs("Green Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ks,{label:hs("Minimum Range"),help:hs("The lowest values for a range marked by a green color."),value:t.greenFrom,onChange:function(n){t.greenFrom=n,e.props.edit(t)}}),wp.element.createElement(ks,{label:hs("Maximum Range"),help:hs("The highest values for a range marked by a green color."),value:t.greenTo,onChange:function(n){t.greenTo=n,e.props.edit(t)}}),wp.element.createElement(gs,{label:hs("Green Color")},wp.element.createElement(bs,{value:t.greenColor,onChange:function(n){t.greenColor=n,e.props.edit(t)}}))),wp.element.createElement(Ms,{title:hs("Yellow Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ks,{label:hs("Minimum Range"),help:hs("The lowest values for a range marked by a yellow color."),value:t.yellowFrom,onChange:function(n){t.yellowFrom=n,e.props.edit(t)}}),wp.element.createElement(ks,{label:hs("Maximum Range"),help:hs("The highest values for a range marked by a yellow color."),value:t.yellowTo,onChange:function(n){t.yellowTo=n,e.props.edit(t)}}),wp.element.createElement(gs,{label:hs("Yellow Color")},wp.element.createElement(bs,{value:t.yellowColor,onChange:function(n){t.yellowColor=n,e.props.edit(t)}}))),wp.element.createElement(Ms,{title:hs("Red Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ks,{label:hs("Minimum Range"),help:hs("The lowest values for a range marked by a red color."),value:t.redFrom,onChange:function(n){t.redFrom=n,e.props.edit(t)}}),wp.element.createElement(ks,{label:hs("Maximum Range"),help:hs("The highest values for a range marked by a red color."),value:t.redTo,onChange:function(n){t.redTo=n,e.props.edit(t)}}),wp.element.createElement(gs,{label:hs("Red Color")},wp.element.createElement(bs,{value:t.redColor,onChange:function(n){t.redColor=n,e.props.edit(t)}}))))}}])&&us(t.prototype,n),r&&us(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(_s);function Ys(e){return(Ys="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ts(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ss(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==Ys(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Ys(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===Ys(o)?o:String(o)),r)}var a,o}function Ds(e,t){return(Ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Os(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Es(e);if(t){var a=Es(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return js(this,n)}}function js(e,t){if(t&&("object"===Ys(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return xs(e)}function xs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Es(e){return(Es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ps=wp.i18n.__,Cs=wp.element.Component,Hs=(wp.blockEditor||wp.editor).ColorPalette,zs=wp.components,As=zs.BaseControl,Rs=zs.CheckboxControl,Ns=zs.PanelBody,Fs=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ds(e,t)}(o,e);var t,n,r,a=Os(o);function o(){var e;return Ts(this,o),(e=a.apply(this,arguments)).mapValues=e.mapValues.bind(xs(e)),e}return t=o,(n=[{key:"mapValues",value:function(e,t){return void 0===e.timeline?e[t]:e.timeline[t]}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return this.mapValues(t,"showRowLabels"),wp.element.createElement(Ns,{title:Ps("Timeline Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Rs,{label:Ps("Show Row Label"),help:Ps("If checked, shows the category/row label."),checked:Number(this.mapValues(t,"showRowLabels")),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.showRowLabels=!Number(e.mapValues(t,"showRowLabels")),e.props.edit(t)}}),wp.element.createElement(Rs,{label:Ps("Group by Row Label"),help:Ps("If checked, groups the bars on the basis of the category/row label."),checked:Number(this.mapValues(t,"groupByRowLabel")),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.groupByRowLabel=!Number(e.mapValues(t,"groupByRowLabel")),e.props.edit(t)}}),wp.element.createElement(Rs,{label:Ps("Color by Row Label"),help:Ps("If checked, colors every bar on the row the same."),checked:Number(this.mapValues(t,"colorByRowLabel")),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.colorByRowLabel=!Number(e.mapValues(t,"colorByRowLabel")),e.props.edit(t)}}),wp.element.createElement(As,{label:Ps("Single Color")},wp.element.createElement(Hs,{value:this.mapValues(t,"singleColor"),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.singleColor=n,e.props.edit(t)}})))}}])&&Ss(t.prototype,n),r&&Ss(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Cs);function Ws(e){return(Ws="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Is(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==Ws(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Ws(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===Ws(o)?o:String(o)),r)}var a,o}function Js(e,t){return(Js=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Us(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vs(e);if(t){var a=Vs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Gs(this,n)}}function Gs(e,t){if(t&&("object"===Ws(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vs(e){return(Vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qs=wp.i18n.__,$s=wp.element,Ks=$s.Component,Zs=$s.Fragment,Qs=wp.components,Xs=Qs.CheckboxControl,el=Qs.PanelBody,tl=Qs.SelectControl,nl=Qs.TextControl,rl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Js(e,t)}(o,e);var t,n,r,a=Us(o);function o(){return Is(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=(this.props.chart["visualizer-chart-type"],this.props.chart["visualizer-chart-library"]);return wp.element.createElement(el,{title:qs("Table Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"DataTable"===n?wp.element.createElement(Zs,null,wp.element.createElement(Xs,{label:qs("Enable Pagination"),help:qs("To enable paging through the data."),checked:"true"===t.paging_bool,onChange:function(n){t.paging_bool="true",n||(t.paging_bool="false"),e.props.edit(t)}}),wp.element.createElement(nl,{label:qs("Number of rows per page"),help:qs("The number of rows in each page, when paging is enabled."),type:"number",value:t.pageLength_int,placeholder:10,onChange:function(n){t.pageLength_int=n,e.props.edit(t)}}),wp.element.createElement(tl,{label:qs("Pagination type"),help:qs("Determines what type of pagination options to show."),value:t.pagingType,options:[{label:qs("Page number buttons only"),value:"numbers"},{label:qs("'Previous' and 'Next' buttons only"),value:"simple"},{label:qs("'Previous' and 'Next' buttons, plus page numbers"),value:"simple_numbers"},{label:qs("'First', 'Previous', 'Next' and 'Last' buttons"),value:"full"},{label:qs("'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers"),value:"full_numbers"},{label:qs("'First' and 'Last' buttons, plus page numbers"),value:"first_last_numbers"}],onChange:function(n){t.pagingType=n,e.props.edit(t)}}),wp.element.createElement(Xs,{label:qs("Scroll Collapse"),help:qs("Allow the table to reduce in height when a limited number of rows are shown."),checked:"true"===t.scrollCollapse_bool,onChange:function(n){t.scrollCollapse_bool="true",n||(t.scrollCollapse_bool="false"),e.props.edit(t)}}),"true"===t.scrollCollapse_bool&&wp.element.createElement(nl,{label:qs("Vertical Height"),help:qs("Vertical scrolling will constrain the table to the given height."),type:"number",value:t.scrollY_int,placeholder:300,onChange:function(n){t.scrollY_int=n,e.props.edit(t)}}),wp.element.createElement(Xs,{label:qs("Disable Sort"),help:qs("To disable sorting on columns."),checked:"false"===t.ordering_bool,onChange:function(n){t.ordering_bool="true",n&&(t.ordering_bool="false"),e.props.edit(t)}}),wp.element.createElement(Xs,{label:qs("Freeze Header/Footer"),help:qs("Freeze the header and footer."),checked:"true"===t.fixedHeader_bool,onChange:function(n){t.fixedHeader_bool="true",n||(t.fixedHeader_bool="false"),e.props.edit(t)}}),wp.element.createElement(Xs,{label:qs("Responsive"),help:qs("Enable the table to be responsive."),checked:"true"===t.responsive_bool,onChange:function(n){t.responsive_bool="true",n||(t.responsive_bool="false"),e.props.edit(t)}})):wp.element.createElement(Zs,null,wp.element.createElement(tl,{label:qs("Enable Pagination"),help:qs("To enable paging through the data."),value:t.pagination?t.pagination:0,options:[{label:qs("Enable"),value:1},{label:qs("Disable"),value:0}],onChange:function(n){t.pagination=n,e.props.edit(t)}}),"1"===t.pagination&&wp.element.createElement(nl,{label:qs("Number of rows per page"),help:qs("The number of rows in each page, when paging is enabled."),type:"number",value:t.pageSize,onChange:function(n){t.pageSize=n,e.props.edit(t)}}),wp.element.createElement(tl,{label:qs("Disable Sort"),help:qs("To disable sorting on columns."),value:t.sort?t.sort:"enable",options:[{label:qs("Enable"),value:"enable"},{label:qs("Disable"),value:"disable"}],onChange:function(n){t.sort=n,e.props.edit(t)}}),wp.element.createElement(nl,{label:qs("Freeze Columns"),help:qs("The number of columns from the left that will be frozen."),type:"number",value:t.frozenColumns,onChange:function(n){t.frozenColumns=n,e.props.edit(t)}}),wp.element.createElement(Xs,{label:qs("Allow HTML"),help:qs("If enabled, formatted values of cells that include HTML tags will be rendered as HTML."),checked:Number(t.allowHtml),onChange:function(n){t.allowHtml=!Number(t.allowHtml),e.props.edit(t)}}),wp.element.createElement(Xs,{label:qs("Right to Left table"),help:qs("Adds basic support for right-to-left languages."),checked:Number(t.rtlTable),onChange:function(n){t.rtlTable=!Number(t.rtlTable),e.props.edit(t)}})))}}])&&Bs(t.prototype,n),r&&Bs(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ks);function al(e){return(al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ol(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function il(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==al(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==al(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===al(o)?o:String(o)),r)}var a,o}function sl(e,t){return(sl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ll(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cl(e);if(t){var a=cl(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ul(this,n)}}function ul(e,t){if(t&&("object"===al(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function cl(e){return(cl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dl=wp.i18n.__,pl=wp.element,ml=pl.Component,hl=pl.Fragment,fl=(wp.blockEditor||wp.editor).ColorPalette,_l=wp.components,yl=_l.BaseControl,bl=_l.PanelBody,vl=_l.TextControl,gl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sl(e,t)}(o,e);var t,n,r,a=ll(o);function o(){return ol(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=(this.props.chart["visualizer-chart-type"],this.props.chart["visualizer-chart-library"]);return wp.element.createElement(bl,{title:dl("Row/Cell Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"DataTable"===n?wp.element.createElement(hl,null,wp.element.createElement(bl,{title:dl("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(yl,{label:dl("Background Color")},wp.element.createElement(fl,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(yl,{label:dl("Color")},wp.element.createElement(fl,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(vl,{label:dl("Text Orientation"),help:dl("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(bl,{title:dl("Even Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(yl,{label:dl("Background Color")},wp.element.createElement(fl,{value:t.customcss.evenTableRow["background-color"],onChange:function(n){t.customcss.evenTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(yl,{label:dl("Color")},wp.element.createElement(fl,{value:t.customcss.evenTableRow.color,onChange:function(n){t.customcss.evenTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(vl,{label:dl("Text Orientation"),help:dl("In degrees."),type:"number",value:t.customcss.evenTableRow.transform,onChange:function(n){t.customcss.evenTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(bl,{title:dl("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(yl,{label:dl("Background Color")},wp.element.createElement(fl,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(yl,{label:dl("Color")},wp.element.createElement(fl,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(vl,{label:dl("Text Orientation"),help:dl("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))):wp.element.createElement(hl,null,wp.element.createElement(bl,{title:dl("Header Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(yl,{label:dl("Background Color")},wp.element.createElement(fl,{value:t.customcss.headerRow["background-color"],onChange:function(n){t.customcss.headerRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(yl,{label:dl("Color")},wp.element.createElement(fl,{value:t.customcss.headerRow.color,onChange:function(n){t.customcss.headerRow.color=n,e.props.edit(t)}})),wp.element.createElement(vl,{label:dl("Text Orientation"),help:dl("In degrees."),type:"number",value:t.customcss.headerRow.transform,onChange:function(n){t.customcss.headerRow.transform=n,e.props.edit(t)}})),wp.element.createElement(bl,{title:dl("Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(yl,{label:dl("Background Color")},wp.element.createElement(fl,{value:t.customcss.tableRow["background-color"],onChange:function(n){t.customcss.tableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(yl,{label:dl("Color")},wp.element.createElement(fl,{value:t.customcss.tableRow.color,onChange:function(n){t.customcss.tableRow.color=n,e.props.edit(t)}})),wp.element.createElement(vl,{label:dl("Text Orientation"),help:dl("In degrees."),type:"number",value:t.customcss.tableRow.transform,onChange:function(n){t.customcss.tableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(bl,{title:dl("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(yl,{label:dl("Background Color")},wp.element.createElement(fl,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(yl,{label:dl("Color")},wp.element.createElement(fl,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(vl,{label:dl("Text Orientation"),help:dl("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(bl,{title:dl("Selected Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(yl,{label:dl("Background Color")},wp.element.createElement(fl,{value:t.customcss.selectedTableRow["background-color"],onChange:function(n){t.customcss.selectedTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(yl,{label:dl("Color")},wp.element.createElement(fl,{value:t.customcss.selectedTableRow.color,onChange:function(n){t.customcss.selectedTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(vl,{label:dl("Text Orientation"),help:dl("In degrees."),type:"number",value:t.customcss.selectedTableRow.transform,onChange:function(n){t.customcss.selectedTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(bl,{title:dl("Hover Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(yl,{label:dl("Background Color")},wp.element.createElement(fl,{value:t.customcss.hoverTableRow["background-color"],onChange:function(n){t.customcss.hoverTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(yl,{label:dl("Color")},wp.element.createElement(fl,{value:t.customcss.hoverTableRow.color,onChange:function(n){t.customcss.hoverTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(vl,{label:dl("Text Orientation"),help:dl("In degrees."),type:"number",value:t.customcss.hoverTableRow.transform,onChange:function(n){t.customcss.hoverTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(bl,{title:dl("Header Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(yl,{label:dl("Background Color")},wp.element.createElement(fl,{value:t.customcss.headerCell["background-color"],onChange:function(n){t.customcss.headerCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(yl,{label:dl("Color")},wp.element.createElement(fl,{value:t.customcss.headerCell.color,onChange:function(n){t.customcss.headerCell.color=n,e.props.edit(t)}})),wp.element.createElement(vl,{label:dl("Text Orientation"),help:dl("In degrees."),type:"number",value:t.customcss.headerCell.transform,onChange:function(n){t.customcss.headerCell.transform=n,e.props.edit(t)}})),wp.element.createElement(bl,{title:dl("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(yl,{label:dl("Background Color")},wp.element.createElement(fl,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(yl,{label:dl("Color")},wp.element.createElement(fl,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(vl,{label:dl("Text Orientation"),help:dl("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))))}}])&&il(t.prototype,n),r&&il(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ml);function wl(e){return(wl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ml(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==wl(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==wl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===wl(o)?o:String(o)),r)}var a,o}function Ll(e,t){return(Ll=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Yl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sl(e);if(t){var a=Sl(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Tl(this,n)}}function Tl(e,t){if(t&&("object"===wl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Sl(e){return(Sl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dl=wp.i18n.__,Ol=wp.element.Component,jl=wp.components,xl=jl.PanelBody,El=jl.SelectControl,Pl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ll(e,t)}(o,e);var t,n,r,a=Yl(o);function o(){return Ml(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(xl,{title:Dl("Combo Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(El,{label:Dl("Chart Type"),help:Dl("Select the default chart type."),value:t.seriesType?t.seriesType:"area",options:[{label:Dl("Area"),value:"area"},{label:Dl("Bar"),value:"bars"},{label:Dl("Candlesticks"),value:"candlesticks"},{label:Dl("Line"),value:"line"},{label:Dl("Stepped Area"),value:"steppedArea"}],onChange:function(n){t.seriesType=n,e.props.edit(t)}}))}}])&&kl(t.prototype,n),r&&kl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ol);function Cl(e){return(Cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==Cl(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Cl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===Cl(o)?o:String(o)),r)}var a,o}function Al(e,t){return(Al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Rl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Fl(e);if(t){var a=Fl(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Nl(this,n)}}function Nl(e,t){if(t&&("object"===Cl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Fl(e){return(Fl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wl=wp.i18n.__,Il=wp.element,Bl=Il.Component,Jl=Il.Fragment,Ul=(wp.blockEditor||wp.editor).ColorPalette,Gl=wp.components,Vl=Gl.BaseControl,ql=Gl.ExternalLink,$l=Gl.PanelBody,Kl=Gl.SelectControl,Zl=Gl.TextControl,Ql=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Al(e,t)}(o,e);var t,n,r,a=Rl(o);function o(){return Hl(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];Object.keys(e.series).map((function(t){void 0!==e.series[t]&&(e.series[t].temp=1)})),this.props.edit(e)}},{key:"render",value:function(){var e=this,t=(this.props.chart["visualizer-chart-type"],this.props.chart["visualizer-settings"]),n=this.props.chart["visualizer-series"];return wp.element.createElement($l,{title:Wl("Series Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.series).map((function(r,a){r=parseInt(r)+1;var o=parseInt(r),i=n[r].label||"",s=n[r].type||"",l=0;return"tabular"!==s&&(o=a),r++,wp.element.createElement($l,{title:i,className:"visualizer-inner-sections",initialOpen:!1},-1>=["tabular","pie"].indexOf(s)&&wp.element.createElement(Kl,{label:Wl("Visible In Legend"),help:Wl("Determines whether the series has to be presented in the legend or not."),value:t.series[a].visibleInLegend?t.series[a].visibleInLegend:"1",options:[{label:Wl("Yes"),value:"1"},{label:Wl("No"),value:"0"}],onChange:function(n){t.series[a].visibleInLegend=n,e.props.edit(t)}}),-1>=["tabular","candlestick","combo","column","bar"].indexOf(s)&&wp.element.createElement(Jl,null,wp.element.createElement(Zl,{label:Wl("Line Width"),help:Wl("Overrides the global line width value for this series."),value:t.series[a].lineWidth,onChange:function(n){t.series[a].lineWidth=n,e.props.edit(t)},onKeyUp:function(n){clearTimeout(l),l=setTimeout((function(){""!=t.series[a].lineWidth&&0>=t.series[a].lineWidth&&(t.series[a].lineWidth="0.1",e.props.edit(t))}),700)}}),wp.element.createElement(Zl,{label:Wl("Point Size"),help:Wl("Overrides the global point size value for this series."),value:t.series[a].pointSize,onChange:function(n){t.series[a].pointSize=n,e.props.edit(t)}})),-1>=["candlestick"].indexOf(s)&&s&&"number"===s?wp.element.createElement(Jl,null,wp.element.createElement(Zl,{label:Wl("Format"),help:Wl("Enter custom format pattern to apply to this series value."),value:t.series[o].format,onChange:function(n){t.series[o].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,Wl("For number axis labels, this is a subset of the formatting "),wp.element.createElement(ql,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Wl("ICU pattern set.")),Wl(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100."))):0<=["date","datetime","timeofday"].indexOf(s)&&wp.element.createElement(Jl,null,wp.element.createElement(Zl,{label:Wl("Date Format"),help:Wl("Enter custom format pattern to apply to this series value."),placeholder:"dd LLLL yyyy",value:t.series[o].format,onChange:function(n){t.series[o].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,Wl("This is a subset of the date formatting "),wp.element.createElement(ql,{href:"https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax"},Wl("ICU date and time format.")))),0<=["scatter","line"].indexOf(s)&&wp.element.createElement(Kl,{label:Wl("Curve Type"),help:Wl("Determines whether the series has to be presented in the legend or not."),value:t.series[a].curveType?t.series[a].curveType:"none",options:[{label:Wl("Straight line without curve"),value:"none"},{label:Wl("The angles of the line will be smoothed"),value:"function"}],onChange:function(n){t.series[a].curveType=n,e.props.edit(t)}}),0<=["area"].indexOf(s)&&wp.element.createElement(Zl,{label:Wl("Area Opacity"),help:Wl("The opacity of the colored area, where 0.0 is fully transparent and 1.0 is fully opaque."),value:t.series[a].areaOpacity,onChange:function(n){t.series[a].areaOpacity=n,e.props.edit(t)}}),0<=["combo"].indexOf(s)&&wp.element.createElement(Kl,{label:Wl("Chart Type"),help:Wl("Select the type of chart to show for this series."),value:t.series[a].type?t.series[a].type:"area",options:[{label:Wl("Area"),value:"area"},{label:Wl("Bar"),value:"bars"},{label:Wl("Candlesticks"),value:"candlesticks"},{label:Wl("Line"),value:"line"},{label:Wl("Stepped Area"),value:"steppedArea"}],onChange:function(n){t.series[a].type=n,e.props.edit(t)}}),-1>=["tabular"].indexOf(s)&&wp.element.createElement(Vl,{label:Wl("Color")},wp.element.createElement(Ul,{value:t.series[a].color,onChange:function(n){t.series[a].color=n,e.props.edit(t)}})))})))}}])&&zl(t.prototype,n),r&&zl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Bl);function Xl(e){return(Xl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==Xl(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Xl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===Xl(o)?o:String(o)),r)}var a,o}function nu(e,t){return(nu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ru(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ou(e);if(t){var a=ou(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return au(this,n)}}function au(e,t){if(t&&("object"===Xl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ou(e){return(ou=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var iu=wp.i18n.__,su=wp.element.Component,lu=(wp.blockEditor||wp.editor).ColorPalette,uu=wp.components,cu=uu.BaseControl,du=uu.PanelBody,pu=uu.TextControl,mu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nu(e,t)}(o,e);var t,n,r,a=ru(o);function o(){return eu(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];Object.keys(e.slices).map((function(t){void 0!==e.slices[t]&&(e.slices[t].temp=1)})),this.props.edit(e)}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-data"];return wp.element.createElement(du,{title:iu("Slices Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.slices).map((function(r){return wp.element.createElement(du,{title:n[r][0],className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(pu,{label:iu("Slice Offset"),help:iu("How far to separate the slice from the rest of the pie, from 0.0 (not at all) to 1.0 (the pie's radius)."),value:t.slices[r].offset,onChange:function(n){t.slices[r].offset=n,e.props.edit(t)},type:"number",min:"0",step:"0.1"}),wp.element.createElement(cu,{label:iu("Format")},wp.element.createElement(lu,{value:t.slices[r].color,onChange:function(n){t.slices[r].color=n,e.props.edit(t)}})))})))}}])&&tu(t.prototype,n),r&&tu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(su);function hu(e){return(hu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==hu(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==hu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===hu(o)?o:String(o)),r)}var a,o}function yu(e,t){return(yu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function bu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gu(e);if(t){var a=gu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return vu(this,n)}}function vu(e,t){if(t&&("object"===hu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function gu(e){return(gu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wu=wp.i18n.__,Mu=wp.element.Component,ku=(wp.blockEditor||wp.editor).ColorPalette,Lu=wp.components,Yu=Lu.CheckboxControl,Tu=Lu.BaseControl,Su=Lu.PanelBody,Du=Lu.TextControl,Ou=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yu(e,t)}(o,e);var t,n,r,a=bu(o);function o(){return fu(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Su,{title:wu("Bubble Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Du,{label:wu("Opacity"),help:wu("The default opacity of the bubbles, where 0.0 is fully transparent and 1.0 is fully opaque."),type:"number",min:"0",max:"1",step:"0.1",value:t.bubble.opacity,onChange:function(n){t.bubble||(t.bubble={}),t.bubble.opacity=n,e.props.edit(t)}}),wp.element.createElement(Tu,{label:wu("Stroke Color")},wp.element.createElement(ku,{value:t.bubble.stroke,onChange:function(n){t.bubble||(t.bubble={}),t.bubble.stroke=n,e.props.edit(t)}})),wp.element.createElement(Yu,{label:wu("Sort Bubbles by Size"),help:wu("If checked, sorts the bubbles by size so the smaller bubbles appear above the larger bubbles. If unchecked, bubbles are sorted according to their order in the table."),checked:Q(t,"sortBubblesBySize"),onChange:function(n){t.sortBubblesBySize=n,e.props.edit(t)}}),wp.element.createElement(Du,{label:wu("Size (max)"),help:wu("The size value (as appears in the chart data) to be mapped to sizeAxis.maxSize. Larger values will be cropped to this value."),type:"number",step:"1",value:t.sizeAxis.maxValue,onChange:function(n){t.sizeAxis||(t.sizeAxis={}),t.sizeAxis.maxValue=n,e.props.edit(t)}}),wp.element.createElement(Du,{label:wu("Size (min)"),help:wu("The size value (as appears in the chart data) to be mapped to sizeAxis.minSize. Smaller values will be cropped to this value."),type:"number",step:"1",value:t.sizeAxis.minValue,onChange:function(n){t.sizeAxis||(t.sizeAxis={}),t.sizeAxis.minValue=n,e.props.edit(t)}}))}}])&&_u(t.prototype,n),r&&_u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Mu);function ju(e){return(ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==ju(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ju(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===ju(o)?o:String(o)),r)}var a,o}function Pu(e,t){return(Pu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Cu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zu(e);if(t){var a=zu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Hu(this,n)}}function Hu(e,t){if(t&&("object"===ju(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function zu(e){return(zu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Au=wp.i18n.__,Ru=wp.element,Nu=Ru.Component,Fu=Ru.Fragment,Wu=wp.components,Iu=Wu.ExternalLink,Bu=Wu.PanelBody,Ju=Wu.TextControl,Uu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pu(e,t)}(o,e);var t,n,r,a=Cu(o);function o(){return xu(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];e.series&&(Object.keys(e.series).map((function(t){void 0!==e.series[t]&&(e.series[t].temp=1)})),this.props.edit(e))}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-series"];return this.props.chart["visualizer-chart-type"],t.series?wp.element.createElement(Bu,{title:Au("Column Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.series).map((function(r){return"string"===n[r].type?null:wp.element.createElement(Bu,{title:n[r].label,className:"visualizer-inner-sections",initialOpen:!1},0<=["date","datetime","timeofday"].indexOf(n[r].type)&&wp.element.createElement(Fu,null,wp.element.createElement(Ju,{label:Au("Display Date Format"),help:Au("Enter custom format pattern to apply to this series value."),value:t.series[r].format?t.series[r].format.to:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.to=n,e.props.edit(t)}}),wp.element.createElement(Ju,{label:Au("Source Date Format"),help:Au("What format is the source date in?"),value:t.series[r].format?t.series[r].format.from:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.from=n,e.props.edit(t)}}),wp.element.createElement("p",null,Au("You can find more info on "),wp.element.createElement(Iu,{href:"https://momentjs.com/docs/#/displaying/"},Au("date and time formats here.")))),"number"===n[r].type&&wp.element.createElement(Fu,null,wp.element.createElement(Ju,{label:Au("Thousands Separator"),value:t.series[r].format?t.series[r].format.thousands:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.thousands=n,e.props.edit(t)}}),wp.element.createElement(Ju,{label:Au("Decimal Separator"),value:t.series[r].format?t.series[r].format.decimal:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.decimal=n,e.props.edit(t)}}),wp.element.createElement(Ju,{label:Au("Precision"),help:Au("Round values to how many decimal places?"),value:t.series[r].format?t.series[r].format.precision:"",type:"number",min:"0",onChange:function(n){100<n||(t.series[r].format||(t.series[r].format={}),t.series[r].format.precision=n,e.props.edit(t))}}),wp.element.createElement(Ju,{label:Au("Prefix"),value:t.series[r].format?t.series[r].format.prefix:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.prefix=n,e.props.edit(t)}}),wp.element.createElement(Ju,{label:Au("Suffix"),value:t.series[r].format?t.series[r].format.suffix:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.suffix=n,e.props.edit(t)}})),"boolean"===n[r].type&&wp.element.createElement(Fu,null,wp.element.createElement(Ju,{label:Au("Truthy value"),help:Au("Provide the HTML entity code for the value the table should display when the value of the column is true. e.g. tick mark (Code: &#10004;) instead of true"),value:t.series[r].format?t.series[r].format.truthy:"",onChange:function(n){t.series[r].truthy||(t.series[r].truthy={}),t.series[r].format.truthy=n,e.props.edit(t)}}),wp.element.createElement(Ju,{label:Au("Falsy value"),help:Au("Provide the HTML entity code for the value the table should display when the value of the column is false. e.g. cross mark (Code: &#10006;) instead of false"),value:t.series[r].format?t.series[r].format.falsy:"",onChange:function(n){t.series[r].falsy||(t.series[r].falsy={}),t.series[r].format.falsy=n,e.props.edit(t)}})))}))):null}}])&&Eu(t.prototype,n),r&&Eu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Nu);function Gu(e){return(Gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==Gu(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Gu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===Gu(o)?o:String(o)),r)}var a,o}function $u(e,t){return($u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ku(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qu(e);if(t){var a=Qu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Zu(this,n)}}function Zu(e,t){if(t&&("object"===Gu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Qu(e){return(Qu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xu=wp.i18n.__,ec=wp.element,tc=ec.Component,nc=ec.Fragment,rc=(wp.blockEditor||wp.editor).ColorPalette,ac=wp.components,oc=ac.BaseControl,ic=ac.CheckboxControl,sc=ac.PanelBody,lc=ac.SelectControl,uc=ac.TextControl,cc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$u(e,t)}(o,e);var t,n,r,a=Ku(o);function o(){return Vu(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(sc,{title:Xu("Layout And Chart Area"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(sc,{title:Xu("Layout"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(uc,{label:Xu("Width of Chart"),help:Xu("Determines the total width of the chart."),value:n.width,onChange:function(t){n.width=t,e.props.edit(n)}}),wp.element.createElement(uc,{label:Xu("Height of Chart"),help:Xu("Determines the total height of the chart."),value:n.height,onChange:function(t){n.height=t,e.props.edit(n)}}),0<=["geo"].indexOf(t)&&wp.element.createElement(lc,{label:Xu("Keep Aspect Ratio"),help:Xu("If yes, the map will be drawn at the largest size that can fit inside the chart area at its natural aspect ratio. If only one of the width and height options is specified, the other one will be calculated according to the aspect ratio. If no, the map will be stretched to the exact size of the chart as specified by the width and height options."),value:n.keepAspectRatio?n.isStacked:"1",options:[{label:Xu("Yes"),value:"1"},{label:Xu("No"),value:"0"}],onChange:function(t){n.keepAspectRatio=t,e.props.edit(n)}}),-1>=["gauge","tabular"].indexOf(t)&&wp.element.createElement(nc,null,wp.element.createElement(uc,{label:Xu("Stroke Width"),help:Xu("The chart border width in pixels."),value:n.backgroundColor.strokeWidth,onChange:function(t){n.backgroundColor.strokeWidth=t,e.props.edit(n)}}),wp.element.createElement(oc,{label:Xu("Stroke Color")},wp.element.createElement(rc,{value:n.backgroundColor.stroke,onChange:function(t){n.backgroundColor.stroke=t,e.props.edit(n)}})),wp.element.createElement(oc,{label:Xu("Background Color")},wp.element.createElement(rc,{value:n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill=t,e.props.edit(n)}})),wp.element.createElement(ic,{label:Xu("Transparent Background?"),checked:"transparent"===n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill="transparent"===n.backgroundColor.fill?"":"transparent",e.props.edit(n)}}))),-1>=["geo","gauge","tabular"].indexOf(t)&&wp.element.createElement(sc,{title:Xu("Chart Area"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(uc,{label:Xu("Left Margin"),help:Xu("Determines how far to draw the chart from the left border."),value:n.chartArea.left,onChange:function(t){n.chartArea.left=t,e.props.edit(n)}}),wp.element.createElement(uc,{label:Xu("Top Margin"),help:Xu("Determines how far to draw the chart from the top border."),value:n.chartArea.top,onChange:function(t){n.chartArea.top=t,e.props.edit(n)}}),wp.element.createElement(uc,{label:Xu("Width Of Chart Area"),help:Xu("Determines the width of the chart area."),value:n.chartArea.width,onChange:function(t){n.chartArea.width=t,e.props.edit(n)}}),wp.element.createElement(uc,{label:Xu("Height Of Chart Area"),help:Xu("Determines the hight of the chart area."),value:n.chartArea.height,onChange:function(t){n.chartArea.height=t,e.props.edit(n)}})))}}])&&qu(t.prototype,n),r&&qu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(tc);function dc(e){return(dc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==dc(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==dc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===dc(o)?o:String(o)),r)}var a,o}function hc(e,t){return(hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function fc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yc(e);if(t){var a=yc(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _c(this,n)}}function _c(e,t){if(t&&("object"===dc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function yc(e){return(yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bc=wp.i18n.__,vc=wp.element,gc=vc.Component,wc=vc.Fragment,Mc=wp.components,kc=Mc.Button,Lc=Mc.CheckboxControl,Yc=Mc.PanelBody,Tc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hc(e,t)}(o,e);var t,n,r,a=fc(o);function o(){return pc(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];void 0===e.actions&&(e.actions=[]),this.props.edit(e)}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-chart-type"];return""!==visualizerLocalize.proFeaturesLocked?wp.element.createElement(Yc,{title:bc("Frontend Actions"),initialOpen:!1,className:"visualizer-advanced-panel"},void 0!==t.actions&&wp.element.createElement(wc,null,wp.element.createElement(Lc,{label:bc("Print"),help:bc("To enable printing the data."),checked:0<=t.actions.indexOf("print"),onChange:function(n){if(0<=t.actions.indexOf("print")){var r=t.actions.indexOf("print");-1!==r&&t.actions.splice(r,1)}else t.actions.push("print");e.props.edit(t)}}),wp.element.createElement(Lc,{label:bc("CSV"),help:bc("To enable downloading the data as a CSV."),checked:0<=t.actions.indexOf("csv;application/csv"),onChange:function(n){if(0<=t.actions.indexOf("csv;application/csv")){var r=t.actions.indexOf("csv;application/csv");-1!==r&&t.actions.splice(r,1)}else t.actions.push("csv;application/csv");e.props.edit(t)}}),wp.element.createElement(Lc,{label:bc("Excel"),help:bc("To enable downloading the data as an Excel spreadsheet."),checked:0<=t.actions.indexOf("xls;application/vnd.ms-excel"),onChange:function(n){if(0<=t.actions.indexOf("xls;application/vnd.ms-excel")){var r=t.actions.indexOf("xls;application/vnd.ms-excel");-1!==r&&t.actions.splice(r,1)}else t.actions.push("xls;application/vnd.ms-excel");e.props.edit(t)}}),wp.element.createElement(Lc,{label:bc("Copy"),help:bc("To enable copying the data to the clipboard."),checked:0<=t.actions.indexOf("copy"),onChange:function(n){if(0<=t.actions.indexOf("copy")){var r=t.actions.indexOf("copy");-1!==r&&t.actions.splice(r,1)}else t.actions.push("copy");e.props.edit(t)}}),-1>=["dataTable","tabular","gauge","table"].indexOf(n)&&wp.element.createElement(Lc,{label:bc("Download Image"),help:bc("To download the chart as an image."),checked:0<=t.actions.indexOf("image"),onChange:function(n){if(0<=t.actions.indexOf("image")){var r=t.actions.indexOf("image");-1!==r&&t.actions.splice(r,1)}else t.actions.push("image");e.props.edit(t)}}))):wp.element.createElement(Yc,{title:bc("Frontend Actions"),initialOpen:!1,icon:"lock",className:"visualizer-advanced-panel"},wp.element.createElement("p",null,bc("Enable this feature in PRO version!")),wp.element.createElement(kc,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},bc("Buy Now")))}}])&&mc(t.prototype,n),r&&mc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(gc);function Sc(e){return(Sc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dc(e){var t=function(e,t){if("object"!==Sc(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Sc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Sc(t)?t:String(t)}function Oc(e,t,n){return(t=Dc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Oc(e,t,n[t])}))}return e}var xc={dark_vscode_tribute:{default:"#D4D4D4",background:"#1E1E1E",background_warning:"#1E1E1E",string:"#CE8453",number:"#B5CE9F",colon:"#49B8F7",keys:"#9CDCFE",keys_whiteSpace:"#AF74A5",primitive:"#6392C6"},light_mitsuketa_tribute:{default:"#D4D4D4",background:"#FCFDFD",background_warning:"#FEECEB",string:"#FA7921",number:"#70CE35",colon:"#49B8F7",keys:"#59A5D8",keys_whiteSpace:"#835FB6",primitive:"#386FA4"}},Ec=n(2);const Pc={getCaller:(e=1)=>{var t=(new Error).stack.replace(/^Error\s+/,"");return t=(t=t.split("\n")[e]).replace(/^\s+at Object./,"").replace(/^\s+at /,"").replace(/ \(.+\)$/,"")},throwError:(e="unknown function",t="unknown parameter",n="to be defined")=>{throw["@",e,"(): Expected parameter '",t,"' ",n].join("")},isUndefined:(e="<unknown parameter>",t)=>{[null,void 0].indexOf(t)>-1&&Pc.throwError(Pc.getCaller(2),e)},isFalsy:(e="<unknown parameter>",t)=>{t||Pc.throwError(Pc.getCaller(2),e)},isNoneOf:(e="<unknown parameter>",t,n=[])=>{-1===n.indexOf(t)&&Pc.throwError(Pc.getCaller(2),e,"to be any of"+JSON.stringify(n))},isAnyOf:(e="<unknown parameter>",t,n=[])=>{n.indexOf(t)>-1&&Pc.throwError(Pc.getCaller(2),e,"not to be any of"+JSON.stringify(n))},isNotType:(e="<unknown parameter>",t,n="")=>{Object(Ec.getType)(t)!==n.toLowerCase()&&Pc.throwError(Pc.getCaller(2),e,"to be type "+n.toLowerCase())},isAnyTypeOf:(e="<unknown parameter>",t,n=[])=>{n.forEach(n=>{Object(Ec.getType)(t)===n&&Pc.throwError(Pc.getCaller(2),e,"not to be type of "+n.toLowerCase())})},missingKey:(e="<unknown parameter>",t,n="")=>{Pc.isUndefined(e,t),-1===Object.keys(t).indexOf(n)&&Pc.throwError(Pc.getCaller(2),e,"to contain '"+n+"' key")},missingAnyKeys:(e="<unknown parameter>",t,n=[""])=>{Pc.isUndefined(e,t);const r=Object.keys(t);n.forEach(t=>{-1===r.indexOf(t)&&Pc.throwError(Pc.getCaller(2),e,"to contain '"+t+"' key")})},containsUndefined:(e="<unknown parameter>",t)=>{[void 0,null].forEach(n=>{const r=Object(Ec.locate)(t,n);r&&Pc.throwError(Pc.getCaller(2),e,"not to contain '"+JSON.stringify(n)+"' at "+r)})},isInvalidPath:(e="<unknown parameter>",t)=>{Pc.isUndefined(e,t),Pc.isNotType(e,t,"string"),Pc.isAnyOf(e,t,["","/"]),".$[]#".split().forEach(n=>{t.indexOf(n)>-1&&Pc.throwError(Pc.getCaller(2),e,"not to contain invalid character '"+n+"'")}),t.match(/\/{2,}/g)&&Pc.throwError(Pc.getCaller(2),e,"not to contain consecutive forward slash characters")},isInvalidWriteData:(e="<unknown parameter>",t)=>{Pc.isUndefined(e,t),Pc.containsUndefined(e,t)}};var Cc=Pc;const Hc=(e,t)=>t?Object.keys(t).reduce((e,n)=>e.replace(new RegExp(`\\{${n}\\}`,"gi"),(e=>Array.isArray(e)?e.join(", "):"string"==typeof e?e:""+e)(t[n])),e):e;var zc={format:"{reason} at line {line}",symbols:{colon:"colon",comma:"comma",semicolon:"semicolon",slash:"slash",backslash:"backslash",brackets:{round:"round brackets",square:"square brackets",curly:"curly brackets",angle:"angle brackets"},period:"period",quotes:{single:"single quote",double:"double quote",grave:"grave accent"},space:"space",ampersand:"ampersand",asterisk:"asterisk",at:"at sign",equals:"equals sign",hash:"hash",percent:"percent",plus:"plus",minus:"minus",dash:"dash",hyphen:"hyphen",tilde:"tilde",underscore:"underscore",bar:"vertical bar"},types:{key:"key",value:"value",number:"number",string:"string",primitive:"primitive",boolean:"boolean",character:"character",integer:"integer",array:"array",float:"float"},invalidToken:{tokenSequence:{prohibited:"'{firstToken}' token cannot be followed by '{secondToken}' token(s)",permitted:"'{firstToken}' token can only be followed by '{secondToken}' token(s)"},termSequence:{prohibited:"A {firstTerm} cannot be followed by a {secondTerm}",permitted:"A {firstTerm} can only be followed by a {secondTerm}"},double:"'{token}' token cannot be followed by another '{token}' token",useInstead:"'{badToken}' token is not accepted. Use '{goodToken}' instead",unexpected:"Unexpected '{token}' token found"},brace:{curly:{missingOpen:"Missing '{' open curly brace",missingClose:"Open '{' curly brace is missing closing '}' curly brace",cannotWrap:"'{token}' token cannot be wrapped in '{}' curly braces"},square:{missingOpen:"Missing '[' open square brace",missingClose:"Open '[' square brace is missing closing ']' square brace",cannotWrap:"'{token}' token cannot be wrapped in '[]' square braces"}},string:{missingOpen:"Missing/invalid opening string '{quote}' token",missingClose:"Missing/invalid closing string '{quote}' token",mustBeWrappedByQuotes:"Strings must be wrapped by quotes",nonAlphanumeric:"Non-alphanumeric token '{token}' is not allowed outside string notation",unexpectedKey:"Unexpected key found at string position"},key:{numberAndLetterMissingQuotes:"Key beginning with number and containing letters must be wrapped by quotes",spaceMissingQuotes:"Key containing space must be wrapped by quotes",unexpectedString:"Unexpected string found at key position"},noTrailingOrLeadingComma:"Trailing or leading commas in arrays and objects are not permitted"};
65 -/** @license react-json-editor-ajrm v2.5.14
64 +!function(t,r){"use strict";var a;try{a=n(0)}catch(e){}e.exports=function(e){var t="function"==typeof e,n=!!window.addEventListener,r=window.document,a=window.setTimeout,o=function(e,t,r,a){n?e.addEventListener(t,r,!!a):e.attachEvent("on"+t,r)},i=function(e,t,r,a){n?e.removeEventListener(t,r,!!a):e.detachEvent("on"+t,r)},s=function(e,t,n){var a;r.createEvent?((a=r.createEvent("HTMLEvents")).initEvent(t,!0,!1),a=_(a,n),e.dispatchEvent(a)):r.createEventObject&&(a=r.createEventObject(),a=_(a,n),e.fireEvent("on"+t,a))},l=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},u=function(e){return/Array/.test(Object.prototype.toString.call(e))},c=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},d=function(e){var t=e.getDay();return 0===t||6===t},p=function(e){return e%4==0&&e%100!=0||e%400==0},m=function(e,t){return[31,p(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},h=function(e){c(e)&&e.setHours(0,0,0,0)},f=function(e,t){return e.getTime()===t.getTime()},_=function(e,t,n){var r,a;for(r in t)(a=void 0!==e[r])&&"object"==typeof t[r]&&null!==t[r]&&void 0===t[r].nodeName?c(t[r])?n&&(e[r]=new Date(t[r].getTime())):u(t[r])?n&&(e[r]=t[r].slice(0)):e[r]=_({},t[r],n):!n&&a||(e[r]=t[r]);return e},y=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},b={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},g=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},v=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},w=function(e,t){return"<tr>"+(t?e.reverse():e).join("")+"</tr>"},M=function(e,t,n,r,a,o){var i,s,l,c,d,p=e._o,m=n===p.minYear,h=n===p.maxYear,f='<div id="'+o+'" class="pika-title" role="heading" aria-live="assertive">',_=!0,y=!0;for(l=[],i=0;i<12;i++)l.push('<option value="'+(n===a?i-t:12+i-t)+'"'+(i===r?' selected="selected"':"")+(m&&i<p.minMonth||h&&i>p.maxMonth?'disabled="disabled"':"")+">"+p.i18n.months[i]+"</option>");for(c='<div class="pika-label">'+p.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",u(p.yearRange)?(i=p.yearRange[0],s=p.yearRange[1]+1):(i=n-p.yearRange,s=1+n+p.yearRange),l=[];i<s&&i<=p.maxYear;i++)i>=p.minYear&&l.push('<option value="'+i+'"'+(i===n?' selected="selected"':"")+">"+i+"</option>");return d='<div class="pika-label">'+n+p.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",p.showMonthAfterYear?f+=d+c:f+=c+d,m&&(0===r||p.minMonth>=r)&&(_=!1),h&&(11===r||p.maxMonth<=r)&&(y=!1),0===t&&(f+='<button class="pika-prev'+(_?"":" is-disabled")+'" type="button">'+p.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(f+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+p.i18n.nextMonth+"</button>"),f+"</div>"},k=function(i){var s=this,u=s.config(i);s._onMouseDown=function(e){if(s._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(l(t,"is-disabled")||(!l(t,"pika-button")||l(t,"is-empty")||l(t.parentNode,"is-disabled")?l(t,"pika-prev")?s.prevMonth():l(t,"pika-next")&&s.nextMonth():(s.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),u.bound&&a((function(){s.hide(),u.field&&u.field.blur()}),100))),l(t,"pika-select"))s._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},s._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(l(t,"pika-select-month")?s.gotoMonth(t.value):l(t,"pika-select-year")&&s.gotoYear(t.value))},s._onKeyChange=function(e){if(e=e||window.event,s.isVisible())switch(e.keyCode){case 13:case 27:u.field.blur();break;case 37:e.preventDefault(),s.adjustDate("subtract",1);break;case 38:s.adjustDate("subtract",7);break;case 39:s.adjustDate("add",1);break;case 40:s.adjustDate("add",7)}},s._onInputChange=function(n){var r;n.firedBy!==s&&(r=t?(r=e(u.field.value,u.format,u.formatStrict))&&r.isValid()?r.toDate():null:new Date(Date.parse(u.field.value)),c(r)&&s.setDate(r),s._v||s.show())},s._onInputFocus=function(){s.show()},s._onInputClick=function(){s.show()},s._onInputBlur=function(){var e=r.activeElement;do{if(l(e,"pika-single"))return}while(e=e.parentNode);s._c||(s._b=a((function(){s.hide()}),50)),s._c=!1},s._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,r=t;if(t){!n&&l(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),o(t,"change",s._onChange)));do{if(l(r,"pika-single")||r===u.trigger)return}while(r=r.parentNode);s._v&&t!==u.trigger&&r!==u.trigger&&s.hide()}},s.el=r.createElement("div"),s.el.className="pika-single"+(u.isRTL?" is-rtl":"")+(u.theme?" "+u.theme:""),o(s.el,"mousedown",s._onMouseDown,!0),o(s.el,"touchend",s._onMouseDown,!0),o(s.el,"change",s._onChange),o(r,"keydown",s._onKeyChange),u.field&&(u.container?u.container.appendChild(s.el):u.bound?r.body.appendChild(s.el):u.field.parentNode.insertBefore(s.el,u.field.nextSibling),o(u.field,"change",s._onInputChange),u.defaultDate||(t&&u.field.value?u.defaultDate=e(u.field.value,u.format).toDate():u.defaultDate=new Date(Date.parse(u.field.value)),u.setDefaultDate=!0));var d=u.defaultDate;c(d)?u.setDefaultDate?s.setDate(d,!0):s.gotoDate(d):s.gotoDate(new Date),u.bound?(this.hide(),s.el.className+=" is-bound",o(u.trigger,"click",s._onInputClick),o(u.trigger,"focus",s._onInputFocus),o(u.trigger,"blur",s._onInputBlur)):this.show()};return k.prototype={config:function(e){this._o||(this._o=_({},b,!0));var t=_(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,c(t.minDate)||(t.minDate=!1),c(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),u(t.yearRange)){var r=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||r,t.yearRange[1]=parseInt(t.yearRange[1],10)||r}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||b.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(n){return c(this._d)?t?e(this._d).format(n||this._o.format):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,r){t&&e.isMoment(n)&&this.setDate(n.toDate(),r)},getDate:function(){return c(this._d)?new Date(this._d.getTime()):new Date},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",s(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),c(e)){var n=this._o.minDate,r=this._o.maxDate;c(n)&&e<n?e=n:c(r)&&e>r&&(e=r),this._d=new Date(e.getTime()),h(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),s(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(c(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),a=e.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),t=a<n.getTime()||r.getTime()<a}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(n,r){var a,o=this.getDate(),i=24*parseInt(r)*60*60*1e3;"add"===n?a=new Date(o.valueOf()+i):"subtract"===n&&(a=new Date(o.valueOf()-i)),t&&("add"===n?a=e(o).add(r,"days").toDate():"subtract"===n&&(a=e(o).subtract(r,"days").toDate())),this.setDate(a)},adjustCalendars:function(){this.calendars[0]=y(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=y({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(h(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=b.minDate,this._o.minYear=b.minYear,this._o.minMonth=b.minMonth,this._o.startRange=b.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(h(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=b.maxDate,this._o.maxYear=b.maxYear,this._o.maxMonth=b.maxMonth,this._o.endRange=b.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(this._v||e){var t,n=this._o,r=n.minYear,o=n.maxYear,i=n.minMonth,s=n.maxMonth,l="";this._y<=r&&(this._y=r,!isNaN(i)&&this._m<i&&(this._m=i)),this._y>=o&&(this._y=o,!isNaN(s)&&this._m>s&&(this._m=s)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var u=0;u<n.numberOfMonths;u++)l+='<div class="pika-lendar">'+M(this,u,this.calendars[u].year,this.calendars[u].month,this.calendars[0].year,t)+this.render(this.calendars[u].year,this.calendars[u].month,t)+"</div>";this.el.innerHTML=l,n.bound&&"hidden"!==n.field.type&&a((function(){n.trigger.focus()}),1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label","Use the arrow keys to pick a date")}},adjustPosition:function(){var e,t,n,a,o,i,s,l,u,c;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,n=this.el.offsetWidth,a=this.el.offsetHeight,o=window.innerWidth||r.documentElement.clientWidth,i=window.innerHeight||r.documentElement.clientHeight,s=window.pageYOffset||r.body.scrollTop||r.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)l=(c=e.getBoundingClientRect()).left+window.pageXOffset,u=c.bottom+window.pageYOffset;else for(l=t.offsetLeft,u=t.offsetTop+t.offsetHeight;t=t.offsetParent;)l+=t.offsetLeft,u+=t.offsetTop;(this._o.reposition&&l+n>o||this._o.position.indexOf("right")>-1&&l-n+e.offsetWidth>0)&&(l=l-n+e.offsetWidth),(this._o.reposition&&u+a>i+s||this._o.position.indexOf("top")>-1&&u-a-e.offsetHeight>0)&&(u=u-a-e.offsetHeight),this.el.style.left=l+"px",this.el.style.top=u+"px"}},render:function(e,t,n){var r=this._o,a=new Date,o=m(e,t),i=new Date(e,t,1).getDay(),s=[],l=[];h(a),r.firstDay>0&&(i-=r.firstDay)<0&&(i+=7);for(var u,p,_,y,b=0===t?11:t-1,M=11===t?0:t+1,k=0===t?e-1:e,L=11===t?e+1:e,Y=m(k,b),T=o+i,D=T;D>7;)D-=7;T+=7-D;for(var S=0,O=0;S<T;S++){var j=new Date(e,t,S-i+1),x=!!c(this._d)&&f(j,this._d),E=f(j,a),P=S<i||S>=o+i,C=S-i+1,H=t,z=e,A=r.startRange&&f(r.startRange,j),R=r.endRange&&f(r.endRange,j),N=r.startRange&&r.endRange&&r.startRange<j&&j<r.endRange;P&&(S<i?(C=Y+C,H=b,z=k):(C-=o,H=M,z=L));var F={day:C,month:H,year:z,isSelected:x,isToday:E,isDisabled:r.minDate&&j<r.minDate||r.maxDate&&j>r.maxDate||r.disableWeekends&&d(j)||r.disableDayFn&&r.disableDayFn(j),isEmpty:P,isStartRange:A,isEndRange:R,isInRange:N,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};l.push(v(F)),7==++O&&(r.showWeekNumber&&l.unshift((u=S-i,p=t,_=e,y=void 0,void 0,y=new Date(_,0,1),'<td class="pika-week">'+Math.ceil(((new Date(_,p,u)-y)/864e5+y.getDay()+1)/7)+"</td>")),s.push(w(l,r.isRTL)),l=[],O=0)}return function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+function(e){var t,n=[];e.showWeekNumber&&n.push("<th></th>");for(t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+g(e,t)+'">'+g(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"}(e)+(r=t,"<tbody>"+r.join("")+"</tbody></table>");var r}(r,s,n)},isVisible:function(){return this._v},show:function(){var e,t,n;this.isVisible()||(e=this.el,t="is-hidden",e.className=(n=(" "+e.className+" ").replace(" "+t+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,""),this._v=!0,this.draw(),this._o.bound&&(o(r,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e,t,n=this._v;!1!==n&&(this._o.bound&&i(r,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",e=this.el,l(e,t="is-hidden")||(e.className=""===e.className?t:e.className+" "+t),this._v=!1,void 0!==n&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),i(this.el,"mousedown",this._onMouseDown,!0),i(this.el,"touchend",this._onMouseDown,!0),i(this.el,"change",this._onChange),this._o.field&&(i(this._o.field,"change",this._onInputChange),this._o.bound&&(i(this._o.trigger,"click",this._onInputClick),i(this._o.trigger,"focus",this._onInputFocus),i(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},k}(a)}()},,function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r=n(1),a=n.n(r),o=n(129),i=n.n(o),s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function l(e,t){function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function c(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?a(e.value):new n((function(t){t(e.value)})).then(i,s)}l((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(a=2&o[0]?r.return:o[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;switch(r=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,r=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],r=0}finally{n=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var p={graph_id:null,legend_toggle:!1,graphID:null,options:{colors:null},data:null,rows:null,columns:null,diffdata:null,chartEvents:null,legendToggle:!1,chartActions:null,getChartWrapper:function(e,t){},getChartEditor:null,className:"",style:{},formatters:null,spreadSheetUrl:null,spreadSheetQueryParameters:{headers:1,gid:1},rootProps:{},chartWrapperParams:{},controls:null,render:null,toolbarItems:null,toolbarID:null},m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleGoogleChartsLoaderScriptLoaded=function(e){var n=t.props,r=n.chartVersion,a=n.chartPackages,o=n.chartLanguage,i=n.mapsApiKey,s=n.onLoad;e.charts.load(r||"current",{packages:a||["corechart","controls"],language:o||"en",mapsApiKey:i}),e.charts.setOnLoadCallback((function(){s(e)}))},t}return l(t,e),t.prototype.shouldComponentUpdate=function(e){return e.chartPackages===this.props.chartPackages},t.prototype.render=function(){var e=this,t=this.props.onError;return Object(r.createElement)(i.a,{url:"https://www.gstatic.com/charts/loader.js",onError:t,onLoad:function(){var t=window;t.google&&e.handleGoogleChartsLoaderScriptLoaded(t.google)}})},t}(r.Component),h=0,f=function(){return"reactgooglegraph-"+(h+=1)},_=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#3B3EAC"],y=function(e,t,n){return void 0===n&&(n={}),c(void 0,void 0,void 0,(function(){return d(this,(function(r){return[2,new Promise((function(r,a){var o=n.headers?"headers="+n.headers:"headers=0",i=n.query?"&tq="+encodeURIComponent(n.query):"",s=n.gid?"&gid="+n.gid:"",l=n.sheet?"&sheet="+n.sheet:"",u=n.access_token?"&access_token="+n.access_token:"",c=t+"/gviz/tq?"+(""+o+s+l+i+u);new e.visualization.Query(c).send((function(e){e.isError()?a("Error in query: "+e.getMessage()+" "+e.getDetailedMessage()):r(e.getDataTable())}))}))]}))}))},b=Object(r.createContext)(p),g=b.Provider,v=b.Consumer,w=function(e){var t=e.children,n=e.value;return Object(r.createElement)(g,{value:n},t)},M=function(e){var t=e.render;return Object(r.createElement)(v,null,(function(e){return t(e)}))},k=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={hiddenColumns:[]},t.listenToLegendToggle=function(){var e=t.props,n=e.google,r=e.googleChartWrapper;n.visualization.events.addListener(r,"select",(function(){var e=r.getChart().getSelection(),n=r.getDataTable();if(0!==e.length&&null===e[0].row&&null!==n){var a=e[0].column,o=t.getColumnID(n,a);t.state.hiddenColumns.includes(o)?t.setState((function(e){return u({},e,{hiddenColumns:e.hiddenColumns.filter((function(e){return e!==o})).slice()})})):t.setState((function(e){return u({},e,{hiddenColumns:e.hiddenColumns.concat([o])})}))}}))},t.applyFormatters=function(e,n){for(var r=t.props.google,a=0,o=n;a<o.length;a++){var i=o[a];switch(i.type){case"ArrowFormat":(s=new r.visualization.ArrowFormat(i.options)).format(e,i.column);break;case"BarFormat":(s=new r.visualization.BarFormat(i.options)).format(e,i.column);break;case"ColorFormat":for(var s=new r.visualization.ColorFormat(i.options),l=0,u=i.ranges;l<u.length;l++){var c=u[l];s.addRange.apply(s,c)}s.format(e,i.column);break;case"DateFormat":(s=new r.visualization.DateFormat(i.options)).format(e,i.column);break;case"NumberFormat":(s=new r.visualization.NumberFormat(i.options)).format(e,i.column);break;case"PatternFormat":(s=new r.visualization.PatternFormat(i.options)).format(e,i.column)}}},t.getColumnID=function(e,t){return e.getColumnId(t)||e.getColumnLabel(t)},t.draw=function(e){var n=e.data,r=e.diffdata,a=e.rows,o=e.columns,i=e.options,s=e.legend_toggle,l=e.legendToggle,u=e.chartType,p=e.formatters,m=e.spreadSheetUrl,h=e.spreadSheetQueryParameters;return c(t,void 0,void 0,(function(){var e,t,c,f,_,b,g,v,w,M,k,L,Y,T;return d(this,(function(d){switch(d.label){case 0:return e=this.props,t=e.google,c=e.googleChartWrapper,_=null,null!==r&&(b=t.visualization.arrayToDataTable(r.old),g=t.visualization.arrayToDataTable(r.new),_=t.visualization[u].prototype.computeDiff(b,g)),null===n?[3,1]:(f=Array.isArray(n)?t.visualization.arrayToDataTable(n):new t.visualization.DataTable(n),[3,5]);case 1:return null===a||null===o?[3,2]:(f=t.visualization.arrayToDataTable([o].concat(a)),[3,5]);case 2:return null===m?[3,4]:[4,y(t,m,h)];case 3:return f=d.sent(),[3,5];case 4:f=t.visualization.arrayToDataTable([]),d.label=5;case 5:for(v=f.getNumberOfColumns(),w=0;w<v;w+=1)M=this.getColumnID(f,w),this.state.hiddenColumns.includes(M)&&(k=f.getColumnLabel(w),L=f.getColumnId(w),Y=f.getColumnType(w),f.removeColumn(w),f.addColumn({label:k,id:L,type:Y}));return T=c.getChart(),"Timeline"===c.getChartType()&&T&&T.clearChart(),c.setChartType(u),c.setOptions(i),c.setDataTable(f),c.draw(),null!==this.props.googleChartDashboard&&this.props.googleChartDashboard.draw(f),null!==_&&(c.setDataTable(_),c.draw()),null!==p&&(this.applyFormatters(f,p),c.setDataTable(f),c.draw()),!0!==l&&!0!==s||this.grayOutHiddenColumns({options:i}),[2]}}))}))},t.grayOutHiddenColumns=function(e){var n=e.options,r=t.props.googleChartWrapper,a=r.getDataTable();if(null!==a){var o=a.getNumberOfColumns();if(!1!==t.state.hiddenColumns.length>0){var i=Array.from({length:o-1}).map((function(e,r){var o=t.getColumnID(a,r+1);return t.state.hiddenColumns.includes(o)?"#CCCCCC":void 0!==n.colors&&null!==n.colors?n.colors[r]:_[r]}));r.setOptions(u({},n,{colors:i})),r.draw()}}},t.onResize=function(){t.props.googleChartWrapper.draw()},t}return l(t,e),t.prototype.componentDidMount=function(){this.draw(this.props),window.addEventListener("resize",this.onResize),(this.props.legend_toggle||this.props.legendToggle)&&this.listenToLegendToggle()},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.google,n=e.googleChartWrapper;window.removeEventListener("resize",this.onResize),t.visualization.events.removeAllListeners(n),"Timeline"===n.getChartType()&&n.getChart()&&n.getChart().clearChart()},t.prototype.componentDidUpdate=function(){this.draw(this.props)},t.prototype.render=function(){return null},t}(r.Component),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.componentDidMount=function(){},t.prototype.componentWillUnmount=function(){},t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){var e=this.props,t=e.google,n=e.googleChartWrapper,a=e.googleChartDashboard;return Object(r.createElement)(M,{render:function(e){return Object(r.createElement)(k,u({},e,{google:t,googleChartWrapper:n,googleChartDashboard:a}))}})},t}(r.Component),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.listenToEvents=function(e){var t=this,n=e.chartEvents,r=e.google,a=e.googleChartWrapper;if(null!==n){r.visualization.events.removeAllListeners(a);for(var o=function(e){var n=e.eventName,o=e.callback;r.visualization.events.addListener(a,n,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];o({chartWrapper:a,props:t.props,google:r,eventArgs:e})}))},i=0,s=n;i<s.length;i++){o(s[i])}}},t.prototype.render=function(){var e=this,t=this.props,n=t.google,a=t.googleChartWrapper;return Object(r.createElement)(M,{render:function(t){return e.listenToEvents({chartEvents:t.chartEvents||null,google:n,googleChartWrapper:a}),null}})},t}(r.Component),T=0,D=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={googleChartWrapper:null,googleChartDashboard:null,googleChartControls:null,googleChartEditor:null,isReady:!1},t.graphID=null,t.dashboard_ref=Object(r.createRef)(),t.toolbar_ref=Object(r.createRef)(),t.getGraphID=function(){var e,n=t.props,r=n.graphID,a=n.graph_id;return e=null===r&&null===a?null===t.graphID?f():t.graphID:null!==r&&null===a?r:null!==a&&null===r?a:r,t.graphID=e,t.graphID},t.getControlID=function(e,t){return T+=1,void 0===e?"googlechart-control-"+t+"-"+T:e},t.addControls=function(e,n){var r=t.props,a=r.google,o=r.controls,i=null===o?null:o.map((function(e,n){var r=e.controlID,o=e.controlType,i=e.options,s=e.controlWrapperParams,l=t.getControlID(r,n);return{controlProp:e,control:new a.visualization.ControlWrapper(u({containerId:l,controlType:o,options:i},s))}}));if(null===i)return null;n.bind(i.map((function(e){return e.control})),e);for(var s=function(n){for(var r=n.control,o=n.controlProp.controlEvents,i=function(n){var o=n.callback,i=n.eventName;a.visualization.events.removeListener(r,i,o),a.visualization.events.addListener(r,i,(function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];o({chartWrapper:e,controlWrapper:r,props:t.props,google:a,eventArgs:n})}))},s=0,l=void 0===o?[]:o;s<l.length;s++){i(l[s])}},l=0,c=i;l<c.length;l++){s(c[l])}return i},t.renderChart=function(){var e=t.props,n=e.width,a=e.height,o=e.options,i=e.style,s=e.className,l=e.rootProps,c=e.google,d=u({height:a||o&&o.height,width:n||o&&o.width},i);return Object(r.createElement)("div",u({id:t.getGraphID(),style:d,className:s},l),t.state.isReady&&null!==t.state.googleChartWrapper?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(L,{googleChartWrapper:t.state.googleChartWrapper,google:c,googleChartDashboard:t.state.googleChartDashboard}),Object(r.createElement)(Y,{googleChartWrapper:t.state.googleChartWrapper,google:c})):null)},t.renderControl=function(e){return void 0===e&&(e=function(e){e.control,e.controlProp;return!0}),t.state.isReady&&null!==t.state.googleChartControls?Object(r.createElement)(r.Fragment,null,t.state.googleChartControls.filter((function(t){var n=t.controlProp,r=t.control;return e({control:r,controlProp:n})})).map((function(e){var t=e.control;e.controlProp;return Object(r.createElement)("div",{key:t.getContainerId(),id:t.getContainerId()})}))):null},t.renderToolBar=function(){return null===t.props.toolbarItems?null:Object(r.createElement)("div",{ref:t.toolbar_ref})},t}return l(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.options,n=e.google,r=e.chartType,a=e.chartWrapperParams,o=e.toolbarItems,i=e.getChartEditor,s=e.getChartWrapper,l=u({chartType:r,options:t,containerId:this.getGraphID()},a),c=new n.visualization.ChartWrapper(l);c.setOptions(t),s(c,n);var d=new n.visualization.Dashboard(this.dashboard_ref),p=this.addControls(c,d);null!==o&&n.visualization.drawToolbar(this.toolbar_ref.current,o);var m=null;null!==i&&i({chartEditor:m=new n.visualization.ChartEditor,chartWrapper:c,google:n}),this.setState({googleChartEditor:m,googleChartControls:p,googleChartDashboard:d,googleChartWrapper:c,isReady:!0})},t.prototype.componentDidUpdate=function(){if(null!==this.state.googleChartWrapper&&null!==this.state.googleChartDashboard&&null!==this.state.googleChartControls)for(var e=this.props.controls,t=0;t<e.length;t+=1){var n=e[t],r=n.controlType,a=n.options,o=n.controlWrapperParams;o&&"state"in o&&this.state.googleChartControls[t].control.setState(o.state),this.state.googleChartControls[t].control.setOptions(a),this.state.googleChartControls[t].control.setControlType(r)}},t.prototype.shouldComponentUpdate=function(e,t){return this.state.isReady!==t.isReady||e.controls!==this.props.controls},t.prototype.render=function(){var e=this.props,t=e.width,n=e.height,a=e.options,o=e.style,i=u({height:n||a&&a.height,width:t||a&&a.width},o);return null!==this.props.render?Object(r.createElement)("div",{ref:this.dashboard_ref,style:i},Object(r.createElement)("div",{ref:this.toolbar_ref,id:"toolbar"}),this.props.render({renderChart:this.renderChart,renderControl:this.renderControl,renderToolbar:this.renderToolBar})):Object(r.createElement)("div",{ref:this.dashboard_ref,style:i},this.renderControl((function(e){return"bottom"!==e.controlProp.controlPosition})),this.renderChart(),this.renderControl((function(e){return"bottom"===e.controlProp.controlPosition})),this.renderToolBar())},t}(r.Component),S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._isMounted=!1,t.state={loadingStatus:"loading",google:null},t.onLoad=function(e){if(t.isFullyLoaded(e))t.onSuccess(e);else var n=setInterval((function(){var e=window.google;t._isMounted?e&&t.isFullyLoaded(e)&&(clearInterval(n),t.onSuccess(e)):clearInterval(n)}),1e3)},t.onSuccess=function(e){t.setState({loadingStatus:"ready",google:e})},t.onError=function(){t.setState({loadingStatus:"errored"})},t}return l(t,e),t.prototype.render=function(){var e=this.props,t=e.chartLanguage,n=e.chartPackages,a=e.chartVersion,o=e.mapsApiKey,i=e.loader,s=e.errorElement;return Object(r.createElement)(w,{value:this.props},"ready"===this.state.loadingStatus&&null!==this.state.google?Object(r.createElement)(D,u({},this.props,{google:this.state.google})):"errored"===this.state.loadingStatus&&s?s:i,Object(r.createElement)(m,u({},{chartLanguage:t,chartPackages:n,chartVersion:a,mapsApiKey:o},{onLoad:this.onLoad,onError:this.onError})))},t.prototype.componentDidMount=function(){this._isMounted=!0},t.prototype.componentWillUnmount=function(){this._isMounted=!1},t.prototype.isFullyLoaded=function(e){var t=this.props,n=t.controls,r=t.toolbarItems,a=t.getChartEditor;return e&&e.visualization&&e.visualization.ChartWrapper&&e.visualization.Dashboard&&(!n||e.visualization.ChartWrapper)&&(!a||e.visualization.ChartEditor)&&(!r||e.visualization.drawToolbar)},t.defaultProps=p,t}(r.Component),O=n(130),j=n.n(O);function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C(e,t){return(C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function H(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=R(e);if(t){var a=R(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return z(this,n)}}function z(e,t){if(t&&("object"===x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R(e){return(R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var N=wp.element,F=N.Component,W=N.Fragment,I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(o,e);var t,n,r,a=H(o);function o(){var e;return E(this,o),(e=a.apply(this,arguments)).initDataTable=e.initDataTable.bind(A(e)),e.dataRenderer=e.dataRenderer.bind(A(e)),e.table,e.uniqueId=j()(),e}return t=o,(n=[{key:"componentDidMount",value:function(){this.initDataTable(this.props.columns,this.props.rows)}},{key:"componentWillUnmount",value:function(){this.table.destroy()}},{key:"componentDidUpdate",value:function(e){this.props!==e&&(this.props.options.responsive_bool!==e.options.responsive_bool&&"true"===e.options.responsive_bool&&document.getElementById("dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)).classList.remove("collapsed"),this.table.destroy(),document.getElementById("dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)).innerHTML="",this.initDataTable(this.props.columns,this.props.rows))}},{key:"initDataTable",value:function(e,t){var n=this,r=this.props.options,a=e.map((function(e,t){var r=e.type;switch(e.type){case"number":r="num";break;case"date":case"datetime":case"timeofday":r="date"}return{title:e.label,data:e.label,type:r,render:n.dataRenderer(r,t)}})),o=t.map((function(e){var t={};return a.forEach((function(n,r){var a=e[r];void 0===a&&(a=e[n.data]),t[n.data]=a})),t}));this.table=jQuery("#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)).DataTable({destroy:!0,data:o,columns:a,paging:"true"===r.paging_bool,pageLength:r.pageLength_int||10,pagingType:r.pagingType,ordering:"false"!==r.ordering_bool,fixedHeader:"true"===r.fixedHeader_bool,scrollCollapse:!(!this.props.chartsScreen&&"true"!==r.scrollCollapse_bool),scrollY:(this.props.chartsScreen?180:"true"===r.scrollCollapse_bool&&Number(r.scrollY_int))||!1,responsive:!(!this.props.chartsScreen&&"true"!==r.responsive_bool),searching:!1,select:!1,lengthChange:!1,bFilter:!1,bInfo:!1})}},{key:"dataRenderer",value:function(e,t){var n,r=this.props.options,a=null;if(void 0===r.series||void 0===r.series[t]||void 0===r.series[t].format)return a;switch(e){case"date":case"datetime":case"timeofday":a=r.series[t].format&&r.series[t].format.from&&r.series[t].format.to?jQuery.fn.dataTable.render.moment(r.series[t].format.from,r.series[t].format.to):jQuery.fn.dataTable.render.moment("MM-DD-YYYY");break;case"num":var o=["","","","",""];r.series[t].format.thousands&&(o[0]=r.series[t].format.thousands),r.series[t].format.decimal&&(o[1]=r.series[t].format.decimal),r.series[t].format.precision&&0<parseInt(r.series[t].format.precision)&&(o[2]=r.series[t].format.precision),r.series[t].format.prefix&&(o[3]=r.series[t].format.prefix),r.series[t].format.suffix&&(o[4]=r.series[t].format.suffix),a=(n=jQuery.fn.dataTable.render).number.apply(n,o);break;case"boolean":jQuery.fn.dataTable.render.extra=function(e,n,a){return!0!==e&&"true"!==e||""===r.series[t].format.truthy?!1!==e&&"false"!==e||""===r.series[t].format.falsy?e:r.series[t].format.falsy.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""):r.series[t].format.truthy.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"")},a=jQuery.fn.dataTable.render.extra}return a}},{key:"render",value:function(){var e=this.props.options;return wp.element.createElement(W,null,e.customcss&&wp.element.createElement("style",null,e.customcss.oddTableRow&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr.odd {\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow.color?"color: ".concat(e.customcss.oddTableRow.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow["background-color"]?"background-color: ".concat(e.customcss.oddTableRow["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.oddTableRow.transform?"transform: rotate( ".concat(e.customcss.oddTableRow.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}"),e.customcss.evenTableRow&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr.even {\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow.color?"color: ".concat(e.customcss.evenTableRow.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow["background-color"]?"background-color: ".concat(e.customcss.evenTableRow["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.evenTableRow.transform?"transform: rotate( ".concat(e.customcss.evenTableRow.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}"),e.customcss.tableCell&&"#dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId," tr td,\n\t\t\t\t\t\t\t#dataTable-instances-").concat(this.props.id,"-").concat(this.uniqueId,"_wrapper tr th {\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell.color?"color: ".concat(e.customcss.tableCell.color," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell["background-color"]?"background-color: ".concat(e.customcss.tableCell["background-color"]," !important;"):"","\n\t\t\t\t\t\t\t\t").concat(e.customcss.tableCell.transform?"transform: rotate( ".concat(e.customcss.tableCell.transform,"deg ) !important;"):"","\n\t\t\t\t\t\t\t}")),wp.element.createElement("table",{id:"dataTable-instances-".concat(this.props.id,"-").concat(this.uniqueId)}))}}])&&P(t.prototype,n),r&&P(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(F),B=n(4),J=n.n(B),U=n(131),G=n.n(U),V=function(e){return Object.keys(e["visualizer-series"]).map((function(t){void 0!==e["visualizer-series"][t].type&&"date"===e["visualizer-series"][t].type&&Object.keys(e["visualizer-data"]).map((function(n){return e["visualizer-data"][n][t]=new Date(e["visualizer-data"][n][t])}))})),e},q=function(e){var t;if(Array.isArray(e))return 0<e.length;if(J()(e)){for(t in e)return!0;return!1}return"string"==typeof e?0<e.length:null!=e},$=function(e){return G()(e,q)},K=function(e){return e.width="",e.height="",e.backgroundColor={},e.chartArea={},$(e)},Z=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},Q=function(e,t){return!0===e[t]||"true"===e[t]||"1"===e[t]||1===e[t]},X=function(e){switch(e["visualizer-chart-library"]){case"GoogleCharts":return ee(e)}},ee=function(e){var t=e["visualizer-settings"],n=e["visualizer-chart-type"],r=e["visualizer-series"],a=[];if(t.series)switch(n){case"tabular":for(var o in t.series)if(r[(o=parseInt(o))+1]&&t.series[o].format&&""!==t.series[o].format){var i=o+1,s=te(r[o+1].type);s&&a.push({type:s,options:{pattern:t.series[o].format},column:i})}break;default:for(var l=0;l<t.series.length;l++)if(r[l+1]&&void 0!==t.series[l]&&t.series[l].format&&""!==t.series[l].format){var u=l+1,c=te(r[l+1].type);c&&a.push({type:c,options:{pattern:t.series[l].format},column:u})}}else"pie"===n&&t.format&&""!==t.format&&a.push({type:te("number"),options:{pattern:t.format},column:1});if(t.hAxis&&r[0]){var d=te(r[0].type);d&&a.push({type:d,options:{pattern:t.hAxis.format},column:0})}return a},te=function(e){switch(e){case"number":return"NumberFormat";case"date":case"datetime":case"timeofday":return"DateFormat"}return null},ne=function(e){if(-1===e.indexOf("#")){var t=e.match(/\((.*)\)/).pop();if(t)return getComputedStyle(document.body).getPropertyValue(t)}return e};function re(e){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ae(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ae=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new k(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return Y()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=v(i,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function d(){}function p(){}function m(){}var h={};s(h,a,(function(){return this}));var f=Object.getPrototypeOf,_=f&&f(f(L([])));_&&_!==t&&n.call(_,a)&&(h=_);var y=m.prototype=d.prototype=Object.create(h);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,s){var l=u(e[a],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==re(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function v(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,v(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function L(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:Y}}function Y(){return{value:void 0,done:!0}}return p.prototype=m,s(y,"constructor",m),s(m,"constructor",p),p.displayName=s(m,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(g.prototype),s(g.prototype,o,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new g(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),s(y,i,"Generator"),s(y,a,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=L,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(M),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function oe(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function ie(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){oe(o,r,a,i,s,"next",e)}function s(e){oe(o,r,a,i,s,"throw",e)}i(void 0)}))}}function se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ue(e,t){return(ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=me(e);if(t){var a=me(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return de(this,n)}}function de(e,t){if(t&&("object"===re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pe(e)}function pe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var he=lodash.startCase,fe=wp.i18n.__,_e=wp.apiFetch,ye=wp.element,be=ye.Component,ge=ye.Fragment,ve=wp.components,we=ve.Button,Me=ve.Dashicon,ke=ve.ExternalLink,Le=ve.Notice,Ye=ve.Placeholder,Te=ve.Spinner,De=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ue(e,t)}(s,e);var t,n,r,a,o,i=ce(s);function s(){var e;return se(this,s),(e=i.apply(this,arguments)).loadMoreCharts=e.loadMoreCharts.bind(pe(e)),e.state={charts:null,isBusy:!1,chartsLoaded:!1,perPage:visualizerLocalize.chartsPerPage},e}return t=s,(n=[{key:"componentDidMount",value:(o=ie(ae().mark((function e(){var t,n;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=visualizerLocalize.chartsPerPage,e.next=3,_e({path:"wp/v2/visualizer/?per_page="+t+"&meta_key=visualizer-chart-library&meta_value=ChartJS"});case 3:n=e.sent,this.setState({charts:n});case 5:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"loadMoreCharts",value:(a=ie(ae().mark((function e(){var t,n,r,a;return ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.state.charts.length,n=this.state.chartsLoaded,r=this.state.perPage,this.setState({isBusy:!0}),e.next=6,_e({path:"wp/v2/visualizer/?per_page=".concat(r,"&meta_key=visualizer-chart-library&meta_value=ChartJS&offset=").concat(t)});case 6:a=e.sent,r>a.length&&(n=!0),this.setState({charts:this.state.charts.concat(a),isBusy:!1,chartsLoaded:n});case 9:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"render",value:function(){var e=this,t="undefined"!=typeof google?google.visualization.Version:"current",n=this.state,r=n.charts,a=n.isBusy,o=n.chartsLoaded,i=n.perPage;return wp.element.createElement("div",{className:"visualizer-settings__charts"},wp.element.createElement(Le,{status:"warning",isDismissible:!1},fe("ChartJS charts are currently not available for selection here, you must visit the library, get the shortcode, and add the chart here in a shortcode tag."),wp.element.createElement(ke,{href:visualizerLocalize.adminPage},fe("Click here to visit Visualizer Charts Library."))),null!==r?1<=r.length?wp.element.createElement(ge,null,wp.element.createElement("div",{className:"visualizer-settings__charts-grid"},Object.keys(r).map((function(n){var a,o,i,s=V(r[n].chart_data);if(a=s["visualizer-settings"].title?s["visualizer-settings"].title:"#".concat(r[n].id),0<=["gauge","tabular","timeline"].indexOf(s["visualizer-chart-type"])?"DataTable"===s["visualizer-chart-library"]?o=s["visualizer-chart-type"]:("tabular"===(o=s["visualizer-chart-type"])&&(o="table"),o=he(o)):o="".concat(he(s["visualizer-chart-type"]),"Chart"),!s["visualizer-chart-library"]||"ChartJS"!==s["visualizer-chart-library"])return s["visualizer-data-exploded"]&&(i=fe("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement("div",{className:"visualizer-settings__charts-single","data-chart-type":o,key:"chart-".concat(r[n].id)},wp.element.createElement("div",{className:"visualizer-settings__charts-title"},a),"DataTable"===s["visualizer-chart-library"]?wp.element.createElement(I,{id:r[n].id,rows:s["visualizer-data"],columns:s["visualizer-series"],chartsScreen:!0,options:s["visualizer-settings"]}):(s["visualizer-data-exploded"],wp.element.createElement(S,{chartVersion:t,chartType:o,rows:s["visualizer-data"],columns:s["visualizer-series"],options:K(s["visualizer-settings"]),formatters:X(s)})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,i)),wp.element.createElement("div",{className:"visualizer-settings__charts-controls",title:fe("Insert Chart"),onClick:function(){return e.props.getChart(r[n].id)}},wp.element.createElement(Me,{icon:"upload"})))}))),!o&&i-1<r.length&&wp.element.createElement(we,{isPrimary:!0,isLarge:!0,onClick:this.loadMoreCharts,isBusy:a},fe("Load More"))):wp.element.createElement("p",{className:"visualizer-no-charts"},fe("No charts found.")):wp.element.createElement(Ye,null,wp.element.createElement(Te,null)))}}])&&le(t.prototype,n),r&&le(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(be);function Se(e){return(Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xe(e,t){return(xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ee(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=He(e);if(t){var a=He(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Pe(this,n)}}function Pe(e,t){if(t&&("object"===Se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ce(e)}function Ce(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ze=wp.i18n.__,Ae=wp.element.Component,Re=wp.components,Ne=Re.Button,Fe=Re.ExternalLink,We=Re.PanelBody,Ie=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xe(e,t)}(o,e);var t,n,r,a=Ee(o);function o(){var e;return Oe(this,o),(e=a.apply(this,arguments)).uploadInput=React.createRef(),e.fileUploaded=e.fileUploaded.bind(Ce(e)),e.uploadImport=e.uploadImport.bind(Ce(e)),e.state={uploadLabel:ze("Upload")},e}return t=o,(n=[{key:"fileUploaded",value:function(e){"text/csv"===e.target.files[0].type&&this.setState({uploadLabel:ze("Upload")})}},{key:"uploadImport",value:function(){this.props.readUploadedFile(this.uploadInput),this.setState({uploadLabel:ze("Uploaded")})}},{key:"render",value:function(){return wp.element.createElement(We,{title:ze("Import data from file"),initialOpen:!1},wp.element.createElement("p",null,ze("Select and upload your data CSV file here. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).")),wp.element.createElement("p",null,ze("If you are unsure about how to format your data CSV then please take a look at this sample: "),wp.element.createElement(Fe,{href:"".concat(visualizerLocalize.absurl,"samples/").concat(this.props.chart["visualizer-chart-type"],".csv")},"".concat(this.props.chart["visualizer-chart-type"],".csv"))),wp.element.createElement("input",{type:"file",accept:"text/csv",ref:this.uploadInput,onChange:this.fileUploaded}),wp.element.createElement(Ne,{isPrimary:!0,onClick:this.uploadImport},this.state.uploadLabel))}}])&&je(t.prototype,n),r&&je(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ae);function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach((function(t){Ue(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ge(e){return(Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ve(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Ve=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new k(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return Y()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=v(i,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function d(){}function p(){}function m(){}var h={};s(h,a,(function(){return this}));var f=Object.getPrototypeOf,_=f&&f(f(L([])));_&&_!==t&&n.call(_,a)&&(h=_);var y=m.prototype=d.prototype=Object.create(h);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,s){var l=u(e[a],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==Ge(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function v(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,v(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function L(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:Y}}function Y(){return{value:void 0,done:!0}}return p.prototype=m,s(y,"constructor",m),s(m,"constructor",p),p.displayName=s(m,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(g.prototype),s(g.prototype,o,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new g(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),s(y,i,"Generator"),s(y,a,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=L,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(M),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function qe(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function $e(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){qe(o,r,a,i,s,"next",e)}function s(e){qe(o,r,a,i,s,"throw",e)}i(void 0)}))}}function Ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qe(e,t){return(Qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nt(e);if(t){var a=nt(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return et(this,n)}}function et(e,t){if(t&&("object"===Ge(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return tt(e)}function tt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nt(e){return(nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rt=wp.i18n.__,at=wp,ot=(at.apiFetch,at.apiRequest),it=wp.element.Component,st=wp.components,lt=st.Button,ut=st.ExternalLink,ct=st.IconButton,dt=st.Modal,pt=st.PanelBody,mt=st.SelectControl,ht=st.TextControl,ft=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qe(e,t)}(c,e);var t,n,r,a,o,i,s,l,u=Xe(c);function c(){var e;return Ke(this,c),(e=u.apply(this,arguments)).openModal=e.openModal.bind(tt(e)),e.initTable=e.initTable.bind(tt(e)),e.onToggle=e.onToggle.bind(tt(e)),e.toggleHeaders=e.toggleHeaders.bind(tt(e)),e.getJSONRoot=e.getJSONRoot.bind(tt(e)),e.getJSONData=e.getJSONData.bind(tt(e)),e.getTableData=e.getTableData.bind(tt(e)),e.state={isOpen:!1,isLoading:!1,isFirstStepOpen:!0,isSecondStepOpen:!1,isThirdStepOpen:!1,isFourthStepOpen:!1,isHeaderPanelOpen:!1,endpointRoots:[],endpointPaging:[],table:null,requestHeaders:{method:"GET",username:"",password:"",auth:""}},e}return t=c,(n=[{key:"openModal",value:(l=$e(Ve().mark((function e(){var t;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setState({isOpen:!0});case 2:t=document.querySelector("#visualizer-json-query-table"),this.state.isFourthStepOpen&&null!==this.state.table&&(t.innerHTML=this.state.table,this.initTable());case 4:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"initTable",value:function(){jQuery("#visualizer-json-query-table table").DataTable({paging:!1,searching:!1,ordering:!1,select:!1,scrollX:"600px",scrollY:"400px",info:!1,colReorder:{fixedColumnsLeft:1},dom:"Bt",buttons:[{extend:"colvis",columns:":gt(0)",collectionLayout:"four-column"}]})}},{key:"onToggle",value:(s=$e(Ve().mark((function e(t){var n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===this.state.table&&this.state.endpointRoots&&0<this.state.endpointRoots.length&&("isFirstStepOpen"===t||"isSecondStepOpen"===t)&&this.setState({isFirstStepOpen:"isFirstStepOpen"===t,isSecondStepOpen:"isSecondStepOpen"===t,isThirdStepOpen:!1,isFourthStepOpen:!1}),null===this.state.table){e.next=5;break}return e.next=4,this.setState({isFirstStepOpen:"isFirstStepOpen"===t,isSecondStepOpen:"isSecondStepOpen"===t,isThirdStepOpen:"isThirdStepOpen"===t,isFourthStepOpen:"isFourthStepOpen"===t});case 4:"isFourthStepOpen"===t&&(n=document.querySelector("#visualizer-json-query-table"),this.state.isFourthStepOpen&&(n.innerHTML=this.state.table,this.initTable()));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"toggleHeaders",value:function(){this.setState({isHeaderPanelOpen:!this.state.isHeaderPanelOpen})}},{key:"getJSONRoot",value:(i=$e(Ve().mark((function e(){var t,n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0,endpointRoots:[],endpointPaging:[],table:null}),e.next=3,ot({path:"/visualizer/v1/get-json-root?url=".concat(this.props.chart["visualizer-json-url"]),data:{method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth},method:"GET"});case 3:(t=e.sent).success?(n=Object.keys(t.data.roots).map((function(e){return{label:t.data.roots[e].replace(/>/g," ➤ "),value:t.data.roots[e]}})),this.setState({isLoading:!1,isFirstStepOpen:!1,isSecondStepOpen:!0,endpointRoots:n})):(this.setState({isLoading:!1}),alert(t.data.msg));case 5:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getJSONData",value:(o=$e(Ve().mark((function e(){var t,n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),e.next=3,ot({path:"/visualizer/v1/get-json-data?url=".concat(this.props.chart["visualizer-json-url"],"&chart=").concat(this.props.id),data:{root:this.props.chart["visualizer-json-root"]||this.state.endpointRoots[0].value,method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth},method:"GET"});case 3:(t=e.sent).success?(n=[{label:rt("Don't use pagination"),value:0}],t.data.paging&&"root>next"===t.data.paging[0]&&n.push({label:rt("Get first 5 pages using root ➤ next"),value:"root>next"}),this.setState({isLoading:!1,isSecondStepOpen:!1,isFourthStepOpen:!0,endpointPaging:n,table:t.data.table}),document.querySelector("#visualizer-json-query-table").innerHTML=t.data.table,this.initTable()):(this.setState({isLoading:!1}),alert(t.data.msg));case 5:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getTableData",value:(a=$e(Ve().mark((function e(){var t,n,r,a,o;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),t=document.querySelectorAll("#visualizer-json-query-table input"),n=document.querySelectorAll("#visualizer-json-query-table select"),r=[],a={},t.forEach((function(e){return r.push(e.value)})),n.forEach((function(e){return a[e.name]=e.value})),e.next=9,ot({path:"/visualizer/v1/set-json-data",data:Je({url:this.props.chart["visualizer-json-url"],method:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,username:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,password:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,auth:this.props.chart["visualizer-json-headers"]&&"object"!==Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth,root:this.props.chart["visualizer-json-root"]||this.state.endpointRoots[0].value,paging:this.props.chart["visualizer-json-paging"]||0,header:r},a),method:"GET"});case 9:(o=e.sent).success?(this.props.JSONImportData(o.data.name,JSON.parse(o.data.series),JSON.parse(o.data.data)),this.setState({isOpen:!1,isLoading:!1})):(alert(o.data.msg),this.setState({isLoading:!1}));case 11:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"render",value:function(){var e=this;return wp.element.createElement(pt,{title:rt("Import from JSON"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,rt("You can choose here to import or synchronize your chart data with a remote JSON source.")),wp.element.createElement("p",null,wp.element.createElement(ut,{href:"https://docs.themeisle.com/article/1052-how-to-generate-charts-from-json-data-rest-endpoints"},rt("For more info check this tutorial."))),wp.element.createElement(mt,{label:rt("How often do you want to check the url?"),value:this.props.chart["visualizer-json-schedule"]?this.props.chart["visualizer-json-schedule"]:1,options:[{label:rt("One-time"),value:"-1"},{label:rt("Live"),value:"0"},{label:rt("Each hour"),value:"1"},{label:rt("Each 12 hours"),value:"12"},{label:rt("Each day"),value:"24"},{label:rt("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(lt,{isPrimary:!0,isLarge:!0,onClick:this.openModal},rt("Modify Parameters")),this.state.isOpen&&wp.element.createElement(dt,{title:rt("Import from JSON"),className:"visualizer-json-query-modal",shouldCloseOnClickOutside:!1,onRequestClose:function(){e.setState({isOpen:!1,isTableRendered:!1})}},wp.element.createElement(pt,{title:rt("Step 1: Specify the JSON endpoint/URL"),opened:this.state.isFirstStepOpen,onToggle:function(){return e.onToggle("isFirstStepOpen")}},wp.element.createElement("p",null,rt("If you want to add authentication, add headers to the endpoint or change the request in any way, please refer to our document here:")),wp.element.createElement("p",null,wp.element.createElement(ut,{href:"https://docs.themeisle.com/article/1043-visualizer-how-to-extend-rest-endpoints-with-json-response"},rt("How to extend REST endpoints with JSON response"))),wp.element.createElement(ht,{placeholder:rt("Please enter the URL of your JSON file"),value:this.props.chart["visualizer-json-url"]?this.props.chart["visualizer-json-url"]:"",onChange:this.props.editJSONURL}),wp.element.createElement(ct,{icon:"arrow-right-alt2",label:rt("Add Headers"),onClick:this.toggleHeaders},rt("Add Headers")),this.state.isHeaderPanelOpen&&wp.element.createElement("div",{className:"visualizer-json-query-modal-headers-panel"},wp.element.createElement(mt,{label:rt("Request Type"),value:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,options:[{value:"GET",label:rt("GET")},{value:"POST",label:rt("POST")}],onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.method=t,r=Je(Je({},r),{},{method:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,rt("Credentials")),wp.element.createElement(ht,{label:rt("Username"),placeholder:rt("Username/Access Key"),value:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth={username:t,password:e.props.chart["visualizer-json-headers"]&&"object"===Ge(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.password:e.state.requestHeaders.password},r=Je(Je({},r),{},{username:t,password:n.password}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("span",{className:"visualizer-json-query-modal-field-separator"},rt("&")),wp.element.createElement(ht,{label:rt("Password"),placeholder:rt("Password/Secret Key"),type:"password",value:this.props.chart["visualizer-json-headers"]&&"object"===Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth={username:e.props.chart["visualizer-json-headers"]&&"object"===Ge(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.username:e.state.requestHeaders.username,password:t},r=Je(Je({},r),{},{username:n.username,password:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,rt("OR")),wp.element.createElement(ht,{label:rt("Authorization"),placeholder:rt("e.g. SharedKey <AccountName>:<Signature>"),value:this.props.chart["visualizer-json-headers"]&&"object"!==Ge(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth,onChange:function(t){var n=Je({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth=t,r=Je(Je({},r),{},{auth:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}})),wp.element.createElement(lt,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONRoot},rt("Fetch Endpoint"))),wp.element.createElement(pt,{title:rt("Step 2: Choose the JSON root"),initialOpen:!1,opened:this.state.isSecondStepOpen,onToggle:function(){return e.onToggle("isSecondStepOpen")}},wp.element.createElement("p",null,rt("If you see Invalid Data, you may have selected the wrong root to fetch data from. Please select an alternative.")),wp.element.createElement(mt,{value:this.props.chart["visualizer-json-root"],options:this.state.endpointRoots,onChange:this.props.editJSONRoot}),wp.element.createElement(lt,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONData},rt("Parse Endpoint"))),wp.element.createElement(pt,{title:rt("Step 3: Specify miscellaneous parameters"),initialOpen:!1,opened:this.state.isThirdStepOpen,onToggle:function(){return e.onToggle("isThirdStepOpen")}},"community"!==visualizerLocalize.isPro?wp.element.createElement(mt,{value:this.props.chart["visualizer-json-paging"]||0,options:this.state.endpointPaging,onChange:this.props.editJSONPaging}):wp.element.createElement("p",null,rt("Enable this feature in PRO version!"))),wp.element.createElement(pt,{title:rt("Step 4: Select the data to display in the chart"),initialOpen:!1,opened:this.state.isFourthStepOpen,onToggle:function(){return e.onToggle("isFourthStepOpen")}},wp.element.createElement("ul",null,wp.element.createElement("li",null,rt("Select whether to include the data in the chart. Each column selected will form one series.")),wp.element.createElement("li",null,rt("If a column is selected to be included, specify its data type.")),wp.element.createElement("li",null,rt("You can use drag/drop to reorder the columns but this column position is not saved. So when you reload the table, you may have to reorder again.")),wp.element.createElement("li",null,rt("You can select any number of columns but the chart type selected will determine how many will display in the chart."))),wp.element.createElement("div",{id:"visualizer-json-query-table"}),wp.element.createElement(lt,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getTableData},rt("Save & Show Chart")))))}}])&&Ze(t.prototype,n),r&&Ze(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(it);function _t(e){return(_t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gt(e,t){return(gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mt(e);if(t){var a=Mt(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return wt(this,n)}}function wt(e,t){if(t&&("object"===_t(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Mt(e){return(Mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kt=wp.i18n.__,Lt=wp.element.Component,Yt=wp.components,Tt=Yt.Button,Dt=Yt.ExternalLink,St=Yt.PanelBody,Ot=Yt.SelectControl,jt=Yt.TextControl,xt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gt(e,t)}(o,e);var t,n,r,a=vt(o);function o(){return yt(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this;return wp.element.createElement(St,{title:kt("Import data from URL"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(St,{title:kt("One Time Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,kt("You can use this to import data from a remote CSV file. The first row of the CSV file should contain the column headings. The second one should contain series type (string, number, boolean, date, datetime, timeofday).")),wp.element.createElement("p",null,kt("If you are unsure about how to format your data CSV then please take a look at this sample: "),wp.element.createElement(Dt,{href:"".concat(visualizerLocalize.absurl,"samples/").concat(this.props.chart["visualizer-chart-type"],".csv")},"".concat(this.props.chart["visualizer-chart-type"],".csv"))),wp.element.createElement("p",null,kt("You can also import data from Google Spreadsheet.")),wp.element.createElement(jt,{placeholder:kt("Please enter the URL of your CSV file"),value:this.props.chart["visualizer-chart-url"]?this.props.chart["visualizer-chart-url"]:"",onChange:this.props.editURL}),wp.element.createElement(Tt,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!1)}},kt("Import Data"))),"business"===visualizerLocalize.isPro?wp.element.createElement(St,{title:kt("Schedule Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,kt("You can choose here to synchronize your chart data with a remote CSV file. ")),wp.element.createElement("p",null,kt("You can also synchronize with your Google Spreadsheet file.")),wp.element.createElement("p",null,kt("We will update the chart data based on your time interval preference by overwritting the current data with the one from the URL.")),wp.element.createElement(jt,{placeholder:kt("Please enter the URL of your CSV file"),value:this.props.chart["visualizer-chart-url"]?this.props.chart["visualizer-chart-url"]:"",onChange:this.props.editURL}),wp.element.createElement(Ot,{label:kt("How often do you want to check the url?"),value:this.props.chart["visualizer-chart-schedule"]?this.props.chart["visualizer-chart-schedule"]:1,options:[{label:kt("Each hour"),value:"1"},{label:kt("Each 12 hours"),value:"12"},{label:kt("Each day"),value:"24"},{label:kt("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(Tt,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!0)}},kt("Save Schedule"))):wp.element.createElement(St,{title:kt("Schedule Import"),icon:"lock",className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,kt("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(Tt,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},kt("Buy Now"))),wp.element.createElement(ft,{id:this.props.id,chart:this.props.chart,editSchedule:this.props.editJSONSchedule,editJSONURL:this.props.editJSONURL,editJSONHeaders:this.props.editJSONHeaders,editJSONRoot:this.props.editJSONRoot,editJSONPaging:this.props.editJSONPaging,JSONImportData:this.props.JSONImportData}))}}])&&bt(t.prototype,n),r&&bt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Lt);function Et(e){return(Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Pt=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new k(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return Y()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=v(i,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function d(){}function p(){}function m(){}var h={};s(h,a,(function(){return this}));var f=Object.getPrototypeOf,_=f&&f(f(L([])));_&&_!==t&&n.call(_,a)&&(h=_);var y=m.prototype=d.prototype=Object.create(h);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,s){var l=u(e[a],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==Et(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function v(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,v(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function L(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:Y}}function Y(){return{value:void 0,done:!0}}return p.prototype=m,s(y,"constructor",m),s(m,"constructor",p),p.displayName=s(m,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(g.prototype),s(g.prototype,o,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new g(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),s(y,i,"Generator"),s(y,a,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=L,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(M),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function Ct(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function Ht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function At(e,t){return(At=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Rt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ft(e);if(t){var a=Ft(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Nt(this,n)}}function Nt(e,t){if(t&&("object"===Et(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ft(e){return(Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wt=wp.i18n.__,It=wp.apiFetch,Bt=wp.element,Jt=Bt.Component,Ut=Bt.Fragment,Gt=wp.components,Vt=Gt.Button,qt=Gt.PanelBody,$t=Gt.Placeholder,Kt=Gt.SelectControl,Zt=Gt.Spinner,Qt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&At(e,t)}(s,e);var t,n,r,a,o,i=Rt(s);function s(){var e;return Ht(this,s),(e=i.apply(this,arguments)).state={id:"",charts:[]},e}return t=s,(n=[{key:"componentDidMount",value:(a=Pt().mark((function e(){var t,n;return Pt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,It({path:"wp/v2/visualizer/?per_page=100"});case 2:t=(t=e.sent).map((function(e,t){var r=e.chart_data["visualizer-settings"].title?e.chart_data["visualizer-settings"].title:"#".concat(e.id);return 0===t&&(n=e.id),{value:e.id,label:r}})),this.setState({id:n,charts:t});case 5:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=a.apply(e,t);function i(e){Ct(o,n,r,i,s,"next",e)}function s(e){Ct(o,n,r,i,s,"throw",e)}i(void 0)}))},function(){return o.apply(this,arguments)})},{key:"render",value:function(){var e=this;return"community"!==visualizerLocalize.isPro?wp.element.createElement(qt,{title:Wt("Import from other chart"),initialOpen:!1},1<=this.state.charts.length?wp.element.createElement(Ut,null,wp.element.createElement(Kt,{label:Wt("You can import here data from your previously created charts."),value:this.state.id,options:this.state.charts,onChange:function(t){return e.setState({id:t})}}),wp.element.createElement(Vt,{isPrimary:!0,isLarge:!0,isBusy:"getChartData"===this.props.isLoading,onClick:function(){return e.props.getChartData(e.state.id)}},Wt("Import Chart"))):wp.element.createElement($t,null,wp.element.createElement(Zt,null))):wp.element.createElement(qt,{title:Wt("Import from other chart"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,Wt("Enable this feature in PRO version!")),wp.element.createElement(Vt,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},Wt("Buy Now")))}}])&&zt(t.prototype,n),r&&zt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(Jt);function Xt(e){return(Xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function en(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */en=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new k(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return Y()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=v(i,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function d(){}function p(){}function m(){}var h={};s(h,a,(function(){return this}));var f=Object.getPrototypeOf,_=f&&f(f(L([])));_&&_!==t&&n.call(_,a)&&(h=_);var y=m.prototype=d.prototype=Object.create(h);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,s){var l=u(e[a],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==Xt(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function v(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,v(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function L(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:Y}}function Y(){return{value:void 0,done:!0}}return p.prototype=m,s(y,"constructor",m),s(m,"constructor",p),p.displayName=s(m,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(g.prototype),s(g.prototype,o,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new g(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),s(y,i,"Generator"),s(y,a,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=L,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(M),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function tn(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function an(e,t){return(an=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function on(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=un(e);if(t){var a=un(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return sn(this,n)}}function sn(e,t){if(t&&("object"===Xt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ln(e)}function ln(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function un(e){return(un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cn=wp.i18n.__,dn=wp.apiRequest,pn=wp.components,mn=pn.Button,hn=pn.ExternalLink,fn=wp.element,_n=fn.Component,yn=fn.Fragment,bn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&an(e,t)}(s,e);var t,n,r,a,o,i=on(s);function s(){var e;return nn(this,s),(e=i.apply(this,arguments)).onSave=e.onSave.bind(ln(e)),e.state={isLoading:!1,success:!1,query:"",name:"",series:{},data:[]},e}return t=s,(n=[{key:"componentDidMount",value:function(){var e=wp.CodeMirror||CodeMirror,t=document.querySelector(".visualizer-db-query"),n=e.fromTextArea(t,{autofocus:!0,mode:"text/x-mysql",lineWrapping:!0,dragDrop:!1,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-Space":"autocomplete"},hintOptions:{tables:visualizerLocalize.sqlTable}});n.on("inputRead",(function(){n.save()}))}},{key:"onSave",value:(a=en().mark((function e(){var t,n,r;return en().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=document.querySelector(".visualizer-db-query").value,(n=document.querySelector("#visualizer-db-query-table")).innerHTML="",e.next=5,this.setState({isLoading:!0});case 5:return e.next=7,dn({path:"/visualizer/v1/get-query-data",data:{query:t},method:"GET"});case 7:return r=e.sent,e.next=10,this.setState({isLoading:!1,success:r.success,query:t,name:r.data.name||"",series:r.data.series||{},data:r.data.data||[]});case 10:n.innerHTML=r.data.table||r.data.msg,this.state.success&&jQuery("#results").DataTable({paging:!1});case 12:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,r){var o=a.apply(e,t);function i(e){tn(o,n,r,i,s,"next",e)}function s(e){tn(o,n,r,i,s,"throw",e)}i(void 0)}))},function(){return o.apply(this,arguments)})},{key:"render",value:function(){var e=this;return wp.element.createElement(yn,null,wp.element.createElement("textarea",{className:"visualizer-db-query",placeholder:cn("Your query goes here…")},this.props.chart["visualizer-db-query"]),wp.element.createElement("div",{className:"visualizer-db-query-actions"},wp.element.createElement(mn,{isLarge:!0,isDefault:!0,isBusy:this.state.isLoading,onClick:this.onSave},cn("Show Results")),wp.element.createElement(mn,{isLarge:!0,isPrimary:!0,disabled:!this.state.success,onClick:function(){return e.props.save(e.state.query,e.state.name,e.state.series,e.state.data)}},cn("Save"))),wp.element.createElement("ul",null,wp.element.createElement("li",null,wp.element.createElement(hn,{href:"https://docs.themeisle.com/article/970-visualizer-sample-queries-to-generate-charts"},cn("Examples of queries and links to resources that you can use with this feature."))),wp.element.createElement("li",null,cn("Use Control+Space for autocompleting keywords or table names."))),wp.element.createElement("div",{id:"visualizer-db-query-table",className:!this.state.success&&"db-wizard-error"}))}}])&&rn(t.prototype,n),r&&rn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(_n);function gn(e){return(gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mn(e,t){return(Mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function kn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Tn(e);if(t){var a=Tn(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Ln(this,n)}}function Ln(e,t){if(t&&("object"===gn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Yn(e)}function Yn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tn(e){return(Tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dn=wp.i18n.__,Sn=wp.element.Component,On=wp.components,jn=On.Button,xn=On.Modal,En=On.PanelBody,Pn=On.SelectControl,Cn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mn(e,t)}(o,e);var t,n,r,a=kn(o);function o(){var e;return vn(this,o),(e=a.apply(this,arguments)).save=e.save.bind(Yn(e)),e.state={isOpen:!1},e}return t=o,(n=[{key:"save",value:function(e,t,n,r){this.props.databaseImportData(e,t,n,r),this.setState({isOpen:!1})}},{key:"render",value:function(){var e=this;return"business"!==visualizerLocalize.isPro?wp.element.createElement(En,{title:Dn("Import data from database"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,Dn("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(jn,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},Dn("Buy Now"))):wp.element.createElement(En,{title:Dn("Import data from database"),initialOpen:!1},wp.element.createElement("p",null,Dn("You can import data from the database here.")),wp.element.createElement("p",null,Dn("How often do you want to refresh the data from the database.")),wp.element.createElement(Pn,{label:Dn("How often do you want to check the url?"),value:this.props.chart["visualizer-db-schedule"]?this.props.chart["visualizer-db-schedule"]:0,options:[{label:Dn("Live"),value:"0"},{label:Dn("Each hour"),value:"1"},{label:Dn("Each 12 hours"),value:"12"},{label:Dn("Each day"),value:"24"},{label:Dn("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(jn,{isPrimary:!0,isLarge:!0,onClick:function(){return e.setState({isOpen:!0})}},Dn("Create Query")),this.state.isOpen&&wp.element.createElement(xn,{title:Dn("Import from database"),onRequestClose:function(){return e.setState({isOpen:!1})},className:"visualizer-db-query-modal",shouldCloseOnClickOutside:!1},wp.element.createElement(bn,{chart:this.props.chart,changeQuery:this.props.changeQuery,save:this.save})))}}])&&wn(t.prototype,n),r&&wn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Sn),Hn=n(132);n(152);function zn(e){return(zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function An(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nn(e,t){return(Nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=In(e);if(t){var a=In(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Wn(this,n)}}function Wn(e,t){if(t&&("object"===zn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function In(e){return(In=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Bn=wp.i18n.__,Jn=wp.element.Component,Un=wp.components,Gn=Un.Button,Vn=Un.ButtonGroup,qn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nn(e,t)}(o,e);var t,n,r,a=Fn(o);function o(){var e;return An(this,o),(e=a.apply(this,arguments)).data=[],e.dates=[],e.types=["string","number","boolean","date","datetime","timeofday"],e}return t=o,(n=[{key:"componentWillMount",value:function(){var e=this;this.data[this.data.length]=[],this.data[this.data.length]=[],this.props.chart["visualizer-series"].map((function(t,n){e.data[0][n]=t.label,e.data[1][n]=t.type,"date"===t.type&&e.dates.push(n)})),this.props.chart["visualizer-data"].map((function(t){e.data[e.data.length]=t}))}},{key:"render",value:function(){var e=this;return wp.element.createElement("div",{className:"visualizer-chart-editor"},wp.element.createElement(Hn.HotTable,{data:this.data,allowInsertRow:!0,contextMenu:!0,rowHeaders:!0,colHeaders:!0,allowInvalid:!1,className:"htEditor",cells:function(t,n,r){var a;return 1===t&&(a={type:"autocomplete",source:e.types,strict:!1}),0<=e.dates.indexOf(n)&&1<t&&(a={type:"date",dateFormat:"YYYY-MM-DD",correctFormat:!0}),a}}),wp.element.createElement(Vn,null,wp.element.createElement(Gn,{isDefault:!0,isLarge:!0,onClick:this.props.toggleModal},Bn("Close")),wp.element.createElement(Gn,{isPrimary:!0,isLarge:!0,onClick:function(t){e.props.toggleModal(),e.props.editChartData(e.data,"Visualizer_Source_Csv")}},Bn("Save"))))}}])&&Rn(t.prototype,n),r&&Rn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Jn);function $n(e){return($n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qn(e,t){return(Qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Xn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nr(e);if(t){var a=nr(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return er(this,n)}}function er(e,t){if(t&&("object"===$n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return tr(e)}function tr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nr(e){return(nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rr=wp.i18n.__,ar=wp.element,or=ar.Component,ir=ar.Fragment,sr=wp.components,lr=sr.Button,ur=sr.Modal,cr=sr.PanelBody,dr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qn(e,t)}(o,e);var t,n,r,a=Xn(o);function o(){var e;return Kn(this,o),(e=a.apply(this,arguments)).toggleModal=e.toggleModal.bind(tr(e)),e.state={isOpen:!1},e}return t=o,(n=[{key:"toggleModal",value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:"render",value:function(){return"community"!==visualizerLocalize.isPro?wp.element.createElement(ir,null,wp.element.createElement(cr,{title:rr("Manual Data"),initialOpen:!1},wp.element.createElement("p",null,rr("You can manually edit the chart data using a spreadsheet like editor.")),wp.element.createElement(lr,{isPrimary:!0,isLarge:!0,isBusy:this.state.isOpen,onClick:this.toggleModal},rr("View Editor"))),this.state.isOpen&&wp.element.createElement(ur,{title:"Chart Editor",onRequestClose:this.toggleModal,shouldCloseOnClickOutside:!1},wp.element.createElement(qn,{chart:this.props.chart,editChartData:this.props.editChartData,toggleModal:this.toggleModal}))):wp.element.createElement(cr,{title:rr("Manual Data"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,rr("Enable this feature in PRO version!")),wp.element.createElement(lr,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},rr("Buy Now")))}}])&&Zn(t.prototype,n),r&&Zn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(or);function pr(e){return(pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fr(e,t){return(fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=br(e);if(t){var a=br(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return yr(this,n)}}function yr(e,t){if(t&&("object"===pr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function br(e){return(br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gr=wp.i18n.__,vr=wp.element.Component,wr=(wp.blockEditor||wp.editor).ColorPalette,Mr=wp.components,kr=Mr.BaseControl,Lr=Mr.CheckboxControl,Yr=Mr.PanelBody,Tr=Mr.SelectControl,Dr=Mr.TextControl,Sr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fr(e,t)}(o,e);var t,n,r,a=_r(o);function o(){return mr(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"],r=[{label:gr("The tooltip will be displayed when the user hovers over an element"),value:"focus"}];-1>=["timeline"].indexOf(t)&&(r[1]={label:gr("The tooltip will be displayed when the user selects an element"),value:"selection"}),r[2]={label:gr("The tooltip will not be displayed"),value:"none"};var a=[{label:gr("Left of the chart"),value:"left"},{label:gr("Right of the chart"),value:"right"},{label:gr("Above the chart"),value:"top"},{label:gr("Below the chart"),value:"bottom"},{label:gr("Omit the legend"),value:"none"}];"pie"!==t&&a.push({label:gr("Inside the chart"),value:"in"}),"bubble"===t&&(a=a.filter((function(e){return"left"!==e.value})));var o=gr("Text to display above the chart.");return 0<=["tabular","dataTable","gauge","geo","timeline"].indexOf(t)&&(o=gr("Text to display in the back-end admin area")),wp.element.createElement(Yr,{title:gr("General Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Yr,{title:gr("Title"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Dr,{label:gr("Chart Title"),help:o,value:n.title,onChange:function(t){n.title=t,e.props.edit(n)}}),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Tr,{label:gr("Chart Title Position"),help:gr("Where to place the chart title, compared to the chart area."),value:n.titlePosition?n.titlePosition:"out",options:[{label:gr("Inside the chart"),value:"in"},{label:gr("Outside the chart"),value:"out"},{label:gr("None"),value:"none"}],onChange:function(t){n.titlePosition=t,e.props.edit(n)}}),-1>=["tabular","dataTable","gauge","geo","timeline"].indexOf(t)&&wp.element.createElement(kr,{label:gr("Chart Title Color")},wp.element.createElement(wr,{value:n.titleTextStyle.color,onChange:function(t){n.titleTextStyle.color=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Tr,{label:gr("Axes Titles Position"),help:gr("Determines where to place the axis titles, compared to the chart area."),value:n.axisTitlesPosition?n.axisTitlesPosition:"out",options:[{label:gr("Inside the chart"),value:"in"},{label:gr("Outside the chart"),value:"out"},{label:gr("None"),value:"none"}],onChange:function(t){n.axisTitlesPosition=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Yr,{title:gr("Font Styles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Tr,{label:gr("Font Family"),help:gr("The default font family for all text in the chart."),value:n.fontName?n.fontName:"Arial",options:[{label:gr("Arial"),value:"Arial"},{label:gr("Sans Serif"),value:"Sans Serif"},{label:gr("Serif"),value:"serif"},{label:gr("Arial"),value:"Arial"},{label:gr("Wide"),value:"Arial black"},{label:gr("Narrow"),value:"Arial Narrow"},{label:gr("Comic Sans MS"),value:"Comic Sans MS"},{label:gr("Courier New"),value:"Courier New"},{label:gr("Garamond"),value:"Garamond"},{label:gr("Georgia"),value:"Georgia"},{label:gr("Tahoma"),value:"Tahoma"},{label:gr("Verdana"),value:"Verdana"}],onChange:function(t){n.fontName=t,e.props.edit(n)}}),wp.element.createElement(Tr,{label:gr("Font Size"),help:gr("The default font size for all text in the chart."),value:n.fontSize?n.fontSize:"15",options:[{label:"7",value:"7"},{label:"8",value:"8"},{label:"9",value:"9"},{label:"10",value:"10"},{label:"11",value:"11"},{label:"12",value:"12"},{label:"13",value:"13"},{label:"14",value:"14"},{label:"15",value:"15"},{label:"16",value:"16"},{label:"17",value:"17"},{label:"18",value:"18"},{label:"19",value:"19"},{label:"20",value:"20"}],onChange:function(t){n.fontSize=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","timeline"].indexOf(t)&&wp.element.createElement(Yr,{title:gr("Legend"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Tr,{label:gr("Position"),help:gr("Determines where to place the legend, compared to the chart area."),value:n.legend.position?n.legend.position:"right",options:a,onChange:function(r){if("pie"!==t){var a="left"===r?1:0;n.series&&Object.keys(n.series).map((function(e){n.series[e].targetAxisIndex=a}))}n.legend.position=r,e.props.edit(n)}}),wp.element.createElement(Tr,{label:gr("Alignment"),help:gr("Determines the alignment of the legend."),value:n.legend.alignment?n.legend.alignment:"15",options:[{label:gr("Aligned to the start of the allocated area"),value:"start"},{label:gr("Centered in the allocated area"),value:"center"},{label:gr("Aligned to the end of the allocated area"),value:"end"}],onChange:function(t){n.legend.alignment=t,e.props.edit(n)}}),wp.element.createElement(kr,{label:gr("Font Color")},wp.element.createElement(wr,{value:n.legend.textStyle.color,onChange:function(t){n.legend.textStyle.color=t,e.props.edit(n)}}))),-1>=["tabular","gauge","geo","dataTable","timeline"].indexOf(t)&&wp.element.createElement(Yr,{title:gr("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Tr,{label:gr("Trigger"),help:gr("Determines the user interaction that causes the tooltip to be displayed."),value:n.tooltip.trigger?n.tooltip.trigger:"focus",options:r,onChange:function(t){n.tooltip.trigger=t,e.props.edit(n)}}),wp.element.createElement(Tr,{label:gr("Show Color Code"),help:gr("If set to yes, will show colored squares next to the slice information in the tooltip."),value:n.tooltip.showColorCode?n.tooltip.showColorCode:"0",options:[{label:gr("Yes"),value:"1"},{label:gr("No"),value:"0"}],onChange:function(t){n.tooltip.showColorCode=t,e.props.edit(n)}}),0<=["pie"].indexOf(t)&&wp.element.createElement(Tr,{label:gr("Text"),help:gr("Determines what information to display when the user hovers over a pie slice."),value:n.tooltip.text?n.tooltip.text:"both",options:[{label:gr("Display both the absolute value of the slice and the percentage of the whole"),value:"both"},{label:gr("Display only the absolute value of the slice"),value:"value"},{label:gr("Display only the percentage of the whole represented by the slice"),value:"percentage"}],onChange:function(t){n.tooltip.text=t,e.props.edit(n)}})),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(t)&&wp.element.createElement(Yr,{title:gr("Animation"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Lr,{label:gr("Animate on startup?"),help:gr("Determines if the chart will animate on the initial draw."),checked:Number(n.animation.startup),onChange:function(t){n.animation.startup=t?"1":"0",e.props.edit(n)}}),wp.element.createElement(Dr,{label:gr("Duration"),help:gr("The duration of the animation, in milliseconds."),type:"number",value:n.animation.duration,onChange:function(t){n.animation.duration=t,e.props.edit(n)}}),wp.element.createElement(Tr,{label:gr("Easing"),help:gr("The easing function applied to the animation."),value:n.animation.easing?n.animation.easing:"linear",options:[{label:gr("Constant speed"),value:"linear"},{label:gr("Start slow and speed up"),value:"in"},{label:gr("Start fast and slow down"),value:"out"},{label:gr("Start slow, speed up, then slow down"),value:"inAndOut"}],onChange:function(t){n.animation.easing=t,e.props.edit(n)}})))}}])&&hr(t.prototype,n),r&&hr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(vr);function Or(e){return(Or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Er(e,t){return(Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Pr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hr(e);if(t){var a=Hr(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Cr(this,n)}}function Cr(e,t){if(t&&("object"===Or(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Hr(e){return(Hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zr=wp.i18n.__,Ar=wp.element.Component,Rr=wp.components,Nr=Rr.PanelBody,Fr=Rr.Notice,Wr=Rr.TextControl,Ir=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Er(e,t)}(o,e);var t,n,r,a=Pr(o);function o(){return jr(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Nr,{title:zr("Instance Settings"),initialOpen:!0,className:"visualizer-instance-panel"},wp.element.createElement(Fr,{status:"info",isDismissible:!1},wp.element.createElement("p",null,zr("These settings are valid only for this instance of the chart.")),wp.element.createElement("p",null,zr("This means that if you insert this chart again elsewhere, these values will not persist."))),wp.element.createElement(Wr,{label:zr("Should this instance lazy Load?"),help:zr("-1: do not lazy load. Any number greater than -1 will lazy load the chart once the viewport is that many pixels away from the chart"),value:this.props.attributes.lazy?Number(this.props.attributes.lazy):-1,type:"number",min:"-1",max:"1000",step:"1",onChange:function(n){e.props.attributes.lazy=n,e.props.edit(t)}}))}}])&&xr(t.prototype,n),r&&xr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ar);function Br(e){return(Br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ur(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gr(e,t){return(Gr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Vr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$r(e);if(t){var a=$r(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return qr(this,n)}}function qr(e,t){if(t&&("object"===Br(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function $r(e){return($r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Kr=wp.i18n.__,Zr=wp.element,Qr=Zr.Component,Xr=Zr.Fragment,ea=(wp.blockEditor||wp.editor).ColorPalette,ta=wp.components,na=ta.BaseControl,ra=ta.ExternalLink,aa=ta.PanelBody,oa=ta.SelectControl,ia=ta.TextControl,sa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gr(e,t)}(o,e);var t,n,r,a=Vr(o);function o(){return Jr(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(aa,{title:Kr("Horizontal Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(aa,{title:Kr("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ia,{label:Kr("Axis Title"),help:Kr("The title of the horizontal axis."),value:n.hAxis.title,onChange:function(t){n.hAxis.title=t,e.props.edit(n)}}),wp.element.createElement(oa,{label:Kr("Text Position"),help:Kr("Position of the horizontal axis text, relative to the chart area."),value:n.hAxis.textPosition?n.hAxis.textPosition:"out",options:[{label:Kr("Inside the chart"),value:"in"},{label:Kr("Outside the chart"),value:"out"},{label:Kr("None"),value:"none"}],onChange:function(t){n.hAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(oa,{label:Kr("Direction"),help:Kr("The direction in which the values along the horizontal axis grow."),value:n.hAxis.direction?n.hAxis.direction:"1",options:[{label:Kr("Identical Direction"),value:"1"},{label:Kr("Reverse Direction"),value:"-1"}],onChange:function(t){n.hAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(na,{label:Kr("Base Line Color")},wp.element.createElement(ea,{value:n.vAxis.baselineColor,onChange:function(t){n.vAxis.baselineColor=ne(t),e.props.edit(n)}})),wp.element.createElement(na,{label:Kr("Axis Text Color")},wp.element.createElement(ea,{value:n.hAxis.textStyle.color||n.hAxis.textStyle,onChange:function(t){n.hAxis.textStyle={},n.hAxis.textStyle.color=ne(t),e.props.edit(n)}})),-1>=["column"].indexOf(t)&&wp.element.createElement(Xr,null,wp.element.createElement(ia,{label:Kr("Number Format"),help:Kr("Enter custom format pattern to apply to horizontal axis labels."),value:n.hAxis.format,onChange:function(t){n.hAxis.format=t,e.props.edit(n)}}),wp.element.createElement("p",null,Kr("For number axis labels, this is a subset of the formatting "),wp.element.createElement(ra,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Kr("ICU pattern set.")),Kr(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,Kr("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(ra,{href:"https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax"},Kr("ICU date and time format."))))),-1>=["column"].indexOf(t)&&wp.element.createElement(Xr,null,wp.element.createElement(aa,{title:Kr("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ia,{label:Kr("Count"),help:Kr("The approximate number of horizontal gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between gridlines."),value:n.hAxis.gridlines?n.hAxis.gridlines.count:"",onChange:function(t){n.hAxis.gridlines||(n.hAxis.gridlines={}),n.hAxis.gridlines.count=t,e.props.edit(n)}}),wp.element.createElement(na,{label:Kr("Color")},wp.element.createElement(ea,{value:n.hAxis.gridlines?n.hAxis.gridlines.color:"",onChange:function(t){n.hAxis.gridlines||(n.hAxis.gridlines={}),n.hAxis.gridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(aa,{title:Kr("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ia,{label:Kr("Count"),help:Kr("Specify 0 to disable the minor gridlines."),value:n.hAxis.minorGridlines?n.hAxis.minorGridlines.count:"",onChange:function(t){n.hAxis.minorGridlines||(n.hAxis.minorGridlines={}),n.hAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(na,{label:Kr("Color")},wp.element.createElement(ea,{value:n.hAxis.minorGridlines?n.hAxis.minorGridlines.color:"",onChange:function(t){n.hAxis.minorGridlines||(n.hAxis.minorGridlines={}),n.hAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(aa,{title:Kr("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ia,{label:Kr("Maximun Value"),help:Kr("The maximum vertical data value to render."),value:n.hAxis.viewWindow?n.hAxis.viewWindow.max:"",onChange:function(t){n.hAxis.viewWindow||(n.hAxis.viewWindow={}),n.hAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(ia,{label:Kr("Minimum Value"),help:Kr("The minimum vertical data value to render."),value:n.hAxis.viewWindow?n.hAxis.viewWindow.min:"",onChange:function(t){n.hAxis.viewWindow||(n.hAxis.viewWindow={}),n.hAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&Ur(t.prototype,n),r&&Ur(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Qr);function la(e){return(la="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ua(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ca(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function da(e,t){return(da=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ha(e);if(t){var a=ha(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ma(this,n)}}function ma(e,t){if(t&&("object"===la(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ha(e){return(ha=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fa=wp.i18n.__,_a=wp.element,ya=_a.Component,ba=_a.Fragment,ga=(wp.blockEditor||wp.editor).ColorPalette,va=wp.components,wa=va.BaseControl,Ma=va.ExternalLink,ka=va.PanelBody,La=va.SelectControl,Ya=va.TextControl,Ta=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&da(e,t)}(o,e);var t,n,r,a=pa(o);function o(){return ua(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(ka,{title:fa("Vertical Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ka,{title:fa("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ya,{label:fa("Axis Title"),help:fa("The title of the Vertical axis."),value:n.vAxis.title,onChange:function(t){n.vAxis.title=t,e.props.edit(n)}}),wp.element.createElement(La,{label:fa("Text Position"),help:fa("Position of the Vertical axis text, relative to the chart area."),value:n.vAxis.textPosition?n.vAxis.textPosition:"out",options:[{label:fa("Inside the chart"),value:"in"},{label:fa("Outside the chart"),value:"out"},{label:fa("None"),value:"none"}],onChange:function(t){n.vAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(La,{label:fa("Direction"),help:fa("The direction in which the values along the Vertical axis grow."),value:n.vAxis.direction?n.vAxis.direction:"1",options:[{label:fa("Identical Direction"),value:"1"},{label:fa("Reverse Direction"),value:"-1"}],onChange:function(t){n.vAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(wa,{label:fa("Base Line Color")},wp.element.createElement(ga,{value:n.hAxis.baselineColor,onChange:function(t){n.hAxis.baselineColor=ne(t),e.props.edit(n)}})),wp.element.createElement(wa,{label:fa("Axis Text Color")},wp.element.createElement(ga,{value:n.vAxis.textStyle.color||n.vAxis.textStyle,onChange:function(t){n.vAxis.textStyle={},n.vAxis.textStyle.color=ne(t),e.props.edit(n)}})),-1>=["bar"].indexOf(t)&&wp.element.createElement(ba,null,wp.element.createElement(Ya,{label:fa("Number Format"),help:fa("Enter custom format pattern to apply to Vertical axis labels."),value:n.vAxis.format,onChange:function(t){n.vAxis.format=t,e.props.edit(n)}}),wp.element.createElement("p",null,fa("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Ma,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},fa("ICU pattern set.")),fa(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,fa("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Ma,{href:"https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax"},fa("ICU date and time format."))))),-1>=["bar"].indexOf(t)&&wp.element.createElement(ba,null,wp.element.createElement(ka,{title:fa("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ya,{label:fa("Count"),help:fa("The approximate number of vertical gridlines inside the chart area. You can specify a value of -1 to automatically compute the number of gridlines, 0 or 1 to draw no gridlines, or 2 or more to only draw gridline. Any number greater than 2 will be used to compute the minSpacing between gridlines."),value:n.vAxis.gridlines?n.vAxis.gridlines.count:"",onChange:function(t){n.vAxis.gridlines||(n.vAxis.gridlines={}),n.vAxis.gridlines.count=t,e.props.edit(n)}}),wp.element.createElement(wa,{label:fa("Color")},wp.element.createElement(ga,{value:n.vAxis.gridlines?n.vAxis.gridlines.color:"",onChange:function(t){n.vAxis.gridlines||(n.vAxis.gridlines={}),n.vAxis.gridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(ka,{title:fa("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ya,{label:fa("Count"),help:fa("Specify 0 to disable the minor gridlines."),value:n.vAxis.minorGridlines?n.vAxis.minorGridlines.count:"",onChange:function(t){n.vAxis.minorGridlines||(n.vAxis.minorGridlines={}),n.vAxis.minorGridlines.count=t,e.props.edit(n)}}),wp.element.createElement(wa,{label:fa("Color")},wp.element.createElement(ga,{value:n.vAxis.minorGridlines?n.vAxis.minorGridlines.color:"",onChange:function(t){n.vAxis.minorGridlines||(n.vAxis.minorGridlines={}),n.vAxis.minorGridlines.color=t,e.props.edit(n)}}))),wp.element.createElement(ka,{title:fa("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ya,{label:fa("Maximun Value"),help:fa("The maximum vertical data value to render."),value:n.vAxis.viewWindow?n.vAxis.viewWindow.max:"",onChange:function(t){n.vAxis.viewWindow||(n.vAxis.viewWindow={}),n.vAxis.viewWindow.max=t,e.props.edit(n)}}),wp.element.createElement(Ya,{label:fa("Minimum Value"),help:fa("The minimum vertical data value to render."),value:n.vAxis.viewWindow?n.vAxis.viewWindow.min:"",onChange:function(t){n.vAxis.viewWindow||(n.vAxis.viewWindow={}),n.vAxis.viewWindow.min=t,e.props.edit(n)}}))))}}])&&ca(t.prototype,n),r&&ca(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ya);function Da(e){return(Da="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ja(e,t){return(ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pa(e);if(t){var a=Pa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Ea(this,n)}}function Ea(e,t){if(t&&("object"===Da(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Pa(e){return(Pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ca=wp.i18n.__,Ha=wp.element,za=Ha.Component,Aa=Ha.Fragment,Ra=(wp.blockEditor||wp.editor).ColorPalette,Na=wp.components,Fa=Na.BaseControl,Wa=Na.ExternalLink,Ia=Na.PanelBody,Ba=Na.SelectControl,Ja=Na.TextControl,Ua=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ja(e,t)}(o,e);var t,n,r,a=xa(o);function o(){return Sa(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Ia,{title:Ca("Pie Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Aa,null,wp.element.createElement(Ja,{label:Ca("Number Format"),help:Ca("Enter custom format pattern to apply to chart labels."),value:t.format,onChange:function(n){t.format=n,e.props.edit(t)}}),wp.element.createElement("p",null,Ca("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Wa,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Ca("ICU pattern set.")),Ca(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")),wp.element.createElement("p",null,Ca("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Wa,{href:"https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax"},Ca("ICU date and time format.")))),wp.element.createElement(Ba,{label:Ca("Is 3D"),help:Ca("If set to yes, displays a three-dimensional chart."),value:t.is3D?t.is3D:"0",options:[{label:Ca("Yes"),value:"1"},{label:Ca("No"),value:"0"}],onChange:function(n){t.is3D=n,e.props.edit(t)}}),wp.element.createElement(Ba,{label:Ca("Reverse Categories"),help:Ca("If set to yes, will draw slices counterclockwise."),value:t.reverseCategories?t.reverseCategories:"0",options:[{label:Ca("Yes"),value:"1"},{label:Ca("No"),value:"0"}],onChange:function(n){t.reverseCategories=n,e.props.edit(t)}}),wp.element.createElement(Ba,{label:Ca("Slice Text"),help:Ca("The content of the text displayed on the slice."),value:t.pieSliceText?t.pieSliceText:"percentage",options:[{label:Ca("The percentage of the slice size out of the total"),value:"percentage"},{label:Ca("The quantitative value of the slice"),value:"value"},{label:Ca("The name of the slice"),value:"label"},{label:Ca("The quantitative value and percentage of the slice"),value:"value-and-percentage"},{label:Ca("No text is displayed"),value:"none"}],onChange:function(n){t.pieSliceText=n,e.props.edit(t)}}),wp.element.createElement(Ja,{label:Ca("Pie Hole"),help:Ca("If between 0 and 1, displays a donut chart. The hole with have a radius equal to number times the radius of the chart. Only applicable when the chart is two-dimensional."),placeholder:Ca("0.5"),value:t.pieHole,onChange:function(n){t.pieHole=n,e.props.edit(t)}}),wp.element.createElement(Ja,{label:Ca("Start Angle"),help:Ca("The angle, in degrees, to rotate the chart by. The default of 0 will orient the leftmost edge of the first slice directly up."),value:t.pieStartAngle,onChange:function(n){t.pieStartAngle=n,e.props.edit(t)}}),wp.element.createElement(Fa,{label:Ca("Slice Border Color")},wp.element.createElement(Ra,{value:t.pieSliceBorderColor,onChange:function(n){t.pieSliceBorderColor=n,e.props.edit(t)}})))}}])&&Oa(t.prototype,n),r&&Oa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(za);function Ga(e){return(Ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Va(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $a(e,t){return($a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ka(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qa(e);if(t){var a=Qa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Za(this,n)}}function Za(e,t){if(t&&("object"===Ga(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Qa(e){return(Qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xa=wp.i18n.__,eo=wp.element.Component,to=(wp.blockEditor||wp.editor).ColorPalette,no=wp.components,ro=no.BaseControl,ao=no.PanelBody,oo=no.TextControl,io=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$a(e,t)}(o,e);var t,n,r,a=Ka(o);function o(){return Va(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(ao,{title:Xa("Residue Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(oo,{label:Xa("Visibility Threshold"),help:Xa("The slice relative part, below which a slice will not show individually. All slices that have not passed this threshold will be combined to a single slice, whose size is the sum of all their sizes. Default is not to show individually any slice which is smaller than half a degree."),placeholder:Xa("0.001388889"),value:t.sliceVisibilityThreshold,onChange:function(n){t.sliceVisibilityThreshold=n,e.props.edit(t)}}),wp.element.createElement(oo,{label:Xa("Residue Slice Label"),help:Xa("A label for the combination slice that holds all slices below slice visibility threshold."),value:t.pieResidueSliceLabel,onChange:function(n){t.pieResidueSliceLabel=n,e.props.edit(t)}}),wp.element.createElement(ro,{label:Xa("Residue Slice Color")},wp.element.createElement(to,{value:t.pieResidueSliceColor,onChange:function(n){t.pieResidueSliceColor=n,e.props.edit(t)}})))}}])&&qa(t.prototype,n),r&&qa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(eo);function so(e){return(so="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function co(e,t){return(co=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function po(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ho(e);if(t){var a=ho(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return mo(this,n)}}function mo(e,t){if(t&&("object"===so(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ho(e){return(ho=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fo=wp.i18n.__,_o=wp.element,yo=_o.Component,bo=_o.Fragment,go=wp.components,vo=go.PanelBody,wo=go.SelectControl,Mo=go.TextControl,ko=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&co(e,t)}(o,e);var t,n,r,a=po(o);function o(){return lo(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(vo,{title:fo("Lines Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Mo,{label:fo("Line Width"),help:fo("Data line width in pixels. Use zero to hide all lines."),value:n.lineWidth,onChange:function(t){n.lineWidth=t,e.props.edit(n)}}),wp.element.createElement(Mo,{label:fo("Point Size"),help:fo("Diameter of displayed points in pixels. Use zero to hide all the points."),value:n.pointSize,onChange:function(t){n.pointSize=t,e.props.edit(n)}}),-1>=["area"].indexOf(t)&&wp.element.createElement(wo,{label:fo("Curve Type"),help:fo("Determines whether the series has to be presented in the legend or not."),value:n.curveType?n.curveType:"none",options:[{label:fo("Straight line without curve"),value:"none"},{label:fo("The angles of the line will be smoothed"),value:"function"}],onChange:function(t){n.curveType=t,e.props.edit(n)}}),-1>=["scatter"].indexOf(t)&&wp.element.createElement(wo,{label:fo("Focus Target"),help:fo("The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click."),value:n.focusTarget?n.focusTarget:"datum",options:[{label:fo("Focus on a single data point."),value:"datum"},{label:fo("Focus on a grouping of all data points along the major axis."),value:"category"}],onChange:function(t){n.focusTarget=t,e.props.edit(n)}}),wp.element.createElement(wo,{label:fo("Selection Mode"),help:fo("Determines how many data points an user can select on a chart."),value:n.selectionMode?n.selectionMode:"single",options:[{label:fo("Single data point"),value:"single"},{label:fo("Multiple data points"),value:"multiple"}],onChange:function(t){n.selectionMode=t,e.props.edit(n)}}),wp.element.createElement(wo,{label:fo("Aggregation Target"),help:fo("Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element."),value:n.aggregationTarget?n.aggregationTarget:"auto",options:[{label:fo("Group selected data by x-value"),value:"category"},{label:fo("Group selected data by series"),value:"series"},{label:fo("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:fo("Show only one tooltip per selection"),value:"none"}],onChange:function(t){n.aggregationTarget=t,e.props.edit(n)}}),wp.element.createElement(Mo,{label:fo("Point Opacity"),help:fo("The transparency of data points, with 1.0 being completely opaque and 0.0 fully transparent."),value:n.dataOpacity,onChange:function(t){n.dataOpacity=t,e.props.edit(n)}}),-1>=["scatter","line"].indexOf(t)&&wp.element.createElement(bo,null,wp.element.createElement(Mo,{label:fo("Area Opacity"),help:fo("The default opacity of the colored area under an area chart series, where 0.0 is fully transparent and 1.0 is fully opaque. To specify opacity for an individual series, set the area opacity value in the series property."),value:n.areaOpacity,onChange:function(t){n.areaOpacity=t,e.props.edit(n)}}),wp.element.createElement(wo,{label:fo("Is Stacked"),help:fo("If set to yes, series elements are stacked."),value:n.isStacked?n.isStacked:"0",options:[{label:fo("Yes"),value:"1"},{label:fo("No"),value:"0"}],onChange:function(t){n.isStacked=t,e.props.edit(n)}})),-1>=["scatter","area"].indexOf(t)&&wp.element.createElement(wo,{label:fo("Interpolate Nulls"),help:fo("Whether to guess the value of missing points. If yes, it will guess the value of any missing data based on neighboring points. If no, it will leave a break in the line at the unknown point."),value:n.interpolateNulls?n.interpolateNulls:"0",options:[{label:fo("Yes"),value:"1"},{label:fo("No"),value:"0"}],onChange:function(t){n.interpolateNulls=t,e.props.edit(n)}}))}}])&&uo(t.prototype,n),r&&uo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(yo);function Lo(e){return(Lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function To(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Do(e,t){return(Do=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function So(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jo(e);if(t){var a=jo(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Oo(this,n)}}function Oo(e,t){if(t&&("object"===Lo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function jo(e){return(jo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xo=wp.i18n.__,Eo=wp.element.Component,Po=wp.components,Co=Po.PanelBody,Ho=Po.SelectControl,zo=Po.TextControl,Ao=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Do(e,t)}(o,e);var t,n,r,a=So(o);function o(){return Yo(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Co,{title:xo("Bars Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ho,{label:xo("Focus Target"),help:xo("The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click."),value:t.focusTarget?t.focusTarget:"datum",options:[{label:xo("Focus on a single data point."),value:"datum"},{label:xo("Focus on a grouping of all data points along the major axis."),value:"category"}],onChange:function(n){t.focusTarget=n,e.props.edit(t)}}),wp.element.createElement(Ho,{label:xo("Is Stacked"),help:xo("If set to yes, series elements are stacked."),value:t.isStacked?t.isStacked:"0",options:[{label:xo("Yes"),value:"1"},{label:xo("No"),value:"0"}],onChange:function(n){t.isStacked=n,e.props.edit(t)}}),wp.element.createElement(zo,{label:xo("Bars Opacity"),help:xo("Bars transparency, with 1.0 being completely opaque and 0.0 fully transparent."),value:t.dataOpacity,onChange:function(n){t.dataOpacity=n,e.props.edit(t)}}))}}])&&To(t.prototype,n),r&&To(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Eo);function Ro(e){return(Ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function No(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wo(e,t){return(Wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Io(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Jo(e);if(t){var a=Jo(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Bo(this,n)}}function Bo(e,t){if(t&&("object"===Ro(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Jo(e){return(Jo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Uo=wp.i18n.__,Go=wp.element.Component,Vo=(wp.blockEditor||wp.editor).ColorPalette,qo=wp.components,$o=qo.BaseControl,Ko=qo.PanelBody,Zo=qo.SelectControl,Qo=qo.TextControl,Xo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wo(e,t)}(o,e);var t,n,r,a=Io(o);function o(){return No(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Ko,{title:Uo("Candles Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ko,{title:Uo("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Zo,{label:Uo("Focus Target"),help:Uo("The type of the entity that receives focus on mouse hover. Also affects which entity is selected by mouse click."),value:t.focusTarget?t.focusTarget:"datum",options:[{label:Uo("Focus on a single data point."),value:"datum"},{label:Uo("Focus on a grouping of all data points along the major axis."),value:"category"}],onChange:function(n){t.focusTarget=n,e.props.edit(t)}}),wp.element.createElement(Zo,{label:Uo("Selection Mode"),help:Uo("Determines how many data points an user can select on a chart."),value:t.selectionMode?t.selectionMode:"single",options:[{label:Uo("Single data point"),value:"single"},{label:Uo("Multiple data points"),value:"multiple"}],onChange:function(n){t.selectionMode=n,e.props.edit(t)}}),wp.element.createElement(Zo,{label:Uo("Aggregation Target"),help:Uo("Determines how multiple data selections are rolled up into tooltips. To make it working you need to set multiple selection mode and tooltip trigger to display it when an user selects an element."),value:t.aggregationTarget?t.aggregationTarget:"auto",options:[{label:Uo("Group selected data by x-value"),value:"category"},{label:Uo("Group selected data by series"),value:"series"},{label:Uo("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:Uo("Show only one tooltip per selection"),value:"none"}],onChange:function(n){t.aggregationTarget=n,e.props.edit(t)}})),wp.element.createElement(Ko,{title:Uo("Failing Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Qo,{label:Uo("Stroke Width"),help:Uo("The stroke width of falling candles."),value:t.candlestick.fallingColor.strokeWidth,onChange:function(n){t.candlestick.fallingColor.strokeWidth=n,e.props.edit(t)}}),wp.element.createElement($o,{label:Uo("Stroke Color")},wp.element.createElement(Vo,{value:t.candlestick.fallingColor.stroke,onChange:function(n){t.candlestick.fallingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement($o,{label:Uo("Fill Color")},wp.element.createElement(Vo,{value:t.candlestick.fallingColor.fill,onChange:function(n){t.candlestick.fallingColor.fill=n,e.props.edit(t)}}))),wp.element.createElement(Ko,{title:Uo("Rising Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Qo,{label:Uo("Stroke Width"),help:Uo("The stroke width of rising candles."),value:t.candlestick.risingColor.strokeWidth,onChange:function(n){t.candlestick.risingColor.strokeWidth=n,e.props.edit(t)}}),wp.element.createElement($o,{label:Uo("Stroke Color")},wp.element.createElement(Vo,{value:t.candlestick.risingColor.stroke,onChange:function(n){t.candlestick.risingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement($o,{label:Uo("Fill Color")},wp.element.createElement(Vo,{value:t.candlestick.risingColor.fill,onChange:function(n){t.candlestick.risingColor.fill=n,e.props.edit(t)}}))))}}])&&Fo(t.prototype,n),r&&Fo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Go);function ei(e){return(ei="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ti(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ni(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ri(e,t){return(ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ai(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ii(e);if(t){var a=ii(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return oi(this,n)}}function oi(e,t){if(t&&("object"===ei(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ii(e){return(ii=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var si=wp.i18n.__,li=wp.element.Component,ui=wp.components,ci=ui.ExternalLink,di=ui.PanelBody,pi=ui.SelectControl,mi=ui.TextControl,hi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ri(e,t)}(o,e);var t,n,r,a=ai(o);function o(){return ti(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(di,{title:si("Map Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(di,{title:si("API"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(mi,{label:si("API Key"),help:si("Add the Google Maps API key."),value:t.map_api_key,onChange:function(n){t.map_api_key=n,e.props.edit(t)}}),wp.element.createElement(ci,{href:"https://developers.google.com/maps/documentation/javascript/get-api-key"},si("Get API Keys"))),wp.element.createElement(di,{title:si("Region"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,si("A map of the entire world using 'world'.")),wp.element.createElement("li",null,si("A continent or a sub-continent, specified by its 3-digit code, e.g., '011' for Western Africa. "),wp.element.createElement(ci,{href:"https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart#Continent_Hierarchy"},si("More info here."))),wp.element.createElement("li",null,si("A country, specified by its ISO 3166-1 alpha-2 code, e.g., 'AU' for Australia. "),wp.element.createElement(ci,{href:"http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"},si("More info here."))),wp.element.createElement("li",null,si("A state in the United States, specified by its ISO 3166-2:US code, e.g., 'US-AL' for Alabama. Note that the resolution option must be set to either 'provinces' or 'metros'. "),wp.element.createElement(ci,{href:"http://en.wikipedia.org/wiki/ISO_3166-2:US"},si("More info here.")))),wp.element.createElement(mi,{label:si("Reigion"),help:si("Configure the region area to display on the map. (Surrounding areas will be displayed as well.)"),value:t.region,onChange:function(n){t.region=n,e.props.edit(t)}})),wp.element.createElement(di,{title:si("Resolution"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,si("'countries' - Supported for all regions, except for US state regions.")),wp.element.createElement("li",null,si("'provinces' - Supported only for country regions and US state regions. Not supported for all countries; please test a country to see whether this option is supported.")),wp.element.createElement("li",null,si("'metros' - Supported for the US country region and US state regions only."))),wp.element.createElement(pi,{label:si("Resolution"),help:si("The resolution of the map borders."),value:t.resolution?t.resolution:"countries",options:[{label:si("Countries"),value:"countries"},{label:si("Provinces"),value:"provinces"},{label:si("Metros"),value:"metros"}],onChange:function(n){t.resolution=n,e.props.edit(t)}})),wp.element.createElement(di,{title:si("Display Mode"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,si("'auto' - Choose based on the format of the data.")),wp.element.createElement("li",null,si("'regions' - This is a region map.")),wp.element.createElement("li",null,si("'markers' - This is a marker map."))),wp.element.createElement(pi,{label:si("Display Mode"),help:si("Determines which type of map this is."),value:t.displayMode?t.displayMode:"auto",options:[{label:si("Auto"),value:"auto"},{label:si("Regions"),value:"regions"},{label:si("Markers"),value:"markers"}],onChange:function(n){t.displayMode=n,e.props.edit(t)}})),wp.element.createElement(di,{title:si("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(pi,{label:si("Trigger"),help:si("Determines the user interaction that causes the tooltip to be displayed."),value:t.tooltip.trigger?t.tooltip.trigger:"focus",options:[{label:si("The tooltip will be displayed when the user hovers over an element"),value:"focus"},{label:si("The tooltip will not be displayed"),value:"none"}],onChange:function(n){t.tooltip.trigger=n,e.props.edit(t)}})))}}])&&ni(t.prototype,n),r&&ni(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(li);function fi(e){return(fi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bi(e,t){return(bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function gi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wi(e);if(t){var a=wi(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return vi(this,n)}}function vi(e,t){if(t&&("object"===fi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function wi(e){return(wi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Mi=wp.i18n.__,ki=wp.element.Component,Li=(wp.blockEditor||wp.editor).ColorPalette,Yi=wp.components,Ti=Yi.BaseControl,Di=Yi.PanelBody,Si=Yi.TextControl,Oi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bi(e,t)}(o,e);var t,n,r,a=gi(o);function o(){return _i(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Di,{title:Mi("Color Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Si,{label:Mi("Minimum Values"),help:Mi("Determines the minimum values of color axis."),value:t.colorAxis.minValue,onChange:function(n){t.colorAxis.minValue=n,e.props.edit(t)}}),wp.element.createElement(Si,{label:Mi("Maximum Values"),help:Mi("Determines the maximum values of color axis."),value:t.colorAxis.maxValue,onChange:function(n){t.colorAxis.maxValue=n,e.props.edit(t)}}),wp.element.createElement(Ti,{label:Mi("Minimum Value")},wp.element.createElement(Li,{value:t.colorAxis.colors[0],onChange:function(n){t.colorAxis.colors[0]=n,e.props.edit(t)}})),wp.element.createElement(Ti,{label:Mi("Intermediate Value")},wp.element.createElement(Li,{value:t.colorAxis.colors[1],onChange:function(n){t.colorAxis.colors[1]=n,e.props.edit(t)}})),wp.element.createElement(Ti,{label:Mi("Maximum Value")},wp.element.createElement(Li,{value:t.colorAxis.colors[2],onChange:function(n){t.colorAxis.colors[2]=n,e.props.edit(t)}})),wp.element.createElement(Ti,{label:Mi("Dateless Region")},wp.element.createElement(Li,{value:t.datalessRegionColor,onChange:function(n){t.datalessRegionColor=n,e.props.edit(t)}})))}}])&&yi(t.prototype,n),r&&yi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ki);function ji(e){return(ji="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ei(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pi(e,t){return(Pi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ci(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zi(e);if(t){var a=zi(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Hi(this,n)}}function Hi(e,t){if(t&&("object"===ji(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function zi(e){return(zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ai=wp.i18n.__,Ri=wp.element,Ni=Ri.Component,Fi=Ri.Fragment,Wi=wp.components,Ii=Wi.ExternalLink,Bi=Wi.PanelBody,Ji=Wi.TextControl,Ui=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pi(e,t)}(o,e);var t,n,r,a=Ci(o);function o(){return xi(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Bi,{title:Ai("Size Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ji,{label:Ai("Minimum Values"),help:Ai("Determines the minimum values of size axis."),value:t.sizeAxis.minValue,onChange:function(n){t.sizeAxis.minValue=n,e.props.edit(t)}}),wp.element.createElement(Ji,{label:Ai("Maximum Values"),help:Ai("Determines the maximum values of size axis."),value:t.sizeAxis.maxValue,onChange:function(n){t.sizeAxis.maxValue=n,e.props.edit(t)}}),wp.element.createElement(Ji,{label:Ai("Minimum Marker Radius"),help:Ai("Determines the radius of the smallest possible bubbles, in pixels."),value:t.sizeAxis.minSize,onChange:function(n){t.sizeAxis.minSize=n,e.props.edit(t)}}),wp.element.createElement(Ji,{label:Ai("Maximum Marker Radius"),help:Ai("Determines the radius of the largest possible bubbles, in pixels."),value:t.sizeAxis.maxSize,onChange:function(n){t.sizeAxis.maxSize=n,e.props.edit(t)}}),wp.element.createElement(Ji,{label:Ai("Marker Opacity"),help:Ai("The opacity of the markers, where 0.0 is fully transparent and 1.0 is fully opaque."),value:t.markerOpacity,onChange:function(n){t.markerOpacity=n,e.props.edit(t)}}),wp.element.createElement(Fi,null,wp.element.createElement(Ji,{label:Ai("Number Format"),help:Ai("Enter custom format pattern to apply to this series value."),value:t.series[0].format,onChange:function(n){t.series[0].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,Ai("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Ii,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Ai("ICU pattern set.")),Ai(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100."))))}}])&&Ei(t.prototype,n),r&&Ei(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ni);function Gi(e){return(Gi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $i(e,t){return($i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ki(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qi(e);if(t){var a=Qi(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Zi(this,n)}}function Zi(e,t){if(t&&("object"===Gi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Qi(e){return(Qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xi=wp.i18n.__,es=wp.element.Component,ts=wp.components,ns=ts.PanelBody,rs=ts.SelectControl,as=ts.TextControl,os=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$i(e,t)}(o,e);var t,n,r,a=Ki(o);function o(){return Vi(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(ns,{title:Xi("Magnifying Glass"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(rs,{label:Xi("Enabled"),help:Xi("If yes, when the user lingers over a cluttered marker, a magnifiying glass will be opened."),value:t.magnifyingGlass.enable?t.magnifyingGlass.enable:"1",options:[{label:Xi("Yes"),value:"1"},{label:Xi("No"),value:"0"}],onChange:function(n){t.magnifyingGlass.enable=n,e.props.edit(t)}}),wp.element.createElement(as,{label:Xi("Zoom Factor"),help:Xi("The zoom factor of the magnifying glass. Can be any number greater than 0."),value:t.magnifyingGlass.zoomFactor,onChange:function(n){t.magnifyingGlass.zoomFactor=n,e.props.edit(t)}}))}}])&&qi(t.prototype,n),r&&qi(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(es);function is(e){return(is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ss(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ls(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function us(e,t){return(us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cs(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ps(e);if(t){var a=ps(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ds(this,n)}}function ds(e,t){if(t&&("object"===is(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ps(e){return(ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ms=wp.i18n.__,hs=wp.element,fs=hs.Component,_s=hs.Fragment,ys=(wp.blockEditor||wp.editor).ColorPalette,bs=wp.components,gs=bs.BaseControl,vs=bs.ExternalLink,ws=bs.PanelBody,Ms=bs.TextControl,ks=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&us(e,t)}(o,e);var t,n,r,a=cs(o);function o(){return ss(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(ws,{title:ms("Gauge Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ws,{title:ms("Tick Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ms,{label:ms("Minimum Values"),help:ms("Determines the minimum values of gauge."),value:t.min,onChange:function(n){t.min=n,e.props.edit(t)}}),wp.element.createElement(Ms,{label:ms("Maximum Values"),help:ms("Determines the maximum values of gauge."),value:t.max,onChange:function(n){t.max=n,e.props.edit(t)}}),wp.element.createElement(Ms,{label:ms("Minor Ticks"),help:ms("The number of minor tick section in each major tick section."),value:t.minorTicks,onChange:function(n){t.minorTicks=n,e.props.edit(t)}}),wp.element.createElement(_s,null,wp.element.createElement(Ms,{label:ms("Number Format"),help:ms("Enter custom format pattern to apply to this series value."),value:t.series[0].format,onChange:function(n){t.series[0].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,ms("For number axis labels, this is a subset of the formatting "),wp.element.createElement(vs,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},ms("ICU pattern set.")),ms(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100.")))),wp.element.createElement(ws,{title:ms("Green Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ms,{label:ms("Minimum Range"),help:ms("The lowest values for a range marked by a green color."),value:t.greenFrom,onChange:function(n){t.greenFrom=n,e.props.edit(t)}}),wp.element.createElement(Ms,{label:ms("Maximum Range"),help:ms("The highest values for a range marked by a green color."),value:t.greenTo,onChange:function(n){t.greenTo=n,e.props.edit(t)}}),wp.element.createElement(gs,{label:ms("Green Color")},wp.element.createElement(ys,{value:t.greenColor,onChange:function(n){t.greenColor=n,e.props.edit(t)}}))),wp.element.createElement(ws,{title:ms("Yellow Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ms,{label:ms("Minimum Range"),help:ms("The lowest values for a range marked by a yellow color."),value:t.yellowFrom,onChange:function(n){t.yellowFrom=n,e.props.edit(t)}}),wp.element.createElement(Ms,{label:ms("Maximum Range"),help:ms("The highest values for a range marked by a yellow color."),value:t.yellowTo,onChange:function(n){t.yellowTo=n,e.props.edit(t)}}),wp.element.createElement(gs,{label:ms("Yellow Color")},wp.element.createElement(ys,{value:t.yellowColor,onChange:function(n){t.yellowColor=n,e.props.edit(t)}}))),wp.element.createElement(ws,{title:ms("Red Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ms,{label:ms("Minimum Range"),help:ms("The lowest values for a range marked by a red color."),value:t.redFrom,onChange:function(n){t.redFrom=n,e.props.edit(t)}}),wp.element.createElement(Ms,{label:ms("Maximum Range"),help:ms("The highest values for a range marked by a red color."),value:t.redTo,onChange:function(n){t.redTo=n,e.props.edit(t)}}),wp.element.createElement(gs,{label:ms("Red Color")},wp.element.createElement(ys,{value:t.redColor,onChange:function(n){t.redColor=n,e.props.edit(t)}}))))}}])&&ls(t.prototype,n),r&&ls(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(fs);function Ls(e){return(Ls="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ys(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ts(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ds(e,t){return(Ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ss(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xs(e);if(t){var a=xs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Os(this,n)}}function Os(e,t){if(t&&("object"===Ls(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return js(e)}function js(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xs(e){return(xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Es=wp.i18n.__,Ps=wp.element.Component,Cs=(wp.blockEditor||wp.editor).ColorPalette,Hs=wp.components,zs=Hs.BaseControl,As=Hs.CheckboxControl,Rs=Hs.PanelBody,Ns=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ds(e,t)}(o,e);var t,n,r,a=Ss(o);function o(){var e;return Ys(this,o),(e=a.apply(this,arguments)).mapValues=e.mapValues.bind(js(e)),e}return t=o,(n=[{key:"mapValues",value:function(e,t){return void 0===e.timeline?e[t]:e.timeline[t]}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return this.mapValues(t,"showRowLabels"),wp.element.createElement(Rs,{title:Es("Timeline Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(As,{label:Es("Show Row Label"),help:Es("If checked, shows the category/row label."),checked:Number(this.mapValues(t,"showRowLabels")),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.showRowLabels=!Number(e.mapValues(t,"showRowLabels")),e.props.edit(t)}}),wp.element.createElement(As,{label:Es("Group by Row Label"),help:Es("If checked, groups the bars on the basis of the category/row label."),checked:Number(this.mapValues(t,"groupByRowLabel")),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.groupByRowLabel=!Number(e.mapValues(t,"groupByRowLabel")),e.props.edit(t)}}),wp.element.createElement(As,{label:Es("Color by Row Label"),help:Es("If checked, colors every bar on the row the same."),checked:Number(this.mapValues(t,"colorByRowLabel")),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.colorByRowLabel=!Number(e.mapValues(t,"colorByRowLabel")),e.props.edit(t)}}),wp.element.createElement(zs,{label:Es("Single Color")},wp.element.createElement(Cs,{value:this.mapValues(t,"singleColor"),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.singleColor=n,e.props.edit(t)}})))}}])&&Ts(t.prototype,n),r&&Ts(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ps);function Fs(e){return(Fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ws(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Is(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bs(e,t){return(Bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Js(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Us(this,n)}}function Us(e,t){if(t&&("object"===Fs(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Gs(e){return(Gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vs=wp.i18n.__,qs=wp.element,$s=qs.Component,Ks=qs.Fragment,Zs=wp.components,Qs=Zs.CheckboxControl,Xs=Zs.PanelBody,el=Zs.SelectControl,tl=Zs.TextControl,nl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bs(e,t)}(o,e);var t,n,r,a=Js(o);function o(){return Ws(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=(this.props.chart["visualizer-chart-type"],this.props.chart["visualizer-chart-library"]);return wp.element.createElement(Xs,{title:Vs("Table Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"DataTable"===n?wp.element.createElement(Ks,null,wp.element.createElement(Qs,{label:Vs("Enable Pagination"),help:Vs("To enable paging through the data."),checked:"true"===t.paging_bool,onChange:function(n){t.paging_bool="true",n||(t.paging_bool="false"),e.props.edit(t)}}),wp.element.createElement(tl,{label:Vs("Number of rows per page"),help:Vs("The number of rows in each page, when paging is enabled."),type:"number",value:t.pageLength_int,placeholder:10,onChange:function(n){t.pageLength_int=n,e.props.edit(t)}}),wp.element.createElement(el,{label:Vs("Pagination type"),help:Vs("Determines what type of pagination options to show."),value:t.pagingType,options:[{label:Vs("Page number buttons only"),value:"numbers"},{label:Vs("'Previous' and 'Next' buttons only"),value:"simple"},{label:Vs("'Previous' and 'Next' buttons, plus page numbers"),value:"simple_numbers"},{label:Vs("'First', 'Previous', 'Next' and 'Last' buttons"),value:"full"},{label:Vs("'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers"),value:"full_numbers"},{label:Vs("'First' and 'Last' buttons, plus page numbers"),value:"first_last_numbers"}],onChange:function(n){t.pagingType=n,e.props.edit(t)}}),wp.element.createElement(Qs,{label:Vs("Scroll Collapse"),help:Vs("Allow the table to reduce in height when a limited number of rows are shown."),checked:"true"===t.scrollCollapse_bool,onChange:function(n){t.scrollCollapse_bool="true",n||(t.scrollCollapse_bool="false"),e.props.edit(t)}}),"true"===t.scrollCollapse_bool&&wp.element.createElement(tl,{label:Vs("Vertical Height"),help:Vs("Vertical scrolling will constrain the table to the given height."),type:"number",value:t.scrollY_int,placeholder:300,onChange:function(n){t.scrollY_int=n,e.props.edit(t)}}),wp.element.createElement(Qs,{label:Vs("Disable Sort"),help:Vs("To disable sorting on columns."),checked:"false"===t.ordering_bool,onChange:function(n){t.ordering_bool="true",n&&(t.ordering_bool="false"),e.props.edit(t)}}),wp.element.createElement(Qs,{label:Vs("Freeze Header/Footer"),help:Vs("Freeze the header and footer."),checked:"true"===t.fixedHeader_bool,onChange:function(n){t.fixedHeader_bool="true",n||(t.fixedHeader_bool="false"),e.props.edit(t)}}),wp.element.createElement(Qs,{label:Vs("Responsive"),help:Vs("Enable the table to be responsive."),checked:"true"===t.responsive_bool,onChange:function(n){t.responsive_bool="true",n||(t.responsive_bool="false"),e.props.edit(t)}})):wp.element.createElement(Ks,null,wp.element.createElement(el,{label:Vs("Enable Pagination"),help:Vs("To enable paging through the data."),value:t.page?t.page:"disable",options:[{label:Vs("Enable"),value:"enable"},{label:Vs("Disable"),value:"disable"}],onChange:function(n){t.page=n,e.props.edit(t)}}),wp.element.createElement(tl,{label:Vs("Number of rows per page"),help:Vs("The number of rows in each page, when paging is enabled."),type:"number",value:t.pageSize,onChange:function(n){t.pageSize=n,e.props.edit(t)}}),wp.element.createElement(el,{label:Vs("Disable Sort"),help:Vs("To disable sorting on columns."),value:t.sort?t.sort:"enable",options:[{label:Vs("Enable"),value:"enable"},{label:Vs("Disable"),value:"disable"}],onChange:function(n){t.sort=n,e.props.edit(t)}}),wp.element.createElement(tl,{label:Vs("Freeze Columns"),help:Vs("The number of columns from the left that will be frozen."),type:"number",value:t.frozenColumns,onChange:function(n){t.frozenColumns=n,e.props.edit(t)}}),wp.element.createElement(Qs,{label:Vs("Allow HTML"),help:Vs("If enabled, formatted values of cells that include HTML tags will be rendered as HTML."),checked:Number(t.allowHtml),onChange:function(n){t.allowHtml=!Number(t.allowHtml),e.props.edit(t)}}),wp.element.createElement(Qs,{label:Vs("Right to Left table"),help:Vs("Adds basic support for right-to-left languages."),checked:Number(t.rtlTable),onChange:function(n){t.rtlTable=!Number(t.rtlTable),e.props.edit(t)}})))}}])&&Is(t.prototype,n),r&&Is(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}($s);function rl(e){return(rl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function al(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ol(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function il(e,t){return(il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function sl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ul(e);if(t){var a=ul(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ll(this,n)}}function ll(e,t){if(t&&("object"===rl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ul(e){return(ul=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cl=wp.i18n.__,dl=wp.element,pl=dl.Component,ml=dl.Fragment,hl=(wp.blockEditor||wp.editor).ColorPalette,fl=wp.components,_l=fl.BaseControl,yl=fl.PanelBody,bl=fl.TextControl,gl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&il(e,t)}(o,e);var t,n,r,a=sl(o);function o(){return al(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=(this.props.chart["visualizer-chart-type"],this.props.chart["visualizer-chart-library"]);return wp.element.createElement(yl,{title:cl("Row/Cell Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"DataTable"===n?wp.element.createElement(ml,null,wp.element.createElement(yl,{title:cl("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(_l,{label:cl("Background Color")},wp.element.createElement(hl,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(_l,{label:cl("Color")},wp.element.createElement(hl,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(bl,{label:cl("Text Orientation"),help:cl("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(yl,{title:cl("Even Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(_l,{label:cl("Background Color")},wp.element.createElement(hl,{value:t.customcss.evenTableRow["background-color"],onChange:function(n){t.customcss.evenTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(_l,{label:cl("Color")},wp.element.createElement(hl,{value:t.customcss.evenTableRow.color,onChange:function(n){t.customcss.evenTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(bl,{label:cl("Text Orientation"),help:cl("In degrees."),type:"number",value:t.customcss.evenTableRow.transform,onChange:function(n){t.customcss.evenTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(yl,{title:cl("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(_l,{label:cl("Background Color")},wp.element.createElement(hl,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(_l,{label:cl("Color")},wp.element.createElement(hl,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(bl,{label:cl("Text Orientation"),help:cl("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))):wp.element.createElement(ml,null,wp.element.createElement(yl,{title:cl("Header Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(_l,{label:cl("Background Color")},wp.element.createElement(hl,{value:t.customcss.headerRow["background-color"],onChange:function(n){t.customcss.headerRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(_l,{label:cl("Color")},wp.element.createElement(hl,{value:t.customcss.headerRow.color,onChange:function(n){t.customcss.headerRow.color=n,e.props.edit(t)}})),wp.element.createElement(bl,{label:cl("Text Orientation"),help:cl("In degrees."),type:"number",value:t.customcss.headerRow.transform,onChange:function(n){t.customcss.headerRow.transform=n,e.props.edit(t)}})),wp.element.createElement(yl,{title:cl("Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(_l,{label:cl("Background Color")},wp.element.createElement(hl,{value:t.customcss.tableRow["background-color"],onChange:function(n){t.customcss.tableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(_l,{label:cl("Color")},wp.element.createElement(hl,{value:t.customcss.tableRow.color,onChange:function(n){t.customcss.tableRow.color=n,e.props.edit(t)}})),wp.element.createElement(bl,{label:cl("Text Orientation"),help:cl("In degrees."),type:"number",value:t.customcss.tableRow.transform,onChange:function(n){t.customcss.tableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(yl,{title:cl("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(_l,{label:cl("Background Color")},wp.element.createElement(hl,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(_l,{label:cl("Color")},wp.element.createElement(hl,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(bl,{label:cl("Text Orientation"),help:cl("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(yl,{title:cl("Selected Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(_l,{label:cl("Background Color")},wp.element.createElement(hl,{value:t.customcss.selectedTableRow["background-color"],onChange:function(n){t.customcss.selectedTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(_l,{label:cl("Color")},wp.element.createElement(hl,{value:t.customcss.selectedTableRow.color,onChange:function(n){t.customcss.selectedTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(bl,{label:cl("Text Orientation"),help:cl("In degrees."),type:"number",value:t.customcss.selectedTableRow.transform,onChange:function(n){t.customcss.selectedTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(yl,{title:cl("Hover Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(_l,{label:cl("Background Color")},wp.element.createElement(hl,{value:t.customcss.hoverTableRow["background-color"],onChange:function(n){t.customcss.hoverTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(_l,{label:cl("Color")},wp.element.createElement(hl,{value:t.customcss.hoverTableRow.color,onChange:function(n){t.customcss.hoverTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(bl,{label:cl("Text Orientation"),help:cl("In degrees."),type:"number",value:t.customcss.hoverTableRow.transform,onChange:function(n){t.customcss.hoverTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(yl,{title:cl("Header Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(_l,{label:cl("Background Color")},wp.element.createElement(hl,{value:t.customcss.headerCell["background-color"],onChange:function(n){t.customcss.headerCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(_l,{label:cl("Color")},wp.element.createElement(hl,{value:t.customcss.headerCell.color,onChange:function(n){t.customcss.headerCell.color=n,e.props.edit(t)}})),wp.element.createElement(bl,{label:cl("Text Orientation"),help:cl("In degrees."),type:"number",value:t.customcss.headerCell.transform,onChange:function(n){t.customcss.headerCell.transform=n,e.props.edit(t)}})),wp.element.createElement(yl,{title:cl("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(_l,{label:cl("Background Color")},wp.element.createElement(hl,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(_l,{label:cl("Color")},wp.element.createElement(hl,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(bl,{label:cl("Text Orientation"),help:cl("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))))}}])&&ol(t.prototype,n),r&&ol(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(pl);function vl(e){return(vl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ml(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kl(e,t){return(kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ll(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Tl(e);if(t){var a=Tl(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Yl(this,n)}}function Yl(e,t){if(t&&("object"===vl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Tl(e){return(Tl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dl=wp.i18n.__,Sl=wp.element.Component,Ol=wp.components,jl=Ol.PanelBody,xl=Ol.SelectControl,El=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kl(e,t)}(o,e);var t,n,r,a=Ll(o);function o(){return wl(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(jl,{title:Dl("Combo Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(xl,{label:Dl("Chart Type"),help:Dl("Select the default chart type."),value:t.seriesType?t.seriesType:"area",options:[{label:Dl("Area"),value:"area"},{label:Dl("Bar"),value:"bars"},{label:Dl("Candlesticks"),value:"candlesticks"},{label:Dl("Line"),value:"line"},{label:Dl("Stepped Area"),value:"steppedArea"}],onChange:function(n){t.seriesType=n,e.props.edit(t)}}))}}])&&Ml(t.prototype,n),r&&Ml(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Sl);function Pl(e){return(Pl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zl(e,t){return(zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Al(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nl(e);if(t){var a=Nl(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Rl(this,n)}}function Rl(e,t){if(t&&("object"===Pl(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Nl(e){return(Nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fl=wp.i18n.__,Wl=wp.element,Il=Wl.Component,Bl=Wl.Fragment,Jl=(wp.blockEditor||wp.editor).ColorPalette,Ul=wp.components,Gl=Ul.BaseControl,Vl=Ul.ExternalLink,ql=Ul.PanelBody,$l=Ul.SelectControl,Kl=Ul.TextControl,Zl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zl(e,t)}(o,e);var t,n,r,a=Al(o);function o(){return Cl(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];Object.keys(e.series).map((function(t){void 0!==e.series[t]&&(e.series[t].temp=1)})),this.props.edit(e)}},{key:"render",value:function(){var e=this,t=(this.props.chart["visualizer-chart-type"],this.props.chart["visualizer-settings"]),n=this.props.chart["visualizer-series"];return wp.element.createElement(ql,{title:Fl("Series Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.series).map((function(r,a){var o=parseInt(r),i=n[r].label||"",s=n[r].type||"",l=0;return"tabular"!==s&&(o=a),r++,wp.element.createElement(ql,{title:i,className:"visualizer-inner-sections",initialOpen:!1},-1>=["tabular","pie"].indexOf(s)&&wp.element.createElement($l,{label:Fl("Visible In Legend"),help:Fl("Determines whether the series has to be presented in the legend or not."),value:t.series[a].visibleInLegend?t.series[a].visibleInLegend:"1",options:[{label:Fl("Yes"),value:"1"},{label:Fl("No"),value:"0"}],onChange:function(n){t.series[a].visibleInLegend=n,e.props.edit(t)}}),-1>=["tabular","candlestick","combo","column","bar"].indexOf(s)&&wp.element.createElement(Bl,null,wp.element.createElement(Kl,{label:Fl("Line Width"),help:Fl("Overrides the global line width value for this series."),value:t.series[a].lineWidth,onChange:function(n){t.series[a].lineWidth=n,e.props.edit(t)},onKeyUp:function(n){clearTimeout(l),l=setTimeout((function(){""!=t.series[a].lineWidth&&0>=t.series[a].lineWidth&&(t.series[a].lineWidth="0.1",e.props.edit(t))}),700)}}),wp.element.createElement(Kl,{label:Fl("Point Size"),help:Fl("Overrides the global point size value for this series."),value:t.series[a].pointSize,onChange:function(n){t.series[a].pointSize=n,e.props.edit(t)}})),-1>=["candlestick"].indexOf(s)&&s&&"number"===s?wp.element.createElement(Bl,null,wp.element.createElement(Kl,{label:Fl("Format"),help:Fl("Enter custom format pattern to apply to this series value."),value:t.series[o].format,onChange:function(n){t.series[o].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,Fl("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Vl,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Fl("ICU pattern set.")),Fl(" For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #%% percentage format then your values will be multiplied by 100."))):0<=["date","datetime","timeofday"].indexOf(s)&&wp.element.createElement(Bl,null,wp.element.createElement(Kl,{label:Fl("Date Format"),help:Fl("Enter custom format pattern to apply to this series value."),placeholder:"dd LLLL yyyy",value:t.series[o].format,onChange:function(n){t.series[o].format=n,e.props.edit(t)}}),wp.element.createElement("p",null,Fl("This is a subset of the date formatting "),wp.element.createElement(Vl,{href:"https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax"},Fl("ICU date and time format.")))),0<=["scatter","line"].indexOf(s)&&wp.element.createElement($l,{label:Fl("Curve Type"),help:Fl("Determines whether the series has to be presented in the legend or not."),value:t.series[a].curveType?t.series[a].curveType:"none",options:[{label:Fl("Straight line without curve"),value:"none"},{label:Fl("The angles of the line will be smoothed"),value:"function"}],onChange:function(n){t.series[a].curveType=n,e.props.edit(t)}}),0<=["area"].indexOf(s)&&wp.element.createElement(Kl,{label:Fl("Area Opacity"),help:Fl("The opacity of the colored area, where 0.0 is fully transparent and 1.0 is fully opaque."),value:t.series[a].areaOpacity,onChange:function(n){t.series[a].areaOpacity=n,e.props.edit(t)}}),0<=["combo"].indexOf(s)&&wp.element.createElement($l,{label:Fl("Chart Type"),help:Fl("Select the type of chart to show for this series."),value:t.series[a].type?t.series[a].type:"area",options:[{label:Fl("Area"),value:"area"},{label:Fl("Bar"),value:"bars"},{label:Fl("Candlesticks"),value:"candlesticks"},{label:Fl("Line"),value:"line"},{label:Fl("Stepped Area"),value:"steppedArea"}],onChange:function(n){t.series[a].type=n,e.props.edit(t)}}),-1>=["tabular"].indexOf(s)&&wp.element.createElement(Gl,{label:Fl("Color")},wp.element.createElement(Jl,{value:t.series[a].color,onChange:function(n){t.series[a].color=n,e.props.edit(t)}})))})))}}])&&Hl(t.prototype,n),r&&Hl(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Il);function Ql(e){return(Ql="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tu(e,t){return(tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function nu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=au(e);if(t){var a=au(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ru(this,n)}}function ru(e,t){if(t&&("object"===Ql(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function au(e){return(au=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ou=wp.i18n.__,iu=wp.element.Component,su=(wp.blockEditor||wp.editor).ColorPalette,lu=wp.components,uu=lu.BaseControl,cu=lu.PanelBody,du=lu.TextControl,pu=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tu(e,t)}(o,e);var t,n,r,a=nu(o);function o(){return Xl(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];Object.keys(e.slices).map((function(t){void 0!==e.slices[t]&&(e.slices[t].temp=1)})),this.props.edit(e)}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-data"];return wp.element.createElement(cu,{title:ou("Slices Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.slices).map((function(r){return wp.element.createElement(cu,{title:n[r][0],className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(du,{label:ou("Slice Offset"),help:ou("How far to separate the slice from the rest of the pie, from 0.0 (not at all) to 1.0 (the pie's radius)."),value:t.slices[r].offset,onChange:function(n){t.slices[r].offset=n,e.props.edit(t)},type:"number",min:"0",step:"0.1"}),wp.element.createElement(uu,{label:ou("Format")},wp.element.createElement(su,{value:t.slices[r].color,onChange:function(n){t.slices[r].color=n,e.props.edit(t)}})))})))}}])&&eu(t.prototype,n),r&&eu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(iu);function mu(e){return(mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _u(e,t){return(_u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function yu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gu(e);if(t){var a=gu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return bu(this,n)}}function bu(e,t){if(t&&("object"===mu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function gu(e){return(gu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vu=wp.i18n.__,wu=wp.element.Component,Mu=(wp.blockEditor||wp.editor).ColorPalette,ku=wp.components,Lu=ku.CheckboxControl,Yu=ku.BaseControl,Tu=ku.PanelBody,Du=ku.TextControl,Su=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_u(e,t)}(o,e);var t,n,r,a=yu(o);function o(){return hu(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Tu,{title:vu("Bubble Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Du,{label:vu("Opacity"),help:vu("The default opacity of the bubbles, where 0.0 is fully transparent and 1.0 is fully opaque."),type:"number",min:"0",max:"1",step:"0.1",value:t.bubble.opacity,onChange:function(n){t.bubble||(t.bubble={}),t.bubble.opacity=n,e.props.edit(t)}}),wp.element.createElement(Yu,{label:vu("Stroke Color")},wp.element.createElement(Mu,{value:t.bubble.stroke,onChange:function(n){t.bubble||(t.bubble={}),t.bubble.stroke=n,e.props.edit(t)}})),wp.element.createElement(Lu,{label:vu("Sort Bubbles by Size"),help:vu("If checked, sorts the bubbles by size so the smaller bubbles appear above the larger bubbles. If unchecked, bubbles are sorted according to their order in the table."),checked:Q(t,"sortBubblesBySize"),onChange:function(n){t.sortBubblesBySize=n,e.props.edit(t)}}),wp.element.createElement(Du,{label:vu("Size (max)"),help:vu("The size value (as appears in the chart data) to be mapped to sizeAxis.maxSize. Larger values will be cropped to this value."),type:"number",step:"1",value:t.sizeAxis.maxValue,onChange:function(n){t.sizeAxis||(t.sizeAxis={}),t.sizeAxis.maxValue=n,e.props.edit(t)}}),wp.element.createElement(Du,{label:vu("Size (min)"),help:vu("The size value (as appears in the chart data) to be mapped to sizeAxis.minSize. Smaller values will be cropped to this value."),type:"number",step:"1",value:t.sizeAxis.minValue,onChange:function(n){t.sizeAxis||(t.sizeAxis={}),t.sizeAxis.minValue=n,e.props.edit(t)}}))}}])&&fu(t.prototype,n),r&&fu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(wu);function Ou(e){return(Ou="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ju(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Eu(e,t){return(Eu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Pu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hu(e);if(t){var a=Hu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Cu(this,n)}}function Cu(e,t){if(t&&("object"===Ou(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Hu(e){return(Hu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zu=wp.i18n.__,Au=wp.element,Ru=Au.Component,Nu=Au.Fragment,Fu=wp.components,Wu=Fu.ExternalLink,Iu=Fu.PanelBody,Bu=Fu.TextControl,Ju=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eu(e,t)}(o,e);var t,n,r,a=Pu(o);function o(){return ju(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];e.series&&(Object.keys(e.series).map((function(t){void 0!==e.series[t]&&(e.series[t].temp=1)})),this.props.edit(e))}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-series"];return this.props.chart["visualizer-chart-type"],t.series?wp.element.createElement(Iu,{title:zu("Column Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.series).map((function(r){return"string"===n[r].type?null:wp.element.createElement(Iu,{title:n[r].label,className:"visualizer-inner-sections",initialOpen:!1},0<=["date","datetime","timeofday"].indexOf(n[r].type)&&wp.element.createElement(Nu,null,wp.element.createElement(Bu,{label:zu("Display Date Format"),help:zu("Enter custom format pattern to apply to this series value."),value:t.series[r].format?t.series[r].format.to:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.to=n,e.props.edit(t)}}),wp.element.createElement(Bu,{label:zu("Source Date Format"),help:zu("What format is the source date in?"),value:t.series[r].format?t.series[r].format.from:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.from=n,e.props.edit(t)}}),wp.element.createElement("p",null,zu("You can find more info on "),wp.element.createElement(Wu,{href:"https://momentjs.com/docs/#/displaying/"},zu("date and time formats here.")))),"number"===n[r].type&&wp.element.createElement(Nu,null,wp.element.createElement(Bu,{label:zu("Thousands Separator"),value:t.series[r].format?t.series[r].format.thousands:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.thousands=n,e.props.edit(t)}}),wp.element.createElement(Bu,{label:zu("Decimal Separator"),value:t.series[r].format?t.series[r].format.decimal:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.decimal=n,e.props.edit(t)}}),wp.element.createElement(Bu,{label:zu("Precision"),help:zu("Round values to how many decimal places?"),value:t.series[r].format?t.series[r].format.precision:"",type:"number",min:"0",onChange:function(n){100<n||(t.series[r].format||(t.series[r].format={}),t.series[r].format.precision=n,e.props.edit(t))}}),wp.element.createElement(Bu,{label:zu("Prefix"),value:t.series[r].format?t.series[r].format.prefix:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.prefix=n,e.props.edit(t)}}),wp.element.createElement(Bu,{label:zu("Suffix"),value:t.series[r].format?t.series[r].format.suffix:"",onChange:function(n){t.series[r].format||(t.series[r].format={}),t.series[r].format.suffix=n,e.props.edit(t)}})),"boolean"===n[r].type&&wp.element.createElement(Nu,null,wp.element.createElement(Bu,{label:zu("Truthy value"),help:zu("Provide the HTML entity code for the value the table should display when the value of the column is true. e.g. tick mark (Code: &#10004;) instead of true"),value:t.series[r].format?t.series[r].format.truthy:"",onChange:function(n){t.series[r].truthy||(t.series[r].truthy={}),t.series[r].format.truthy=n,e.props.edit(t)}}),wp.element.createElement(Bu,{label:zu("Falsy value"),help:zu("Provide the HTML entity code for the value the table should display when the value of the column is false. e.g. cross mark (Code: &#10006;) instead of false"),value:t.series[r].format?t.series[r].format.falsy:"",onChange:function(n){t.series[r].falsy||(t.series[r].falsy={}),t.series[r].format.falsy=n,e.props.edit(t)}})))}))):null}}])&&xu(t.prototype,n),r&&xu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Ru);function Uu(e){return(Uu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qu(e,t){return(qu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zu(e);if(t){var a=Zu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Ku(this,n)}}function Ku(e,t){if(t&&("object"===Uu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Zu(e){return(Zu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qu=wp.i18n.__,Xu=wp.element,ec=Xu.Component,tc=Xu.Fragment,nc=(wp.blockEditor||wp.editor).ColorPalette,rc=wp.components,ac=rc.BaseControl,oc=rc.CheckboxControl,ic=rc.PanelBody,sc=rc.SelectControl,lc=rc.TextControl,uc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qu(e,t)}(o,e);var t,n,r,a=$u(o);function o(){return Gu(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(ic,{title:Qu("Layout And Chart Area"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ic,{title:Qu("Layout"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(lc,{label:Qu("Width of Chart"),help:Qu("Determines the total width of the chart."),value:n.width,onChange:function(t){n.width=t,e.props.edit(n)}}),wp.element.createElement(lc,{label:Qu("Height of Chart"),help:Qu("Determines the total height of the chart."),value:n.height,onChange:function(t){n.height=t,e.props.edit(n)}}),0<=["geo"].indexOf(t)&&wp.element.createElement(sc,{label:Qu("Keep Aspect Ratio"),help:Qu("If yes, the map will be drawn at the largest size that can fit inside the chart area at its natural aspect ratio. If only one of the width and height options is specified, the other one will be calculated according to the aspect ratio. If no, the map will be stretched to the exact size of the chart as specified by the width and height options."),value:n.keepAspectRatio?n.isStacked:"1",options:[{label:Qu("Yes"),value:"1"},{label:Qu("No"),value:"0"}],onChange:function(t){n.keepAspectRatio=t,e.props.edit(n)}}),-1>=["gauge","tabular"].indexOf(t)&&wp.element.createElement(tc,null,wp.element.createElement(lc,{label:Qu("Stroke Width"),help:Qu("The chart border width in pixels."),value:n.backgroundColor.strokeWidth,onChange:function(t){n.backgroundColor.strokeWidth=t,e.props.edit(n)}}),wp.element.createElement(ac,{label:Qu("Stroke Color")},wp.element.createElement(nc,{value:n.backgroundColor.stroke,onChange:function(t){n.backgroundColor.stroke=t,e.props.edit(n)}})),wp.element.createElement(ac,{label:Qu("Background Color")},wp.element.createElement(nc,{value:n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill=t,e.props.edit(n)}})),wp.element.createElement(oc,{label:Qu("Transparent Background?"),checked:"transparent"===n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill="transparent"===n.backgroundColor.fill?"":"transparent",e.props.edit(n)}}))),-1>=["geo","gauge","tabular"].indexOf(t)&&wp.element.createElement(ic,{title:Qu("Chart Area"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(lc,{label:Qu("Left Margin"),help:Qu("Determines how far to draw the chart from the left border."),value:n.chartArea.left,onChange:function(t){n.chartArea.left=t,e.props.edit(n)}}),wp.element.createElement(lc,{label:Qu("Top Margin"),help:Qu("Determines how far to draw the chart from the top border."),value:n.chartArea.top,onChange:function(t){n.chartArea.top=t,e.props.edit(n)}}),wp.element.createElement(lc,{label:Qu("Width Of Chart Area"),help:Qu("Determines the width of the chart area."),value:n.chartArea.width,onChange:function(t){n.chartArea.width=t,e.props.edit(n)}}),wp.element.createElement(lc,{label:Qu("Height Of Chart Area"),help:Qu("Determines the hight of the chart area."),value:n.chartArea.height,onChange:function(t){n.chartArea.height=t,e.props.edit(n)}})))}}])&&Vu(t.prototype,n),r&&Vu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ec);function cc(e){return(cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mc(e,t){return(mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function hc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_c(e);if(t){var a=_c(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return fc(this,n)}}function fc(e,t){if(t&&("object"===cc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _c(e){return(_c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yc=wp.i18n.__,bc=wp.element,gc=bc.Component,vc=bc.Fragment,wc=wp.components,Mc=wc.Button,kc=wc.CheckboxControl,Lc=wc.PanelBody,Yc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mc(e,t)}(o,e);var t,n,r,a=hc(o);function o(){return dc(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"componentDidMount",value:function(){var e=this.props.chart["visualizer-settings"];void 0===e.actions&&(e.actions=[]),this.props.edit(e)}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-chart-type"];return""!==visualizerLocalize.proFeaturesLocked?wp.element.createElement(Lc,{title:yc("Frontend Actions"),initialOpen:!1,className:"visualizer-advanced-panel"},void 0!==t.actions&&wp.element.createElement(vc,null,wp.element.createElement(kc,{label:yc("Print"),help:yc("To enable printing the data."),checked:0<=t.actions.indexOf("print"),onChange:function(n){if(0<=t.actions.indexOf("print")){var r=t.actions.indexOf("print");-1!==r&&t.actions.splice(r,1)}else t.actions.push("print");e.props.edit(t)}}),wp.element.createElement(kc,{label:yc("CSV"),help:yc("To enable downloading the data as a CSV."),checked:0<=t.actions.indexOf("csv;application/csv"),onChange:function(n){if(0<=t.actions.indexOf("csv;application/csv")){var r=t.actions.indexOf("csv;application/csv");-1!==r&&t.actions.splice(r,1)}else t.actions.push("csv;application/csv");e.props.edit(t)}}),wp.element.createElement(kc,{label:yc("Excel"),help:yc("To enable downloading the data as an Excel spreadsheet."),checked:0<=t.actions.indexOf("xls;application/vnd.ms-excel"),onChange:function(n){if(0<=t.actions.indexOf("xls;application/vnd.ms-excel")){var r=t.actions.indexOf("xls;application/vnd.ms-excel");-1!==r&&t.actions.splice(r,1)}else t.actions.push("xls;application/vnd.ms-excel");e.props.edit(t)}}),wp.element.createElement(kc,{label:yc("Copy"),help:yc("To enable copying the data to the clipboard."),checked:0<=t.actions.indexOf("copy"),onChange:function(n){if(0<=t.actions.indexOf("copy")){var r=t.actions.indexOf("copy");-1!==r&&t.actions.splice(r,1)}else t.actions.push("copy");e.props.edit(t)}}),-1>=["dataTable","tabular","gauge","table"].indexOf(n)&&wp.element.createElement(kc,{label:yc("Download Image"),help:yc("To download the chart as an image."),checked:0<=t.actions.indexOf("image"),onChange:function(n){if(0<=t.actions.indexOf("image")){var r=t.actions.indexOf("image");-1!==r&&t.actions.splice(r,1)}else t.actions.push("image");e.props.edit(t)}}))):wp.element.createElement(Lc,{title:yc("Frontend Actions"),initialOpen:!1,icon:"lock",className:"visualizer-advanced-panel"},wp.element.createElement("p",null,yc("Enable this feature in PRO version!")),wp.element.createElement(Mc,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},yc("Buy Now")))}}])&&pc(t.prototype,n),r&&pc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(gc);function Tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){Tc(e,t,n[t])}))}return e}var Sc={dark_vscode_tribute:{default:"#D4D4D4",background:"#1E1E1E",background_warning:"#1E1E1E",string:"#CE8453",number:"#B5CE9F",colon:"#49B8F7",keys:"#9CDCFE",keys_whiteSpace:"#AF74A5",primitive:"#6392C6"},light_mitsuketa_tribute:{default:"#D4D4D4",background:"#FCFDFD",background_warning:"#FEECEB",string:"#FA7921",number:"#70CE35",colon:"#49B8F7",keys:"#59A5D8",keys_whiteSpace:"#835FB6",primitive:"#386FA4"}},Oc=n(2);const jc={getCaller:(e=1)=>{var t=(new Error).stack.replace(/^Error\s+/,"");return t=(t=t.split("\n")[e]).replace(/^\s+at Object./,"").replace(/^\s+at /,"").replace(/ \(.+\)$/,"")},throwError:(e="unknown function",t="unknown parameter",n="to be defined")=>{throw["@",e,"(): Expected parameter '",t,"' ",n].join("")},isUndefined:(e="<unknown parameter>",t)=>{[null,void 0].indexOf(t)>-1&&jc.throwError(jc.getCaller(2),e)},isFalsy:(e="<unknown parameter>",t)=>{t||jc.throwError(jc.getCaller(2),e)},isNoneOf:(e="<unknown parameter>",t,n=[])=>{-1===n.indexOf(t)&&jc.throwError(jc.getCaller(2),e,"to be any of"+JSON.stringify(n))},isAnyOf:(e="<unknown parameter>",t,n=[])=>{n.indexOf(t)>-1&&jc.throwError(jc.getCaller(2),e,"not to be any of"+JSON.stringify(n))},isNotType:(e="<unknown parameter>",t,n="")=>{Object(Oc.getType)(t)!==n.toLowerCase()&&jc.throwError(jc.getCaller(2),e,"to be type "+n.toLowerCase())},isAnyTypeOf:(e="<unknown parameter>",t,n=[])=>{n.forEach(n=>{Object(Oc.getType)(t)===n&&jc.throwError(jc.getCaller(2),e,"not to be type of "+n.toLowerCase())})},missingKey:(e="<unknown parameter>",t,n="")=>{jc.isUndefined(e,t),-1===Object.keys(t).indexOf(n)&&jc.throwError(jc.getCaller(2),e,"to contain '"+n+"' key")},missingAnyKeys:(e="<unknown parameter>",t,n=[""])=>{jc.isUndefined(e,t);const r=Object.keys(t);n.forEach(t=>{-1===r.indexOf(t)&&jc.throwError(jc.getCaller(2),e,"to contain '"+t+"' key")})},containsUndefined:(e="<unknown parameter>",t)=>{[void 0,null].forEach(n=>{const r=Object(Oc.locate)(t,n);r&&jc.throwError(jc.getCaller(2),e,"not to contain '"+JSON.stringify(n)+"' at "+r)})},isInvalidPath:(e="<unknown parameter>",t)=>{jc.isUndefined(e,t),jc.isNotType(e,t,"string"),jc.isAnyOf(e,t,["","/"]),".$[]#".split().forEach(n=>{t.indexOf(n)>-1&&jc.throwError(jc.getCaller(2),e,"not to contain invalid character '"+n+"'")}),t.match(/\/{2,}/g)&&jc.throwError(jc.getCaller(2),e,"not to contain consecutive forward slash characters")},isInvalidWriteData:(e="<unknown parameter>",t)=>{jc.isUndefined(e,t),jc.containsUndefined(e,t)}};var xc=jc;const Ec=(e,t)=>t?Object.keys(t).reduce((e,n)=>e.replace(new RegExp(`\\{${n}\\}`,"gi"),(e=>Array.isArray(e)?e.join(", "):"string"==typeof e?e:""+e)(t[n])),e):e;var Pc={format:"{reason} at line {line}",symbols:{colon:"colon",comma:"comma",semicolon:"semicolon",slash:"slash",backslash:"backslash",brackets:{round:"round brackets",square:"square brackets",curly:"curly brackets",angle:"angle brackets"},period:"period",quotes:{single:"single quote",double:"double quote",grave:"grave accent"},space:"space",ampersand:"ampersand",asterisk:"asterisk",at:"at sign",equals:"equals sign",hash:"hash",percent:"percent",plus:"plus",minus:"minus",dash:"dash",hyphen:"hyphen",tilde:"tilde",underscore:"underscore",bar:"vertical bar"},types:{key:"key",value:"value",number:"number",string:"string",primitive:"primitive",boolean:"boolean",character:"character",integer:"integer",array:"array",float:"float"},invalidToken:{tokenSequence:{prohibited:"'{firstToken}' token cannot be followed by '{secondToken}' token(s)",permitted:"'{firstToken}' token can only be followed by '{secondToken}' token(s)"},termSequence:{prohibited:"A {firstTerm} cannot be followed by a {secondTerm}",permitted:"A {firstTerm} can only be followed by a {secondTerm}"},double:"'{token}' token cannot be followed by another '{token}' token",useInstead:"'{badToken}' token is not accepted. Use '{goodToken}' instead",unexpected:"Unexpected '{token}' token found"},brace:{curly:{missingOpen:"Missing '{' open curly brace",missingClose:"Open '{' curly brace is missing closing '}' curly brace",cannotWrap:"'{token}' token cannot be wrapped in '{}' curly braces"},square:{missingOpen:"Missing '[' open square brace",missingClose:"Open '[' square brace is missing closing ']' square brace",cannotWrap:"'{token}' token cannot be wrapped in '[]' square braces"}},string:{missingOpen:"Missing/invalid opening string '{quote}' token",missingClose:"Missing/invalid closing string '{quote}' token",mustBeWrappedByQuotes:"Strings must be wrapped by quotes",nonAlphanumeric:"Non-alphanumeric token '{token}' is not allowed outside string notation",unexpectedKey:"Unexpected key found at string position"},key:{numberAndLetterMissingQuotes:"Key beginning with number and containing letters must be wrapped by quotes",spaceMissingQuotes:"Key containing space must be wrapped by quotes",unexpectedString:"Unexpected string found at key position"},noTrailingOrLeadingComma:"Trailing or leading commas in arrays and objects are not permitted"};
65 +/** @license react-json-editor-ajrm v2.5.13
66 66 *
67 67 * This source code is licensed under the MIT license found in the
68 68 * LICENSE file in the root directory of this source tree.
69 - */class Ac extends r.Component{constructor(e){super(e),this.updateInternalProps=this.updateInternalProps.bind(this),this.createMarkup=this.createMarkup.bind(this),this.onClick=this.onClick.bind(this),this.onBlur=this.onBlur.bind(this),this.update=this.update.bind(this),this.getCursorPosition=this.getCursorPosition.bind(this),this.setCursorPosition=this.setCursorPosition.bind(this),this.scheduledUpdate=this.scheduledUpdate.bind(this),this.setUpdateTime=this.setUpdateTime.bind(this),this.renderLabels=this.renderLabels.bind(this),this.newSpan=this.newSpan.bind(this),this.renderErrorMessage=this.renderErrorMessage.bind(this),this.onScroll=this.onScroll.bind(this),this.showPlaceholder=this.showPlaceholder.bind(this),this.tokenize=this.tokenize.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onPaste=this.onPaste.bind(this),this.stopEvent=this.stopEvent.bind(this),this.refContent=null,this.refLabels=null,this.updateInternalProps(),this.renderCount=1,this.state={prevPlaceholder:"",markupText:"",plainText:"",json:"",jsObject:void 0,lines:!1,error:!1},this.props.locale||console.warn("[react-json-editor-ajrm - Deprecation Warning] You did not provide a 'locale' prop for your JSON input - This will be required in a future version. English has been set as a default.")}updateInternalProps(){let e={},t={},n=xc.dark_vscode_tribute;"theme"in this.props&&"string"==typeof this.props.theme&&this.props.theme in xc&&(n=xc[this.props.theme]),e=n,"colors"in this.props&&(e={default:"default"in this.props.colors?this.props.colors.default:e.default,string:"string"in this.props.colors?this.props.colors.string:e.string,number:"number"in this.props.colors?this.props.colors.number:e.number,colon:"colon"in this.props.colors?this.props.colors.colon:e.colon,keys:"keys"in this.props.colors?this.props.colors.keys:e.keys,keys_whiteSpace:"keys_whiteSpace"in this.props.colors?this.props.colors.keys_whiteSpace:e.keys_whiteSpace,primitive:"primitive"in this.props.colors?this.props.colors.primitive:e.primitive,error:"error"in this.props.colors?this.props.colors.error:e.error,background:"background"in this.props.colors?this.props.colors.background:e.background,background_warning:"background_warning"in this.props.colors?this.props.colors.background_warning:e.background_warning}),this.colors=e,t="style"in this.props?{outerBox:"outerBox"in this.props.style?this.props.style.outerBox:{},container:"container"in this.props.style?this.props.style.container:{},warningBox:"warningBox"in this.props.style?this.props.style.warningBox:{},errorMessage:"errorMessage"in this.props.style?this.props.style.errorMessage:{},body:"body"in this.props.style?this.props.style.body:{},labelColumn:"labelColumn"in this.props.style?this.props.style.labelColumn:{},labels:"labels"in this.props.style?this.props.style.labels:{},contentBox:"contentBox"in this.props.style?this.props.style.contentBox:{}}:{outerBox:{},container:{},warningBox:{},errorMessage:{},body:{},labelColumn:{},labels:{},contentBox:{}},this.style=t,this.confirmGood=!("confirmGood"in this.props)||this.props.confirmGood;const r=this.props.height||"610px",a=this.props.width||"479px";this.totalHeight=r,this.totalWidth=a,!("onKeyPressUpdate"in this.props)||this.props.onKeyPressUpdate?this.timer||(this.timer=setInterval(this.scheduledUpdate,100)):this.timer&&(clearInterval(this.timer),this.timer=!1),this.updateTime=!1,this.waitAfterKeyPress="waitAfterKeyPress"in this.props?this.props.waitAfterKeyPress:1e3,this.resetConfiguration="reset"in this.props&&this.props.reset}render(){const e=this.props.id,t=this.state.markupText,n=this.props.error||this.state.error,r=this.colors,o=this.style,i=this.confirmGood,s=this.totalHeight,l=this.totalWidth,u=!!this.props.error||!!n&&"token"in n;return this.renderCount++,a.a.createElement("div",{name:"outer-box",id:e&&e+"-outer-box",style:jc({display:"block",overflow:"none",height:s,width:l,margin:0,boxSizing:"border-box",position:"relative"},o.outerBox)},i?a.a.createElement("div",{style:{opacity:u?0:1,height:"30px",width:"30px",position:"absolute",top:0,right:0,transform:"translate(-25%,25%)",pointerEvents:"none",transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"}},a.a.createElement("svg",{height:"30px",width:"30px",viewBox:"0 0 100 100"},a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"green",opacity:"0.85",d:"M39.363,79L16,55.49l11.347-11.419L39.694,56.49L72.983,23L84,34.085L39.363,79z"}))):void 0,a.a.createElement("div",{name:"container",id:e&&e+"-container",style:jc({display:"block",height:s,width:l,margin:0,boxSizing:"border-box",overflow:"hidden",fontFamily:"Roboto, sans-serif"},o.container),onClick:this.onClick},a.a.createElement("div",{name:"warning-box",id:e&&e+"-warning-box",style:jc({display:"block",overflow:"hidden",height:u?"60px":"0px",width:"100%",margin:0,backgroundColor:r.background_warning,transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"},o.warningBox),onClick:this.onClick},a.a.createElement("span",{style:{display:"inline-block",height:"60px",width:"60px",margin:0,boxSizing:"border-box",overflow:"hidden",verticalAlign:"top",pointerEvents:"none"},onClick:this.onClick},a.a.createElement("div",{style:{position:"relative",top:0,left:0,height:"60px",width:"60px",margin:0,pointerEvents:"none"},onClick:this.onClick},a.a.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"},onClick:this.onClick},a.a.createElement("svg",{height:"25px",width:"25px",viewBox:"0 0 100 100"},a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"red",d:"M73.9,5.75c0.467-0.467,1.067-0.7,1.8-0.7c0.7,0,1.283,0.233,1.75,0.7l16.8,16.8 c0.467,0.5,0.7,1.084,0.7,1.75c0,0.733-0.233,1.334-0.7,1.801L70.35,50l23.9,23.95c0.5,0.467,0.75,1.066,0.75,1.8 c0,0.667-0.25,1.25-0.75,1.75l-16.8,16.75c-0.534,0.467-1.117,0.7-1.75,0.7s-1.233-0.233-1.8-0.7L50,70.351L26.1,94.25 c-0.567,0.467-1.167,0.7-1.8,0.7c-0.667,0-1.283-0.233-1.85-0.7L5.75,77.5C5.25,77,5,76.417,5,75.75c0-0.733,0.25-1.333,0.75-1.8 L29.65,50L5.75,26.101C5.25,25.667,5,25.066,5,24.3c0-0.666,0.25-1.25,0.75-1.75l16.8-16.8c0.467-0.467,1.05-0.7,1.75-0.7 c0.733,0,1.333,0.233,1.8,0.7L50,29.65L73.9,5.75z"}))))),a.a.createElement("span",{style:{display:"inline-block",height:"60px",width:"calc(100% - 60px)",margin:0,overflow:"hidden",verticalAlign:"top",position:"absolute",pointerEvents:"none"},onClick:this.onClick},this.renderErrorMessage())),a.a.createElement("div",{name:"body",id:e&&e+"-body",style:jc({display:"flex",overflow:"none",height:u?"calc(100% - 60px)":"100%",width:"",margin:0,resize:"none",fontFamily:"Roboto Mono, Monaco, monospace",fontSize:"11px",backgroundColor:r.background,transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"},o.body),onClick:this.onClick},a.a.createElement("span",{name:"labels",id:e&&e+"-labels",ref:e=>this.refLabels=e,style:jc({display:"inline-block",boxSizing:"border-box",verticalAlign:"top",height:"100%",width:"44px",margin:0,padding:"5px 0px 5px 10px",overflow:"hidden",color:"#D4D4D4"},o.labelColumn),onClick:this.onClick},this.renderLabels()),a.a.createElement("span",{id:e,ref:e=>this.refContent=e,contentEditable:!0,style:jc({display:"inline-block",boxSizing:"border-box",verticalAlign:"top",height:"100%",width:"",flex:1,margin:0,padding:"5px",overflowX:"hidden",overflowY:"auto",wordWrap:"break-word",whiteSpace:"pre-line",color:"#D4D4D4",outline:"none"},o.contentBox),dangerouslySetInnerHTML:this.createMarkup(t),onKeyPress:this.onKeyPress,onKeyDown:this.onKeyDown,onClick:this.onClick,onBlur:this.onBlur,onScroll:this.onScroll,onPaste:this.onPaste,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1}))))}renderErrorMessage(){const e=this.props.locale||zc,t=this.props.error||this.state.error,n=this.style;if(t)return a.a.createElement("p",{style:jc({color:"red",fontSize:"12px",position:"absolute",width:"calc(100% - 60px)",height:"60px",boxSizing:"border-box",margin:0,padding:0,paddingRight:"10px",overflowWrap:"break-word",display:"flex",flexDirection:"column",justifyContent:"center"},n.errorMessage)},Hc(e.format,t))}renderLabels(){const e=this.colors,t=this.style,n=this.props.error||this.state.error,r=n?n.line:-1,o=this.state.lines?this.state.lines:1;let i=new Array(o);for(var s=0;s<o-1;s++)i[s]=s+1;return i.map(n=>{const o=n!==r?e.default:"red";return a.a.createElement("div",{key:n,style:jc({},t.labels,{color:o})},n)})}createMarkup(e){return void 0===e?{__html:""}:{__html:""+e}}newSpan(e,t,n){let r=this.colors,a=t.type,o=t.string,i="";switch(a){case"string":case"number":case"primitive":case"error":i=r[t.type];break;case"key":i=" "===o?r.keys_whiteSpace:r.keys;break;case"symbol":i=":"===o?r.colon:r.default;break;default:i=r.default}return o.length!==o.replace(/</g,"").replace(/>/g,"").length&&(o="<xmp style=display:inline;>"+o+"</xmp>"),'<span type="'+a+'" value="'+o+'" depth="'+n+'" style="color:'+i+'">'+o+"</span>"}getCursorPosition(e){let t,n=window.getSelection(),r=-1,a=0;if(n.focusNode&&(e=>{for(;null!==e;){if(e===this.refContent)return!0;e=e.parentNode}return!1})(n.focusNode))for(t=n.focusNode,r=n.focusOffset;t&&t!==this.refContent;)if(t.previousSibling)t=t.previousSibling,e&&"BR"===t.nodeName&&a++,r+=t.textContent.length;else if(t=t.parentNode,null===t)break;return r+a}setCursorPosition(e){if([!1,null,void 0].indexOf(e)>-1)return;const t=(e,n,r)=>{if(r||((r=document.createRange()).selectNode(e),r.setStart(e,0)),0===n.count)r.setEnd(e,n.count);else if(e&&n.count>0)if(e.nodeType===Node.TEXT_NODE)e.textContent.length<n.count?n.count-=e.textContent.length:(r.setEnd(e,n.count),n.count=0);else for(var a=0;a<e.childNodes.length&&(r=t(e.childNodes[a],n,r),0!==n.count);a++);return r};e>0?(e=>{if(e<0)return;let n=window.getSelection(),r=t(this.refContent,{count:e});r&&(r.collapse(!1),n.removeAllRanges(),n.addRange(r))})(e):this.refContent.focus()}update(e=0,t=!0){const n=this.refContent,r=this.tokenize(n);"onChange"in this.props&&this.props.onChange({plainText:r.indented,markupText:r.markup,json:r.json,jsObject:r.jsObject,lines:r.lines,error:r.error});let a=this.getCursorPosition(r.error)+e;this.setState({plainText:r.indented,markupText:r.markup,json:r.json,jsObject:r.jsObject,lines:r.lines,error:r.error}),this.updateTime=!1,t&&this.setCursorPosition(a)}scheduledUpdate(){if("onKeyPressUpdate"in this.props&&!1===this.props.onKeyPressUpdate)return;const{updateTime:e}=this;!1!==e&&(e>(new Date).getTime()||this.update())}setUpdateTime(){"onKeyPressUpdate"in this.props&&!1===this.props.onKeyPressUpdate||(this.updateTime=(new Date).getTime()+this.waitAfterKeyPress)}stopEvent(e){e&&(e.preventDefault(),e.stopPropagation())}onKeyPress(e){const t=e.ctrlKey||e.metaKey;this.props.viewOnly&&!t&&this.stopEvent(e),t||this.setUpdateTime()}onKeyDown(e){const t=!!this.props.viewOnly,n=e.ctrlKey||e.metaKey;switch(e.key){case"Tab":if(this.stopEvent(e),t)break;document.execCommand("insertText",!1," "),this.setUpdateTime();break;case"Backspace":case"Delete":t&&this.stopEvent(e),this.setUpdateTime();break;case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":this.setUpdateTime();break;case"a":case"c":t&&!n&&this.stopEvent(e);break;default:t&&this.stopEvent(e)}}onPaste(e){if(this.props.viewOnly)this.stopEvent(e);else{e.preventDefault();var t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)}this.update()}onClick(){!("viewOnly"in this.props)||this.props.viewOnly}onBlur(){if("viewOnly"in this.props&&this.props.viewOnly)return;const e=this.refContent,t=this.tokenize(e);"onBlur"in this.props&&this.props.onBlur({plainText:t.indented,markupText:t.markup,json:t.json,jsObject:t.jsObject,lines:t.lines,error:t.error})}onScroll(e){this.refLabels.scrollTop=e.target.scrollTop}componentDidUpdate(){this.updateInternalProps(),this.showPlaceholder()}componentDidMount(){this.showPlaceholder()}componentWillUnmount(){this.timer&&clearInterval(this.timer)}showPlaceholder(){if(!("placeholder"in this.props))return;const{placeholder:e}=this.props;if([void 0,null].indexOf(e)>-1)return;const{prevPlaceholder:t,jsObject:n}=this.state,{resetConfiguration:r}=this,a=Object(Ec.getType)(e);-1===["object","array"].indexOf(a)&&Cc.throwError("showPlaceholder","placeholder","either an object or an array");let o=!Object(Ec.identical)(e,t);if(o||r&&void 0!==n&&(o=!Object(Ec.identical)(e,n)),!o)return;const i=this.tokenize(e);this.setState({prevPlaceholder:e,plainText:i.indentation,markupText:i.markup,lines:i.lines,error:i.error})}tokenize(e){if("object"!=typeof e)return console.error("tokenize() expects object type properties only. Got '"+typeof e+"' type instead.");const t=this.props.locale||zc,n=this.newSpan;if("nodeType"in e){const g=e.cloneNode(!0);if(!g.hasChildNodes())return"";const w=g.childNodes;let M={tokens_unknown:[],tokens_proto:[],tokens_split:[],tokens_fallback:[],tokens_normalize:[],tokens_merge:[],tokens_plainText:"",indented:"",json:"",jsObject:void 0,markup:""};for(var r=0;r<w.length;r++){let e=w[r],t={};switch(e.nodeName){case"SPAN":t={string:e.textContent,type:e.attributes.type.textContent},M.tokens_unknown.push(t);break;case"DIV":M.tokens_unknown.push({string:e.textContent,type:"unknown"});break;case"BR":""===e.textContent&&M.tokens_unknown.push({string:"\n",type:"unknown"});break;case"#text":M.tokens_unknown.push({string:e.wholeText,type:"unknown"});break;case"FONT":M.tokens_unknown.push({string:e.textContent,type:"unknown"});break;default:console.error("Unrecognized node:",{child:e})}}function a(e,t=""){let n={active:!1,string:"",number:"",symbol:"",space:"",delimiter:"",quarks:[]};function r(e,r){switch(r){case"symbol":case"delimiter":n.active&&n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=r,n[n.active]=e;break;default:r!==n.active||[n.string,e].indexOf("\n")>-1?(n.active&&n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=r,n[n.active]=e):n[r]+=e}}for(var a=0;a<e.length;a++){const t=e.charAt(a);switch(t){case'"':case"'":r(t,"delimiter");break;case" ":case" ":r(t,"space");break;case"{":case"}":case"[":case"]":case":":case",":r(t,"symbol");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":"string"===n.active?r(t,"string"):r(t,"number");break;case"-":if(a<e.length-1&&"0123456789".indexOf(e.charAt(a+1))>-1){r(t,"number");break}case".":if(a<e.length-1&&a>0&&"0123456789".indexOf(e.charAt(a+1))>-1&&"0123456789".indexOf(e.charAt(a-1))>-1){r(t,"number");break}default:r(t,"string")}}return n.active&&(n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=!1),n.quarks}for(r=0;r<M.tokens_unknown.length;r++){let e=M.tokens_unknown[r];M.tokens_proto=M.tokens_proto.concat(a(e.string,"proto"))}function o(e,t){let n="",r="",a=!1;switch(t){case"primitive":if(-1===["true","false","null","undefined"].indexOf(e))return!1;break;case"string":if(e.length<2)return!1;if(n=e.charAt(0),r=e.charAt(e.length-1),a="'\"".indexOf(n),-1===a)return!1;if(n!==r)return!1;for(var o=0;o<e.length;o++)if(o>0&&o<e.length-1&&e.charAt(o)==="'\""[a]&&"\\"!==e.charAt(o-1))return!1;break;case"key":if(0===e.length)return!1;if(n=e.charAt(0),r=e.charAt(e.length-1),a="'\"".indexOf(n),a>-1){if(1===e.length)return!1;if(n!==r)return!1;for(o=0;o<e.length;o++)if(o>0&&o<e.length-1&&e.charAt(o)==="'\""[a]&&"\\"!==e.charAt(o-1))return!1}else{const t="'\"`.,:;{}[]&<>=~*%\\|/-+!?@^  ";for(o=0;o<t.length;o++){const n=t.charAt(o);if(e.indexOf(n)>-1)return!1}}break;case"number":for(o=0;o<e.length;o++)if(-1==="0123456789".indexOf(e.charAt(o)))if(0===o){if("-"!==e.charAt(0))return!1}else if("."!==e.charAt(o))return!1;break;case"symbol":if(e.length>1)return!1;if(-1==="{[:]},".indexOf(e))return!1;break;case"colon":if(e.length>1)return!1;if(":"!==e)return!1;break;default:return!0}return!0}for(r=0;r<M.tokens_proto.length;r++){let e=M.tokens_proto[r];-1===e.type.indexOf("proto")?o(e.string,e.type)?M.tokens_split.push(e):M.tokens_split=M.tokens_split.concat(a(e.string,"split")):M.tokens_split.push(e)}for(r=0;r<M.tokens_split.length;r++){let e=M.tokens_split[r],t=e.type,n=e.string,a=n.length,o=[];t.indexOf("-")>-1&&(t=t.slice(t.indexOf("-")+1),"string"!==t&&o.push("string"),o.push("key"),o.push("error"));let i={string:n,length:a,type:t,fallback:o};M.tokens_fallback.push(i)}function i(){const e=M.tokens_normalize.length-1;if(e<1)return!1;for(var t=e;t>=0;t--){const e=M.tokens_normalize[t];switch(e.type){case"space":case"linebreak":break;default:return e}}return!1}let k={brackets:[],stringOpen:!1,isValue:!1};for(r=0;r<M.tokens_fallback.length;r++){let e=M.tokens_fallback[r];const t=e.type,n=e.string;let a={type:t,string:n};switch(t){case"symbol":case"colon":if(k.stringOpen){k.isValue?a.type="string":a.type="key";break}switch(n){case"[":case"{":k.brackets.push(n),k.isValue="["===k.brackets[k.brackets.length-1];break;case"]":case"}":k.brackets.pop(),k.isValue="["===k.brackets[k.brackets.length-1];break;case",":if("colon"===i().type)break;k.isValue="["===k.brackets[k.brackets.length-1];break;case":":a.type="colon",k.isValue=!0}break;case"delimiter":if(k.isValue?a.type="string":a.type="key",!k.stringOpen){k.stringOpen=n;break}if(r>0){const e=M.tokens_fallback[r-1],t=e.string,n=e.type,a=t.charAt(t.length-1);if("string"===n&&"\\"===a)break}if(k.stringOpen===n){k.stringOpen=!1;break}break;case"primitive":case"string":if(["false","true","null","undefined"].indexOf(n)>-1){const e=M.tokens_normalize.length-1;if(e>=0){if("string"!==M.tokens_normalize[e].type){a.type="primitive";break}a.type="string";break}a.type="primitive";break}if("\n"===n&&!k.stringOpen){a.type="linebreak";break}k.isValue?a.type="string":a.type="key";break;case"space":case"number":k.stringOpen&&(k.isValue?a.type="string":a.type="key")}M.tokens_normalize.push(a)}for(r=0;r<M.tokens_normalize.length;r++){const e=M.tokens_normalize[r];let t={string:e.string,type:e.type,tokens:[r]};if(-1===["symbol","colon"].indexOf(e.type)&&r+1<M.tokens_normalize.length){let n=0;for(var s=r+1;s<M.tokens_normalize.length;s++){const r=M.tokens_normalize[s];if(e.type!==r.type)break;t.string+=r.string,t.tokens.push(s),n++}r+=n}M.tokens_merge.push(t)}const L="'\"",Y="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$";var l=!1,u=M.tokens_merge.length>0?1:0;function c(e,t,n=0){l={token:e,line:u,reason:t},M.tokens_merge[e+n].type="error"}function d(e,t){if(void 0===e&&console.error("tokenID argument must be an integer."),void 0===t&&console.error("options argument must be an array."),e===M.tokens_merge.length-1)return!1;for(var n=e+1;n<M.tokens_merge.length;n++){const e=M.tokens_merge[n];switch(e.type){case"space":case"linebreak":break;case"symbol":case"colon":return t.indexOf(e.string)>-1&&n;default:return!1}}return!1}function p(e,t){if(void 0===e&&console.error("tokenID argument must be an integer."),void 0===t&&console.error("options argument must be an array."),0===e)return!1;for(var n=e-1;n>=0;n--){const e=M.tokens_merge[n];switch(e.type){case"space":case"linebreak":break;case"symbol":case"colon":return t.indexOf(e.string)>-1;default:return!1}}return!1}function m(e){if(void 0===e&&console.error("tokenID argument must be an integer."),0===e)return!1;for(var t=e-1;t>=0;t--){const e=M.tokens_merge[t];switch(e.type){case"space":case"linebreak":break;default:return e.type}}return!1}k={brackets:[],stringOpen:!1,isValue:!1};let T=[];for(r=0;r<M.tokens_merge.length&&!l;r++){let e=M.tokens_merge[r],n=e.string,a=e.type,o=!1;switch(a){case"space":break;case"linebreak":u++;break;case"symbol":switch(n){case"{":case"[":if(o=p(r,["}","]"]),o){c(r,Hc(t.invalidToken.tokenSequence.prohibited,{firstToken:M.tokens_merge[o].string,secondToken:n}));break}if("["===n&&r>0&&!p(r,[":","[",","])){c(r,Hc(t.invalidToken.tokenSequence.permitted,{firstToken:"[",secondToken:[":","[",","]}));break}if("{"===n&&p(r,["{"])){c(r,Hc(t.invalidToken.double,{token:"{"}));break}k.brackets.push(n),k.isValue="["===k.brackets[k.brackets.length-1],T.push({i:r,line:u,string:n});break;case"}":case"]":if("}"===n&&"{"!==k.brackets[k.brackets.length-1]){c(r,Hc(t.brace.curly.missingOpen));break}if("}"===n&&p(r,[","])){c(r,Hc(t.invalidToken.tokenSequence.prohibited,{firstToken:",",secondToken:"}"}));break}if("]"===n&&"["!==k.brackets[k.brackets.length-1]){c(r,Hc(t.brace.square.missingOpen));break}if("]"===n&&p(r,[":"])){c(r,Hc(t.invalidToken.tokenSequence.prohibited,{firstToken:":",secondToken:"]"}));break}k.brackets.pop(),k.isValue="["===k.brackets[k.brackets.length-1],T.push({i:r,line:u,string:n});break;case",":if(o=p(r,["{"]),o){if(d(r,["}"])){c(r,Hc(t.brace.curly.cannotWrap,{token:","}));break}c(r,Hc(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}if(d(r,["}",",","]"])){c(r,Hc(t.noTrailingOrLeadingComma));break}switch(o=m(r),o){case"key":case"colon":c(r,Hc(t.invalidToken.termSequence.prohibited,{firstTerm:"key"===o?t.types.key:t.symbols.colon,secondTerm:t.symbols.comma}));break;case"symbol":if(p(r,["{"])){c(r,Hc(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}}k.isValue="["===k.brackets[k.brackets.length-1]}M.json+=n;break;case"colon":if(o=p(r,["["]),o&&d(r,["]"])){c(r,Hc(t.brace.square.cannotWrap,{token:":"}));break}if(o){c(r,Hc(t.invalidToken.tokenSequence.prohibited,{firstToken:"[",secondToken:":"}));break}if("key"!==m(r)){c(r,Hc(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.key}));break}if(d(r,["}","]"])){c(r,Hc(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.value}));break}k.isValue=!0,M.json+=n;break;case"key":case"string":let e=n.charAt(0),i=n.charAt(n.length-1);L.indexOf(e);if(-1===L.indexOf(e)&&-1!==L.indexOf(i)){c(r,Hc(t.string.missingOpen,{quote:e}));break}if(-1===L.indexOf(i)&&-1!==L.indexOf(e)){c(r,Hc(t.string.missingClose,{quote:e}));break}if(L.indexOf(e)>-1&&e!==i){c(r,Hc(t.string.missingClose,{quote:e}));break}if("string"===a&&-1===L.indexOf(e)&&-1===L.indexOf(i)){c(r,Hc(t.string.mustBeWrappedByQuotes));break}if("key"===a&&d(r,["}","]"])&&c(r,Hc(t.invalidToken.termSequence.permitted,{firstTerm:t.types.key,secondTerm:t.symbols.colon})),-1===L.indexOf(e)&&-1===L.indexOf(i))for(var h=0;h<n.length&&!l;h++){const e=n.charAt(h);if(-1===Y.indexOf(e)){c(r,Hc(t.string.nonAlphanumeric,{token:e}));break}}if("'"===e?n='"'+n.slice(1,-1)+'"':'"'!==e&&(n='"'+n+'"'),"key"===a&&"key"===m(r)){if(r>0&&!isNaN(M.tokens_merge[r-1])){M.tokens_merge[r-1]+=M.tokens_merge[r],c(r,Hc(t.key.numberAndLetterMissingQuotes));break}c(r,Hc(t.key.spaceMissingQuotes));break}if("key"===a&&!p(r,["{",","])){c(r,Hc(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["{",","]}));break}if("string"===a&&!p(r,["[",":",","])){c(r,Hc(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["[",":",","]}));break}if("key"===a&&k.isValue){c(r,Hc(t.string.unexpectedKey));break}if("string"===a&&!k.isValue){c(r,Hc(t.key.unexpectedString));break}M.json+=n;break;case"number":case"primitive":if(p(r,["{"]))M.tokens_merge[r].type="key",a=M.tokens_merge[r].type,n='"'+n+'"';else if("key"===m(r))M.tokens_merge[r].type="key",a=M.tokens_merge[r].type;else if(!p(r,["[",":",","])){c(r,Hc(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["[",":",","]}));break}"key"!==a&&(k.isValue||(M.tokens_merge[r].type="key",a=M.tokens_merge[r].type,n='"'+n+'"')),"primitive"===a&&"undefined"===n&&c(r,Hc(t.invalidToken.useInstead,{badToken:"undefined",goodToken:"null"})),M.json+=n}}let S="";for(r=0;r<M.json.length;r++){let e=M.json.charAt(r),t="";r+1<M.json.length&&(t=M.json.charAt(r+1),"\\"===e&&"'"===t)?(S+=t,r++):S+=e}if(M.json=S,!l){const e=Math.ceil(T.length/2);let n=0,r=!1;function f(e){T.splice(e+1,1),T.splice(e,1),r||(r=!0)}for(;T.length>0;){r=!1;for(var _=0;_<T.length-1;_++){const e=T[_].string+T[_+1].string;["[]","{}"].indexOf(e)>-1&&f(_)}if(n++,!r)break;if(n>=e)break}if(T.length>0){const e=T[0].string,n=T[0].i,r="["===e?"]":"}";u=T[0].line,c(n,Hc(t.brace["]"===r?"square":"curly"].missingClose))}}if(!l&&-1===[void 0,""].indexOf(M.json))try{M.jsObject=JSON.parse(M.json)}catch(e){const n=e.message,r=n.indexOf("position");if(-1===r)throw new Error("Error parsing failed");const a=n.substring(r+9,n.length),o=parseInt(a);let i=0,s=0,d=!1,p=1,m=!1;for(;i<o&&!m&&(d=M.tokens_merge[s],"linebreak"===d.type&&p++,-1===["space","linebreak"].indexOf(d.type)&&(i+=d.string.length),!(i>=o));)s++,M.tokens_merge[s+1]||(m=!0);u=p;let h=0;for(let e=0;e<d.string.length;e++){const n=d.string.charAt(e);"\\"===n?h=h>0?h+1:1:(h%2==0&&0!==h||-1==="'\"bfnrt".indexOf(n)&&c(s,Hc(t.invalidToken.unexpected,{token:"\\"})),h=0)}l||c(s,Hc(t.invalidToken.unexpected,{token:d.string}))}let D=1,O=0;function y(e=!1){return function(e=!1){return D++,O>0||e?"<br>":""}(e)+function(){for(var e=[],t=0;t<2*O;t++)e.push("&nbsp;");return e.join("")}()}if(!l)for(r=0;r<M.tokens_merge.length;r++){const e=M.tokens_merge[r],t=e.string;switch(e.type){case"space":case"linebreak":break;case"string":case"number":case"primitive":case"error":M.markup+=(p(r,[",","["])?y():"")+n(r,e,O);break;case"key":M.markup+=y()+n(r,e,O);break;case"colon":M.markup+=n(r,e,O)+"&nbsp;";break;case"symbol":switch(t){case"[":case"{":M.markup+=(p(r,[":"])?"":y())+n(r,e,O),O++;break;case"]":case"}":O--;const t=r===M.tokens_merge.length-1,a=r>0?["[","{"].indexOf(M.tokens_merge[r-1].string)>-1?"":y(t):"";M.markup+=a+n(r,e,O);break;case",":M.markup+=n(r,e,O)}}}if(l){let e=1;function b(e){let t=0;for(var n=0;n<e.length;n++)["\n","\r"].indexOf(e[n])>-1&&t++;return t}D=1;for(r=0;r<M.tokens_merge.length;r++){const t=M.tokens_merge[r],a=t.type,o=t.string;"linebreak"===a&&D++,M.markup+=n(r,t,O),e+=b(o)}D++,e++,D<e&&(D=e)}for(r=0;r<M.tokens_merge.length;r++){let e=M.tokens_merge[r];M.indented+=e.string,-1===["space","linebreak"].indexOf(e.type)&&(M.tokens_plainText+=e.string)}if(l){"modifyErrorText"in this.props&&((v=this.props.modifyErrorText)&&"[object Function]"==={}.toString.call(v)&&(l.reason=this.props.modifyErrorText(l.reason)))}return{tokens:M.tokens_merge,noSpaces:M.tokens_plainText,indented:M.indented,json:M.json,jsObject:M.jsObject,markup:M.markup,lines:D,error:l}}var v;if(!("nodeType"in e)){let t={inputText:JSON.stringify(e),position:0,currentChar:"",tokenPrimary:"",tokenSecondary:"",brackets:[],isValue:!1,stringOpen:!1,stringStart:0,tokens:[]};function g(){return"\\"===t.currentChar}function w(){if(-1==="'\"".indexOf(t.currentChar))return!1;if(!t.stringOpen)return k(),t.stringStart=t.position,t.stringOpen=t.currentChar,!0;if(t.stringOpen===t.currentChar){k();return L(t.inputText.substring(t.stringStart,t.position+1)),t.stringOpen=!1,!0}return!1}function M(){if(-1===":,{}[]".indexOf(t.currentChar))return!1;if(t.stringOpen)return!1;switch(k(),L(t.currentChar),t.currentChar){case":":return t.isValue=!0,!0;case"{":case"[":t.brackets.push(t.currentChar);break;case"}":case"]":t.brackets.pop()}return":"!==t.currentChar&&(t.isValue="["===t.brackets[t.brackets.length-1]),!0}function k(){return 0!==t.tokenSecondary.length&&(t.tokens.push(t.tokenSecondary),t.tokenSecondary="",!0)}function L(e){return 0!==e.length&&(t.tokens.push(e),!0)}for(r=0;r<t.inputText.length;r++){t.position=r,t.currentChar=t.inputText.charAt(t.position);const e=M(),n=w(),a=g();e||n||a||t.stringOpen||(t.tokenSecondary+=t.currentChar)}let a={brackets:[],isValue:!1,tokens:[]};a.tokens=t.tokens.map(e=>{let t="",n="",r="";switch(e){case",":t="symbol",n=e,r=e,a.isValue="["===a.brackets[a.brackets.length-1];break;case":":t="symbol",n=e,r=e,a.isValue=!0;break;case"{":case"[":t="symbol",n=e,r=e,a.brackets.push(e),a.isValue="["===a.brackets[a.brackets.length-1];break;case"}":case"]":t="symbol",n=e,r=e,a.brackets.pop(),a.isValue="["===a.brackets[a.brackets.length-1];break;case"undefined":t="primitive",n=e,r=void 0;break;case"null":t="primitive",n=e,r=null;break;case"false":t="primitive",n=e,r=!1;break;case"true":t="primitive",n=e,r=!0;break;default:const i=e.charAt(0);if("'\"".indexOf(i)>-1){if(t=a.isValue?"string":"key","key"===t&&(n=function(e){if(0===e.length)return e;if(['""',"''"].indexOf(e)>-1)return"''";let t=!1;for(var n=0;n<2;n++)if([e.charAt(0),e.charAt(e.length-1)].indexOf(['"',"'"][n])>-1){t=!0;break}t&&e.length>=2&&(e=e.slice(1,-1));const r=e.replace(/\w/g,""),a=(e.replace(/\W+/g,""),((e,t)=>{let n=!1;for(var r=0;r<t.length&&(0!==r||!isNaN(t.charAt(r)));r++)if(isNaN(t.charAt(r))){n=!0;break}return!(e.length>0||n)})(r,e));if((e=>{for(var t=0;t<e.length;t++)if(["'",'"'].indexOf(e.charAt(t))>-1)return!0;return!1})(r)){let t="";const n=e.split("");for(var o=0;o<n.length;o++){let e=n[o];["'",'"'].indexOf(e)>-1&&(e="\\"+e),t+=e}e=t}return a?e:"'"+e+"'"}(e)),"string"===t){n="";const t=e.slice(1,-1).split("");for(var o=0;o<t.length;o++){let e=t[o];"'\"".indexOf(e)>-1&&(e="\\"+e),n+=e}n="'"+n+"'"}r=n;break}if(!isNaN(e)){t="number",n=e,r=Number(e);break}if(e.length>0&&!a.isValue){t="key",n=e,n.indexOf(" ")>-1&&(n="'"+n+"'"),r=n;break}}return{type:t,string:n,value:r,depth:a.brackets.length}});let o="";for(r=0;r<a.tokens.length;r++){o+=a.tokens[r].string}function Y(e){for(var t=[],n=0;n<2*e;n++)t.push(" ");return(e>0?"\n":"")+t.join("")}let i="";for(r=0;r<a.tokens.length;r++){let e=a.tokens[r];switch(e.string){case"[":case"{":const t=r<a.tokens.length-1-1?a.tokens[r+1]:"";-1==="}]".indexOf(t.string)?i+=e.string+Y(e.depth):i+=e.string;break;case"]":case"}":const n=r>0?a.tokens[r-1]:"";-1==="[{".indexOf(n.string)?i+=Y(e.depth)+e.string:i+=e.string;break;case":":i+=e.string+" ";break;case",":i+=e.string+Y(e.depth);break;default:i+=e.string}}let s=1;function T(e){var t=[];e>0&&s++;for(var n=0;n<2*e;n++)t.push("&nbsp;");return(e>0?"<br>":"")+t.join("")}let l="";const u=a.tokens.length-1;for(r=0;r<a.tokens.length;r++){let e=a.tokens[r],t=n(r,e,e.depth);switch(e.string){case"{":case"[":const n=r<a.tokens.length-1-1?a.tokens[r+1]:"";-1==="}]".indexOf(n.string)?l+=t+T(e.depth):l+=t;break;case"}":case"]":const o=r>0?a.tokens[r-1]:"";-1==="[{".indexOf(o.string)?l+=T(e.depth)+(u===r?"<br>":"")+t:l+=t;break;case":":l+=t+" ";break;case",":l+=t+T(e.depth);break;default:l+=t}}return s+=2,{tokens:a.tokens,noSpaces:o,indented:i,json:JSON.stringify(e),jsObject:e,markup:l,lines:s}}}}var Rc=Ac,Nc=n(133),Fc=n.n(Nc);function Wc(e){return(Wc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ic(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==Wc(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Wc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===Wc(o)?o:String(o)),r)}var a,o}function Jc(e,t){return(Jc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Uc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qc(e);if(t){var a=qc(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Gc(this,n)}}function Gc(e,t){if(t&&("object"===Wc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Vc(e)}function Vc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qc(e){return(qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $c=wp.i18n.__,Kc=wp.element.Component,Zc=wp.components,Qc=Zc.ExternalLink,Xc=Zc.PanelBody,ed=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jc(e,t)}(o,e);var t,n,r,a=Uc(o);function o(){var e;return Ic(this,o),(e=a.apply(this,arguments)).isValidJSON=e.isValidJSON.bind(Vc(e)),e}return t=o,(n=[{key:"isValidJSON",value:function(e){try{JSON.parse(e)}catch(e){return!1}return!0}},{key:"render",value:function(){var e,t=this,n=this.props.chart["visualizer-settings"];return e=0<=["gauge","tabular","timeline"].indexOf(this.props.chart["visualizer-chart-type"])?this.props.chart["visualizer-chart-type"]:"".concat(this.props.chart["visualizer-chart-type"],"chart"),wp.element.createElement(Xc,{title:$c("Manual Configuration"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement("p",null,$c("Configure the graph by providing configuration variables right from the Google Visualization API.")),wp.element.createElement("p",null,wp.element.createElement(Qc,{href:"https://developers.google.com/chart/interactive/docs/gallery/".concat(e,"#configuration-options")},$c("Google Visualization API"))),wp.element.createElement(Rc,{locale:Fc.a,theme:"light_mitsuketa_tribute",placeholder:Z(n.manual)?JSON.parse(n.manual):{},width:"100%",height:"250px",style:{errorMessage:{height:"100%",fontSize:"10px"},container:{border:"1px solid #ddd",boxShadow:"inset 0 1px 2px rgba(0,0,0,.07)"},labelColumn:{background:"#F5F5F5",width:"auto",padding:"5px 10px 5px 10px"}},onChange:function(e){!1===e.error&&(n.manual=e.json,t.props.edit(n))}}))}}])&&Bc(t.prototype,n),r&&Bc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Kc);function td(e){return(td="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==td(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==td(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===td(o)?o:String(o)),r)}var a,o}function ad(e,t){return(ad=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function od(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sd(e);if(t){var a=sd(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return id(this,n)}}function id(e,t){if(t&&("object"===td(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function sd(e){return(sd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ld=wp.element,ud=ld.Component,cd=ld.Fragment,dd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ad(e,t)}(o,e);var t,n,r,a=od(o);function o(){return nd(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props.chart["visualizer-chart-type"],t=this.props.chart["visualizer-chart-library"];return wp.element.createElement(cd,null,wp.element.createElement(Br,{chart:this.props.chart,attributes:this.props.attributes,edit:this.props.edit}),wp.element.createElement(Or,{chart:this.props.chart,edit:this.props.edit}),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(e)&&wp.element.createElement(la,{chart:this.props.chart,edit:this.props.edit}),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(e)&&wp.element.createElement(Sa,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(cd,null,wp.element.createElement(Ga,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(so,{chart:this.props.chart,edit:this.props.edit})),0<=["area","scatter","line"].indexOf(e)&&wp.element.createElement(Lo,{chart:this.props.chart,edit:this.props.edit}),0<=["bar","column"].indexOf(e)&&wp.element.createElement(Ro,{chart:this.props.chart,edit:this.props.edit}),0<=["candlestick"].indexOf(e)&&wp.element.createElement(ei,{chart:this.props.chart,edit:this.props.edit}),0<=["geo"].indexOf(e)&&wp.element.createElement(cd,null,wp.element.createElement(fi,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(ji,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Gi,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(is,{chart:this.props.chart,edit:this.props.edit})),0<=["gauge"].indexOf(e)&&wp.element.createElement(Ls,{chart:this.props.chart,edit:this.props.edit}),0<=["timeline"].indexOf(e)&&wp.element.createElement(Fs,{chart:this.props.chart,edit:this.props.edit}),0<=["tabular","dataTable"].indexOf(e)&&wp.element.createElement(cd,null,wp.element.createElement(rl,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(gl,{chart:this.props.chart,edit:this.props.edit})),0<=["combo"].indexOf(e)&&wp.element.createElement(Pl,{chart:this.props.chart,edit:this.props.edit}),-1>=["timeline","bubble","gauge","geo","pie","tabular","dataTable"].indexOf(e)&&wp.element.createElement(Ql,{chart:this.props.chart,edit:this.props.edit}),"tabular"===e&&"GoogleCharts"===t&&wp.element.createElement(Ql,{chart:this.props.chart,edit:this.props.edit}),0<=["bubble"].indexOf(e)&&wp.element.createElement(Ou,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(mu,{chart:this.props.chart,edit:this.props.edit}),"DataTable"===t&&wp.element.createElement(Uu,{chart:this.props.chart,edit:this.props.edit}),"DataTable"!==t&&wp.element.createElement(cc,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Tc,{chart:this.props.chart,edit:this.props.edit}),"DataTable"!==t&&wp.element.createElement(ed,{chart:this.props.chart,edit:this.props.edit}))}}])&&rd(t.prototype,n),r&&rd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ud);function pd(e){return(pd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function md(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */md=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),s=new Y(a||[]);return r(i,"_invoke",{value:w(e,n,s)}),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function p(){}function m(){}function h(){}var f={};l(f,o,(function(){return this}));var _=Object.getPrototypeOf,y=_&&_(_(T([])));y&&y!==t&&n.call(y,o)&&(f=y);var b=h.prototype=p.prototype=Object.create(f);function v(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,s){var l=c(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==pd(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=M(i,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function M(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var a=c(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return m.prototype=h,r(b,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:m,configurable:!0}),m.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},v(g.prototype),l(g.prototype,i,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new g(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(b),l(b,s,"Generator"),l(b,o,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=T,Y.prototype={constructor:Y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;L(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function hd(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function fd(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){hd(o,r,a,i,s,"next",e)}function s(e){hd(o,r,a,i,s,"throw",e)}i(void 0)}))}}function _d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==pd(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==pd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===pd(o)?o:String(o)),r)}var a,o}function bd(e,t){return(bd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function vd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Md(e);if(t){var a=Md(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return gd(this,n)}}function gd(e,t){if(t&&("object"===pd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return wd(e)}function wd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Md(e){return(Md=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kd=wp.i18n.__,Ld=wp.apiFetch,Yd=wp.element,Td=Yd.Component,Sd=Yd.Fragment,Dd=wp.components,Od=Dd.Button,jd=Dd.PanelBody,xd=Dd.SelectControl,Ed=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bd(e,t)}(s,e);var t,n,r,a,o,i=vd(s);function s(){var e;return _d(this,s),(e=i.apply(this,arguments)).getPermissionData=e.getPermissionData.bind(wd(e)),e.state={users:[],roles:[]},e}return t=s,(n=[{key:"componentDidMount",value:(o=fd(md().mark((function e(){var t,n,r;return md().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("business"!==visualizerLocalize.isPro){e.next=14;break}if(void 0===(t=this.props.chart["visualizer-permissions"]).permissions){e.next=14;break}if(void 0===t.permissions.read||void 0===t.permissions.edit){e.next=14;break}if("users"!==t.permissions.read&&"users"!==t.permissions.edit){e.next=9;break}return e.next=7,Ld({path:"/visualizer/v1/get-permission-data?type=users"});case 7:n=e.sent,this.setState({users:n});case 9:if("roles"!==t.permissions.read&&"roles"!==t.permissions.edit){e.next=14;break}return e.next=12,Ld({path:"/visualizer/v1/get-permission-data?type=roles"});case 12:r=e.sent,this.setState({roles:r});case 14:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getPermissionData",value:(a=fd(md().mark((function e(t){var n,r;return md().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("business"!==visualizerLocalize.isPro){e.next=11;break}if("users"!==t||0!==this.state.users.length){e.next=6;break}return e.next=4,Ld({path:"/visualizer/v1/get-permission-data?type=".concat(t)});case 4:n=e.sent,this.setState({users:n});case 6:if("roles"!==t||0!==this.state.roles.length){e.next=11;break}return e.next=9,Ld({path:"/visualizer/v1/get-permission-data?type=".concat(t)});case 9:r=e.sent,this.setState({roles:r});case 11:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-permissions"];return wp.element.createElement(Sd,null,"business"===visualizerLocalize.isPro?wp.element.createElement(jd,{title:kd("Who can see this chart?"),initialOpen:!1,className:"vz-permission-tab"},wp.element.createElement(xd,{label:kd("Select who can view the chart on the front-end."),value:t.permissions.read,options:[{value:"all",label:"All Users"},{value:"users",label:"Select Users"},{value:"roles",label:"Select Roles"}],onChange:function(n){t.permissions.read=n,e.props.edit(t),"users"!==n&&"roles"!==n||e.getPermissionData(n)}}),("users"===t.permissions.read||"roles"===t.permissions.read)&&wp.element.createElement(xd,{multiple:!0,value:t.permissions["read-specific"],options:"users"===t.permissions.read&&this.state.users||"roles"===t.permissions.read&&this.state.roles,onChange:function(n){t.permissions["read-specific"]=n,e.props.edit(t)}})):wp.element.createElement(jd,{title:kd("Who can see this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,kd("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(Od,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},kd("Buy Now"))),"business"===visualizerLocalize.isPro?wp.element.createElement(jd,{title:kd("Who can edit this chart?"),initialOpen:!1,className:"vz-permission-tab"},wp.element.createElement(xd,{label:kd("Select who can edit the chart on the front-end."),value:t.permissions.edit,options:[{value:"all",label:"All Users"},{value:"users",label:"Select Users"},{value:"roles",label:"Select Roles"}],onChange:function(n){t.permissions.edit=n,e.props.edit(t),"users"!==n&&"roles"!==n||e.getPermissionData(n)}}),("users"===t.permissions.edit||"roles"===t.permissions.edit)&&wp.element.createElement(xd,{multiple:!0,value:t.permissions["edit-specific"],options:"users"===t.permissions.edit&&this.state.users||"roles"===t.permissions.edit&&this.state.roles,onChange:function(n){t.permissions["edit-specific"]=n,e.props.edit(t)}})):wp.element.createElement(jd,{title:kd("Who can edit this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,kd("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(Od,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},kd("Buy Now"))))}}])&&yd(t.prototype,n),r&&yd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(Td),Pd=n(134),Cd=n.n(Pd),Hd=wp.components,zd=Hd.Button,Ad=Hd.Dashicon,Rd=Hd.G,Nd=Hd.Path,Fd=Hd.SVG;var Wd=function(e){var t=e.label,n=e.icon,r=e.className,a=e.isBack,o=e.onClick,i=Cd()("components-panel__body","components-panel__body-button",r,{"visualizer-panel-back":a});return wp.element.createElement("div",{className:i},wp.element.createElement("h2",{className:"components-panel__body-title"},wp.element.createElement(zd,{className:"components-panel__body-toggle",onClick:o},wp.element.createElement(Fd,{className:"components-panel__arrow",width:"24px",height:"24px",viewBox:"-12 -12 48 48",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement(Rd,null,wp.element.createElement(Nd,{fill:"none",d:"M0,0h24v24H0V0z"})),wp.element.createElement(Rd,null,wp.element.createElement(Nd,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"}))),n&&wp.element.createElement(Ad,{icon:n,className:"components-panel__icon"}),t)))},Id=n(3),Bd=n.n(Id);function Jd(e){return(Jd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ud(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==Jd(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Jd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===Jd(o)?o:String(o)),r)}var a,o}function Vd(e,t){return(Vd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function qd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Kd(e);if(t){var a=Kd(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return $d(this,n)}}function $d(e,t){if(t&&("object"===Jd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Kd(e){return(Kd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zd=lodash.startCase,Qd=wp.i18n.__,Xd=wp.element,ep=Xd.Component,tp=Xd.Fragment,np=(wp.blockEditor||wp.editor).InspectorControls,rp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vd(e,t)}(o,e);var t,n,r,a=qd(o);function o(){var e;return Ud(this,o),(e=a.apply(this,arguments)).state={route:"home"},e}return t=o,(n=[{key:"render",value:function(){var e,t,n=this,r="undefined"!=typeof google?google.visualization.Version:"current",a=V(JSON.parse(JSON.stringify(this.props.chart)));return 0<=["gauge","tabular","timeline"].indexOf(this.props.chart["visualizer-chart-type"])?"DataTable"===a["visualizer-chart-library"]?e=a["visualizer-chart-type"]:("tabular"===(e=this.props.chart["visualizer-chart-type"])&&(e="table"),e=Zd(e)):e="".concat(Zd(this.props.chart["visualizer-chart-type"]),"Chart"),a["visualizer-data-exploded"]&&(t=Qd("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement(tp,null,"home"===this.state.route&&wp.element.createElement(np,null,wp.element.createElement(Ie,{chart:this.props.chart,readUploadedFile:this.props.readUploadedFile}),wp.element.createElement(Et,{id:this.props.id,chart:this.props.chart,editURL:this.props.editURL,isLoading:this.props.isLoading,uploadData:this.props.uploadData,editSchedule:this.props.editSchedule,editJSONSchedule:this.props.editJSONSchedule,editJSONURL:this.props.editJSONURL,editJSONHeaders:this.props.editJSONHeaders,editJSONRoot:this.props.editJSONRoot,editJSONPaging:this.props.editJSONPaging,JSONImportData:this.props.JSONImportData}),wp.element.createElement(Xt,{getChartData:this.props.getChartData,isLoading:this.props.isLoading}),wp.element.createElement(Hn,{chart:this.props.chart,editSchedule:this.props.editDatabaseSchedule,databaseImportData:this.props.databaseImportData}),wp.element.createElement(pr,{chart:this.props.chart,editChartData:this.props.editChartData}),wp.element.createElement(Wd,{label:Qd("Advanced Options"),className:"visualizer-advanced-options",icon:"admin-tools",onClick:function(){return n.setState({route:"showAdvanced"})}}),wp.element.createElement(Wd,{label:Qd("Chart Permissions"),icon:"admin-users",onClick:function(){return n.setState({route:"showPermissions"})}})),("showAdvanced"===this.state.route||"showPermissions"===this.state.route)&&wp.element.createElement(np,null,wp.element.createElement(Wd,{label:Qd("Chart Settings"),onClick:function(){return n.setState({route:"home"})},isBack:!0}),"showAdvanced"===this.state.route&&wp.element.createElement(dd,{chart:this.props.chart,attributes:this.props.attributes,edit:this.props.editSettings}),"showPermissions"===this.state.route&&wp.element.createElement(Ed,{chart:this.props.chart,edit:this.props.editPermissions})),wp.element.createElement("div",{className:"visualizer-settings__chart","data-chart-type":e},null!==this.props.chart&&"DataTable"===a["visualizer-chart-library"]?wp.element.createElement(I,{id:this.props.id,rows:a["visualizer-data"],columns:a["visualizer-series"],options:a["visualizer-settings"]}):(a["visualizer-data-exploded"],wp.element.createElement(D,{chartVersion:r,chartType:e,rows:a["visualizer-data"],columns:a["visualizer-series"],options:Z(this.props.chart["visualizer-settings"].manual)?Bd()($(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):$(this.props.chart["visualizer-settings"]),height:"500px",formatters:X(a)})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,t))))}}])&&Gd(t.prototype,n),r&&Gd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(ep);function ap(e){return(ap="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function op(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ip(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,o=void 0,o=function(e,t){if("object"!==ap(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ap(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(a,"string"),"symbol"===ap(o)?o:String(o)),r)}var a,o}function sp(e,t){return(sp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cp(e);if(t){var a=cp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return up(this,n)}}function up(e,t){if(t&&("object"===ap(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function cp(e){return(cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dp=lodash.startCase,pp=wp.i18n.__,mp=wp.element,hp=mp.Component,fp=mp.Fragment,_p=wp.components,yp=_p.Button,bp=_p.Dashicon,vp=_p.Toolbar,gp=_p.Tooltip,Mp=(wp.blockEditor||wp.editor).BlockControls,kp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sp(e,t)}(o,e);var t,n,r,a=lp(o);function o(){return op(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e,t,n="undefined"!=typeof google?google.visualization.Version:"current",r=V(JSON.parse(JSON.stringify(this.props.chart)));return 0<=["gauge","tabular","timeline"].indexOf(this.props.chart["visualizer-chart-type"])?"DataTable"===r["visualizer-chart-library"]?e=r["visualizer-chart-type"]:("tabular"===(e=this.props.chart["visualizer-chart-type"])&&(e="table"),e=dp(e)):e="".concat(dp(this.props.chart["visualizer-chart-type"]),"Chart"),r["visualizer-data-exploded"]&&(t=pp("Annotations in this chart may not display here but they will display in the front end.")),this.props.chart["visualizer-series"]&&0<=["date","datetime","timeofday"].indexOf(this.props.chart["visualizer-series"][0].type)&&this.props.chart["visualizer-settings"]&&this.props.chart["visualizer-settings"].hAxis&&""==this.props.chart["visualizer-settings"].hAxis.format&&(this.props.chart["visualizer-settings"].hAxis.format="YYYY-MM-dd"),wp.element.createElement("div",{className:this.props.className},null!==this.props.chart&&wp.element.createElement(fp,null,wp.element.createElement(Mp,{key:"toolbar-controls"},wp.element.createElement(vp,{className:"components-toolbar"},wp.element.createElement(gp,{text:pp("Edit Chart")},wp.element.createElement(yp,{className:"components-icon-button components-toolbar__control edit-pie-chart",onClick:this.props.editChart},wp.element.createElement(bp,{icon:"edit"}))))),"DataTable"===r["visualizer-chart-library"]?wp.element.createElement(I,{id:this.props.id,rows:r["visualizer-data"],columns:r["visualizer-series"],options:r["visualizer-settings"]}):(r["visualizer-data-exploded"],wp.element.createElement(D,{chartVersion:n,chartType:e,rows:r["visualizer-data"],columns:r["visualizer-series"],options:Z(this.props.chart["visualizer-settings"].manual)?Bd()($(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):$(this.props.chart["visualizer-settings"]),height:"500px",formatters:X(r)})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,t))))}}])&&ip(t.prototype,n),r&&ip(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(hp);function Lp(e){return(Lp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yp(Object(n),!0).forEach((function(t){Sp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sp(e,t,n){return(t=Pp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dp(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Dp=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,a){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),s=new Y(a||[]);return r(i,"_invoke",{value:w(e,n,s)}),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function p(){}function m(){}function h(){}var f={};l(f,o,(function(){return this}));var _=Object.getPrototypeOf,y=_&&_(_(T([])));y&&y!==t&&n.call(y,o)&&(f=y);var b=h.prototype=p.prototype=Object.create(f);function v(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var a;r(this,"_invoke",{value:function(r,o){function i(){return new t((function(a,i){!function r(a,o,i,s){var l=c(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==Lp(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}(r,o,a,i)}))}return a=a?a.then(i,i):i()}})}function w(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return S()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=M(i,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function M(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var a=c(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,d;var o=a.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function T(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return m.prototype=h,r(b,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:m,configurable:!0}),m.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},v(g.prototype),l(g.prototype,i,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new g(u(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},v(b),l(b,s,"Generator"),l(b,o,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=T,Y.prototype={constructor:Y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;L(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function Op(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function jp(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){Op(o,r,a,i,s,"next",e)}function s(e){Op(o,r,a,i,s,"throw",e)}i(void 0)}))}}function xp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ep(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Pp(r.key),r)}}function Pp(e){var t=function(e,t){if("object"!==Lp(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Lp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Lp(t)?t:String(t)}function Cp(e,t){return(Cp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Hp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rp(e);if(t){var a=Rp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return zp(this,n)}}function zp(e,t){if(t&&("object"===Lp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ap(e)}function Ap(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rp(e){return(Rp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Np=wp.i18n.__,Fp=wp,Wp=Fp.apiFetch,Ip=Fp.apiRequest,Bp=wp.element,Jp=Bp.Component,Up=Bp.Fragment,Gp=wp.components,Vp=Gp.Button,qp=Gp.ButtonGroup,$p=Gp.Dashicon,Kp=Gp.Placeholder,Zp=Gp.Notice,Qp=Gp.Spinner,Xp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cp(e,t)}(l,e);var t,n,r,a,o,i,s=Hp(l);function l(){var e;return xp(this,l),(e=s.apply(this,arguments)).getChart=e.getChart.bind(Ap(e)),e.editChart=e.editChart.bind(Ap(e)),e.editSettings=e.editSettings.bind(Ap(e)),e.editPermissions=e.editPermissions.bind(Ap(e)),e.readUploadedFile=e.readUploadedFile.bind(Ap(e)),e.editURL=e.editURL.bind(Ap(e)),e.editSchedule=e.editSchedule.bind(Ap(e)),e.editJSONSchedule=e.editJSONSchedule.bind(Ap(e)),e.editJSONURL=e.editJSONURL.bind(Ap(e)),e.editJSONHeaders=e.editJSONHeaders.bind(Ap(e)),e.editJSONRoot=e.editJSONRoot.bind(Ap(e)),e.editJSONPaging=e.editJSONPaging.bind(Ap(e)),e.JSONImportData=e.JSONImportData.bind(Ap(e)),e.editDatabaseSchedule=e.editDatabaseSchedule.bind(Ap(e)),e.databaseImportData=e.databaseImportData.bind(Ap(e)),e.uploadData=e.uploadData.bind(Ap(e)),e.getChartData=e.getChartData.bind(Ap(e)),e.editChartData=e.editChartData.bind(Ap(e)),e.updateChart=e.updateChart.bind(Ap(e)),e.state={route:e.props.attributes.route?e.props.attributes.route:"home",chart:null,isModified:!1,isLoading:!1,isScheduled:!1},e}return t=l,(n=[{key:"componentDidMount",value:(i=jp(Dp().mark((function e(){var t;return Dp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.props.attributes.id){e.next=5;break}return e.next=3,Wp({path:"wp/v2/visualizer/".concat(this.props.attributes.id)}).catch((function(e){}));case 3:(t=e.sent)?this.setState({chart:t.chart_data}):this.setState({route:"error"});case 5:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getChart",value:(o=jp(Dp().mark((function e(t){var n;return Dp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setState({isLoading:"getChart"});case 2:return e.next=4,Wp({path:"wp/v2/visualizer/".concat(t)});case 4:n=e.sent,this.setState({route:"chartSelect",chart:n.chart_data,isLoading:!0,isModified:!0}),this.props.setAttributes({id:t,route:"chartSelect",lazy:-1});case 7:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"editChart",value:function(){this.setState({route:"chartSelect"}),this.props.setAttributes({route:"chartSelect"})}},{key:"editSettings",value:function(e){var t=Tp({},this.state.chart);"1"!==e.pagination&&delete e.pageSize,t["visualizer-settings"]=e,this.setState({chart:t,isModified:!0})}},{key:"editPermissions",value:function(e){var t=Tp({},this.state.chart);t["visualizer-permissions"]=e,this.setState({chart:t,isModified:!0})}},{key:"readUploadedFile",value:function(e){var t=this,n=e.current.files[0],r=new FileReader;r.onload=function(){var e=function(e,t){t=t||",";for(var n=new RegExp("(\\"+t+"|\\r?\\n|\\r|^)(?:'([^']*(?:''[^']*)*)'|([^'\\"+t+"\\r\\n]*))","gi"),r=[[]],a=null;a=n.exec(e);){var o=a[1];o.length&&o!==t&&r.push([]);var i=void 0;i=a[2]?a[2].replace(new RegExp("''","g"),"'"):a[3],r[r.length-1].push(i)}return r}(r.result);t.editChartData(e,"Visualizer_Source_Csv")},r.readAsText(n)}},{key:"editURL",value:function(e){var t=Tp({},this.state.chart);t["visualizer-chart-url"]=e,this.setState({chart:t})}},{key:"editSchedule",value:function(e){var t=Tp({},this.state.chart);t["visualizer-chart-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"editJSONSchedule",value:function(e){var t=Tp({},this.state.chart);t["visualizer-json-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"editJSONURL",value:function(e){var t=Tp({},this.state.chart);t["visualizer-json-url"]=e,this.setState({chart:t})}},{key:"editJSONHeaders",value:function(e){var t=Tp({},this.state.chart);delete e.username,delete e.password,t["visualizer-json-headers"]=e,this.setState({chart:t})}},{key:"editJSONRoot",value:function(e){var t=Tp({},this.state.chart);t["visualizer-json-root"]=e,this.setState({chart:t})}},{key:"editJSONPaging",value:function(e){var t=Tp({},this.state.chart);t["visualizer-json-paging"]=e,this.setState({chart:t})}},{key:"JSONImportData",value:function(e,t,n){var r=Tp({},this.state.chart);r["visualizer-source"]=e,r["visualizer-default-data"]=0,r["visualizer-series"]=t,r["visualizer-data"]=n,this.setState({chart:r,isModified:!0})}},{key:"editDatabaseSchedule",value:function(e){var t=Tp({},this.state.chart);t["visualizer-db-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"databaseImportData",value:function(e,t,n,r){var a=Tp({},this.state.chart);a["visualizer-source"]=t,a["visualizer-default-data"]=0,a["visualizer-series"]=n,a["visualizer-data"]=r,a["visualizer-db-query"]=e,this.setState({chart:a,isModified:!0})}},{key:"uploadData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setState({isLoading:"uploadData",isScheduled:t}),Ip({path:"/visualizer/v1/upload-data?url=".concat(this.state.chart["visualizer-chart-url"]),method:"POST"}).then((function(t){if(2<=Object.keys(t).length){var n=Tp({},e.state.chart);n["visualizer-source"]="Visualizer_Source_Csv_Remote",n["visualizer-default-data"]=0,n["visualizer-series"]=t.series,n["visualizer-data"]=t.data;var r=n["visualizer-series"],a=n["visualizer-settings"],o=r,i="series";return"pie"===n["visualizer-chart-type"]&&(o=n["visualizer-data"],i="slices"),o.map((function(e,t){if("pie"===n["visualizer-chart-type"]||0!==t){var r="pie"!==n["visualizer-chart-type"]?t-1:t;void 0===a[i][r]&&(a[i][r]={},a[i][r].temp=1)}})),a[i]=a[i].filter((function(e,t){return t<("pie"!==n["visualizer-chart-type"]?o.length-1:o.length)})),n["visualizer-settings"]=a,e.setState({chart:n,isModified:!0,isLoading:!1}),t}e.setState({isLoading:!1})}),(function(t){return e.setState({isLoading:!1}),t}))}},{key:"getChartData",value:(a=jp(Dp().mark((function e(t){var n,r;return Dp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setState({isLoading:"getChartData"});case 2:return e.next=4,Wp({path:"wp/v2/visualizer/".concat(t)});case 4:n=e.sent,(r=Tp({},this.state.chart))["visualizer-source"]="Visualizer_Source_Csv",r["visualizer-default-data"]=0,r["visualizer-series"]=n.chart_data["visualizer-series"],r["visualizer-data"]=n.chart_data["visualizer-data"],this.setState({isLoading:!1,chart:r});case 11:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"editChartData",value:function(e,t){var n=Tp({},this.state.chart),r=[],a=Tp({},n["visualizer-settings"]),o=n["visualizer-chart-type"];e[0].map((function(t,n){r[n]={label:t,type:e[1][n]}})),e.splice(0,2);var i=r,s="series";switch(o){case"pie":i=e,s="slices",e.map((function(e,t){switch(r[1].type){case"number":e[1]=parseFloat(e[1])}}));break;case"tabular":e.map((function(e,t){r.map((function(t,n){switch(t.type){case"boolean":"string"==typeof e[n]&&(e[n]="true"===e[n])}}))}))}i.map((function(e,t){if("pie"===o||0!==t){var n="pie"!==o?t-1:t;Array.isArray(a[s])&&void 0===a[s][n]&&(a[s][n]={},a[s][n].temp=1)}})),Array.isArray(a[s])&&(a[s]=a[s].filter((function(e,t){return t<(-1>=["pie","tabular","dataTable"].indexOf(o)?i.length-1:i.length)}))),n["visualizer-source"]=t,n["visualizer-default-data"]=0,n["visualizer-data"]=e,n["visualizer-series"]=r,n["visualizer-settings"]=a,n["visualizer-chart-url"]="",this.setState({chart:n,isModified:!0,isScheduled:!1})}},{key:"updateChart",value:function(){var e=this;this.setState({isLoading:"updateChart"});var t=this.state.chart;!1===this.state.isScheduled&&(t["visualizer-chart-schedule"]="");var n="series";"pie"===t["visualizer-chart-type"]&&(n="slices"),-1>=["bubble","timeline"].indexOf(t["visualizer-chart-type"])&&Object.keys(t["visualizer-settings"][n]).map((function(e){void 0!==t["visualizer-settings"][n][e]&&void 0!==t["visualizer-settings"][n][e].temp&&delete t["visualizer-settings"][n][e].temp})),Ip({path:"/visualizer/v1/update-chart?id=".concat(this.props.attributes.id),method:"POST",data:t}).then((function(t){return e.setState({isLoading:!1,isModified:!1}),t}),(function(e){return e}))}},{key:"render",value:function(){var e=this;return"error"===this.state.route?wp.element.createElement(Zp,{status:"error",isDismissible:!1},wp.element.createElement($p,{icon:"chart-pie"}),Np("This chart is not available; it might have been deleted. Please delete this block and resubmit your chart.")):"1"===visualizerLocalize.isFullSiteEditor?wp.element.createElement(Zp,{status:"error",isDismissible:!1},wp.element.createElement($p,{icon:"chart-pie"}),Np("Visualizer block charts are currently not available for selection here, you must visit the library, get the shortcode, and add the chart here in a shortcode tag.")):"renderChart"===this.state.route&&null!==this.state.chart?wp.element.createElement(kp,{id:this.props.attributes.id,chart:this.state.chart,className:this.props.className,editChart:this.editChart}):wp.element.createElement("div",{className:"visualizer-settings"},wp.element.createElement("div",{className:"visualizer-settings__title"},wp.element.createElement($p,{icon:"chart-pie"}),Np("Visualizer")),"home"===this.state.route&&wp.element.createElement("div",{className:"visualizer-settings__content"},wp.element.createElement("div",{className:"visualizer-settings__content-description"},Np("Make a new chart or display an existing one?")),wp.element.createElement("a",{href:visualizerLocalize.adminPage,target:"_blank",className:"visualizer-settings__content-option"},wp.element.createElement("span",{className:"visualizer-settings__content-option-title"},Np("Create a new chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement($p,{icon:"arrow-right-alt2"}))),wp.element.createElement("div",{className:"visualizer-settings__content-option",onClick:function(){e.setState({route:"showCharts"}),e.props.setAttributes({route:"showCharts"})}},wp.element.createElement("span",{className:"visualizer-settings__content-option-title"},Np("Display an existing chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement($p,{icon:"arrow-right-alt2"})))),("getChart"===this.state.isLoading||"chartSelect"===this.state.route&&null===this.state.chart||"renderChart"===this.state.route&&null===this.state.chart)&&wp.element.createElement(Kp,null,wp.element.createElement(Qp,null)),"showCharts"===this.state.route&&!1===this.state.isLoading&&wp.element.createElement(Se,{getChart:this.getChart}),"chartSelect"===this.state.route&&null!==this.state.chart&&wp.element.createElement(rp,{id:this.props.attributes.id,attributes:this.props.attributes,chart:this.state.chart,editSettings:this.editSettings,editPermissions:this.editPermissions,url:this.state.url,readUploadedFile:this.readUploadedFile,editURL:this.editURL,editSchedule:this.editSchedule,editJSONURL:this.editJSONURL,editJSONHeaders:this.editJSONHeaders,editJSONSchedule:this.editJSONSchedule,editJSONRoot:this.editJSONRoot,editJSONPaging:this.editJSONPaging,JSONImportData:this.JSONImportData,editDatabaseSchedule:this.editDatabaseSchedule,databaseImportData:this.databaseImportData,uploadData:this.uploadData,getChartData:this.getChartData,editChartData:this.editChartData,isLoading:this.state.isLoading}),wp.element.createElement("div",{className:"visualizer-settings__controls"},("showCharts"===this.state.route||"chartSelect"===this.state.route)&&wp.element.createElement(qp,null,wp.element.createElement(Vp,{isDefault:!0,isLarge:!0,onClick:function(){var t;"showCharts"===e.state.route?t="home":"chartSelect"===e.state.route&&(t="showCharts"),e.setState({route:t,isLoading:!1}),e.props.setAttributes({route:t})}},Np("Back")),"chartSelect"===this.state.route&&wp.element.createElement(Up,null,!1===this.state.isModified?wp.element.createElement(Vp,{isDefault:!0,isLarge:!0,className:"visualizer-bttn-done",onClick:function(){e.setState({route:"renderChart",isModified:!0}),e.props.setAttributes({route:"renderChart"})}},Np("Done")):wp.element.createElement(Vp,{isPrimary:!0,isLarge:!0,className:"visualizer-bttn-save",isBusy:"updateChart"===this.state.isLoading,disabled:"updateChart"===this.state.isLoading,onClick:this.updateChart},Np("Save"))))))}}])&&Ep(t.prototype,n),r&&Ep(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(Jp),em=(n(153),wp.i18n.__),tm=wp.blocks.registerBlockType;t.default=tm("visualizer/chart",{title:em("Visualizer Chart"),description:em("A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages."),category:"common",icon:"chart-pie",keywords:[em("Visualizer"),em("Chart"),em("Google Charts")],attributes:{id:{type:"number"},lazy:{default:"-1",type:"string"},route:{type:"string"}},supports:{customClassName:!1},edit:Xp,save:function(){return null}})}]);
69 + */class Cc extends r.Component{constructor(e){super(e),this.updateInternalProps=this.updateInternalProps.bind(this),this.createMarkup=this.createMarkup.bind(this),this.onClick=this.onClick.bind(this),this.onBlur=this.onBlur.bind(this),this.update=this.update.bind(this),this.getCursorPosition=this.getCursorPosition.bind(this),this.setCursorPosition=this.setCursorPosition.bind(this),this.scheduledUpdate=this.scheduledUpdate.bind(this),this.setUpdateTime=this.setUpdateTime.bind(this),this.renderLabels=this.renderLabels.bind(this),this.newSpan=this.newSpan.bind(this),this.renderErrorMessage=this.renderErrorMessage.bind(this),this.onScroll=this.onScroll.bind(this),this.showPlaceholder=this.showPlaceholder.bind(this),this.tokenize=this.tokenize.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onPaste=this.onPaste.bind(this),this.stopEvent=this.stopEvent.bind(this),this.refContent=null,this.refLabels=null,this.updateInternalProps(),this.renderCount=1,this.state={prevPlaceholder:"",markupText:"",plainText:"",json:"",jsObject:void 0,lines:!1,error:!1},this.props.locale||console.warn("[react-json-editor-ajrm - Deprecation Warning] You did not provide a 'locale' prop for your JSON input - This will be required in a future version. English has been set as a default.")}updateInternalProps(){let e={},t={},n=Sc.dark_vscode_tribute;"theme"in this.props&&"string"==typeof this.props.theme&&this.props.theme in Sc&&(n=Sc[this.props.theme]),e=n,"colors"in this.props&&(e={default:"default"in this.props.colors?this.props.colors.default:e.default,string:"string"in this.props.colors?this.props.colors.string:e.string,number:"number"in this.props.colors?this.props.colors.number:e.number,colon:"colon"in this.props.colors?this.props.colors.colon:e.colon,keys:"keys"in this.props.colors?this.props.colors.keys:e.keys,keys_whiteSpace:"keys_whiteSpace"in this.props.colors?this.props.colors.keys_whiteSpace:e.keys_whiteSpace,primitive:"primitive"in this.props.colors?this.props.colors.primitive:e.primitive,error:"error"in this.props.colors?this.props.colors.error:e.error,background:"background"in this.props.colors?this.props.colors.background:e.background,background_warning:"background_warning"in this.props.colors?this.props.colors.background_warning:e.background_warning}),this.colors=e,t="style"in this.props?{outerBox:"outerBox"in this.props.style?this.props.style.outerBox:{},container:"container"in this.props.style?this.props.style.container:{},warningBox:"warningBox"in this.props.style?this.props.style.warningBox:{},errorMessage:"errorMessage"in this.props.style?this.props.style.errorMessage:{},body:"body"in this.props.style?this.props.style.body:{},labelColumn:"labelColumn"in this.props.style?this.props.style.labelColumn:{},labels:"labels"in this.props.style?this.props.style.labels:{},contentBox:"contentBox"in this.props.style?this.props.style.contentBox:{}}:{outerBox:{},container:{},warningBox:{},errorMessage:{},body:{},labelColumn:{},labels:{},contentBox:{}},this.style=t,this.confirmGood=!("confirmGood"in this.props)||this.props.confirmGood;const r=this.props.height||"610px",a=this.props.width||"479px";this.totalHeight=r,this.totalWidth=a,!("onKeyPressUpdate"in this.props)||this.props.onKeyPressUpdate?this.timer||(this.timer=setInterval(this.scheduledUpdate,100)):this.timer&&(clearInterval(this.timer),this.timer=!1),this.updateTime=!1,this.waitAfterKeyPress="waitAfterKeyPress"in this.props?this.props.waitAfterKeyPress:1e3,this.resetConfiguration="reset"in this.props&&this.props.reset}render(){const e=this.props.id,t=this.state.markupText,n=this.props.error||this.state.error,r=this.colors,o=this.style,i=this.confirmGood,s=this.totalHeight,l=this.totalWidth,u=!!this.props.error||!!n&&"token"in n;return this.renderCount++,a.a.createElement("div",{name:"outer-box",id:e&&e+"-outer-box",style:Dc({display:"block",overflow:"none",height:s,width:l,margin:0,boxSizing:"border-box",position:"relative"},o.outerBox)},i?a.a.createElement("div",{style:{opacity:u?0:1,height:"30px",width:"30px",position:"absolute",top:0,right:0,transform:"translate(-25%,25%)",pointerEvents:"none",transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"}},a.a.createElement("svg",{height:"30px",width:"30px",viewBox:"0 0 100 100"},a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"green",opacity:"0.85",d:"M39.363,79L16,55.49l11.347-11.419L39.694,56.49L72.983,23L84,34.085L39.363,79z"}))):void 0,a.a.createElement("div",{name:"container",id:e&&e+"-container",style:Dc({display:"block",height:s,width:l,margin:0,boxSizing:"border-box",overflow:"hidden",fontFamily:"Roboto, sans-serif"},o.container),onClick:this.onClick},a.a.createElement("div",{name:"warning-box",id:e&&e+"-warning-box",style:Dc({display:"block",overflow:"hidden",height:u?"60px":"0px",width:"100%",margin:0,backgroundColor:r.background_warning,transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"},o.warningBox),onClick:this.onClick},a.a.createElement("span",{style:{display:"inline-block",height:"60px",width:"60px",margin:0,boxSizing:"border-box",overflow:"hidden",verticalAlign:"top",pointerEvents:"none"},onClick:this.onClick},a.a.createElement("div",{style:{position:"relative",top:0,left:0,height:"60px",width:"60px",margin:0,pointerEvents:"none"},onClick:this.onClick},a.a.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"},onClick:this.onClick},a.a.createElement("svg",{height:"25px",width:"25px",viewBox:"0 0 100 100"},a.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"red",d:"M73.9,5.75c0.467-0.467,1.067-0.7,1.8-0.7c0.7,0,1.283,0.233,1.75,0.7l16.8,16.8 c0.467,0.5,0.7,1.084,0.7,1.75c0,0.733-0.233,1.334-0.7,1.801L70.35,50l23.9,23.95c0.5,0.467,0.75,1.066,0.75,1.8 c0,0.667-0.25,1.25-0.75,1.75l-16.8,16.75c-0.534,0.467-1.117,0.7-1.75,0.7s-1.233-0.233-1.8-0.7L50,70.351L26.1,94.25 c-0.567,0.467-1.167,0.7-1.8,0.7c-0.667,0-1.283-0.233-1.85-0.7L5.75,77.5C5.25,77,5,76.417,5,75.75c0-0.733,0.25-1.333,0.75-1.8 L29.65,50L5.75,26.101C5.25,25.667,5,25.066,5,24.3c0-0.666,0.25-1.25,0.75-1.75l16.8-16.8c0.467-0.467,1.05-0.7,1.75-0.7 c0.733,0,1.333,0.233,1.8,0.7L50,29.65L73.9,5.75z"}))))),a.a.createElement("span",{style:{display:"inline-block",height:"60px",width:"calc(100% - 60px)",margin:0,overflow:"hidden",verticalAlign:"top",position:"absolute",pointerEvents:"none"},onClick:this.onClick},this.renderErrorMessage())),a.a.createElement("div",{name:"body",id:e&&e+"-body",style:Dc({display:"flex",overflow:"none",height:u?"calc(100% - 60px)":"100%",width:"",margin:0,resize:"none",fontFamily:"Roboto Mono, Monaco, monospace",fontSize:"11px",backgroundColor:r.background,transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"},o.body),onClick:this.onClick},a.a.createElement("span",{name:"labels",id:e&&e+"-labels",ref:e=>this.refLabels=e,style:Dc({display:"inline-block",boxSizing:"border-box",verticalAlign:"top",height:"100%",width:"44px",margin:0,padding:"5px 0px 5px 10px",overflow:"hidden",color:"#D4D4D4"},o.labelColumn),onClick:this.onClick},this.renderLabels()),a.a.createElement("span",{id:e,ref:e=>this.refContent=e,contentEditable:!0,style:Dc({display:"inline-block",boxSizing:"border-box",verticalAlign:"top",height:"100%",width:"",flex:1,margin:0,padding:"5px",overflowX:"hidden",overflowY:"auto",wordWrap:"break-word",whiteSpace:"pre-line",color:"#D4D4D4",outline:"none"},o.contentBox),dangerouslySetInnerHTML:this.createMarkup(t),onKeyPress:this.onKeyPress,onKeyDown:this.onKeyDown,onClick:this.onClick,onBlur:this.onBlur,onScroll:this.onScroll,onPaste:this.onPaste,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1}))))}renderErrorMessage(){const e=this.props.locale||Pc,t=this.props.error||this.state.error,n=this.style;if(t)return a.a.createElement("p",{style:Dc({color:"red",fontSize:"12px",position:"absolute",width:"calc(100% - 60px)",height:"60px",boxSizing:"border-box",margin:0,padding:0,paddingRight:"10px",overflowWrap:"break-word",display:"flex",flexDirection:"column",justifyContent:"center"},n.errorMessage)},Ec(e.format,t))}renderLabels(){const e=this.colors,t=this.style,n=this.props.error||this.state.error,r=n?n.line:-1,o=this.state.lines?this.state.lines:1;let i=new Array(o);for(var s=0;s<o-1;s++)i[s]=s+1;return i.map(n=>{const o=n!==r?e.default:"red";return a.a.createElement("div",{key:n,style:Dc({},t.labels,{color:o})},n)})}createMarkup(e){return void 0===e?{__html:""}:{__html:""+e}}newSpan(e,t,n){let r=this.colors,a=t.type,o=t.string,i="";switch(a){case"string":case"number":case"primitive":case"error":i=r[t.type];break;case"key":i=" "===o?r.keys_whiteSpace:r.keys;break;case"symbol":i=":"===o?r.colon:r.default;break;default:i=r.default}return o.length!==o.replace(/</g,"").replace(/>/g,"").length&&(o="<xmp style=display:inline;>"+o+"</xmp>"),'<span type="'+a+'" value="'+o+'" depth="'+n+'" style="color:'+i+'">'+o+"</span>"}getCursorPosition(e){let t,n=window.getSelection(),r=-1,a=0;if(n.focusNode&&(e=>{for(;null!==e;){if(e===this.refContent)return!0;e=e.parentNode}return!1})(n.focusNode))for(t=n.focusNode,r=n.focusOffset;t&&t!==this.refContent;)if(t.previousSibling)t=t.previousSibling,e&&"BR"===t.nodeName&&a++,r+=t.textContent.length;else if(t=t.parentNode,null===t)break;return r+a}setCursorPosition(e){if([!1,null,void 0].indexOf(e)>-1)return;const t=(e,n,r)=>{if(r||((r=document.createRange()).selectNode(e),r.setStart(e,0)),0===n.count)r.setEnd(e,n.count);else if(e&&n.count>0)if(e.nodeType===Node.TEXT_NODE)e.textContent.length<n.count?n.count-=e.textContent.length:(r.setEnd(e,n.count),n.count=0);else for(var a=0;a<e.childNodes.length&&(r=t(e.childNodes[a],n,r),0!==n.count);a++);return r};e>0?(e=>{if(e<0)return;let n=window.getSelection(),r=t(this.refContent,{count:e});r&&(r.collapse(!1),n.removeAllRanges(),n.addRange(r))})(e):this.refContent.focus()}update(e=0,t=!0){const n=this.refContent,r=this.tokenize(n);"onChange"in this.props&&this.props.onChange({plainText:r.indented,markupText:r.markup,json:r.json,jsObject:r.jsObject,lines:r.lines,error:r.error});let a=this.getCursorPosition(r.error)+e;this.setState({plainText:r.indented,markupText:r.markup,json:r.json,jsObject:r.jsObject,lines:r.lines,error:r.error}),this.updateTime=!1,t&&this.setCursorPosition(a)}scheduledUpdate(){if("onKeyPressUpdate"in this.props&&!1===this.props.onKeyPressUpdate)return;const{updateTime:e}=this;!1!==e&&(e>(new Date).getTime()||this.update())}setUpdateTime(){"onKeyPressUpdate"in this.props&&!1===this.props.onKeyPressUpdate||(this.updateTime=(new Date).getTime()+this.waitAfterKeyPress)}stopEvent(e){e&&(e.preventDefault(),e.stopPropagation())}onKeyPress(e){const t=e.ctrlKey||e.metaKey;this.props.viewOnly&&!t&&this.stopEvent(e),t||this.setUpdateTime()}onKeyDown(e){const t=!!this.props.viewOnly,n=e.ctrlKey||e.metaKey;switch(e.key){case"Tab":if(this.stopEvent(e),t)break;document.execCommand("insertText",!1," "),this.setUpdateTime();break;case"Backspace":case"Delete":t&&this.stopEvent(e),this.setUpdateTime();break;case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":this.setUpdateTime();break;case"a":case"c":t&&!n&&this.stopEvent(e);break;default:t&&this.stopEvent(e)}}onPaste(e){if(this.props.viewOnly)this.stopEvent(e);else{e.preventDefault();var t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)}this.update()}onClick(){!("viewOnly"in this.props)||this.props.viewOnly}onBlur(){if("viewOnly"in this.props&&this.props.viewOnly)return;const e=this.refContent,t=this.tokenize(e);"onBlur"in this.props&&this.props.onBlur({plainText:t.indented,markupText:t.markup,json:t.json,jsObject:t.jsObject,lines:t.lines,error:t.error})}onScroll(e){this.refLabels.scrollTop=e.target.scrollTop}componentDidUpdate(){this.updateInternalProps(),this.showPlaceholder()}componentDidMount(){this.showPlaceholder()}componentWillUnmount(){this.timer&&clearInterval(this.timer)}showPlaceholder(){if(!("placeholder"in this.props))return;const{placeholder:e}=this.props;if([void 0,null].indexOf(e)>-1)return;const{prevPlaceholder:t,jsObject:n}=this.state,{resetConfiguration:r}=this,a=Object(Oc.getType)(e);-1===["object","array"].indexOf(a)&&xc.throwError("showPlaceholder","placeholder","either an object or an array");let o=!Object(Oc.identical)(e,t);if(o||r&&void 0!==n&&(o=!Object(Oc.identical)(e,n)),!o)return;const i=this.tokenize(e);this.setState({prevPlaceholder:e,plainText:i.indentation,markupText:i.markup,lines:i.lines,error:i.error})}tokenize(e){if("object"!=typeof e)return console.error("tokenize() expects object type properties only. Got '"+typeof e+"' type instead.");const t=this.props.locale||Pc,n=this.newSpan;if("nodeType"in e){const v=e.cloneNode(!0);if(!v.hasChildNodes())return"";const w=v.childNodes;let M={tokens_unknown:[],tokens_proto:[],tokens_split:[],tokens_fallback:[],tokens_normalize:[],tokens_merge:[],tokens_plainText:"",indented:"",json:"",jsObject:void 0,markup:""};for(var r=0;r<w.length;r++){let e=w[r],t={};switch(e.nodeName){case"SPAN":t={string:e.textContent,type:e.attributes.type.textContent},M.tokens_unknown.push(t);break;case"DIV":M.tokens_unknown.push({string:e.textContent,type:"unknown"});break;case"BR":""===e.textContent&&M.tokens_unknown.push({string:"\n",type:"unknown"});break;case"#text":M.tokens_unknown.push({string:e.wholeText,type:"unknown"});break;case"FONT":M.tokens_unknown.push({string:e.textContent,type:"unknown"});break;default:console.error("Unrecognized node:",{child:e})}}function a(e,t=""){let n={active:!1,string:"",number:"",symbol:"",space:"",delimiter:"",quarks:[]};function r(e,r){switch(r){case"symbol":case"delimiter":n.active&&n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=r,n[n.active]=e;break;default:r!==n.active||[n.string,e].indexOf("\n")>-1?(n.active&&n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=r,n[n.active]=e):n[r]+=e}}for(var a=0;a<e.length;a++){const t=e.charAt(a);switch(t){case'"':case"'":r(t,"delimiter");break;case" ":case" ":r(t,"space");break;case"{":case"}":case"[":case"]":case":":case",":r(t,"symbol");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":"string"===n.active?r(t,"string"):r(t,"number");break;case"-":if(a<e.length-1&&"0123456789".indexOf(e.charAt(a+1))>-1){r(t,"number");break}case".":if(a<e.length-1&&a>0&&"0123456789".indexOf(e.charAt(a+1))>-1&&"0123456789".indexOf(e.charAt(a-1))>-1){r(t,"number");break}default:r(t,"string")}}return n.active&&(n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=!1),n.quarks}for(r=0;r<M.tokens_unknown.length;r++){let e=M.tokens_unknown[r];M.tokens_proto=M.tokens_proto.concat(a(e.string,"proto"))}function o(e,t){let n="",r="",a=!1;switch(t){case"primitive":if(-1===["true","false","null","undefined"].indexOf(e))return!1;break;case"string":if(e.length<2)return!1;if(n=e.charAt(0),r=e.charAt(e.length-1),a="'\"".indexOf(n),-1===a)return!1;if(n!==r)return!1;for(var o=0;o<e.length;o++)if(o>0&&o<e.length-1&&e.charAt(o)==="'\""[a]&&"\\"!==e.charAt(o-1))return!1;break;case"key":if(0===e.length)return!1;if(n=e.charAt(0),r=e.charAt(e.length-1),a="'\"".indexOf(n),a>-1){if(1===e.length)return!1;if(n!==r)return!1;for(o=0;o<e.length;o++)if(o>0&&o<e.length-1&&e.charAt(o)==="'\""[a]&&"\\"!==e.charAt(o-1))return!1}else{const t="'\"`.,:;{}[]&<>=~*%\\|/-+!?@^  ";for(o=0;o<t.length;o++){const n=t.charAt(o);if(e.indexOf(n)>-1)return!1}}break;case"number":for(o=0;o<e.length;o++)if(-1==="0123456789".indexOf(e.charAt(o)))if(0===o){if("-"!==e.charAt(0))return!1}else if("."!==e.charAt(o))return!1;break;case"symbol":if(e.length>1)return!1;if(-1==="{[:]},".indexOf(e))return!1;break;case"colon":if(e.length>1)return!1;if(":"!==e)return!1;break;default:return!0}return!0}for(r=0;r<M.tokens_proto.length;r++){let e=M.tokens_proto[r];-1===e.type.indexOf("proto")?o(e.string,e.type)?M.tokens_split.push(e):M.tokens_split=M.tokens_split.concat(a(e.string,"split")):M.tokens_split.push(e)}for(r=0;r<M.tokens_split.length;r++){let e=M.tokens_split[r],t=e.type,n=e.string,a=n.length,o=[];t.indexOf("-")>-1&&(t=t.slice(t.indexOf("-")+1),"string"!==t&&o.push("string"),o.push("key"),o.push("error"));let i={string:n,length:a,type:t,fallback:o};M.tokens_fallback.push(i)}function i(){const e=M.tokens_normalize.length-1;if(e<1)return!1;for(var t=e;t>=0;t--){const e=M.tokens_normalize[t];switch(e.type){case"space":case"linebreak":break;default:return e}}return!1}let k={brackets:[],stringOpen:!1,isValue:!1};for(r=0;r<M.tokens_fallback.length;r++){let e=M.tokens_fallback[r];const t=e.type,n=e.string;let a={type:t,string:n};switch(t){case"symbol":case"colon":if(k.stringOpen){k.isValue?a.type="string":a.type="key";break}switch(n){case"[":case"{":k.brackets.push(n),k.isValue="["===k.brackets[k.brackets.length-1];break;case"]":case"}":k.brackets.pop(),k.isValue="["===k.brackets[k.brackets.length-1];break;case",":if("colon"===i().type)break;k.isValue="["===k.brackets[k.brackets.length-1];break;case":":a.type="colon",k.isValue=!0}break;case"delimiter":if(k.isValue?a.type="string":a.type="key",!k.stringOpen){k.stringOpen=n;break}if(r>0){const e=M.tokens_fallback[r-1],t=e.string,n=e.type,a=t.charAt(t.length-1);if("string"===n&&"\\"===a)break}if(k.stringOpen===n){k.stringOpen=!1;break}break;case"primitive":case"string":if(["false","true","null","undefined"].indexOf(n)>-1){const e=M.tokens_normalize.length-1;if(e>=0){if("string"!==M.tokens_normalize[e].type){a.type="primitive";break}a.type="string";break}a.type="primitive";break}if("\n"===n&&!k.stringOpen){a.type="linebreak";break}k.isValue?a.type="string":a.type="key";break;case"space":case"number":k.stringOpen&&(k.isValue?a.type="string":a.type="key")}M.tokens_normalize.push(a)}for(r=0;r<M.tokens_normalize.length;r++){const e=M.tokens_normalize[r];let t={string:e.string,type:e.type,tokens:[r]};if(-1===["symbol","colon"].indexOf(e.type)&&r+1<M.tokens_normalize.length){let n=0;for(var s=r+1;s<M.tokens_normalize.length;s++){const r=M.tokens_normalize[s];if(e.type!==r.type)break;t.string+=r.string,t.tokens.push(s),n++}r+=n}M.tokens_merge.push(t)}const L="'\"",Y="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$";var l=!1,u=M.tokens_merge.length>0?1:0;function c(e,t,n=0){l={token:e,line:u,reason:t},M.tokens_merge[e+n].type="error"}function d(e,t){if(void 0===e&&console.error("tokenID argument must be an integer."),void 0===t&&console.error("options argument must be an array."),e===M.tokens_merge.length-1)return!1;for(var n=e+1;n<M.tokens_merge.length;n++){const e=M.tokens_merge[n];switch(e.type){case"space":case"linebreak":break;case"symbol":case"colon":return t.indexOf(e.string)>-1&&n;default:return!1}}return!1}function p(e,t){if(void 0===e&&console.error("tokenID argument must be an integer."),void 0===t&&console.error("options argument must be an array."),0===e)return!1;for(var n=e-1;n>=0;n--){const e=M.tokens_merge[n];switch(e.type){case"space":case"linebreak":break;case"symbol":case"colon":return t.indexOf(e.string)>-1;default:return!1}}return!1}function m(e){if(void 0===e&&console.error("tokenID argument must be an integer."),0===e)return!1;for(var t=e-1;t>=0;t--){const e=M.tokens_merge[t];switch(e.type){case"space":case"linebreak":break;default:return e.type}}return!1}k={brackets:[],stringOpen:!1,isValue:!1};let T=[];for(r=0;r<M.tokens_merge.length&&!l;r++){let e=M.tokens_merge[r],n=e.string,a=e.type,o=!1;switch(a){case"space":break;case"linebreak":u++;break;case"symbol":switch(n){case"{":case"[":if(o=p(r,["}","]"]),o){c(r,Ec(t.invalidToken.tokenSequence.prohibited,{firstToken:M.tokens_merge[o].string,secondToken:n}));break}if("["===n&&r>0&&!p(r,[":","[",","])){c(r,Ec(t.invalidToken.tokenSequence.permitted,{firstToken:"[",secondToken:[":","[",","]}));break}if("{"===n&&p(r,["{"])){c(r,Ec(t.invalidToken.double,{token:"{"}));break}k.brackets.push(n),k.isValue="["===k.brackets[k.brackets.length-1],T.push({i:r,line:u,string:n});break;case"}":case"]":if("}"===n&&"{"!==k.brackets[k.brackets.length-1]){c(r,Ec(t.brace.curly.missingOpen));break}if("}"===n&&p(r,[","])){c(r,Ec(t.invalidToken.tokenSequence.prohibited,{firstToken:",",secondToken:"}"}));break}if("]"===n&&"["!==k.brackets[k.brackets.length-1]){c(r,Ec(t.brace.square.missingOpen));break}if("]"===n&&p(r,[":"])){c(r,Ec(t.invalidToken.tokenSequence.prohibited,{firstToken:":",secondToken:"]"}));break}k.brackets.pop(),k.isValue="["===k.brackets[k.brackets.length-1],T.push({i:r,line:u,string:n});break;case",":if(o=p(r,["{"]),o){if(d(r,["}"])){c(r,Ec(t.brace.curly.cannotWrap,{token:","}));break}c(r,Ec(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}if(d(r,["}",",","]"])){c(r,Ec(t.noTrailingOrLeadingComma));break}switch(o=m(r),o){case"key":case"colon":c(r,Ec(t.invalidToken.termSequence.prohibited,{firstTerm:"key"===o?t.types.key:t.symbols.colon,secondTerm:t.symbols.comma}));break;case"symbol":if(p(r,["{"])){c(r,Ec(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}}k.isValue="["===k.brackets[k.brackets.length-1]}M.json+=n;break;case"colon":if(o=p(r,["["]),o&&d(r,["]"])){c(r,Ec(t.brace.square.cannotWrap,{token:":"}));break}if(o){c(r,Ec(t.invalidToken.tokenSequence.prohibited,{firstToken:"[",secondToken:":"}));break}if("key"!==m(r)){c(r,Ec(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.key}));break}if(d(r,["}","]"])){c(r,Ec(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.value}));break}k.isValue=!0,M.json+=n;break;case"key":case"string":let e=n.charAt(0),i=n.charAt(n.length-1);L.indexOf(e);if(-1===L.indexOf(e)&&-1!==L.indexOf(i)){c(r,Ec(t.string.missingOpen,{quote:e}));break}if(-1===L.indexOf(i)&&-1!==L.indexOf(e)){c(r,Ec(t.string.missingClose,{quote:e}));break}if(L.indexOf(e)>-1&&e!==i){c(r,Ec(t.string.missingClose,{quote:e}));break}if("string"===a&&-1===L.indexOf(e)&&-1===L.indexOf(i)){c(r,Ec(t.string.mustBeWrappedByQuotes));break}if("key"===a&&d(r,["}","]"])&&c(r,Ec(t.invalidToken.termSequence.permitted,{firstTerm:t.types.key,secondTerm:t.symbols.colon})),-1===L.indexOf(e)&&-1===L.indexOf(i))for(var h=0;h<n.length&&!l;h++){const e=n.charAt(h);if(-1===Y.indexOf(e)){c(r,Ec(t.string.nonAlphanumeric,{token:e}));break}}if("'"===e?n='"'+n.slice(1,-1)+'"':'"'!==e&&(n='"'+n+'"'),"key"===a&&"key"===m(r)){if(r>0&&!isNaN(M.tokens_merge[r-1])){M.tokens_merge[r-1]+=M.tokens_merge[r],c(r,Ec(t.key.numberAndLetterMissingQuotes));break}c(r,Ec(t.key.spaceMissingQuotes));break}if("key"===a&&!p(r,["{",","])){c(r,Ec(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["{",","]}));break}if("string"===a&&!p(r,["[",":",","])){c(r,Ec(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["[",":",","]}));break}if("key"===a&&k.isValue){c(r,Ec(t.string.unexpectedKey));break}if("string"===a&&!k.isValue){c(r,Ec(t.key.unexpectedString));break}M.json+=n;break;case"number":case"primitive":if(p(r,["{"]))M.tokens_merge[r].type="key",a=M.tokens_merge[r].type,n='"'+n+'"';else if("key"===m(r))M.tokens_merge[r].type="key",a=M.tokens_merge[r].type;else if(!p(r,["[",":",","])){c(r,Ec(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["[",":",","]}));break}"key"!==a&&(k.isValue||(M.tokens_merge[r].type="key",a=M.tokens_merge[r].type,n='"'+n+'"')),"primitive"===a&&"undefined"===n&&c(r,Ec(t.invalidToken.useInstead,{badToken:"undefined",goodToken:"null"})),M.json+=n}}let D="";for(r=0;r<M.json.length;r++){let e=M.json.charAt(r),t="";r+1<M.json.length&&(t=M.json.charAt(r+1),"\\"===e&&"'"===t)?(D+=t,r++):D+=e}if(M.json=D,!l){const e=Math.ceil(T.length/2);let n=0,r=!1;function f(e){T.splice(e+1,1),T.splice(e,1),r||(r=!0)}for(;T.length>0;){r=!1;for(var _=0;_<T.length-1;_++){const e=T[_].string+T[_+1].string;["[]","{}"].indexOf(e)>-1&&f(_)}if(n++,!r)break;if(n>=e)break}if(T.length>0){const e=T[0].string,n=T[0].i,r="["===e?"]":"}";u=T[0].line,c(n,Ec(t.brace["]"===r?"square":"curly"].missingClose))}}if(!l&&-1===[void 0,""].indexOf(M.json))try{M.jsObject=JSON.parse(M.json)}catch(e){const n=e.message,r=n.indexOf("position");if(-1===r)throw new Error("Error parsing failed");const a=n.substring(r+9,n.length),o=parseInt(a);let i=0,s=0,d=!1,p=1,m=!1;for(;i<o&&!m&&(d=M.tokens_merge[s],"linebreak"===d.type&&p++,-1===["space","linebreak"].indexOf(d.type)&&(i+=d.string.length),!(i>=o));)s++,M.tokens_merge[s+1]||(m=!0);u=p;let h=0;for(let e=0;e<d.string.length;e++){const n=d.string.charAt(e);"\\"===n?h=h>0?h+1:1:(h%2==0&&0!==h||-1==="'\"bfnrt".indexOf(n)&&c(s,Ec(t.invalidToken.unexpected,{token:"\\"})),h=0)}l||c(s,Ec(t.invalidToken.unexpected,{token:d.string}))}let S=1,O=0;function y(e=!1){return function(e=!1){return S++,O>0||e?"<br>":""}(e)+function(){for(var e=[],t=0;t<2*O;t++)e.push("&nbsp;");return e.join("")}()}if(!l)for(r=0;r<M.tokens_merge.length;r++){const e=M.tokens_merge[r],t=e.string;switch(e.type){case"space":case"linebreak":break;case"string":case"number":case"primitive":case"error":M.markup+=(p(r,[",","["])?y():"")+n(r,e,O);break;case"key":M.markup+=y()+n(r,e,O);break;case"colon":M.markup+=n(r,e,O)+"&nbsp;";break;case"symbol":switch(t){case"[":case"{":M.markup+=(p(r,[":"])?"":y())+n(r,e,O),O++;break;case"]":case"}":O--;const t=r===M.tokens_merge.length-1,a=r>0?["[","{"].indexOf(M.tokens_merge[r-1].string)>-1?"":y(t):"";M.markup+=a+n(r,e,O);break;case",":M.markup+=n(r,e,O)}}}if(l){let e=1;function b(e){let t=0;for(var n=0;n<e.length;n++)["\n","\r"].indexOf(e[n])>-1&&t++;return t}S=1;for(r=0;r<M.tokens_merge.length;r++){const t=M.tokens_merge[r],a=t.type,o=t.string;"linebreak"===a&&S++,M.markup+=n(r,t,O),e+=b(o)}S++,e++,S<e&&(S=e)}for(r=0;r<M.tokens_merge.length;r++){let e=M.tokens_merge[r];M.indented+=e.string,-1===["space","linebreak"].indexOf(e.type)&&(M.tokens_plainText+=e.string)}if(l){"modifyErrorText"in this.props&&((g=this.props.modifyErrorText)&&"[object Function]"==={}.toString.call(g)&&(l.reason=this.props.modifyErrorText(l.reason)))}return{tokens:M.tokens_merge,noSpaces:M.tokens_plainText,indented:M.indented,json:M.json,jsObject:M.jsObject,markup:M.markup,lines:S,error:l}}var g;if(!("nodeType"in e)){let t={inputText:JSON.stringify(e),position:0,currentChar:"",tokenPrimary:"",tokenSecondary:"",brackets:[],isValue:!1,stringOpen:!1,stringStart:0,tokens:[]};function v(){return"\\"===t.currentChar}function w(){if(-1==="'\"".indexOf(t.currentChar))return!1;if(!t.stringOpen)return k(),t.stringStart=t.position,t.stringOpen=t.currentChar,!0;if(t.stringOpen===t.currentChar){k();return L(t.inputText.substring(t.stringStart,t.position+1)),t.stringOpen=!1,!0}return!1}function M(){if(-1===":,{}[]".indexOf(t.currentChar))return!1;if(t.stringOpen)return!1;switch(k(),L(t.currentChar),t.currentChar){case":":return t.isValue=!0,!0;case"{":case"[":t.brackets.push(t.currentChar);break;case"}":case"]":t.brackets.pop()}return":"!==t.currentChar&&(t.isValue="["===t.brackets[t.brackets.length-1]),!0}function k(){return 0!==t.tokenSecondary.length&&(t.tokens.push(t.tokenSecondary),t.tokenSecondary="",!0)}function L(e){return 0!==e.length&&(t.tokens.push(e),!0)}for(r=0;r<t.inputText.length;r++){t.position=r,t.currentChar=t.inputText.charAt(t.position);const e=M(),n=w(),a=v();e||n||a||t.stringOpen||(t.tokenSecondary+=t.currentChar)}let a={brackets:[],isValue:!1,tokens:[]};a.tokens=t.tokens.map(e=>{let t="",n="",r="";switch(e){case",":t="symbol",n=e,r=e,a.isValue="["===a.brackets[a.brackets.length-1];break;case":":t="symbol",n=e,r=e,a.isValue=!0;break;case"{":case"[":t="symbol",n=e,r=e,a.brackets.push(e),a.isValue="["===a.brackets[a.brackets.length-1];break;case"}":case"]":t="symbol",n=e,r=e,a.brackets.pop(),a.isValue="["===a.brackets[a.brackets.length-1];break;case"undefined":t="primitive",n=e,r=void 0;break;case"null":t="primitive",n=e,r=null;break;case"false":t="primitive",n=e,r=!1;break;case"true":t="primitive",n=e,r=!0;break;default:const i=e.charAt(0);if("'\"".indexOf(i)>-1){if(t=a.isValue?"string":"key","key"===t&&(n=function(e){if(0===e.length)return e;if(['""',"''"].indexOf(e)>-1)return"''";let t=!1;for(var n=0;n<2;n++)if([e.charAt(0),e.charAt(e.length-1)].indexOf(['"',"'"][n])>-1){t=!0;break}t&&e.length>=2&&(e=e.slice(1,-1));const r=e.replace(/\w/g,""),a=(e.replace(/\W+/g,""),((e,t)=>{let n=!1;for(var r=0;r<t.length&&(0!==r||!isNaN(t.charAt(r)));r++)if(isNaN(t.charAt(r))){n=!0;break}return!(e.length>0||n)})(r,e));if((e=>{for(var t=0;t<e.length;t++)if(["'",'"'].indexOf(e.charAt(t))>-1)return!0;return!1})(r)){let t="";const n=e.split("");for(var o=0;o<n.length;o++){let e=n[o];["'",'"'].indexOf(e)>-1&&(e="\\"+e),t+=e}e=t}return a?e:"'"+e+"'"}(e)),"string"===t){n="";const t=e.slice(1,-1).split("");for(var o=0;o<t.length;o++){let e=t[o];"'\"".indexOf(e)>-1&&(e="\\"+e),n+=e}n="'"+n+"'"}r=n;break}if(!isNaN(e)){t="number",n=e,r=Number(e);break}if(e.length>0&&!a.isValue){t="key",n=e,n.indexOf(" ")>-1&&(n="'"+n+"'"),r=n;break}}return{type:t,string:n,value:r,depth:a.brackets.length}});let o="";for(r=0;r<a.tokens.length;r++){o+=a.tokens[r].string}function Y(e){for(var t=[],n=0;n<2*e;n++)t.push(" ");return(e>0?"\n":"")+t.join("")}let i="";for(r=0;r<a.tokens.length;r++){let e=a.tokens[r];switch(e.string){case"[":case"{":const t=r<a.tokens.length-1-1?a.tokens[r+1]:"";-1==="}]".indexOf(t.string)?i+=e.string+Y(e.depth):i+=e.string;break;case"]":case"}":const n=r>0?a.tokens[r-1]:"";-1==="[{".indexOf(n.string)?i+=Y(e.depth)+e.string:i+=e.string;break;case":":i+=e.string+" ";break;case",":i+=e.string+Y(e.depth);break;default:i+=e.string}}let s=1;function T(e){var t=[];e>0&&s++;for(var n=0;n<2*e;n++)t.push("&nbsp;");return(e>0?"<br>":"")+t.join("")}let l="";const u=a.tokens.length-1;for(r=0;r<a.tokens.length;r++){let e=a.tokens[r],t=n(r,e,e.depth);switch(e.string){case"{":case"[":const n=r<a.tokens.length-1-1?a.tokens[r+1]:"";-1==="}]".indexOf(n.string)?l+=t+T(e.depth):l+=t;break;case"}":case"]":const o=r>0?a.tokens[r-1]:"";-1==="[{".indexOf(o.string)?l+=T(e.depth)+(u===r?"<br>":"")+t:l+=t;break;case":":l+=t+" ";break;case",":l+=t+T(e.depth);break;default:l+=t}}return s+=2,{tokens:a.tokens,noSpaces:o,indented:i,json:JSON.stringify(e),jsObject:e,markup:l,lines:s}}}}var Hc=Cc,zc=n(133),Ac=n.n(zc);function Rc(e){return(Rc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wc(e,t){return(Wc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ic(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Uc(e);if(t){var a=Uc(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Bc(this,n)}}function Bc(e,t){if(t&&("object"===Rc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Jc(e)}function Jc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Uc(e){return(Uc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gc=wp.i18n.__,Vc=wp.element.Component,qc=wp.components,$c=qc.ExternalLink,Kc=qc.PanelBody,Zc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wc(e,t)}(o,e);var t,n,r,a=Ic(o);function o(){var e;return Nc(this,o),(e=a.apply(this,arguments)).isValidJSON=e.isValidJSON.bind(Jc(e)),e}return t=o,(n=[{key:"isValidJSON",value:function(e){try{JSON.parse(e)}catch(e){return!1}return!0}},{key:"render",value:function(){var e,t=this,n=this.props.chart["visualizer-settings"];return e=0<=["gauge","tabular","timeline"].indexOf(this.props.chart["visualizer-chart-type"])?this.props.chart["visualizer-chart-type"]:"".concat(this.props.chart["visualizer-chart-type"],"chart"),wp.element.createElement(Kc,{title:Gc("Manual Configuration"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement("p",null,Gc("Configure the graph by providing configuration variables right from the Google Visualization API.")),wp.element.createElement("p",null,wp.element.createElement($c,{href:"https://developers.google.com/chart/interactive/docs/gallery/".concat(e,"#configuration-options")},Gc("Google Visualization API"))),wp.element.createElement(Hc,{locale:Ac.a,theme:"light_mitsuketa_tribute",placeholder:Z(n.manual)?JSON.parse(n.manual):{},width:"100%",height:"250px",style:{errorMessage:{height:"100%",fontSize:"10px"},container:{border:"1px solid #ddd",boxShadow:"inset 0 1px 2px rgba(0,0,0,.07)"},labelColumn:{background:"#F5F5F5",width:"auto",padding:"5px 10px 5px 10px"}},onChange:function(e){!1===e.error&&(n.manual=e.json,t.props.edit(n))}}))}}])&&Fc(t.prototype,n),r&&Fc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Vc);function Qc(e){return(Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ed(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function td(e,t){return(td=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function nd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ad(e);if(t){var a=ad(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return rd(this,n)}}function rd(e,t){if(t&&("object"===Qc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ad(e){return(ad=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var od=wp.element,id=od.Component,sd=od.Fragment,ld=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&td(e,t)}(o,e);var t,n,r,a=nd(o);function o(){return Xc(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e=this.props.chart["visualizer-chart-type"],t=this.props.chart["visualizer-chart-library"];return wp.element.createElement(sd,null,wp.element.createElement(Ir,{chart:this.props.chart,attributes:this.props.attributes,edit:this.props.edit}),wp.element.createElement(Sr,{chart:this.props.chart,edit:this.props.edit}),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(e)&&wp.element.createElement(sa,{chart:this.props.chart,edit:this.props.edit}),-1>=["tabular","dataTable","gauge","geo","pie","timeline"].indexOf(e)&&wp.element.createElement(Ta,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(sd,null,wp.element.createElement(Ua,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(io,{chart:this.props.chart,edit:this.props.edit})),0<=["area","scatter","line"].indexOf(e)&&wp.element.createElement(ko,{chart:this.props.chart,edit:this.props.edit}),0<=["bar","column"].indexOf(e)&&wp.element.createElement(Ao,{chart:this.props.chart,edit:this.props.edit}),0<=["candlestick"].indexOf(e)&&wp.element.createElement(Xo,{chart:this.props.chart,edit:this.props.edit}),0<=["geo"].indexOf(e)&&wp.element.createElement(sd,null,wp.element.createElement(hi,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Oi,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Ui,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(os,{chart:this.props.chart,edit:this.props.edit})),0<=["gauge"].indexOf(e)&&wp.element.createElement(ks,{chart:this.props.chart,edit:this.props.edit}),0<=["timeline"].indexOf(e)&&wp.element.createElement(Ns,{chart:this.props.chart,edit:this.props.edit}),0<=["tabular","dataTable"].indexOf(e)&&wp.element.createElement(sd,null,wp.element.createElement(nl,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(gl,{chart:this.props.chart,edit:this.props.edit})),0<=["combo"].indexOf(e)&&wp.element.createElement(El,{chart:this.props.chart,edit:this.props.edit}),-1>=["timeline","bubble","gauge","geo","pie","tabular","dataTable"].indexOf(e)&&wp.element.createElement(Zl,{chart:this.props.chart,edit:this.props.edit}),"tabular"===e&&"GoogleCharts"===t&&wp.element.createElement(Zl,{chart:this.props.chart,edit:this.props.edit}),0<=["bubble"].indexOf(e)&&wp.element.createElement(Su,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(pu,{chart:this.props.chart,edit:this.props.edit}),"DataTable"===t&&wp.element.createElement(Ju,{chart:this.props.chart,edit:this.props.edit}),"DataTable"!==t&&wp.element.createElement(uc,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Yc,{chart:this.props.chart,edit:this.props.edit}),"DataTable"!==t&&wp.element.createElement(Zc,{chart:this.props.chart,edit:this.props.edit}))}}])&&ed(t.prototype,n),r&&ed(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(id);function ud(e){return(ud="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cd(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */cd=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new k(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return Y()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=v(i,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function d(){}function p(){}function m(){}var h={};s(h,a,(function(){return this}));var f=Object.getPrototypeOf,_=f&&f(f(L([])));_&&_!==t&&n.call(_,a)&&(h=_);var y=m.prototype=d.prototype=Object.create(h);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,s){var l=u(e[a],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==ud(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function v(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,v(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function L(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:Y}}function Y(){return{value:void 0,done:!0}}return p.prototype=m,s(y,"constructor",m),s(m,"constructor",p),p.displayName=s(m,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(g.prototype),s(g.prototype,o,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new g(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),s(y,i,"Generator"),s(y,a,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=L,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(M),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function dd(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function pd(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){dd(o,r,a,i,s,"next",e)}function s(e){dd(o,r,a,i,s,"throw",e)}i(void 0)}))}}function md(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fd(e,t){return(fd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gd(e);if(t){var a=gd(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return yd(this,n)}}function yd(e,t){if(t&&("object"===ud(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return bd(e)}function bd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gd(e){return(gd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vd=wp.i18n.__,wd=wp.apiFetch,Md=wp.element,kd=Md.Component,Ld=Md.Fragment,Yd=wp.components,Td=Yd.Button,Dd=Yd.PanelBody,Sd=Yd.SelectControl,Od=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fd(e,t)}(s,e);var t,n,r,a,o,i=_d(s);function s(){var e;return md(this,s),(e=i.apply(this,arguments)).getPermissionData=e.getPermissionData.bind(bd(e)),e.state={users:[],roles:[]},e}return t=s,(n=[{key:"componentDidMount",value:(o=pd(cd().mark((function e(){var t,n,r;return cd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("business"!==visualizerLocalize.isPro){e.next=14;break}if(void 0===(t=this.props.chart["visualizer-permissions"]).permissions){e.next=14;break}if(void 0===t.permissions.read||void 0===t.permissions.edit){e.next=14;break}if("users"!==t.permissions.read&&"users"!==t.permissions.edit){e.next=9;break}return e.next=7,wd({path:"/visualizer/v1/get-permission-data?type=users"});case 7:n=e.sent,this.setState({users:n});case 9:if("roles"!==t.permissions.read&&"roles"!==t.permissions.edit){e.next=14;break}return e.next=12,wd({path:"/visualizer/v1/get-permission-data?type=roles"});case 12:r=e.sent,this.setState({roles:r});case 14:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"getPermissionData",value:(a=pd(cd().mark((function e(t){var n,r;return cd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("business"!==visualizerLocalize.isPro){e.next=11;break}if("users"!==t||0!==this.state.users.length){e.next=6;break}return e.next=4,wd({path:"/visualizer/v1/get-permission-data?type=".concat(t)});case 4:n=e.sent,this.setState({users:n});case 6:if("roles"!==t||0!==this.state.roles.length){e.next=11;break}return e.next=9,wd({path:"/visualizer/v1/get-permission-data?type=".concat(t)});case 9:r=e.sent,this.setState({roles:r});case 11:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-permissions"];return wp.element.createElement(Ld,null,"business"===visualizerLocalize.isPro?wp.element.createElement(Dd,{title:vd("Who can see this chart?"),initialOpen:!1,className:"vz-permission-tab"},wp.element.createElement(Sd,{label:vd("Select who can view the chart on the front-end."),value:t.permissions.read,options:[{value:"all",label:"All Users"},{value:"users",label:"Select Users"},{value:"roles",label:"Select Roles"}],onChange:function(n){t.permissions.read=n,e.props.edit(t),"users"!==n&&"roles"!==n||e.getPermissionData(n)}}),("users"===t.permissions.read||"roles"===t.permissions.read)&&wp.element.createElement(Sd,{multiple:!0,value:t.permissions["read-specific"],options:"users"===t.permissions.read&&this.state.users||"roles"===t.permissions.read&&this.state.roles,onChange:function(n){t.permissions["read-specific"]=n,e.props.edit(t)}})):wp.element.createElement(Dd,{title:vd("Who can see this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,vd("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(Td,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},vd("Buy Now"))),"business"===visualizerLocalize.isPro?wp.element.createElement(Dd,{title:vd("Who can edit this chart?"),initialOpen:!1,className:"vz-permission-tab"},wp.element.createElement(Sd,{label:vd("Select who can edit the chart on the front-end."),value:t.permissions.edit,options:[{value:"all",label:"All Users"},{value:"users",label:"Select Users"},{value:"roles",label:"Select Roles"}],onChange:function(n){t.permissions.edit=n,e.props.edit(t),"users"!==n&&"roles"!==n||e.getPermissionData(n)}}),("users"===t.permissions.edit||"roles"===t.permissions.edit)&&wp.element.createElement(Sd,{multiple:!0,value:t.permissions["edit-specific"],options:"users"===t.permissions.edit&&this.state.users||"roles"===t.permissions.edit&&this.state.roles,onChange:function(n){t.permissions["edit-specific"]=n,e.props.edit(t)}})):wp.element.createElement(Dd,{title:vd("Who can edit this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,vd("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(Td,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},vd("Buy Now"))))}}])&&hd(t.prototype,n),r&&hd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(kd),jd=n(134),xd=n.n(jd),Ed=wp.components,Pd=Ed.Button,Cd=Ed.Dashicon,Hd=Ed.G,zd=Ed.Path,Ad=Ed.SVG;var Rd=function(e){var t=e.label,n=e.icon,r=e.className,a=e.isBack,o=e.onClick,i=xd()("components-panel__body","components-panel__body-button",r,{"visualizer-panel-back":a});return wp.element.createElement("div",{className:i},wp.element.createElement("h2",{className:"components-panel__body-title"},wp.element.createElement(Pd,{className:"components-panel__body-toggle",onClick:o},wp.element.createElement(Ad,{className:"components-panel__arrow",width:"24px",height:"24px",viewBox:"-12 -12 48 48",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement(Hd,null,wp.element.createElement(zd,{fill:"none",d:"M0,0h24v24H0V0z"})),wp.element.createElement(Hd,null,wp.element.createElement(zd,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"}))),n&&wp.element.createElement(Cd,{icon:n,className:"components-panel__icon"}),t)))},Nd=n(3),Fd=n.n(Nd);function Wd(e){return(Wd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Id(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jd(e,t){return(Jd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ud(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vd(e);if(t){var a=Vd(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Gd(this,n)}}function Gd(e,t){if(t&&("object"===Wd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Vd(e){return(Vd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qd=lodash.startCase,$d=wp.i18n.__,Kd=wp.element,Zd=Kd.Component,Qd=Kd.Fragment,Xd=(wp.blockEditor||wp.editor).InspectorControls,ep=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jd(e,t)}(o,e);var t,n,r,a=Ud(o);function o(){var e;return Id(this,o),(e=a.apply(this,arguments)).state={route:"home"},e}return t=o,(n=[{key:"render",value:function(){var e,t,n=this,r="undefined"!=typeof google?google.visualization.Version:"current",a=V(JSON.parse(JSON.stringify(this.props.chart)));return 0<=["gauge","tabular","timeline"].indexOf(this.props.chart["visualizer-chart-type"])?"DataTable"===a["visualizer-chart-library"]?e=a["visualizer-chart-type"]:("tabular"===(e=this.props.chart["visualizer-chart-type"])&&(e="table"),e=qd(e)):e="".concat(qd(this.props.chart["visualizer-chart-type"]),"Chart"),a["visualizer-data-exploded"]&&(t=$d("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement(Qd,null,"home"===this.state.route&&wp.element.createElement(Xd,null,wp.element.createElement(Ie,{chart:this.props.chart,readUploadedFile:this.props.readUploadedFile}),wp.element.createElement(xt,{id:this.props.id,chart:this.props.chart,editURL:this.props.editURL,isLoading:this.props.isLoading,uploadData:this.props.uploadData,editSchedule:this.props.editSchedule,editJSONSchedule:this.props.editJSONSchedule,editJSONURL:this.props.editJSONURL,editJSONHeaders:this.props.editJSONHeaders,editJSONRoot:this.props.editJSONRoot,editJSONPaging:this.props.editJSONPaging,JSONImportData:this.props.JSONImportData}),wp.element.createElement(Qt,{getChartData:this.props.getChartData,isLoading:this.props.isLoading}),wp.element.createElement(Cn,{chart:this.props.chart,editSchedule:this.props.editDatabaseSchedule,databaseImportData:this.props.databaseImportData}),wp.element.createElement(dr,{chart:this.props.chart,editChartData:this.props.editChartData}),wp.element.createElement(Rd,{label:$d("Advanced Options"),className:"visualizer-advanced-options",icon:"admin-tools",onClick:function(){return n.setState({route:"showAdvanced"})}}),wp.element.createElement(Rd,{label:$d("Chart Permissions"),icon:"admin-users",onClick:function(){return n.setState({route:"showPermissions"})}})),("showAdvanced"===this.state.route||"showPermissions"===this.state.route)&&wp.element.createElement(Xd,null,wp.element.createElement(Rd,{label:$d("Chart Settings"),onClick:function(){return n.setState({route:"home"})},isBack:!0}),"showAdvanced"===this.state.route&&wp.element.createElement(ld,{chart:this.props.chart,attributes:this.props.attributes,edit:this.props.editSettings}),"showPermissions"===this.state.route&&wp.element.createElement(Od,{chart:this.props.chart,edit:this.props.editPermissions})),wp.element.createElement("div",{className:"visualizer-settings__chart","data-chart-type":e},null!==this.props.chart&&"DataTable"===a["visualizer-chart-library"]?wp.element.createElement(I,{id:this.props.id,rows:a["visualizer-data"],columns:a["visualizer-series"],options:a["visualizer-settings"]}):(a["visualizer-data-exploded"],wp.element.createElement(S,{chartVersion:r,chartType:e,rows:a["visualizer-data"],columns:a["visualizer-series"],options:Z(this.props.chart["visualizer-settings"].manual)?Fd()($(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):$(this.props.chart["visualizer-settings"]),height:"500px",formatters:X(a)})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,t))))}}])&&Bd(t.prototype,n),r&&Bd(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Zd);function tp(e){return(tp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function np(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ap(e,t){return(ap=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function op(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sp(e);if(t){var a=sp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ip(this,n)}}function ip(e,t){if(t&&("object"===tp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function sp(e){return(sp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lp=lodash.startCase,up=wp.i18n.__,cp=wp.element,dp=cp.Component,pp=cp.Fragment,mp=wp.components,hp=mp.Button,fp=mp.Dashicon,_p=mp.Toolbar,yp=mp.Tooltip,bp=(wp.blockEditor||wp.editor).BlockControls,gp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ap(e,t)}(o,e);var t,n,r,a=op(o);function o(){return np(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"render",value:function(){var e,t,n="undefined"!=typeof google?google.visualization.Version:"current",r=V(JSON.parse(JSON.stringify(this.props.chart)));return 0<=["gauge","tabular","timeline"].indexOf(this.props.chart["visualizer-chart-type"])?"DataTable"===r["visualizer-chart-library"]?e=r["visualizer-chart-type"]:("tabular"===(e=this.props.chart["visualizer-chart-type"])&&(e="table"),e=lp(e)):e="".concat(lp(this.props.chart["visualizer-chart-type"]),"Chart"),r["visualizer-data-exploded"]&&(t=up("Annotations in this chart may not display here but they will display in the front end.")),this.props.chart["visualizer-series"]&&0<=["date","datetime","timeofday"].indexOf(this.props.chart["visualizer-series"][0].type)&&this.props.chart["visualizer-settings"]&&""==this.props.chart["visualizer-settings"].hAxis.format&&(this.props.chart["visualizer-settings"].hAxis.format="YYYY-MM-dd"),wp.element.createElement("div",{className:this.props.className},null!==this.props.chart&&wp.element.createElement(pp,null,wp.element.createElement(bp,{key:"toolbar-controls"},wp.element.createElement(_p,{className:"components-toolbar"},wp.element.createElement(yp,{text:up("Edit Chart")},wp.element.createElement(hp,{className:"components-icon-button components-toolbar__control edit-pie-chart",onClick:this.props.editChart},wp.element.createElement(fp,{icon:"edit"}))))),"DataTable"===r["visualizer-chart-library"]?wp.element.createElement(I,{id:this.props.id,rows:r["visualizer-data"],columns:r["visualizer-series"],options:r["visualizer-settings"]}):(r["visualizer-data-exploded"],wp.element.createElement(S,{chartVersion:n,chartType:e,rows:r["visualizer-data"],columns:r["visualizer-series"],options:Z(this.props.chart["visualizer-settings"].manual)?Fd()($(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):$(this.props.chart["visualizer-settings"]),height:"500px",formatters:X(r)})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,t))))}}])&&rp(t.prototype,n),r&&rp(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(dp);function vp(e){return(vp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mp(Object(n),!0).forEach((function(t){Lp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Lp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yp(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Yp=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new k(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw o;return Y()}for(n.method=a,n.arg=o;;){var i=n.delegate;if(i){var s=v(i,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,i),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function d(){}function p(){}function m(){}var h={};s(h,a,(function(){return this}));var f=Object.getPrototypeOf,_=f&&f(f(L([])));_&&_!==t&&n.call(_,a)&&(h=_);var y=m.prototype=d.prototype=Object.create(h);function b(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){var r;this._invoke=function(a,o){function i(){return new t((function(r,i){!function r(a,o,i,s){var l=u(e[a],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==vp(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}(a,o,r,i)}))}return r=r?r.then(i,i):i()}}function v(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,v(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function L(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:Y}}function Y(){return{value:void 0,done:!0}}return p.prototype=m,s(y,"constructor",m),s(m,"constructor",p),p.displayName=s(m,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,s(e,i,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(g.prototype),s(g.prototype,o,(function(){return this})),e.AsyncIterator=g,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new g(l(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(y),s(y,i,"Generator"),s(y,a,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=L,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(M),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;M(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function Tp(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function Dp(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function i(e){Tp(o,r,a,i,s,"next",e)}function s(e){Tp(o,r,a,i,s,"throw",e)}i(void 0)}))}}function Sp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Op(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jp(e,t){return(jp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Cp(e);if(t){var a=Cp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Ep(this,n)}}function Ep(e,t){if(t&&("object"===vp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Pp(e)}function Pp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cp(e){return(Cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hp=wp.i18n.__,zp=wp,Ap=zp.apiFetch,Rp=zp.apiRequest,Np=wp.element,Fp=Np.Component,Wp=Np.Fragment,Ip=wp.components,Bp=Ip.Button,Jp=Ip.ButtonGroup,Up=Ip.Dashicon,Gp=Ip.Placeholder,Vp=Ip.Notice,qp=Ip.Spinner,$p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jp(e,t)}(l,e);var t,n,r,a,o,i,s=xp(l);function l(){var e;return Sp(this,l),(e=s.apply(this,arguments)).getChart=e.getChart.bind(Pp(e)),e.editChart=e.editChart.bind(Pp(e)),e.editSettings=e.editSettings.bind(Pp(e)),e.editPermissions=e.editPermissions.bind(Pp(e)),e.readUploadedFile=e.readUploadedFile.bind(Pp(e)),e.editURL=e.editURL.bind(Pp(e)),e.editSchedule=e.editSchedule.bind(Pp(e)),e.editJSONSchedule=e.editJSONSchedule.bind(Pp(e)),e.editJSONURL=e.editJSONURL.bind(Pp(e)),e.editJSONHeaders=e.editJSONHeaders.bind(Pp(e)),e.editJSONRoot=e.editJSONRoot.bind(Pp(e)),e.editJSONPaging=e.editJSONPaging.bind(Pp(e)),e.JSONImportData=e.JSONImportData.bind(Pp(e)),e.editDatabaseSchedule=e.editDatabaseSchedule.bind(Pp(e)),e.databaseImportData=e.databaseImportData.bind(Pp(e)),e.uploadData=e.uploadData.bind(Pp(e)),e.getChartData=e.getChartData.bind(Pp(e)),e.editChartData=e.editChartData.bind(Pp(e)),e.updateChart=e.updateChart.bind(Pp(e)),e.state={route:e.props.attributes.route?e.props.attributes.route:"home",chart:null,isModified:!1,isLoading:!1,isScheduled:!1},e}return t=l,(n=[{key:"componentDidMount",value:(i=Dp(Yp().mark((function e(){var t;return Yp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.props.attributes.id){e.next=5;break}return e.next=3,Ap({path:"wp/v2/visualizer/".concat(this.props.attributes.id)}).catch((function(e){}));case 3:(t=e.sent)?this.setState({chart:t.chart_data}):this.setState({route:"error"});case 5:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getChart",value:(o=Dp(Yp().mark((function e(t){var n;return Yp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setState({isLoading:"getChart"});case 2:return e.next=4,Ap({path:"wp/v2/visualizer/".concat(t)});case 4:n=e.sent,this.setState({route:"chartSelect",chart:n.chart_data,isLoading:!0,isModified:!0}),this.props.setAttributes({id:t,route:"chartSelect",lazy:-1});case 7:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"editChart",value:function(){this.setState({route:"chartSelect"}),this.props.setAttributes({route:"chartSelect"})}},{key:"editSettings",value:function(e){var t=kp({},this.state.chart);t["visualizer-settings"]=e,this.setState({chart:t,isModified:!0})}},{key:"editPermissions",value:function(e){var t=kp({},this.state.chart);t["visualizer-permissions"]=e,this.setState({chart:t,isModified:!0})}},{key:"readUploadedFile",value:function(e){var t=this,n=e.current.files[0],r=new FileReader;r.onload=function(){var e=function(e,t){t=t||",";for(var n=new RegExp("(\\"+t+"|\\r?\\n|\\r|^)(?:'([^']*(?:''[^']*)*)'|([^'\\"+t+"\\r\\n]*))","gi"),r=[[]],a=null;a=n.exec(e);){var o=a[1];o.length&&o!==t&&r.push([]);var i=void 0;i=a[2]?a[2].replace(new RegExp("''","g"),"'"):a[3],r[r.length-1].push(i)}return r}(r.result);t.editChartData(e,"Visualizer_Source_Csv")},r.readAsText(n)}},{key:"editURL",value:function(e){var t=kp({},this.state.chart);t["visualizer-chart-url"]=e,this.setState({chart:t})}},{key:"editSchedule",value:function(e){var t=kp({},this.state.chart);t["visualizer-chart-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"editJSONSchedule",value:function(e){var t=kp({},this.state.chart);t["visualizer-json-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"editJSONURL",value:function(e){var t=kp({},this.state.chart);t["visualizer-json-url"]=e,this.setState({chart:t})}},{key:"editJSONHeaders",value:function(e){var t=kp({},this.state.chart);delete e.username,delete e.password,t["visualizer-json-headers"]=e,this.setState({chart:t})}},{key:"editJSONRoot",value:function(e){var t=kp({},this.state.chart);t["visualizer-json-root"]=e,this.setState({chart:t})}},{key:"editJSONPaging",value:function(e){var t=kp({},this.state.chart);t["visualizer-json-paging"]=e,this.setState({chart:t})}},{key:"JSONImportData",value:function(e,t,n){var r=kp({},this.state.chart);r["visualizer-source"]=e,r["visualizer-default-data"]=0,r["visualizer-series"]=t,r["visualizer-data"]=n,this.setState({chart:r,isModified:!0})}},{key:"editDatabaseSchedule",value:function(e){var t=kp({},this.state.chart);t["visualizer-db-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"databaseImportData",value:function(e,t,n,r){var a=kp({},this.state.chart);a["visualizer-source"]=t,a["visualizer-default-data"]=0,a["visualizer-series"]=n,a["visualizer-data"]=r,a["visualizer-db-query"]=e,this.setState({chart:a,isModified:!0})}},{key:"uploadData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setState({isLoading:"uploadData",isScheduled:t}),Rp({path:"/visualizer/v1/upload-data?url=".concat(this.state.chart["visualizer-chart-url"]),method:"POST"}).then((function(t){if(2<=Object.keys(t).length){var n=kp({},e.state.chart);n["visualizer-source"]="Visualizer_Source_Csv_Remote",n["visualizer-default-data"]=0,n["visualizer-series"]=t.series,n["visualizer-data"]=t.data;var r=n["visualizer-series"],a=n["visualizer-settings"],o=r,i="series";return"pie"===n["visualizer-chart-type"]&&(o=n["visualizer-data"],i="slices"),o.map((function(e,t){if("pie"===n["visualizer-chart-type"]||0!==t){var r="pie"!==n["visualizer-chart-type"]?t-1:t;void 0===a[i][r]&&(a[i][r]={},a[i][r].temp=1)}})),a[i]=a[i].filter((function(e,t){return t<("pie"!==n["visualizer-chart-type"]?o.length-1:o.length)})),n["visualizer-settings"]=a,e.setState({chart:n,isModified:!0,isLoading:!1}),t}e.setState({isLoading:!1})}),(function(t){return e.setState({isLoading:!1}),t}))}},{key:"getChartData",value:(a=Dp(Yp().mark((function e(t){var n,r;return Yp().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.setState({isLoading:"getChartData"});case 2:return e.next=4,Ap({path:"wp/v2/visualizer/".concat(t)});case 4:n=e.sent,(r=kp({},this.state.chart))["visualizer-source"]="Visualizer_Source_Csv",r["visualizer-default-data"]=0,r["visualizer-series"]=n.chart_data["visualizer-series"],r["visualizer-data"]=n.chart_data["visualizer-data"],this.setState({isLoading:!1,chart:r});case 11:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"editChartData",value:function(e,t){var n=kp({},this.state.chart),r=[],a=kp({},n["visualizer-settings"]),o=n["visualizer-chart-type"];e[0].map((function(t,n){r[n]={label:t,type:e[1][n]}})),e.splice(0,2);var i=r,s="series";switch(o){case"pie":i=e,s="slices",e.map((function(e,t){switch(r[1].type){case"number":e[1]=parseFloat(e[1])}}));break;case"tabular":e.map((function(e,t){r.map((function(t,n){switch(t.type){case"boolean":"string"==typeof e[n]&&(e[n]="true"===e[n])}}))}))}i.map((function(e,t){if("pie"===o||0!==t){var n="pie"!==o?t-1:t;Array.isArray(a[s])&&void 0===a[s][n]&&(a[s][n]={},a[s][n].temp=1)}})),Array.isArray(a[s])&&(a[s]=a[s].filter((function(e,t){return t<(-1>=["pie","tabular","dataTable"].indexOf(o)?i.length-1:i.length)}))),n["visualizer-source"]=t,n["visualizer-default-data"]=0,n["visualizer-data"]=e,n["visualizer-series"]=r,n["visualizer-settings"]=a,n["visualizer-chart-url"]="",this.setState({chart:n,isModified:!0,isScheduled:!1})}},{key:"updateChart",value:function(){var e=this;this.setState({isLoading:"updateChart"});var t=this.state.chart;!1===this.state.isScheduled&&(t["visualizer-chart-schedule"]="");var n="series";"pie"===t["visualizer-chart-type"]&&(n="slices"),-1>=["bubble","timeline"].indexOf(t["visualizer-chart-type"])&&Object.keys(t["visualizer-settings"][n]).map((function(e){void 0!==t["visualizer-settings"][n][e]&&void 0!==t["visualizer-settings"][n][e].temp&&delete t["visualizer-settings"][n][e].temp})),Rp({path:"/visualizer/v1/update-chart?id=".concat(this.props.attributes.id),method:"POST",data:t}).then((function(t){return e.setState({isLoading:!1,isModified:!1}),t}),(function(e){return e}))}},{key:"render",value:function(){var e=this;return"error"===this.state.route?wp.element.createElement(Vp,{status:"error",isDismissible:!1},wp.element.createElement(Up,{icon:"chart-pie"}),Hp("This chart is not available; it might have been deleted. Please delete this block and resubmit your chart.")):"renderChart"===this.state.route&&null!==this.state.chart?wp.element.createElement(gp,{id:this.props.attributes.id,chart:this.state.chart,className:this.props.className,editChart:this.editChart}):wp.element.createElement("div",{className:"visualizer-settings"},wp.element.createElement("div",{className:"visualizer-settings__title"},wp.element.createElement(Up,{icon:"chart-pie"}),Hp("Visualizer")),"home"===this.state.route&&wp.element.createElement("div",{className:"visualizer-settings__content"},wp.element.createElement("div",{className:"visualizer-settings__content-description"},Hp("Make a new chart or display an existing one?")),wp.element.createElement("a",{href:visualizerLocalize.adminPage,target:"_blank",className:"visualizer-settings__content-option"},wp.element.createElement("span",{className:"visualizer-settings__content-option-title"},Hp("Create a new chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement(Up,{icon:"arrow-right-alt2"}))),wp.element.createElement("div",{className:"visualizer-settings__content-option",onClick:function(){e.setState({route:"showCharts"}),e.props.setAttributes({route:"showCharts"})}},wp.element.createElement("span",{className:"visualizer-settings__content-option-title"},Hp("Display an existing chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement(Up,{icon:"arrow-right-alt2"})))),("getChart"===this.state.isLoading||"chartSelect"===this.state.route&&null===this.state.chart||"renderChart"===this.state.route&&null===this.state.chart)&&wp.element.createElement(Gp,null,wp.element.createElement(qp,null)),"showCharts"===this.state.route&&!1===this.state.isLoading&&wp.element.createElement(De,{getChart:this.getChart}),"chartSelect"===this.state.route&&null!==this.state.chart&&wp.element.createElement(ep,{id:this.props.attributes.id,attributes:this.props.attributes,chart:this.state.chart,editSettings:this.editSettings,editPermissions:this.editPermissions,url:this.state.url,readUploadedFile:this.readUploadedFile,editURL:this.editURL,editSchedule:this.editSchedule,editJSONURL:this.editJSONURL,editJSONHeaders:this.editJSONHeaders,editJSONSchedule:this.editJSONSchedule,editJSONRoot:this.editJSONRoot,editJSONPaging:this.editJSONPaging,JSONImportData:this.JSONImportData,editDatabaseSchedule:this.editDatabaseSchedule,databaseImportData:this.databaseImportData,uploadData:this.uploadData,getChartData:this.getChartData,editChartData:this.editChartData,isLoading:this.state.isLoading}),wp.element.createElement("div",{className:"visualizer-settings__controls"},("showCharts"===this.state.route||"chartSelect"===this.state.route)&&wp.element.createElement(Jp,null,wp.element.createElement(Bp,{isDefault:!0,isLarge:!0,onClick:function(){var t;"showCharts"===e.state.route?t="home":"chartSelect"===e.state.route&&(t="showCharts"),e.setState({route:t,isLoading:!1}),e.props.setAttributes({route:t})}},Hp("Back")),"chartSelect"===this.state.route&&wp.element.createElement(Wp,null,!1===this.state.isModified?wp.element.createElement(Bp,{isDefault:!0,isLarge:!0,className:"visualizer-bttn-done",onClick:function(){e.setState({route:"renderChart",isModified:!0}),e.props.setAttributes({route:"renderChart"})}},Hp("Done")):wp.element.createElement(Bp,{isPrimary:!0,isLarge:!0,className:"visualizer-bttn-save",isBusy:"updateChart"===this.state.isLoading,disabled:"updateChart"===this.state.isLoading,onClick:this.updateChart},Hp("Save"))))))}}])&&Op(t.prototype,n),r&&Op(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(Fp),Kp=(n(153),wp.i18n.__),Zp=wp.blocks.registerBlockType;t.default=Zp("visualizer/chart",{title:Kp("Visualizer Chart"),description:Kp("A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages."),category:"common",icon:"chart-pie",keywords:[Kp("Visualizer"),Kp("Chart"),Kp("Google Charts")],attributes:{id:{type:"number"},lazy:{default:"-1",type:"string"},route:{type:"string"}},supports:{customClassName:!1},edit:$p,save:function(){return null}})}]);