WordPress Charts and Graphs Lite - Version 3.4.4

Version Description

  • 2020-06-16
Download this release

Release Info

Developer codeinwp
Plugin Icon WordPress Charts and Graphs Lite
Version 3.4.4
Comparing to
See all releases

Code changes from version 3.4.3 to 3.4.4

Files changed (47) hide show
  1. CHANGELOG.md +12 -0
  2. classes/Visualizer/Gutenberg/Block.php +3 -1
  3. classes/Visualizer/Gutenberg/build/block.js +6 -6
  4. classes/Visualizer/Gutenberg/src/Components/ChartSelect.js +1 -0
  5. classes/Visualizer/Gutenberg/src/Components/Sidebar.js +7 -1
  6. classes/Visualizer/Gutenberg/src/Components/Sidebar/BubbleSettings.js +116 -0
  7. classes/Visualizer/Gutenberg/src/Components/Sidebar/FrontendActions.js +20 -0
  8. classes/Visualizer/Gutenberg/src/Components/Sidebar/GeneralSettings.js +1 -1
  9. classes/Visualizer/Gutenberg/src/Editor.js +63 -24
  10. classes/Visualizer/Gutenberg/src/utils.js +5 -0
  11. classes/Visualizer/Module.php +22 -3
  12. classes/Visualizer/Module/Admin.php +3 -0
  13. classes/Visualizer/Module/Chart.php +2 -1
  14. classes/Visualizer/Module/Frontend.php +49 -8
  15. classes/Visualizer/Module/Setup.php +1 -1
  16. classes/Visualizer/Plugin.php +1 -1
  17. classes/Visualizer/Render.php +46 -0
  18. classes/Visualizer/Render/Library.php +3 -0
  19. classes/Visualizer/Render/Sidebar.php +11 -313
  20. classes/Visualizer/Render/Sidebar/ChartJS.php +11 -0
  21. classes/Visualizer/Render/Sidebar/Google.php +317 -0
  22. classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Bubble.php +2 -2
  23. css/library.css +4 -0
  24. css/media.css +1 -1
  25. css/upsell.css +1 -1
  26. index.php +1 -1
  27. js/library.js +11 -2
  28. js/render-chartjs.js +29 -7
  29. js/render-facade.js +15 -13
  30. js/render-google.js +29 -6
  31. languages/visualizer.pot +296 -228
  32. readme.md +15 -2
  33. readme.txt +15 -2
  34. templates/support.php +1 -1
  35. themeisle-hash.json +1 -1
  36. vendor/autoload.php +1 -1
  37. vendor/autoload_52.php +1 -1
  38. vendor/codeinwp/themeisle-sdk/CHANGELOG.md +24 -0
  39. vendor/codeinwp/themeisle-sdk/load.php +1 -1
  40. vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php +43 -6
  41. vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php +15 -13
  42. vendor/codeinwp/themeisle-sdk/src/Modules/Review.php +1 -1
  43. vendor/codeinwp/themeisle-sdk/src/Modules/Translate.php +2 -2
  44. vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php +4 -2
  45. vendor/composer/autoload_real.php +5 -5
  46. vendor/composer/autoload_real_52.php +3 -3
  47. vendor/composer/installed.json +4 -4
CHANGELOG.md CHANGED
@@ -1,4 +1,16 @@
1
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  ### v3.4.3 - 2020-05-04
3
  **Changes:**
4
  * [Feat] Improved chart creation UX
1
 
2
+ ### v3.4.4 - 2020-06-16
3
+ **Changes:**
4
+ * [Feat] Option to download charts as .png images
5
+ * [Fix] Make UI more intuitive when a chart is missing in the editor
6
+ * [Fix] Clicking Copy chart shows the Copied message multiple times
7
+ * [Fix] Conflict with Modern Events Calendar plugin
8
+ * [Fix] Chart size ( width and height ) options not working for ChartJS charts
9
+ * [Fix] Resizing the window causes annotation-based charts to throw an error
10
+ * [Fix] Remove Inside the Chart option as legend position for Google Pie charts
11
+ * [Fix] Clicking Advanced Options panel breaks Bubble chart
12
+ * [Fix] Missing posts revisions on chart update
13
+
14
  ### v3.4.3 - 2020-05-04
15
  **Changes:**
16
  * [Feat] Improved chart creation UX
classes/Visualizer/Gutenberg/Block.php CHANGED
@@ -520,7 +520,9 @@ class Visualizer_Gutenberg_Block {
520
  }
521
 
522
  if ( $data['id'] && ! is_wp_error( $data['id'] ) ) {
523
-
 
 
524
  $chart_type = sanitize_text_field( $data['visualizer-chart-type'] );
525
  $source_type = sanitize_text_field( $data['visualizer-source'] );
526
 
520
  }
521
 
522
  if ( $data['id'] && ! is_wp_error( $data['id'] ) ) {
523
+ if ( get_post_type( $data['id'] ) !== Visualizer_Plugin::CPT_VISUALIZER ) {
524
+ return new WP_Error( 'invalid_post_type', 'Invalid post type.' );
525
+ }
526
  $chart_type = sanitize_text_field( $data['visualizer-chart-type'] );
527
  $source_type = sanitize_text_field( $data['visualizer-source'] );
528
 
classes/Visualizer/Gutenberg/build/block.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(e){function t(t){for(var r,o,s=t[0],l=t[1],u=t[2],d=0,m=[];d<s.length;d++)o=s[d],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&m.push(a[o][0]),a[o]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(c&&c(t);m.length;)m.shift()();return i.push.apply(i,u||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,s=1;s<n.length;s++){var l=n[s];0!==a[l]&&(r=!1)}r&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},a={1:0},i=[];function o(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,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.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;i.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 i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(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 m(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 p(e,t,n,r){return Et(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 _(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 f(e){var t=p(NaN);return null!=e?m(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 g(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 b=!1;function v(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,a.updateOffset(this),b=!1)}function M(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function w(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=w(t)),n}function L(e,t,n){var r,a=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),o=0;for(r=0;r<a;r++)(n&&e[r]!==t[r]||!n&&k(e[r])!==k(t[r]))&&o++;return o+i}function Y(e){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function D(e,t){var n=!0;return m((function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,e),n){for(var r,i=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];i.push(r)}Y(e+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var T,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=m({},e);for(n in t)d(t,n)&&(o(e[n])&&o(t[n])?(r[n]={},m(r[n],e[n]),m(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)d(e,n)&&!d(t,n)&&o(e[n])&&(r[n]=m({},r[n]));return r}function E(e){null!=e&&this.set(e)}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,T=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)d(e,t)&&n.push(t);return n};var C={};function H(e,t){var n=e.toLowerCase();C[n]=C[n+"s"]=C[t]=e}function P(e){return"string"==typeof e?C[e]||C[e.toLowerCase()]:void 0}function z(e){var t,n,r={};for(n in e)d(e,n)&&(t=P(n))&&(r[t]=e[n]);return r}var A={};function N(e,t){A[e]=t}function F(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 R=/(\[[^\[]*\])|(\\)?([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 F(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=q(t,e.localeData()),I[t]=I[t]||function(e){var t,n,r,a=e.match(R);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,i="";for(r=0;r<n;r++)i+=j(a[r])?a[r].call(t,e):a[r];return i}}(t),I[t](e)):e.localeData().invalidDate()}function q(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/,G=/\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+/,ie=/[+-]?\d+/,oe=/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(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,a){return t||n||r||a}))))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pe={};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++)pe[e[n]]=r}function _e(e,t){he(e,(function(e,n,r,a){r._w=r._w||{},t(e,r._w,r,a)}))}function fe(e,t,n){null!=t&&d(pe,e)&&pe[e](t,n._a,n,e)}var ye=0,ge=1,be=2,ve=3,Me=4,we=5,ke=6,Le=7,Ye=8;function De(e){return Te(e)?366:365}function Te(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"),H("year","y"),N("year",1),ce("Y",ie),ce("YY",Q,G),ce("YYYY",ne,K),ce("YYYYY",re,Z),ce("YYYYYY",re,Z),he(["YYYYY","YYYYYY"],ye),he("YYYY",(function(e,t){t[ye]=2===e.length?a.parseTwoDigitYear(e):k(e)})),he("YY",(function(e,t){t[ye]=a.parseTwoDigitYear(e)})),he("Y",(function(e,t){t[ye]=parseInt(e,10)})),a.parseTwoDigitYear=function(e){return k(e)+(k(e)>68?1900:2e3)};var Se,Oe=je("FullYear",!0);function je(e,t){return function(n){return null!=n?(Ee(this,e,n),a.updateOffset(this,t),this):xe(this,e)}}function xe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Ee(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Te(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ce(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ce(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?Te(e)?29:28:31-r%7%2}Se=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)})),H("month","M"),N("month",8),ce("M",Q),ce("MM",Q,G),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[ge]=k(e)-1})),he(["MMM","MMMM"],(function(e,t,n,r){var a=n._locale.monthsParse(e,r,n._strict);null!=a?t[ge]=a:h(n).invalidMonth=e}));var He=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Pe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ze="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ae(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(a=Se.call(this._shortMonthsParse,o))?a:null:-1!==(a=Se.call(this._longMonthsParse,o))?a:null:"MMM"===t?-1!==(a=Se.call(this._shortMonthsParse,o))?a:-1!==(a=Se.call(this._longMonthsParse,o))?a:null:-1!==(a=Se.call(this._longMonthsParse,o))?a:-1!==(a=Se.call(this._shortMonthsParse,o))?a:null}function Ne(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(),Ce(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Fe(e){return null!=e?(Ne(this,e),a.updateOffset(this,!0),this):xe(this,"Month")}var Re=le,We=le;function Ie(){function e(e,t){return t.length-e.length}var t,n,r=[],a=[],i=[];for(t=0;t<12;t++)n=p([2e3,t]),r.push(this.monthsShort(n,"")),a.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),a.sort(e),i.sort(e),t=0;t<12;t++)r[t]=me(r[t]),a[t]=me(a[t]);for(t=0;t<24;t++)i[t]=me(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Be(e,t,n,r,a,i,o){var s=new Date(e,t,n,r,a,i,o);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function Je(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ue(e,t,n){var r=7+t-n;return-(7+Je(e,0,r).getUTCDay()-t)%7+r-1}function qe(e,t,n,r,a){var i,o,s=1+7*(t-1)+(7+n-r)%7+Ue(e,r,a);return s<=0?o=De(i=e-1)+s:s>De(e)?(i=e+1,o=s-De(e)):(i=e,o=s),{year:i,dayOfYear:o}}function Ve(e,t,n){var r,a,i=Ue(e.year(),t,n),o=Math.floor((e.dayOfYear()-i-1)/7)+1;return o<1?r=o+Ge(a=e.year()-1,t,n):o>Ge(e.year(),t,n)?(r=o-Ge(e.year(),t,n),a=e.year()+1):(a=e.year(),r=o),{week:r,year:a}}function Ge(e,t,n){var r=Ue(e,t,n),a=Ue(e+1,t,n);return(De(e)-r+a)/7}J("w",["ww",2],"wo","week"),J("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),N("week",5),N("isoWeek",5),ce("w",Q),ce("ww",Q,G),ce("W",Q),ce("WW",Q,G),_e(["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"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),N("day",11),N("weekday",11),N("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)})),_e(["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})),_e(["d","e","E"],(function(e,t,n,r){t[r]=k(e)}));var $e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Qe(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(a=Se.call(this._weekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:null:"dddd"===t?-1!==(a=Se.call(this._weekdaysParse,o))?a:-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:-1!==(a=Se.call(this._weekdaysParse,o))?a:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:null:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:-1!==(a=Se.call(this._weekdaysParse,o))?a:-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:null}var Xe=le,et=le,tt=le;function nt(){function e(e,t){return t.length-e.length}var t,n,r,a,i,o=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),i=this.weekdays(n,""),o.push(r),s.push(a),l.push(i),u.push(r),u.push(a),u.push(i);for(o.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=me(s[t]),l[t]=me(l[t]),u[t]=me(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("^("+o.join("|")+")","i")}function rt(){return this.hours()%12||12}function at(e,t){J(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function it(e,t){return t._meridiemParse}J("H",["HH",2],0,"hour"),J("h",["hh",2],0,rt),J("k",["kk",2],0,(function(){return this.hours()||24})),J("hmm",0,0,(function(){return""+rt.apply(this)+F(this.minutes(),2)})),J("hmmss",0,0,(function(){return""+rt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),J("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),J("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),at("a",!0),at("A",!1),H("hour","h"),N("hour",13),ce("a",it),ce("A",it),ce("H",Q),ce("h",Q),ce("k",Q),ce("HH",Q,G),ce("hh",Q,G),ce("kk",Q,G),ce("hmm",X),ce("hmmss",ee),ce("Hmm",X),ce("Hmmss",ee),he(["H","HH"],ve),he(["k","kk"],(function(e,t,n){var r=k(e);t[ve]=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[ve]=k(e),h(n).bigHour=!0})),he("hmm",(function(e,t,n){var r=e.length-2;t[ve]=k(e.substr(0,r)),t[Me]=k(e.substr(r)),h(n).bigHour=!0})),he("hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[ve]=k(e.substr(0,r)),t[Me]=k(e.substr(r,2)),t[we]=k(e.substr(a)),h(n).bigHour=!0})),he("Hmm",(function(e,t,n){var r=e.length-2;t[ve]=k(e.substr(0,r)),t[Me]=k(e.substr(r))})),he("Hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[ve]=k(e.substr(0,r)),t[Me]=k(e.substr(r,2)),t[we]=k(e.substr(a))}));var ot,st=je("Hours",!0),lt={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:Pe,monthsShort:ze,week:{dow:0,doy:6},weekdays:$e,weekdaysMin:Ze,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},ut={},ct={};function dt(e){return e?e.toLowerCase().replace("_","-"):e}function mt(t){var r=null;if(!ut[t]&&void 0!==e&&e&&e.exports)try{r=ot._abbr,n(149)("./"+t),pt(r)}catch(e){}return ut[t]}function pt(e,t){var n;return e&&(n=s(t)?_t(e):ht(e,t))&&(ot=n),ot._abbr}function ht(e,t){if(null!==t){var n=lt;if(t.abbr=e,null!=ut[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=ut[e]._config;else if(null!=t.parentLocale){if(null==ut[t.parentLocale])return ct[t.parentLocale]||(ct[t.parentLocale]=[]),ct[t.parentLocale].push({name:e,config:t}),null;n=ut[t.parentLocale]._config}return ut[e]=new E(x(n,t)),ct[e]&&ct[e].forEach((function(e){ht(e.name,e.config)})),pt(e),ut[e]}return delete ut[e],null}function _t(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ot;if(!i(e)){if(t=mt(e))return t;e=[e]}return function(e){for(var t,n,r,a,i=0;i<e.length;){for(t=(a=dt(e[i]).split("-")).length,n=(n=dt(e[i+1]))?n.split("-"):null;t>0;){if(r=mt(a.slice(0,t).join("-")))return r;if(n&&n.length>=t&&L(a,n,!0)>=t-1)break;t--}i++}return null}(e)}function ft(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[ge]<0||n[ge]>11?ge:n[be]<1||n[be]>Ce(n[ye],n[ge])?be:n[ve]<0||n[ve]>24||24===n[ve]&&(0!==n[Me]||0!==n[we]||0!==n[ke])?ve:n[Me]<0||n[Me]>59?Me:n[we]<0||n[we]>59?we:n[ke]<0||n[ke]>999?ke:-1,h(e)._overflowDayOfYear&&(t<ye||t>be)&&(t=be),h(e)._overflowWeeks&&-1===t&&(t=Le),h(e)._overflowWeekday&&-1===t&&(t=Ye),h(e).overflow=t),e}function yt(e,t,n){return null!=e?e:null!=t?t:n}function gt(e){var t,n,r,i,o,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[be]&&null==e._a[ge]&&function(e){var t,n,r,a,i,o,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,o=4,n=yt(t.GG,e._a[ye],Ve(Ct(),1,4).year),r=yt(t.W,1),((a=yt(t.E,1))<1||a>7)&&(l=!0);else{i=e._locale._week.dow,o=e._locale._week.doy;var u=Ve(Ct(),i,o);n=yt(t.gg,e._a[ye],u.year),r=yt(t.w,u.week),null!=t.d?((a=t.d)<0||a>6)&&(l=!0):null!=t.e?(a=t.e+i,(t.e<0||t.e>6)&&(l=!0)):a=i}r<1||r>Ge(n,i,o)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(s=qe(n,r,a,i,o),e._a[ye]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=yt(e._a[ye],r[ye]),(e._dayOfYear>De(o)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=Je(o,0,e._dayOfYear),e._a[ge]=n.getUTCMonth(),e._a[be]=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[ve]&&0===e._a[Me]&&0===e._a[we]&&0===e._a[ke]&&(e._nextDay=!0,e._a[ve]=0),e._d=(e._useUTC?Je:Be).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ve]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(h(e).weekdayMismatch=!0)}}var bt=/^\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)?)?$/,vt=/^\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)?)?$/,Mt=/Z|[+-]\d\d(?::?\d\d)?/,wt=[["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}/]],kt=[["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/]],Lt=/^\/?Date\((\-?\d+)/i;function Yt(e){var t,n,r,a,i,o,s=e._i,l=bt.exec(s)||vt.exec(s);if(l){for(h(e).iso=!0,t=0,n=wt.length;t<n;t++)if(wt[t][1].exec(l[1])){a=wt[t][0],r=!1!==wt[t][2];break}if(null==a)return void(e._isValid=!1);if(l[3]){for(t=0,n=kt.length;t<n;t++)if(kt[t][1].exec(l[3])){i=(l[2]||" ")+kt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!Mt.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=a+(i||"")+(o||""),jt(e)}else e._isValid=!1}var Dt=/^(?:(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 Tt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ot(e){var t,n,r,a,i,o,s,l=Dt.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],i=l[6],o=l[7],s=[Tt(t),ze.indexOf(n),parseInt(r,10),parseInt(a,10),parseInt(i,10)],o&&s.push(parseInt(o,10)),s);if(!function(e,t,n){return!e||Ke.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 St[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=Je.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function jt(e){if(e._f!==a.ISO_8601)if(e._f!==a.RFC_2822){e._a=[],h(e).empty=!0;var t,n,r,i,o,s=""+e._i,l=s.length,u=0;for(r=q(e._f,e._locale).match(R)||[],t=0;t<r.length;t++)i=r[t],(n=(s.match(de(i,e))||[])[0])&&((o=s.substr(0,s.indexOf(n))).length>0&&h(e).unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),u+=n.length),B[i]?(n?h(e).empty=!1:h(e).unusedTokens.push(i),fe(i,n,e)):e._strict&&!n&&h(e).unusedTokens.push(i);h(e).charsLeftOver=l-u,s.length>0&&h(e).unusedInput.push(s),e._a[ve]<=12&&!0===h(e).bigHour&&e._a[ve]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[ve]=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[ve],e._meridiem),gt(e),ft(e)}else Ot(e);else Yt(e)}function xt(e){var t=e._i,n=e._f;return e._locale=e._locale||_t(e._l),null===t||void 0===n&&""===t?f({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),M(t)?new v(ft(t)):(u(t)?e._d=t:i(n)?function(e){var t,n,r,a,i;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<e._f.length;a++)i=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],jt(t),_(t)&&(i+=h(t).charsLeftOver,i+=10*h(t).unusedTokens.length,h(t).score=i,(null==r||i<r)&&(r=i,n=t));m(e,n||t)}(e):n?jt(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=Lt.exec(e._i);null===t?(Yt(e),!1===e._isValid&&(delete e._isValid,Ot(e),!1===e._isValid&&(delete e._isValid,a.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=c(t.slice(0),(function(e){return parseInt(e,10)})),gt(e)):o(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)})),gt(e)}}(e):l(t)?e._d=new Date(t):a.createFromInputFallback(e)}(e),_(e)||(e._d=null),e))}function Et(e,t,n,r,a){var s,l={};return!0!==n&&!1!==n||(r=n,n=void 0),(o(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)||i(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(ft(xt(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Ct(e,t,n,r){return Et(e,t,n,r,!1)}a.createFromInputFallback=D("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 Ht=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:f()})),Pt=D("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:f()}));function zt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Ct();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var At=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Nt(e){var t=z(e),n=t.year||0,r=t.quarter||0,a=t.month||0,i=t.week||0,o=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===Se.call(At,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<At.length;++r)if(e[At[r]]){if(n)return!1;parseFloat(e[At[r]])!==k(e[At[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+o+7*i,this._months=+a+3*r+12*n,this._data={},this._locale=_t(),this._bubble()}function Ft(e){return e instanceof Nt}function Rt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Wt(e,t){J(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)}))}Wt("Z",":"),Wt("ZZ",""),ce("Z",se),ce("ZZ",se),he(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Bt(se,e)}));var It=/([\+\-]|\d\d)/gi;function Bt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(It)||["-",0,0],a=60*r[1]+k(r[2]);return 0===a?0:"+"===r[0]?a:-a}function Jt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(M(e)||u(e)?e.valueOf():Ct(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),a.updateOffset(n,!1),n):Ct(e).local()}function Ut(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function qt(){return!!this.isValid()&&this._isUTC&&0===this._offset}a.updateOffset=function(){};var Vt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Gt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $t(e,t){var n,r,a,i,o,s,u=e,c=null;return Ft(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(u={},t?u[t]=e:u.milliseconds=e):(c=Vt.exec(e))?(n="-"===c[1]?-1:1,u={y:0,d:k(c[be])*n,h:k(c[ve])*n,m:k(c[Me])*n,s:k(c[we])*n,ms:k(Rt(1e3*c[ke]))*n}):(c=Gt.exec(e))?(n="-"===c[1]?-1:(c[1],1),u={y:Kt(c[2],n),M:Kt(c[3],n),w:Kt(c[4],n),d:Kt(c[5],n),h:Kt(c[6],n),m:Kt(c[7],n),s:Kt(c[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(i=Ct(u.from),o=Ct(u.to),a=i.isValid()&&o.isValid()?(o=Jt(o,i),i.isBefore(o)?s=Zt(i,o):((s=Zt(o,i)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=a.milliseconds,u.M=a.months),r=new Nt(u),Ft(e)&&d(e,"_locale")&&(r._locale=e._locale),r}function Kt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Zt(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 Qt(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),Xt(this,$t(n="string"==typeof n?+n:n,r),e),this}}function Xt(e,t,n,r){var i=t._milliseconds,o=Rt(t._days),s=Rt(t._months);e.isValid()&&(r=null==r||r,s&&Ne(e,xe(e,"Month")+s*n),o&&Ee(e,"Date",xe(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&a.updateOffset(e,o||s))}$t.fn=Nt.prototype,$t.invalid=function(){return $t(NaN)};var en=Qt(1,"add"),tn=Qt(-1,"subtract");function nn(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 rn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=_t(e))&&(this._locale=t),this)}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var an=D("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 on(){return this._locale}function sn(e,t){J(0,[e,e.length],0,t)}function ln(e,t,n,r,a){var i;return null==e?Ve(this,r,a).year:(t>(i=Ge(e,r,a))&&(t=i),un.call(this,e,t,n,r,a))}function un(e,t,n,r,a){var i=qe(e,t,n,r,a),o=Je(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}J(0,["gg",2],0,(function(){return this.weekYear()%100})),J(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),sn("gggg","weekYear"),sn("ggggg","weekYear"),sn("GGGG","isoWeekYear"),sn("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",Q,G),ce("gg",Q,G),ce("GGGG",ne,K),ce("gggg",ne,K),ce("GGGGG",re,Z),ce("ggggg",re,Z),_e(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=k(e)})),_e(["gg","GG"],(function(e,t,n,r){t[r]=a.parseTwoDigitYear(e)})),J("Q",0,"Qo","quarter"),H("quarter","Q"),N("quarter",7),ce("Q",V),he("Q",(function(e,t){t[ge]=3*(k(e)-1)})),J("D",["DD",2],"Do","date"),H("date","D"),N("date",9),ce("D",Q),ce("DD",Q,G),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),he(["D","DD"],be),he("Do",(function(e,t){t[be]=k(e.match(Q)[0])}));var cn=je("Date",!0);J("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),N("dayOfYear",4),ce("DDD",te),ce("DDDD",$),he(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=k(e)})),J("m",["mm",2],0,"minute"),H("minute","m"),N("minute",14),ce("m",Q),ce("mm",Q,G),he(["m","mm"],Me);var dn=je("Minutes",!1);J("s",["ss",2],0,"second"),H("second","s"),N("second",15),ce("s",Q),ce("ss",Q,G),he(["s","ss"],we);var mn,pn=je("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()})),H("millisecond","ms"),N("millisecond",16),ce("S",te,V),ce("SS",te,G),ce("SSS",te,$),mn="SSSS";mn.length<=9;mn+="S")ce(mn,ae);function hn(e,t){t[ke]=k(1e3*("0."+e))}for(mn="S";mn.length<=9;mn+="S")he(mn,hn);var _n=je("Milliseconds",!1);J("z",0,0,"zoneAbbr"),J("zz",0,0,"zoneName");var fn=v.prototype;function yn(e){return e}fn.add=en,fn.calendar=function(e,t){var n=e||Ct(),r=Jt(n,this).startOf("day"),i=a.calendarFormat(this,r)||"sameElse",o=t&&(j(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,Ct(n)))},fn.clone=function(){return new v(this)},fn.diff=function(e,t,n){var r,a,i;if(!this.isValid())return NaN;if(!(r=Jt(e,this)).isValid())return NaN;switch(a=6e4*(r.utcOffset()-this.utcOffset()),t=P(t)){case"year":i=nn(this,r)/12;break;case"month":i=nn(this,r);break;case"quarter":i=nn(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-a)/864e5;break;case"week":i=(this-r-a)/6048e5;break;default:i=this-r}return n?i:w(i)},fn.endOf=function(e){return void 0===(e=P(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},fn.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},fn.from=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Ct(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.fromNow=function(e){return this.from(Ct(),e)},fn.to=function(e,t){return this.isValid()&&(M(e)&&e.isValid()||Ct(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},fn.toNow=function(e){return this.to(Ct(),e)},fn.get=function(e){return j(this[e=P(e)])?this[e]():this},fn.invalidAt=function(){return h(this).overflow},fn.isAfter=function(e,t){var n=M(e)?e:Ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=P(s(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},fn.isBefore=function(e,t){var n=M(e)?e:Ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=P(s(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},fn.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))},fn.isSame=function(e,t){var n,r=M(e)?e:Ct(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=P(t||"millisecond"))?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},fn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},fn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},fn.isValid=function(){return _(this)},fn.lang=an,fn.locale=rn,fn.localeData=on,fn.max=Pt,fn.min=Ht,fn.parsingFlags=function(){return m({},h(this))},fn.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=P(e)]))return this[e](t);return this},fn.startOf=function(e){switch(e=P(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},fn.subtract=tn,fn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},fn.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()}},fn.toDate=function(){return new Date(this.valueOf())},fn.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")},fn.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)},fn.toJSON=function(){return this.isValid()?this.toISOString():null},fn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},fn.unix=function(){return Math.floor(this.valueOf()/1e3)},fn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},fn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},fn.year=Oe,fn.isLeapYear=function(){return Te(this.year())},fn.weekYear=function(e){return ln.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},fn.isoWeekYear=function(e){return ln.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},fn.quarter=fn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},fn.month=Fe,fn.daysInMonth=function(){return Ce(this.year(),this.month())},fn.week=fn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},fn.isoWeek=fn.isoWeeks=function(e){var t=Ve(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},fn.weeksInYear=function(){var e=this.localeData()._week;return Ge(this.year(),e.dow,e.doy)},fn.isoWeeksInYear=function(){return Ge(this.year(),1,4)},fn.date=cn,fn.day=fn.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},fn.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")},fn.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},fn.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")},fn.hour=fn.hours=st,fn.minute=fn.minutes=dn,fn.second=fn.seconds=pn,fn.millisecond=fn.milliseconds=_n,fn.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Bt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Ut(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Xt(this,$t(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Ut(this)},fn.utc=function(e){return this.utcOffset(0,e)},fn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ut(this),"m")),this},fn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Bt(oe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},fn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ct(e).utcOffset():0,(this.utcOffset()-e)%60==0)},fn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},fn.isLocal=function(){return!!this.isValid()&&!this._isUTC},fn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},fn.isUtc=qt,fn.isUTC=qt,fn.zoneAbbr=function(){return this._isUTC?"UTC":""},fn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},fn.dates=D("dates accessor is deprecated. Use date instead.",cn),fn.months=D("months accessor is deprecated. Use month instead",Fe),fn.years=D("years accessor is deprecated. Use year instead",Oe),fn.zone=D("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()})),fn.isDSTShifted=D("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(g(e,this),(e=xt(e))._a){var t=e._isUTC?p(e._a):Ct(e._a);this._isDSTShifted=this.isValid()&&L(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var gn=E.prototype;function bn(e,t,n,r){var a=_t(),i=p().set(r,t);return a[n](i,e)}function vn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return bn(e,t,n,"month");var r,a=[];for(r=0;r<12;r++)a[r]=bn(e,r,n,"month");return a}function Mn(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,i=_t(),o=e?i._week.dow:0;if(null!=n)return bn(t,(n+o)%7,r,"day");var s=[];for(a=0;a<7;a++)s[a]=bn(t,(a+o)%7,r,"day");return s}gn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return j(r)?r.call(t,n):r},gn.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])},gn.invalidDate=function(){return this._invalidDate},gn.ordinal=function(e){return this._ordinal.replace("%d",e)},gn.preparse=yn,gn.postformat=yn,gn.relativeTime=function(e,t,n,r){var a=this._relativeTime[n];return j(a)?a(e,t,n,r):a.replace(/%d/i,e)},gn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return j(n)?n(t):n.replace(/%s/i,t)},gn.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)},gn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||He).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},gn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[He.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},gn.monthsParse=function(e,t,n){var r,a,i;if(this._monthsParseExact)return Ae.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(a=p([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]||(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(i.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}},gn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ie.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=We),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},gn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ie.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Re),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},gn.week=function(e){return Ve(e,this._week.dow,this._week.doy).week},gn.firstDayOfYear=function(){return this._week.doy},gn.firstDayOfWeek=function(){return this._week.dow},gn.weekdays=function(e,t){return e?i(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:i(this._weekdays)?this._weekdays:this._weekdays.standalone},gn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},gn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},gn.weekdaysParse=function(e,t,n){var r,a,i;if(this._weekdaysParseExact)return Qe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=p([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]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(i.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}},gn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Xe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},gn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},gn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},gn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},gn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},pt("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=D("moment.lang is deprecated. Use moment.locale instead.",pt),a.langData=D("moment.langData is deprecated. Use moment.localeData instead.",_t);var wn=Math.abs;function kn(e,t,n,r){var a=$t(t,n);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function Ln(e){return e<0?Math.floor(e):Math.ceil(e)}function Yn(e){return 4800*e/146097}function Dn(e){return 146097*e/4800}function Tn(e){return function(){return this.as(e)}}var Sn=Tn("ms"),On=Tn("s"),jn=Tn("m"),xn=Tn("h"),En=Tn("d"),Cn=Tn("w"),Hn=Tn("M"),Pn=Tn("y");function zn(e){return function(){return this.isValid()?this._data[e]:NaN}}var An=zn("milliseconds"),Nn=zn("seconds"),Fn=zn("minutes"),Rn=zn("hours"),Wn=zn("days"),In=zn("months"),Bn=zn("years"),Jn=Math.round,Un={ss:44,s:45,m:45,h:22,d:26,M:11};function qn(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}var Vn=Math.abs;function Gn(e){return(e>0)-(e<0)||+e}function $n(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Vn(this._milliseconds)/1e3,r=Vn(this._days),a=Vn(this._months);e=w(n/60),t=w(e/60),n%=60,e%=60;var i=w(a/12),o=a%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var m=d<0?"-":"",p=Gn(this._months)!==Gn(d)?"-":"",h=Gn(this._days)!==Gn(d)?"-":"",_=Gn(this._milliseconds)!==Gn(d)?"-":"";return m+"P"+(i?p+i+"Y":"")+(o?p+o+"M":"")+(s?h+s+"D":"")+(l||u||c?"T":"")+(l?_+l+"H":"")+(u?_+u+"M":"")+(c?_+c+"S":"")}var Kn=Nt.prototype;return Kn.isValid=function(){return this._isValid},Kn.abs=function(){var e=this._data;return this._milliseconds=wn(this._milliseconds),this._days=wn(this._days),this._months=wn(this._months),e.milliseconds=wn(e.milliseconds),e.seconds=wn(e.seconds),e.minutes=wn(e.minutes),e.hours=wn(e.hours),e.months=wn(e.months),e.years=wn(e.years),this},Kn.add=function(e,t){return kn(this,e,t,1)},Kn.subtract=function(e,t){return kn(this,e,t,-1)},Kn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=P(e))||"year"===e)return t=this._days+r/864e5,n=this._months+Yn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(Dn(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)}},Kn.asMilliseconds=Sn,Kn.asSeconds=On,Kn.asMinutes=jn,Kn.asHours=xn,Kn.asDays=En,Kn.asWeeks=Cn,Kn.asMonths=Hn,Kn.asYears=Pn,Kn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},Kn._bubble=function(){var e,t,n,r,a,i=this._milliseconds,o=this._days,s=this._months,l=this._data;return i>=0&&o>=0&&s>=0||i<=0&&o<=0&&s<=0||(i+=864e5*Ln(Dn(s)+o),o=0,s=0),l.milliseconds=i%1e3,e=w(i/1e3),l.seconds=e%60,t=w(e/60),l.minutes=t%60,n=w(t/60),l.hours=n%24,o+=w(n/24),a=w(Yn(o)),s+=a,o-=Ln(Dn(a)),r=w(s/12),s%=12,l.days=o,l.months=s,l.years=r,this},Kn.clone=function(){return $t(this)},Kn.get=function(e){return e=P(e),this.isValid()?this[e+"s"]():NaN},Kn.milliseconds=An,Kn.seconds=Nn,Kn.minutes=Fn,Kn.hours=Rn,Kn.days=Wn,Kn.weeks=function(){return w(this.days()/7)},Kn.months=In,Kn.years=Bn,Kn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=$t(e).abs(),a=Jn(r.as("s")),i=Jn(r.as("m")),o=Jn(r.as("h")),s=Jn(r.as("d")),l=Jn(r.as("M")),u=Jn(r.as("y")),c=a<=Un.ss&&["s",a]||a<Un.s&&["ss",a]||i<=1&&["m"]||i<Un.m&&["mm",i]||o<=1&&["h"]||o<Un.h&&["hh",o]||s<=1&&["d"]||s<Un.d&&["dd",s]||l<=1&&["M"]||l<Un.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=n,qn.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Kn.toISOString=$n,Kn.toString=$n,Kn.toJSON=$n,Kn.locale=rn,Kn.localeData=on,Kn.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$n),Kn.lang=an,J("X",0,0,"unix"),J("x",0,0,"valueOf"),ce("x",ie),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=Ct,a.fn=fn,a.min=function(){return zt("isBefore",[].slice.call(arguments,0))},a.max=function(){return zt("isAfter",[].slice.call(arguments,0))},a.now=function(){return Date.now?Date.now():+new Date},a.utc=p,a.unix=function(e){return Ct(1e3*e)},a.months=function(e,t){return vn(e,t,"months")},a.isDate=u,a.locale=pt,a.invalid=f,a.duration=$t,a.isMoment=M,a.weekdays=function(e,t,n){return Mn(e,t,n,"weekdays")},a.parseZone=function(){return Ct.apply(null,arguments).parseZone()},a.localeData=_t,a.isDuration=Ft,a.monthsShort=function(e,t){return vn(e,t,"monthsShort")},a.weekdaysMin=function(e,t,n){return Mn(e,t,n,"weekdaysMin")},a.defineLocale=ht,a.updateLocale=function(e,t){if(null!=t){var n,r,a=lt;null!=(r=mt(e))&&(a=r._config),t=x(a,t),(n=new E(t)).parentLocale=ut[e],ut[e]=n,pt(e)}else null!=ut[e]&&(null!=ut[e].parentLocale?ut[e]=ut[e].parentLocale:null!=ut[e]&&delete ut[e]);return ut[e]},a.locales=function(){return T(ut)},a.weekdaysShort=function(e,t,n){return Mn(e,t,n,"weekdaysShort")},a.normalizeUnits=P,a.relativeTimeRounding=function(e){return void 0===e?Jn:"function"==typeof e&&(Jn=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==Un[e]&&(void 0===t?Un[e]:(Un[e]=t,"s"===e&&(Un.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=fn,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,i=0){let o;if(null!==n&&i<n)y(e)&&(o=Object.keys(e)).forEach(r=>{a(e[r],t,n,i+1)});else{if(null!==n&&i==n)return 0==n?void(r=a(e,t,null,i)):void(y(e)&&r.push(a(e,t,n,i+1)));switch(M(e)){case"array":var s=[];if(o=Object.keys(e),null===t||i<t)for(var l=0,u=o.length;l<u;l++){const r=o[l],u=e[r];s[r]=a(u,t,n,i+1)}return s;case"object":var c={};if(o=Object.keys(e),null===t||i<t)for(l=0,u=o.length;l<u;l++){const r=o[l],s=e[r];c[r]=a(s,t,n,i+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"===M(t)&&""!==t){var r=[];return function e(t,n,a="",i="",o=null,s=0){if(a===n&&(r[r.length]=i),null!==o&&s>=o)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,(""===i?i:i+".")+r,o,s+1)}}(e,t,"","",n),0!==(r=r.map(e=>"boolean"===M(e)?e:""===e?e:((e=e.split(".")).pop(),e=e.join(".")))).length&&r}}function a(e,t,n=null){if("string"===M(t)&&""!==t){var r=function e(t,n,r="",a,i=0){if(r===n)return r;var o=!1;if(null!==a&&i>=a)return o;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,i+1);if(c){o=(r=""===r?r:r+".")+c;break}}return o}(e,t,"",n,0);return"boolean"===M(r)?r:""===r?r:((r=r.split(".")).pop(),r=r.join("."))}}function i(e,t,n=null){if(!u(t=s(t)))return function e(t,n,r,a=0){if(f(t,[n]))return u(t[n]);if(null!==r&&a>=r)return!1;if(y(t))for(var i=0,o=Object.keys(t),s=o.length;i<s;i++){if(e(t[o[i]],n,r,a+1))return!0}return!1}(e,t,n)}function o(e,t,n=null){if(!u(t=s(t)))return function e(t,n,r,a=0){if(f(t,[n]))return l(t[n]);if(null!==r&&a>=r)return!1;if(y(t))for(var i=0,o=Object.keys(t),s=o.length;i<s;i++){if(e(t[o[i]],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(M(e))>-1&&e)}function l(e){return!u(e)}function u(e){return!1===function(e){return y(e)?e:!(["null","undefined"].indexOf(M(e))>-1)&&(!(["",0,!1].indexOf(e)>-1)&&e)}(e)}function c(e){return-1===["array","object"].indexOf(M(e))?0:Object.keys(e).length}function d(e,t,n=null,r=0){if(g(e,t))return!0;if(y(t)&&v(e,t)&&f(e,Object.keys(t))){if(g(_(e,Object.keys(t)),t))return!0}if((null===n||r<n)&&y(e))for(var a=0,i=Object.keys(e),o=i.length;a<o;a++){if(d(e[i[a]],t,n,r+1))return!0}return!1}function m(e,t,n=null){var r=p(e,t,n);if(!1===r)return;return r.map(n=>{if(""===n)return e;n=n.split("."),-1===["array","object"].indexOf(M(t))&&n.splice(-1,1);var r=e;return Array.isArray(n)?(n.forEach(e=>{r=r[e]}),r):r[n]})}function p(e,t,n=null){var r=[];return function e(t,n,a="",i,o){if(y(n)&&v(t,n)&&f(t,Object.keys(n))){g(_(t,Object.keys(n)),n)&&(r[r.length]=a)}if(g(t,n)&&(r[r.length]=a),null!==i&&o>=i)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,i,o+1)}}(e,t,"",n,0),0!==r.length&&r}function h(e,t,n=null){return function e(t,n,r="",a,i){if(y(n)&&v(t,n)&&f(t,Object.keys(n))){if(g(_(t,Object.keys(n)),n))return r}if(g(t,n))return r;var o=!1;if(null!==a&&i>=a)return o;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,i+1);if(c){o=(r=""===r?r:r+".")+c;break}}return o}(e,t,"",n,0)}function _(e,t){const n=M(e);if(-1!==["array","object"].indexOf(n)&&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 f(e,t){const n=t.length;if(0===n||!y(e))return!1;const r=Object.keys(e);for(var a=!0,i=0;i<n;i++){const e=""+t[i];if(-1===r.indexOf(e)){a=!1;break}}return a}function y(e){return-1!==["array","object"].indexOf(M(e))&&0!==Object.keys(e).length}function g(e,t){const n=b(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 i=!0,o=0;o<a;o++){const n=r[o],a=g(e[n],t[n]);if(!1===a){i=a;break}}return i}function b(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),i=n.length;if(i!==a.length)return!1;if(0===i)return!0;for(var r=0;r<i;r++)if(n[r]!==a[r])return!1}return n}function v(e,t){const n=M(e);return n===M(t)&&n}function M(e){if(null===e)return"null";const t=typeof e;return"object"===t&&Array.isArray(e)?"array":t}var w={getType:function(e){return M(e)},sameType:function(e,t){return v(e,t)},sameStructure:function(e,t){return b(e,t)},identical:function(e,t){return g(e,t)},isIterable:function(e){return y(e)},containsKeys:function(e,t){return f(e,t)},trim:function(e,t){return _(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(M(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 p(e,t,n)},deepFilter:function(e,t,n){return m(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"===M(t)){let r=[];return t.forEach(t=>{d(e,t,n)&&r.push(t)}),r}if("object"===M(t)){let r={};return Object.keys(t).forEach(a=>{let i=t[a];d(e,i,n)&&(r[a]=i)}),r}if(d(e,t,n))return t}(e,t,n)},onlyMissing:function(e,t,n){return function(e,t,n=null){if("array"===M(t)){let r=[];return t.forEach(t=>{d(e,t,n)||r.push(t)}),r}if("object"===M(t)){let r={};return Object.keys(t).forEach(a=>{let i=t[a];d(e,i,n)||(r[a]=i)}),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 o(e,t,n)},onlyTruthy:function(e,t,n,r){return function(e,t,n,r=null){if("array"===M(t)){let a=[];return t.forEach(t=>{const i=m(e,t);l(i)&&o(i,n,r)&&a.push(t)}),a}if("object"===M(t)){let a={};return Object.keys(t).forEach(i=>{const s=t[i],u=m(e,s);l(u)&&o(u,n,r)&&(a[i]=s)}),a}if(o(e,n,r))return t}(e,t,n,r)},foundFalsy:function(e,t,n){return i(e,t,n)},onlyFalsy:function(e,t,n,r){return function(e,t,n,r=null){if("array"===M(t)){let a=[];return t.forEach(t=>{const o=m(e,t);l(o)&&i(o,n,r)&&a.push(t)}),a}if("object"===M(t)){let a={};return Object.keys(t).forEach(o=>{const s=t[o],u=m(e,s);l(u)&&i(u,n,r)&&(a[o]=s)}),a}if(i(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,i=null===r,o=p(e,t,a&&i?null:a||i?n||r:n<r?n:r);if(!1===o)return 0;if(null===n)return o.length;if("number"===M(n)){let e=0;return o.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"===M(t)&&""!==t){var r=a(e,t,n);if(!1!==r){""===r?r=t:r+="."+t,r=r.split(".");var i=e;return Array.isArray(r)?(r.forEach(e=>{i=i[e]}),i):i[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"!==M(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"===M(t)&&"string"===M(n)&&""!==t&&""!==n){var a=!1;return function e(t,n,r,i,o=0){let s;switch(M(t)){case"array":for(var l=[],u=0,c=(s=Object.keys(t)).length;u<c;u++){let a=s[u],c=t[a];l[a]=e(c,n,r,i,o+1)}return l;case"object":var d={};for(u=0,c=(s=Object.keys(t)).length;u<c;u++){let l=s[u],c=t[l];(null===i||o<i)&&(a||l===n&&(l=r,a=!0)),d[l]=e(c,n,r,i,o+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"===M(t)&&"string"===M(n)&&""!==t&&""!==n)return function e(t,n,r,a,i=0){let o;switch(M(t)){case"array":for(var s=[],l=0,u=(o=Object.keys(t)).length;l<u;l++){let u=o[l],c=t[u];s[u]=e(c,n,r,a,i+1)}return s;case"object":var c={};for(l=0,u=(o=Object.keys(t)).length;l<u;l++){let s=o[l],u=t[s];(null===a||i<a)&&s===n&&(s=r),c[s]=e(u,n,r,a,i+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"!==M(t))return;if(""===t)return;let i=n(e);var o=a(i,t,r);if(!1===o)return i;""===o?o=t:o+="."+t,o=o.split(".");var s=i;return Array.isArray(o)||delete s[o],o.forEach((e,t)=>{t<o.length-1?s=s[e]:delete s[e]}),i}(e,t,r)},deepRemoveAll_Key:function(e,t,a){return function(e,t,a){if("string"!==M(t))return;if(""===t)return;let i=n(e);var o=r(i,t,a);return o===[]||!1===o?i:(o.forEach(e=>{""===e?e=t:e+="."+t,e=e.split(".");var n=i;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]}}),i)}(e,t,a)}};e.exports=w},function(e,t,n){(function(e){!function(t){var n=function(e){return a(!0===e,!1,arguments)};function r(e,t){if("object"!==i(e))return t;for(var n in t)"object"===i(e[n])&&"object"===i(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function a(e,t,a){var o=a[0],s=a.length;(e||"object"!==i(o))&&(o={});for(var l=0;l<s;++l){var u=a[l];if("object"===i(u))for(var c in u)if("__proto__"!==c){var d=e?n.clone(u[c]):u[c];o[c]=t?r(o[c],d):d}}return o}function i(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,o=i(e);if("array"===o)for(a=[],r=e.length,t=0;t<r;++t)a[t]=n.clone(e[t]);else if("object"===o)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
  /*!
3
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
4
  *
@@ -44,26 +44,26 @@
44
  *
45
  * This source code is licensed under the MIT license found in the
46
  * LICENSE file in the root directory of this source tree.
47
- */var r=n(136),a=n(137),i=n(138),o=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,m=s?Symbol.for("react.profiler"):60114,p=s?Symbol.for("react.provider"):60109,h=s?Symbol.for("react.context"):60110,_=s?Symbol.for("react.async_mode"):60111,f=s?Symbol.for("react.forward_ref"):60112;s&&Symbol.for("react.timeout");var y="function"==typeof Symbol&&Symbol.iterator;function g(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 b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function v(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||b}function M(){}function w(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||b}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&g("85"),this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},M.prototype=v.prototype;var k=w.prototype=new M;k.constructor=w,r(k,v.prototype),k.isPureReactComponent=!0;var L={current:null},Y=Object.prototype.hasOwnProperty,D={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r=void 0,a={},i=null,o=null;if(null!=t)for(r in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(i=""+t.key),t)Y.call(t,r)&&!D.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:i,ref:o,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 C(e,t,n,r){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var i=!1;if(null===e)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case l:case u:i=!0}}if(i)return n(r,e,""===t?"."+H(e,0):t),1;if(i=0,t=""===t?".":t+":",Array.isArray(e))for(var o=0;o<e.length;o++){var s=t+H(a=e[o],o);i+=C(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),o=0;!(a=e.next()).done;)i+=C(a=a.value,s=t+H(a,o++),n,r);else"object"===a&&g("31","[object Object]"===(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return i}function H(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 P(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,o.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 i="";null!=n&&(i=(""+n).replace(O,"$&/")+"/"),t=x(t,i,r,a),null==e||C(e,"",z,t),E(t)}var N={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||C(e,"",P,t),E(t)},count:function(e){return null==e?0:C(e,"",o.thatReturnsNull,null)},toArray:function(e){var t=[];return A(e,t,null,o.thatReturnsArgument),t},only:function(e){return S(e)||g("143"),e}},createRef:function(){return{current:null}},Component:v,PureComponent:w,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:p,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:f,render:e}},Fragment:c,StrictMode:d,unstable_AsyncMode:_,unstable_Profiler:m,createElement:T,cloneElement:function(e,t,n){null==e&&g("267",e);var a=void 0,i=r({},e.props),o=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&&(o=""+t.key);var c=void 0;for(a in e.type&&e.type.defaultProps&&(c=e.type.defaultProps),t)Y.call(t,a)&&!D.hasOwnProperty(a)&&(i[a]=void 0===t[a]&&void 0!==c?c[a]:t[a])}if(1===(a=arguments.length-2))i.children=n;else if(1<a){c=Array(a);for(var d=0;d<a;d++)c[d]=arguments[d+2];i.children=c}return{$$typeof:l,type:e.type,key:o,ref:s,props:i,_owner:u}},createFactory:function(e){var t=T.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}},F={default:N},R=F&&N||F;e.exports=R.default?R.default:R},function(e,t,n){"use strict";
48
  /*
49
  object-assign
50
  (c) Sindre Sorhus
51
  @license MIT
52
- */var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(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=o(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++)i.call(n,s[d])&&(l[s[d]]=n[s[d]])}}return l}},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,a,i,o,s,l){if(r(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,a,i,o,s,l],d=0;(u=new Error(t.replace(/%s/g,(function(){return c[d++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},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 i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==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,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:i,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,i=n(5),o=n(6),s=0,l=0;e.exports=function(e,t,n){var u=t&&n||0,c=t||[],d=(e=e||{}).node||r,m=void 0!==e.clockseq?e.clockseq:a;if(null==d||null==m){var p=i();null==d&&(d=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==m&&(m=a=16383&(p[6]<<8|p[7]))}var h=void 0!==e.msecs?e.msecs:(new Date).getTime(),_=void 0!==e.nsecs?e.nsecs:l+1,f=h-s+(_-l)/1e4;if(f<0&&void 0===e.clockseq&&(m=m+1&16383),(f<0||h>s)&&void 0===e.nsecs&&(_=0),_>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=h,l=_,a=m;var y=(1e4*(268435455&(h+=122192928e5))+_)%4294967296;c[u++]=y>>>24&255,c[u++]=y>>>16&255,c[u++]=y>>>8&255,c[u++]=255&y;var g=h/4294967296*1e4&268435455;c[u++]=g>>>8&255,c[u++]=255&g,c[u++]=g>>>24&15|16,c[u++]=g>>>16&255,c[u++]=m>>>8|128,c[u++]=255&m;for(var b=0;b<6;++b)c[u+b]=d[b];return t||o(c)}},function(e,t,n){var r=n(5),a=n(6);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||r)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[i+s]=o[s];return t||a(o)}},function(e,t,n){"use strict";
53
  /*!
54
  * isobject <https://github.com/jonschlinkert/isobject>
55
  *
56
  * Copyright (c) 2014-2017, Jon Schlinkert.
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,i,o,s,l=1,u={},c=!1,d=e.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(e);m=m&&m.setTimeout?m: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?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){i.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)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&h(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(o+t,"*")}),m.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++},m.clearImmediate=p}function p(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,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{p(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 i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!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:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,u=[],c=!1,d=-1;function m(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!c){var e=s(m);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===o||!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 _(){}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(p)},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=_,a.addListener=_,a.once=_,a.off=_,a.removeListener=_,a.removeAllListeners=_,a.emit=_,a.prependListener=_,a.prependOnceListener=_,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=i(e);return n(t)}function i(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=i,e.exports=a,a.id=149},function(e,t,n){var r;e.exports=function e(t,n,a){function i(s,l){if(!n[s]){if(!t[s]){if(!l&&"function"==typeof r&&r)return r(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,n,a)}return n[s].exports}for(var o="function"==typeof r&&r,s=0;s<a.length;s++)i(a[s]);return i}({1:[function(e,t,n){!function(e){"use strict";var n,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,i=Math.floor,o="[BigNumber Error] ",s=o+"Number primitive has more than 15 significant digits: ",l=1e14,u=14,c=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,p=1e9;function h(e){var t=0|e;return 0<e||e===t?t:t-1}function _(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=u-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function f(e,t){var n,r,a=e.c,i=t.c,o=e.s,s=t.s,l=e.e,u=t.e;if(!o||!s)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=l==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return u<l^n?1:-1;for(s=(l=a.length)<(u=i.length)?l:u,o=0;o<s;o++)if(a[o]!=i[o])return a[o]>i[o]^n?1:-1;return l==u?0:u<l^n?1:-1}function y(e,t,n,r){if(e<t||n<e||e!==(e<0?a(e):i(e)))throw Error(o+(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 h(e.e/u)==t&&e.c[t]%2!=0}function b(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function v(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,w,k,L,Y,D,T,S,O,j=B.prototype={constructor:B,toString:null,valueOf:null},x=new B(1),E=20,C=4,H=-7,P=21,z=-1e7,A=1e7,N=!1,F=1,R=0,W={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},I="0123456789abcdefghijklmnopqrstuvwxyz";function B(e,t){var n,a,o,l,d,m,p,h,_=this;if(!(_ instanceof B))return new B(e,t);if(null==t){if(e instanceof B)return _.s=e.s,_.e=e.e,void(_.c=(e=e.c)?e.slice():e);if((m="number"==typeof e)&&0*e==0){if(_.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,d=e;10<=d;d/=10,l++);return _.e=l,void(_.c=[e])}h=String(e)}else{if(h=String(e),!r.test(h))return w(_,h,m);_.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}-1<(l=h.indexOf("."))&&(h=h.replace(".","")),0<(d=h.search(/e/i))?(l<0&&(l=d),l+=+h.slice(d+1),h=h.substring(0,d)):l<0&&(l=h.length)}else{if(y(t,2,I.length,"Base"),h=String(e),10==t)return V(_=new B(e instanceof B?e:h),E+_.e+1,C);if(m="number"==typeof e){if(0*e!=0)return w(_,h,m,t);if(_.s=1/e<0?(h=h.slice(1),-1):1,B.DEBUG&&15<h.replace(/^0\.0*|\./,"").length)throw Error(s+e);m=!1}else _.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(n=I.slice(0,t),l=d=0,p=h.length;d<p;d++)if(n.indexOf(a=h.charAt(d))<0){if("."==a){if(l<d){l=p;continue}}else if(!o&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){o=!0,d=-1,l=0;continue}return w(_,String(e),m,t)}-1<(l=(h=M(h,t,10,_.s)).indexOf("."))?h=h.replace(".",""):l=h.length}for(d=0;48===h.charCodeAt(d);d++);for(p=h.length;48===h.charCodeAt(--p););if(h=h.slice(d,++p)){if(p-=d,m&&B.DEBUG&&15<p&&(c<e||e!==i(e)))throw Error(s+_.s*e);if(A<(l=l-d-1))_.c=_.e=null;else if(l<z)_.c=[_.e=0];else{if(_.e=l,_.c=[],d=(l+1)%u,l<0&&(d+=u),d<p){for(d&&_.c.push(+h.slice(0,d)),p-=u;d<p;)_.c.push(+h.slice(d,d+=u));h=h.slice(d),d=u-h.length}else d-=p;for(;d--;h+="0");_.c.push(+h)}}else _.c=[_.e=0]}function J(e,t,n,r){var a,i,o,s,l;if(null==n?n=C:y(n,0,8),!e.c)return e.toString();if(a=e.c[0],o=e.e,null==t)l=_(e.c),l=1==r||2==r&&(o<=H||P<=o)?b(l,o):v(l,o,"0");else if(i=(e=V(new B(e),t,n)).e,s=(l=_(e.c)).length,1==r||2==r&&(t<=i||i<=H)){for(;s<t;l+="0",s++);l=b(l,i)}else if(t-=o,l=v(l,i,"0"),s<i+1){if(0<--t)for(l+=".";t--;l+="0");}else if(0<(t+=i-s))for(i+1==s&&(l+=".");t--;l+="0");return e.s<0&&a?"-"+l:l}function U(e,t){for(var n,r=1,a=new B(e[0]);r<e.length;r++){if(!(n=new B(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*u-1)>A?e.c=e.e=null:e.c=n<z?[e.e=0]:(e.e=n,t),e}function V(e,t,n,r){var o,s,c,m,p,h,_,f=e.c,y=d;if(f){e:{for(o=1,m=f[0];10<=m;m/=10,o++);if((s=t-o)<0)s+=u,c=t,_=(p=f[h=0])/y[o-c-1]%10|0;else if((h=a((s+1)/u))>=f.length){if(!r)break e;for(;f.length<=h;f.push(0));p=_=0,c=(s%=u)-u+(o=1)}else{for(p=m=f[h],o=1;10<=m;m/=10,o++);_=(c=(s%=u)-u+o)<0?0:p/y[o-c-1]%10|0}if(r=r||t<0||null!=f[h+1]||(c<0?p:p%y[o-c-1]),r=n<4?(_||r)&&(0==n||n==(e.s<0?3:2)):5<_||5==_&&(4==n||r||6==n&&(0<s?0<c?p/y[o-c]:0:f[h-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=y[(u-t%u)%u],e.e=-t||0):f[0]=e.e=0,e;if(0==s?(f.length=h,m=1,h--):(f.length=h+1,m=y[u-s],f[h]=0<c?i(p/y[o-c]%y[c])*m:0),r)for(;;){if(0==h){for(s=1,c=f[0];10<=c;c/=10,s++);for(c=f[0]+=m,m=1;10<=c;c/=10,m++);s!=m&&(e.e++,f[0]==l&&(f[0]=1));break}if(f[h]+=m,f[h]!=l)break;f[h--]=0,m=1}for(s=f.length;0===f[--s];f.pop());}e.e>A?e.c=e.e=null:e.e<z&&(e.c=[e.e=0])}return e}function G(e){var t,n=e.e;return null===n?e.toString():(t=_(e.c),t=n<=H||P<=n?b(t,n):v(t,n,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(o+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(y(n=e[t],0,p,t),E=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(y(n=e[t],0,8,t),C=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(y(n[0],-p,0,t),y(n[1],0,p,t),H=n[0],P=n[1]):(y(n,-p,p,t),H=-(P=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)y(n[0],-p,-1,t),y(n[1],1,p,t),z=n[0],A=n[1];else{if(y(n,-p,p,t),!n)throw Error(o+t+" cannot be zero: "+n);z=-(A=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(o+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw N=!n,Error(o+"crypto unavailable");N=n}else N=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(n=e[t],0,9,t),F=n),e.hasOwnProperty(t="POW_PRECISION")&&(y(n=e[t],0,p,t),R=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(o+t+" not an object: "+n);W=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(o+t+" invalid: "+n);I=n}}return{DECIMAL_PLACES:E,ROUNDING_MODE:C,EXPONENTIAL_AT:[H,P],RANGE:[z,A],CRYPTO:N,MODULO_MODE:F,POW_PRECISION:R,FORMAT:W,ALPHABET:I}},B.isBigNumber=function(e){return e instanceof B||e&&!0===e._isBigNumber||!1},B.maximum=B.max=function(){return U(arguments,j.lt)},B.minimum=B.min=function(){return U(arguments,j.gt)},B.random=(k=9007199254740992,L=Math.random()*k&2097151?function(){return i(Math.random()*k)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,s,l,c=0,m=[],h=new B(x);if(null==e?e=E:y(e,0,p),s=a(e/u),N)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(s*=2));c<s;)9e15<=(l=131072*t[c]+(t[c+1]>>>11))?(n=crypto.getRandomValues(new Uint32Array(2)),t[c]=n[0],t[c+1]=n[1]):(m.push(l%1e14),c+=2);c=s/2}else{if(!crypto.randomBytes)throw N=!1,Error(o+"crypto unavailable");for(t=crypto.randomBytes(s*=7);c<s;)9e15<=(l=281474976710656*(31&t[c])+1099511627776*t[c+1]+4294967296*t[c+2]+16777216*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])?crypto.randomBytes(7).copy(t,c):(m.push(l%1e14),c+=7);c=s/7}if(!N)for(;c<s;)(l=L())<9e15&&(m[c++]=l%1e14);for(s=m[--c],e%=u,s&&e&&(l=d[u-e],m[c]=i(s/l)*l);0===m[c];m.pop(),c--);if(c<0)m=[r=0];else{for(r=-1;0===m[0];m.splice(0,1),r-=u);for(c=1,l=m[0];10<=l;l/=10,c++);c<u&&(r-=u-c)}return h.e=r,h.c=m,h}),B.sum=function(){for(var e=1,t=arguments,n=new B(t[0]);e<t.length;)n=n.plus(t[e++]);return n},M=function(){var e="0123456789";function t(e,t,n,r){for(var a,i,o=[0],s=0,l=e.length;s<l;){for(i=o.length;i--;o[i]*=t);for(o[0]+=r.indexOf(e.charAt(s++)),a=0;a<o.length;a++)o[a]>n-1&&(null==o[a+1]&&(o[a+1]=0),o[a+1]+=o[a]/n|0,o[a]%=n)}return o.reverse()}return function(r,a,i,o,s){var l,u,c,d,m,p,h,f,y=r.indexOf("."),g=E,b=C;for(0<=y&&(d=R,R=0,r=r.replace(".",""),p=(f=new B(a)).pow(r.length-y),R=d,f.c=t(v(_(p.c),p.e,"0"),10,i,e),f.e=f.c.length),c=d=(h=t(r,a,i,s?(l=I,e):(l=e,I))).length;0==h[--d];h.pop());if(!h[0])return l.charAt(0);if(y<0?--c:(p.c=h,p.e=c,p.s=o,h=(p=n(p,f,g,b,i)).c,m=p.r,c=p.e),y=h[u=c+g+1],d=i/2,m=m||u<0||null!=h[u+1],m=b<4?(null!=y||m)&&(0==b||b==(p.s<0?3:2)):d<y||y==d&&(4==b||m||6==b&&1&h[u-1]||b==(p.s<0?8:7)),u<1||!h[0])r=m?v(l.charAt(1),-g,l.charAt(0)):l.charAt(0);else{if(h.length=u,m)for(--i;++h[--u]>i;)h[u]=0,u||(++c,h=[1].concat(h));for(d=h.length;!h[--d];);for(y=0,r="";y<=d;r+=l.charAt(h[y++]));r=v(r,c,l.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,o,s=0,l=e.length,u=t%m,c=t/m|0;for(e=e.slice();l--;)s=((a=u*(i=e[l]%m)+(r=c*i+(o=e[l]/m|0)*u)%m*m+s)/n|0)+(r/m|0)+c*o,e[l]=a%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=r<n?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(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));}return function(r,a,o,s,c){var d,m,p,_,f,y,g,b,v,M,w,k,L,Y,D,T,S,O=r.s==a.s?1:-1,j=r.c,x=a.c;if(!(j&&j[0]&&x&&x[0]))return new B(r.s&&a.s&&(j?!x||j[0]!=x[0]:x)?j&&0==j[0]||!x?0*O:O/0:NaN);for(v=(b=new B(O)).c=[],O=o+(m=r.e-a.e)+1,c||(c=l,m=h(r.e/u)-h(a.e/u),O=O/u|0),p=0;x[p]==(j[p]||0);p++);if(x[p]>(j[p]||0)&&m--,O<0)v.push(1),_=!0;else{for(Y=j.length,T=x.length,O+=2,1<(f=i(c/(x[p=0]+1)))&&(x=e(x,f,c),j=e(j,f,c),T=x.length,Y=j.length),L=T,w=(M=j.slice(0,T)).length;w<T;M[w++]=0);S=x.slice(),S=[0].concat(S),D=x[0],x[1]>=c/2&&D++;do{if(f=0,(d=t(x,M,T,w))<0){if(k=M[0],T!=w&&(k=k*c+(M[1]||0)),1<(f=i(k/D)))for(c<=f&&(f=c-1),g=(y=e(x,f,c)).length,w=M.length;1==t(y,M,g,w);)f--,n(y,T<g?S:x,g,c),g=y.length,d=1;else 0==f&&(d=f=1),g=(y=x.slice()).length;if(g<w&&(y=[0].concat(y)),n(M,y,w,c),w=M.length,-1==d)for(;t(x,M,T,w)<1;)f++,n(M,T<w?S:x,w,c),w=M.length}else 0===d&&(f++,M=[0]);v[p++]=f,M[0]?M[w++]=j[L]||0:(M=[j[L]],w=1)}while((L++<Y||null!=M[0])&&O--);_=null!=M[0],v[0]||v.splice(0,1)}if(c==l){for(p=1,O=v[0];10<=O;O/=10,p++);V(b,o+(b.e=p+m*u-1)+1,s,_)}else b.e=m,b.r=+_;return b}}(),Y=/^(-?)0([xbo])(?=\w[\w.]*$)/i,D=/^([^.]+)\.$/,T=/^\.([^.]+)$/,S=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,w=function(e,t,n,r){var a,i=n?t:t.replace(O,"");if(S.test(i))e.s=isNaN(i)?null:i<0?-1:1,e.c=e.e=null;else{if(!n&&(i=i.replace(Y,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(D,"$1").replace(T,"0.$1")),t!=i))return new B(i,a);if(B.DEBUG)throw Error(o+"Not a"+(r?" base "+r:"")+" number: "+t);e.c=e.e=e.s=null}},j.absoluteValue=j.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},j.comparedTo=function(e,t){return f(this,new B(e,t))},j.decimalPlaces=j.dp=function(e,t){var n,r,a;if(null!=e)return y(e,0,p),null==t?t=C:y(t,0,8),V(new B(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((a=n.length-1)-h(this.e/u))*u,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},j.dividedBy=j.div=function(e,t){return n(this,new B(e,t),E,C)},j.dividedToIntegerBy=j.idiv=function(e,t){return n(this,new B(e,t),0,1)},j.exponentiatedBy=j.pow=function(e,t){var n,r,s,l,c,d,m,p,h=this;if((e=new B(e)).c&&!e.isInteger())throw Error(o+"Exponent not an integer: "+G(e));if(null!=t&&(t=new B(t)),c=14<e.e,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return p=new B(Math.pow(+G(h),c?2-g(e):+G(e))),t?p.mod(t):p;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(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]||c&&24e7<=h.c[1]:h.c[0]<8e13||c&&h.c[0]<=9999975e7)))return l=h.s<0&&g(e)?-0:0,-1<h.e&&(l=1/l),new B(d?1/l:l);R&&(l=a(R/u+2))}for(m=c?(n=new B(.5),d&&(e.s=1),g(e)):(s=Math.abs(+G(e)))%2,p=new B(x);;){if(m){if(!(p=p.times(h)).c)break;l?p.c.length>l&&(p.c.length=l):r&&(p=p.mod(t))}if(s){if(0===(s=i(s/2)))break;m=s%2}else if(V(e=e.times(n),e.e+1,1),14<e.e)m=g(e);else{if(0==(s=+G(e)))break;m=s%2}h=h.times(h),l?h.c&&h.c.length>l&&(h.c.length=l):r&&(h=h.mod(t))}return r?p:(d&&(p=x.div(p)),t?p.mod(t):l?V(p,R,C,void 0):p)},j.integerValue=function(e){var t=new B(this);return null==e?e=C:y(e,0,8),V(t,t.e+1,e)},j.isEqualTo=j.eq=function(e,t){return 0===f(this,new B(e,t))},j.isFinite=function(){return!!this.c},j.isGreaterThan=j.gt=function(e,t){return 0<f(this,new B(e,t))},j.isGreaterThanOrEqualTo=j.gte=function(e,t){return 1===(t=f(this,new B(e,t)))||0===t},j.isInteger=function(){return!!this.c&&h(this.e/u)>this.c.length-2},j.isLessThan=j.lt=function(e,t){return f(this,new B(e,t))<0},j.isLessThanOrEqualTo=j.lte=function(e,t){return-1===(t=f(this,new B(e,t)))||0===t},j.isNaN=function(){return!this.s},j.isNegative=function(){return this.s<0},j.isPositive=function(){return 0<this.s},j.isZero=function(){return!!this.c&&0==this.c[0]},j.minus=function(e,t){var n,r,a,i,o=this,s=o.s;if(t=(e=new B(e,t)).s,!s||!t)return new B(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/u,d=e.e/u,m=o.c,p=e.c;if(!c||!d){if(!m||!p)return m?(e.s=-t,e):new B(p?o:NaN);if(!m[0]||!p[0])return p[0]?(e.s=-t,e):new B(m[0]?o:3==C?-0:0)}if(c=h(c),d=h(d),m=m.slice(),s=c-d){for((a=(i=s<0)?(s=-s,m):(d=c,p)).reverse(),t=s;t--;a.push(0));a.reverse()}else for(r=(i=(s=m.length)<(t=p.length))?s:t,s=t=0;t<r;t++)if(m[t]!=p[t]){i=m[t]<p[t];break}if(i&&(a=m,m=p,p=a,e.s=-e.s),0<(t=(r=p.length)-(n=m.length)))for(;t--;m[n++]=0);for(t=l-1;s<r;){if(m[--r]<p[r]){for(n=r;n&&!m[--n];m[n]=t);--m[n],m[r]+=l}m[r]-=p[r]}for(;0==m[0];m.splice(0,1),--d);return m[0]?q(e,m,d):(e.s=3==C?-1:1,e.c=[e.e=0],e)},j.modulo=j.mod=function(e,t){var r,a,i=this;return e=new B(e,t),!i.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||i.c&&!i.c[0]?new B(i):(9==F?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,F),(e=i.minus(r.times(e))).c[0]||1!=F||(e.s=i.s),e)},j.multipliedBy=j.times=function(e,t){var n,r,a,i,o,s,c,d,p,_,f,y,g,b,v,M=this,w=M.c,k=(e=new B(e,t)).c;if(!(w&&k&&w[0]&&k[0]))return!M.s||!e.s||w&&!w[0]&&!k||k&&!k[0]&&!w?e.c=e.e=e.s=null:(e.s*=M.s,w&&k?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=h(M.e/u)+h(e.e/u),e.s*=M.s,(c=w.length)<(_=k.length)&&(g=w,w=k,k=g,a=c,c=_,_=a),a=c+_,g=[];a--;g.push(0));for(b=l,v=m,a=_;0<=--a;){for(n=0,f=k[a]%v,y=k[a]/v|0,i=a+(o=c);a<i;)n=((d=f*(d=w[--o]%v)+(s=y*d+(p=w[o]/v|0)*f)%v*v+g[i]+n)/b|0)+(s/v|0)+y*p,g[i--]=d%b;g[i]=n}return n?++r:g.splice(0,1),q(e,g,r)},j.negated=function(){var e=new B(this);return e.s=-e.s||null,e},j.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new B(e,t)).s,!a||!t)return new B(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/u,o=e.e/u,s=r.c,c=e.c;if(!i||!o){if(!s||!c)return new B(a/0);if(!s[0]||!c[0])return c[0]?e:new B(s[0]?r:0*a)}if(i=h(i),o=h(o),s=s.slice(),a=i-o){for((n=0<a?(o=i,c):(a=-a,s)).reverse();a--;n.push(0));n.reverse()}for((a=s.length)-(t=c.length)<0&&(n=c,c=s,s=n,t=a),a=0;t;)a=(s[--t]=s[t]+c[t]+a)/l|0,s[t]=l===s[t]?0:s[t]%l;return a&&(s=[a].concat(s),++o),q(e,s,o)},j.precision=j.sd=function(e,t){var n,r,a;if(null!=e&&e!==!!e)return y(e,1,p),null==t?t=C:y(t,0,8),V(new B(this),e,t);if(!(n=this.c))return null;if(r=(a=n.length-1)*u+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},j.shiftedBy=function(e){return y(e,-c,c),this.times("1e"+e)},j.squareRoot=j.sqrt=function(){var e,t,r,a,i,o=this,s=o.c,l=o.s,u=o.e,c=E+4,d=new B("0.5");if(1!==l||!s||!s[0])return new B(!l||l<0&&(!s||s[0])?NaN:s?o:1/0);if((r=0==(l=Math.sqrt(+G(o)))||l==1/0?(((t=_(s)).length+u)%2==0&&(t+="0"),l=Math.sqrt(+t),u=h((u+1)/2)-(u<0||u%2),new B(t=l==1/0?"1e"+u:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+u)):new B(l+"")).c[0])for((l=(u=r.e)+c)<3&&(l=0);;)if(i=r,r=d.times(i.plus(n(o,i,c,1))),_(i.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))||(V(r,r.e+E+2,1),e=!r.times(r).eq(o));break}if(!a&&(V(i,i.e+E+2,0),i.times(i).eq(o))){r=i;break}c+=4,l+=4,a=1}return V(r,r.e+E+1,C,e)},j.toExponential=function(e,t){return null!=e&&(y(e,0,p),e++),J(this,e,t,1)},j.toFixed=function(e,t){return null!=e&&(y(e,0,p),e=e+this.e+1),J(this,e,t)},j.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=W;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var a,i=r.split("."),s=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",c=i[0],d=i[1],m=this.s<0,p=m?c.slice(1):c,h=p.length;if(l&&(a=s,s=l,h-=l=a),0<s&&0<h){for(a=h%s||s,c=p.substr(0,a);a<h;a+=s)c+=u+p.substr(a,s);0<l&&(c+=u+p.slice(a)),m&&(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||"")},j.toFraction=function(e){var t,r,a,i,s,l,c,m,p,h,f,y,g=this,b=g.c;if(null!=e&&(!(c=new B(e)).isInteger()&&(c.c||1!==c.s)||c.lt(x)))throw Error(o+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+G(c));if(!b)return new B(g);for(t=new B(x),p=r=new B(x),a=m=new B(x),y=_(b),s=t.e=y.length-g.e-1,t.c[0]=d[(l=s%u)<0?u+l:l],e=!e||0<c.comparedTo(t)?0<s?t:p:c,l=A,A=1/0,c=new B(y),m.c[0]=0;h=n(c,t,0,1),1!=(i=r.plus(h.times(a))).comparedTo(e);)r=a,a=i,p=m.plus(h.times(i=p)),m=i,t=c.minus(h.times(i=t)),c=i;return i=n(e.minus(r),a,0,1),m=m.plus(i.times(p)),r=r.plus(i.times(a)),m.s=p.s=g.s,f=n(p,a,s*=2,C).minus(g).abs().comparedTo(n(m,r,s,C).minus(g).abs())<1?[p,a]:[m,r],A=l,f},j.toNumber=function(){return+G(this)},j.toPrecision=function(e,t){return null!=e&&y(e,1,p),J(this,e,t,2)},j.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<=H||P<=a?b(_(n.c),a):v(_(n.c),a,"0"):10===e?v(_((n=V(new B(n),E+a+1,C)).c),n.e,"0"):(y(e,2,I.length,"Base"),M(v(_(n.c),a,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},j.valueOf=j.toJSON=function(){return G(this)},j._isBigNumber=!0,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(j[Symbol.toStringTag]="BigNumber",j[Symbol.for("nodejs.util.inspect.custom")]=j.valueOf),null!=t&&B.set(t),B}()).default=n.BigNumber=n,void 0!==t&&t.exports?t.exports=n:(e||(e="undefined"!=typeof self&&self?self:window),e.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"},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!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){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var a=e("./globalState"),i=e("./validating"),o=e("./parsing"),s=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],l={general:{scale:1024,suffixes:s,marker:"bd"},binary:{scale:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],marker:"b"},decimal:{scale:1e3,suffixes:s,marker:"d"}},u={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1};function c(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=o.parseFormat(t)),!i.validateFormat(t))return"ERROR: invalid format";var r=t.prefix||"",s=t.postfix||"",c=function(e,t,n){switch(t.output){case"currency":return function(e,t,n){var r=n.currentCurrency(),a=Object.assign({},u,t),i=void 0,o="",s=!!a.totalLength||!!a.forceAverage||a.average,l=t.currencyPosition||r.position,c=t.currencySymbol||r.symbol;a.spaceSeparated&&(o=" "),"infix"===l&&(i=o+c+o);var d=h({instance:e,providedFormat:t,state:n,decimalSeparator:i});return"prefix"===l&&(d=e._value<0&&"sign"===a.negative?"-".concat(o).concat(c).concat(d.slice(1)):c+o+d),l&&"postfix"!==l||(d=d+(o=s?"":o)+c),d}(e,t=_(t,a.currentCurrencyDefaultFormat()),a);case"percent":return function(e,t,n,r){var a=t.prefixSymbol,i=h({instance:r(100*e._value),providedFormat:t,state:n}),o=Object.assign({},u,t);return a?"%".concat(o.spaceSeparated?" ":"").concat(i):"".concat(i).concat(o.spaceSeparated?" ":"","%")}(e,t=_(t,a.currentPercentageDefaultFormat()),a,n);case"byte":return t=_(t,a.currentByteDefaultFormat()),v=e,w=a,k=n,L=(M=t).base||"binary",Y=l[L],T=(D=d(v._value,Y.suffixes,Y.scale)).value,S=D.suffix,O=h({instance:k(T),providedFormat:M,state:w,defaults:w.currentByteDefaultFormat()}),j=w.currentAbbreviations(),"".concat(O).concat(j.spaced?" ":"").concat(S);case"time":return t=_(t,a.currentTimeDefaultFormat()),f=e,y=Math.floor(f._value/60/60),g=Math.floor((f._value-60*y*60)/60),b=Math.round(f._value-60*y*60-60*g),"".concat(y,":").concat(g<10?"0":"").concat(g,":").concat(b<10?"0":"").concat(b);case"ordinal":return r=e,i=t=_(t,a.currentOrdinalDefaultFormat()),s=(o=a).currentOrdinal(),c=Object.assign({},u,i),m=h({instance:r,providedFormat:i,state:o}),p=s(r._value),"".concat(m).concat(c.spaceSeparated?" ":"").concat(p);case"number":default:return h({instance:e,providedFormat:t,numbro:n})}var r,i,o,s,c,m,p,f,y,g,b,v,M,w,k,L,Y,D,T,S,O,j}(e,t,n);return(c=r+c)+s}function d(e,t,n){var r=t[0],a=Math.abs(e);if(n<=a){for(var i=1;i<t.length;++i){var o=Math.pow(n,i),s=Math.pow(n,i+1);if(o<=a&&a<s){r=t[i],e/=o;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function m(e){for(var t="",n=0;n<e;n++)t+="0";return t}function p(e,t){return-1!==e.toString().indexOf("e")?function(e,t){var n=e.toString(),a=r(n.split("e"),2),i=a[0],o=a[1],s=r(i.split("."),2),l=s[0],u=s[1],c=void 0===u?"":u;if(0<+o)n=l+c+m(o-c.length);else{var d=".";d=+l<0?"-0".concat(d):"0".concat(d);var p=(m(-o-1)+Math.abs(l)+c).substr(0,t);p.length<t&&(p+=m(t-p.length)),n=d+p}return 0<+o&&0<t&&(n+=".".concat(m(t))),n}(e,t):(Math.round(+"".concat(e,"e+").concat(t))/Math.pow(10,t)).toFixed(t)}function h(e){var t=e.instance,n=e.providedFormat,i=e.state,o=void 0===i?a:i,s=e.decimalSeparator,l=e.defaults,c=void 0===l?o.currentDefaults():l,d=t._value;if(0===d&&o.hasZeroFormat())return o.getZeroFormat();if(!isFinite(d))return d.toString();var m,h,_,f,y,g,b,v,M=Object.assign({},u,c,n),w=M.totalLength,k=w?0:M.characteristic,L=M.optionalCharacteristic,Y=M.forceAverage,D=!!w||!!Y||M.average,T=w?-1:D&&void 0===n.mantissa?0:M.mantissa,S=!w&&(void 0===n.optionalMantissa?-1===T:M.optionalMantissa),O=M.trimMantissa,j=M.thousandSeparated,x=M.spaceSeparated,E=M.negative,C=M.forceSign,H=M.exponential,P="";if(D){var z=function(e){var t=e.value,n=e.forceAverage,r=e.abbreviations,a=e.spaceSeparated,i=void 0!==a&&a,o=e.totalLength,s=void 0===o?0:o,l="",u=Math.abs(t),c=-1;if(u>=Math.pow(10,12)&&!n||"trillion"===n?(l=r.trillion,t/=Math.pow(10,12)):u<Math.pow(10,12)&&u>=Math.pow(10,9)&&!n||"billion"===n?(l=r.billion,t/=Math.pow(10,9)):u<Math.pow(10,9)&&u>=Math.pow(10,6)&&!n||"million"===n?(l=r.million,t/=Math.pow(10,6)):(u<Math.pow(10,6)&&u>=Math.pow(10,3)&&!n||"thousand"===n)&&(l=r.thousand,t/=Math.pow(10,3)),l&&(l=(i?" ":"")+l),s){var d=t.toString().split(".")[0];c=Math.max(s-d.length,0)}return{value:t,abbreviation:l,mantissaPrecision:c}}({value:d,forceAverage:Y,abbreviations:o.currentAbbreviations(),spaceSeparated:x,totalLength:w});d=z.value,P+=z.abbreviation,w&&(T=z.mantissaPrecision)}if(H){var A=(h=(m={value:d,characteristicPrecision:k}).value,f=void 0===(_=m.characteristicPrecision)?0:_,g=(y=r(h.toExponential().split("e"),2))[0],b=y[1],v=+g,f&&1<f&&(v*=Math.pow(10,f-1),b=0<=(b=+b-(f-1))?"+".concat(b):b),{value:v,abbreviation:"e".concat(b)});d=A.value,P=A.abbreviation+P}var N,F,R,W=function(e,t,n,a,i){if(-1===a)return e;var o=p(t,a),s=r(o.toString().split("."),2),l=s[0],u=s[1],c=void 0===u?"":u;if(c.match(/^0+$/)&&(n||i))return l;var d=c.match(/0+$/);return i&&d?"".concat(l,".").concat(c.toString().slice(0,d.index)):o.toString()}(d.toString(),d,S,T,O);return W=function(e,t,n,r,a){var i=r.currentDelimiters(),o=i.thousands;a=a||i.decimal;var s=i.thousandsSize||3,l=e.toString(),u=l.split(".")[0],c=l.split(".")[1];return n&&(t<0&&(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)+o+u.slice(e+t)})),t<0&&(u="-".concat(u))),c?u+a+c:u}(W=function(e,t,n,a){var i=e,o=r(i.toString().split("."),2),s=o[0],l=o[1];if(s.match(/^-?0$/)&&n)return l?"".concat(s.replace("0",""),".").concat(l):s.replace("0","");if(s.length<a)for(var u=a-s.length,c=0;c<u;c++)i="0".concat(i);return i.toString()}(W,0,L,k),d,j,o,s),(D||H)&&(W+=P),(C||d<0)&&(N=W,R=E,W=0===(F=d)?N:0==+N?N.replace("-",""):0<F?"+".concat(N):"sign"===R?N:"(".concat(N.replace("-",""),")")),W}function _(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 c.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=l.general;return d(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=l.binary;return d(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=l.decimal;return d(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},formatOrDefault:_}}},{"./globalState":4,"./parsing":8,"./validating":10}],4:[function(e,t,n){"use strict";var r=e("./en-US"),a=e("./validating"),i=e("./parsing"),o={},s=void 0,l={},u=null,c={};function d(e){s=e}function m(){return l[s]}o.languages=function(){return Object.assign({},l)},o.currentLanguage=function(){return s},o.currentCurrency=function(){return m().currency},o.currentAbbreviations=function(){return m().abbreviations},o.currentDelimiters=function(){return m().delimiters},o.currentOrdinal=function(){return m().ordinal},o.currentDefaults=function(){return Object.assign({},m().defaults,c)},o.currentOrdinalDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().ordinalFormat)},o.currentByteDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().byteFormat)},o.currentPercentageDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().percentageFormat)},o.currentCurrencyDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().currencyFormat)},o.currentTimeDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().timeFormat)},o.setDefaults=function(e){e=i.parseFormat(e),a.validateFormat(e)&&(c=e)},o.getZeroFormat=function(){return u},o.setZeroFormat=function(e){return u="string"==typeof e?e:null},o.hasZeroFormat=function(){return null!==u},o.languageData=function(e){if(e){if(l[e])return l[e];throw new Error('Unknown tag "'.concat(e,'"'))}return m()},o.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)},o.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)},o.registerLanguage(r),s=r.languageTag,t.exports=o},{"./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),i=t;return n.isNumbro(t)&&(i=t._value),i=new r(i),e._value=a.minus(i).toNumber(),e}t.exports=function(e){return{add:function(t,n){return i=n,o=e,s=new r((a=t)._value),l=i,o.isNumbro(i)&&(l=i._value),l=new r(l),a._value=s.plus(l).toNumber(),a;var a,i,o,s,l},subtract:function(t,n){return a(t,n,e)},multiply:function(t,n){return i=n,o=e,s=new r((a=t)._value),l=i,o.isNumbro(i)&&(l=i._value),l=new r(l),a._value=s.times(l).toNumber(),a;var a,i,o,s,l},divide:function(t,n){return i=n,o=e,s=new r((a=t)._value),l=i,o.isNumbro(i)&&(l=i._value),l=new r(l),a._value=s.dividedBy(l).toNumber(),a;var a,i,o,s,l},set:function(t,n){return r=t,i=a=n,e.isNumbro(a)&&(i=a._value),r._value=i,r;var r,a,i},difference:function(t,n){return r=n,a(o=(i=e)(t._value),r,i),Math.abs(o._value);var r,i,o}}}},{"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"),i=e("./validating"),o=e("./loading")(p),s=e("./unformatting"),l=e("./formatting")(p),u=e("./manipulating")(p),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 p(this._value)}},{key:"format",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return l.format(this,e)}},{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(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return e.output="time",l.format(this,e)}},{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,m(e))}},{key:"value",value:function(){return this._value}},{key:"valueOf",value:function(){return this._value}}])&&r(t.prototype,n),e}();function m(e){var t=e;return p.isNumbro(e)?t=e._value:"string"==typeof e?t=p.unformat(e):isNaN(e)&&(t=NaN),t}function p(e){return new d(m(e))}p.version="2.1.2",p.isNumbro=function(e){return e instanceof d},p.language=a.currentLanguage,p.registerLanguage=a.registerLanguage,p.setLanguage=a.setLanguage,p.languages=a.languages,p.languageData=a.languageData,p.zeroFormat=a.setZeroFormat,p.defaultFormat=a.currentDefaults,p.setDefaults=a.setDefaults,p.defaultCurrencyFormat=a.currentCurrencyDefaultFormat,p.validate=i.validate,p.loadLanguagesInNode=o.loadLanguagesInNode,p.unformat=s.unformat,t.exports=p},{"./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,i,o,s,l,u,c,d,m,p,h,_,f,y,g,b,v,M=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(n=M,i=M,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=(o=(a=e=(r=(t=e).match(/^{([^}]*)}/))?(n.prefix=r[1],t.slice(r[0].length)):t).match(/{([^}]*)}$/))?(i.postfix=o[1],a.slice(0,-o[0].length)):a,M),s=M,(l=e.match(/[1-9]+[0-9]*/))&&(s.totalLength=+l[0]),u=M,(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,M),d=M,-1!==e.indexOf("a")&&(d.average=!0),p=M,-1!==(m=e).indexOf("K")?p.forceAverage="thousand":-1!==m.indexOf("M")?p.forceAverage="million":-1!==m.indexOf("B")?p.forceAverage="billion":-1!==m.indexOf("T")&&(p.forceAverage="trillion"),function(e,t){var n=e.split(".")[1];if(n){var r=n.match(/0+/);r&&(t.mantissa=r[0].length)}}(e,M),_=M,(h=e).match(/\[\.]/)?_.optionalMantissa=!0:h.match(/\./)&&(_.optionalMantissa=!1),f=M,-1!==e.indexOf(",")&&(f.thousandSeparated=!0),y=M,-1!==e.indexOf(" ")&&(y.spaceSeparated=!0),b=M,(g=e).match(/^\+?\([^)]*\)$/)&&(b.negative="parenthesis"),g.match(/^\+?-/)&&(b.negative="sign"),v=M,e.match(/^\+/)&&(v.forceSign=!0),M)}}},{}],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 i,o,s,l=e("./globalState"),u=l.currentDelimiters(),c=l.currentCurrency().symbol,d=l.currentOrdinal(),m=l.getZeroFormat(),p=l.currentAbbreviations(),h=void 0;if("string"==typeof t)h=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;var n=e.split(":");if(3!==n.length)return!1;var r=+n[0],a=+n[1],i=+n[2];return!isNaN(r)&&!isNaN(a)&&!isNaN(i)}(t,u)?(o=+(i=t.split(":"))[0],s=+i[1],+i[2]+60*s+3600*o):function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",i=3<arguments.length?arguments[3]:void 0,o=4<arguments.length?arguments[4]:void 0,s=5<arguments.length?arguments[5]:void 0,l=6<arguments.length?arguments[6]:void 0;if(""!==e)return e===o?0:function e(t,n){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",o=3<arguments.length?arguments[3]:void 0,s=4<arguments.length?arguments[4]:void 0,l=5<arguments.length?arguments[5]:void 0,u=6<arguments.length?arguments[6]:void 0;if(!isNaN(+t))return+t;var c="",d=t.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(d!==t)return-1*e(d,n,i,o,s,l,u);for(var m=0;m<r.length;m++){var p=r[m];if((c=t.replace(p.key,""))!==t)return e(c,n,i,o,s,l,u)*p.factor}if((c=t.replace("%",""))!==t)return e(c,n,i,o,s,l,u)/100;var h=parseFloat(t);if(!isNaN(h)){var _=o(h);if(_&&"."!==_&&(c=t.replace(new RegExp("".concat(a(_),"$")),""))!==t)return e(c,n,i,o,s,l,u);var f={};Object.keys(l).forEach((function(e){f[l[e]]=e}));for(var y=Object.keys(f).sort().reverse(),g=y.length,b=0;b<g;b++){var v=y[b],M=f[v];if((c=t.replace(v,""))!==t){var w=void 0;switch(M){case"thousand":w=Math.pow(10,3);break;case"million":w=Math.pow(10,6);break;case"billion":w=Math.pow(10,9);break;case"trillion":w=Math.pow(10,12)}return e(c,n,i,o,s,l,u)*w}}}}(function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",r=e.replace(n,"");return(r=r.replace(new RegExp("([0-9])".concat(a(t.thousands),"([0-9])"),"g"),"$1$2")).replace(t.decimal,".")}(e,t,n),t,n,i,o,s,l)}(t,u,c,d,m,p,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(r="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 a=e("./unformatting"),i=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,o={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",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",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"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`"}},s={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",ordinal:{type:"function",mandatory:!0},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 l(e){return!!a.unformat(e)}function u(e,t,n){var a=3<arguments.length&&void 0!==arguments[3]&&arguments[3],i=Object.keys(e).map((function(a){if(!t[a])return console.error("".concat(n," Invalid key: ").concat(a)),!1;var i=e[a],s=t[a];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!u(i,o,"[Validate ".concat(a,"]"),!0))return!1}else if(r(i)!==s.type)return console.error("".concat(n," ").concat(a,' type mismatched: "').concat(s.type,'" expected, "').concat(r(i),'" provided')),!1;if(s.restrictions&&s.restrictions.length)for(var l=s.restrictions.length,c=0;c<l;c++){var d=s.restrictions[c],m=d.restriction,p=d.message;if(!m(i,e))return console.error("".concat(n," ").concat(a," invalid value: ").concat(p)),!1}return s.restriction&&!s.restriction(i,e)?(console.error("".concat(n," ").concat(a," invalid value: ").concat(s.message)),!1):s.validValues&&-1===s.validValues.indexOf(i)?(console.error("".concat(n," ").concat(a," invalid value: must be among ").concat(JSON.stringify(s.validValues),', "').concat(i,'" provided')),!1):!(s.children&&!u(i,s.children,"[Validate ".concat(a,"]")))}));return a||i.push.apply(i,function(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")}()}(Object.keys(t).map((function(r){var a=t[r];if("string"==typeof a&&(a={type:a}),a.mandatory){var i=a.mandatory;if("function"==typeof i&&(i=i(e)),i&&void 0===e[r])return console.error("".concat(n,' Missing mandatory key "').concat(r,'"')),!1}return!0})))),i.reduce((function(e,t){return e&&t}),!0)}function c(e){return u(e,o,"[Validate format]")}t.exports={validate:function(e,t){var n=l(e),r=c(t);return n&&r},validateFormat:c,validateInput:l,validateLanguage:function(e){return u(e,s,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7)},function(e,t,n){
59
  /*!
60
  * Pikaday
61
  *
62
  * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
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,i=function(e,t,r,a){n?e.addEventListener(t,r,!!a):e.attachEvent("on"+t,r)},o=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=f(a,n),e.dispatchEvent(a)):r.createEventObject&&(a=r.createEventObject(),a=f(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},m=function(e){return e%4==0&&e%100!=0||e%400==0},p=function(e,t){return[31,m(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)},_=function(e,t){return e.getTime()===t.getTime()},f=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]=f({},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},g={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},b=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>"},M=function(e,t){return"<tr>"+(t?e.reverse():e).join("")+"</tr>"},w=function(e,t,n,r,a,i){var o,s,l,c,d,m=e._o,p=n===m.minYear,h=n===m.maxYear,_='<div id="'+i+'" class="pika-title" role="heading" aria-live="assertive">',f=!0,y=!0;for(l=[],o=0;o<12;o++)l.push('<option value="'+(n===a?o-t:12+o-t)+'"'+(o===r?' selected="selected"':"")+(p&&o<m.minMonth||h&&o>m.maxMonth?'disabled="disabled"':"")+">"+m.i18n.months[o]+"</option>");for(c='<div class="pika-label">'+m.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",u(m.yearRange)?(o=m.yearRange[0],s=m.yearRange[1]+1):(o=n-m.yearRange,s=1+n+m.yearRange),l=[];o<s&&o<=m.maxYear;o++)o>=m.minYear&&l.push('<option value="'+o+'"'+(o===n?' selected="selected"':"")+">"+o+"</option>");return d='<div class="pika-label">'+n+m.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",m.showMonthAfterYear?_+=d+c:_+=c+d,p&&(0===r||m.minMonth>=r)&&(f=!1),h&&(11===r||m.maxMonth<=r)&&(y=!1),0===t&&(_+='<button class="pika-prev'+(f?"":" is-disabled")+'" type="button">'+m.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(_+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+m.i18n.nextMonth+"</button>"),_+"</div>"},k=function(o){var s=this,u=s.config(o);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;"),i(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:""),i(s.el,"mousedown",s._onMouseDown,!0),i(s.el,"touchend",s._onMouseDown,!0),i(s.el,"change",s._onChange),i(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),i(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",i(u.trigger,"click",s._onInputClick),i(u.trigger,"focus",s._onInputFocus),i(u.trigger,"blur",s._onInputBlur)):this.show()};return k.prototype={config:function(e){this._o||(this._o=f({},g,!0));var t=f(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))||g.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,i=this.getDate(),o=24*parseInt(r)*60*60*1e3;"add"===n?a=new Date(i.valueOf()+o):"subtract"===n&&(a=new Date(i.valueOf()-o)),t&&("add"===n?a=e(i).add(r,"days").toDate():"subtract"===n&&(a=e(i).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=g.minDate,this._o.minYear=g.minYear,this._o.minMonth=g.minMonth,this._o.startRange=g.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=g.maxDate,this._o.maxYear=g.maxYear,this._o.maxMonth=g.maxMonth,this._o.endRange=g.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,i=n.maxYear,o=n.minMonth,s=n.maxMonth,l="";this._y<=r&&(this._y=r,!isNaN(o)&&this._m<o&&(this._m=o)),this._y>=i&&(this._y=i,!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">'+w(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,i,o,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,i=window.innerWidth||r.documentElement.clientWidth,o=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>i||this._o.position.indexOf("right")>-1&&l-n+e.offsetWidth>0)&&(l=l-n+e.offsetWidth),(this._o.reposition&&u+a>o+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,i=p(e,t),o=new Date(e,t,1).getDay(),s=[],l=[];h(a),r.firstDay>0&&(o-=r.firstDay)<0&&(o+=7);for(var u,m,f,y,g=0===t?11:t-1,w=11===t?0:t+1,k=0===t?e-1:e,L=11===t?e+1:e,Y=p(k,g),D=i+o,T=D;T>7;)T-=7;D+=7-T;for(var S=0,O=0;S<D;S++){var j=new Date(e,t,S-o+1),x=!!c(this._d)&&_(j,this._d),E=_(j,a),C=S<o||S>=i+o,H=S-o+1,P=t,z=e,A=r.startRange&&_(r.startRange,j),N=r.endRange&&_(r.endRange,j),F=r.startRange&&r.endRange&&r.startRange<j&&j<r.endRange;C&&(S<o?(H=Y+H,P=g,z=k):(H-=i,P=w,z=L));var R={day:H,month:P,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:C,isStartRange:A,isEndRange:N,isInRange:F,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};l.push(v(R)),7==++O&&(r.showWeekNumber&&l.unshift((u=S-o,m=t,f=e,y=void 0,void 0,y=new Date(f,0,1),'<td class="pika-week">'+Math.ceil(((new Date(f,m,u)-y)/864e5+y.getDay()+1)/7)+"</td>")),s.push(M(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="'+b(e,t)+'">'+b(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&&(i(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&&o(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(),o(this.el,"mousedown",this._onMouseDown,!0),o(this.el,"touchend",this._onMouseDown,!0),o(this.el,"change",this._onChange),this._o.field&&(o(this._o.field,"change",this._onInputChange),this._o.bound&&(o(this._o.trigger,"click",this._onInputClick),o(this._o.trigger,"focus",this._onInputFocus),o(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),i=n(129),o=n.n(i),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,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?a(e.value):new n((function(t){t(e.value)})).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var m={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},p=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,i=n.chartLanguage,o=n.mapsApiKey,s=n.onLoad;e.charts.load(r||"current",{packages:a||["corechart","controls"],language:i||"en",mapsApiKey:o}),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)(o.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,_=function(){return"reactgooglegraph-"+(h+=1)},f=["#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 i=n.headers?"headers="+n.headers:"headers=0",o=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?"+(""+i+s+l+o+u);new e.visualization.Query(c).send((function(e){e.isError()?a("Error in query: "+e.getMessage()+" "+e.getDetailedMessage()):r(e.getDataTable())}))}))]}))}))},g=Object(r.createContext)(m),b=g.Provider,v=g.Consumer,M=function(e){var t=e.children,n=e.value;return Object(r.createElement)(b,{value:n},t)},w=function(e){var t=e.render;return Object(r.createElement)(v,null,(function(e){return t(e)}))},k="#CCCCCC",L=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,i=t.getColumnID(n,a);t.state.hiddenColumns.includes(i)?t.setState((function(e){return u({},e,{hiddenColumns:e.hiddenColumns.filter((function(e){return e!==i})).slice()})})):t.setState((function(e){return u({},e,{hiddenColumns:e.hiddenColumns.concat([i])})}))}}))},t.applyFormatters=function(e,n){for(var r=t.props.google,a=0,i=n;a<i.length;a++){var o=i[a];switch(o.type){case"ArrowFormat":(s=new r.visualization.ArrowFormat(o.options)).format(e,o.column);break;case"BarFormat":(s=new r.visualization.BarFormat(o.options)).format(e,o.column);break;case"ColorFormat":for(var s=new r.visualization.ColorFormat(o.options),l=0,u=o.ranges;l<u.length;l++){var c=u[l];s.addRange.apply(s,c)}s.format(e,o.column);break;case"DateFormat":(s=new r.visualization.DateFormat(o.options)).format(e,o.column);break;case"NumberFormat":(s=new r.visualization.NumberFormat(o.options)).format(e,o.column);break;case"PatternFormat":(s=new r.visualization.PatternFormat(o.options)).format(e,o.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,i=e.columns,o=e.options,s=e.legend_toggle,l=e.legendToggle,u=e.chartType,m=e.formatters,p=e.spreadSheetUrl,h=e.spreadSheetQueryParameters;return c(t,void 0,void 0,(function(){var e,t,c,_,f,g,b,v,M,w,k,L,Y,D;return d(this,(function(d){switch(d.label){case 0:return e=this.props,t=e.google,c=e.googleChartWrapper,f=null,null!==r&&(g=t.visualization.arrayToDataTable(r.old),b=t.visualization.arrayToDataTable(r.new),f=t.visualization[u].prototype.computeDiff(g,b)),null===n?[3,1]:(_=Array.isArray(n)?t.visualization.arrayToDataTable(n):new t.visualization.DataTable(n),[3,5]);case 1:return null===a||null===i?[3,2]:(_=t.visualization.arrayToDataTable([i].concat(a)),[3,5]);case 2:return null===p?[3,4]:[4,y(t,p,h)];case 3:return _=d.sent(),[3,5];case 4:_=t.visualization.arrayToDataTable([]),d.label=5;case 5:for(v=_.getNumberOfColumns(),M=0;M<v;M+=1)w=this.getColumnID(_,M),this.state.hiddenColumns.includes(w)&&(k=_.getColumnLabel(M),L=_.getColumnId(M),Y=_.getColumnType(M),_.removeColumn(M),_.addColumn({label:k,id:L,type:Y}));return D=c.getChart(),"Timeline"===c.getChartType()&&D&&D.clearChart(),c.setChartType(u),c.setOptions(o),c.setDataTable(_),c.draw(),null!==this.props.googleChartDashboard&&this.props.googleChartDashboard.draw(_),null!==f&&(c.setDataTable(f),c.draw()),null!==m&&(this.applyFormatters(_,m),c.setDataTable(_),c.draw()),!0!==l&&!0!==s||this.grayOutHiddenColumns({options:o}),[2]}}))}))},t.grayOutHiddenColumns=function(e){var n=e.options,r=t.props.googleChartWrapper,a=r.getDataTable();if(null!==a){var i=a.getNumberOfColumns();if(!1!==t.state.hiddenColumns.length>0){var o=Array.from({length:i-1}).map((function(e,r){var i=t.getColumnID(a,r+1);return t.state.hiddenColumns.includes(i)?k:void 0!==n.colors&&null!==n.colors?n.colors[r]:f[r]}));r.setOptions(u({},n,{colors:o})),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),Y=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)(w,{render:function(e){return Object(r.createElement)(L,u({},e,{google:t,googleChartWrapper:n,googleChartDashboard:a}))}})},t}(r.Component),D=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 i=function(e){var n=e.eventName,i=e.callback;r.visualization.events.addListener(a,n,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];i({chartWrapper:a,props:t.props,google:r,eventArgs:e})}))},o=0,s=n;o<s.length;o++){i(s[o])}}},t.prototype.render=function(){var e=this,t=this.props,n=t.google,a=t.googleChartWrapper;return Object(r.createElement)(w,{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?_():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,i=r.controls,o=null===i?null:i.map((function(e,n){var r=e.controlID,i=e.controlType,o=e.options,s=e.controlWrapperParams,l=t.getControlID(r,n);return{controlProp:e,control:new a.visualization.ControlWrapper(u({containerId:l,controlType:i,options:o},s))}}));if(null===o)return null;n.bind(o.map((function(e){return e.control})),e);for(var s=function(n){for(var r=n.control,i=n.controlProp.controlEvents,o=function(n){var i=n.callback,o=n.eventName;a.visualization.events.removeListener(r,o,i),a.visualization.events.addListener(r,o,(function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];i({chartWrapper:e,controlWrapper:r,props:t.props,google:a,eventArgs:n})}))},s=0,l=void 0===i?[]:i;s<l.length;s++){o(l[s])}},l=0,c=o;l<c.length;l++){s(c[l])}return o},t.renderChart=function(){var e=t.props,n=e.width,a=e.height,i=e.options,o=e.style,s=e.className,l=e.rootProps,c=e.google,d=u({height:a||i&&i.height,width:n||i&&i.width},o);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)(Y,{googleChartWrapper:t.state.googleChartWrapper,google:c,googleChartDashboard:t.state.googleChartDashboard}),Object(r.createElement)(D,{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,i=e.toolbarItems,o=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),m=this.addControls(c,d);null!==i&&n.visualization.drawToolbar(this.toolbar_ref.current,i);var p=null;null!==o&&o({chartEditor:p=new n.visualization.ChartEditor,chartWrapper:c,google:n}),this.setState({googleChartEditor:p,googleChartControls:m,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,i=n.controlWrapperParams;i&&"state"in i&&this.state.googleChartControls[t].control.setState(i.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,i=e.style,o=u({height:n||a&&a.height,width:t||a&&a.width},i);return null!==this.props.render?Object(r.createElement)("div",{ref:this.dashboard_ref,style:o},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:o},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),O=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,i=e.mapsApiKey,o=e.loader,s=e.errorElement;return Object(r.createElement)(M,{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:o,Object(r.createElement)(p,u({},{chartLanguage:t,chartPackages:n,chartVersion:a,mapsApiKey:i},{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=m,t}(r.Component),j=n(130),x=n.n(j);function E(e){return(E="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 C(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 H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var A=wp.element,N=A.Component,F=A.Fragment,R=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?P(e):t}(this,H(t).apply(this,arguments))).initDataTable=e.initDataTable.bind(P(e)),e.dataRenderer=e.dataRenderer.bind(P(e)),e.table,e.uniqueId=x()(),e}var n,r,a;return 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}}),t&&z(e,t)}(t,e),n=t,(r=[{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(i,r,t)}})),i=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:i,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,n){var r,a=this.props.options;if(void 0===a.series[n])return e;switch(t){case"date":case"datetime":case"timeofday":return a.series[n].format&&a.series[n].format.from&&a.series[n].format.to?jQuery.fn.dataTable.render.moment(a.series[n].format.from,a.series[n].format.to):jQuery.fn.dataTable.render.moment("MM-DD-YYYY");case"num":var i=["","","","",""];return a.series[n].format.thousands&&(i[0]=a.series[n].format.thousands),a.series[n].format.decimal&&(i[1]=a.series[n].format.decimal),a.series[n].format.precision&&(i[2]=a.series[n].format.precision),a.series[n].format.prefix&&(i[3]=a.series[n].format.prefix),a.series[n].format.suffix&&(i[4]=a.series[n].format.suffix),(r=jQuery.fn.dataTable.render).number.apply(r,i);case"boolean":return jQuery.fn.dataTable.render.extra=function(e,t,r){return!0!==e&&"true"!==e||void 0===a.series[n].format||""===a.series[n].format.truthy?!1!==e&&"false"!==e||void 0===a.series[n].format||""===a.series[n].format.falsy?e:a.series[n].format.falsy.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""):a.series[n].format.truthy.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"")},jQuery.fn.dataTable.render.extra}return e}},{key:"render",value:function(){var e=this.props.options;return wp.element.createElement(F,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)}))}}])&&C(n.prototype,r),a&&C(n,a),t}(N),W=n(4),I=n.n(W),B=n(131),J=n.n(B),U=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(I()(e)){for(t in e)return!0;return!1}return"string"==typeof e?0<e.length:null!=e},V=function(e){return J()(e,q)},G=function(e){return e.width="",e.height="",e.backgroundColor={},e.chartArea={},V(e)},$=function(e){try{JSON.parse(e)}catch(e){return!1}return!0};function K(e){return(K="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 Z(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function Q(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){Z(i,r,a,o,s,"next",e)}function s(e){Z(i,r,a,o,s,"throw",e)}o(void 0)}))}}function X(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 ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ne(e,t){return(ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var re=lodash.startCase,ae=wp.i18n.__,ie=wp.apiFetch,oe=wp.element,se=oe.Component,le=oe.Fragment,ue=wp.components,ce=ue.Button,de=ue.Dashicon,me=ue.ExternalLink,pe=ue.Notice,he=ue.Placeholder,_e=ue.Spinner,fe=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==K(t)&&"function"!=typeof t?te(e):t}(this,ee(t).apply(this,arguments))).loadMoreCharts=e.loadMoreCharts.bind(te(e)),e.state={charts:null,isBusy:!1,chartsLoaded:!1,perPage:visualizerLocalize.chartsPerPage},e}var n,r,a,i,o;return 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}}),t&&ne(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(o=Q(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=visualizerLocalize.chartsPerPage,e.next=3,ie({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:(i=Q(regeneratorRuntime.mark((function e(){var t,n,r,a;return regeneratorRuntime.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,ie({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 i.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.state,n=t.charts,r=t.isBusy,a=t.chartsLoaded,i=t.perPage;return wp.element.createElement("div",{className:"visualizer-settings__charts"},wp.element.createElement(pe,{status:"warning",isDismissible:!1},ae("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(me,{href:visualizerLocalize.adminPage},ae("Click here to visit Visualizer Charts Library."))),null!==n?1<=n.length?wp.element.createElement(le,null,wp.element.createElement("div",{className:"visualizer-settings__charts-grid"},Object.keys(n).map((function(t){var r,a,i,o=U(n[t].chart_data);if(r=o["visualizer-settings"].title?o["visualizer-settings"].title:"#".concat(n[t].id),a=0<=["gauge","table","timeline","dataTable"].indexOf(o["visualizer-chart-type"])?"dataTable"===o["visualizer-chart-type"]?o["visualizer-chart-type"]:re(o["visualizer-chart-type"]):"".concat(re(o["visualizer-chart-type"]),"Chart"),!o["visualizer-chart-library"]||"ChartJS"!==o["visualizer-chart-library"])return o["visualizer-data-exploded"]&&(i=ae("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",key:"chart-".concat(n[t].id)},wp.element.createElement("div",{className:"visualizer-settings__charts-title"},r),"dataTable"===a?wp.element.createElement(R,{id:n[t].id,rows:o["visualizer-data"],columns:o["visualizer-series"],chartsScreen:!0,options:G(o["visualizer-settings"])}):(o["visualizer-data-exploded"],wp.element.createElement(O,{chartType:a,rows:o["visualizer-data"],columns:o["visualizer-series"],options:G(o["visualizer-settings"])})),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:ae("Insert Chart"),onClick:function(){return e.props.getChart(n[t].id)}},wp.element.createElement(de,{icon:"upload"})))}))),!a&&i-1<n.length&&wp.element.createElement(ce,{isPrimary:!0,isLarge:!0,onClick:this.loadMoreCharts,isBusy:r},ae("Load More"))):wp.element.createElement("p",{className:"visualizer-no-charts"},ae("No charts found.")):wp.element.createElement(he,null,wp.element.createElement(_e,null)))}}])&&X(n.prototype,r),a&&X(n,a),t}(se);function ye(e){return(ye="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 ge(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 be(e){return(be=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ve(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Me(e,t){return(Me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var we=wp.i18n.__,ke=wp.element.Component,Le=wp.components,Ye=Le.Button,De=Le.ExternalLink,Te=Le.PanelBody,Se=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==ye(t)&&"function"!=typeof t?ve(e):t}(this,be(t).apply(this,arguments))).uploadInput=React.createRef(),e.fileUploaded=e.fileUploaded.bind(ve(e)),e.uploadImport=e.uploadImport.bind(ve(e)),e.state={uploadLabel:we("Upload")},e}var n,r,a;return 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}}),t&&Me(e,t)}(t,e),n=t,(r=[{key:"fileUploaded",value:function(e){"text/csv"===e.target.files[0].type&&this.setState({uploadLabel:we("Upload")})}},{key:"uploadImport",value:function(){this.props.readUploadedFile(this.uploadInput),this.setState({uploadLabel:we("Uploaded")})}},{key:"render",value:function(){return wp.element.createElement(Te,{title:we("Import data from file"),initialOpen:!1},wp.element.createElement("p",null,we("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,we("If you are unsure about how to format your data CSV then please take a look at this sample: "),wp.element.createElement(De,{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(Ye,{isPrimary:!0,onClick:this.uploadImport},this.state.uploadLabel))}}])&&ge(n.prototype,r),a&&ge(n,a),t}(ke);function Oe(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?Oe(n,!0).forEach((function(t){xe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ee(e){return(Ee="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 Ce(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function He(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){Ce(i,r,a,o,s,"next",e)}function s(e){Ce(i,r,a,o,s,"throw",e)}o(void 0)}))}}function Pe(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 ze(e){return(ze=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ae(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(e,t){return(Ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Fe=wp.i18n.__,Re=wp,We=(Re.apiFetch,Re.apiRequest),Ie=wp.element.Component,Be=wp.components,Je=Be.Button,Ue=Be.ExternalLink,qe=Be.IconButton,Ve=Be.Modal,Ge=Be.PanelBody,$e=Be.SelectControl,Ke=Be.TextControl,Ze=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==Ee(t)&&"function"!=typeof t?Ae(e):t}(this,ze(t).apply(this,arguments))).openModal=e.openModal.bind(Ae(e)),e.initTable=e.initTable.bind(Ae(e)),e.onToggle=e.onToggle.bind(Ae(e)),e.toggleHeaders=e.toggleHeaders.bind(Ae(e)),e.getJSONRoot=e.getJSONRoot.bind(Ae(e)),e.getJSONData=e.getJSONData.bind(Ae(e)),e.getTableData=e.getTableData.bind(Ae(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}var n,r,a,i,o,s,l,u;return 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}}),t&&Ne(e,t)}(t,e),n=t,(r=[{key:"openModal",value:(u=He(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.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 u.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:(l=He(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.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 l.apply(this,arguments)})},{key:"toggleHeaders",value:function(){this.setState({isHeaderPanelOpen:!this.state.isHeaderPanelOpen})}},{key:"getJSONRoot",value:(s=He(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0,endpointRoots:[],endpointPaging:[],table:null}),e.next=3,We({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"===Ee(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"===Ee(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"!==Ee(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 s.apply(this,arguments)})},{key:"getJSONData",value:(o=He(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),e.next=3,We({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"===Ee(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"===Ee(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"!==Ee(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:Fe("Don't use pagination"),value:0}],t.data.paging&&"root>next"===t.data.paging[0]&&n.push({label:Fe("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:(i=He(regeneratorRuntime.mark((function e(){var t,n,r,a,i;return regeneratorRuntime.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,We({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"===Ee(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"===Ee(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"!==Ee(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:(i=e.sent).success?(this.props.JSONImportData(i.data.name,JSON.parse(i.data.series),JSON.parse(i.data.data)),this.setState({isOpen:!1,isLoading:!1})):(alert(i.data.msg),this.setState({isLoading:!1}));case 11:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"render",value:function(){var e=this;return wp.element.createElement(Ge,{title:Fe("Import from JSON"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,Fe("You can choose here to import or synchronize your chart data with a remote JSON source.")),wp.element.createElement("p",null,wp.element.createElement(Ue,{href:"https://docs.themeisle.com/article/1052-how-to-generate-charts-from-json-data-rest-endpoints"},Fe("For more info check this tutorial."))),wp.element.createElement($e,{label:Fe("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:Fe("One-time"),value:"-1"},{label:Fe("Live"),value:"0"},{label:Fe("Each hour"),value:"1"},{label:Fe("Each 12 hours"),value:"12"},{label:Fe("Each day"),value:"24"},{label:Fe("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(Je,{isPrimary:!0,isLarge:!0,onClick:this.openModal},Fe("Modify Parameters")),this.state.isOpen&&wp.element.createElement(Ve,{title:Fe("Import from JSON"),className:"visualizer-json-query-modal",shouldCloseOnClickOutside:!1,onRequestClose:function(){e.setState({isOpen:!1,isTableRendered:!1})}},wp.element.createElement(Ge,{title:Fe("Step 1: Specify the JSON endpoint/URL"),opened:this.state.isFirstStepOpen,onToggle:function(){return e.onToggle("isFirstStepOpen")}},wp.element.createElement("p",null,Fe("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(Ue,{href:"https://docs.themeisle.com/article/1043-visualizer-how-to-extend-rest-endpoints-with-json-response"},Fe("How to extend REST endpoints with JSON response"))),wp.element.createElement(Ke,{placeholder:Fe("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(qe,{icon:"arrow-right-alt2",label:Fe("Add Headers"),onClick:this.toggleHeaders},Fe("Add Headers")),this.state.isHeaderPanelOpen&&wp.element.createElement("div",{className:"visualizer-json-query-modal-headers-panel"},wp.element.createElement($e,{label:Fe("Request Type"),value:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,options:[{value:"GET",label:Fe("GET")},{value:"POST",label:Fe("POST")}],onChange:function(t){var n=je({},e.state.requestHeaders),r=e.state.requestHeaders;n.method=t,r=je({},r,{method:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,Fe("Credentials")),wp.element.createElement(Ke,{label:Fe("Username"),placeholder:Fe("Username/Access Key"),value:this.props.chart["visualizer-json-headers"]&&"object"===Ee(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"===Ee(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.password:e.state.requestHeaders.password},r=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"},Fe("&")),wp.element.createElement(Ke,{label:Fe("Password"),placeholder:Fe("Password/Secret Key"),type:"password",value:this.props.chart["visualizer-json-headers"]&&"object"===Ee(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"===Ee(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.username:e.state.requestHeaders.username,password:t},r=je({},r,{username:n.username,password:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,Fe("OR")),wp.element.createElement(Ke,{label:Fe("Authorization"),placeholder:Fe("e.g. SharedKey <AccountName>:<Signature>"),value:this.props.chart["visualizer-json-headers"]&&"object"!==Ee(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({},r,{auth:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}})),wp.element.createElement(Je,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONRoot},Fe("Fetch Endpoint"))),wp.element.createElement(Ge,{title:Fe("Step 2: Choose the JSON root"),initialOpen:!1,opened:this.state.isSecondStepOpen,onToggle:function(){return e.onToggle("isSecondStepOpen")}},wp.element.createElement("p",null,Fe("If you see Invalid Data, you may have selected the wrong root to fetch data from. Please select an alternative.")),wp.element.createElement($e,{value:this.props.chart["visualizer-json-root"],options:this.state.endpointRoots,onChange:this.props.editJSONRoot}),wp.element.createElement(Je,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONData},Fe("Parse Endpoint"))),wp.element.createElement(Ge,{title:Fe("Step 3: Specify miscellaneous parameters"),initialOpen:!1,opened:this.state.isThirdStepOpen,onToggle:function(){return e.onToggle("isThirdStepOpen")}},"community"!==visualizerLocalize.isPro?wp.element.createElement($e,{value:this.props.chart["visualizer-json-paging"]||0,options:this.state.endpointPaging,onChange:this.props.editJSONPaging}):wp.element.createElement("p",null,Fe("Enable this feature in PRO version!"))),wp.element.createElement(Ge,{title:Fe("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,Fe("Select whether to include the data in the chart. Each column selected will form one series.")),wp.element.createElement("li",null,Fe("If a column is selected to be included, specify its data type.")),wp.element.createElement("li",null,Fe("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,Fe("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(Je,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getTableData},Fe("Save & Show Chart")))))}}])&&Pe(n.prototype,r),a&&Pe(n,a),t}(Ie);function Qe(e){return(Qe="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 Xe(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 et(e,t){return!t||"object"!==Qe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tt(e){return(tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function nt(e,t){return(nt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var rt=wp.i18n.__,at=wp.element.Component,it=wp.components,ot=it.Button,st=it.ExternalLink,lt=it.PanelBody,ut=it.SelectControl,ct=it.TextControl,dt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),et(this,tt(t).apply(this,arguments))}var n,r,a;return 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}}),t&&nt(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this;return wp.element.createElement(lt,{title:rt("Import data from URL"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(lt,{title:rt("One Time Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,rt("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,rt("If you are unsure about how to format your data CSV then please take a look at this sample: "),wp.element.createElement(st,{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,rt("You can also import data from Google Spreadsheet.")),wp.element.createElement(ct,{placeholder:rt("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,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!1)}},rt("Import Data"))),"business"===visualizerLocalize.isPro?wp.element.createElement(lt,{title:rt("Schedule Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,rt("You can choose here to synchronize your chart data with a remote CSV file. ")),wp.element.createElement("p",null,rt("You can also synchronize with your Google Spreadsheet file.")),wp.element.createElement("p",null,rt("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(ct,{placeholder:rt("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(ut,{label:rt("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: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(ot,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!0)}},rt("Save Schedule"))):wp.element.createElement(lt,{title:rt("Schedule Import"),icon:"lock",className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,rt("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(ot,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},rt("Buy Now"))),wp.element.createElement(Ze,{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}))}}])&&Xe(n.prototype,r),a&&Xe(n,a),t}(at);function mt(e){return(mt="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(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function ht(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 _t(e,t){return!t||"object"!==mt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function yt(e,t){return(yt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var gt=wp.i18n.__,bt=wp.apiFetch,vt=wp.element,Mt=vt.Component,wt=vt.Fragment,kt=wp.components,Lt=kt.Button,Yt=kt.PanelBody,Dt=kt.Placeholder,Tt=kt.SelectControl,St=kt.Spinner,Ot=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=_t(this,ft(t).apply(this,arguments))).state={id:"",charts:[]},e}var n,r,a,i,o;return 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}}),t&&yt(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(i=regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.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 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 a=i.apply(e,t);function o(e){pt(a,n,r,o,s,"next",e)}function s(e){pt(a,n,r,o,s,"throw",e)}o(void 0)}))},function(){return o.apply(this,arguments)})},{key:"render",value:function(){var e=this;return"community"!==visualizerLocalize.isPro?wp.element.createElement(Yt,{title:gt("Import from other chart"),initialOpen:!1},1<=this.state.charts.length?wp.element.createElement(wt,null,wp.element.createElement(Tt,{label:gt("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(Lt,{isPrimary:!0,isLarge:!0,isBusy:"getChartData"===this.props.isLoading,onClick:function(){return e.props.getChartData(e.state.id)}},gt("Import Chart"))):wp.element.createElement(Dt,null,wp.element.createElement(St,null))):wp.element.createElement(Yt,{title:gt("Import from other chart"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,gt("Enable this feature in PRO version!")),wp.element.createElement(Lt,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},gt("Buy Now")))}}])&&ht(n.prototype,r),a&&ht(n,a),t}(Mt);function jt(e){return(jt="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 xt(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function Et(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 Ct(e){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ht(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pt(e,t){return(Pt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var zt=wp.i18n.__,At=wp.apiRequest,Nt=wp.components,Ft=Nt.Button,Rt=Nt.ExternalLink,Wt=wp.element,It=Wt.Component,Bt=Wt.Fragment,Jt=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==jt(t)&&"function"!=typeof t?Ht(e):t}(this,Ct(t).apply(this,arguments))).onSave=e.onSave.bind(Ht(e)),e.state={isLoading:!1,success:!1,query:"",name:"",series:{},data:[]},e}var n,r,a,i,o;return 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}}),t&&Pt(e,t)}(t,e),n=t,(r=[{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:(i=regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.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,At({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 a=i.apply(e,t);function o(e){xt(a,n,r,o,s,"next",e)}function s(e){xt(a,n,r,o,s,"throw",e)}o(void 0)}))},function(){return o.apply(this,arguments)})},{key:"render",value:function(){var e=this;return wp.element.createElement(Bt,null,wp.element.createElement("textarea",{className:"visualizer-db-query",placeholder:zt("Your query goes here…")},this.props.chart["visualizer-db-query"]),wp.element.createElement("div",{className:"visualizer-db-query-actions"},wp.element.createElement(Ft,{isLarge:!0,isDefault:!0,isBusy:this.state.isLoading,onClick:this.onSave},zt("Show Results")),wp.element.createElement(Ft,{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)}},zt("Save"))),wp.element.createElement("ul",null,wp.element.createElement("li",null,wp.element.createElement(Rt,{href:"https://docs.themeisle.com/article/970-visualizer-sample-queries-to-generate-charts"},zt("Examples of queries and links to resources that you can use with this feature."))),wp.element.createElement("li",null,zt("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"}))}}])&&Et(n.prototype,r),a&&Et(n,a),t}(It);function Ut(e){return(Ut="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 qt(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 Vt(e){return(Vt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Gt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $t(e,t){return($t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Kt=wp.i18n.__,Zt=wp.element.Component,Qt=wp.components,Xt=Qt.Button,en=Qt.Modal,tn=Qt.PanelBody,nn=Qt.SelectControl,rn=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==Ut(t)&&"function"!=typeof t?Gt(e):t}(this,Vt(t).apply(this,arguments))).save=e.save.bind(Gt(e)),e.state={isOpen:!1},e}var n,r,a;return 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}}),t&&$t(e,t)}(t,e),n=t,(r=[{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(tn,{title:Kt("Import data from database"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,Kt("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(Xt,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},Kt("Buy Now"))):wp.element.createElement(tn,{title:Kt("Import data from database"),initialOpen:!1},wp.element.createElement("p",null,Kt("You can import data from the database here.")),wp.element.createElement("p",null,Kt("How often do you want to refresh the data from the database.")),wp.element.createElement(nn,{label:Kt("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:Kt("Live"),value:"0"},{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(Xt,{isPrimary:!0,isLarge:!0,onClick:function(){return e.setState({isOpen:!0})}},Kt("Create Query")),this.state.isOpen&&wp.element.createElement(en,{title:Kt("Import from database"),onRequestClose:function(){return e.setState({isOpen:!1})},className:"visualizer-db-query-modal",shouldCloseOnClickOutside:!1},wp.element.createElement(Jt,{chart:this.props.chart,changeQuery:this.props.changeQuery,save:this.save})))}}])&&qt(n.prototype,r),a&&qt(n,a),t}(Zt),an=n(132);n(152);function on(e){return(on="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 sn(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 ln(e,t){return!t||"object"!==on(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function un(e){return(un=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function cn(e,t){return(cn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var dn=wp.i18n.__,mn=wp.element.Component,pn=wp.components,hn=pn.Button,_n=pn.ButtonGroup,fn=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=ln(this,un(t).apply(this,arguments))).data=[],e.dates=[],e.types=["string","number","boolean","date","datetime","timeofday"],e}var n,r,a;return 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}}),t&&cn(e,t)}(t,e),n=t,(r=[{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(an.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(_n,null,wp.element.createElement(hn,{isDefault:!0,isLarge:!0,onClick:this.props.toggleModal},dn("Close")),wp.element.createElement(hn,{isPrimary:!0,isLarge:!0,onClick:function(t){e.props.toggleModal(),e.props.editChartData(e.data,"Visualizer_Source_Csv")}},dn("Save"))))}}])&&sn(n.prototype,r),a&&sn(n,a),t}(mn);function yn(e){return(yn="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 gn(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 bn(e){return(bn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mn(e,t){return(Mn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var wn=wp.i18n.__,kn=wp.element,Ln=kn.Component,Yn=kn.Fragment,Dn=wp.components,Tn=Dn.Button,Sn=Dn.Modal,On=Dn.PanelBody,jn=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==yn(t)&&"function"!=typeof t?vn(e):t}(this,bn(t).apply(this,arguments))).toggleModal=e.toggleModal.bind(vn(e)),e.state={isOpen:!1},e}var n,r,a;return 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}}),t&&Mn(e,t)}(t,e),n=t,(r=[{key:"toggleModal",value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:"render",value:function(){return"community"!==visualizerLocalize.isPro?wp.element.createElement(Yn,null,wp.element.createElement(On,{title:wn("Manual Data"),initialOpen:!1},wp.element.createElement("p",null,wn("You can manually edit the chart data using a spreadsheet like editor.")),wp.element.createElement(Tn,{isPrimary:!0,isLarge:!0,isBusy:this.state.isOpen,onClick:this.toggleModal},wn("View Editor"))),this.state.isOpen&&wp.element.createElement(Sn,{title:"Chart Editor",onRequestClose:this.toggleModal,shouldCloseOnClickOutside:!1},wp.element.createElement(fn,{chart:this.props.chart,editChartData:this.props.editChartData,toggleModal:this.toggleModal}))):wp.element.createElement(On,{title:wn("Manual Data"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,wn("Enable this feature in PRO version!")),wp.element.createElement(Tn,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},wn("Buy Now")))}}])&&gn(n.prototype,r),a&&gn(n,a),t}(Ln);function xn(e){return(xn="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(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 Cn(e,t){return!t||"object"!==xn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Hn(e){return(Hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pn(e,t){return(Pn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var zn=wp.i18n.__,An=wp.element.Component,Nn=(wp.blockEditor||wp.editor).ColorPalette,Fn=wp.components,Rn=Fn.BaseControl,Wn=Fn.CheckboxControl,In=Fn.PanelBody,Bn=Fn.SelectControl,Jn=Fn.TextControl,Un=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Cn(this,Hn(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Pn(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"],r=[{label:zn("The tooltip will be displayed when the user hovers over an element"),value:"focus"}];return-1>=["timeline"].indexOf(t)&&(r[1]={label:zn("The tooltip will be displayed when the user selects an element"),value:"selection"}),r[2]={label:zn("The tooltip will not be displayed"),value:"none"},wp.element.createElement(In,{title:zn("General Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(In,{title:zn("Title"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Jn,{label:zn("Chart Title"),help:zn("Text to display above the chart."),value:n.title,onChange:function(t){n.title=t,e.props.edit(n)}}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Bn,{label:zn("Chart Title Position"),help:zn("Where to place the chart title, compared to the chart area."),value:n.titlePosition?n.titlePosition:"out",options:[{label:zn("Inside the chart"),value:"in"},{label:zn("Outside the chart"),value:"out"},{label:zn("None"),value:"none"}],onChange:function(t){n.titlePosition=t,e.props.edit(n)}}),-1>=["table","gauge","geo","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Rn,{label:zn("Chart Title Color")},wp.element.createElement(Nn,{value:n.titleTextStyle.color,onChange:function(t){n.titleTextStyle.color=t,e.props.edit(n)}})),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Bn,{label:zn("Axes Titles Position"),help:zn("Determines where to place the axis titles, compared to the chart area."),value:n.axisTitlesPosition?n.axisTitlesPosition:"out",options:[{label:zn("Inside the chart"),value:"in"},{label:zn("Outside the chart"),value:"out"},{label:zn("None"),value:"none"}],onChange:function(t){n.axisTitlesPosition=t,e.props.edit(n)}})),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(In,{title:zn("Font Styles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bn,{label:zn("Font Family"),help:zn("The default font family for all text in the chart."),value:n.fontName?n.fontName:"Arial",options:[{label:zn("Arial"),value:"Arial"},{label:zn("Sans Serif"),value:"Sans Serif"},{label:zn("Serif"),value:"serif"},{label:zn("Arial"),value:"Arial"},{label:zn("Wide"),value:"Arial black"},{label:zn("Narrow"),value:"Arial Narrow"},{label:zn("Comic Sans MS"),value:"Comic Sans MS"},{label:zn("Courier New"),value:"Courier New"},{label:zn("Garamond"),value:"Garamond"},{label:zn("Georgia"),value:"Georgia"},{label:zn("Tahoma"),value:"Tahoma"},{label:zn("Verdana"),value:"Verdana"}],onChange:function(t){n.fontName=t,e.props.edit(n)}}),wp.element.createElement(Bn,{label:zn("Font Size"),help:zn("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>=["table","gauge","geo","timeline","dataTable"].indexOf(t)&&wp.element.createElement(In,{title:zn("Legend"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bn,{label:zn("Position"),help:zn("Determines where to place the legend, compared to the chart area."),value:n.legend.position?n.legend.position:"right",options:[{label:zn("Left of the chart"),value:"left"},{label:zn("Right of the chart"),value:"right"},{label:zn("Above the chart"),value:"top"},{label:zn("Below the chart"),value:"bottom"},{label:zn("Inside the chart"),value:"in"},{label:zn("Omit the legend"),value:"none"}],onChange:function(r){if("pie"!==t){var a="left"===r?1:0;Object.keys(n.series).map((function(e){n.series[e].targetAxisIndex=a}))}n.legend.position=r,e.props.edit(n)}}),wp.element.createElement(Bn,{label:zn("Alignment"),help:zn("Determines the alignment of the legend."),value:n.legend.alignment?n.legend.alignment:"15",options:[{label:zn("Aligned to the start of the allocated area"),value:"start"},{label:zn("Centered in the allocated area"),value:"center"},{label:zn("Aligned to the end of the allocated area"),value:"end"}],onChange:function(t){n.legend.alignment=t,e.props.edit(n)}}),wp.element.createElement(Rn,{label:zn("Font Color")},wp.element.createElement(Nn,{value:n.legend.textStyle.color,onChange:function(t){n.legend.textStyle.color=t,e.props.edit(n)}}))),-1>=["table","gauge","geo","dataTable"].indexOf(t)&&wp.element.createElement(In,{title:zn("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bn,{label:zn("Trigger"),help:zn("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(Bn,{label:zn("Show Color Code"),help:zn("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:zn("Yes"),value:"1"},{label:zn("No"),value:"0"}],onChange:function(t){n.tooltip.showColorCode=t,e.props.edit(n)}}),0<=["pie"].indexOf(t)&&wp.element.createElement(Bn,{label:zn("Text"),help:zn("Determines what information to display when the user hovers over a pie slice."),value:n.tooltip.text?n.tooltip.text:"both",options:[{label:zn("Display both the absolute value of the slice and the percentage of the whole"),value:"both"},{label:zn("Display only the absolute value of the slice"),value:"value"},{label:zn("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>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(In,{title:zn("Animation"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Wn,{label:zn("Animate on startup?"),help:zn("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(Jn,{label:zn("Duration"),help:zn("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(Bn,{label:zn("Easing"),help:zn("The easing function applied to the animation."),value:n.animation.easing?n.animation.easing:"linear",options:[{label:zn("Constant speed"),value:"linear"},{label:zn("Start slow and speed up"),value:"in"},{label:zn("Start fast and slow down"),value:"out"},{label:zn("Start slow, speed up, then slow down"),value:"inAndOut"}],onChange:function(t){n.animation.easing=t,e.props.edit(n)}})))}}])&&En(n.prototype,r),a&&En(n,a),t}(An);function qn(e){return(qn="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){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 Gn(e,t){return!t||"object"!==qn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $n(e){return($n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kn(e,t){return(Kn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Zn=wp.i18n.__,Qn=wp.element,Xn=Qn.Component,er=Qn.Fragment,tr=(wp.blockEditor||wp.editor).ColorPalette,nr=wp.components,rr=nr.BaseControl,ar=nr.ExternalLink,ir=nr.PanelBody,or=nr.SelectControl,sr=nr.TextControl,lr=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Gn(this,$n(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Kn(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(ir,{title:Zn("Horizontal Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ir,{title:Zn("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(sr,{label:Zn("Axis Title"),help:Zn("The title of the horizontal axis."),value:n.hAxis.title,onChange:function(t){n.hAxis.title=t,e.props.edit(n)}}),wp.element.createElement(or,{label:Zn("Text Position"),help:Zn("Position of the horizontal axis text, relative to the chart area."),value:n.hAxis.textPosition?n.hAxis.textPosition:"out",options:[{label:Zn("Inside the chart"),value:"in"},{label:Zn("Outside the chart"),value:"out"},{label:Zn("None"),value:"none"}],onChange:function(t){n.hAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(or,{label:Zn("Direction"),help:Zn("The direction in which the values along the horizontal axis grow."),value:n.hAxis.direction?n.hAxis.direction:"1",options:[{label:Zn("Identical Direction"),value:"1"},{label:Zn("Reverse Direction"),value:"-1"}],onChange:function(t){n.hAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(rr,{label:Zn("Base Line Color")},wp.element.createElement(tr,{value:n.hAxis.baselineColor,onChange:function(t){n.hAxis.baselineColor=t,e.props.edit(n)}})),wp.element.createElement(rr,{label:Zn("Axis Text Color")},wp.element.createElement(tr,{value:n.hAxis.textStyle.color||n.hAxis.textStyle,onChange:function(t){n.hAxis.textStyle={},n.hAxis.textStyle.color=t,e.props.edit(n)}})),-1>=["column"].indexOf(t)&&wp.element.createElement(er,null,wp.element.createElement(sr,{label:Zn("Number Format"),help:Zn("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,Zn("For number axis labels, this is a subset of the formatting "),wp.element.createElement(ar,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Zn("ICU pattern set.")),Zn(" 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,Zn("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(ar,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},Zn("ICU date and time format."))))),-1>=["column"].indexOf(t)&&wp.element.createElement(er,null,wp.element.createElement(ir,{title:Zn("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(sr,{label:Zn("Count"),help:Zn("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(rr,{label:Zn("Color")},wp.element.createElement(tr,{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(ir,{title:Zn("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(sr,{label:Zn("Count"),help:Zn("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(rr,{label:Zn("Color")},wp.element.createElement(tr,{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(ir,{title:Zn("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(sr,{label:Zn("Maximun Value"),help:Zn("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(sr,{label:Zn("Minimum Value"),help:Zn("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)}}))))}}])&&Vn(n.prototype,r),a&&Vn(n,a),t}(Xn);function ur(e){return(ur="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 cr(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 dr(e,t){return!t||"object"!==ur(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mr(e){return(mr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pr(e,t){return(pr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var hr=wp.i18n.__,_r=wp.element,fr=_r.Component,yr=_r.Fragment,gr=(wp.blockEditor||wp.editor).ColorPalette,br=wp.components,vr=br.BaseControl,Mr=br.ExternalLink,wr=br.PanelBody,kr=br.SelectControl,Lr=br.TextControl,Yr=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),dr(this,mr(t).apply(this,arguments))}var n,r,a;return 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}}),t&&pr(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(wr,{title:hr("Vertical Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(wr,{title:hr("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Lr,{label:hr("Axis Title"),help:hr("The title of the Vertical axis."),value:n.vAxis.title,onChange:function(t){n.vAxis.title=t,e.props.edit(n)}}),wp.element.createElement(kr,{label:hr("Text Position"),help:hr("Position of the Vertical axis text, relative to the chart area."),value:n.vAxis.textPosition?n.vAxis.textPosition:"out",options:[{label:hr("Inside the chart"),value:"in"},{label:hr("Outside the chart"),value:"out"},{label:hr("None"),value:"none"}],onChange:function(t){n.vAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(kr,{label:hr("Direction"),help:hr("The direction in which the values along the Vertical axis grow."),value:n.vAxis.direction?n.vAxis.direction:"1",options:[{label:hr("Identical Direction"),value:"1"},{label:hr("Reverse Direction"),value:"-1"}],onChange:function(t){n.vAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(vr,{label:hr("Base Line Color")},wp.element.createElement(gr,{value:n.vAxis.baselineColor,onChange:function(t){n.vAxis.baselineColor=t,e.props.edit(n)}})),wp.element.createElement(vr,{label:hr("Axis Text Color")},wp.element.createElement(gr,{value:n.vAxis.textStyle.color||n.vAxis.textStyle,onChange:function(t){n.vAxis.textStyle={},n.vAxis.textStyle.color=t,e.props.edit(n)}})),-1>=["bar"].indexOf(t)&&wp.element.createElement(yr,null,wp.element.createElement(Lr,{label:hr("Number Format"),help:hr("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,hr("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Mr,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},hr("ICU pattern set.")),hr(" 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,hr("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Mr,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},hr("ICU date and time format."))))),-1>=["bar"].indexOf(t)&&wp.element.createElement(yr,null,wp.element.createElement(wr,{title:hr("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Lr,{label:hr("Count"),help:hr("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(vr,{label:hr("Color")},wp.element.createElement(gr,{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(wr,{title:hr("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Lr,{label:hr("Count"),help:hr("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(vr,{label:hr("Color")},wp.element.createElement(gr,{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(wr,{title:hr("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Lr,{label:hr("Maximun Value"),help:hr("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(Lr,{label:hr("Minimum Value"),help:hr("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)}}))))}}])&&cr(n.prototype,r),a&&cr(n,a),t}(fr);function Dr(e){return(Dr="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 Tr(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 Sr(e,t){return!t||"object"!==Dr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Or(e){return(Or=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function jr(e,t){return(jr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var xr=wp.i18n.__,Er=wp.element,Cr=Er.Component,Hr=Er.Fragment,Pr=(wp.blockEditor||wp.editor).ColorPalette,zr=wp.components,Ar=zr.BaseControl,Nr=zr.ExternalLink,Fr=zr.PanelBody,Rr=zr.SelectControl,Wr=zr.TextControl,Ir=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Sr(this,Or(t).apply(this,arguments))}var n,r,a;return 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}}),t&&jr(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Fr,{title:xr("Pie Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Hr,null,wp.element.createElement(Wr,{label:xr("Number Format"),help:xr("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,xr("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Nr,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},xr("ICU pattern set.")),xr(" 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,xr("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Nr,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},xr("ICU date and time format.")))),wp.element.createElement(Rr,{label:xr("Is 3D"),help:xr("If set to yes, displays a three-dimensional chart."),value:t.is3D?t.is3D:"0",options:[{label:xr("Yes"),value:"1"},{label:xr("No"),value:"0"}],onChange:function(n){t.is3D=n,e.props.edit(t)}}),wp.element.createElement(Rr,{label:xr("Reverse Categories"),help:xr("If set to yes, will draw slices counterclockwise."),value:t.reverseCategories?t.reverseCategories:"0",options:[{label:xr("Yes"),value:"1"},{label:xr("No"),value:"0"}],onChange:function(n){t.reverseCategories=n,e.props.edit(t)}}),wp.element.createElement(Rr,{label:xr("Slice Text"),help:xr("The content of the text displayed on the slice."),value:t.pieSliceText?t.pieSliceText:"percentage",options:[{label:xr("The percentage of the slice size out of the total"),value:"percentage"},{label:xr("The quantitative value of the slice"),value:"value"},{label:xr("The name of the slice"),value:"label"},{label:xr("The quantitative value and percentage of the slice"),value:"value-and-percentage"},{label:xr("No text is displayed"),value:"none"}],onChange:function(n){t.pieSliceText=n,e.props.edit(t)}}),wp.element.createElement(Wr,{label:xr("Pie Hole"),help:xr("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:xr("0.5"),value:t.pieHole,onChange:function(n){t.pieHole=n,e.props.edit(t)}}),wp.element.createElement(Wr,{label:xr("Start Angle"),help:xr("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(Ar,{label:xr("Slice Border Color")},wp.element.createElement(Pr,{value:t.pieSliceBorderColor,onChange:function(n){t.pieSliceBorderColor=n,e.props.edit(t)}})))}}])&&Tr(n.prototype,r),a&&Tr(n,a),t}(Cr);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){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 Ur(e,t){return!t||"object"!==Br(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qr(e){return(qr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vr(e,t){return(Vr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Gr=wp.i18n.__,$r=wp.element.Component,Kr=(wp.blockEditor||wp.editor).ColorPalette,Zr=wp.components,Qr=Zr.BaseControl,Xr=Zr.PanelBody,ea=Zr.TextControl,ta=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ur(this,qr(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Vr(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Xr,{title:Gr("Residue Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ea,{label:Gr("Visibility Threshold"),help:Gr("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:Gr("0.001388889"),value:t.sliceVisibilityThreshold,onChange:function(n){t.sliceVisibilityThreshold=n,e.props.edit(t)}}),wp.element.createElement(ea,{label:Gr("Residue Slice Label"),help:Gr("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(Qr,{label:Gr("Residue Slice Color")},wp.element.createElement(Kr,{value:t.pieResidueSliceColor,onChange:function(n){t.pieResidueSliceColor=n,e.props.edit(t)}})))}}])&&Jr(n.prototype,r),a&&Jr(n,a),t}($r);function na(e){return(na="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 ra(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 aa(e,t){return!t||"object"!==na(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ia(e){return(ia=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oa(e,t){return(oa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var sa=wp.i18n.__,la=wp.element,ua=la.Component,ca=la.Fragment,da=wp.components,ma=da.PanelBody,pa=da.SelectControl,ha=da.TextControl,_a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),aa(this,ia(t).apply(this,arguments))}var n,r,a;return 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}}),t&&oa(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(ma,{title:sa("Lines Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ha,{label:sa("Line Width"),help:sa("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(ha,{label:sa("Point Size"),help:sa("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(pa,{label:sa("Curve Type"),help:sa("Determines whether the series has to be presented in the legend or not."),value:n.curveType?n.curveType:"none",options:[{label:sa("Straight line without curve"),value:"none"},{label:sa("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(pa,{label:sa("Focus Target"),help:sa("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:sa("Focus on a single data point."),value:"datum"},{label:sa("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(pa,{label:sa("Selection Mode"),help:sa("Determines how many data points an user can select on a chart."),value:n.selectionMode?n.selectionMode:"single",options:[{label:sa("Single data point"),value:"single"},{label:sa("Multiple data points"),value:"multiple"}],onChange:function(t){n.selectionMode=t,e.props.edit(n)}}),wp.element.createElement(pa,{label:sa("Aggregation Target"),help:sa("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:sa("Group selected data by x-value"),value:"category"},{label:sa("Group selected data by series"),value:"series"},{label:sa("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:sa("Show only one tooltip per selection"),value:"none"}],onChange:function(t){n.aggregationTarget=t,e.props.edit(n)}}),wp.element.createElement(ha,{label:sa("Point Opacity"),help:sa("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(ca,null,wp.element.createElement(ha,{label:sa("Area Opacity"),help:sa("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(pa,{label:sa("Is Stacked"),help:sa("If set to yes, series elements are stacked."),value:n.isStacked?n.isStacked:"0",options:[{label:sa("Yes"),value:"1"},{label:sa("No"),value:"0"}],onChange:function(t){n.isStacked=t,e.props.edit(n)}})),-1>=["scatter","area"].indexOf(t)&&wp.element.createElement(pa,{label:sa("Interpolate Nulls"),help:sa("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:sa("Yes"),value:"1"},{label:sa("No"),value:"0"}],onChange:function(t){n.interpolateNulls=t,e.props.edit(n)}}))}}])&&ra(n.prototype,r),a&&ra(n,a),t}(ua);function fa(e){return(fa="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 ya(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 ga(e,t){return!t||"object"!==fa(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ba(e){return(ba=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function va(e,t){return(va=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ma=wp.i18n.__,wa=wp.element.Component,ka=wp.components,La=ka.PanelBody,Ya=ka.SelectControl,Da=ka.TextControl,Ta=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ga(this,ba(t).apply(this,arguments))}var n,r,a;return 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}}),t&&va(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(La,{title:Ma("Bars Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ya,{label:Ma("Focus Target"),help:Ma("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:Ma("Focus on a single data point."),value:"datum"},{label:Ma("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(Ya,{label:Ma("Is Stacked"),help:Ma("If set to yes, series elements are stacked."),value:t.isStacked?t.isStacked:"0",options:[{label:Ma("Yes"),value:"1"},{label:Ma("No"),value:"0"}],onChange:function(n){t.isStacked=n,e.props.edit(t)}}),wp.element.createElement(Da,{label:Ma("Bars Opacity"),help:Ma("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)}}))}}])&&ya(n.prototype,r),a&&ya(n,a),t}(wa);function Sa(e){return(Sa="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){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!t||"object"!==Sa(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xa(e){return(xa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ea(e,t){return(Ea=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ca=wp.i18n.__,Ha=wp.element.Component,Pa=(wp.blockEditor||wp.editor).ColorPalette,za=wp.components,Aa=za.BaseControl,Na=za.PanelBody,Fa=za.SelectControl,Ra=za.TextControl,Wa=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ja(this,xa(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Ea(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Na,{title:Ca("Candles Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Na,{title:Ca("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Fa,{label:Ca("Focus Target"),help:Ca("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:Ca("Focus on a single data point."),value:"datum"},{label:Ca("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(Fa,{label:Ca("Selection Mode"),help:Ca("Determines how many data points an user can select on a chart."),value:t.selectionMode?t.selectionMode:"single",options:[{label:Ca("Single data point"),value:"single"},{label:Ca("Multiple data points"),value:"multiple"}],onChange:function(n){t.selectionMode=n,e.props.edit(t)}}),wp.element.createElement(Fa,{label:Ca("Aggregation Target"),help:Ca("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:Ca("Group selected data by x-value"),value:"category"},{label:Ca("Group selected data by series"),value:"series"},{label:Ca("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:Ca("Show only one tooltip per selection"),value:"none"}],onChange:function(n){t.aggregationTarget=n,e.props.edit(t)}})),wp.element.createElement(Na,{title:Ca("Failing Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ra,{label:Ca("Stroke Width"),help:Ca("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(Aa,{label:Ca("Stroke Color")},wp.element.createElement(Pa,{value:t.candlestick.fallingColor.stroke,onChange:function(n){t.candlestick.fallingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement(Aa,{label:Ca("Fill Color")},wp.element.createElement(Pa,{value:t.candlestick.fallingColor.fill,onChange:function(n){t.candlestick.fallingColor.fill=n,e.props.edit(t)}}))),wp.element.createElement(Na,{title:Ca("Rising Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ra,{label:Ca("Stroke Width"),help:Ca("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(Aa,{label:Ca("Stroke Color")},wp.element.createElement(Pa,{value:t.candlestick.risingColor.stroke,onChange:function(n){t.candlestick.risingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement(Aa,{label:Ca("Fill Color")},wp.element.createElement(Pa,{value:t.candlestick.risingColor.fill,onChange:function(n){t.candlestick.risingColor.fill=n,e.props.edit(t)}}))))}}])&&Oa(n.prototype,r),a&&Oa(n,a),t}(Ha);function Ia(e){return(Ia="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 Ba(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!t||"object"!==Ia(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ua(e){return(Ua=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qa(e,t){return(qa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Va=wp.i18n.__,Ga=wp.element.Component,$a=wp.components,Ka=$a.ExternalLink,Za=$a.PanelBody,Qa=$a.SelectControl,Xa=$a.TextControl,ei=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ja(this,Ua(t).apply(this,arguments))}var n,r,a;return 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}}),t&&qa(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Za,{title:Va("Map Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Za,{title:Va("API"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Xa,{label:Va("API Key"),help:Va("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(Ka,{href:"https://developers.google.com/maps/documentation/javascript/get-api-key"},Va("Get API Keys"))),wp.element.createElement(Za,{title:Va("Region"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Va("A map of the entire world using 'world'.")),wp.element.createElement("li",null,Va("A continent or a sub-continent, specified by its 3-digit code, e.g., '011' for Western Africa. "),wp.element.createElement(Ka,{href:"https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart#Continent_Hierarchy"},Va("More info here."))),wp.element.createElement("li",null,Va("A country, specified by its ISO 3166-1 alpha-2 code, e.g., 'AU' for Australia. "),wp.element.createElement(Ka,{href:"http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"},Va("More info here."))),wp.element.createElement("li",null,Va("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(Ka,{href:"http://en.wikipedia.org/wiki/ISO_3166-2:US"},Va("More info here.")))),wp.element.createElement(Xa,{label:Va("Reigion"),help:Va("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(Za,{title:Va("Resolution"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Va("'countries' - Supported for all regions, except for US state regions.")),wp.element.createElement("li",null,Va("'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,Va("'metros' - Supported for the US country region and US state regions only."))),wp.element.createElement(Qa,{label:Va("Resolution"),help:Va("The resolution of the map borders."),value:t.resolution?t.resolution:"countries",options:[{label:Va("Countries"),value:"countries"},{label:Va("Provinces"),value:"provinces"},{label:Va("Metros"),value:"metros"}],onChange:function(n){t.resolution=n,e.props.edit(t)}})),wp.element.createElement(Za,{title:Va("Display Mode"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Va("'auto' - Choose based on the format of the data.")),wp.element.createElement("li",null,Va("'regions' - This is a region map.")),wp.element.createElement("li",null,Va("'markers' - This is a marker map."))),wp.element.createElement(Qa,{label:Va("Display Mode"),help:Va("Determines which type of map this is."),value:t.displayMode?t.displayMode:"auto",options:[{label:Va("Auto"),value:"auto"},{label:Va("Regions"),value:"regions"},{label:Va("Markers"),value:"markers"}],onChange:function(n){t.displayMode=n,e.props.edit(t)}})),wp.element.createElement(Za,{title:Va("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Qa,{label:Va("Trigger"),help:Va("Determines the user interaction that causes the tooltip to be displayed."),value:t.tooltip.trigger?t.tooltip.trigger:"focus",options:[{label:Va("The tooltip will be displayed when the user hovers over an element"),value:"focus"},{label:Va("The tooltip will not be displayed"),value:"none"}],onChange:function(n){t.tooltip.trigger=n,e.props.edit(t)}})))}}])&&Ba(n.prototype,r),a&&Ba(n,a),t}(Ga);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){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!t||"object"!==ti(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ai(e){return(ai=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ii(e,t){return(ii=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var oi=wp.i18n.__,si=wp.element.Component,li=(wp.blockEditor||wp.editor).ColorPalette,ui=wp.components,ci=ui.BaseControl,di=ui.PanelBody,mi=ui.TextControl,pi=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ri(this,ai(t).apply(this,arguments))}var n,r,a;return 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}}),t&&ii(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(di,{title:oi("Color Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(mi,{label:oi("Minimum Values"),help:oi("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(mi,{label:oi("Maximum Values"),help:oi("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(ci,{label:oi("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(ci,{label:oi("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(ci,{label:oi("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(ci,{label:oi("Dateless Region")},wp.element.createElement(li,{value:t.datalessRegionColor,onChange:function(n){t.datalessRegionColor=n,e.props.edit(t)}})))}}])&&ni(n.prototype,r),a&&ni(n,a),t}(si);function hi(e){return(hi="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){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 fi(e,t){return!t||"object"!==hi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yi(e){return(yi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gi(e,t){return(gi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var bi=wp.i18n.__,vi=wp.element,Mi=vi.Component,wi=vi.Fragment,ki=wp.components,Li=ki.ExternalLink,Yi=ki.PanelBody,Di=ki.TextControl,Ti=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),fi(this,yi(t).apply(this,arguments))}var n,r,a;return 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}}),t&&gi(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Yi,{title:bi("Size Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Di,{label:bi("Minimum Values"),help:bi("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(Di,{label:bi("Maximum Values"),help:bi("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(Di,{label:bi("Minimum Marker Radius"),help:bi("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(Di,{label:bi("Maximum Marker Radius"),help:bi("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(Di,{label:bi("Marker Opacity"),help:bi("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(Di,{label:bi("Number Format"),help:bi("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,bi("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Li,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},bi("ICU pattern set.")),bi(" 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."))))}}])&&_i(n.prototype,r),a&&_i(n,a),t}(Mi);function Si(e){return(Si="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 Oi(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 ji(e,t){return!t||"object"!==Si(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xi(e){return(xi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ei(e,t){return(Ei=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ci=wp.i18n.__,Hi=wp.element.Component,Pi=wp.components,zi=Pi.PanelBody,Ai=Pi.SelectControl,Ni=Pi.TextControl,Fi=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ji(this,xi(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Ei(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(zi,{title:Ci("Magnifying Glass"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ai,{label:Ci("Enabled"),help:Ci("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:Ci("Yes"),value:"1"},{label:Ci("No"),value:"0"}],onChange:function(n){t.magnifyingGlass.enable=n,e.props.edit(t)}}),wp.element.createElement(Ni,{label:Ci("Zoom Factor"),help:Ci("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)}}))}}])&&Oi(n.prototype,r),a&&Oi(n,a),t}(Hi);function Ri(e){return(Ri="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 Wi(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 Ii(e,t){return!t||"object"!==Ri(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bi(e){return(Bi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ji(e,t){return(Ji=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ui=wp.i18n.__,qi=wp.element,Vi=qi.Component,Gi=qi.Fragment,$i=(wp.blockEditor||wp.editor).ColorPalette,Ki=wp.components,Zi=Ki.BaseControl,Qi=Ki.ExternalLink,Xi=Ki.PanelBody,eo=Ki.TextControl,to=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ii(this,Bi(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Ji(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Xi,{title:Ui("Gauge Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Xi,{title:Ui("Tick Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(eo,{label:Ui("Minimum Values"),help:Ui("Determines the minimum values of gauge."),value:t.min,onChange:function(n){t.min=n,e.props.edit(t)}}),wp.element.createElement(eo,{label:Ui("Maximum Values"),help:Ui("Determines the maximum values of gauge."),value:t.max,onChange:function(n){t.max=n,e.props.edit(t)}}),wp.element.createElement(eo,{label:Ui("Minor Ticks"),help:Ui("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(Gi,null,wp.element.createElement(eo,{label:Ui("Number Format"),help:Ui("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,Ui("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Qi,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Ui("ICU pattern set.")),Ui(" 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(Xi,{title:Ui("Green Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(eo,{label:Ui("Minimum Range"),help:Ui("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(eo,{label:Ui("Maximum Range"),help:Ui("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(Zi,{label:Ui("Green Color")},wp.element.createElement($i,{value:t.greenColor,onChange:function(n){t.greenColor=n,e.props.edit(t)}}))),wp.element.createElement(Xi,{title:Ui("Yellow Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(eo,{label:Ui("Minimum Range"),help:Ui("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(eo,{label:Ui("Maximum Range"),help:Ui("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(Zi,{label:Ui("Yellow Color")},wp.element.createElement($i,{value:t.yellowColor,onChange:function(n){t.yellowColor=n,e.props.edit(t)}}))),wp.element.createElement(Xi,{title:Ui("Red Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(eo,{label:Ui("Minimum Range"),help:Ui("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(eo,{label:Ui("Maximum Range"),help:Ui("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(Zi,{label:Ui("Red Color")},wp.element.createElement($i,{value:t.redColor,onChange:function(n){t.redColor=n,e.props.edit(t)}}))))}}])&&Wi(n.prototype,r),a&&Wi(n,a),t}(Vi);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 ro(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 ao(e){return(ao=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function io(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oo(e,t){return(oo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var so=wp.i18n.__,lo=wp.element.Component,uo=(wp.blockEditor||wp.editor).ColorPalette,co=wp.components,mo=co.BaseControl,po=co.CheckboxControl,ho=co.PanelBody,_o=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==no(t)&&"function"!=typeof t?io(e):t}(this,ao(t).apply(this,arguments))).mapValues=e.mapValues.bind(io(e)),e}var n,r,a;return 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}}),t&&oo(e,t)}(t,e),n=t,(r=[{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(ho,{title:so("Timeline Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(po,{label:so("Show Row Label"),help:so("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(po,{label:so("Group by Row Label"),help:so("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(po,{label:so("Color by Row Label"),help:so("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(mo,{label:so("Single Color")},wp.element.createElement(uo,{value:this.mapValues(t,"singleColor"),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.singleColor=n,e.props.edit(t)}})))}}])&&ro(n.prototype,r),a&&ro(n,a),t}(lo);function fo(e){return(fo="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){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 go(e,t){return!t||"object"!==fo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function bo(e){return(bo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vo(e,t){return(vo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Mo=wp.i18n.__,wo=wp.element,ko=wo.Component,Lo=wo.Fragment,Yo=wp.components,Do=Yo.CheckboxControl,To=Yo.PanelBody,So=Yo.SelectControl,Oo=Yo.TextControl,jo=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),go(this,bo(t).apply(this,arguments))}var n,r,a;return 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}}),t&&vo(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-chart-type"];return wp.element.createElement(To,{title:Mo("Table Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"dataTable"===n?wp.element.createElement(Lo,null,wp.element.createElement(Do,{label:Mo("Enable Pagination"),help:Mo("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(Oo,{label:Mo("Number of rows per page"),help:Mo("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(So,{label:Mo("Pagination type"),help:Mo("Determines what type of pagination options to show."),value:t.pagingType,options:[{label:Mo("Page number buttons only"),value:"numbers"},{label:Mo("'Previous' and 'Next' buttons only"),value:"simple"},{label:Mo("'Previous' and 'Next' buttons, plus page numbers"),value:"simple_numbers"},{label:Mo("'First', 'Previous', 'Next' and 'Last' buttons"),value:"full"},{label:Mo("'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers"),value:"full_numbers"},{label:Mo("'First' and 'Last' buttons, plus page numbers"),value:"first_last_numbers"}],onChange:function(n){t.pagingType=n,e.props.edit(t)}}),wp.element.createElement(Do,{label:Mo("Scroll Collapse"),help:Mo("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(Oo,{label:Mo("Vertical Height"),help:Mo("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(Do,{label:Mo("Disable Sort"),help:Mo("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(Do,{label:Mo("Freeze Header/Footer"),help:Mo("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(Do,{label:Mo("Responsive"),help:Mo("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(Lo,null,wp.element.createElement(So,{label:Mo("Enable Pagination"),help:Mo("To enable paging through the data."),value:t.page?t.page:"disable",options:[{label:Mo("Enable"),value:"enable"},{label:Mo("Disable"),value:"disable"}],onChange:function(n){t.page=n,e.props.edit(t)}}),wp.element.createElement(Oo,{label:Mo("Number of rows per page"),help:Mo("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(So,{label:Mo("Disable Sort"),help:Mo("To disable sorting on columns."),value:t.sort?t.sort:"enable",options:[{label:Mo("Enable"),value:"enable"},{label:Mo("Disable"),value:"disable"}],onChange:function(n){t.sort=n,e.props.edit(t)}}),wp.element.createElement(Oo,{label:Mo("Freeze Columns"),help:Mo("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(Do,{label:Mo("Allow HTML"),help:Mo("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(Do,{label:Mo("Right to Left table"),help:Mo("Adds basic support for right-to-left languages."),checked:Number(t.rtlTable),onChange:function(n){t.rtlTable=!Number(t.rtlTable),e.props.edit(t)}})))}}])&&yo(n.prototype,r),a&&yo(n,a),t}(ko);function xo(e){return(xo="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 Eo(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!t||"object"!==xo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ho(e){return(Ho=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Po(e,t){return(Po=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var zo=wp.i18n.__,Ao=wp.element,No=Ao.Component,Fo=Ao.Fragment,Ro=(wp.blockEditor||wp.editor).ColorPalette,Wo=wp.components,Io=Wo.BaseControl,Bo=Wo.PanelBody,Jo=Wo.TextControl,Uo=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Co(this,Ho(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Po(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-chart-type"];return wp.element.createElement(Bo,{title:zo("Row/Cell Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"dataTable"===n?wp.element.createElement(Fo,null,wp.element.createElement(Bo,{title:zo("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Even Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.evenTableRow["background-color"],onChange:function(n){t.customcss.evenTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.evenTableRow.color,onChange:function(n){t.customcss.evenTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.evenTableRow.transform,onChange:function(n){t.customcss.evenTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))):wp.element.createElement(Fo,null,wp.element.createElement(Bo,{title:zo("Header Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.headerRow["background-color"],onChange:function(n){t.customcss.headerRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.headerRow.color,onChange:function(n){t.customcss.headerRow.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.headerRow.transform,onChange:function(n){t.customcss.headerRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.tableRow["background-color"],onChange:function(n){t.customcss.tableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.tableRow.color,onChange:function(n){t.customcss.tableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.tableRow.transform,onChange:function(n){t.customcss.tableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Selected Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.selectedTableRow["background-color"],onChange:function(n){t.customcss.selectedTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.selectedTableRow.color,onChange:function(n){t.customcss.selectedTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.selectedTableRow.transform,onChange:function(n){t.customcss.selectedTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Hover Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.hoverTableRow["background-color"],onChange:function(n){t.customcss.hoverTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.hoverTableRow.color,onChange:function(n){t.customcss.hoverTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.hoverTableRow.transform,onChange:function(n){t.customcss.hoverTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Header Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.headerCell["background-color"],onChange:function(n){t.customcss.headerCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.headerCell.color,onChange:function(n){t.customcss.headerCell.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.headerCell.transform,onChange:function(n){t.customcss.headerCell.transform=n,e.props.edit(t)}})),wp.element.createElement(Bo,{title:zo("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Io,{label:zo("Background Color")},wp.element.createElement(Ro,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Io,{label:zo("Color")},wp.element.createElement(Ro,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(Jo,{label:zo("Text Orientation"),help:zo("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))))}}])&&Eo(n.prototype,r),a&&Eo(n,a),t}(No);function qo(e){return(qo="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 Vo(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 Go(e,t){return!t||"object"!==qo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $o(e){return($o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ko(e,t){return(Ko=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Zo=wp.i18n.__,Qo=wp.element.Component,Xo=wp.components,es=Xo.PanelBody,ts=Xo.SelectControl,ns=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Go(this,$o(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Ko(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(es,{title:Zo("Combo Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ts,{label:Zo("Chart Type"),help:Zo("Select the default chart type."),value:t.seriesType?t.seriesType:"area",options:[{label:Zo("Area"),value:"area"},{label:Zo("Bar"),value:"bars"},{label:Zo("Candlesticks"),value:"candlesticks"},{label:Zo("Line"),value:"line"},{label:Zo("Stepped Area"),value:"steppedArea"}],onChange:function(n){t.seriesType=n,e.props.edit(t)}}))}}])&&Vo(n.prototype,r),a&&Vo(n,a),t}(Qo);function rs(e){return(rs="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 as(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 is(e,t){return!t||"object"!==rs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function os(e){return(os=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ss(e,t){return(ss=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ls=wp.i18n.__,us=wp.element,cs=us.Component,ds=us.Fragment,ms=(wp.blockEditor||wp.editor).ColorPalette,ps=wp.components,hs=ps.BaseControl,_s=ps.ExternalLink,fs=ps.PanelBody,ys=ps.SelectControl,gs=ps.TextControl,bs=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),is(this,os(t).apply(this,arguments))}var n,r,a;return 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}}),t&&ss(e,t)}(t,e),n=t,(r=[{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"],n=this.props.chart["visualizer-settings"],r=this.props.chart["visualizer-series"];return wp.element.createElement(fs,{title:ls("Series Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(n.series).map((function(a,i){return a++,wp.element.createElement(fs,{title:r[a].label,className:"visualizer-inner-sections",initialOpen:!1},-1>=["table","pie"].indexOf(t)&&wp.element.createElement(ys,{label:ls("Visible In Legend"),help:ls("Determines whether the series has to be presented in the legend or not."),value:n.series[i].visibleInLegend?n.series[i].visibleInLegend:"1",options:[{label:ls("Yes"),value:"1"},{label:ls("No"),value:"0"}],onChange:function(t){n.series[i].visibleInLegend=t,e.props.edit(n)}}),-1>=["table","candlestick","combo","column","bar"].indexOf(t)&&wp.element.createElement(ds,null,wp.element.createElement(gs,{label:ls("Line Width"),help:ls("Overrides the global line width value for this series."),value:n.series[i].lineWidth,onChange:function(t){n.series[i].lineWidth=t,e.props.edit(n)}}),wp.element.createElement(gs,{label:ls("Point Size"),help:ls("Overrides the global point size value for this series."),value:n.series[i].pointSize,onChange:function(t){n.series[i].pointSize=t,e.props.edit(n)}})),-1>=["candlestick"].indexOf(t)&&"number"===r[a].type?wp.element.createElement(ds,null,wp.element.createElement(gs,{label:ls("Format"),help:ls("Enter custom format pattern to apply to this series value."),value:n.series[i].format,onChange:function(t){n.series[i].format=t,e.props.edit(n)}}),wp.element.createElement("p",null,ls("For number axis labels, this is a subset of the formatting "),wp.element.createElement(_s,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},ls("ICU pattern set.")),ls(" 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."))):"date"===r[a].type&&wp.element.createElement(ds,null,wp.element.createElement(gs,{label:ls("Date Format"),help:ls("Enter custom format pattern to apply to this series value."),placeholder:"dd LLLL yyyy",value:n.series[i].format,onChange:function(t){n.series[i].format=t,e.props.edit(n)}}),wp.element.createElement("p",null,ls("This is a subset of the date formatting "),wp.element.createElement(_s,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},ls("ICU date and time format.")))),0<=["scatter","line"].indexOf(t)&&wp.element.createElement(ys,{label:ls("Curve Type"),help:ls("Determines whether the series has to be presented in the legend or not."),value:n.series[i].curveType?n.series[i].curveType:"none",options:[{label:ls("Straight line without curve"),value:"none"},{label:ls("The angles of the line will be smoothed"),value:"function"}],onChange:function(t){n.series[i].curveType=t,e.props.edit(n)}}),0<=["area"].indexOf(t)&&wp.element.createElement(gs,{label:ls("Area Opacity"),help:ls("The opacity of the colored area, where 0.0 is fully transparent and 1.0 is fully opaque."),value:n.series[i].areaOpacity,onChange:function(t){n.series[i].areaOpacity=t,e.props.edit(n)}}),0<=["combo"].indexOf(t)&&wp.element.createElement(ys,{label:ls("Chart Type"),help:ls("Select the type of chart to show for this series."),value:n.series[i].type?n.series[i].type:"area",options:[{label:ls("Area"),value:"area"},{label:ls("Bar"),value:"bars"},{label:ls("Candlesticks"),value:"candlesticks"},{label:ls("Line"),value:"line"},{label:ls("Stepped Area"),value:"steppedArea"}],onChange:function(t){n.series[i].type=t,e.props.edit(n)}}),-1>=["table"].indexOf(t)&&wp.element.createElement(hs,{label:ls("Color")},wp.element.createElement(ms,{value:n.series[i].color,onChange:function(t){n.series[i].color=t,e.props.edit(n)}})))})))}}])&&as(n.prototype,r),a&&as(n,a),t}(cs);function vs(e){return(vs="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 Ms(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 ws(e,t){return!t||"object"!==vs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ks(e){return(ks=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ls(e,t){return(Ls=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ys=wp.i18n.__,Ds=wp.element.Component,Ts=(wp.blockEditor||wp.editor).ColorPalette,Ss=wp.components,Os=Ss.BaseControl,js=Ss.PanelBody,xs=Ss.TextControl,Es=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ws(this,ks(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Ls(e,t)}(t,e),n=t,(r=[{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(js,{title:Ys("Slices Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.slices).map((function(r){return wp.element.createElement(js,{title:n[r][0],className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(xs,{label:Ys("Slice Offset"),help:Ys("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)}}),wp.element.createElement(Os,{label:Ys("Format")},wp.element.createElement(Ts,{value:t.slices[r].color,onChange:function(n){t.slices[r].color=n,e.props.edit(t)}})))})))}}])&&Ms(n.prototype,r),a&&Ms(n,a),t}(Ds);function Cs(e){return(Cs="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 Hs(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 Ps(e,t){return!t||"object"!==Cs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zs(e){return(zs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function As(e,t){return(As=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ns=wp.i18n.__,Fs=wp.element,Rs=Fs.Component,Ws=Fs.Fragment,Is=wp.components,Bs=Is.ExternalLink,Js=Is.PanelBody,Us=Is.TextControl,qs=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ps(this,zs(t).apply(this,arguments))}var n,r,a;return 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}}),t&&As(e,t)}(t,e),n=t,(r=[{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-settings"],n=this.props.chart["visualizer-series"],r=this.props.chart["visualizer-chart-type"];return wp.element.createElement(Js,{title:Ns("Column Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.series).map((function(a){return wp.element.createElement(Js,{title:n[a].label,className:"visualizer-inner-sections",initialOpen:!1},("date"===n[a].type||"datetime"===n[a].type||"timeofday"===n[a].type)&&wp.element.createElement(Ws,null,wp.element.createElement(Us,{label:Ns("Display Date Format"),help:Ns("Enter custom format pattern to apply to this series value."),value:t.series[a].format?t.series[a].format.to:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.to=n,e.props.edit(t)}}),wp.element.createElement(Us,{label:Ns("Source Date Format"),help:Ns("What format is the source date in?"),value:t.series[a].format?t.series[a].format.from:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.from=n,e.props.edit(t)}}),wp.element.createElement("p",null,Ns("You can find more info on "),wp.element.createElement(Bs,{href:"https://momentjs.com/docs/#/displaying/"},Ns("date and time formats here.")))),"number"===n[a].type&&wp.element.createElement(Ws,null,wp.element.createElement(Us,{label:Ns("Thousands Separator"),value:t.series[a].format?t.series[a].format.thousands:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.thousands=n,e.props.edit(t)}}),wp.element.createElement(Us,{label:Ns("Decimal Separator"),value:t.series[a].format?t.series[a].format.decimal:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.decimal=n,e.props.edit(t)}}),wp.element.createElement(Us,{label:Ns("Precision"),help:Ns("Round values to how many decimal places?"),value:t.series[a].format?t.series[a].format.precision:"",type:"number",onChange:function(n){100<n||(t.series[a].format||(t.series[a].format={}),t.series[a].format.precision=n,e.props.edit(t))}}),wp.element.createElement(Us,{label:Ns("Prefix"),value:t.series[a].format?t.series[a].format.prefix:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.prefix=n,e.props.edit(t)}}),wp.element.createElement(Us,{label:Ns("Suffix"),value:t.series[a].format?t.series[a].format.suffix:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.suffix=n,e.props.edit(t)}})),"boolean"===n[a].type&&"dataTable"===r&&wp.element.createElement(Ws,null,wp.element.createElement(Us,{label:Ns("Truthy value"),help:Ns("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[a].format?t.series[a].format.truthy:"",onChange:function(n){t.series[a].truthy||(t.series[a].truthy={}),t.series[a].format.truthy=n,e.props.edit(t)}}),wp.element.createElement(Us,{label:Ns("Falsy value"),help:Ns("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[a].format?t.series[a].format.falsy:"",onChange:function(n){t.series[a].falsy||(t.series[a].falsy={}),t.series[a].format.falsy=n,e.props.edit(t)}})))})))}}])&&Hs(n.prototype,r),a&&Hs(n,a),t}(Rs);function Vs(e){return(Vs="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 Gs(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 $s(e,t){return!t||"object"!==Vs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ks(e){return(Ks=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zs(e,t){return(Zs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Qs=wp.i18n.__,Xs=wp.element,el=Xs.Component,tl=Xs.Fragment,nl=(wp.blockEditor||wp.editor).ColorPalette,rl=wp.components,al=rl.BaseControl,il=rl.CheckboxControl,ol=rl.PanelBody,sl=rl.SelectControl,ll=rl.TextControl,ul=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),$s(this,Ks(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Zs(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(ol,{title:Qs("Layout And Chart Area"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ol,{title:Qs("Layout"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ll,{label:Qs("Width of Chart"),help:Qs("Determines the total width of the chart."),value:n.width,onChange:function(t){n.width=t,e.props.edit(n)}}),wp.element.createElement(ll,{label:Qs("Height of Chart"),help:Qs("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(sl,{label:Qs("Keep Aspect Ratio"),help:Qs("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:Qs("Yes"),value:"1"},{label:Qs("No"),value:"0"}],onChange:function(t){n.keepAspectRatio=t,e.props.edit(n)}}),-1>=["gauge"].indexOf(t)&&wp.element.createElement(tl,null,wp.element.createElement(ll,{label:Qs("Stroke Width"),help:Qs("The chart border width in pixels."),value:n.backgroundColor.strokeWidth,onChange:function(t){n.backgroundColor.strokeWidth=t,e.props.edit(n)}}),wp.element.createElement(al,{label:Qs("Stroke Color")},wp.element.createElement(nl,{value:n.backgroundColor.stroke,onChange:function(t){n.backgroundColor.stroke=t,e.props.edit(n)}})),wp.element.createElement(al,{label:Qs("Background Color")},wp.element.createElement(nl,{value:n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill=t,e.props.edit(n)}})),wp.element.createElement(il,{label:Qs("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"].indexOf(t)&&wp.element.createElement(ol,{title:Qs("Chart Area"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ll,{label:Qs("Left Margin"),help:Qs("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(ll,{label:Qs("Top Margin"),help:Qs("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(ll,{label:Qs("Width Of Chart Area"),help:Qs("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(ll,{label:Qs("Height Of Chart Area"),help:Qs("Determines the hight of the chart area."),value:n.chartArea.height,onChange:function(t){n.chartArea.height=t,e.props.edit(n)}})))}}])&&Gs(n.prototype,r),a&&Gs(n,a),t}(el);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 dl(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 ml(e,t){return!t||"object"!==cl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pl(e){return(pl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function hl(e,t){return(hl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _l=wp.i18n.__,fl=wp.element,yl=fl.Component,gl=fl.Fragment,bl=wp.components,vl=bl.CheckboxControl,Ml=bl.PanelBody,wl=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ml(this,pl(t).apply(this,arguments))}var n,r,a;return 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}}),t&&hl(e,t)}(t,e),n=t,(r=[{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"];return wp.element.createElement(Ml,{title:_l("Frontend Actions"),initialOpen:!1,className:"visualizer-advanced-panel"},void 0!==t.actions&&wp.element.createElement(gl,null,wp.element.createElement(vl,{label:_l("Print"),help:_l("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(vl,{label:_l("CSV"),help:_l("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(vl,{label:_l("Excel"),help:_l("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(vl,{label:_l("Copy"),help:_l("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)}})))}}])&&dl(n.prototype,r),a&&dl(n,a),t}(yl);function kl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ll(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){kl(e,t,n[t])}))}return e}var Yl={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"}},Dl=n(2);const Tl={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&&Tl.throwError(Tl.getCaller(2),e)},isFalsy:(e="<unknown parameter>",t)=>{t||Tl.throwError(Tl.getCaller(2),e)},isNoneOf:(e="<unknown parameter>",t,n=[])=>{-1===n.indexOf(t)&&Tl.throwError(Tl.getCaller(2),e,"to be any of"+JSON.stringify(n))},isAnyOf:(e="<unknown parameter>",t,n=[])=>{n.indexOf(t)>-1&&Tl.throwError(Tl.getCaller(2),e,"not to be any of"+JSON.stringify(n))},isNotType:(e="<unknown parameter>",t,n="")=>{Object(Dl.getType)(t)!==n.toLowerCase()&&Tl.throwError(Tl.getCaller(2),e,"to be type "+n.toLowerCase())},isAnyTypeOf:(e="<unknown parameter>",t,n=[])=>{n.forEach(n=>{Object(Dl.getType)(t)===n&&Tl.throwError(Tl.getCaller(2),e,"not to be type of "+n.toLowerCase())})},missingKey:(e="<unknown parameter>",t,n="")=>{Tl.isUndefined(e,t),-1===Object.keys(t).indexOf(n)&&Tl.throwError(Tl.getCaller(2),e,"to contain '"+n+"' key")},missingAnyKeys:(e="<unknown parameter>",t,n=[""])=>{Tl.isUndefined(e,t);const r=Object.keys(t);n.forEach(t=>{-1===r.indexOf(t)&&Tl.throwError(Tl.getCaller(2),e,"to contain '"+t+"' key")})},containsUndefined:(e="<unknown parameter>",t)=>{[void 0,null].forEach(n=>{const r=Object(Dl.locate)(t,n);r&&Tl.throwError(Tl.getCaller(2),e,"not to contain '"+JSON.stringify(n)+"' at "+r)})},isInvalidPath:(e="<unknown parameter>",t)=>{Tl.isUndefined(e,t),Tl.isNotType(e,t,"string"),Tl.isAnyOf(e,t,["","/"]),".$[]#".split().forEach(n=>{t.indexOf(n)>-1&&Tl.throwError(Tl.getCaller(2),e,"not to contain invalid character '"+n+"'")}),t.match(/\/{2,}/g)&&Tl.throwError(Tl.getCaller(2),e,"not to contain consecutive forward slash characters")},isInvalidWriteData:(e="<unknown parameter>",t)=>{Tl.isUndefined(e,t),Tl.containsUndefined(e,t)}};var Sl=Tl;const Ol=(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 jl={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.9
66
  *
67
  * This source code is licensed under the MIT license found in the
68
  * LICENSE file in the root directory of this source tree.
69
- */class xl 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=Yl.dark_vscode_tribute;"theme"in this.props&&"string"==typeof this.props.theme&&this.props.theme in Yl&&(n=Yl[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&&(clearInterval(this.timer),this.timer=!1):this.timer||(this.timer=setInterval(this.scheduledUpdate,100)),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.state.error,r=this.colors,i=this.style,o=this.confirmGood,s=this.totalHeight,l=this.totalWidth,u=!!n&&"token"in n;return this.renderCount++,a.a.createElement("div",{name:"outer-box",id:e&&e+"-outer-box",style:Ll({display:"block",overflow:"none",height:s,width:l,margin:0,boxSizing:"border-box",position:"relative"},i.outerBox)},o?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:Ll({display:"block",height:s,width:l,margin:0,boxSizing:"border-box",overflow:"hidden",fontFamily:"Roboto, sans-serif"},i.container),onClick:this.onClick},a.a.createElement("div",{name:"warning-box",id:e&&e+"-warning-box",style:Ll({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)"},i.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:Ll({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)"},i.body),onClick:this.onClick},a.a.createElement("span",{name:"labels",id:e&&e+"-labels",ref:e=>this.refLabels=e,style:Ll({display:"inline-block",boxSizing:"border-box",verticalAlign:"top",height:"100%",width:"44px",margin:0,padding:"5px 0px 5px 10px",overflow:"hidden",color:"#D4D4D4"},i.labelColumn),onClick:this.onClick},this.renderLabels()),a.a.createElement("span",{id:e,ref:e=>this.refContent=e,contentEditable:!0,style:Ll({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"},i.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||jl,t=this.state.error,n=this.style;if(t)return a.a.createElement("p",{style:Ll({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)},Ol(e.format,t))}renderLabels(){const e=this.colors,t=this.style,n=this.state.error?this.state.error.line:-1,r=this.state.lines?this.state.lines:1;let i=new Array(r);for(var o=0;o<r-1;o++)i[o]=o+1;return i.map(r=>{const i=r!==n?e.default:"red";return a.a.createElement("div",{key:r,style:Ll({},t.labels,{color:i})},r)})}createMarkup(e){return void 0===e?{__html:""}:{__html:""+e}}newSpan(e,t,n){let r=this.colors,a=t.type,i=t.string,o="";switch(a){case"string":case"number":case"primitive":case"error":o=r[t.type];break;case"key":o=" "===i?r.keys_whiteSpace:r.keys;break;case"symbol":o=":"===i?r.colon:r.default;break;default:o=r.default}return i.length!==i.replace(/</g,"").replace(/>/g,"").length&&(i="<xmp style=display:inline;>"+i+"</xmp>"),'<span type="'+a+'" value="'+i+'" depth="'+n+'" style="color:'+o+'">'+i+"</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(null===(t=t.parentNode))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("insertHTML",!1,t)}this.update()}onClick(){"viewOnly"in this.props&&this.props.viewOnly}onBlur(){"viewOnly"in this.props&&this.props.viewOnly||this.update(0,!1)}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(Dl.getType)(e);-1===["object","array"].indexOf(a)&&Sl.throwError("showPlaceholder","placeholder","either an object or an array");let i=!Object(Dl.identical)(e,t);if(i||r&&void 0!==n&&(i=!Object(Dl.identical)(e,n)),!i)return;const o=this.tokenize(e);this.setState({prevPlaceholder:e,plainText:o.indentation,markupText:o.markup,lines:o.lines,error:o.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||jl,n=this.newSpan;if("nodeType"in e){const w=e.cloneNode(!0);if(!w.hasChildNodes())return"";const k=w.childNodes;let L={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<k.length;r++){let e=k[r],t={};switch(e.nodeName){case"SPAN":t={string:e.textContent,type:e.attributes.type.textContent},L.tokens_unknown.push(t);break;case"DIV":L.tokens_unknown.push({string:e.textContent,type:"unknown"});break;case"BR":""===e.textContent&&L.tokens_unknown.push({string:"\n",type:"unknown"});break;case"#text":L.tokens_unknown.push({string:e.wholeText,type:"unknown"});break;case"FONT":L.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<L.tokens_unknown.length;r++){let e=L.tokens_unknown[r];L.tokens_proto=L.tokens_proto.concat(a(e.string,"proto"))}function i(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),-1===(a="'\"".indexOf(n)))return!1;if(n!==r)return!1;for(var i=0;i<e.length;i++)if(i>0&&i<e.length-1&&e.charAt(i)==="'\""[a]&&"\\"!==e.charAt(i-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))>-1){if(1===e.length)return!1;if(n!==r)return!1;for(i=0;i<e.length;i++)if(i>0&&i<e.length-1&&e.charAt(i)==="'\""[a]&&"\\"!==e.charAt(i-1))return!1}else{const t="'\"`.,:;{}[]&<>=~*%\\|/-+!?@^  ";for(i=0;i<t.length;i++){const n=t.charAt(i);if(e.indexOf(n)>-1)return!1}}break;case"number":for(i=0;i<e.length;i++)if(-1==="0123456789".indexOf(e.charAt(i)))if(0===i){if("-"!==e.charAt(0))return!1}else if("."!==e.charAt(i))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<L.tokens_proto.length;r++){let e=L.tokens_proto[r];-1===e.type.indexOf("proto")?i(e.string,e.type)?L.tokens_split.push(e):L.tokens_split=L.tokens_split.concat(a(e.string,"split")):L.tokens_split.push(e)}for(r=0;r<L.tokens_split.length;r++){let e=L.tokens_split[r],t=e.type,n=e.string,a=n.length,i=[];t.indexOf("-")>-1&&("string"!==(t=t.slice(t.indexOf("-")+1))&&i.push("string"),i.push("key"),i.push("error"));let o={string:n,length:a,type:t,fallback:i};L.tokens_fallback.push(o)}function o(){const e=L.tokens_normalize.length-1;if(e<1)return!1;for(var t=e;t>=0;t--){const e=L.tokens_normalize[t];switch(e.type){case"space":case"linebreak":break;default:return e}}return!1}let Y={brackets:[],stringOpen:!1,isValue:!1};for(r=0;r<L.tokens_fallback.length;r++){let e=L.tokens_fallback[r];const t=e.type,n=e.string;let a={type:t,string:n};switch(t){case"symbol":case"colon":if(Y.stringOpen){Y.isValue?a.type="string":a.type="key";break}switch(n){case"[":case"{":Y.brackets.push(n),Y.isValue="["===Y.brackets[Y.brackets.length-1];break;case"]":case"}":Y.brackets.pop(),Y.isValue="["===Y.brackets[Y.brackets.length-1];break;case",":if("colon"===o().type)break;Y.isValue="["===Y.brackets[Y.brackets.length-1];break;case":":a.type="colon",Y.isValue=!0}break;case"delimiter":if(Y.isValue?a.type="string":a.type="key",!Y.stringOpen){Y.stringOpen=n;break}if(r>0){const e=L.tokens_fallback[r-1],t=e.string,n=e.type,a=t.charAt(t.length-1);if("string"===n&&"\\"===a)break}if(Y.stringOpen===n){Y.stringOpen=!1;break}break;case"primitive":case"string":if(["false","true","null","undefined"].indexOf(n)>-1){const e=L.tokens_normalize.length-1;if(e>=0){if("string"!==L.tokens_normalize[e].type){a.type="primitive";break}a.type="string";break}a.type="primitive";break}if("\n"===n&&!Y.stringOpen){a.type="linebreak";break}Y.isValue?a.type="string":a.type="key";break;case"space":case"number":Y.stringOpen&&(Y.isValue?a.type="string":a.type="key")}L.tokens_normalize.push(a)}for(r=0;r<L.tokens_normalize.length;r++){const e=L.tokens_normalize[r];let t={string:e.string,type:e.type,tokens:[r]};if(-1===["symbol","colon"].indexOf(e.type)&&r+1<L.tokens_normalize.length){let n=0;for(var s=r+1;s<L.tokens_normalize.length;s++){const r=L.tokens_normalize[s];if(e.type!==r.type)break;t.string+=r.string,t.tokens.push(s),n++}r+=n}L.tokens_merge.push(t)}const D="'\"",T="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$";var l=!1,u=L.tokens_merge.length>0?1:0;function c(e,t,n=0){l={token:e,line:u,reason:t},L.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===L.tokens_merge.length-1)return!1;for(var n=e+1;n<L.tokens_merge.length;n++){const e=L.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 m(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=L.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 p(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=L.tokens_merge[t];switch(e.type){case"space":case"linebreak":break;default:return e.type}}return!1}Y={brackets:[],stringOpen:!1,isValue:!1};let S=[];for(r=0;r<L.tokens_merge.length&&!l;r++){let e=L.tokens_merge[r],n=e.string,a=e.type,i=!1;switch(a){case"space":break;case"linebreak":u++;break;case"symbol":switch(n){case"{":case"[":if(i=m(r,["}","]"])){c(r,Ol(t.invalidToken.tokenSequence.prohibited,{firstToken:L.tokens_merge[i].string,secondToken:n}));break}if("["===n&&r>0&&!m(r,[":","[",","])){c(r,Ol(t.invalidToken.tokenSequence.permitted,{firstToken:"[",secondToken:[":","[",","]}));break}if("{"===n&&m(r,["{"])){c(r,Ol(t.invalidToken.double,{token:"{"}));break}Y.brackets.push(n),Y.isValue="["===Y.brackets[Y.brackets.length-1],S.push({i:r,line:u,string:n});break;case"}":case"]":if("}"===n&&"{"!==Y.brackets[Y.brackets.length-1]){c(r,Ol(t.brace.curly.missingOpen));break}if("}"===n&&m(r,[","])){c(r,Ol(t.invalidToken.tokenSequence.prohibited,{firstToken:",",secondToken:"}"}));break}if("]"===n&&"["!==Y.brackets[Y.brackets.length-1]){c(r,Ol(t.brace.square.missingOpen));break}if("]"===n&&m(r,[":"])){c(r,Ol(t.invalidToken.tokenSequence.prohibited,{firstToken:":",secondToken:"]"}));break}Y.brackets.pop(),Y.isValue="["===Y.brackets[Y.brackets.length-1],S.push({i:r,line:u,string:n});break;case",":if(i=m(r,["{"])){if(d(r,["}"])){c(r,Ol(t.brace.curly.cannotWrap,{token:","}));break}c(r,Ol(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}if(d(r,["}",",","]"])){c(r,Ol(t.noTrailingOrLeadingComma));break}switch(i=p(r)){case"key":case"colon":c(r,Ol(t.invalidToken.termSequence.prohibited,{firstTerm:"key"===i?t.types.key:t.symbols.colon,secondTerm:t.symbols.comma}));break;case"symbol":if(m(r,["{"])){c(r,Ol(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}}Y.isValue="["===Y.brackets[Y.brackets.length-1]}L.json+=n;break;case"colon":if((i=m(r,["["]))&&d(r,["]"])){c(r,Ol(t.brace.square.cannotWrap,{token:":"}));break}if(i){c(r,Ol(t.invalidToken.tokenSequence.prohibited,{firstToken:"[",secondToken:":"}));break}if("key"!==p(r)){c(r,Ol(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.key}));break}if(d(r,["}","]"])){c(r,Ol(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.value}));break}Y.isValue=!0,L.json+=n;break;case"key":case"string":let e=n.charAt(0),o=n.charAt(n.length-1);D.indexOf(e);if(-1===D.indexOf(e)&&-1!==D.indexOf(o)){c(r,Ol(t.string.missingOpen,{quote:e}));break}if(-1===D.indexOf(o)&&-1!==D.indexOf(e)){c(r,Ol(t.string.missingClose,{quote:e}));break}if(D.indexOf(e)>-1&&e!==o){c(r,Ol(t.string.missingClose,{quote:e}));break}if("string"===a&&-1===D.indexOf(e)&&-1===D.indexOf(o)){c(r,Ol(t.string.mustBeWrappedByQuotes));break}if("key"===a&&d(r,["}","]"])&&c(r,Ol(t.invalidToken.termSequence.permitted,{firstTerm:t.types.key,secondTerm:t.symbols.colon})),-1===D.indexOf(e)&&-1===D.indexOf(o))for(var h=0;h<n.length&&!l;h++){const e=n.charAt(h);if(-1===T.indexOf(e)){c(r,Ol(t.string.nonAlphanumeric,{token:e}));break}}if("'"===e?n='"'+n.slice(1,-1)+'"':'"'!==e&&(n='"'+n+'"'),"key"===a&&"key"===p(r)){if(r>0&&!isNaN(L.tokens_merge[r-1])){L.tokens_merge[r-1]+=L.tokens_merge[r],c(r,Ol(t.key.numberAndLetterMissingQuotes));break}c(r,Ol(t.key.spaceMissingQuotes));break}if("key"===a&&!m(r,["{",","])){c(r,Ol(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["{",","]}));break}if("string"===a&&!m(r,["[",":",","])){c(r,Ol(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["[",":",","]}));break}if("key"===a&&Y.isValue){c(r,Ol(t.string.unexpectedKey));break}if("string"===a&&!Y.isValue){c(r,Ol(t.key.unexpectedString));break}L.json+=n;break;case"number":case"primitive":if(m(r,["{"]))L.tokens_merge[r].type="key",a=L.tokens_merge[r].type,n='"'+n+'"';else if("key"===p(r))L.tokens_merge[r].type="key",a=L.tokens_merge[r].type;else if(!m(r,["[",":",","])){c(r,Ol(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["[",":",","]}));break}"key"!==a&&(Y.isValue||(L.tokens_merge[r].type="key",a=L.tokens_merge[r].type,n='"'+n+'"')),"primitive"===a&&"undefined"===n&&c(r,Ol(t.invalidToken.useInstead,{badToken:"undefined",goodToken:"null"})),L.json+=n}}let O="";for(r=0;r<L.json.length;r++){let e=L.json.charAt(r),t="";r+1<L.json.length&&(t=L.json.charAt(r+1),"\\"===e&&"'"===t)?(O+=t,r++):O+=e}if(L.json=O,!l){const e=Math.ceil(S.length/2);let n=0,r=!1;function _(e){S.splice(e+1,1),S.splice(e,1),r||(r=!0)}for(;S.length>0;){r=!1;for(var f=0;f<S.length-1;f++){const e=S[f].string+S[f+1].string;["[]","{}"].indexOf(e)>-1&&_(f)}if(n++,!r)break;if(n>=e)break}if(S.length>0){const e=S[0].string,n=S[0].i,r="["===e?"]":"}";u=S[0].line,c(n,Ol(t.brace["]"===r?"square":"curly"].missingClose))}}if(!l&&-1===[void 0,""].indexOf(L.json))try{L.jsObject=JSON.parse(L.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),i=parseInt(a);let o=0,s=0,d=!1,m=1,p=!1;for(;o<i&&!p&&("linebreak"===(d=L.tokens_merge[s]).type&&m++,-1===["space","linebreak"].indexOf(d.type)&&(o+=d.string.length),!(o>=i));)s++,L.tokens_merge[s+1]||(p=!0);u=m;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,Ol(t.invalidToken.unexpected,{token:"\\"})),h=0)}l||c(s,Ol(t.invalidToken.unexpected,{token:d.string}))}let j=1,x=0;function y(){for(var e=[],t=0;t<2*x;t++)e.push("&nbsp;");return e.join("")}function g(e=!1){return j++,x>0||e?"<br>":""}function b(e=!1){return g(e)+y()}if(!l)for(r=0;r<L.tokens_merge.length;r++){const e=L.tokens_merge[r],t=e.string;switch(e.type){case"space":case"linebreak":break;case"string":case"number":case"primitive":case"error":L.markup+=(m(r,[",","["])?b():"")+n(r,e,x);break;case"key":L.markup+=b()+n(r,e,x);break;case"colon":L.markup+=n(r,e,x)+"&nbsp;";break;case"symbol":switch(t){case"[":case"{":L.markup+=(m(r,[":"])?"":b())+n(r,e,x),x++;break;case"]":case"}":x--;const t=r===L.tokens_merge.length-1,a=r>0?["[","{"].indexOf(L.tokens_merge[r-1].string)>-1?"":b(t):"";L.markup+=a+n(r,e,x);break;case",":L.markup+=n(r,e,x)}}}if(l){let e=1;function v(e){let t=0;for(var n=0;n<e.length;n++)["\n","\r"].indexOf(e[n])>-1&&t++;return t}j=1;for(r=0;r<L.tokens_merge.length;r++){const t=L.tokens_merge[r],a=t.type,i=t.string;"linebreak"===a&&j++,L.markup+=n(r,t,x),e+=v(i)}e++,++j<e&&(j=e)}for(r=0;r<L.tokens_merge.length;r++){let e=L.tokens_merge[r];L.indented+=e.string,-1===["space","linebreak"].indexOf(e.type)&&(L.tokens_plainText+=e.string)}if(l){"modifyErrorText"in this.props&&((M=this.props.modifyErrorText)&&"[object Function]"==={}.toString.call(M)&&(l.reason=this.props.modifyErrorText(l.reason)))}return{tokens:L.tokens_merge,noSpaces:L.tokens_plainText,indented:L.indented,json:L.json,jsObject:L.jsObject,markup:L.markup,lines:j,error:l}}var M;if(!("nodeType"in e)){let t={inputText:JSON.stringify(e),position:0,currentChar:"",tokenPrimary:"",tokenSecondary:"",brackets:[],isValue:!1,stringOpen:!1,stringStart:0,tokens:[]};function w(){return"\\"===t.currentChar&&(t.inputText=(e=t.inputText,n=t.position,e.slice(0,n)+e.slice(n+1)),!0);var e,n}function k(){if(-1==="'\"".indexOf(t.currentChar))return!1;if(!t.stringOpen)return Y(),t.stringStart=t.position,t.stringOpen=t.currentChar,!0;if(t.stringOpen===t.currentChar){return Y(),D(t.inputText.substring(t.stringStart,t.position+1)),t.stringOpen=!1,!0}return!1}function L(){if(-1===":,{}[]".indexOf(t.currentChar))return!1;if(t.stringOpen)return!1;switch(Y(),D(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 Y(){return 0!==t.tokenSecondary.length&&(t.tokens.push(t.tokenSecondary),t.tokenSecondary="",!0)}function D(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=L(),n=k(),a=w();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 o=e.charAt(0);if("'\"".indexOf(o)>-1){if("key"===(t=a.isValue?"string":"key")&&(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 i=0;i<n.length;i++){let e=n[i];["'",'"'].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 i=0;i<t.length;i++){let e=t[i];"'\"".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).indexOf(" ")>-1&&(n="'"+n+"'"),r=n;break}}return{type:t,string:n,value:r,depth:a.brackets.length}});let i="";for(r=0;r<a.tokens.length;r++){i+=a.tokens[r].string}function T(e){for(var t=[],n=0;n<2*e;n++)t.push(" ");return(e>0?"\n":"")+t.join("")}let o="";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)?o+=e.string+T(e.depth):o+=e.string;break;case"]":case"}":const n=r>0?a.tokens[r-1]:"";-1==="[{".indexOf(n.string)?o+=T(e.depth)+e.string:o+=e.string;break;case":":o+=e.string+" ";break;case",":o+=e.string+T(e.depth);break;default:o+=e.string}}let s=1;function S(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+S(e.depth):l+=t;break;case"}":case"]":const i=r>0?a.tokens[r-1]:"";-1==="[{".indexOf(i.string)?l+=S(e.depth)+(u===r?"<br>":"")+t:l+=t;break;case":":l+=t+" ";break;case",":l+=t+S(e.depth);break;default:l+=t}}return s+=2,{tokens:a.tokens,noSpaces:i,indented:o,json:JSON.stringify(e),jsObject:e,markup:l,lines:s}}}}var El=xl,Cl=n(133),Hl=n.n(Cl);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 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,r.key,r)}}function Al(e){return(Al=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Nl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fl(e,t){return(Fl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Rl=wp.i18n.__,Wl=wp.element.Component,Il=wp.components,Bl=Il.ExternalLink,Jl=Il.PanelBody,Ul=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==Pl(t)&&"function"!=typeof t?Nl(e):t}(this,Al(t).apply(this,arguments))).isValidJSON=e.isValidJSON.bind(Nl(e)),e}var n,r,a;return 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}}),t&&Fl(e,t)}(t,e),n=t,(r=[{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","table","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(Jl,{title:Rl("Manual Configuration"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement("p",null,Rl("Configure the graph by providing configuration variables right from the Google Visualization API.")),wp.element.createElement("p",null,wp.element.createElement(Bl,{href:"https://developers.google.com/chart/interactive/docs/gallery/".concat(e,"#configuration-options")},Rl("Google Visualization API"))),wp.element.createElement(El,{locale:Hl.a,theme:"light_mitsuketa_tribute",placeholder:$(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))}}))}}])&&zl(n.prototype,r),a&&zl(n,a),t}(Wl);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 Vl(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 Gl(e,t){return!t||"object"!==ql(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $l(e){return($l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kl(e,t){return(Kl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Zl=wp.element,Ql=Zl.Component,Xl=Zl.Fragment,eu=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Gl(this,$l(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Kl(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this.props.chart["visualizer-chart-type"];return wp.element.createElement(Xl,null,wp.element.createElement(Un,{chart:this.props.chart,edit:this.props.edit}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(e)&&wp.element.createElement(lr,{chart:this.props.chart,edit:this.props.edit}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(e)&&wp.element.createElement(Yr,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(Xl,null,wp.element.createElement(Ir,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(ta,{chart:this.props.chart,edit:this.props.edit})),0<=["area","scatter","line"].indexOf(e)&&wp.element.createElement(_a,{chart:this.props.chart,edit:this.props.edit}),0<=["bar","column"].indexOf(e)&&wp.element.createElement(Ta,{chart:this.props.chart,edit:this.props.edit}),0<=["candlestick"].indexOf(e)&&wp.element.createElement(Wa,{chart:this.props.chart,edit:this.props.edit}),0<=["geo"].indexOf(e)&&wp.element.createElement(Xl,null,wp.element.createElement(ei,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(pi,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Ti,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Fi,{chart:this.props.chart,edit:this.props.edit})),0<=["gauge"].indexOf(e)&&wp.element.createElement(to,{chart:this.props.chart,edit:this.props.edit}),0<=["timeline"].indexOf(e)&&wp.element.createElement(_o,{chart:this.props.chart,edit:this.props.edit}),0<=["table","dataTable"].indexOf(e)&&wp.element.createElement(Xl,null,wp.element.createElement(jo,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Uo,{chart:this.props.chart,edit:this.props.edit})),0<=["combo"].indexOf(e)&&wp.element.createElement(ns,{chart:this.props.chart,edit:this.props.edit}),-1>=["timeline","gauge","geo","pie","dataTable"].indexOf(e)&&wp.element.createElement(bs,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(Es,{chart:this.props.chart,edit:this.props.edit}),0<=["dataTable"].indexOf(e)&&wp.element.createElement(qs,{chart:this.props.chart,edit:this.props.edit}),-1>=["dataTable"].indexOf(e)&&wp.element.createElement(ul,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(wl,{chart:this.props.chart,edit:this.props.edit}),-1>=["dataTable"].indexOf(e)&&wp.element.createElement(Ul,{chart:this.props.chart,edit:this.props.edit}))}}])&&Vl(n.prototype,r),a&&Vl(n,a),t}(Ql);function tu(e){return(tu="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 nu(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function ru(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){nu(i,r,a,o,s,"next",e)}function s(e){nu(i,r,a,o,s,"throw",e)}o(void 0)}))}}function au(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 iu(e){return(iu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ou(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function su(e,t){return(su=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var lu=wp.i18n.__,uu=wp.apiFetch,cu=wp.element,du=cu.Component,mu=cu.Fragment,pu=wp.components,hu=pu.Button,_u=pu.PanelBody,fu=pu.SelectControl,yu=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==tu(t)&&"function"!=typeof t?ou(e):t}(this,iu(t).apply(this,arguments))).getPermissionData=e.getPermissionData.bind(ou(e)),e.state={users:[],roles:[]},e}var n,r,a,i,o;return 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}}),t&&su(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(o=ru(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.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,uu({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,uu({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:(i=ru(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.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,uu({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,uu({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 i.apply(this,arguments)})},{key:"render",value:function(){var e,t=this;return"business"===visualizerLocalize.isPro&&(e=this.props.chart["visualizer-permissions"]),wp.element.createElement(mu,null,"business"===visualizerLocalize.isPro?wp.element.createElement(_u,{title:lu("Who can see this chart?"),initialOpen:!1},wp.element.createElement(fu,{label:lu("Select who can view the chart on the front-end."),value:e.permissions.read,options:[{value:"all",label:"All Users"},{value:"users",label:"Select Users"},{value:"roles",label:"Select Roles"}],onChange:function(n){e.permissions.read=n,t.props.edit(e),"users"!==n&&"roles"!==n||t.getPermissionData(n)}}),("users"===e.permissions.read||"roles"===e.permissions.read)&&wp.element.createElement(fu,{multiple:!0,value:e.permissions["read-specific"],options:"users"===e.permissions.read&&this.state.users||"roles"===e.permissions.read&&this.state.roles,onChange:function(n){e.permissions["read-specific"]=n,t.props.edit(e)}})):wp.element.createElement(_u,{title:lu("Who can see this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,lu("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(hu,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},lu("Buy Now"))),"business"===visualizerLocalize.isPro?wp.element.createElement(_u,{title:lu("Who can edit this chart?"),initialOpen:!1},wp.element.createElement(fu,{label:lu("Select who can edit the chart on the front-end."),value:e.permissions.edit,options:[{value:"all",label:"All Users"},{value:"users",label:"Select Users"},{value:"roles",label:"Select Roles"}],onChange:function(n){e.permissions.edit=n,t.props.edit(e),"users"!==n&&"roles"!==n||t.getPermissionData(n)}}),("users"===e.permissions.edit||"roles"===e.permissions.edit)&&wp.element.createElement(fu,{multiple:!0,value:e.permissions["edit-specific"],options:"users"===e.permissions.edit&&this.state.users||"roles"===e.permissions.edit&&this.state.roles,onChange:function(n){e.permissions["edit-specific"]=n,t.props.edit(e)}})):wp.element.createElement(_u,{title:lu("Who can edit this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,lu("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(hu,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},lu("Buy Now"))))}}])&&au(n.prototype,r),a&&au(n,a),t}(du),gu=n(134),bu=n.n(gu),vu=wp.components,Mu=vu.Button,wu=vu.Dashicon,ku=vu.G,Lu=vu.Path,Yu=vu.SVG;var Du=function(e){var t=e.label,n=e.icon,r=e.className,a=e.isBack,i=e.onClick,o=bu()("components-panel__body","components-panel__body-button",r,{"visualizer-panel-back":a});return wp.element.createElement("div",{className:o},wp.element.createElement("h2",{className:"components-panel__body-title"},wp.element.createElement(Mu,{className:"components-panel__body-toggle",onClick:i},wp.element.createElement(Yu,{className:"components-panel__arrow",width:"24px",height:"24px",viewBox:"-12 -12 48 48",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement(ku,null,wp.element.createElement(Lu,{fill:"none",d:"M0,0h24v24H0V0z"})),wp.element.createElement(ku,null,wp.element.createElement(Lu,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"}))),n&&wp.element.createElement(wu,{icon:n,className:"components-panel__icon"}),t)))},Tu=n(3),Su=n.n(Tu);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){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 xu(e,t){return!t||"object"!==Ou(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Eu(e){return(Eu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Cu(e,t){return(Cu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Hu=lodash.startCase,Pu=wp.i18n.__,zu=wp.element,Au=zu.Component,Nu=zu.Fragment,Fu=(wp.blockEditor||wp.editor).InspectorControls,Ru=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=xu(this,Eu(t).apply(this,arguments))).state={route:"home"},e}var n,r,a;return 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}}),t&&Cu(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e,t,n=this,r=U(JSON.parse(JSON.stringify(this.props.chart)));return e=0<=["gauge","table","timeline","dataTable"].indexOf(this.props.chart["visualizer-chart-type"])?"dataTable"===r["visualizer-chart-type"]?r["visualizer-chart-type"]:Hu(this.props.chart["visualizer-chart-type"]):"".concat(Hu(this.props.chart["visualizer-chart-type"]),"Chart"),r["visualizer-data-exploded"]&&(t=Pu("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement(Nu,null,"home"===this.state.route&&wp.element.createElement(Fu,null,wp.element.createElement(Se,{chart:this.props.chart,readUploadedFile:this.props.readUploadedFile}),wp.element.createElement(dt,{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(Ot,{getChartData:this.props.getChartData,isLoading:this.props.isLoading}),wp.element.createElement(rn,{chart:this.props.chart,editSchedule:this.props.editDatabaseSchedule,databaseImportData:this.props.databaseImportData}),wp.element.createElement(jn,{chart:this.props.chart,editChartData:this.props.editChartData}),wp.element.createElement(Du,{label:Pu("Advanced Options"),icon:"admin-tools",onClick:function(){return n.setState({route:"showAdvanced"})}}),wp.element.createElement(Du,{label:Pu("Chart Permissions"),icon:"admin-users",onClick:function(){return n.setState({route:"showPermissions"})}})),("showAdvanced"===this.state.route||"showPermissions"===this.state.route)&&wp.element.createElement(Fu,null,wp.element.createElement(Du,{label:Pu("Chart Settings"),onClick:function(){return n.setState({route:"home"})},isBack:!0}),"showAdvanced"===this.state.route&&wp.element.createElement(eu,{chart:this.props.chart,edit:this.props.editSettings}),"showPermissions"===this.state.route&&wp.element.createElement(yu,{chart:this.props.chart,edit:this.props.editPermissions})),wp.element.createElement("div",{className:"visualizer-settings__chart"},null!==this.props.chart&&"dataTable"===e?wp.element.createElement(R,{id:this.props.id,rows:r["visualizer-data"],columns:r["visualizer-series"],options:r["visualizer-settings"]}):(r["visualizer-data-exploded"],wp.element.createElement(O,{chartType:e,rows:r["visualizer-data"],columns:r["visualizer-series"],options:$(this.props.chart["visualizer-settings"].manual)?Su()(V(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):V(this.props.chart["visualizer-settings"]),height:"500px"})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,t))))}}])&&ju(n.prototype,r),a&&ju(n,a),t}(Au);function Wu(e){return(Wu="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 Iu(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 Bu(e,t){return!t||"object"!==Wu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ju(e){return(Ju=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Uu(e,t){return(Uu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var qu=lodash.startCase,Vu=wp.i18n.__,Gu=wp.element,$u=Gu.Component,Ku=Gu.Fragment,Zu=wp.components,Qu=Zu.Button,Xu=Zu.Dashicon,ec=Zu.Toolbar,tc=Zu.Tooltip,nc=(wp.blockEditor||wp.editor).BlockControls,rc=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Bu(this,Ju(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Uu(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e,t,n=U(JSON.parse(JSON.stringify(this.props.chart)));return e=0<=["gauge","table","timeline","dataTable"].indexOf(this.props.chart["visualizer-chart-type"])?"dataTable"===n["visualizer-chart-type"]?n["visualizer-chart-type"]:qu(this.props.chart["visualizer-chart-type"]):"".concat(qu(this.props.chart["visualizer-chart-type"]),"Chart"),n["visualizer-data-exploded"]&&(t=Vu("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement("div",{className:this.props.className},null!==this.props.chart&&wp.element.createElement(Ku,null,wp.element.createElement(nc,{key:"toolbar-controls"},wp.element.createElement(ec,{className:"components-toolbar"},wp.element.createElement(tc,{text:Vu("Edit Chart")},wp.element.createElement(Qu,{className:"components-icon-button components-toolbar__control edit-pie-chart",onClick:this.props.editChart},wp.element.createElement(Xu,{icon:"edit"}))))),"dataTable"===e?wp.element.createElement(R,{id:this.props.id,rows:n["visualizer-data"],columns:n["visualizer-series"],options:n["visualizer-settings"]}):(n["visualizer-data-exploded"],wp.element.createElement(O,{chartType:e,rows:n["visualizer-data"],columns:n["visualizer-series"],options:$(this.props.chart["visualizer-settings"].manual)?Su()(V(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):V(this.props.chart["visualizer-settings"]),height:"500px"})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,t))))}}])&&Iu(n.prototype,r),a&&Iu(n,a),t}($u);function ac(e){return(ac="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){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 oc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ic(n,!0).forEach((function(t){sc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ic(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lc(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function uc(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){lc(i,r,a,o,s,"next",e)}function s(e){lc(i,r,a,o,s,"throw",e)}o(void 0)}))}}function cc(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 dc(e){return(dc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pc(e,t){return(pc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var hc=wp.i18n.__,_c=wp,fc=_c.apiFetch,yc=_c.apiRequest,gc=wp.element,bc=gc.Component,vc=gc.Fragment,Mc=wp.components,wc=Mc.Button,kc=Mc.ButtonGroup,Lc=Mc.Dashicon,Yc=Mc.Placeholder,Dc=Mc.Spinner,Tc=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==ac(t)&&"function"!=typeof t?mc(e):t}(this,dc(t).apply(this,arguments))).getChart=e.getChart.bind(mc(e)),e.editChart=e.editChart.bind(mc(e)),e.editSettings=e.editSettings.bind(mc(e)),e.editPermissions=e.editPermissions.bind(mc(e)),e.readUploadedFile=e.readUploadedFile.bind(mc(e)),e.editURL=e.editURL.bind(mc(e)),e.editSchedule=e.editSchedule.bind(mc(e)),e.editJSONSchedule=e.editJSONSchedule.bind(mc(e)),e.editJSONURL=e.editJSONURL.bind(mc(e)),e.editJSONHeaders=e.editJSONHeaders.bind(mc(e)),e.editJSONRoot=e.editJSONRoot.bind(mc(e)),e.editJSONPaging=e.editJSONPaging.bind(mc(e)),e.JSONImportData=e.JSONImportData.bind(mc(e)),e.editDatabaseSchedule=e.editDatabaseSchedule.bind(mc(e)),e.databaseImportData=e.databaseImportData.bind(mc(e)),e.uploadData=e.uploadData.bind(mc(e)),e.getChartData=e.getChartData.bind(mc(e)),e.editChartData=e.editChartData.bind(mc(e)),e.updateChart=e.updateChart.bind(mc(e)),e.state={route:e.props.attributes.route?e.props.attributes.route:"home",chart:null,isModified:!1,isLoading:!1,isScheduled:!1},e}var n,r,a,i,o,s;return 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}}),t&&pc(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(s=uc(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.props.attributes.id){e.next=5;break}return e.next=3,fc({path:"wp/v2/visualizer/".concat(this.props.attributes.id)});case 3:t=e.sent,this.setState({chart:t.chart_data});case 5:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getChart",value:(o=uc(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.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,fc({path:"wp/v2/visualizer/".concat(t)});case 4:n=e.sent,this.setState({route:"chartSelect",chart:n.chart_data,isLoading:!1}),this.props.setAttributes({id:t,route:"chartSelect"});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=oc({},this.state.chart);t["visualizer-settings"]=e,this.setState({chart:t,isModified:!0})}},{key:"editPermissions",value:function(e){var t=oc({},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 i=a[1];i.length&&i!==t&&r.push([]);var o=void 0;o=a[2]?a[2].replace(new RegExp("''","g"),"'"):a[3],r[r.length-1].push(o)}return r}(r.result);t.editChartData(e,"Visualizer_Source_Csv")},r.readAsText(n)}},{key:"editURL",value:function(e){var t=oc({},this.state.chart);t["visualizer-chart-url"]=e,this.setState({chart:t})}},{key:"editSchedule",value:function(e){var t=oc({},this.state.chart);t["visualizer-chart-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"editJSONSchedule",value:function(e){var t=oc({},this.state.chart);t["visualizer-json-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"editJSONURL",value:function(e){var t=oc({},this.state.chart);t["visualizer-json-url"]=e,this.setState({chart:t})}},{key:"editJSONHeaders",value:function(e){var t=oc({},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=oc({},this.state.chart);t["visualizer-json-root"]=e,this.setState({chart:t})}},{key:"editJSONPaging",value:function(e){var t=oc({},this.state.chart);t["visualizer-json-paging"]=e,this.setState({chart:t})}},{key:"JSONImportData",value:function(e,t,n){var r=oc({},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=oc({},this.state.chart);t["visualizer-db-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"databaseImportData",value:function(e,t,n,r){var a=oc({},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}),yc({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=oc({},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"],i=r,o="series";return"pie"===n["visualizer-chart-type"]&&(i=n["visualizer-data"],o="slices"),i.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[o][r]&&(a[o][r]={},a[o][r].temp=1)}})),a[o]=a[o].filter((function(e,t){return t<("pie"!==n["visualizer-chart-type"]?i.length-1:i.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:(i=uc(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.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,fc({path:"wp/v2/visualizer/".concat(t)});case 4:n=e.sent,(r=oc({},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 i.apply(this,arguments)})},{key:"editChartData",value:function(e,t){var n=oc({},this.state.chart),r=[],a=oc({},n["visualizer-settings"]);e[0].map((function(t,n){r[n]={label:t,type:e[1][n]}})),e.splice(0,2);var i=r,o="series";"pie"===n["visualizer-chart-type"]&&(i=e,o="slices"),i.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[o][r]&&(a[o][r]={},a[o][r].temp=1)}})),a[o]=a[o].filter((function(e,t){return t<("pie"!==n["visualizer-chart-type"]?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"),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})),yc({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"renderChart"===this.state.route&&null!==this.state.chart?wp.element.createElement(rc,{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(Lc,{icon:"chart-pie"}),hc("Visualizer")),"home"===this.state.route&&wp.element.createElement("div",{className:"visualizer-settings__content"},wp.element.createElement("div",{className:"visualizer-settings__content-description"},hc("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"},hc("Create a new chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement(Lc,{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"},hc("Display an existing chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement(Lc,{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(Yc,null,wp.element.createElement(Dc,null)),"showCharts"===this.state.route&&!1===this.state.isLoading&&wp.element.createElement(fe,{getChart:this.getChart}),"chartSelect"===this.state.route&&null!==this.state.chart&&wp.element.createElement(Ru,{id:this.props.attributes.id,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(kc,null,wp.element.createElement(wc,{isDefault:!0,isLarge:!0,onClick:function(){var t;"showCharts"===e.state.route?t="home":"chartSelect"===e.state.route&&(t="showCharts"),e.setState({route:t}),e.props.setAttributes({route:t})}},hc("Back")),"chartSelect"===this.state.route&&wp.element.createElement(vc,null,!1===this.state.isModified?wp.element.createElement(wc,{isDefault:!0,isLarge:!0,onClick:function(){e.setState({route:"renderChart"}),e.props.setAttributes({route:"renderChart"})}},hc("Done")):wp.element.createElement(wc,{isPrimary:!0,isLarge:!0,isBusy:"updateChart"===this.state.isLoading,disabled:"updateChart"===this.state.isLoading,onClick:this.updateChart},hc("Save"))))))}}])&&cc(n.prototype,r),a&&cc(n,a),t}(bc),Sc=(n(153),wp.i18n.__),Oc=wp.blocks.registerBlockType;t.default=Oc("visualizer/chart",{title:Sc("Visualizer Chart"),description:Sc("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:[Sc("Visualizer"),Sc("Chart"),Sc("Google Charts")],attributes:{id:{type:"number"},route:{type:"string"}},supports:{customClassName:!1},edit:Tc,save:function(){return null}})}]);
1
+ !function(e){function t(t){for(var r,o,s=t[0],l=t[1],u=t[2],d=0,m=[];d<s.length;d++)o=s[d],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&m.push(a[o][0]),a[o]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(c&&c(t);m.length;)m.shift()();return i.push.apply(i,u||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,s=1;s<n.length;s++){var l=n[s];0!==a[l]&&(r=!1)}r&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},a={1:0},i=[];function o(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,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.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;i.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 i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(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 m(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 p(e,t,n,r){return Et(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=p(NaN);return null!=e?m(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 g(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 b=!1;function v(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,a.updateOffset(this),b=!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),i=Math.abs(e.length-t.length),o=0;for(r=0;r<a;r++)(n&&e[r]!==t[r]||!n&&k(e[r])!==k(t[r]))&&o++;return o+i}function Y(e){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,t){var n=!0;return m((function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,e),n){for(var r,i=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];i.push(r)}Y(e+"\nArguments: "+Array.prototype.slice.call(i).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=m({},e);for(n in t)d(t,n)&&(o(e[n])&&o(t[n])?(r[n]={},m(r[n],e[n]),m(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)d(e,n)&&!d(t,n)&&o(e[n])&&(r[n]=m({},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 C={};function P(e,t){var n=e.toLowerCase();C[n]=C[n+"s"]=C[t]=e}function H(e){return"string"==typeof e?C[e]||C[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 N(e,t){A[e]=t}function F(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 R=/(\[[^\[]*\])|(\\)?([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 F(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=q(t,e.localeData()),I[t]=I[t]||function(e){var t,n,r,a=e.match(R);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,i="";for(r=0;r<n;r++)i+=j(a[r])?a[r].call(t,e):a[r];return i}}(t),I[t](e)):e.localeData().invalidDate()}function q(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/,G=/\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+/,ie=/[+-]?\d+/,oe=/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(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,a){return t||n||r||a}))))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var pe={};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++)pe[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(pe,e)&&pe[e](t,n._a,n,e)}var ye=0,ge=1,be=2,ve=3,we=4,Me=5,ke=6,Le=7,Ye=8;function Te(e){return De(e)?366:365}function De(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"),P("year","y"),N("year",1),ce("Y",ie),ce("YY",Q,G),ce("YYYY",ne,K),ce("YYYYY",re,Z),ce("YYYYYY",re,Z),he(["YYYYY","YYYYYY"],ye),he("YYYY",(function(e,t){t[ye]=2===e.length?a.parseTwoDigitYear(e):k(e)})),he("YY",(function(e,t){t[ye]=a.parseTwoDigitYear(e)})),he("Y",(function(e,t){t[ye]=parseInt(e,10)})),a.parseTwoDigitYear=function(e){return k(e)+(k(e)>68?1900:2e3)};var Se,Oe=je("FullYear",!0);function je(e,t){return function(n){return null!=n?(Ee(this,e,n),a.updateOffset(this,t),this):xe(this,e)}}function xe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Ee(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&De(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ce(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Ce(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?De(e)?29:28:31-r%7%2}Se=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)})),P("month","M"),N("month",8),ce("M",Q),ce("MM",Q,G),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[ge]=k(e)-1})),he(["MMM","MMMM"],(function(e,t,n,r){var a=n._locale.monthsParse(e,r,n._strict);null!=a?t[ge]=a:h(n).invalidMonth=e}));var Pe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,He="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ze="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ae(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(a=Se.call(this._shortMonthsParse,o))?a:null:-1!==(a=Se.call(this._longMonthsParse,o))?a:null:"MMM"===t?-1!==(a=Se.call(this._shortMonthsParse,o))?a:-1!==(a=Se.call(this._longMonthsParse,o))?a:null:-1!==(a=Se.call(this._longMonthsParse,o))?a:-1!==(a=Se.call(this._shortMonthsParse,o))?a:null}function Ne(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(),Ce(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Fe(e){return null!=e?(Ne(this,e),a.updateOffset(this,!0),this):xe(this,"Month")}var Re=le,We=le;function Ie(){function e(e,t){return t.length-e.length}var t,n,r=[],a=[],i=[];for(t=0;t<12;t++)n=p([2e3,t]),r.push(this.monthsShort(n,"")),a.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),a.sort(e),i.sort(e),t=0;t<12;t++)r[t]=me(r[t]),a[t]=me(a[t]);for(t=0;t<24;t++)i[t]=me(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Be(e,t,n,r,a,i,o){var s=new Date(e,t,n,r,a,i,o);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function Je(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ue(e,t,n){var r=7+t-n;return-(7+Je(e,0,r).getUTCDay()-t)%7+r-1}function qe(e,t,n,r,a){var i,o,s=1+7*(t-1)+(7+n-r)%7+Ue(e,r,a);return s<=0?o=Te(i=e-1)+s:s>Te(e)?(i=e+1,o=s-Te(e)):(i=e,o=s),{year:i,dayOfYear:o}}function Ve(e,t,n){var r,a,i=Ue(e.year(),t,n),o=Math.floor((e.dayOfYear()-i-1)/7)+1;return o<1?r=o+Ge(a=e.year()-1,t,n):o>Ge(e.year(),t,n)?(r=o-Ge(e.year(),t,n),a=e.year()+1):(a=e.year(),r=o),{week:r,year:a}}function Ge(e,t,n){var r=Ue(e,t,n),a=Ue(e+1,t,n);return(Te(e)-r+a)/7}J("w",["ww",2],"wo","week"),J("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),N("week",5),N("isoWeek",5),ce("w",Q),ce("ww",Q,G),ce("W",Q),ce("WW",Q,G),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"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),N("day",11),N("weekday",11),N("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 $e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ke="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Qe(e,t,n){var r,a,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(a=Se.call(this._weekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:null:"dddd"===t?-1!==(a=Se.call(this._weekdaysParse,o))?a:-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:-1!==(a=Se.call(this._weekdaysParse,o))?a:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:null:-1!==(a=Se.call(this._minWeekdaysParse,o))?a:-1!==(a=Se.call(this._weekdaysParse,o))?a:-1!==(a=Se.call(this._shortWeekdaysParse,o))?a:null}var Xe=le,et=le,tt=le;function nt(){function e(e,t){return t.length-e.length}var t,n,r,a,i,o=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),i=this.weekdays(n,""),o.push(r),s.push(a),l.push(i),u.push(r),u.push(a),u.push(i);for(o.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=me(s[t]),l[t]=me(l[t]),u[t]=me(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("^("+o.join("|")+")","i")}function rt(){return this.hours()%12||12}function at(e,t){J(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function it(e,t){return t._meridiemParse}J("H",["HH",2],0,"hour"),J("h",["hh",2],0,rt),J("k",["kk",2],0,(function(){return this.hours()||24})),J("hmm",0,0,(function(){return""+rt.apply(this)+F(this.minutes(),2)})),J("hmmss",0,0,(function(){return""+rt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),J("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),J("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),at("a",!0),at("A",!1),P("hour","h"),N("hour",13),ce("a",it),ce("A",it),ce("H",Q),ce("h",Q),ce("k",Q),ce("HH",Q,G),ce("hh",Q,G),ce("kk",Q,G),ce("hmm",X),ce("hmmss",ee),ce("Hmm",X),ce("Hmmss",ee),he(["H","HH"],ve),he(["k","kk"],(function(e,t,n){var r=k(e);t[ve]=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[ve]=k(e),h(n).bigHour=!0})),he("hmm",(function(e,t,n){var r=e.length-2;t[ve]=k(e.substr(0,r)),t[we]=k(e.substr(r)),h(n).bigHour=!0})),he("hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[ve]=k(e.substr(0,r)),t[we]=k(e.substr(r,2)),t[Me]=k(e.substr(a)),h(n).bigHour=!0})),he("Hmm",(function(e,t,n){var r=e.length-2;t[ve]=k(e.substr(0,r)),t[we]=k(e.substr(r))})),he("Hmmss",(function(e,t,n){var r=e.length-4,a=e.length-2;t[ve]=k(e.substr(0,r)),t[we]=k(e.substr(r,2)),t[Me]=k(e.substr(a))}));var ot,st=je("Hours",!0),lt={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:He,monthsShort:ze,week:{dow:0,doy:6},weekdays:$e,weekdaysMin:Ze,weekdaysShort:Ke,meridiemParse:/[ap]\.?m?\.?/i},ut={},ct={};function dt(e){return e?e.toLowerCase().replace("_","-"):e}function mt(t){var r=null;if(!ut[t]&&void 0!==e&&e&&e.exports)try{r=ot._abbr,n(149)("./"+t),pt(r)}catch(e){}return ut[t]}function pt(e,t){var n;return e&&(n=s(t)?ft(e):ht(e,t))&&(ot=n),ot._abbr}function ht(e,t){if(null!==t){var n=lt;if(t.abbr=e,null!=ut[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=ut[e]._config;else if(null!=t.parentLocale){if(null==ut[t.parentLocale])return ct[t.parentLocale]||(ct[t.parentLocale]=[]),ct[t.parentLocale].push({name:e,config:t}),null;n=ut[t.parentLocale]._config}return ut[e]=new E(x(n,t)),ct[e]&&ct[e].forEach((function(e){ht(e.name,e.config)})),pt(e),ut[e]}return delete ut[e],null}function ft(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ot;if(!i(e)){if(t=mt(e))return t;e=[e]}return function(e){for(var t,n,r,a,i=0;i<e.length;){for(t=(a=dt(e[i]).split("-")).length,n=(n=dt(e[i+1]))?n.split("-"):null;t>0;){if(r=mt(a.slice(0,t).join("-")))return r;if(n&&n.length>=t&&L(a,n,!0)>=t-1)break;t--}i++}return null}(e)}function _t(e){var t,n=e._a;return n&&-2===h(e).overflow&&(t=n[ge]<0||n[ge]>11?ge:n[be]<1||n[be]>Ce(n[ye],n[ge])?be:n[ve]<0||n[ve]>24||24===n[ve]&&(0!==n[we]||0!==n[Me]||0!==n[ke])?ve:n[we]<0||n[we]>59?we:n[Me]<0||n[Me]>59?Me:n[ke]<0||n[ke]>999?ke:-1,h(e)._overflowDayOfYear&&(t<ye||t>be)&&(t=be),h(e)._overflowWeeks&&-1===t&&(t=Le),h(e)._overflowWeekday&&-1===t&&(t=Ye),h(e).overflow=t),e}function yt(e,t,n){return null!=e?e:null!=t?t:n}function gt(e){var t,n,r,i,o,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[be]&&null==e._a[ge]&&function(e){var t,n,r,a,i,o,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,o=4,n=yt(t.GG,e._a[ye],Ve(Ct(),1,4).year),r=yt(t.W,1),((a=yt(t.E,1))<1||a>7)&&(l=!0);else{i=e._locale._week.dow,o=e._locale._week.doy;var u=Ve(Ct(),i,o);n=yt(t.gg,e._a[ye],u.year),r=yt(t.w,u.week),null!=t.d?((a=t.d)<0||a>6)&&(l=!0):null!=t.e?(a=t.e+i,(t.e<0||t.e>6)&&(l=!0)):a=i}r<1||r>Ge(n,i,o)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(s=qe(n,r,a,i,o),e._a[ye]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=yt(e._a[ye],r[ye]),(e._dayOfYear>Te(o)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=Je(o,0,e._dayOfYear),e._a[ge]=n.getUTCMonth(),e._a[be]=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[ve]&&0===e._a[we]&&0===e._a[Me]&&0===e._a[ke]&&(e._nextDay=!0,e._a[ve]=0),e._d=(e._useUTC?Je:Be).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ve]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(h(e).weekdayMismatch=!0)}}var bt=/^\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)?)?$/,vt=/^\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)?)?$/,wt=/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}/]],kt=[["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/]],Lt=/^\/?Date\((\-?\d+)/i;function Yt(e){var t,n,r,a,i,o,s=e._i,l=bt.exec(s)||vt.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=kt.length;t<n;t++)if(kt[t][1].exec(l[3])){i=(l[2]||" ")+kt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!wt.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=a+(i||"")+(o||""),jt(e)}else e._isValid=!1}var Tt=/^(?:(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 Dt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ot(e){var t,n,r,a,i,o,s,l=Tt.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],i=l[6],o=l[7],s=[Dt(t),ze.indexOf(n),parseInt(r,10),parseInt(a,10),parseInt(i,10)],o&&s.push(parseInt(o,10)),s);if(!function(e,t,n){return!e||Ke.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 St[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=Je.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function jt(e){if(e._f!==a.ISO_8601)if(e._f!==a.RFC_2822){e._a=[],h(e).empty=!0;var t,n,r,i,o,s=""+e._i,l=s.length,u=0;for(r=q(e._f,e._locale).match(R)||[],t=0;t<r.length;t++)i=r[t],(n=(s.match(de(i,e))||[])[0])&&((o=s.substr(0,s.indexOf(n))).length>0&&h(e).unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),u+=n.length),B[i]?(n?h(e).empty=!1:h(e).unusedTokens.push(i),_e(i,n,e)):e._strict&&!n&&h(e).unusedTokens.push(i);h(e).charsLeftOver=l-u,s.length>0&&h(e).unusedInput.push(s),e._a[ve]<=12&&!0===h(e).bigHour&&e._a[ve]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[ve]=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[ve],e._meridiem),gt(e),_t(e)}else Ot(e);else Yt(e)}function xt(e){var t=e._i,n=e._f;return e._locale=e._locale||ft(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new v(_t(t)):(u(t)?e._d=t:i(n)?function(e){var t,n,r,a,i;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<e._f.length;a++)i=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],jt(t),f(t)&&(i+=h(t).charsLeftOver,i+=10*h(t).unusedTokens.length,h(t).score=i,(null==r||i<r)&&(r=i,n=t));m(e,n||t)}(e):n?jt(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=Lt.exec(e._i);null===t?(Yt(e),!1===e._isValid&&(delete e._isValid,Ot(e),!1===e._isValid&&(delete e._isValid,a.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=c(t.slice(0),(function(e){return parseInt(e,10)})),gt(e)):o(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)})),gt(e)}}(e):l(t)?e._d=new Date(t):a.createFromInputFallback(e)}(e),f(e)||(e._d=null),e))}function Et(e,t,n,r,a){var s,l={};return!0!==n&&!1!==n||(r=n,n=void 0),(o(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)||i(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(_t(xt(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Ct(e,t,n,r){return Et(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 Pt=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),Ht=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));function zt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Ct();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var At=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Nt(e){var t=z(e),n=t.year||0,r=t.quarter||0,a=t.month||0,i=t.week||0,o=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===Se.call(At,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<At.length;++r)if(e[At[r]]){if(n)return!1;parseFloat(e[At[r]])!==k(e[At[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+o+7*i,this._months=+a+3*r+12*n,this._data={},this._locale=ft(),this._bubble()}function Ft(e){return e instanceof Nt}function Rt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Wt(e,t){J(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)}))}Wt("Z",":"),Wt("ZZ",""),ce("Z",se),ce("ZZ",se),he(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Bt(se,e)}));var It=/([\+\-]|\d\d)/gi;function Bt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(It)||["-",0,0],a=60*r[1]+k(r[2]);return 0===a?0:"+"===r[0]?a:-a}function Jt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(w(e)||u(e)?e.valueOf():Ct(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),a.updateOffset(n,!1),n):Ct(e).local()}function Ut(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function qt(){return!!this.isValid()&&this._isUTC&&0===this._offset}a.updateOffset=function(){};var Vt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Gt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $t(e,t){var n,r,a,i,o,s,u=e,c=null;return Ft(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(u={},t?u[t]=e:u.milliseconds=e):(c=Vt.exec(e))?(n="-"===c[1]?-1:1,u={y:0,d:k(c[be])*n,h:k(c[ve])*n,m:k(c[we])*n,s:k(c[Me])*n,ms:k(Rt(1e3*c[ke]))*n}):(c=Gt.exec(e))?(n="-"===c[1]?-1:(c[1],1),u={y:Kt(c[2],n),M:Kt(c[3],n),w:Kt(c[4],n),d:Kt(c[5],n),h:Kt(c[6],n),m:Kt(c[7],n),s:Kt(c[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(i=Ct(u.from),o=Ct(u.to),a=i.isValid()&&o.isValid()?(o=Jt(o,i),i.isBefore(o)?s=Zt(i,o):((s=Zt(o,i)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=a.milliseconds,u.M=a.months),r=new Nt(u),Ft(e)&&d(e,"_locale")&&(r._locale=e._locale),r}function Kt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Zt(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 Qt(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),Xt(this,$t(n="string"==typeof n?+n:n,r),e),this}}function Xt(e,t,n,r){var i=t._milliseconds,o=Rt(t._days),s=Rt(t._months);e.isValid()&&(r=null==r||r,s&&Ne(e,xe(e,"Month")+s*n),o&&Ee(e,"Date",xe(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&a.updateOffset(e,o||s))}$t.fn=Nt.prototype,$t.invalid=function(){return $t(NaN)};var en=Qt(1,"add"),tn=Qt(-1,"subtract");function nn(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 rn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ft(e))&&(this._locale=t),this)}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var an=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 on(){return this._locale}function sn(e,t){J(0,[e,e.length],0,t)}function ln(e,t,n,r,a){var i;return null==e?Ve(this,r,a).year:(t>(i=Ge(e,r,a))&&(t=i),un.call(this,e,t,n,r,a))}function un(e,t,n,r,a){var i=qe(e,t,n,r,a),o=Je(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}J(0,["gg",2],0,(function(){return this.weekYear()%100})),J(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),sn("gggg","weekYear"),sn("ggggg","weekYear"),sn("GGGG","isoWeekYear"),sn("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),N("weekYear",1),N("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",Q,G),ce("gg",Q,G),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"),P("quarter","Q"),N("quarter",7),ce("Q",V),he("Q",(function(e,t){t[ge]=3*(k(e)-1)})),J("D",["DD",2],"Do","date"),P("date","D"),N("date",9),ce("D",Q),ce("DD",Q,G),ce("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),he(["D","DD"],be),he("Do",(function(e,t){t[be]=k(e.match(Q)[0])}));var cn=je("Date",!0);J("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),N("dayOfYear",4),ce("DDD",te),ce("DDDD",$),he(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=k(e)})),J("m",["mm",2],0,"minute"),P("minute","m"),N("minute",14),ce("m",Q),ce("mm",Q,G),he(["m","mm"],we);var dn=je("Minutes",!1);J("s",["ss",2],0,"second"),P("second","s"),N("second",15),ce("s",Q),ce("ss",Q,G),he(["s","ss"],Me);var mn,pn=je("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()})),P("millisecond","ms"),N("millisecond",16),ce("S",te,V),ce("SS",te,G),ce("SSS",te,$),mn="SSSS";mn.length<=9;mn+="S")ce(mn,ae);function hn(e,t){t[ke]=k(1e3*("0."+e))}for(mn="S";mn.length<=9;mn+="S")he(mn,hn);var fn=je("Milliseconds",!1);J("z",0,0,"zoneAbbr"),J("zz",0,0,"zoneName");var _n=v.prototype;function yn(e){return e}_n.add=en,_n.calendar=function(e,t){var n=e||Ct(),r=Jt(n,this).startOf("day"),i=a.calendarFormat(this,r)||"sameElse",o=t&&(j(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,Ct(n)))},_n.clone=function(){return new v(this)},_n.diff=function(e,t,n){var r,a,i;if(!this.isValid())return NaN;if(!(r=Jt(e,this)).isValid())return NaN;switch(a=6e4*(r.utcOffset()-this.utcOffset()),t=H(t)){case"year":i=nn(this,r)/12;break;case"month":i=nn(this,r);break;case"quarter":i=nn(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-a)/864e5;break;case"week":i=(this-r-a)/6048e5;break;default:i=this-r}return n?i:M(i)},_n.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"))},_n.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},_n.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Ct(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},_n.fromNow=function(e){return this.from(Ct(),e)},_n.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||Ct(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},_n.toNow=function(e){return this.to(Ct(),e)},_n.get=function(e){return j(this[e=H(e)])?this[e]():this},_n.invalidAt=function(){return h(this).overflow},_n.isAfter=function(e,t){var n=w(e)?e:Ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(s(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},_n.isBefore=function(e,t){var n=w(e)?e:Ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=H(s(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},_n.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))},_n.isSame=function(e,t){var n,r=w(e)?e:Ct(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()))},_n.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},_n.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},_n.isValid=function(){return f(this)},_n.lang=an,_n.locale=rn,_n.localeData=on,_n.max=Ht,_n.min=Pt,_n.parsingFlags=function(){return m({},h(this))},_n.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},_n.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},_n.subtract=tn,_n.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},_n.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()}},_n.toDate=function(){return new Date(this.valueOf())},_n.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")},_n.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)},_n.toJSON=function(){return this.isValid()?this.toISOString():null},_n.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},_n.unix=function(){return Math.floor(this.valueOf()/1e3)},_n.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},_n.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},_n.year=Oe,_n.isLeapYear=function(){return De(this.year())},_n.weekYear=function(e){return ln.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},_n.isoWeekYear=function(e){return ln.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},_n.quarter=_n.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},_n.month=Fe,_n.daysInMonth=function(){return Ce(this.year(),this.month())},_n.week=_n.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},_n.isoWeek=_n.isoWeeks=function(e){var t=Ve(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},_n.weeksInYear=function(){var e=this.localeData()._week;return Ge(this.year(),e.dow,e.doy)},_n.isoWeeksInYear=function(){return Ge(this.year(),1,4)},_n.date=cn,_n.day=_n.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},_n.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")},_n.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},_n.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")},_n.hour=_n.hours=st,_n.minute=_n.minutes=dn,_n.second=_n.seconds=pn,_n.millisecond=_n.milliseconds=fn,_n.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Bt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Ut(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Xt(this,$t(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Ut(this)},_n.utc=function(e){return this.utcOffset(0,e)},_n.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ut(this),"m")),this},_n.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Bt(oe,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},_n.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ct(e).utcOffset():0,(this.utcOffset()-e)%60==0)},_n.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},_n.isLocal=function(){return!!this.isValid()&&!this._isUTC},_n.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},_n.isUtc=qt,_n.isUTC=qt,_n.zoneAbbr=function(){return this._isUTC?"UTC":""},_n.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},_n.dates=T("dates accessor is deprecated. Use date instead.",cn),_n.months=T("months accessor is deprecated. Use month instead",Fe),_n.years=T("years accessor is deprecated. Use year instead",Oe),_n.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()})),_n.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(g(e,this),(e=xt(e))._a){var t=e._isUTC?p(e._a):Ct(e._a);this._isDSTShifted=this.isValid()&&L(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var gn=E.prototype;function bn(e,t,n,r){var a=ft(),i=p().set(r,t);return a[n](i,e)}function vn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return bn(e,t,n,"month");var r,a=[];for(r=0;r<12;r++)a[r]=bn(e,r,n,"month");return a}function wn(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,i=ft(),o=e?i._week.dow:0;if(null!=n)return bn(t,(n+o)%7,r,"day");var s=[];for(a=0;a<7;a++)s[a]=bn(t,(a+o)%7,r,"day");return s}gn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return j(r)?r.call(t,n):r},gn.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])},gn.invalidDate=function(){return this._invalidDate},gn.ordinal=function(e){return this._ordinal.replace("%d",e)},gn.preparse=yn,gn.postformat=yn,gn.relativeTime=function(e,t,n,r){var a=this._relativeTime[n];return j(a)?a(e,t,n,r):a.replace(/%d/i,e)},gn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return j(n)?n(t):n.replace(/%s/i,t)},gn.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)},gn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Pe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},gn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Pe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},gn.monthsParse=function(e,t,n){var r,a,i;if(this._monthsParseExact)return Ae.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(a=p([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]||(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[r]=new RegExp(i.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}},gn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ie.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=We),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},gn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ie.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Re),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},gn.week=function(e){return Ve(e,this._week.dow,this._week.doy).week},gn.firstDayOfYear=function(){return this._week.doy},gn.firstDayOfWeek=function(){return this._week.dow},gn.weekdays=function(e,t){return e?i(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:i(this._weekdays)?this._weekdays:this._weekdays.standalone},gn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},gn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},gn.weekdaysParse=function(e,t,n){var r,a,i;if(this._weekdaysParseExact)return Qe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=p([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]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(i.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}},gn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=Xe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},gn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},gn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},gn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},gn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},pt("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.",pt),a.langData=T("moment.langData is deprecated. Use moment.localeData instead.",ft);var Mn=Math.abs;function kn(e,t,n,r){var a=$t(t,n);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function Ln(e){return e<0?Math.floor(e):Math.ceil(e)}function Yn(e){return 4800*e/146097}function Tn(e){return 146097*e/4800}function Dn(e){return function(){return this.as(e)}}var Sn=Dn("ms"),On=Dn("s"),jn=Dn("m"),xn=Dn("h"),En=Dn("d"),Cn=Dn("w"),Pn=Dn("M"),Hn=Dn("y");function zn(e){return function(){return this.isValid()?this._data[e]:NaN}}var An=zn("milliseconds"),Nn=zn("seconds"),Fn=zn("minutes"),Rn=zn("hours"),Wn=zn("days"),In=zn("months"),Bn=zn("years"),Jn=Math.round,Un={ss:44,s:45,m:45,h:22,d:26,M:11};function qn(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}var Vn=Math.abs;function Gn(e){return(e>0)-(e<0)||+e}function $n(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Vn(this._milliseconds)/1e3,r=Vn(this._days),a=Vn(this._months);e=M(n/60),t=M(e/60),n%=60,e%=60;var i=M(a/12),o=a%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",d=this.asSeconds();if(!d)return"P0D";var m=d<0?"-":"",p=Gn(this._months)!==Gn(d)?"-":"",h=Gn(this._days)!==Gn(d)?"-":"",f=Gn(this._milliseconds)!==Gn(d)?"-":"";return m+"P"+(i?p+i+"Y":"")+(o?p+o+"M":"")+(s?h+s+"D":"")+(l||u||c?"T":"")+(l?f+l+"H":"")+(u?f+u+"M":"")+(c?f+c+"S":"")}var Kn=Nt.prototype;return Kn.isValid=function(){return this._isValid},Kn.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},Kn.add=function(e,t){return kn(this,e,t,1)},Kn.subtract=function(e,t){return kn(this,e,t,-1)},Kn.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+Yn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(Tn(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)}},Kn.asMilliseconds=Sn,Kn.asSeconds=On,Kn.asMinutes=jn,Kn.asHours=xn,Kn.asDays=En,Kn.asWeeks=Cn,Kn.asMonths=Pn,Kn.asYears=Hn,Kn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},Kn._bubble=function(){var e,t,n,r,a,i=this._milliseconds,o=this._days,s=this._months,l=this._data;return i>=0&&o>=0&&s>=0||i<=0&&o<=0&&s<=0||(i+=864e5*Ln(Tn(s)+o),o=0,s=0),l.milliseconds=i%1e3,e=M(i/1e3),l.seconds=e%60,t=M(e/60),l.minutes=t%60,n=M(t/60),l.hours=n%24,o+=M(n/24),a=M(Yn(o)),s+=a,o-=Ln(Tn(a)),r=M(s/12),s%=12,l.days=o,l.months=s,l.years=r,this},Kn.clone=function(){return $t(this)},Kn.get=function(e){return e=H(e),this.isValid()?this[e+"s"]():NaN},Kn.milliseconds=An,Kn.seconds=Nn,Kn.minutes=Fn,Kn.hours=Rn,Kn.days=Wn,Kn.weeks=function(){return M(this.days()/7)},Kn.months=In,Kn.years=Bn,Kn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=$t(e).abs(),a=Jn(r.as("s")),i=Jn(r.as("m")),o=Jn(r.as("h")),s=Jn(r.as("d")),l=Jn(r.as("M")),u=Jn(r.as("y")),c=a<=Un.ss&&["s",a]||a<Un.s&&["ss",a]||i<=1&&["m"]||i<Un.m&&["mm",i]||o<=1&&["h"]||o<Un.h&&["hh",o]||s<=1&&["d"]||s<Un.d&&["dd",s]||l<=1&&["M"]||l<Un.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=n,qn.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Kn.toISOString=$n,Kn.toString=$n,Kn.toJSON=$n,Kn.locale=rn,Kn.localeData=on,Kn.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$n),Kn.lang=an,J("X",0,0,"unix"),J("x",0,0,"valueOf"),ce("x",ie),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=Ct,a.fn=_n,a.min=function(){return zt("isBefore",[].slice.call(arguments,0))},a.max=function(){return zt("isAfter",[].slice.call(arguments,0))},a.now=function(){return Date.now?Date.now():+new Date},a.utc=p,a.unix=function(e){return Ct(1e3*e)},a.months=function(e,t){return vn(e,t,"months")},a.isDate=u,a.locale=pt,a.invalid=_,a.duration=$t,a.isMoment=w,a.weekdays=function(e,t,n){return wn(e,t,n,"weekdays")},a.parseZone=function(){return Ct.apply(null,arguments).parseZone()},a.localeData=ft,a.isDuration=Ft,a.monthsShort=function(e,t){return vn(e,t,"monthsShort")},a.weekdaysMin=function(e,t,n){return wn(e,t,n,"weekdaysMin")},a.defineLocale=ht,a.updateLocale=function(e,t){if(null!=t){var n,r,a=lt;null!=(r=mt(e))&&(a=r._config),t=x(a,t),(n=new E(t)).parentLocale=ut[e],ut[e]=n,pt(e)}else null!=ut[e]&&(null!=ut[e].parentLocale?ut[e]=ut[e].parentLocale:null!=ut[e]&&delete ut[e]);return ut[e]},a.locales=function(){return D(ut)},a.weekdaysShort=function(e,t,n){return wn(e,t,n,"weekdaysShort")},a.normalizeUnits=H,a.relativeTimeRounding=function(e){return void 0===e?Jn:"function"==typeof e&&(Jn=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==Un[e]&&(void 0===t?Un[e]:(Un[e]=t,"s"===e&&(Un.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=_n,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,i=0){let o;if(null!==n&&i<n)y(e)&&(o=Object.keys(e)).forEach(r=>{a(e[r],t,n,i+1)});else{if(null!==n&&i==n)return 0==n?void(r=a(e,t,null,i)):void(y(e)&&r.push(a(e,t,n,i+1)));switch(w(e)){case"array":var s=[];if(o=Object.keys(e),null===t||i<t)for(var l=0,u=o.length;l<u;l++){const r=o[l],u=e[r];s[r]=a(u,t,n,i+1)}return s;case"object":var c={};if(o=Object.keys(e),null===t||i<t)for(l=0,u=o.length;l<u;l++){const r=o[l],s=e[r];c[r]=a(s,t,n,i+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="",i="",o=null,s=0){if(a===n&&(r[r.length]=i),null!==o&&s>=o)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,(""===i?i:i+".")+r,o,s+1)}}(e,t,"","",n),0!==(r=r.map(e=>"boolean"===w(e)?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,i=0){if(r===n)return r;var o=!1;if(null!==a&&i>=a)return o;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,i+1);if(c){o=(r=""===r?r:r+".")+c;break}}return o}(e,t,"",n,0);return"boolean"===w(r)?r:""===r?r:((r=r.split(".")).pop(),r=r.join("."))}}function i(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 i=0,o=Object.keys(t),s=o.length;i<s;i++){if(e(t[o[i]],n,r,a+1))return!0}return!1}(e,t,n)}function o(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 i=0,o=Object.keys(t),s=o.length;i<s;i++){if(e(t[o[i]],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(g(e,t))return!0;if(y(t)&&v(e,t)&&_(e,Object.keys(t))){if(g(f(e,Object.keys(t)),t))return!0}if((null===n||r<n)&&y(e))for(var a=0,i=Object.keys(e),o=i.length;a<o;a++){if(d(e[i[a]],t,n,r+1))return!0}return!1}function m(e,t,n=null){var r=p(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 p(e,t,n=null){var r=[];return function e(t,n,a="",i,o){if(y(n)&&v(t,n)&&_(t,Object.keys(n))){g(f(t,Object.keys(n)),n)&&(r[r.length]=a)}if(g(t,n)&&(r[r.length]=a),null!==i&&o>=i)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,i,o+1)}}(e,t,"",n,0),0!==r.length&&r}function h(e,t,n=null){return function e(t,n,r="",a,i){if(y(n)&&v(t,n)&&_(t,Object.keys(n))){if(g(f(t,Object.keys(n)),n))return r}if(g(t,n))return r;var o=!1;if(null!==a&&i>=a)return o;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,i+1);if(c){o=(r=""===r?r:r+".")+c;break}}return o}(e,t,"",n,0)}function f(e,t){const n=w(e);if(-1!==["array","object"].indexOf(n)&&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,i=0;i<n;i++){const e=""+t[i];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 g(e,t){const n=b(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 i=!0,o=0;o<a;o++){const n=r[o],a=g(e[n],t[n]);if(!1===a){i=a;break}}return i}function b(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),i=n.length;if(i!==a.length)return!1;if(0===i)return!0;for(var r=0;r<i;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 b(e,t)},identical:function(e,t){return g(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 p(e,t,n)},deepFilter:function(e,t,n){return m(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 i=t[a];d(e,i,n)&&(r[a]=i)}),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 i=t[a];d(e,i,n)||(r[a]=i)}),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 o(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 i=m(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=m(e,s);l(u)&&o(u,n,r)&&(a[i]=s)}),a}if(o(e,n,r))return t}(e,t,n,r)},foundFalsy:function(e,t,n){return i(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 o=m(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=m(e,s);l(u)&&i(u,n,r)&&(a[o]=s)}),a}if(i(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,i=null===r,o=p(e,t,a&&i?null:a||i?n||r:n<r?n:r);if(!1===o)return 0;if(null===n)return o.length;if("number"===w(n)){let e=0;return o.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 i=e;return Array.isArray(r)?(r.forEach(e=>{i=i[e]}),i):i[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,i,o=0){let s;switch(w(t)){case"array":for(var l=[],u=0,c=(s=Object.keys(t)).length;u<c;u++){let a=s[u],c=t[a];l[a]=e(c,n,r,i,o+1)}return l;case"object":var d={};for(u=0,c=(s=Object.keys(t)).length;u<c;u++){let l=s[u],c=t[l];(null===i||o<i)&&(a||l===n&&(l=r,a=!0)),d[l]=e(c,n,r,i,o+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,i=0){let o;switch(w(t)){case"array":for(var s=[],l=0,u=(o=Object.keys(t)).length;l<u;l++){let u=o[l],c=t[u];s[u]=e(c,n,r,a,i+1)}return s;case"object":var c={};for(l=0,u=(o=Object.keys(t)).length;l<u;l++){let s=o[l],u=t[s];(null===a||i<a)&&s===n&&(s=r),c[s]=e(u,n,r,a,i+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 i=n(e);var o=a(i,t,r);if(!1===o)return i;""===o?o=t:o+="."+t,o=o.split(".");var s=i;return Array.isArray(o)||delete s[o],o.forEach((e,t)=>{t<o.length-1?s=s[e]:delete s[e]}),i}(e,t,r)},deepRemoveAll_Key:function(e,t,a){return function(e,t,a){if("string"!==w(t))return;if(""===t)return;let i=n(e);var o=r(i,t,a);return o===[]||!1===o?i:(o.forEach(e=>{""===e?e=t:e+="."+t,e=e.split(".");var n=i;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]}}),i)}(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"!==i(e))return t;for(var n in t)"object"===i(e[n])&&"object"===i(t[n])?e[n]=r(e[n],t[n]):e[n]=t[n];return e}function a(e,t,a){var o=a[0],s=a.length;(e||"object"!==i(o))&&(o={});for(var l=0;l<s;++l){var u=a[l];if("object"===i(u))for(var c in u)if("__proto__"!==c){var d=e?n.clone(u[c]):u[c];o[c]=t?r(o[c],d):d}}return o}function i(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,o=i(e);if("array"===o)for(a=[],r=e.length,t=0;t<r;++t)a[t]=n.clone(e[t]);else if("object"===o)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
  /*!
3
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
4
  *
44
  *
45
  * This source code is licensed under the MIT license found in the
46
  * LICENSE file in the root directory of this source tree.
47
+ */var r=n(136),a=n(137),i=n(138),o=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,m=s?Symbol.for("react.profiler"):60114,p=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 g(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 b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function v(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||b}function w(){}function M(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||b}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&g("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={},i=null,o=null;if(null!=t)for(r in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(i=""+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:i,ref:o,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 C(e,t,n,r){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var i=!1;if(null===e)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case l:case u:i=!0}}if(i)return n(r,e,""===t?"."+P(e,0):t),1;if(i=0,t=""===t?".":t+":",Array.isArray(e))for(var o=0;o<e.length;o++){var s=t+P(a=e[o],o);i+=C(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),o=0;!(a=e.next()).done;)i+=C(a=a.value,s=t+P(a,o++),n,r);else"object"===a&&g("31","[object Object]"===(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return i}function P(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,o.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 i="";null!=n&&(i=(""+n).replace(O,"$&/")+"/"),t=x(t,i,r,a),null==e||C(e,"",z,t),E(t)}var N={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||C(e,"",H,t),E(t)},count:function(e){return null==e?0:C(e,"",o.thatReturnsNull,null)},toArray:function(e){var t=[];return A(e,t,null,o.thatReturnsArgument),t},only:function(e){return S(e)||g("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:p,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:_,render:e}},Fragment:c,StrictMode:d,unstable_AsyncMode:f,unstable_Profiler:m,createElement:D,cloneElement:function(e,t,n){null==e&&g("267",e);var a=void 0,i=r({},e.props),o=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&&(o=""+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)&&(i[a]=void 0===t[a]&&void 0!==c?c[a]:t[a])}if(1===(a=arguments.length-2))i.children=n;else if(1<a){c=Array(a);for(var d=0;d<a;d++)c[d]=arguments[d+2];i.children=c}return{$$typeof:l,type:e.type,key:o,ref:s,props:i,_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}},F={default:N},R=F&&N||F;e.exports=R.default?R.default:R},function(e,t,n){"use strict";
48
  /*
49
  object-assign
50
  (c) Sindre Sorhus
51
  @license MIT
52
+ */var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(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=o(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++)i.call(n,s[d])&&(l[s[d]]=n[s[d]])}}return l}},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t,n,a,i,o,s,l){if(r(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,a,i,o,s,l],d=0;(u=new Error(t.replace(/%s/g,(function(){return c[d++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},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 i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==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,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:i,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,i=n(5),o=n(6),s=0,l=0;e.exports=function(e,t,n){var u=t&&n||0,c=t||[],d=(e=e||{}).node||r,m=void 0!==e.clockseq?e.clockseq:a;if(null==d||null==m){var p=i();null==d&&(d=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==m&&(m=a=16383&(p[6]<<8|p[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&&(m=m+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=m;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 g=h/4294967296*1e4&268435455;c[u++]=g>>>8&255,c[u++]=255&g,c[u++]=g>>>24&15|16,c[u++]=g>>>16&255,c[u++]=m>>>8|128,c[u++]=255&m;for(var b=0;b<6;++b)c[u+b]=d[b];return t||o(c)}},function(e,t,n){var r=n(5),a=n(6);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||r)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[i+s]=o[s];return t||a(o)}},function(e,t,n){"use strict";
53
  /*!
54
  * isobject <https://github.com/jonschlinkert/isobject>
55
  *
56
  * Copyright (c) 2014-2017, Jon Schlinkert.
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,i,o,s,l=1,u={},c=!1,d=e.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(e);m=m&&m.setTimeout?m: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?((i=new MessageChannel).port1.onmessage=function(e){h(e.data)},r=function(e){i.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)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&h(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(o+t,"*")}),m.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++},m.clearImmediate=p}function p(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,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{p(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 i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!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:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,u=[],c=!1,d=-1;function m(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!c){var e=s(m);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===o||!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(p)},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=i(e);return n(t)}function i(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=i,e.exports=a,a.id=149},function(e,t,n){var r;e.exports=function e(t,n,a){function i(s,l){if(!n[s]){if(!t[s]){if(!l&&"function"==typeof r&&r)return r(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,n,a)}return n[s].exports}for(var o="function"==typeof r&&r,s=0;s<a.length;s++)i(a[s]);return i}({1:[function(e,t,n){!function(e){"use strict";var n,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,i=Math.floor,o="[BigNumber Error] ",s=o+"Number primitive has more than 15 significant digits: ",l=1e14,u=14,c=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,p=1e9;function h(e){var t=0|e;return 0<e||e===t?t:t-1}function f(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=u-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function _(e,t){var n,r,a=e.c,i=t.c,o=e.s,s=t.s,l=e.e,u=t.e;if(!o||!s)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-s:o;if(o!=s)return o;if(n=o<0,r=l==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return u<l^n?1:-1;for(s=(l=a.length)<(u=i.length)?l:u,o=0;o<s;o++)if(a[o]!=i[o])return a[o]>i[o]^n?1:-1;return l==u?0:u<l^n?1:-1}function y(e,t,n,r){if(e<t||n<e||e!==(e<0?a(e):i(e)))throw Error(o+(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 h(e.e/u)==t&&e.c[t]%2!=0}function b(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function v(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,w,M,k,L,Y,T,D,S,O,j=B.prototype={constructor:B,toString:null,valueOf:null},x=new B(1),E=20,C=4,P=-7,H=21,z=-1e7,A=1e7,N=!1,F=1,R=0,W={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},I="0123456789abcdefghijklmnopqrstuvwxyz";function B(e,t){var n,a,o,l,d,m,p,h,f=this;if(!(f instanceof B))return new B(e,t);if(null==t){if(e instanceof B)return f.s=e.s,f.e=e.e,void(f.c=(e=e.c)?e.slice():e);if((m="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,d=e;10<=d;d/=10,l++);return f.e=l,void(f.c=[e])}h=String(e)}else{if(h=String(e),!r.test(h))return M(f,h,m);f.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}-1<(l=h.indexOf("."))&&(h=h.replace(".","")),0<(d=h.search(/e/i))?(l<0&&(l=d),l+=+h.slice(d+1),h=h.substring(0,d)):l<0&&(l=h.length)}else{if(y(t,2,I.length,"Base"),h=String(e),10==t)return V(f=new B(e instanceof B?e:h),E+f.e+1,C);if(m="number"==typeof e){if(0*e!=0)return M(f,h,m,t);if(f.s=1/e<0?(h=h.slice(1),-1):1,B.DEBUG&&15<h.replace(/^0\.0*|\./,"").length)throw Error(s+e);m=!1}else f.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(n=I.slice(0,t),l=d=0,p=h.length;d<p;d++)if(n.indexOf(a=h.charAt(d))<0){if("."==a){if(l<d){l=p;continue}}else if(!o&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){o=!0,d=-1,l=0;continue}return M(f,String(e),m,t)}-1<(l=(h=w(h,t,10,f.s)).indexOf("."))?h=h.replace(".",""):l=h.length}for(d=0;48===h.charCodeAt(d);d++);for(p=h.length;48===h.charCodeAt(--p););if(h=h.slice(d,++p)){if(p-=d,m&&B.DEBUG&&15<p&&(c<e||e!==i(e)))throw Error(s+f.s*e);if(A<(l=l-d-1))f.c=f.e=null;else if(l<z)f.c=[f.e=0];else{if(f.e=l,f.c=[],d=(l+1)%u,l<0&&(d+=u),d<p){for(d&&f.c.push(+h.slice(0,d)),p-=u;d<p;)f.c.push(+h.slice(d,d+=u));h=h.slice(d),d=u-h.length}else d-=p;for(;d--;h+="0");f.c.push(+h)}}else f.c=[f.e=0]}function J(e,t,n,r){var a,i,o,s,l;if(null==n?n=C:y(n,0,8),!e.c)return e.toString();if(a=e.c[0],o=e.e,null==t)l=f(e.c),l=1==r||2==r&&(o<=P||H<=o)?b(l,o):v(l,o,"0");else if(i=(e=V(new B(e),t,n)).e,s=(l=f(e.c)).length,1==r||2==r&&(t<=i||i<=P)){for(;s<t;l+="0",s++);l=b(l,i)}else if(t-=o,l=v(l,i,"0"),s<i+1){if(0<--t)for(l+=".";t--;l+="0");}else if(0<(t+=i-s))for(i+1==s&&(l+=".");t--;l+="0");return e.s<0&&a?"-"+l:l}function U(e,t){for(var n,r=1,a=new B(e[0]);r<e.length;r++){if(!(n=new B(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*u-1)>A?e.c=e.e=null:e.c=n<z?[e.e=0]:(e.e=n,t),e}function V(e,t,n,r){var o,s,c,m,p,h,f,_=e.c,y=d;if(_){e:{for(o=1,m=_[0];10<=m;m/=10,o++);if((s=t-o)<0)s+=u,c=t,f=(p=_[h=0])/y[o-c-1]%10|0;else if((h=a((s+1)/u))>=_.length){if(!r)break e;for(;_.length<=h;_.push(0));p=f=0,c=(s%=u)-u+(o=1)}else{for(p=m=_[h],o=1;10<=m;m/=10,o++);f=(c=(s%=u)-u+o)<0?0:p/y[o-c-1]%10|0}if(r=r||t<0||null!=_[h+1]||(c<0?p:p%y[o-c-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<c?p/y[o-c]:0:_[h-1])%10&1||n==(e.s<0?8:7)),t<1||!_[0])return _.length=0,r?(t-=e.e+1,_[0]=y[(u-t%u)%u],e.e=-t||0):_[0]=e.e=0,e;if(0==s?(_.length=h,m=1,h--):(_.length=h+1,m=y[u-s],_[h]=0<c?i(p/y[o-c]%y[c])*m:0),r)for(;;){if(0==h){for(s=1,c=_[0];10<=c;c/=10,s++);for(c=_[0]+=m,m=1;10<=c;c/=10,m++);s!=m&&(e.e++,_[0]==l&&(_[0]=1));break}if(_[h]+=m,_[h]!=l)break;_[h--]=0,m=1}for(s=_.length;0===_[--s];_.pop());}e.e>A?e.c=e.e=null:e.e<z&&(e.c=[e.e=0])}return e}function G(e){var t,n=e.e;return null===n?e.toString():(t=f(e.c),t=n<=P||H<=n?b(t,n):v(t,n,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(o+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(y(n=e[t],0,p,t),E=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(y(n=e[t],0,8,t),C=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(y(n[0],-p,0,t),y(n[1],0,p,t),P=n[0],H=n[1]):(y(n,-p,p,t),P=-(H=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)y(n[0],-p,-1,t),y(n[1],1,p,t),z=n[0],A=n[1];else{if(y(n,-p,p,t),!n)throw Error(o+t+" cannot be zero: "+n);z=-(A=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(o+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw N=!n,Error(o+"crypto unavailable");N=n}else N=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(n=e[t],0,9,t),F=n),e.hasOwnProperty(t="POW_PRECISION")&&(y(n=e[t],0,p,t),R=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(o+t+" not an object: "+n);W=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(o+t+" invalid: "+n);I=n}}return{DECIMAL_PLACES:E,ROUNDING_MODE:C,EXPONENTIAL_AT:[P,H],RANGE:[z,A],CRYPTO:N,MODULO_MODE:F,POW_PRECISION:R,FORMAT:W,ALPHABET:I}},B.isBigNumber=function(e){return e instanceof B||e&&!0===e._isBigNumber||!1},B.maximum=B.max=function(){return U(arguments,j.lt)},B.minimum=B.min=function(){return U(arguments,j.gt)},B.random=(k=9007199254740992,L=Math.random()*k&2097151?function(){return i(Math.random()*k)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,s,l,c=0,m=[],h=new B(x);if(null==e?e=E:y(e,0,p),s=a(e/u),N)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(s*=2));c<s;)9e15<=(l=131072*t[c]+(t[c+1]>>>11))?(n=crypto.getRandomValues(new Uint32Array(2)),t[c]=n[0],t[c+1]=n[1]):(m.push(l%1e14),c+=2);c=s/2}else{if(!crypto.randomBytes)throw N=!1,Error(o+"crypto unavailable");for(t=crypto.randomBytes(s*=7);c<s;)9e15<=(l=281474976710656*(31&t[c])+1099511627776*t[c+1]+4294967296*t[c+2]+16777216*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])?crypto.randomBytes(7).copy(t,c):(m.push(l%1e14),c+=7);c=s/7}if(!N)for(;c<s;)(l=L())<9e15&&(m[c++]=l%1e14);for(s=m[--c],e%=u,s&&e&&(l=d[u-e],m[c]=i(s/l)*l);0===m[c];m.pop(),c--);if(c<0)m=[r=0];else{for(r=-1;0===m[0];m.splice(0,1),r-=u);for(c=1,l=m[0];10<=l;l/=10,c++);c<u&&(r-=u-c)}return h.e=r,h.c=m,h}),B.sum=function(){for(var e=1,t=arguments,n=new B(t[0]);e<t.length;)n=n.plus(t[e++]);return n},w=function(){var e="0123456789";function t(e,t,n,r){for(var a,i,o=[0],s=0,l=e.length;s<l;){for(i=o.length;i--;o[i]*=t);for(o[0]+=r.indexOf(e.charAt(s++)),a=0;a<o.length;a++)o[a]>n-1&&(null==o[a+1]&&(o[a+1]=0),o[a+1]+=o[a]/n|0,o[a]%=n)}return o.reverse()}return function(r,a,i,o,s){var l,u,c,d,m,p,h,_,y=r.indexOf("."),g=E,b=C;for(0<=y&&(d=R,R=0,r=r.replace(".",""),p=(_=new B(a)).pow(r.length-y),R=d,_.c=t(v(f(p.c),p.e,"0"),10,i,e),_.e=_.c.length),c=d=(h=t(r,a,i,s?(l=I,e):(l=e,I))).length;0==h[--d];h.pop());if(!h[0])return l.charAt(0);if(y<0?--c:(p.c=h,p.e=c,p.s=o,h=(p=n(p,_,g,b,i)).c,m=p.r,c=p.e),y=h[u=c+g+1],d=i/2,m=m||u<0||null!=h[u+1],m=b<4?(null!=y||m)&&(0==b||b==(p.s<0?3:2)):d<y||y==d&&(4==b||m||6==b&&1&h[u-1]||b==(p.s<0?8:7)),u<1||!h[0])r=m?v(l.charAt(1),-g,l.charAt(0)):l.charAt(0);else{if(h.length=u,m)for(--i;++h[--u]>i;)h[u]=0,u||(++c,h=[1].concat(h));for(d=h.length;!h[--d];);for(y=0,r="";y<=d;r+=l.charAt(h[y++]));r=v(r,c,l.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,o,s=0,l=e.length,u=t%m,c=t/m|0;for(e=e.slice();l--;)s=((a=u*(i=e[l]%m)+(r=c*i+(o=e[l]/m|0)*u)%m*m+s)/n|0)+(r/m|0)+c*o,e[l]=a%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=r<n?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(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));}return function(r,a,o,s,c){var d,m,p,f,_,y,g,b,v,w,M,k,L,Y,T,D,S,O=r.s==a.s?1:-1,j=r.c,x=a.c;if(!(j&&j[0]&&x&&x[0]))return new B(r.s&&a.s&&(j?!x||j[0]!=x[0]:x)?j&&0==j[0]||!x?0*O:O/0:NaN);for(v=(b=new B(O)).c=[],O=o+(m=r.e-a.e)+1,c||(c=l,m=h(r.e/u)-h(a.e/u),O=O/u|0),p=0;x[p]==(j[p]||0);p++);if(x[p]>(j[p]||0)&&m--,O<0)v.push(1),f=!0;else{for(Y=j.length,D=x.length,O+=2,1<(_=i(c/(x[p=0]+1)))&&(x=e(x,_,c),j=e(j,_,c),D=x.length,Y=j.length),L=D,M=(w=j.slice(0,D)).length;M<D;w[M++]=0);S=x.slice(),S=[0].concat(S),T=x[0],x[1]>=c/2&&T++;do{if(_=0,(d=t(x,w,D,M))<0){if(k=w[0],D!=M&&(k=k*c+(w[1]||0)),1<(_=i(k/T)))for(c<=_&&(_=c-1),g=(y=e(x,_,c)).length,M=w.length;1==t(y,w,g,M);)_--,n(y,D<g?S:x,g,c),g=y.length,d=1;else 0==_&&(d=_=1),g=(y=x.slice()).length;if(g<M&&(y=[0].concat(y)),n(w,y,M,c),M=w.length,-1==d)for(;t(x,w,D,M)<1;)_++,n(w,D<M?S:x,M,c),M=w.length}else 0===d&&(_++,w=[0]);v[p++]=_,w[0]?w[M++]=j[L]||0:(w=[j[L]],M=1)}while((L++<Y||null!=w[0])&&O--);f=null!=w[0],v[0]||v.splice(0,1)}if(c==l){for(p=1,O=v[0];10<=O;O/=10,p++);V(b,o+(b.e=p+m*u-1)+1,s,f)}else b.e=m,b.r=+f;return b}}(),Y=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,D=/^\.([^.]+)$/,S=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,M=function(e,t,n,r){var a,i=n?t:t.replace(O,"");if(S.test(i))e.s=isNaN(i)?null:i<0?-1:1,e.c=e.e=null;else{if(!n&&(i=i.replace(Y,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(T,"$1").replace(D,"0.$1")),t!=i))return new B(i,a);if(B.DEBUG)throw Error(o+"Not a"+(r?" base "+r:"")+" number: "+t);e.c=e.e=e.s=null}},j.absoluteValue=j.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},j.comparedTo=function(e,t){return _(this,new B(e,t))},j.decimalPlaces=j.dp=function(e,t){var n,r,a;if(null!=e)return y(e,0,p),null==t?t=C:y(t,0,8),V(new B(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((a=n.length-1)-h(this.e/u))*u,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},j.dividedBy=j.div=function(e,t){return n(this,new B(e,t),E,C)},j.dividedToIntegerBy=j.idiv=function(e,t){return n(this,new B(e,t),0,1)},j.exponentiatedBy=j.pow=function(e,t){var n,r,s,l,c,d,m,p,h=this;if((e=new B(e)).c&&!e.isInteger())throw Error(o+"Exponent not an integer: "+G(e));if(null!=t&&(t=new B(t)),c=14<e.e,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return p=new B(Math.pow(+G(h),c?2-g(e):+G(e))),t?p.mod(t):p;if(d=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(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]||c&&24e7<=h.c[1]:h.c[0]<8e13||c&&h.c[0]<=9999975e7)))return l=h.s<0&&g(e)?-0:0,-1<h.e&&(l=1/l),new B(d?1/l:l);R&&(l=a(R/u+2))}for(m=c?(n=new B(.5),d&&(e.s=1),g(e)):(s=Math.abs(+G(e)))%2,p=new B(x);;){if(m){if(!(p=p.times(h)).c)break;l?p.c.length>l&&(p.c.length=l):r&&(p=p.mod(t))}if(s){if(0===(s=i(s/2)))break;m=s%2}else if(V(e=e.times(n),e.e+1,1),14<e.e)m=g(e);else{if(0==(s=+G(e)))break;m=s%2}h=h.times(h),l?h.c&&h.c.length>l&&(h.c.length=l):r&&(h=h.mod(t))}return r?p:(d&&(p=x.div(p)),t?p.mod(t):l?V(p,R,C,void 0):p)},j.integerValue=function(e){var t=new B(this);return null==e?e=C:y(e,0,8),V(t,t.e+1,e)},j.isEqualTo=j.eq=function(e,t){return 0===_(this,new B(e,t))},j.isFinite=function(){return!!this.c},j.isGreaterThan=j.gt=function(e,t){return 0<_(this,new B(e,t))},j.isGreaterThanOrEqualTo=j.gte=function(e,t){return 1===(t=_(this,new B(e,t)))||0===t},j.isInteger=function(){return!!this.c&&h(this.e/u)>this.c.length-2},j.isLessThan=j.lt=function(e,t){return _(this,new B(e,t))<0},j.isLessThanOrEqualTo=j.lte=function(e,t){return-1===(t=_(this,new B(e,t)))||0===t},j.isNaN=function(){return!this.s},j.isNegative=function(){return this.s<0},j.isPositive=function(){return 0<this.s},j.isZero=function(){return!!this.c&&0==this.c[0]},j.minus=function(e,t){var n,r,a,i,o=this,s=o.s;if(t=(e=new B(e,t)).s,!s||!t)return new B(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/u,d=e.e/u,m=o.c,p=e.c;if(!c||!d){if(!m||!p)return m?(e.s=-t,e):new B(p?o:NaN);if(!m[0]||!p[0])return p[0]?(e.s=-t,e):new B(m[0]?o:3==C?-0:0)}if(c=h(c),d=h(d),m=m.slice(),s=c-d){for((a=(i=s<0)?(s=-s,m):(d=c,p)).reverse(),t=s;t--;a.push(0));a.reverse()}else for(r=(i=(s=m.length)<(t=p.length))?s:t,s=t=0;t<r;t++)if(m[t]!=p[t]){i=m[t]<p[t];break}if(i&&(a=m,m=p,p=a,e.s=-e.s),0<(t=(r=p.length)-(n=m.length)))for(;t--;m[n++]=0);for(t=l-1;s<r;){if(m[--r]<p[r]){for(n=r;n&&!m[--n];m[n]=t);--m[n],m[r]+=l}m[r]-=p[r]}for(;0==m[0];m.splice(0,1),--d);return m[0]?q(e,m,d):(e.s=3==C?-1:1,e.c=[e.e=0],e)},j.modulo=j.mod=function(e,t){var r,a,i=this;return e=new B(e,t),!i.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||i.c&&!i.c[0]?new B(i):(9==F?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,F),(e=i.minus(r.times(e))).c[0]||1!=F||(e.s=i.s),e)},j.multipliedBy=j.times=function(e,t){var n,r,a,i,o,s,c,d,p,f,_,y,g,b,v,w=this,M=w.c,k=(e=new B(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=h(w.e/u)+h(e.e/u),e.s*=w.s,(c=M.length)<(f=k.length)&&(g=M,M=k,k=g,a=c,c=f,f=a),a=c+f,g=[];a--;g.push(0));for(b=l,v=m,a=f;0<=--a;){for(n=0,_=k[a]%v,y=k[a]/v|0,i=a+(o=c);a<i;)n=((d=_*(d=M[--o]%v)+(s=y*d+(p=M[o]/v|0)*_)%v*v+g[i]+n)/b|0)+(s/v|0)+y*p,g[i--]=d%b;g[i]=n}return n?++r:g.splice(0,1),q(e,g,r)},j.negated=function(){var e=new B(this);return e.s=-e.s||null,e},j.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new B(e,t)).s,!a||!t)return new B(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/u,o=e.e/u,s=r.c,c=e.c;if(!i||!o){if(!s||!c)return new B(a/0);if(!s[0]||!c[0])return c[0]?e:new B(s[0]?r:0*a)}if(i=h(i),o=h(o),s=s.slice(),a=i-o){for((n=0<a?(o=i,c):(a=-a,s)).reverse();a--;n.push(0));n.reverse()}for((a=s.length)-(t=c.length)<0&&(n=c,c=s,s=n,t=a),a=0;t;)a=(s[--t]=s[t]+c[t]+a)/l|0,s[t]=l===s[t]?0:s[t]%l;return a&&(s=[a].concat(s),++o),q(e,s,o)},j.precision=j.sd=function(e,t){var n,r,a;if(null!=e&&e!==!!e)return y(e,1,p),null==t?t=C:y(t,0,8),V(new B(this),e,t);if(!(n=this.c))return null;if(r=(a=n.length-1)*u+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},j.shiftedBy=function(e){return y(e,-c,c),this.times("1e"+e)},j.squareRoot=j.sqrt=function(){var e,t,r,a,i,o=this,s=o.c,l=o.s,u=o.e,c=E+4,d=new B("0.5");if(1!==l||!s||!s[0])return new B(!l||l<0&&(!s||s[0])?NaN:s?o:1/0);if((r=0==(l=Math.sqrt(+G(o)))||l==1/0?(((t=f(s)).length+u)%2==0&&(t+="0"),l=Math.sqrt(+t),u=h((u+1)/2)-(u<0||u%2),new B(t=l==1/0?"1e"+u:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+u)):new B(l+"")).c[0])for((l=(u=r.e)+c)<3&&(l=0);;)if(i=r,r=d.times(i.plus(n(o,i,c,1))),f(i.c).slice(0,l)===(t=f(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))||(V(r,r.e+E+2,1),e=!r.times(r).eq(o));break}if(!a&&(V(i,i.e+E+2,0),i.times(i).eq(o))){r=i;break}c+=4,l+=4,a=1}return V(r,r.e+E+1,C,e)},j.toExponential=function(e,t){return null!=e&&(y(e,0,p),e++),J(this,e,t,1)},j.toFixed=function(e,t){return null!=e&&(y(e,0,p),e=e+this.e+1),J(this,e,t)},j.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=W;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var a,i=r.split("."),s=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",c=i[0],d=i[1],m=this.s<0,p=m?c.slice(1):c,h=p.length;if(l&&(a=s,s=l,h-=l=a),0<s&&0<h){for(a=h%s||s,c=p.substr(0,a);a<h;a+=s)c+=u+p.substr(a,s);0<l&&(c+=u+p.slice(a)),m&&(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||"")},j.toFraction=function(e){var t,r,a,i,s,l,c,m,p,h,_,y,g=this,b=g.c;if(null!=e&&(!(c=new B(e)).isInteger()&&(c.c||1!==c.s)||c.lt(x)))throw Error(o+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+G(c));if(!b)return new B(g);for(t=new B(x),p=r=new B(x),a=m=new B(x),y=f(b),s=t.e=y.length-g.e-1,t.c[0]=d[(l=s%u)<0?u+l:l],e=!e||0<c.comparedTo(t)?0<s?t:p:c,l=A,A=1/0,c=new B(y),m.c[0]=0;h=n(c,t,0,1),1!=(i=r.plus(h.times(a))).comparedTo(e);)r=a,a=i,p=m.plus(h.times(i=p)),m=i,t=c.minus(h.times(i=t)),c=i;return i=n(e.minus(r),a,0,1),m=m.plus(i.times(p)),r=r.plus(i.times(a)),m.s=p.s=g.s,_=n(p,a,s*=2,C).minus(g).abs().comparedTo(n(m,r,s,C).minus(g).abs())<1?[p,a]:[m,r],A=l,_},j.toNumber=function(){return+G(this)},j.toPrecision=function(e,t){return null!=e&&y(e,1,p),J(this,e,t,2)},j.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<=P||H<=a?b(f(n.c),a):v(f(n.c),a,"0"):10===e?v(f((n=V(new B(n),E+a+1,C)).c),n.e,"0"):(y(e,2,I.length,"Base"),w(v(f(n.c),a,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},j.valueOf=j.toJSON=function(){return G(this)},j._isBigNumber=!0,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(j[Symbol.toStringTag]="BigNumber",j[Symbol.for("nodejs.util.inspect.custom")]=j.valueOf),null!=t&&B.set(t),B}()).default=n.BigNumber=n,void 0!==t&&t.exports?t.exports=n:(e||(e="undefined"!=typeof self&&self?self:window),e.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"},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!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){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var a=e("./globalState"),i=e("./validating"),o=e("./parsing"),s=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],l={general:{scale:1024,suffixes:s,marker:"bd"},binary:{scale:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],marker:"b"},decimal:{scale:1e3,suffixes:s,marker:"d"}},u={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1};function c(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=o.parseFormat(t)),!i.validateFormat(t))return"ERROR: invalid format";var r=t.prefix||"",s=t.postfix||"",c=function(e,t,n){switch(t.output){case"currency":return function(e,t,n){var r=n.currentCurrency(),a=Object.assign({},u,t),i=void 0,o="",s=!!a.totalLength||!!a.forceAverage||a.average,l=t.currencyPosition||r.position,c=t.currencySymbol||r.symbol;a.spaceSeparated&&(o=" "),"infix"===l&&(i=o+c+o);var d=h({instance:e,providedFormat:t,state:n,decimalSeparator:i});return"prefix"===l&&(d=e._value<0&&"sign"===a.negative?"-".concat(o).concat(c).concat(d.slice(1)):c+o+d),l&&"postfix"!==l||(d=d+(o=s?"":o)+c),d}(e,t=f(t,a.currentCurrencyDefaultFormat()),a);case"percent":return function(e,t,n,r){var a=t.prefixSymbol,i=h({instance:r(100*e._value),providedFormat:t,state:n}),o=Object.assign({},u,t);return a?"%".concat(o.spaceSeparated?" ":"").concat(i):"".concat(i).concat(o.spaceSeparated?" ":"","%")}(e,t=f(t,a.currentPercentageDefaultFormat()),a,n);case"byte":return t=f(t,a.currentByteDefaultFormat()),v=e,M=a,k=n,L=(w=t).base||"binary",Y=l[L],D=(T=d(v._value,Y.suffixes,Y.scale)).value,S=T.suffix,O=h({instance:k(D),providedFormat:w,state:M,defaults:M.currentByteDefaultFormat()}),j=M.currentAbbreviations(),"".concat(O).concat(j.spaced?" ":"").concat(S);case"time":return t=f(t,a.currentTimeDefaultFormat()),_=e,y=Math.floor(_._value/60/60),g=Math.floor((_._value-60*y*60)/60),b=Math.round(_._value-60*y*60-60*g),"".concat(y,":").concat(g<10?"0":"").concat(g,":").concat(b<10?"0":"").concat(b);case"ordinal":return r=e,i=t=f(t,a.currentOrdinalDefaultFormat()),s=(o=a).currentOrdinal(),c=Object.assign({},u,i),m=h({instance:r,providedFormat:i,state:o}),p=s(r._value),"".concat(m).concat(c.spaceSeparated?" ":"").concat(p);case"number":default:return h({instance:e,providedFormat:t,numbro:n})}var r,i,o,s,c,m,p,_,y,g,b,v,w,M,k,L,Y,T,D,S,O,j}(e,t,n);return(c=r+c)+s}function d(e,t,n){var r=t[0],a=Math.abs(e);if(n<=a){for(var i=1;i<t.length;++i){var o=Math.pow(n,i),s=Math.pow(n,i+1);if(o<=a&&a<s){r=t[i],e/=o;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function m(e){for(var t="",n=0;n<e;n++)t+="0";return t}function p(e,t){return-1!==e.toString().indexOf("e")?function(e,t){var n=e.toString(),a=r(n.split("e"),2),i=a[0],o=a[1],s=r(i.split("."),2),l=s[0],u=s[1],c=void 0===u?"":u;if(0<+o)n=l+c+m(o-c.length);else{var d=".";d=+l<0?"-0".concat(d):"0".concat(d);var p=(m(-o-1)+Math.abs(l)+c).substr(0,t);p.length<t&&(p+=m(t-p.length)),n=d+p}return 0<+o&&0<t&&(n+=".".concat(m(t))),n}(e,t):(Math.round(+"".concat(e,"e+").concat(t))/Math.pow(10,t)).toFixed(t)}function h(e){var t=e.instance,n=e.providedFormat,i=e.state,o=void 0===i?a:i,s=e.decimalSeparator,l=e.defaults,c=void 0===l?o.currentDefaults():l,d=t._value;if(0===d&&o.hasZeroFormat())return o.getZeroFormat();if(!isFinite(d))return d.toString();var m,h,f,_,y,g,b,v,w=Object.assign({},u,c,n),M=w.totalLength,k=M?0:w.characteristic,L=w.optionalCharacteristic,Y=w.forceAverage,T=!!M||!!Y||w.average,D=M?-1:T&&void 0===n.mantissa?0:w.mantissa,S=!M&&(void 0===n.optionalMantissa?-1===D:w.optionalMantissa),O=w.trimMantissa,j=w.thousandSeparated,x=w.spaceSeparated,E=w.negative,C=w.forceSign,P=w.exponential,H="";if(T){var z=function(e){var t=e.value,n=e.forceAverage,r=e.abbreviations,a=e.spaceSeparated,i=void 0!==a&&a,o=e.totalLength,s=void 0===o?0:o,l="",u=Math.abs(t),c=-1;if(u>=Math.pow(10,12)&&!n||"trillion"===n?(l=r.trillion,t/=Math.pow(10,12)):u<Math.pow(10,12)&&u>=Math.pow(10,9)&&!n||"billion"===n?(l=r.billion,t/=Math.pow(10,9)):u<Math.pow(10,9)&&u>=Math.pow(10,6)&&!n||"million"===n?(l=r.million,t/=Math.pow(10,6)):(u<Math.pow(10,6)&&u>=Math.pow(10,3)&&!n||"thousand"===n)&&(l=r.thousand,t/=Math.pow(10,3)),l&&(l=(i?" ":"")+l),s){var d=t.toString().split(".")[0];c=Math.max(s-d.length,0)}return{value:t,abbreviation:l,mantissaPrecision:c}}({value:d,forceAverage:Y,abbreviations:o.currentAbbreviations(),spaceSeparated:x,totalLength:M});d=z.value,H+=z.abbreviation,M&&(D=z.mantissaPrecision)}if(P){var A=(h=(m={value:d,characteristicPrecision:k}).value,_=void 0===(f=m.characteristicPrecision)?0:f,g=(y=r(h.toExponential().split("e"),2))[0],b=y[1],v=+g,_&&1<_&&(v*=Math.pow(10,_-1),b=0<=(b=+b-(_-1))?"+".concat(b):b),{value:v,abbreviation:"e".concat(b)});d=A.value,H=A.abbreviation+H}var N,F,R,W=function(e,t,n,a,i){if(-1===a)return e;var o=p(t,a),s=r(o.toString().split("."),2),l=s[0],u=s[1],c=void 0===u?"":u;if(c.match(/^0+$/)&&(n||i))return l;var d=c.match(/0+$/);return i&&d?"".concat(l,".").concat(c.toString().slice(0,d.index)):o.toString()}(d.toString(),d,S,D,O);return W=function(e,t,n,r,a){var i=r.currentDelimiters(),o=i.thousands;a=a||i.decimal;var s=i.thousandsSize||3,l=e.toString(),u=l.split(".")[0],c=l.split(".")[1];return n&&(t<0&&(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)+o+u.slice(e+t)})),t<0&&(u="-".concat(u))),c?u+a+c:u}(W=function(e,t,n,a){var i=e,o=r(i.toString().split("."),2),s=o[0],l=o[1];if(s.match(/^-?0$/)&&n)return l?"".concat(s.replace("0",""),".").concat(l):s.replace("0","");if(s.length<a)for(var u=a-s.length,c=0;c<u;c++)i="0".concat(i);return i.toString()}(W,0,L,k),d,j,o,s),(T||P)&&(W+=H),(C||d<0)&&(N=W,R=E,W=0===(F=d)?N:0==+N?N.replace("-",""):0<F?"+".concat(N):"sign"===R?N:"(".concat(N.replace("-",""),")")),W}function f(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 c.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=l.general;return d(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=l.binary;return d(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=l.decimal;return d(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},formatOrDefault:f}}},{"./globalState":4,"./parsing":8,"./validating":10}],4:[function(e,t,n){"use strict";var r=e("./en-US"),a=e("./validating"),i=e("./parsing"),o={},s=void 0,l={},u=null,c={};function d(e){s=e}function m(){return l[s]}o.languages=function(){return Object.assign({},l)},o.currentLanguage=function(){return s},o.currentCurrency=function(){return m().currency},o.currentAbbreviations=function(){return m().abbreviations},o.currentDelimiters=function(){return m().delimiters},o.currentOrdinal=function(){return m().ordinal},o.currentDefaults=function(){return Object.assign({},m().defaults,c)},o.currentOrdinalDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().ordinalFormat)},o.currentByteDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().byteFormat)},o.currentPercentageDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().percentageFormat)},o.currentCurrencyDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().currencyFormat)},o.currentTimeDefaultFormat=function(){return Object.assign({},o.currentDefaults(),m().timeFormat)},o.setDefaults=function(e){e=i.parseFormat(e),a.validateFormat(e)&&(c=e)},o.getZeroFormat=function(){return u},o.setZeroFormat=function(e){return u="string"==typeof e?e:null},o.hasZeroFormat=function(){return null!==u},o.languageData=function(e){if(e){if(l[e])return l[e];throw new Error('Unknown tag "'.concat(e,'"'))}return m()},o.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)},o.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)},o.registerLanguage(r),s=r.languageTag,t.exports=o},{"./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),i=t;return n.isNumbro(t)&&(i=t._value),i=new r(i),e._value=a.minus(i).toNumber(),e}t.exports=function(e){return{add:function(t,n){return i=n,o=e,s=new r((a=t)._value),l=i,o.isNumbro(i)&&(l=i._value),l=new r(l),a._value=s.plus(l).toNumber(),a;var a,i,o,s,l},subtract:function(t,n){return a(t,n,e)},multiply:function(t,n){return i=n,o=e,s=new r((a=t)._value),l=i,o.isNumbro(i)&&(l=i._value),l=new r(l),a._value=s.times(l).toNumber(),a;var a,i,o,s,l},divide:function(t,n){return i=n,o=e,s=new r((a=t)._value),l=i,o.isNumbro(i)&&(l=i._value),l=new r(l),a._value=s.dividedBy(l).toNumber(),a;var a,i,o,s,l},set:function(t,n){return r=t,i=a=n,e.isNumbro(a)&&(i=a._value),r._value=i,r;var r,a,i},difference:function(t,n){return r=n,a(o=(i=e)(t._value),r,i),Math.abs(o._value);var r,i,o}}}},{"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"),i=e("./validating"),o=e("./loading")(p),s=e("./unformatting"),l=e("./formatting")(p),u=e("./manipulating")(p),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 p(this._value)}},{key:"format",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return l.format(this,e)}},{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(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return e.output="time",l.format(this,e)}},{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,m(e))}},{key:"value",value:function(){return this._value}},{key:"valueOf",value:function(){return this._value}}])&&r(t.prototype,n),e}();function m(e){var t=e;return p.isNumbro(e)?t=e._value:"string"==typeof e?t=p.unformat(e):isNaN(e)&&(t=NaN),t}function p(e){return new d(m(e))}p.version="2.1.2",p.isNumbro=function(e){return e instanceof d},p.language=a.currentLanguage,p.registerLanguage=a.registerLanguage,p.setLanguage=a.setLanguage,p.languages=a.languages,p.languageData=a.languageData,p.zeroFormat=a.setZeroFormat,p.defaultFormat=a.currentDefaults,p.setDefaults=a.setDefaults,p.defaultCurrencyFormat=a.currentCurrencyDefaultFormat,p.validate=i.validate,p.loadLanguagesInNode=o.loadLanguagesInNode,p.unformat=s.unformat,t.exports=p},{"./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,i,o,s,l,u,c,d,m,p,h,f,_,y,g,b,v,w=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(n=w,i=w,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=(o=(a=e=(r=(t=e).match(/^{([^}]*)}/))?(n.prefix=r[1],t.slice(r[0].length)):t).match(/{([^}]*)}$/))?(i.postfix=o[1],a.slice(0,-o[0].length)):a,w),s=w,(l=e.match(/[1-9]+[0-9]*/))&&(s.totalLength=+l[0]),u=w,(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,w),d=w,-1!==e.indexOf("a")&&(d.average=!0),p=w,-1!==(m=e).indexOf("K")?p.forceAverage="thousand":-1!==m.indexOf("M")?p.forceAverage="million":-1!==m.indexOf("B")?p.forceAverage="billion":-1!==m.indexOf("T")&&(p.forceAverage="trillion"),function(e,t){var n=e.split(".")[1];if(n){var r=n.match(/0+/);r&&(t.mantissa=r[0].length)}}(e,w),f=w,(h=e).match(/\[\.]/)?f.optionalMantissa=!0:h.match(/\./)&&(f.optionalMantissa=!1),_=w,-1!==e.indexOf(",")&&(_.thousandSeparated=!0),y=w,-1!==e.indexOf(" ")&&(y.spaceSeparated=!0),b=w,(g=e).match(/^\+?\([^)]*\)$/)&&(b.negative="parenthesis"),g.match(/^\+?-/)&&(b.negative="sign"),v=w,e.match(/^\+/)&&(v.forceSign=!0),w)}}},{}],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 i,o,s,l=e("./globalState"),u=l.currentDelimiters(),c=l.currentCurrency().symbol,d=l.currentOrdinal(),m=l.getZeroFormat(),p=l.currentAbbreviations(),h=void 0;if("string"==typeof t)h=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;var n=e.split(":");if(3!==n.length)return!1;var r=+n[0],a=+n[1],i=+n[2];return!isNaN(r)&&!isNaN(a)&&!isNaN(i)}(t,u)?(o=+(i=t.split(":"))[0],s=+i[1],+i[2]+60*s+3600*o):function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",i=3<arguments.length?arguments[3]:void 0,o=4<arguments.length?arguments[4]:void 0,s=5<arguments.length?arguments[5]:void 0,l=6<arguments.length?arguments[6]:void 0;if(""!==e)return e===o?0:function e(t,n){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",o=3<arguments.length?arguments[3]:void 0,s=4<arguments.length?arguments[4]:void 0,l=5<arguments.length?arguments[5]:void 0,u=6<arguments.length?arguments[6]:void 0;if(!isNaN(+t))return+t;var c="",d=t.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(d!==t)return-1*e(d,n,i,o,s,l,u);for(var m=0;m<r.length;m++){var p=r[m];if((c=t.replace(p.key,""))!==t)return e(c,n,i,o,s,l,u)*p.factor}if((c=t.replace("%",""))!==t)return e(c,n,i,o,s,l,u)/100;var h=parseFloat(t);if(!isNaN(h)){var f=o(h);if(f&&"."!==f&&(c=t.replace(new RegExp("".concat(a(f),"$")),""))!==t)return e(c,n,i,o,s,l,u);var _={};Object.keys(l).forEach((function(e){_[l[e]]=e}));for(var y=Object.keys(_).sort().reverse(),g=y.length,b=0;b<g;b++){var v=y[b],w=_[v];if((c=t.replace(v,""))!==t){var M=void 0;switch(w){case"thousand":M=Math.pow(10,3);break;case"million":M=Math.pow(10,6);break;case"billion":M=Math.pow(10,9);break;case"trillion":M=Math.pow(10,12)}return e(c,n,i,o,s,l,u)*M}}}}(function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",r=e.replace(n,"");return(r=r.replace(new RegExp("([0-9])".concat(a(t.thousands),"([0-9])"),"g"),"$1$2")).replace(t.decimal,".")}(e,t,n),t,n,i,o,s,l)}(t,u,c,d,m,p,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(r="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 a=e("./unformatting"),i=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,o={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",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",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"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`"}},s={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",ordinal:{type:"function",mandatory:!0},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 l(e){return!!a.unformat(e)}function u(e,t,n){var a=3<arguments.length&&void 0!==arguments[3]&&arguments[3],i=Object.keys(e).map((function(a){if(!t[a])return console.error("".concat(n," Invalid key: ").concat(a)),!1;var i=e[a],s=t[a];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!u(i,o,"[Validate ".concat(a,"]"),!0))return!1}else if(r(i)!==s.type)return console.error("".concat(n," ").concat(a,' type mismatched: "').concat(s.type,'" expected, "').concat(r(i),'" provided')),!1;if(s.restrictions&&s.restrictions.length)for(var l=s.restrictions.length,c=0;c<l;c++){var d=s.restrictions[c],m=d.restriction,p=d.message;if(!m(i,e))return console.error("".concat(n," ").concat(a," invalid value: ").concat(p)),!1}return s.restriction&&!s.restriction(i,e)?(console.error("".concat(n," ").concat(a," invalid value: ").concat(s.message)),!1):s.validValues&&-1===s.validValues.indexOf(i)?(console.error("".concat(n," ").concat(a," invalid value: must be among ").concat(JSON.stringify(s.validValues),', "').concat(i,'" provided')),!1):!(s.children&&!u(i,s.children,"[Validate ".concat(a,"]")))}));return a||i.push.apply(i,function(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")}()}(Object.keys(t).map((function(r){var a=t[r];if("string"==typeof a&&(a={type:a}),a.mandatory){var i=a.mandatory;if("function"==typeof i&&(i=i(e)),i&&void 0===e[r])return console.error("".concat(n,' Missing mandatory key "').concat(r,'"')),!1}return!0})))),i.reduce((function(e,t){return e&&t}),!0)}function c(e){return u(e,o,"[Validate format]")}t.exports={validate:function(e,t){var n=l(e),r=c(t);return n&&r},validateFormat:c,validateInput:l,validateLanguage:function(e){return u(e,s,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7)},function(e,t,n){
59
  /*!
60
  * Pikaday
61
  *
62
  * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
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,i=function(e,t,r,a){n?e.addEventListener(t,r,!!a):e.attachEvent("on"+t,r)},o=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},m=function(e){return e%4==0&&e%100!=0||e%400==0},p=function(e,t){return[31,m(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},g={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},b=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,i){var o,s,l,c,d,m=e._o,p=n===m.minYear,h=n===m.maxYear,f='<div id="'+i+'" class="pika-title" role="heading" aria-live="assertive">',_=!0,y=!0;for(l=[],o=0;o<12;o++)l.push('<option value="'+(n===a?o-t:12+o-t)+'"'+(o===r?' selected="selected"':"")+(p&&o<m.minMonth||h&&o>m.maxMonth?'disabled="disabled"':"")+">"+m.i18n.months[o]+"</option>");for(c='<div class="pika-label">'+m.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",u(m.yearRange)?(o=m.yearRange[0],s=m.yearRange[1]+1):(o=n-m.yearRange,s=1+n+m.yearRange),l=[];o<s&&o<=m.maxYear;o++)o>=m.minYear&&l.push('<option value="'+o+'"'+(o===n?' selected="selected"':"")+">"+o+"</option>");return d='<div class="pika-label">'+n+m.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",m.showMonthAfterYear?f+=d+c:f+=c+d,p&&(0===r||m.minMonth>=r)&&(_=!1),h&&(11===r||m.maxMonth<=r)&&(y=!1),0===t&&(f+='<button class="pika-prev'+(_?"":" is-disabled")+'" type="button">'+m.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(f+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+m.i18n.nextMonth+"</button>"),f+"</div>"},k=function(o){var s=this,u=s.config(o);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;"),i(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:""),i(s.el,"mousedown",s._onMouseDown,!0),i(s.el,"touchend",s._onMouseDown,!0),i(s.el,"change",s._onChange),i(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),i(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",i(u.trigger,"click",s._onInputClick),i(u.trigger,"focus",s._onInputFocus),i(u.trigger,"blur",s._onInputBlur)):this.show()};return k.prototype={config:function(e){this._o||(this._o=_({},g,!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))||g.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,i=this.getDate(),o=24*parseInt(r)*60*60*1e3;"add"===n?a=new Date(i.valueOf()+o):"subtract"===n&&(a=new Date(i.valueOf()-o)),t&&("add"===n?a=e(i).add(r,"days").toDate():"subtract"===n&&(a=e(i).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=g.minDate,this._o.minYear=g.minYear,this._o.minMonth=g.minMonth,this._o.startRange=g.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=g.maxDate,this._o.maxYear=g.maxYear,this._o.maxMonth=g.maxMonth,this._o.endRange=g.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,i=n.maxYear,o=n.minMonth,s=n.maxMonth,l="";this._y<=r&&(this._y=r,!isNaN(o)&&this._m<o&&(this._m=o)),this._y>=i&&(this._y=i,!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,i,o,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,i=window.innerWidth||r.documentElement.clientWidth,o=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>i||this._o.position.indexOf("right")>-1&&l-n+e.offsetWidth>0)&&(l=l-n+e.offsetWidth),(this._o.reposition&&u+a>o+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,i=p(e,t),o=new Date(e,t,1).getDay(),s=[],l=[];h(a),r.firstDay>0&&(o-=r.firstDay)<0&&(o+=7);for(var u,m,_,y,g=0===t?11:t-1,M=11===t?0:t+1,k=0===t?e-1:e,L=11===t?e+1:e,Y=p(k,g),T=i+o,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-o+1),x=!!c(this._d)&&f(j,this._d),E=f(j,a),C=S<o||S>=i+o,P=S-o+1,H=t,z=e,A=r.startRange&&f(r.startRange,j),N=r.endRange&&f(r.endRange,j),F=r.startRange&&r.endRange&&r.startRange<j&&j<r.endRange;C&&(S<o?(P=Y+P,H=g,z=k):(P-=i,H=M,z=L));var R={day:P,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:C,isStartRange:A,isEndRange:N,isInRange:F,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};l.push(v(R)),7==++O&&(r.showWeekNumber&&l.unshift((u=S-o,m=t,_=e,y=void 0,void 0,y=new Date(_,0,1),'<td class="pika-week">'+Math.ceil(((new Date(_,m,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="'+b(e,t)+'">'+b(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&&(i(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&&o(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(),o(this.el,"mousedown",this._onMouseDown,!0),o(this.el,"touchend",this._onMouseDown,!0),o(this.el,"change",this._onChange),this._o.field&&(o(this._o.field,"change",this._onInputChange),this._o.bound&&(o(this._o.trigger,"click",this._onInputClick),o(this._o.trigger,"focus",this._onInputFocus),o(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),i=n(129),o=n.n(i),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,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?a(e.value):new n((function(t){t(e.value)})).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=(a=o.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var m={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},p=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,i=n.chartLanguage,o=n.mapsApiKey,s=n.onLoad;e.charts.load(r||"current",{packages:a||["corechart","controls"],language:i||"en",mapsApiKey:o}),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)(o.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 i=n.headers?"headers="+n.headers:"headers=0",o=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?"+(""+i+s+l+o+u);new e.visualization.Query(c).send((function(e){e.isError()?a("Error in query: "+e.getMessage()+" "+e.getDetailedMessage()):r(e.getDataTable())}))}))]}))}))},g=Object(r.createContext)(m),b=g.Provider,v=g.Consumer,w=function(e){var t=e.children,n=e.value;return Object(r.createElement)(b,{value:n},t)},M=function(e){var t=e.render;return Object(r.createElement)(v,null,(function(e){return t(e)}))},k="#CCCCCC",L=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,i=t.getColumnID(n,a);t.state.hiddenColumns.includes(i)?t.setState((function(e){return u({},e,{hiddenColumns:e.hiddenColumns.filter((function(e){return e!==i})).slice()})})):t.setState((function(e){return u({},e,{hiddenColumns:e.hiddenColumns.concat([i])})}))}}))},t.applyFormatters=function(e,n){for(var r=t.props.google,a=0,i=n;a<i.length;a++){var o=i[a];switch(o.type){case"ArrowFormat":(s=new r.visualization.ArrowFormat(o.options)).format(e,o.column);break;case"BarFormat":(s=new r.visualization.BarFormat(o.options)).format(e,o.column);break;case"ColorFormat":for(var s=new r.visualization.ColorFormat(o.options),l=0,u=o.ranges;l<u.length;l++){var c=u[l];s.addRange.apply(s,c)}s.format(e,o.column);break;case"DateFormat":(s=new r.visualization.DateFormat(o.options)).format(e,o.column);break;case"NumberFormat":(s=new r.visualization.NumberFormat(o.options)).format(e,o.column);break;case"PatternFormat":(s=new r.visualization.PatternFormat(o.options)).format(e,o.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,i=e.columns,o=e.options,s=e.legend_toggle,l=e.legendToggle,u=e.chartType,m=e.formatters,p=e.spreadSheetUrl,h=e.spreadSheetQueryParameters;return c(t,void 0,void 0,(function(){var e,t,c,f,_,g,b,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&&(g=t.visualization.arrayToDataTable(r.old),b=t.visualization.arrayToDataTable(r.new),_=t.visualization[u].prototype.computeDiff(g,b)),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===i?[3,2]:(f=t.visualization.arrayToDataTable([i].concat(a)),[3,5]);case 2:return null===p?[3,4]:[4,y(t,p,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(o),c.setDataTable(f),c.draw(),null!==this.props.googleChartDashboard&&this.props.googleChartDashboard.draw(f),null!==_&&(c.setDataTable(_),c.draw()),null!==m&&(this.applyFormatters(f,m),c.setDataTable(f),c.draw()),!0!==l&&!0!==s||this.grayOutHiddenColumns({options:o}),[2]}}))}))},t.grayOutHiddenColumns=function(e){var n=e.options,r=t.props.googleChartWrapper,a=r.getDataTable();if(null!==a){var i=a.getNumberOfColumns();if(!1!==t.state.hiddenColumns.length>0){var o=Array.from({length:i-1}).map((function(e,r){var i=t.getColumnID(a,r+1);return t.state.hiddenColumns.includes(i)?k:void 0!==n.colors&&null!==n.colors?n.colors[r]:_[r]}));r.setOptions(u({},n,{colors:o})),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),Y=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)(L,u({},e,{google:t,googleChartWrapper:n,googleChartDashboard:a}))}})},t}(r.Component),T=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 i=function(e){var n=e.eventName,i=e.callback;r.visualization.events.addListener(a,n,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];i({chartWrapper:a,props:t.props,google:r,eventArgs:e})}))},o=0,s=n;o<s.length;o++){i(s[o])}}},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),D=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 D+=1,void 0===e?"googlechart-control-"+t+"-"+D:e},t.addControls=function(e,n){var r=t.props,a=r.google,i=r.controls,o=null===i?null:i.map((function(e,n){var r=e.controlID,i=e.controlType,o=e.options,s=e.controlWrapperParams,l=t.getControlID(r,n);return{controlProp:e,control:new a.visualization.ControlWrapper(u({containerId:l,controlType:i,options:o},s))}}));if(null===o)return null;n.bind(o.map((function(e){return e.control})),e);for(var s=function(n){for(var r=n.control,i=n.controlProp.controlEvents,o=function(n){var i=n.callback,o=n.eventName;a.visualization.events.removeListener(r,o,i),a.visualization.events.addListener(r,o,(function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];i({chartWrapper:e,controlWrapper:r,props:t.props,google:a,eventArgs:n})}))},s=0,l=void 0===i?[]:i;s<l.length;s++){o(l[s])}},l=0,c=o;l<c.length;l++){s(c[l])}return o},t.renderChart=function(){var e=t.props,n=e.width,a=e.height,i=e.options,o=e.style,s=e.className,l=e.rootProps,c=e.google,d=u({height:a||i&&i.height,width:n||i&&i.width},o);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)(Y,{googleChartWrapper:t.state.googleChartWrapper,google:c,googleChartDashboard:t.state.googleChartDashboard}),Object(r.createElement)(T,{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,i=e.toolbarItems,o=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),m=this.addControls(c,d);null!==i&&n.visualization.drawToolbar(this.toolbar_ref.current,i);var p=null;null!==o&&o({chartEditor:p=new n.visualization.ChartEditor,chartWrapper:c,google:n}),this.setState({googleChartEditor:p,googleChartControls:m,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,i=n.controlWrapperParams;i&&"state"in i&&this.state.googleChartControls[t].control.setState(i.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,i=e.style,o=u({height:n||a&&a.height,width:t||a&&a.width},i);return null!==this.props.render?Object(r.createElement)("div",{ref:this.dashboard_ref,style:o},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:o},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),O=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,i=e.mapsApiKey,o=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:o,Object(r.createElement)(p,u({},{chartLanguage:t,chartPackages:n,chartVersion:a,mapsApiKey:i},{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=m,t}(r.Component),j=n(130),x=n.n(j);function E(e){return(E="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 C(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 P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function H(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var A=wp.element,N=A.Component,F=A.Fragment,R=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?H(e):t}(this,P(t).apply(this,arguments))).initDataTable=e.initDataTable.bind(H(e)),e.dataRenderer=e.dataRenderer.bind(H(e)),e.table,e.uniqueId=x()(),e}var n,r,a;return 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}}),t&&z(e,t)}(t,e),n=t,(r=[{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(i,r,t)}})),i=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:i,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,n){var r,a=this.props.options;if(void 0===a.series[n])return e;switch(t){case"date":case"datetime":case"timeofday":return a.series[n].format&&a.series[n].format.from&&a.series[n].format.to?jQuery.fn.dataTable.render.moment(a.series[n].format.from,a.series[n].format.to):jQuery.fn.dataTable.render.moment("MM-DD-YYYY");case"num":var i=["","","","",""];return a.series[n].format.thousands&&(i[0]=a.series[n].format.thousands),a.series[n].format.decimal&&(i[1]=a.series[n].format.decimal),a.series[n].format.precision&&(i[2]=a.series[n].format.precision),a.series[n].format.prefix&&(i[3]=a.series[n].format.prefix),a.series[n].format.suffix&&(i[4]=a.series[n].format.suffix),(r=jQuery.fn.dataTable.render).number.apply(r,i);case"boolean":return jQuery.fn.dataTable.render.extra=function(e,t,r){return!0!==e&&"true"!==e||void 0===a.series[n].format||""===a.series[n].format.truthy?!1!==e&&"false"!==e||void 0===a.series[n].format||""===a.series[n].format.falsy?e:a.series[n].format.falsy.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""):a.series[n].format.truthy.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"")},jQuery.fn.dataTable.render.extra}return e}},{key:"render",value:function(){var e=this.props.options;return wp.element.createElement(F,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)}))}}])&&C(n.prototype,r),a&&C(n,a),t}(N),W=n(4),I=n.n(W),B=n(131),J=n.n(B),U=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(I()(e)){for(t in e)return!0;return!1}return"string"==typeof e?0<e.length:null!=e},V=function(e){return J()(e,q)},G=function(e){return e.width="",e.height="",e.backgroundColor={},e.chartArea={},V(e)},$=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},K=function(e,t){return!0===e[t]||"true"===e[t]||"1"===e[t]||1===e[t]};function Z(e){return(Z="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 Q(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function X(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){Q(i,r,a,o,s,"next",e)}function s(e){Q(i,r,a,o,s,"throw",e)}o(void 0)}))}}function ee(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 te(e){return(te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ne(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function re(e,t){return(re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ae=lodash.startCase,ie=wp.i18n.__,oe=wp.apiFetch,se=wp.element,le=se.Component,ue=se.Fragment,ce=wp.components,de=ce.Button,me=ce.Dashicon,pe=ce.ExternalLink,he=ce.Notice,fe=ce.Placeholder,_e=ce.Spinner,ye=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?ne(e):t}(this,te(t).apply(this,arguments))).loadMoreCharts=e.loadMoreCharts.bind(ne(e)),e.state={charts:null,isBusy:!1,chartsLoaded:!1,perPage:visualizerLocalize.chartsPerPage},e}var n,r,a,i,o;return 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}}),t&&re(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(o=X(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=visualizerLocalize.chartsPerPage,e.next=3,oe({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:(i=X(regeneratorRuntime.mark((function e(){var t,n,r,a;return regeneratorRuntime.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,oe({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 i.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.state,n=t.charts,r=t.isBusy,a=t.chartsLoaded,i=t.perPage;return wp.element.createElement("div",{className:"visualizer-settings__charts"},wp.element.createElement(he,{status:"warning",isDismissible:!1},ie("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(pe,{href:visualizerLocalize.adminPage},ie("Click here to visit Visualizer Charts Library."))),null!==n?1<=n.length?wp.element.createElement(ue,null,wp.element.createElement("div",{className:"visualizer-settings__charts-grid"},Object.keys(n).map((function(t){var r,a,i,o=U(n[t].chart_data);if(r=o["visualizer-settings"].title?o["visualizer-settings"].title:"#".concat(n[t].id),a=0<=["gauge","table","timeline","dataTable"].indexOf(o["visualizer-chart-type"])?"dataTable"===o["visualizer-chart-type"]?o["visualizer-chart-type"]:ae(o["visualizer-chart-type"]):"".concat(ae(o["visualizer-chart-type"]),"Chart"),!o["visualizer-chart-library"]||"ChartJS"!==o["visualizer-chart-library"])return o["visualizer-data-exploded"]&&(i=ie("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",key:"chart-".concat(n[t].id)},wp.element.createElement("div",{className:"visualizer-settings__charts-title"},r),"dataTable"===a?wp.element.createElement(R,{id:n[t].id,rows:o["visualizer-data"],columns:o["visualizer-series"],chartsScreen:!0,options:G(o["visualizer-settings"])}):(o["visualizer-data-exploded"],wp.element.createElement(O,{chartType:a,rows:o["visualizer-data"],columns:o["visualizer-series"],options:G(o["visualizer-settings"])})),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:ie("Insert Chart"),onClick:function(){return e.props.getChart(n[t].id)}},wp.element.createElement(me,{icon:"upload"})))}))),!a&&i-1<n.length&&wp.element.createElement(de,{isPrimary:!0,isLarge:!0,onClick:this.loadMoreCharts,isBusy:r},ie("Load More"))):wp.element.createElement("p",{className:"visualizer-no-charts"},ie("No charts found.")):wp.element.createElement(fe,null,wp.element.createElement(_e,null)))}}])&&ee(n.prototype,r),a&&ee(n,a),t}(le);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 be(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 ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function we(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Me(e,t){return(Me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ke=wp.i18n.__,Le=wp.element.Component,Ye=wp.components,Te=Ye.Button,De=Ye.ExternalLink,Se=Ye.PanelBody,Oe=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==ge(t)&&"function"!=typeof t?we(e):t}(this,ve(t).apply(this,arguments))).uploadInput=React.createRef(),e.fileUploaded=e.fileUploaded.bind(we(e)),e.uploadImport=e.uploadImport.bind(we(e)),e.state={uploadLabel:ke("Upload")},e}var n,r,a;return 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}}),t&&Me(e,t)}(t,e),n=t,(r=[{key:"fileUploaded",value:function(e){"text/csv"===e.target.files[0].type&&this.setState({uploadLabel:ke("Upload")})}},{key:"uploadImport",value:function(){this.props.readUploadedFile(this.uploadInput),this.setState({uploadLabel:ke("Uploaded")})}},{key:"render",value:function(){return wp.element.createElement(Se,{title:ke("Import data from file"),initialOpen:!1},wp.element.createElement("p",null,ke("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,ke("If you are unsure about how to format your data CSV then please take a look at this sample: "),wp.element.createElement(De,{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(Te,{isPrimary:!0,onClick:this.uploadImport},this.state.uploadLabel))}}])&&be(n.prototype,r),a&&be(n,a),t}(Le);function je(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 xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(n,!0).forEach((function(t){Ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ce(e){return(Ce="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 Pe(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function He(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){Pe(i,r,a,o,s,"next",e)}function s(e){Pe(i,r,a,o,s,"throw",e)}o(void 0)}))}}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 Ae(e){return(Ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ne(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fe(e,t){return(Fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Re=wp.i18n.__,We=wp,Ie=(We.apiFetch,We.apiRequest),Be=wp.element.Component,Je=wp.components,Ue=Je.Button,qe=Je.ExternalLink,Ve=Je.IconButton,Ge=Je.Modal,$e=Je.PanelBody,Ke=Je.SelectControl,Ze=Je.TextControl,Qe=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==Ce(t)&&"function"!=typeof t?Ne(e):t}(this,Ae(t).apply(this,arguments))).openModal=e.openModal.bind(Ne(e)),e.initTable=e.initTable.bind(Ne(e)),e.onToggle=e.onToggle.bind(Ne(e)),e.toggleHeaders=e.toggleHeaders.bind(Ne(e)),e.getJSONRoot=e.getJSONRoot.bind(Ne(e)),e.getJSONData=e.getJSONData.bind(Ne(e)),e.getTableData=e.getTableData.bind(Ne(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}var n,r,a,i,o,s,l,u;return 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}}),t&&Fe(e,t)}(t,e),n=t,(r=[{key:"openModal",value:(u=He(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.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 u.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:(l=He(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.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 l.apply(this,arguments)})},{key:"toggleHeaders",value:function(){this.setState({isHeaderPanelOpen:!this.state.isHeaderPanelOpen})}},{key:"getJSONRoot",value:(s=He(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0,endpointRoots:[],endpointPaging:[],table:null}),e.next=3,Ie({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"===Ce(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"===Ce(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"!==Ce(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 s.apply(this,arguments)})},{key:"getJSONData",value:(o=He(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),e.next=3,Ie({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"===Ce(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"===Ce(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"!==Ce(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:Re("Don't use pagination"),value:0}],t.data.paging&&"root>next"===t.data.paging[0]&&n.push({label:Re("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:(i=He(regeneratorRuntime.mark((function e(){var t,n,r,a,i;return regeneratorRuntime.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,Ie({path:"/visualizer/v1/set-json-data",data:xe({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"===Ce(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"===Ce(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"!==Ce(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:(i=e.sent).success?(this.props.JSONImportData(i.data.name,JSON.parse(i.data.series),JSON.parse(i.data.data)),this.setState({isOpen:!1,isLoading:!1})):(alert(i.data.msg),this.setState({isLoading:!1}));case 11:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"render",value:function(){var e=this;return wp.element.createElement($e,{title:Re("Import from JSON"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,Re("You can choose here to import or synchronize your chart data with a remote JSON source.")),wp.element.createElement("p",null,wp.element.createElement(qe,{href:"https://docs.themeisle.com/article/1052-how-to-generate-charts-from-json-data-rest-endpoints"},Re("For more info check this tutorial."))),wp.element.createElement(Ke,{label:Re("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:Re("One-time"),value:"-1"},{label:Re("Live"),value:"0"},{label:Re("Each hour"),value:"1"},{label:Re("Each 12 hours"),value:"12"},{label:Re("Each day"),value:"24"},{label:Re("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(Ue,{isPrimary:!0,isLarge:!0,onClick:this.openModal},Re("Modify Parameters")),this.state.isOpen&&wp.element.createElement(Ge,{title:Re("Import from JSON"),className:"visualizer-json-query-modal",shouldCloseOnClickOutside:!1,onRequestClose:function(){e.setState({isOpen:!1,isTableRendered:!1})}},wp.element.createElement($e,{title:Re("Step 1: Specify the JSON endpoint/URL"),opened:this.state.isFirstStepOpen,onToggle:function(){return e.onToggle("isFirstStepOpen")}},wp.element.createElement("p",null,Re("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(qe,{href:"https://docs.themeisle.com/article/1043-visualizer-how-to-extend-rest-endpoints-with-json-response"},Re("How to extend REST endpoints with JSON response"))),wp.element.createElement(Ze,{placeholder:Re("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(Ve,{icon:"arrow-right-alt2",label:Re("Add Headers"),onClick:this.toggleHeaders},Re("Add Headers")),this.state.isHeaderPanelOpen&&wp.element.createElement("div",{className:"visualizer-json-query-modal-headers-panel"},wp.element.createElement(Ke,{label:Re("Request Type"),value:this.props.chart["visualizer-json-headers"]?this.props.chart["visualizer-json-headers"].method:this.state.requestHeaders.method,options:[{value:"GET",label:Re("GET")},{value:"POST",label:Re("POST")}],onChange:function(t){var n=xe({},e.state.requestHeaders),r=e.state.requestHeaders;n.method=t,r=xe({},r,{method:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,Re("Credentials")),wp.element.createElement(Ze,{label:Re("Username"),placeholder:Re("Username/Access Key"),value:this.props.chart["visualizer-json-headers"]&&"object"===Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.username:this.state.requestHeaders.username,onChange:function(t){var n=xe({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth={username:t,password:e.props.chart["visualizer-json-headers"]&&"object"===Ce(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.password:e.state.requestHeaders.password},r=xe({},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"},Re("&")),wp.element.createElement(Ze,{label:Re("Password"),placeholder:Re("Password/Secret Key"),type:"password",value:this.props.chart["visualizer-json-headers"]&&"object"===Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth.password:this.state.requestHeaders.password,onChange:function(t){var n=xe({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth={username:e.props.chart["visualizer-json-headers"]&&"object"===Ce(e.props.chart["visualizer-json-headers"].auth)?e.props.chart["visualizer-json-headers"].auth.username:e.state.requestHeaders.username,password:t},r=xe({},r,{username:n.username,password:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}}),wp.element.createElement("p",null,Re("OR")),wp.element.createElement(Ze,{label:Re("Authorization"),placeholder:Re("e.g. SharedKey <AccountName>:<Signature>"),value:this.props.chart["visualizer-json-headers"]&&"object"!==Ce(this.props.chart["visualizer-json-headers"].auth)?this.props.chart["visualizer-json-headers"].auth:this.state.requestHeaders.auth,onChange:function(t){var n=xe({},e.state.requestHeaders),r=e.state.requestHeaders;n.auth=t,r=xe({},r,{auth:t}),e.setState({requestHeaders:r}),e.props.editJSONHeaders(n)}})),wp.element.createElement(Ue,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONRoot},Re("Fetch Endpoint"))),wp.element.createElement($e,{title:Re("Step 2: Choose the JSON root"),initialOpen:!1,opened:this.state.isSecondStepOpen,onToggle:function(){return e.onToggle("isSecondStepOpen")}},wp.element.createElement("p",null,Re("If you see Invalid Data, you may have selected the wrong root to fetch data from. Please select an alternative.")),wp.element.createElement(Ke,{value:this.props.chart["visualizer-json-root"],options:this.state.endpointRoots,onChange:this.props.editJSONRoot}),wp.element.createElement(Ue,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getJSONData},Re("Parse Endpoint"))),wp.element.createElement($e,{title:Re("Step 3: Specify miscellaneous parameters"),initialOpen:!1,opened:this.state.isThirdStepOpen,onToggle:function(){return e.onToggle("isThirdStepOpen")}},"community"!==visualizerLocalize.isPro?wp.element.createElement(Ke,{value:this.props.chart["visualizer-json-paging"]||0,options:this.state.endpointPaging,onChange:this.props.editJSONPaging}):wp.element.createElement("p",null,Re("Enable this feature in PRO version!"))),wp.element.createElement($e,{title:Re("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,Re("Select whether to include the data in the chart. Each column selected will form one series.")),wp.element.createElement("li",null,Re("If a column is selected to be included, specify its data type.")),wp.element.createElement("li",null,Re("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,Re("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(Ue,{isPrimary:!0,isLarge:!0,isBusy:this.state.isLoading,disabled:this.state.isLoading,onClick:this.getTableData},Re("Save & Show Chart")))))}}])&&ze(n.prototype,r),a&&ze(n,a),t}(Be);function Xe(e){return(Xe="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 et(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 tt(e,t){return!t||"object"!==Xe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nt(e){return(nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rt(e,t){return(rt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var at=wp.i18n.__,it=wp.element.Component,ot=wp.components,st=ot.Button,lt=ot.ExternalLink,ut=ot.PanelBody,ct=ot.SelectControl,dt=ot.TextControl,mt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),tt(this,nt(t).apply(this,arguments))}var n,r,a;return 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}}),t&&rt(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this;return wp.element.createElement(ut,{title:at("Import data from URL"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ut,{title:at("One Time Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,at("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,at("If you are unsure about how to format your data CSV then please take a look at this sample: "),wp.element.createElement(lt,{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,at("You can also import data from Google Spreadsheet.")),wp.element.createElement(dt,{placeholder:at("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)}},at("Import Data"))),"business"===visualizerLocalize.isPro?wp.element.createElement(ut,{title:at("Schedule Import"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,at("You can choose here to synchronize your chart data with a remote CSV file. ")),wp.element.createElement("p",null,at("You can also synchronize with your Google Spreadsheet file.")),wp.element.createElement("p",null,at("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(dt,{placeholder:at("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(ct,{label:at("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: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(st,{isPrimary:!0,isLarge:!0,isBusy:"uploadData"===this.props.isLoading,disabled:"uploadData"===this.props.isLoading,onClick:function(){return e.props.uploadData(!0)}},at("Save Schedule"))):wp.element.createElement(ut,{title:at("Schedule Import"),icon:"lock",className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("p",null,at("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(st,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},at("Buy Now"))),wp.element.createElement(Qe,{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}))}}])&&et(n.prototype,r),a&&et(n,a),t}(it);function pt(e){return(pt="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,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function ft(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 _t(e,t){return!t||"object"!==pt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yt(e){return(yt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gt(e,t){return(gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var bt=wp.i18n.__,vt=wp.apiFetch,wt=wp.element,Mt=wt.Component,kt=wt.Fragment,Lt=wp.components,Yt=Lt.Button,Tt=Lt.PanelBody,Dt=Lt.Placeholder,St=Lt.SelectControl,Ot=Lt.Spinner,jt=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=_t(this,yt(t).apply(this,arguments))).state={id:"",charts:[]},e}var n,r,a,i,o;return 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}}),t&&gt(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(i=regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vt({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 a=i.apply(e,t);function o(e){ht(a,n,r,o,s,"next",e)}function s(e){ht(a,n,r,o,s,"throw",e)}o(void 0)}))},function(){return o.apply(this,arguments)})},{key:"render",value:function(){var e=this;return"community"!==visualizerLocalize.isPro?wp.element.createElement(Tt,{title:bt("Import from other chart"),initialOpen:!1},1<=this.state.charts.length?wp.element.createElement(kt,null,wp.element.createElement(St,{label:bt("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(Yt,{isPrimary:!0,isLarge:!0,isBusy:"getChartData"===this.props.isLoading,onClick:function(){return e.props.getChartData(e.state.id)}},bt("Import Chart"))):wp.element.createElement(Dt,null,wp.element.createElement(Ot,null))):wp.element.createElement(Tt,{title:bt("Import from other chart"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,bt("Enable this feature in PRO version!")),wp.element.createElement(Yt,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},bt("Buy Now")))}}])&&ft(n.prototype,r),a&&ft(n,a),t}(Mt);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 Et(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function Ct(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 Pt(e){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ht(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zt(e,t){return(zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var At=wp.i18n.__,Nt=wp.apiRequest,Ft=wp.components,Rt=Ft.Button,Wt=Ft.ExternalLink,It=wp.element,Bt=It.Component,Jt=It.Fragment,Ut=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==xt(t)&&"function"!=typeof t?Ht(e):t}(this,Pt(t).apply(this,arguments))).onSave=e.onSave.bind(Ht(e)),e.state={isLoading:!1,success:!1,query:"",name:"",series:{},data:[]},e}var n,r,a,i,o;return 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}}),t&&zt(e,t)}(t,e),n=t,(r=[{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:(i=regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.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,Nt({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 a=i.apply(e,t);function o(e){Et(a,n,r,o,s,"next",e)}function s(e){Et(a,n,r,o,s,"throw",e)}o(void 0)}))},function(){return o.apply(this,arguments)})},{key:"render",value:function(){var e=this;return wp.element.createElement(Jt,null,wp.element.createElement("textarea",{className:"visualizer-db-query",placeholder:At("Your query goes here…")},this.props.chart["visualizer-db-query"]),wp.element.createElement("div",{className:"visualizer-db-query-actions"},wp.element.createElement(Rt,{isLarge:!0,isDefault:!0,isBusy:this.state.isLoading,onClick:this.onSave},At("Show Results")),wp.element.createElement(Rt,{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)}},At("Save"))),wp.element.createElement("ul",null,wp.element.createElement("li",null,wp.element.createElement(Wt,{href:"https://docs.themeisle.com/article/970-visualizer-sample-queries-to-generate-charts"},At("Examples of queries and links to resources that you can use with this feature."))),wp.element.createElement("li",null,At("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"}))}}])&&Ct(n.prototype,r),a&&Ct(n,a),t}(Bt);function qt(e){return(qt="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 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,r.key,r)}}function Gt(e){return(Gt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $t(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kt(e,t){return(Kt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Zt=wp.i18n.__,Qt=wp.element.Component,Xt=wp.components,en=Xt.Button,tn=Xt.Modal,nn=Xt.PanelBody,rn=Xt.SelectControl,an=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==qt(t)&&"function"!=typeof t?$t(e):t}(this,Gt(t).apply(this,arguments))).save=e.save.bind($t(e)),e.state={isOpen:!1},e}var n,r,a;return 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}}),t&&Kt(e,t)}(t,e),n=t,(r=[{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(nn,{title:Zt("Import data from database"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,Zt("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(en,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},Zt("Buy Now"))):wp.element.createElement(nn,{title:Zt("Import data from database"),initialOpen:!1},wp.element.createElement("p",null,Zt("You can import data from the database here.")),wp.element.createElement("p",null,Zt("How often do you want to refresh the data from the database.")),wp.element.createElement(rn,{label:Zt("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:Zt("Live"),value:"0"},{label:Zt("Each hour"),value:"1"},{label:Zt("Each 12 hours"),value:"12"},{label:Zt("Each day"),value:"24"},{label:Zt("Each 3 days"),value:"72"}],onChange:this.props.editSchedule}),wp.element.createElement(en,{isPrimary:!0,isLarge:!0,onClick:function(){return e.setState({isOpen:!0})}},Zt("Create Query")),this.state.isOpen&&wp.element.createElement(tn,{title:Zt("Import from database"),onRequestClose:function(){return e.setState({isOpen:!1})},className:"visualizer-db-query-modal",shouldCloseOnClickOutside:!1},wp.element.createElement(Ut,{chart:this.props.chart,changeQuery:this.props.changeQuery,save:this.save})))}}])&&Vt(n.prototype,r),a&&Vt(n,a),t}(Qt),on=n(132);n(152);function sn(e){return(sn="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 ln(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 un(e,t){return!t||"object"!==sn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cn(e){return(cn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function dn(e,t){return(dn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var mn=wp.i18n.__,pn=wp.element.Component,hn=wp.components,fn=hn.Button,_n=hn.ButtonGroup,yn=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=un(this,cn(t).apply(this,arguments))).data=[],e.dates=[],e.types=["string","number","boolean","date","datetime","timeofday"],e}var n,r,a;return 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}}),t&&dn(e,t)}(t,e),n=t,(r=[{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(on.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(_n,null,wp.element.createElement(fn,{isDefault:!0,isLarge:!0,onClick:this.props.toggleModal},mn("Close")),wp.element.createElement(fn,{isPrimary:!0,isLarge:!0,onClick:function(t){e.props.toggleModal(),e.props.editChartData(e.data,"Visualizer_Source_Csv")}},mn("Save"))))}}])&&ln(n.prototype,r),a&&ln(n,a),t}(pn);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 bn(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 vn(e){return(vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mn(e,t){return(Mn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var kn=wp.i18n.__,Ln=wp.element,Yn=Ln.Component,Tn=Ln.Fragment,Dn=wp.components,Sn=Dn.Button,On=Dn.Modal,jn=Dn.PanelBody,xn=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==gn(t)&&"function"!=typeof t?wn(e):t}(this,vn(t).apply(this,arguments))).toggleModal=e.toggleModal.bind(wn(e)),e.state={isOpen:!1},e}var n,r,a;return 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}}),t&&Mn(e,t)}(t,e),n=t,(r=[{key:"toggleModal",value:function(){this.setState({isOpen:!this.state.isOpen})}},{key:"render",value:function(){return"community"!==visualizerLocalize.isPro?wp.element.createElement(Tn,null,wp.element.createElement(jn,{title:kn("Manual Data"),initialOpen:!1},wp.element.createElement("p",null,kn("You can manually edit the chart data using a spreadsheet like editor.")),wp.element.createElement(Sn,{isPrimary:!0,isLarge:!0,isBusy:this.state.isOpen,onClick:this.toggleModal},kn("View Editor"))),this.state.isOpen&&wp.element.createElement(On,{title:"Chart Editor",onRequestClose:this.toggleModal,shouldCloseOnClickOutside:!1},wp.element.createElement(yn,{chart:this.props.chart,editChartData:this.props.editChartData,toggleModal:this.toggleModal}))):wp.element.createElement(jn,{title:kn("Manual Data"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,kn("Enable this feature in PRO version!")),wp.element.createElement(Sn,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},kn("Buy Now")))}}])&&bn(n.prototype,r),a&&bn(n,a),t}(Yn);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 Cn(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 Pn(e,t){return!t||"object"!==En(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Hn(e){return(Hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zn(e,t){return(zn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var An=wp.i18n.__,Nn=wp.element.Component,Fn=(wp.blockEditor||wp.editor).ColorPalette,Rn=wp.components,Wn=Rn.BaseControl,In=Rn.CheckboxControl,Bn=Rn.PanelBody,Jn=Rn.SelectControl,Un=Rn.TextControl,qn=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Pn(this,Hn(t).apply(this,arguments))}var n,r,a;return 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}}),t&&zn(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"],r=[{label:An("The tooltip will be displayed when the user hovers over an element"),value:"focus"}];return-1>=["timeline"].indexOf(t)&&(r[1]={label:An("The tooltip will be displayed when the user selects an element"),value:"selection"}),r[2]={label:An("The tooltip will not be displayed"),value:"none"},wp.element.createElement(Bn,{title:An("General Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Bn,{title:An("Title"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Un,{label:An("Chart Title"),help:An("Text to display above the chart."),value:n.title,onChange:function(t){n.title=t,e.props.edit(n)}}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Jn,{label:An("Chart Title Position"),help:An("Where to place the chart title, compared to the chart area."),value:n.titlePosition?n.titlePosition:"out",options:[{label:An("Inside the chart"),value:"in"},{label:An("Outside the chart"),value:"out"},{label:An("None"),value:"none"}],onChange:function(t){n.titlePosition=t,e.props.edit(n)}}),-1>=["table","gauge","geo","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Wn,{label:An("Chart Title Color")},wp.element.createElement(Fn,{value:n.titleTextStyle.color,onChange:function(t){n.titleTextStyle.color=t,e.props.edit(n)}})),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Jn,{label:An("Axes Titles Position"),help:An("Determines where to place the axis titles, compared to the chart area."),value:n.axisTitlesPosition?n.axisTitlesPosition:"out",options:[{label:An("Inside the chart"),value:"in"},{label:An("Outside the chart"),value:"out"},{label:An("None"),value:"none"}],onChange:function(t){n.axisTitlesPosition=t,e.props.edit(n)}})),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Bn,{title:An("Font Styles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Jn,{label:An("Font Family"),help:An("The default font family for all text in the chart."),value:n.fontName?n.fontName:"Arial",options:[{label:An("Arial"),value:"Arial"},{label:An("Sans Serif"),value:"Sans Serif"},{label:An("Serif"),value:"serif"},{label:An("Arial"),value:"Arial"},{label:An("Wide"),value:"Arial black"},{label:An("Narrow"),value:"Arial Narrow"},{label:An("Comic Sans MS"),value:"Comic Sans MS"},{label:An("Courier New"),value:"Courier New"},{label:An("Garamond"),value:"Garamond"},{label:An("Georgia"),value:"Georgia"},{label:An("Tahoma"),value:"Tahoma"},{label:An("Verdana"),value:"Verdana"}],onChange:function(t){n.fontName=t,e.props.edit(n)}}),wp.element.createElement(Jn,{label:An("Font Size"),help:An("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>=["table","gauge","geo","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Bn,{title:An("Legend"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Jn,{label:An("Position"),help:An("Determines where to place the legend, compared to the chart area."),value:n.legend.position?n.legend.position:"right",options:[{label:An("Left of the chart"),value:"left"},{label:An("Right of the chart"),value:"right"},{label:An("Above the chart"),value:"top"},{label:An("Below the chart"),value:"bottom"},{label:An("Inside the chart"),value:"in"},{label:An("Omit the legend"),value:"none"}],onChange:function(r){if("pie"!==t){var a="left"===r?1:0;Object.keys(n.series).map((function(e){n.series[e].targetAxisIndex=a}))}n.legend.position=r,e.props.edit(n)}}),wp.element.createElement(Jn,{label:An("Alignment"),help:An("Determines the alignment of the legend."),value:n.legend.alignment?n.legend.alignment:"15",options:[{label:An("Aligned to the start of the allocated area"),value:"start"},{label:An("Centered in the allocated area"),value:"center"},{label:An("Aligned to the end of the allocated area"),value:"end"}],onChange:function(t){n.legend.alignment=t,e.props.edit(n)}}),wp.element.createElement(Wn,{label:An("Font Color")},wp.element.createElement(Fn,{value:n.legend.textStyle.color,onChange:function(t){n.legend.textStyle.color=t,e.props.edit(n)}}))),-1>=["table","gauge","geo","dataTable","timeline"].indexOf(t)&&wp.element.createElement(Bn,{title:An("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Jn,{label:An("Trigger"),help:An("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(Jn,{label:An("Show Color Code"),help:An("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:An("Yes"),value:"1"},{label:An("No"),value:"0"}],onChange:function(t){n.tooltip.showColorCode=t,e.props.edit(n)}}),0<=["pie"].indexOf(t)&&wp.element.createElement(Jn,{label:An("Text"),help:An("Determines what information to display when the user hovers over a pie slice."),value:n.tooltip.text?n.tooltip.text:"both",options:[{label:An("Display both the absolute value of the slice and the percentage of the whole"),value:"both"},{label:An("Display only the absolute value of the slice"),value:"value"},{label:An("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>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(t)&&wp.element.createElement(Bn,{title:An("Animation"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(In,{label:An("Animate on startup?"),help:An("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(Un,{label:An("Duration"),help:An("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(Jn,{label:An("Easing"),help:An("The easing function applied to the animation."),value:n.animation.easing?n.animation.easing:"linear",options:[{label:An("Constant speed"),value:"linear"},{label:An("Start slow and speed up"),value:"in"},{label:An("Start fast and slow down"),value:"out"},{label:An("Start slow, speed up, then slow down"),value:"inAndOut"}],onChange:function(t){n.animation.easing=t,e.props.edit(n)}})))}}])&&Cn(n.prototype,r),a&&Cn(n,a),t}(Nn);function Vn(e){return(Vn="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 Gn(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 $n(e,t){return!t||"object"!==Vn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Kn(e){return(Kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zn(e,t){return(Zn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Qn=wp.i18n.__,Xn=wp.element,er=Xn.Component,tr=Xn.Fragment,nr=(wp.blockEditor||wp.editor).ColorPalette,rr=wp.components,ar=rr.BaseControl,ir=rr.ExternalLink,or=rr.PanelBody,sr=rr.SelectControl,lr=rr.TextControl,ur=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),$n(this,Kn(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Zn(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(or,{title:Qn("Horizontal Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(or,{title:Qn("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(lr,{label:Qn("Axis Title"),help:Qn("The title of the horizontal axis."),value:n.hAxis.title,onChange:function(t){n.hAxis.title=t,e.props.edit(n)}}),wp.element.createElement(sr,{label:Qn("Text Position"),help:Qn("Position of the horizontal axis text, relative to the chart area."),value:n.hAxis.textPosition?n.hAxis.textPosition:"out",options:[{label:Qn("Inside the chart"),value:"in"},{label:Qn("Outside the chart"),value:"out"},{label:Qn("None"),value:"none"}],onChange:function(t){n.hAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(sr,{label:Qn("Direction"),help:Qn("The direction in which the values along the horizontal axis grow."),value:n.hAxis.direction?n.hAxis.direction:"1",options:[{label:Qn("Identical Direction"),value:"1"},{label:Qn("Reverse Direction"),value:"-1"}],onChange:function(t){n.hAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(ar,{label:Qn("Base Line Color")},wp.element.createElement(nr,{value:n.hAxis.baselineColor,onChange:function(t){n.hAxis.baselineColor=t,e.props.edit(n)}})),wp.element.createElement(ar,{label:Qn("Axis Text Color")},wp.element.createElement(nr,{value:n.hAxis.textStyle.color||n.hAxis.textStyle,onChange:function(t){n.hAxis.textStyle={},n.hAxis.textStyle.color=t,e.props.edit(n)}})),-1>=["column"].indexOf(t)&&wp.element.createElement(tr,null,wp.element.createElement(lr,{label:Qn("Number Format"),help:Qn("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,Qn("For number axis labels, this is a subset of the formatting "),wp.element.createElement(ir,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Qn("ICU pattern set.")),Qn(" 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,Qn("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(ir,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},Qn("ICU date and time format."))))),-1>=["column"].indexOf(t)&&wp.element.createElement(tr,null,wp.element.createElement(or,{title:Qn("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(lr,{label:Qn("Count"),help:Qn("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(ar,{label:Qn("Color")},wp.element.createElement(nr,{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(or,{title:Qn("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(lr,{label:Qn("Count"),help:Qn("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(ar,{label:Qn("Color")},wp.element.createElement(nr,{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(or,{title:Qn("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(lr,{label:Qn("Maximun Value"),help:Qn("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(lr,{label:Qn("Minimum Value"),help:Qn("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)}}))))}}])&&Gn(n.prototype,r),a&&Gn(n,a),t}(er);function cr(e){return(cr="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 dr(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 mr(e,t){return!t||"object"!==cr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pr(e){return(pr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function hr(e,t){return(hr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var fr=wp.i18n.__,_r=wp.element,yr=_r.Component,gr=_r.Fragment,br=(wp.blockEditor||wp.editor).ColorPalette,vr=wp.components,wr=vr.BaseControl,Mr=vr.ExternalLink,kr=vr.PanelBody,Lr=vr.SelectControl,Yr=vr.TextControl,Tr=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),mr(this,pr(t).apply(this,arguments))}var n,r,a;return 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}}),t&&hr(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(kr,{title:fr("Vertical Axis Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(kr,{title:fr("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Yr,{label:fr("Axis Title"),help:fr("The title of the Vertical axis."),value:n.vAxis.title,onChange:function(t){n.vAxis.title=t,e.props.edit(n)}}),wp.element.createElement(Lr,{label:fr("Text Position"),help:fr("Position of the Vertical axis text, relative to the chart area."),value:n.vAxis.textPosition?n.vAxis.textPosition:"out",options:[{label:fr("Inside the chart"),value:"in"},{label:fr("Outside the chart"),value:"out"},{label:fr("None"),value:"none"}],onChange:function(t){n.vAxis.textPosition=t,e.props.edit(n)}}),wp.element.createElement(Lr,{label:fr("Direction"),help:fr("The direction in which the values along the Vertical axis grow."),value:n.vAxis.direction?n.vAxis.direction:"1",options:[{label:fr("Identical Direction"),value:"1"},{label:fr("Reverse Direction"),value:"-1"}],onChange:function(t){n.vAxis.direction=t,e.props.edit(n)}}),wp.element.createElement(wr,{label:fr("Base Line Color")},wp.element.createElement(br,{value:n.vAxis.baselineColor,onChange:function(t){n.vAxis.baselineColor=t,e.props.edit(n)}})),wp.element.createElement(wr,{label:fr("Axis Text Color")},wp.element.createElement(br,{value:n.vAxis.textStyle.color||n.vAxis.textStyle,onChange:function(t){n.vAxis.textStyle={},n.vAxis.textStyle.color=t,e.props.edit(n)}})),-1>=["bar"].indexOf(t)&&wp.element.createElement(gr,null,wp.element.createElement(Yr,{label:fr("Number Format"),help:fr("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,fr("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Mr,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},fr("ICU pattern set.")),fr(" 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,fr("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Mr,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},fr("ICU date and time format."))))),-1>=["bar"].indexOf(t)&&wp.element.createElement(gr,null,wp.element.createElement(kr,{title:fr("Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Yr,{label:fr("Count"),help:fr("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(wr,{label:fr("Color")},wp.element.createElement(br,{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(kr,{title:fr("Minor Grid Lines"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Yr,{label:fr("Count"),help:fr("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(wr,{label:fr("Color")},wp.element.createElement(br,{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(kr,{title:fr("View Window"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Yr,{label:fr("Maximun Value"),help:fr("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(Yr,{label:fr("Minimum Value"),help:fr("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)}}))))}}])&&dr(n.prototype,r),a&&dr(n,a),t}(yr);function Dr(e){return(Dr="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 Sr(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 Or(e,t){return!t||"object"!==Dr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jr(e){return(jr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xr(e,t){return(xr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Er=wp.i18n.__,Cr=wp.element,Pr=Cr.Component,Hr=Cr.Fragment,zr=(wp.blockEditor||wp.editor).ColorPalette,Ar=wp.components,Nr=Ar.BaseControl,Fr=Ar.ExternalLink,Rr=Ar.PanelBody,Wr=Ar.SelectControl,Ir=Ar.TextControl,Br=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Or(this,jr(t).apply(this,arguments))}var n,r,a;return 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}}),t&&xr(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Rr,{title:Er("Pie Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Hr,null,wp.element.createElement(Ir,{label:Er("Number Format"),help:Er("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,Er("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Fr,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},Er("ICU pattern set.")),Er(" 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,Er("For date axis labels, this is a subset of the date formatting "),wp.element.createElement(Fr,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},Er("ICU date and time format.")))),wp.element.createElement(Wr,{label:Er("Is 3D"),help:Er("If set to yes, displays a three-dimensional chart."),value:t.is3D?t.is3D:"0",options:[{label:Er("Yes"),value:"1"},{label:Er("No"),value:"0"}],onChange:function(n){t.is3D=n,e.props.edit(t)}}),wp.element.createElement(Wr,{label:Er("Reverse Categories"),help:Er("If set to yes, will draw slices counterclockwise."),value:t.reverseCategories?t.reverseCategories:"0",options:[{label:Er("Yes"),value:"1"},{label:Er("No"),value:"0"}],onChange:function(n){t.reverseCategories=n,e.props.edit(t)}}),wp.element.createElement(Wr,{label:Er("Slice Text"),help:Er("The content of the text displayed on the slice."),value:t.pieSliceText?t.pieSliceText:"percentage",options:[{label:Er("The percentage of the slice size out of the total"),value:"percentage"},{label:Er("The quantitative value of the slice"),value:"value"},{label:Er("The name of the slice"),value:"label"},{label:Er("The quantitative value and percentage of the slice"),value:"value-and-percentage"},{label:Er("No text is displayed"),value:"none"}],onChange:function(n){t.pieSliceText=n,e.props.edit(t)}}),wp.element.createElement(Ir,{label:Er("Pie Hole"),help:Er("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:Er("0.5"),value:t.pieHole,onChange:function(n){t.pieHole=n,e.props.edit(t)}}),wp.element.createElement(Ir,{label:Er("Start Angle"),help:Er("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(Nr,{label:Er("Slice Border Color")},wp.element.createElement(zr,{value:t.pieSliceBorderColor,onChange:function(n){t.pieSliceBorderColor=n,e.props.edit(t)}})))}}])&&Sr(n.prototype,r),a&&Sr(n,a),t}(Pr);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){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 qr(e,t){return!t||"object"!==Jr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vr(e){return(Vr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Gr(e,t){return(Gr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var $r=wp.i18n.__,Kr=wp.element.Component,Zr=(wp.blockEditor||wp.editor).ColorPalette,Qr=wp.components,Xr=Qr.BaseControl,ea=Qr.PanelBody,ta=Qr.TextControl,na=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),qr(this,Vr(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Gr(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(ea,{title:$r("Residue Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ta,{label:$r("Visibility Threshold"),help:$r("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:$r("0.001388889"),value:t.sliceVisibilityThreshold,onChange:function(n){t.sliceVisibilityThreshold=n,e.props.edit(t)}}),wp.element.createElement(ta,{label:$r("Residue Slice Label"),help:$r("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(Xr,{label:$r("Residue Slice Color")},wp.element.createElement(Zr,{value:t.pieResidueSliceColor,onChange:function(n){t.pieResidueSliceColor=n,e.props.edit(t)}})))}}])&&Ur(n.prototype,r),a&&Ur(n,a),t}(Kr);function ra(e){return(ra="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 aa(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 ia(e,t){return!t||"object"!==ra(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function oa(e){return(oa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function sa(e,t){return(sa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var la=wp.i18n.__,ua=wp.element,ca=ua.Component,da=ua.Fragment,ma=wp.components,pa=ma.PanelBody,ha=ma.SelectControl,fa=ma.TextControl,_a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ia(this,oa(t).apply(this,arguments))}var n,r,a;return 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}}),t&&sa(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(pa,{title:la("Lines Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(fa,{label:la("Line Width"),help:la("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(fa,{label:la("Point Size"),help:la("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(ha,{label:la("Curve Type"),help:la("Determines whether the series has to be presented in the legend or not."),value:n.curveType?n.curveType:"none",options:[{label:la("Straight line without curve"),value:"none"},{label:la("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(ha,{label:la("Focus Target"),help:la("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:la("Focus on a single data point."),value:"datum"},{label:la("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(ha,{label:la("Selection Mode"),help:la("Determines how many data points an user can select on a chart."),value:n.selectionMode?n.selectionMode:"single",options:[{label:la("Single data point"),value:"single"},{label:la("Multiple data points"),value:"multiple"}],onChange:function(t){n.selectionMode=t,e.props.edit(n)}}),wp.element.createElement(ha,{label:la("Aggregation Target"),help:la("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:la("Group selected data by x-value"),value:"category"},{label:la("Group selected data by series"),value:"series"},{label:la("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:la("Show only one tooltip per selection"),value:"none"}],onChange:function(t){n.aggregationTarget=t,e.props.edit(n)}}),wp.element.createElement(fa,{label:la("Point Opacity"),help:la("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(da,null,wp.element.createElement(fa,{label:la("Area Opacity"),help:la("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(ha,{label:la("Is Stacked"),help:la("If set to yes, series elements are stacked."),value:n.isStacked?n.isStacked:"0",options:[{label:la("Yes"),value:"1"},{label:la("No"),value:"0"}],onChange:function(t){n.isStacked=t,e.props.edit(n)}})),-1>=["scatter","area"].indexOf(t)&&wp.element.createElement(ha,{label:la("Interpolate Nulls"),help:la("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:la("Yes"),value:"1"},{label:la("No"),value:"0"}],onChange:function(t){n.interpolateNulls=t,e.props.edit(n)}}))}}])&&aa(n.prototype,r),a&&aa(n,a),t}(ca);function ya(e){return(ya="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 ga(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 ba(e,t){return!t||"object"!==ya(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function va(e){return(va=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wa(e,t){return(wa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ma=wp.i18n.__,ka=wp.element.Component,La=wp.components,Ya=La.PanelBody,Ta=La.SelectControl,Da=La.TextControl,Sa=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ba(this,va(t).apply(this,arguments))}var n,r,a;return 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}}),t&&wa(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Ya,{title:Ma("Bars Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ta,{label:Ma("Focus Target"),help:Ma("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:Ma("Focus on a single data point."),value:"datum"},{label:Ma("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(Ta,{label:Ma("Is Stacked"),help:Ma("If set to yes, series elements are stacked."),value:t.isStacked?t.isStacked:"0",options:[{label:Ma("Yes"),value:"1"},{label:Ma("No"),value:"0"}],onChange:function(n){t.isStacked=n,e.props.edit(t)}}),wp.element.createElement(Da,{label:Ma("Bars Opacity"),help:Ma("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)}}))}}])&&ga(n.prototype,r),a&&ga(n,a),t}(ka);function Oa(e){return(Oa="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 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,r.key,r)}}function xa(e,t){return!t||"object"!==Oa(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ea(e){return(Ea=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ca(e,t){return(Ca=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Pa=wp.i18n.__,Ha=wp.element.Component,za=(wp.blockEditor||wp.editor).ColorPalette,Aa=wp.components,Na=Aa.BaseControl,Fa=Aa.PanelBody,Ra=Aa.SelectControl,Wa=Aa.TextControl,Ia=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),xa(this,Ea(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Ca(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Fa,{title:Pa("Candles Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Fa,{title:Pa("General Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Ra,{label:Pa("Focus Target"),help:Pa("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:Pa("Focus on a single data point."),value:"datum"},{label:Pa("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(Ra,{label:Pa("Selection Mode"),help:Pa("Determines how many data points an user can select on a chart."),value:t.selectionMode?t.selectionMode:"single",options:[{label:Pa("Single data point"),value:"single"},{label:Pa("Multiple data points"),value:"multiple"}],onChange:function(n){t.selectionMode=n,e.props.edit(t)}}),wp.element.createElement(Ra,{label:Pa("Aggregation Target"),help:Pa("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:Pa("Group selected data by x-value"),value:"category"},{label:Pa("Group selected data by series"),value:"series"},{label:Pa("Group selected data by x-value if all selections have the same x-value, and by series otherwise"),value:"auto"},{label:Pa("Show only one tooltip per selection"),value:"none"}],onChange:function(n){t.aggregationTarget=n,e.props.edit(t)}})),wp.element.createElement(Fa,{title:Pa("Failing Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Wa,{label:Pa("Stroke Width"),help:Pa("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(Na,{label:Pa("Stroke Color")},wp.element.createElement(za,{value:t.candlestick.fallingColor.stroke,onChange:function(n){t.candlestick.fallingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement(Na,{label:Pa("Fill Color")},wp.element.createElement(za,{value:t.candlestick.fallingColor.fill,onChange:function(n){t.candlestick.fallingColor.fill=n,e.props.edit(t)}}))),wp.element.createElement(Fa,{title:Pa("Rising Candles"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Wa,{label:Pa("Stroke Width"),help:Pa("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(Na,{label:Pa("Stroke Color")},wp.element.createElement(za,{value:t.candlestick.risingColor.stroke,onChange:function(n){t.candlestick.risingColor.stroke=n,e.props.edit(t)}})),wp.element.createElement(Na,{label:Pa("Fill Color")},wp.element.createElement(za,{value:t.candlestick.risingColor.fill,onChange:function(n){t.candlestick.risingColor.fill=n,e.props.edit(t)}}))))}}])&&ja(n.prototype,r),a&&ja(n,a),t}(Ha);function Ba(e){return(Ba="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 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,r.key,r)}}function Ua(e,t){return!t||"object"!==Ba(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qa(e){return(qa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Va(e,t){return(Va=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ga=wp.i18n.__,$a=wp.element.Component,Ka=wp.components,Za=Ka.ExternalLink,Qa=Ka.PanelBody,Xa=Ka.SelectControl,ei=Ka.TextControl,ti=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ua(this,qa(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Va(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Qa,{title:Ga("Map Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Qa,{title:Ga("API"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(ei,{label:Ga("API Key"),help:Ga("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(Za,{href:"https://developers.google.com/maps/documentation/javascript/get-api-key"},Ga("Get API Keys"))),wp.element.createElement(Qa,{title:Ga("Region"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Ga("A map of the entire world using 'world'.")),wp.element.createElement("li",null,Ga("A continent or a sub-continent, specified by its 3-digit code, e.g., '011' for Western Africa. "),wp.element.createElement(Za,{href:"https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart#Continent_Hierarchy"},Ga("More info here."))),wp.element.createElement("li",null,Ga("A country, specified by its ISO 3166-1 alpha-2 code, e.g., 'AU' for Australia. "),wp.element.createElement(Za,{href:"http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"},Ga("More info here."))),wp.element.createElement("li",null,Ga("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(Za,{href:"http://en.wikipedia.org/wiki/ISO_3166-2:US"},Ga("More info here.")))),wp.element.createElement(ei,{label:Ga("Reigion"),help:Ga("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(Qa,{title:Ga("Resolution"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Ga("'countries' - Supported for all regions, except for US state regions.")),wp.element.createElement("li",null,Ga("'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,Ga("'metros' - Supported for the US country region and US state regions only."))),wp.element.createElement(Xa,{label:Ga("Resolution"),help:Ga("The resolution of the map borders."),value:t.resolution?t.resolution:"countries",options:[{label:Ga("Countries"),value:"countries"},{label:Ga("Provinces"),value:"provinces"},{label:Ga("Metros"),value:"metros"}],onChange:function(n){t.resolution=n,e.props.edit(t)}})),wp.element.createElement(Qa,{title:Ga("Display Mode"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement("ul",{className:"visualizer-list"},wp.element.createElement("li",null,Ga("'auto' - Choose based on the format of the data.")),wp.element.createElement("li",null,Ga("'regions' - This is a region map.")),wp.element.createElement("li",null,Ga("'markers' - This is a marker map."))),wp.element.createElement(Xa,{label:Ga("Display Mode"),help:Ga("Determines which type of map this is."),value:t.displayMode?t.displayMode:"auto",options:[{label:Ga("Auto"),value:"auto"},{label:Ga("Regions"),value:"regions"},{label:Ga("Markers"),value:"markers"}],onChange:function(n){t.displayMode=n,e.props.edit(t)}})),wp.element.createElement(Qa,{title:Ga("Tooltip"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Xa,{label:Ga("Trigger"),help:Ga("Determines the user interaction that causes the tooltip to be displayed."),value:t.tooltip.trigger?t.tooltip.trigger:"focus",options:[{label:Ga("The tooltip will be displayed when the user hovers over an element"),value:"focus"},{label:Ga("The tooltip will not be displayed"),value:"none"}],onChange:function(n){t.tooltip.trigger=n,e.props.edit(t)}})))}}])&&Ja(n.prototype,r),a&&Ja(n,a),t}($a);function ni(e){return(ni="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 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,r.key,r)}}function ai(e,t){return!t||"object"!==ni(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ii(e){return(ii=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oi(e,t){return(oi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var si=wp.i18n.__,li=wp.element.Component,ui=(wp.blockEditor||wp.editor).ColorPalette,ci=wp.components,di=ci.BaseControl,mi=ci.PanelBody,pi=ci.TextControl,hi=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ai(this,ii(t).apply(this,arguments))}var n,r,a;return 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}}),t&&oi(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(mi,{title:si("Color Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(pi,{label:si("Minimum Values"),help:si("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(pi,{label:si("Maximum Values"),help:si("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(di,{label:si("Minimum Value")},wp.element.createElement(ui,{value:t.colorAxis.colors[0],onChange:function(n){t.colorAxis.colors[0]=n,e.props.edit(t)}})),wp.element.createElement(di,{label:si("Intermediate Value")},wp.element.createElement(ui,{value:t.colorAxis.colors[1],onChange:function(n){t.colorAxis.colors[1]=n,e.props.edit(t)}})),wp.element.createElement(di,{label:si("Maximum Value")},wp.element.createElement(ui,{value:t.colorAxis.colors[2],onChange:function(n){t.colorAxis.colors[2]=n,e.props.edit(t)}})),wp.element.createElement(di,{label:si("Dateless Region")},wp.element.createElement(ui,{value:t.datalessRegionColor,onChange:function(n){t.datalessRegionColor=n,e.props.edit(t)}})))}}])&&ri(n.prototype,r),a&&ri(n,a),t}(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){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 yi(e,t){return!t||"object"!==fi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gi(e){return(gi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bi(e,t){return(bi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var vi=wp.i18n.__,wi=wp.element,Mi=wi.Component,ki=wi.Fragment,Li=wp.components,Yi=Li.ExternalLink,Ti=Li.PanelBody,Di=Li.TextControl,Si=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),yi(this,gi(t).apply(this,arguments))}var n,r,a;return 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}}),t&&bi(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Ti,{title:vi("Size Axis"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Di,{label:vi("Minimum Values"),help:vi("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(Di,{label:vi("Maximum Values"),help:vi("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(Di,{label:vi("Minimum Marker Radius"),help:vi("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(Di,{label:vi("Maximum Marker Radius"),help:vi("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(Di,{label:vi("Marker Opacity"),help:vi("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(ki,null,wp.element.createElement(Di,{label:vi("Number Format"),help:vi("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,vi("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Yi,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},vi("ICU pattern set.")),vi(" 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."))))}}])&&_i(n.prototype,r),a&&_i(n,a),t}(Mi);function Oi(e){return(Oi="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 ji(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 xi(e,t){return!t||"object"!==Oi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ei(e){return(Ei=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ci(e,t){return(Ci=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Pi=wp.i18n.__,Hi=wp.element.Component,zi=wp.components,Ai=zi.PanelBody,Ni=zi.SelectControl,Fi=zi.TextControl,Ri=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),xi(this,Ei(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Ci(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Ai,{title:Pi("Magnifying Glass"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(Ni,{label:Pi("Enabled"),help:Pi("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:Pi("Yes"),value:"1"},{label:Pi("No"),value:"0"}],onChange:function(n){t.magnifyingGlass.enable=n,e.props.edit(t)}}),wp.element.createElement(Fi,{label:Pi("Zoom Factor"),help:Pi("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)}}))}}])&&ji(n.prototype,r),a&&ji(n,a),t}(Hi);function Wi(e){return(Wi="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 Ii(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!t||"object"!==Wi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ji(e){return(Ji=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ui(e,t){return(Ui=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var qi=wp.i18n.__,Vi=wp.element,Gi=Vi.Component,$i=Vi.Fragment,Ki=(wp.blockEditor||wp.editor).ColorPalette,Zi=wp.components,Qi=Zi.BaseControl,Xi=Zi.ExternalLink,eo=Zi.PanelBody,to=Zi.TextControl,no=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Bi(this,Ji(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Ui(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(eo,{title:qi("Gauge Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(eo,{title:qi("Tick Settings"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(to,{label:qi("Minimum Values"),help:qi("Determines the minimum values of gauge."),value:t.min,onChange:function(n){t.min=n,e.props.edit(t)}}),wp.element.createElement(to,{label:qi("Maximum Values"),help:qi("Determines the maximum values of gauge."),value:t.max,onChange:function(n){t.max=n,e.props.edit(t)}}),wp.element.createElement(to,{label:qi("Minor Ticks"),help:qi("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($i,null,wp.element.createElement(to,{label:qi("Number Format"),help:qi("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,qi("For number axis labels, this is a subset of the formatting "),wp.element.createElement(Xi,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},qi("ICU pattern set.")),qi(" 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(eo,{title:qi("Green Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(to,{label:qi("Minimum Range"),help:qi("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(to,{label:qi("Maximum Range"),help:qi("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(Qi,{label:qi("Green Color")},wp.element.createElement(Ki,{value:t.greenColor,onChange:function(n){t.greenColor=n,e.props.edit(t)}}))),wp.element.createElement(eo,{title:qi("Yellow Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(to,{label:qi("Minimum Range"),help:qi("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(to,{label:qi("Maximum Range"),help:qi("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(Qi,{label:qi("Yellow Color")},wp.element.createElement(Ki,{value:t.yellowColor,onChange:function(n){t.yellowColor=n,e.props.edit(t)}}))),wp.element.createElement(eo,{title:qi("Red Color"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(to,{label:qi("Minimum Range"),help:qi("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(to,{label:qi("Maximum Range"),help:qi("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(Qi,{label:qi("Red Color")},wp.element.createElement(Ki,{value:t.redColor,onChange:function(n){t.redColor=n,e.props.edit(t)}}))))}}])&&Ii(n.prototype,r),a&&Ii(n,a),t}(Gi);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 ao(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 io(e){return(io=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function so(e,t){return(so=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var lo=wp.i18n.__,uo=wp.element.Component,co=(wp.blockEditor||wp.editor).ColorPalette,mo=wp.components,po=mo.BaseControl,ho=mo.CheckboxControl,fo=mo.PanelBody,_o=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==ro(t)&&"function"!=typeof t?oo(e):t}(this,io(t).apply(this,arguments))).mapValues=e.mapValues.bind(oo(e)),e}var n,r,a;return 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}}),t&&so(e,t)}(t,e),n=t,(r=[{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(fo,{title:lo("Timeline Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ho,{label:lo("Show Row Label"),help:lo("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(ho,{label:lo("Group by Row Label"),help:lo("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(ho,{label:lo("Color by Row Label"),help:lo("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(po,{label:lo("Single Color")},wp.element.createElement(co,{value:this.mapValues(t,"singleColor"),onChange:function(n){void 0===t.timeline&&(t.timeline={}),t.timeline.singleColor=n,e.props.edit(t)}})))}}])&&ao(n.prototype,r),a&&ao(n,a),t}(uo);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 go(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 bo(e,t){return!t||"object"!==yo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vo(e){return(vo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wo(e,t){return(wo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Mo=wp.i18n.__,ko=wp.element,Lo=ko.Component,Yo=ko.Fragment,To=wp.components,Do=To.CheckboxControl,So=To.PanelBody,Oo=To.SelectControl,jo=To.TextControl,xo=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),bo(this,vo(t).apply(this,arguments))}var n,r,a;return 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}}),t&&wo(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-chart-type"];return wp.element.createElement(So,{title:Mo("Table Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"dataTable"===n?wp.element.createElement(Yo,null,wp.element.createElement(Do,{label:Mo("Enable Pagination"),help:Mo("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(jo,{label:Mo("Number of rows per page"),help:Mo("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(Oo,{label:Mo("Pagination type"),help:Mo("Determines what type of pagination options to show."),value:t.pagingType,options:[{label:Mo("Page number buttons only"),value:"numbers"},{label:Mo("'Previous' and 'Next' buttons only"),value:"simple"},{label:Mo("'Previous' and 'Next' buttons, plus page numbers"),value:"simple_numbers"},{label:Mo("'First', 'Previous', 'Next' and 'Last' buttons"),value:"full"},{label:Mo("'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers"),value:"full_numbers"},{label:Mo("'First' and 'Last' buttons, plus page numbers"),value:"first_last_numbers"}],onChange:function(n){t.pagingType=n,e.props.edit(t)}}),wp.element.createElement(Do,{label:Mo("Scroll Collapse"),help:Mo("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(jo,{label:Mo("Vertical Height"),help:Mo("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(Do,{label:Mo("Disable Sort"),help:Mo("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(Do,{label:Mo("Freeze Header/Footer"),help:Mo("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(Do,{label:Mo("Responsive"),help:Mo("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(Yo,null,wp.element.createElement(Oo,{label:Mo("Enable Pagination"),help:Mo("To enable paging through the data."),value:t.page?t.page:"disable",options:[{label:Mo("Enable"),value:"enable"},{label:Mo("Disable"),value:"disable"}],onChange:function(n){t.page=n,e.props.edit(t)}}),wp.element.createElement(jo,{label:Mo("Number of rows per page"),help:Mo("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(Oo,{label:Mo("Disable Sort"),help:Mo("To disable sorting on columns."),value:t.sort?t.sort:"enable",options:[{label:Mo("Enable"),value:"enable"},{label:Mo("Disable"),value:"disable"}],onChange:function(n){t.sort=n,e.props.edit(t)}}),wp.element.createElement(jo,{label:Mo("Freeze Columns"),help:Mo("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(Do,{label:Mo("Allow HTML"),help:Mo("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(Do,{label:Mo("Right to Left table"),help:Mo("Adds basic support for right-to-left languages."),checked:Number(t.rtlTable),onChange:function(n){t.rtlTable=!Number(t.rtlTable),e.props.edit(t)}})))}}])&&go(n.prototype,r),a&&go(n,a),t}(Lo);function Eo(e){return(Eo="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 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,r.key,r)}}function Po(e,t){return!t||"object"!==Eo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ho(e){return(Ho=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zo(e,t){return(zo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ao=wp.i18n.__,No=wp.element,Fo=No.Component,Ro=No.Fragment,Wo=(wp.blockEditor||wp.editor).ColorPalette,Io=wp.components,Bo=Io.BaseControl,Jo=Io.PanelBody,Uo=Io.TextControl,qo=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Po(this,Ho(t).apply(this,arguments))}var n,r,a;return 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}}),t&&zo(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"],n=this.props.chart["visualizer-chart-type"];return wp.element.createElement(Jo,{title:Ao("Row/Cell Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},"dataTable"===n?wp.element.createElement(Ro,null,wp.element.createElement(Jo,{title:Ao("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Even Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.evenTableRow["background-color"],onChange:function(n){t.customcss.evenTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.evenTableRow.color,onChange:function(n){t.customcss.evenTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.evenTableRow.transform,onChange:function(n){t.customcss.evenTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))):wp.element.createElement(Ro,null,wp.element.createElement(Jo,{title:Ao("Header Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.headerRow["background-color"],onChange:function(n){t.customcss.headerRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.headerRow.color,onChange:function(n){t.customcss.headerRow.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.headerRow.transform,onChange:function(n){t.customcss.headerRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.tableRow["background-color"],onChange:function(n){t.customcss.tableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.tableRow.color,onChange:function(n){t.customcss.tableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.tableRow.transform,onChange:function(n){t.customcss.tableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Odd Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.oddTableRow["background-color"],onChange:function(n){t.customcss.oddTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.oddTableRow.color,onChange:function(n){t.customcss.oddTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.oddTableRow.transform,onChange:function(n){t.customcss.oddTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Selected Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.selectedTableRow["background-color"],onChange:function(n){t.customcss.selectedTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.selectedTableRow.color,onChange:function(n){t.customcss.selectedTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.selectedTableRow.transform,onChange:function(n){t.customcss.selectedTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Hover Table Row"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.hoverTableRow["background-color"],onChange:function(n){t.customcss.hoverTableRow["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.hoverTableRow.color,onChange:function(n){t.customcss.hoverTableRow.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.hoverTableRow.transform,onChange:function(n){t.customcss.hoverTableRow.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Header Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.headerCell["background-color"],onChange:function(n){t.customcss.headerCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.headerCell.color,onChange:function(n){t.customcss.headerCell.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.headerCell.transform,onChange:function(n){t.customcss.headerCell.transform=n,e.props.edit(t)}})),wp.element.createElement(Jo,{title:Ao("Table Cell"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Bo,{label:Ao("Background Color")},wp.element.createElement(Wo,{value:t.customcss.tableCell["background-color"],onChange:function(n){t.customcss.tableCell["background-color"]=n,e.props.edit(t)}})),wp.element.createElement(Bo,{label:Ao("Color")},wp.element.createElement(Wo,{value:t.customcss.tableCell.color,onChange:function(n){t.customcss.tableCell.color=n,e.props.edit(t)}})),wp.element.createElement(Uo,{label:Ao("Text Orientation"),help:Ao("In degrees."),type:"number",value:t.customcss.tableCell.transform,onChange:function(n){t.customcss.tableCell.transform=n,e.props.edit(t)}}))))}}])&&Co(n.prototype,r),a&&Co(n,a),t}(Fo);function Vo(e){return(Vo="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 Go(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 $o(e,t){return!t||"object"!==Vo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ko(e){return(Ko=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zo(e,t){return(Zo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Qo=wp.i18n.__,Xo=wp.element.Component,es=wp.components,ts=es.PanelBody,ns=es.SelectControl,rs=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),$o(this,Ko(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Zo(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(ts,{title:Qo("Combo Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(ns,{label:Qo("Chart Type"),help:Qo("Select the default chart type."),value:t.seriesType?t.seriesType:"area",options:[{label:Qo("Area"),value:"area"},{label:Qo("Bar"),value:"bars"},{label:Qo("Candlesticks"),value:"candlesticks"},{label:Qo("Line"),value:"line"},{label:Qo("Stepped Area"),value:"steppedArea"}],onChange:function(n){t.seriesType=n,e.props.edit(t)}}))}}])&&Go(n.prototype,r),a&&Go(n,a),t}(Xo);function as(e){return(as="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){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 os(e,t){return!t||"object"!==as(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ss(e){return(ss=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ls(e,t){return(ls=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var us=wp.i18n.__,cs=wp.element,ds=cs.Component,ms=cs.Fragment,ps=(wp.blockEditor||wp.editor).ColorPalette,hs=wp.components,fs=hs.BaseControl,_s=hs.ExternalLink,ys=hs.PanelBody,gs=hs.SelectControl,bs=hs.TextControl,vs=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),os(this,ss(t).apply(this,arguments))}var n,r,a;return 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}}),t&&ls(e,t)}(t,e),n=t,(r=[{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"],n=this.props.chart["visualizer-settings"],r=this.props.chart["visualizer-series"];return wp.element.createElement(ys,{title:us("Series Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(n.series).map((function(a,i){return a++,wp.element.createElement(ys,{title:r[a].label,className:"visualizer-inner-sections",initialOpen:!1},-1>=["table","pie"].indexOf(t)&&wp.element.createElement(gs,{label:us("Visible In Legend"),help:us("Determines whether the series has to be presented in the legend or not."),value:n.series[i].visibleInLegend?n.series[i].visibleInLegend:"1",options:[{label:us("Yes"),value:"1"},{label:us("No"),value:"0"}],onChange:function(t){n.series[i].visibleInLegend=t,e.props.edit(n)}}),-1>=["table","candlestick","combo","column","bar"].indexOf(t)&&wp.element.createElement(ms,null,wp.element.createElement(bs,{label:us("Line Width"),help:us("Overrides the global line width value for this series."),value:n.series[i].lineWidth,onChange:function(t){n.series[i].lineWidth=t,e.props.edit(n)}}),wp.element.createElement(bs,{label:us("Point Size"),help:us("Overrides the global point size value for this series."),value:n.series[i].pointSize,onChange:function(t){n.series[i].pointSize=t,e.props.edit(n)}})),-1>=["candlestick"].indexOf(t)&&"number"===r[a].type?wp.element.createElement(ms,null,wp.element.createElement(bs,{label:us("Format"),help:us("Enter custom format pattern to apply to this series value."),value:n.series[i].format,onChange:function(t){n.series[i].format=t,e.props.edit(n)}}),wp.element.createElement("p",null,us("For number axis labels, this is a subset of the formatting "),wp.element.createElement(_s,{href:"http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details"},us("ICU pattern set.")),us(" 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."))):"date"===r[a].type&&wp.element.createElement(ms,null,wp.element.createElement(bs,{label:us("Date Format"),help:us("Enter custom format pattern to apply to this series value."),placeholder:"dd LLLL yyyy",value:n.series[i].format,onChange:function(t){n.series[i].format=t,e.props.edit(n)}}),wp.element.createElement("p",null,us("This is a subset of the date formatting "),wp.element.createElement(_s,{href:"http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"},us("ICU date and time format.")))),0<=["scatter","line"].indexOf(t)&&wp.element.createElement(gs,{label:us("Curve Type"),help:us("Determines whether the series has to be presented in the legend or not."),value:n.series[i].curveType?n.series[i].curveType:"none",options:[{label:us("Straight line without curve"),value:"none"},{label:us("The angles of the line will be smoothed"),value:"function"}],onChange:function(t){n.series[i].curveType=t,e.props.edit(n)}}),0<=["area"].indexOf(t)&&wp.element.createElement(bs,{label:us("Area Opacity"),help:us("The opacity of the colored area, where 0.0 is fully transparent and 1.0 is fully opaque."),value:n.series[i].areaOpacity,onChange:function(t){n.series[i].areaOpacity=t,e.props.edit(n)}}),0<=["combo"].indexOf(t)&&wp.element.createElement(gs,{label:us("Chart Type"),help:us("Select the type of chart to show for this series."),value:n.series[i].type?n.series[i].type:"area",options:[{label:us("Area"),value:"area"},{label:us("Bar"),value:"bars"},{label:us("Candlesticks"),value:"candlesticks"},{label:us("Line"),value:"line"},{label:us("Stepped Area"),value:"steppedArea"}],onChange:function(t){n.series[i].type=t,e.props.edit(n)}}),-1>=["table"].indexOf(t)&&wp.element.createElement(fs,{label:us("Color")},wp.element.createElement(ps,{value:n.series[i].color,onChange:function(t){n.series[i].color=t,e.props.edit(n)}})))})))}}])&&is(n.prototype,r),a&&is(n,a),t}(ds);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 Ms(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 ks(e,t){return!t||"object"!==ws(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ls(e){return(Ls=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ys(e,t){return(Ys=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ts=wp.i18n.__,Ds=wp.element.Component,Ss=(wp.blockEditor||wp.editor).ColorPalette,Os=wp.components,js=Os.BaseControl,xs=Os.PanelBody,Es=Os.TextControl,Cs=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ks(this,Ls(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Ys(e,t)}(t,e),n=t,(r=[{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(xs,{title:Ts("Slices Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.slices).map((function(r){return wp.element.createElement(xs,{title:n[r][0],className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(Es,{label:Ts("Slice Offset"),help:Ts("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)}}),wp.element.createElement(js,{label:Ts("Format")},wp.element.createElement(Ss,{value:t.slices[r].color,onChange:function(n){t.slices[r].color=n,e.props.edit(t)}})))})))}}])&&Ms(n.prototype,r),a&&Ms(n,a),t}(Ds);function Ps(e){return(Ps="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 Hs(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 zs(e,t){return!t||"object"!==Ps(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function As(e){return(As=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ns(e,t){return(Ns=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Fs=wp.i18n.__,Rs=wp.element.Component,Ws=(wp.blockEditor||wp.editor).ColorPalette,Is=wp.components,Bs=Is.CheckboxControl,Js=Is.BaseControl,Us=Is.PanelBody,qs=Is.TextControl,Vs=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),zs(this,As(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Ns(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-settings"];return wp.element.createElement(Us,{title:Fs("Bubble Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(qs,{label:Fs("Opacity"),help:Fs("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(Js,{label:Fs("Stroke Color")},wp.element.createElement(Ws,{value:t.bubble.stroke,onChange:function(n){t.bubble||(t.bubble={}),t.bubble.stroke=n,e.props.edit(t)}})),wp.element.createElement(Bs,{label:Fs("Sort Bubbles by Size"),help:Fs("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:K(t,"sortBubblesBySize"),onChange:function(n){t.sortBubblesBySize=n,e.props.edit(t)}}),wp.element.createElement(qs,{label:Fs("Size (max)"),help:Fs("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(qs,{label:Fs("Size (min)"),help:Fs("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)}}))}}])&&Hs(n.prototype,r),a&&Hs(n,a),t}(Rs);function Gs(e){return(Gs="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 $s(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 Ks(e,t){return!t||"object"!==Gs(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zs(e){return(Zs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Qs(e,t){return(Qs=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Xs=wp.i18n.__,el=wp.element,tl=el.Component,nl=el.Fragment,rl=wp.components,al=rl.ExternalLink,il=rl.PanelBody,ol=rl.TextControl,sl=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ks(this,Zs(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Qs(e,t)}(t,e),n=t,(r=[{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-settings"],n=this.props.chart["visualizer-series"],r=this.props.chart["visualizer-chart-type"];return wp.element.createElement(il,{title:Xs("Column Settings"),initialOpen:!1,className:"visualizer-advanced-panel"},Object.keys(t.series).map((function(a){return wp.element.createElement(il,{title:n[a].label,className:"visualizer-inner-sections",initialOpen:!1},("date"===n[a].type||"datetime"===n[a].type||"timeofday"===n[a].type)&&wp.element.createElement(nl,null,wp.element.createElement(ol,{label:Xs("Display Date Format"),help:Xs("Enter custom format pattern to apply to this series value."),value:t.series[a].format?t.series[a].format.to:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.to=n,e.props.edit(t)}}),wp.element.createElement(ol,{label:Xs("Source Date Format"),help:Xs("What format is the source date in?"),value:t.series[a].format?t.series[a].format.from:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.from=n,e.props.edit(t)}}),wp.element.createElement("p",null,Xs("You can find more info on "),wp.element.createElement(al,{href:"https://momentjs.com/docs/#/displaying/"},Xs("date and time formats here.")))),"number"===n[a].type&&wp.element.createElement(nl,null,wp.element.createElement(ol,{label:Xs("Thousands Separator"),value:t.series[a].format?t.series[a].format.thousands:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.thousands=n,e.props.edit(t)}}),wp.element.createElement(ol,{label:Xs("Decimal Separator"),value:t.series[a].format?t.series[a].format.decimal:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.decimal=n,e.props.edit(t)}}),wp.element.createElement(ol,{label:Xs("Precision"),help:Xs("Round values to how many decimal places?"),value:t.series[a].format?t.series[a].format.precision:"",type:"number",onChange:function(n){100<n||(t.series[a].format||(t.series[a].format={}),t.series[a].format.precision=n,e.props.edit(t))}}),wp.element.createElement(ol,{label:Xs("Prefix"),value:t.series[a].format?t.series[a].format.prefix:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.prefix=n,e.props.edit(t)}}),wp.element.createElement(ol,{label:Xs("Suffix"),value:t.series[a].format?t.series[a].format.suffix:"",onChange:function(n){t.series[a].format||(t.series[a].format={}),t.series[a].format.suffix=n,e.props.edit(t)}})),"boolean"===n[a].type&&"dataTable"===r&&wp.element.createElement(nl,null,wp.element.createElement(ol,{label:Xs("Truthy value"),help:Xs("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[a].format?t.series[a].format.truthy:"",onChange:function(n){t.series[a].truthy||(t.series[a].truthy={}),t.series[a].format.truthy=n,e.props.edit(t)}}),wp.element.createElement(ol,{label:Xs("Falsy value"),help:Xs("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[a].format?t.series[a].format.falsy:"",onChange:function(n){t.series[a].falsy||(t.series[a].falsy={}),t.series[a].format.falsy=n,e.props.edit(t)}})))})))}}])&&$s(n.prototype,r),a&&$s(n,a),t}(tl);function ll(e){return(ll="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 ul(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 cl(e,t){return!t||"object"!==ll(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dl(e){return(dl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ml(e,t){return(ml=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var pl=wp.i18n.__,hl=wp.element,fl=hl.Component,_l=hl.Fragment,yl=(wp.blockEditor||wp.editor).ColorPalette,gl=wp.components,bl=gl.BaseControl,vl=gl.CheckboxControl,wl=gl.PanelBody,Ml=gl.SelectControl,kl=gl.TextControl,Ll=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),cl(this,dl(t).apply(this,arguments))}var n,r,a;return 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}}),t&&ml(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props.chart["visualizer-chart-type"],n=this.props.chart["visualizer-settings"];return wp.element.createElement(wl,{title:pl("Layout And Chart Area"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement(wl,{title:pl("Layout"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(kl,{label:pl("Width of Chart"),help:pl("Determines the total width of the chart."),value:n.width,onChange:function(t){n.width=t,e.props.edit(n)}}),wp.element.createElement(kl,{label:pl("Height of Chart"),help:pl("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(Ml,{label:pl("Keep Aspect Ratio"),help:pl("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:pl("Yes"),value:"1"},{label:pl("No"),value:"0"}],onChange:function(t){n.keepAspectRatio=t,e.props.edit(n)}}),-1>=["gauge"].indexOf(t)&&wp.element.createElement(_l,null,wp.element.createElement(kl,{label:pl("Stroke Width"),help:pl("The chart border width in pixels."),value:n.backgroundColor.strokeWidth,onChange:function(t){n.backgroundColor.strokeWidth=t,e.props.edit(n)}}),wp.element.createElement(bl,{label:pl("Stroke Color")},wp.element.createElement(yl,{value:n.backgroundColor.stroke,onChange:function(t){n.backgroundColor.stroke=t,e.props.edit(n)}})),wp.element.createElement(bl,{label:pl("Background Color")},wp.element.createElement(yl,{value:n.backgroundColor.fill,onChange:function(t){n.backgroundColor.fill=t,e.props.edit(n)}})),wp.element.createElement(vl,{label:pl("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"].indexOf(t)&&wp.element.createElement(wl,{title:pl("Chart Area"),className:"visualizer-inner-sections",initialOpen:!1},wp.element.createElement(kl,{label:pl("Left Margin"),help:pl("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(kl,{label:pl("Top Margin"),help:pl("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(kl,{label:pl("Width Of Chart Area"),help:pl("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(kl,{label:pl("Height Of Chart Area"),help:pl("Determines the hight of the chart area."),value:n.chartArea.height,onChange:function(t){n.chartArea.height=t,e.props.edit(n)}})))}}])&&ul(n.prototype,r),a&&ul(n,a),t}(fl);function Yl(e){return(Yl="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 Tl(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 Dl(e,t){return!t||"object"!==Yl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Sl(e){return(Sl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ol(e,t){return(Ol=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var jl=wp.i18n.__,xl=wp.element,El=xl.Component,Cl=xl.Fragment,Pl=wp.components,Hl=Pl.CheckboxControl,zl=Pl.PanelBody,Al=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Dl(this,Sl(t).apply(this,arguments))}var n,r,a;return 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}}),t&&Ol(e,t)}(t,e),n=t,(r=[{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 wp.element.createElement(zl,{title:jl("Frontend Actions"),initialOpen:!1,className:"visualizer-advanced-panel"},void 0!==t.actions&&wp.element.createElement(Cl,null,wp.element.createElement(Hl,{label:jl("Print"),help:jl("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(Hl,{label:jl("CSV"),help:jl("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(Hl,{label:jl("Excel"),help:jl("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(Hl,{label:jl("Copy"),help:jl("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(Hl,{label:jl("Download Image"),help:jl("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)}})))}}])&&Tl(n.prototype,r),a&&Tl(n,a),t}(El);function Nl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Nl(e,t,n[t])}))}return e}var Rl={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"}},Wl=n(2);const Il={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&&Il.throwError(Il.getCaller(2),e)},isFalsy:(e="<unknown parameter>",t)=>{t||Il.throwError(Il.getCaller(2),e)},isNoneOf:(e="<unknown parameter>",t,n=[])=>{-1===n.indexOf(t)&&Il.throwError(Il.getCaller(2),e,"to be any of"+JSON.stringify(n))},isAnyOf:(e="<unknown parameter>",t,n=[])=>{n.indexOf(t)>-1&&Il.throwError(Il.getCaller(2),e,"not to be any of"+JSON.stringify(n))},isNotType:(e="<unknown parameter>",t,n="")=>{Object(Wl.getType)(t)!==n.toLowerCase()&&Il.throwError(Il.getCaller(2),e,"to be type "+n.toLowerCase())},isAnyTypeOf:(e="<unknown parameter>",t,n=[])=>{n.forEach(n=>{Object(Wl.getType)(t)===n&&Il.throwError(Il.getCaller(2),e,"not to be type of "+n.toLowerCase())})},missingKey:(e="<unknown parameter>",t,n="")=>{Il.isUndefined(e,t),-1===Object.keys(t).indexOf(n)&&Il.throwError(Il.getCaller(2),e,"to contain '"+n+"' key")},missingAnyKeys:(e="<unknown parameter>",t,n=[""])=>{Il.isUndefined(e,t);const r=Object.keys(t);n.forEach(t=>{-1===r.indexOf(t)&&Il.throwError(Il.getCaller(2),e,"to contain '"+t+"' key")})},containsUndefined:(e="<unknown parameter>",t)=>{[void 0,null].forEach(n=>{const r=Object(Wl.locate)(t,n);r&&Il.throwError(Il.getCaller(2),e,"not to contain '"+JSON.stringify(n)+"' at "+r)})},isInvalidPath:(e="<unknown parameter>",t)=>{Il.isUndefined(e,t),Il.isNotType(e,t,"string"),Il.isAnyOf(e,t,["","/"]),".$[]#".split().forEach(n=>{t.indexOf(n)>-1&&Il.throwError(Il.getCaller(2),e,"not to contain invalid character '"+n+"'")}),t.match(/\/{2,}/g)&&Il.throwError(Il.getCaller(2),e,"not to contain consecutive forward slash characters")},isInvalidWriteData:(e="<unknown parameter>",t)=>{Il.isUndefined(e,t),Il.containsUndefined(e,t)}};var Bl=Il;const Jl=(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 Ul={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.9
66
  *
67
  * This source code is licensed under the MIT license found in the
68
  * LICENSE file in the root directory of this source tree.
69
+ */class ql 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=Rl.dark_vscode_tribute;"theme"in this.props&&"string"==typeof this.props.theme&&this.props.theme in Rl&&(n=Rl[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&&(clearInterval(this.timer),this.timer=!1):this.timer||(this.timer=setInterval(this.scheduledUpdate,100)),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.state.error,r=this.colors,i=this.style,o=this.confirmGood,s=this.totalHeight,l=this.totalWidth,u=!!n&&"token"in n;return this.renderCount++,a.a.createElement("div",{name:"outer-box",id:e&&e+"-outer-box",style:Fl({display:"block",overflow:"none",height:s,width:l,margin:0,boxSizing:"border-box",position:"relative"},i.outerBox)},o?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:Fl({display:"block",height:s,width:l,margin:0,boxSizing:"border-box",overflow:"hidden",fontFamily:"Roboto, sans-serif"},i.container),onClick:this.onClick},a.a.createElement("div",{name:"warning-box",id:e&&e+"-warning-box",style:Fl({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)"},i.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:Fl({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)"},i.body),onClick:this.onClick},a.a.createElement("span",{name:"labels",id:e&&e+"-labels",ref:e=>this.refLabels=e,style:Fl({display:"inline-block",boxSizing:"border-box",verticalAlign:"top",height:"100%",width:"44px",margin:0,padding:"5px 0px 5px 10px",overflow:"hidden",color:"#D4D4D4"},i.labelColumn),onClick:this.onClick},this.renderLabels()),a.a.createElement("span",{id:e,ref:e=>this.refContent=e,contentEditable:!0,style:Fl({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"},i.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||Ul,t=this.state.error,n=this.style;if(t)return a.a.createElement("p",{style:Fl({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)},Jl(e.format,t))}renderLabels(){const e=this.colors,t=this.style,n=this.state.error?this.state.error.line:-1,r=this.state.lines?this.state.lines:1;let i=new Array(r);for(var o=0;o<r-1;o++)i[o]=o+1;return i.map(r=>{const i=r!==n?e.default:"red";return a.a.createElement("div",{key:r,style:Fl({},t.labels,{color:i})},r)})}createMarkup(e){return void 0===e?{__html:""}:{__html:""+e}}newSpan(e,t,n){let r=this.colors,a=t.type,i=t.string,o="";switch(a){case"string":case"number":case"primitive":case"error":o=r[t.type];break;case"key":o=" "===i?r.keys_whiteSpace:r.keys;break;case"symbol":o=":"===i?r.colon:r.default;break;default:o=r.default}return i.length!==i.replace(/</g,"").replace(/>/g,"").length&&(i="<xmp style=display:inline;>"+i+"</xmp>"),'<span type="'+a+'" value="'+i+'" depth="'+n+'" style="color:'+o+'">'+i+"</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(null===(t=t.parentNode))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("insertHTML",!1,t)}this.update()}onClick(){"viewOnly"in this.props&&this.props.viewOnly}onBlur(){"viewOnly"in this.props&&this.props.viewOnly||this.update(0,!1)}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(Wl.getType)(e);-1===["object","array"].indexOf(a)&&Bl.throwError("showPlaceholder","placeholder","either an object or an array");let i=!Object(Wl.identical)(e,t);if(i||r&&void 0!==n&&(i=!Object(Wl.identical)(e,n)),!i)return;const o=this.tokenize(e);this.setState({prevPlaceholder:e,plainText:o.indentation,markupText:o.markup,lines:o.lines,error:o.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||Ul,n=this.newSpan;if("nodeType"in e){const M=e.cloneNode(!0);if(!M.hasChildNodes())return"";const k=M.childNodes;let L={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<k.length;r++){let e=k[r],t={};switch(e.nodeName){case"SPAN":t={string:e.textContent,type:e.attributes.type.textContent},L.tokens_unknown.push(t);break;case"DIV":L.tokens_unknown.push({string:e.textContent,type:"unknown"});break;case"BR":""===e.textContent&&L.tokens_unknown.push({string:"\n",type:"unknown"});break;case"#text":L.tokens_unknown.push({string:e.wholeText,type:"unknown"});break;case"FONT":L.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<L.tokens_unknown.length;r++){let e=L.tokens_unknown[r];L.tokens_proto=L.tokens_proto.concat(a(e.string,"proto"))}function i(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),-1===(a="'\"".indexOf(n)))return!1;if(n!==r)return!1;for(var i=0;i<e.length;i++)if(i>0&&i<e.length-1&&e.charAt(i)==="'\""[a]&&"\\"!==e.charAt(i-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))>-1){if(1===e.length)return!1;if(n!==r)return!1;for(i=0;i<e.length;i++)if(i>0&&i<e.length-1&&e.charAt(i)==="'\""[a]&&"\\"!==e.charAt(i-1))return!1}else{const t="'\"`.,:;{}[]&<>=~*%\\|/-+!?@^  ";for(i=0;i<t.length;i++){const n=t.charAt(i);if(e.indexOf(n)>-1)return!1}}break;case"number":for(i=0;i<e.length;i++)if(-1==="0123456789".indexOf(e.charAt(i)))if(0===i){if("-"!==e.charAt(0))return!1}else if("."!==e.charAt(i))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<L.tokens_proto.length;r++){let e=L.tokens_proto[r];-1===e.type.indexOf("proto")?i(e.string,e.type)?L.tokens_split.push(e):L.tokens_split=L.tokens_split.concat(a(e.string,"split")):L.tokens_split.push(e)}for(r=0;r<L.tokens_split.length;r++){let e=L.tokens_split[r],t=e.type,n=e.string,a=n.length,i=[];t.indexOf("-")>-1&&("string"!==(t=t.slice(t.indexOf("-")+1))&&i.push("string"),i.push("key"),i.push("error"));let o={string:n,length:a,type:t,fallback:i};L.tokens_fallback.push(o)}function o(){const e=L.tokens_normalize.length-1;if(e<1)return!1;for(var t=e;t>=0;t--){const e=L.tokens_normalize[t];switch(e.type){case"space":case"linebreak":break;default:return e}}return!1}let Y={brackets:[],stringOpen:!1,isValue:!1};for(r=0;r<L.tokens_fallback.length;r++){let e=L.tokens_fallback[r];const t=e.type,n=e.string;let a={type:t,string:n};switch(t){case"symbol":case"colon":if(Y.stringOpen){Y.isValue?a.type="string":a.type="key";break}switch(n){case"[":case"{":Y.brackets.push(n),Y.isValue="["===Y.brackets[Y.brackets.length-1];break;case"]":case"}":Y.brackets.pop(),Y.isValue="["===Y.brackets[Y.brackets.length-1];break;case",":if("colon"===o().type)break;Y.isValue="["===Y.brackets[Y.brackets.length-1];break;case":":a.type="colon",Y.isValue=!0}break;case"delimiter":if(Y.isValue?a.type="string":a.type="key",!Y.stringOpen){Y.stringOpen=n;break}if(r>0){const e=L.tokens_fallback[r-1],t=e.string,n=e.type,a=t.charAt(t.length-1);if("string"===n&&"\\"===a)break}if(Y.stringOpen===n){Y.stringOpen=!1;break}break;case"primitive":case"string":if(["false","true","null","undefined"].indexOf(n)>-1){const e=L.tokens_normalize.length-1;if(e>=0){if("string"!==L.tokens_normalize[e].type){a.type="primitive";break}a.type="string";break}a.type="primitive";break}if("\n"===n&&!Y.stringOpen){a.type="linebreak";break}Y.isValue?a.type="string":a.type="key";break;case"space":case"number":Y.stringOpen&&(Y.isValue?a.type="string":a.type="key")}L.tokens_normalize.push(a)}for(r=0;r<L.tokens_normalize.length;r++){const e=L.tokens_normalize[r];let t={string:e.string,type:e.type,tokens:[r]};if(-1===["symbol","colon"].indexOf(e.type)&&r+1<L.tokens_normalize.length){let n=0;for(var s=r+1;s<L.tokens_normalize.length;s++){const r=L.tokens_normalize[s];if(e.type!==r.type)break;t.string+=r.string,t.tokens.push(s),n++}r+=n}L.tokens_merge.push(t)}const T="'\"",D="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$";var l=!1,u=L.tokens_merge.length>0?1:0;function c(e,t,n=0){l={token:e,line:u,reason:t},L.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===L.tokens_merge.length-1)return!1;for(var n=e+1;n<L.tokens_merge.length;n++){const e=L.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 m(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=L.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 p(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=L.tokens_merge[t];switch(e.type){case"space":case"linebreak":break;default:return e.type}}return!1}Y={brackets:[],stringOpen:!1,isValue:!1};let S=[];for(r=0;r<L.tokens_merge.length&&!l;r++){let e=L.tokens_merge[r],n=e.string,a=e.type,i=!1;switch(a){case"space":break;case"linebreak":u++;break;case"symbol":switch(n){case"{":case"[":if(i=m(r,["}","]"])){c(r,Jl(t.invalidToken.tokenSequence.prohibited,{firstToken:L.tokens_merge[i].string,secondToken:n}));break}if("["===n&&r>0&&!m(r,[":","[",","])){c(r,Jl(t.invalidToken.tokenSequence.permitted,{firstToken:"[",secondToken:[":","[",","]}));break}if("{"===n&&m(r,["{"])){c(r,Jl(t.invalidToken.double,{token:"{"}));break}Y.brackets.push(n),Y.isValue="["===Y.brackets[Y.brackets.length-1],S.push({i:r,line:u,string:n});break;case"}":case"]":if("}"===n&&"{"!==Y.brackets[Y.brackets.length-1]){c(r,Jl(t.brace.curly.missingOpen));break}if("}"===n&&m(r,[","])){c(r,Jl(t.invalidToken.tokenSequence.prohibited,{firstToken:",",secondToken:"}"}));break}if("]"===n&&"["!==Y.brackets[Y.brackets.length-1]){c(r,Jl(t.brace.square.missingOpen));break}if("]"===n&&m(r,[":"])){c(r,Jl(t.invalidToken.tokenSequence.prohibited,{firstToken:":",secondToken:"]"}));break}Y.brackets.pop(),Y.isValue="["===Y.brackets[Y.brackets.length-1],S.push({i:r,line:u,string:n});break;case",":if(i=m(r,["{"])){if(d(r,["}"])){c(r,Jl(t.brace.curly.cannotWrap,{token:","}));break}c(r,Jl(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}if(d(r,["}",",","]"])){c(r,Jl(t.noTrailingOrLeadingComma));break}switch(i=p(r)){case"key":case"colon":c(r,Jl(t.invalidToken.termSequence.prohibited,{firstTerm:"key"===i?t.types.key:t.symbols.colon,secondTerm:t.symbols.comma}));break;case"symbol":if(m(r,["{"])){c(r,Jl(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}}Y.isValue="["===Y.brackets[Y.brackets.length-1]}L.json+=n;break;case"colon":if((i=m(r,["["]))&&d(r,["]"])){c(r,Jl(t.brace.square.cannotWrap,{token:":"}));break}if(i){c(r,Jl(t.invalidToken.tokenSequence.prohibited,{firstToken:"[",secondToken:":"}));break}if("key"!==p(r)){c(r,Jl(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.key}));break}if(d(r,["}","]"])){c(r,Jl(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.value}));break}Y.isValue=!0,L.json+=n;break;case"key":case"string":let e=n.charAt(0),o=n.charAt(n.length-1);T.indexOf(e);if(-1===T.indexOf(e)&&-1!==T.indexOf(o)){c(r,Jl(t.string.missingOpen,{quote:e}));break}if(-1===T.indexOf(o)&&-1!==T.indexOf(e)){c(r,Jl(t.string.missingClose,{quote:e}));break}if(T.indexOf(e)>-1&&e!==o){c(r,Jl(t.string.missingClose,{quote:e}));break}if("string"===a&&-1===T.indexOf(e)&&-1===T.indexOf(o)){c(r,Jl(t.string.mustBeWrappedByQuotes));break}if("key"===a&&d(r,["}","]"])&&c(r,Jl(t.invalidToken.termSequence.permitted,{firstTerm:t.types.key,secondTerm:t.symbols.colon})),-1===T.indexOf(e)&&-1===T.indexOf(o))for(var h=0;h<n.length&&!l;h++){const e=n.charAt(h);if(-1===D.indexOf(e)){c(r,Jl(t.string.nonAlphanumeric,{token:e}));break}}if("'"===e?n='"'+n.slice(1,-1)+'"':'"'!==e&&(n='"'+n+'"'),"key"===a&&"key"===p(r)){if(r>0&&!isNaN(L.tokens_merge[r-1])){L.tokens_merge[r-1]+=L.tokens_merge[r],c(r,Jl(t.key.numberAndLetterMissingQuotes));break}c(r,Jl(t.key.spaceMissingQuotes));break}if("key"===a&&!m(r,["{",","])){c(r,Jl(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["{",","]}));break}if("string"===a&&!m(r,["[",":",","])){c(r,Jl(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["[",":",","]}));break}if("key"===a&&Y.isValue){c(r,Jl(t.string.unexpectedKey));break}if("string"===a&&!Y.isValue){c(r,Jl(t.key.unexpectedString));break}L.json+=n;break;case"number":case"primitive":if(m(r,["{"]))L.tokens_merge[r].type="key",a=L.tokens_merge[r].type,n='"'+n+'"';else if("key"===p(r))L.tokens_merge[r].type="key",a=L.tokens_merge[r].type;else if(!m(r,["[",":",","])){c(r,Jl(t.invalidToken.tokenSequence.permitted,{firstToken:a,secondToken:["[",":",","]}));break}"key"!==a&&(Y.isValue||(L.tokens_merge[r].type="key",a=L.tokens_merge[r].type,n='"'+n+'"')),"primitive"===a&&"undefined"===n&&c(r,Jl(t.invalidToken.useInstead,{badToken:"undefined",goodToken:"null"})),L.json+=n}}let O="";for(r=0;r<L.json.length;r++){let e=L.json.charAt(r),t="";r+1<L.json.length&&(t=L.json.charAt(r+1),"\\"===e&&"'"===t)?(O+=t,r++):O+=e}if(L.json=O,!l){const e=Math.ceil(S.length/2);let n=0,r=!1;function f(e){S.splice(e+1,1),S.splice(e,1),r||(r=!0)}for(;S.length>0;){r=!1;for(var _=0;_<S.length-1;_++){const e=S[_].string+S[_+1].string;["[]","{}"].indexOf(e)>-1&&f(_)}if(n++,!r)break;if(n>=e)break}if(S.length>0){const e=S[0].string,n=S[0].i,r="["===e?"]":"}";u=S[0].line,c(n,Jl(t.brace["]"===r?"square":"curly"].missingClose))}}if(!l&&-1===[void 0,""].indexOf(L.json))try{L.jsObject=JSON.parse(L.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),i=parseInt(a);let o=0,s=0,d=!1,m=1,p=!1;for(;o<i&&!p&&("linebreak"===(d=L.tokens_merge[s]).type&&m++,-1===["space","linebreak"].indexOf(d.type)&&(o+=d.string.length),!(o>=i));)s++,L.tokens_merge[s+1]||(p=!0);u=m;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,Jl(t.invalidToken.unexpected,{token:"\\"})),h=0)}l||c(s,Jl(t.invalidToken.unexpected,{token:d.string}))}let j=1,x=0;function y(){for(var e=[],t=0;t<2*x;t++)e.push("&nbsp;");return e.join("")}function g(e=!1){return j++,x>0||e?"<br>":""}function b(e=!1){return g(e)+y()}if(!l)for(r=0;r<L.tokens_merge.length;r++){const e=L.tokens_merge[r],t=e.string;switch(e.type){case"space":case"linebreak":break;case"string":case"number":case"primitive":case"error":L.markup+=(m(r,[",","["])?b():"")+n(r,e,x);break;case"key":L.markup+=b()+n(r,e,x);break;case"colon":L.markup+=n(r,e,x)+"&nbsp;";break;case"symbol":switch(t){case"[":case"{":L.markup+=(m(r,[":"])?"":b())+n(r,e,x),x++;break;case"]":case"}":x--;const t=r===L.tokens_merge.length-1,a=r>0?["[","{"].indexOf(L.tokens_merge[r-1].string)>-1?"":b(t):"";L.markup+=a+n(r,e,x);break;case",":L.markup+=n(r,e,x)}}}if(l){let e=1;function v(e){let t=0;for(var n=0;n<e.length;n++)["\n","\r"].indexOf(e[n])>-1&&t++;return t}j=1;for(r=0;r<L.tokens_merge.length;r++){const t=L.tokens_merge[r],a=t.type,i=t.string;"linebreak"===a&&j++,L.markup+=n(r,t,x),e+=v(i)}e++,++j<e&&(j=e)}for(r=0;r<L.tokens_merge.length;r++){let e=L.tokens_merge[r];L.indented+=e.string,-1===["space","linebreak"].indexOf(e.type)&&(L.tokens_plainText+=e.string)}if(l){"modifyErrorText"in this.props&&((w=this.props.modifyErrorText)&&"[object Function]"==={}.toString.call(w)&&(l.reason=this.props.modifyErrorText(l.reason)))}return{tokens:L.tokens_merge,noSpaces:L.tokens_plainText,indented:L.indented,json:L.json,jsObject:L.jsObject,markup:L.markup,lines:j,error:l}}var w;if(!("nodeType"in e)){let t={inputText:JSON.stringify(e),position:0,currentChar:"",tokenPrimary:"",tokenSecondary:"",brackets:[],isValue:!1,stringOpen:!1,stringStart:0,tokens:[]};function M(){return"\\"===t.currentChar&&(t.inputText=(e=t.inputText,n=t.position,e.slice(0,n)+e.slice(n+1)),!0);var e,n}function k(){if(-1==="'\"".indexOf(t.currentChar))return!1;if(!t.stringOpen)return Y(),t.stringStart=t.position,t.stringOpen=t.currentChar,!0;if(t.stringOpen===t.currentChar){return Y(),T(t.inputText.substring(t.stringStart,t.position+1)),t.stringOpen=!1,!0}return!1}function L(){if(-1===":,{}[]".indexOf(t.currentChar))return!1;if(t.stringOpen)return!1;switch(Y(),T(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 Y(){return 0!==t.tokenSecondary.length&&(t.tokens.push(t.tokenSecondary),t.tokenSecondary="",!0)}function T(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=L(),n=k(),a=M();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 o=e.charAt(0);if("'\"".indexOf(o)>-1){if("key"===(t=a.isValue?"string":"key")&&(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 i=0;i<n.length;i++){let e=n[i];["'",'"'].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 i=0;i<t.length;i++){let e=t[i];"'\"".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).indexOf(" ")>-1&&(n="'"+n+"'"),r=n;break}}return{type:t,string:n,value:r,depth:a.brackets.length}});let i="";for(r=0;r<a.tokens.length;r++){i+=a.tokens[r].string}function D(e){for(var t=[],n=0;n<2*e;n++)t.push(" ");return(e>0?"\n":"")+t.join("")}let o="";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)?o+=e.string+D(e.depth):o+=e.string;break;case"]":case"}":const n=r>0?a.tokens[r-1]:"";-1==="[{".indexOf(n.string)?o+=D(e.depth)+e.string:o+=e.string;break;case":":o+=e.string+" ";break;case",":o+=e.string+D(e.depth);break;default:o+=e.string}}let s=1;function S(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+S(e.depth):l+=t;break;case"}":case"]":const i=r>0?a.tokens[r-1]:"";-1==="[{".indexOf(i.string)?l+=S(e.depth)+(u===r?"<br>":"")+t:l+=t;break;case":":l+=t+" ";break;case",":l+=t+S(e.depth);break;default:l+=t}}return s+=2,{tokens:a.tokens,noSpaces:i,indented:o,json:JSON.stringify(e),jsObject:e,markup:l,lines:s}}}}var Vl=ql,Gl=n(133),$l=n.n(Gl);function Kl(e){return(Kl="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 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,r.key,r)}}function Ql(e){return(Ql=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eu(e,t){return(eu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var tu=wp.i18n.__,nu=wp.element.Component,ru=wp.components,au=ru.ExternalLink,iu=ru.PanelBody,ou=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==Kl(t)&&"function"!=typeof t?Xl(e):t}(this,Ql(t).apply(this,arguments))).isValidJSON=e.isValidJSON.bind(Xl(e)),e}var n,r,a;return 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}}),t&&eu(e,t)}(t,e),n=t,(r=[{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","table","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(iu,{title:tu("Manual Configuration"),initialOpen:!1,className:"visualizer-advanced-panel"},wp.element.createElement("p",null,tu("Configure the graph by providing configuration variables right from the Google Visualization API.")),wp.element.createElement("p",null,wp.element.createElement(au,{href:"https://developers.google.com/chart/interactive/docs/gallery/".concat(e,"#configuration-options")},tu("Google Visualization API"))),wp.element.createElement(Vl,{locale:$l.a,theme:"light_mitsuketa_tribute",placeholder:$(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))}}))}}])&&Zl(n.prototype,r),a&&Zl(n,a),t}(nu);function su(e){return(su="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 lu(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 uu(e,t){return!t||"object"!==su(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cu(e){return(cu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function du(e,t){return(du=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var mu=wp.element,pu=mu.Component,hu=mu.Fragment,fu=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),uu(this,cu(t).apply(this,arguments))}var n,r,a;return 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}}),t&&du(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this.props.chart["visualizer-chart-type"];return wp.element.createElement(hu,null,wp.element.createElement(qn,{chart:this.props.chart,edit:this.props.edit}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(e)&&wp.element.createElement(ur,{chart:this.props.chart,edit:this.props.edit}),-1>=["table","gauge","geo","pie","timeline","dataTable"].indexOf(e)&&wp.element.createElement(Tr,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(hu,null,wp.element.createElement(Br,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(na,{chart:this.props.chart,edit:this.props.edit})),0<=["area","scatter","line"].indexOf(e)&&wp.element.createElement(_a,{chart:this.props.chart,edit:this.props.edit}),0<=["bar","column"].indexOf(e)&&wp.element.createElement(Sa,{chart:this.props.chart,edit:this.props.edit}),0<=["candlestick"].indexOf(e)&&wp.element.createElement(Ia,{chart:this.props.chart,edit:this.props.edit}),0<=["geo"].indexOf(e)&&wp.element.createElement(hu,null,wp.element.createElement(ti,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(hi,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Si,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Ri,{chart:this.props.chart,edit:this.props.edit})),0<=["gauge"].indexOf(e)&&wp.element.createElement(no,{chart:this.props.chart,edit:this.props.edit}),0<=["timeline"].indexOf(e)&&wp.element.createElement(_o,{chart:this.props.chart,edit:this.props.edit}),0<=["table","dataTable"].indexOf(e)&&wp.element.createElement(hu,null,wp.element.createElement(xo,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(qo,{chart:this.props.chart,edit:this.props.edit})),0<=["combo"].indexOf(e)&&wp.element.createElement(rs,{chart:this.props.chart,edit:this.props.edit}),-1>=["timeline","bubble","gauge","geo","pie","dataTable"].indexOf(e)&&wp.element.createElement(vs,{chart:this.props.chart,edit:this.props.edit}),0<=["bubble"].indexOf(e)&&wp.element.createElement(Vs,{chart:this.props.chart,edit:this.props.edit}),0<=["pie"].indexOf(e)&&wp.element.createElement(Cs,{chart:this.props.chart,edit:this.props.edit}),0<=["dataTable"].indexOf(e)&&wp.element.createElement(sl,{chart:this.props.chart,edit:this.props.edit}),-1>=["dataTable"].indexOf(e)&&wp.element.createElement(Ll,{chart:this.props.chart,edit:this.props.edit}),wp.element.createElement(Al,{chart:this.props.chart,edit:this.props.edit}),-1>=["dataTable"].indexOf(e)&&wp.element.createElement(ou,{chart:this.props.chart,edit:this.props.edit}))}}])&&lu(n.prototype,r),a&&lu(n,a),t}(pu);function _u(e){return(_u="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 yu(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function gu(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){yu(i,r,a,o,s,"next",e)}function s(e){yu(i,r,a,o,s,"throw",e)}o(void 0)}))}}function bu(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 vu(e){return(vu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mu(e,t){return(Mu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ku=wp.i18n.__,Lu=wp.apiFetch,Yu=wp.element,Tu=Yu.Component,Du=Yu.Fragment,Su=wp.components,Ou=Su.Button,ju=Su.PanelBody,xu=Su.SelectControl,Eu=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==_u(t)&&"function"!=typeof t?wu(e):t}(this,vu(t).apply(this,arguments))).getPermissionData=e.getPermissionData.bind(wu(e)),e.state={users:[],roles:[]},e}var n,r,a,i,o;return 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}}),t&&Mu(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(o=gu(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.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,Lu({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,Lu({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:(i=gu(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.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,Lu({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,Lu({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 i.apply(this,arguments)})},{key:"render",value:function(){var e,t=this;return"business"===visualizerLocalize.isPro&&(e=this.props.chart["visualizer-permissions"]),wp.element.createElement(Du,null,"business"===visualizerLocalize.isPro?wp.element.createElement(ju,{title:ku("Who can see this chart?"),initialOpen:!1},wp.element.createElement(xu,{label:ku("Select who can view the chart on the front-end."),value:e.permissions.read,options:[{value:"all",label:"All Users"},{value:"users",label:"Select Users"},{value:"roles",label:"Select Roles"}],onChange:function(n){e.permissions.read=n,t.props.edit(e),"users"!==n&&"roles"!==n||t.getPermissionData(n)}}),("users"===e.permissions.read||"roles"===e.permissions.read)&&wp.element.createElement(xu,{multiple:!0,value:e.permissions["read-specific"],options:"users"===e.permissions.read&&this.state.users||"roles"===e.permissions.read&&this.state.roles,onChange:function(n){e.permissions["read-specific"]=n,t.props.edit(e)}})):wp.element.createElement(ju,{title:ku("Who can see this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,ku("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(Ou,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},ku("Buy Now"))),"business"===visualizerLocalize.isPro?wp.element.createElement(ju,{title:ku("Who can edit this chart?"),initialOpen:!1},wp.element.createElement(xu,{label:ku("Select who can edit the chart on the front-end."),value:e.permissions.edit,options:[{value:"all",label:"All Users"},{value:"users",label:"Select Users"},{value:"roles",label:"Select Roles"}],onChange:function(n){e.permissions.edit=n,t.props.edit(e),"users"!==n&&"roles"!==n||t.getPermissionData(n)}}),("users"===e.permissions.edit||"roles"===e.permissions.edit)&&wp.element.createElement(xu,{multiple:!0,value:e.permissions["edit-specific"],options:"users"===e.permissions.edit&&this.state.users||"roles"===e.permissions.edit&&this.state.roles,onChange:function(n){e.permissions["edit-specific"]=n,t.props.edit(e)}})):wp.element.createElement(ju,{title:ku("Who can edit this chart?"),icon:"lock",initialOpen:!1},wp.element.createElement("p",null,ku("Upgrade your license to at least the DEVELOPER version to activate this feature!")),wp.element.createElement(Ou,{isPrimary:!0,href:visualizerLocalize.proTeaser,target:"_blank"},ku("Buy Now"))))}}])&&bu(n.prototype,r),a&&bu(n,a),t}(Tu),Cu=n(134),Pu=n.n(Cu),Hu=wp.components,zu=Hu.Button,Au=Hu.Dashicon,Nu=Hu.G,Fu=Hu.Path,Ru=Hu.SVG;var Wu=function(e){var t=e.label,n=e.icon,r=e.className,a=e.isBack,i=e.onClick,o=Pu()("components-panel__body","components-panel__body-button",r,{"visualizer-panel-back":a});return wp.element.createElement("div",{className:o},wp.element.createElement("h2",{className:"components-panel__body-title"},wp.element.createElement(zu,{className:"components-panel__body-toggle",onClick:i},wp.element.createElement(Ru,{className:"components-panel__arrow",width:"24px",height:"24px",viewBox:"-12 -12 48 48",xmlns:"http://www.w3.org/2000/svg"},wp.element.createElement(Nu,null,wp.element.createElement(Fu,{fill:"none",d:"M0,0h24v24H0V0z"})),wp.element.createElement(Nu,null,wp.element.createElement(Fu,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"}))),n&&wp.element.createElement(Au,{icon:n,className:"components-panel__icon"}),t)))},Iu=n(3),Bu=n.n(Iu);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 Uu(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!t||"object"!==Ju(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vu(e){return(Vu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Gu(e,t){return(Gu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var $u=lodash.startCase,Ku=wp.i18n.__,Zu=wp.element,Qu=Zu.Component,Xu=Zu.Fragment,ec=(wp.blockEditor||wp.editor).InspectorControls,tc=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=qu(this,Vu(t).apply(this,arguments))).state={route:"home"},e}var n,r,a;return 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}}),t&&Gu(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e,t,n=this,r=U(JSON.parse(JSON.stringify(this.props.chart)));return e=0<=["gauge","table","timeline","dataTable"].indexOf(this.props.chart["visualizer-chart-type"])?"dataTable"===r["visualizer-chart-type"]?r["visualizer-chart-type"]:$u(this.props.chart["visualizer-chart-type"]):"".concat($u(this.props.chart["visualizer-chart-type"]),"Chart"),r["visualizer-data-exploded"]&&(t=Ku("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement(Xu,null,"home"===this.state.route&&wp.element.createElement(ec,null,wp.element.createElement(Oe,{chart:this.props.chart,readUploadedFile:this.props.readUploadedFile}),wp.element.createElement(mt,{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(jt,{getChartData:this.props.getChartData,isLoading:this.props.isLoading}),wp.element.createElement(an,{chart:this.props.chart,editSchedule:this.props.editDatabaseSchedule,databaseImportData:this.props.databaseImportData}),wp.element.createElement(xn,{chart:this.props.chart,editChartData:this.props.editChartData}),wp.element.createElement(Wu,{label:Ku("Advanced Options"),className:"visualizer-advanced-options",icon:"admin-tools",onClick:function(){return n.setState({route:"showAdvanced"})}}),wp.element.createElement(Wu,{label:Ku("Chart Permissions"),icon:"admin-users",onClick:function(){return n.setState({route:"showPermissions"})}})),("showAdvanced"===this.state.route||"showPermissions"===this.state.route)&&wp.element.createElement(ec,null,wp.element.createElement(Wu,{label:Ku("Chart Settings"),onClick:function(){return n.setState({route:"home"})},isBack:!0}),"showAdvanced"===this.state.route&&wp.element.createElement(fu,{chart:this.props.chart,edit:this.props.editSettings}),"showPermissions"===this.state.route&&wp.element.createElement(Eu,{chart:this.props.chart,edit:this.props.editPermissions})),wp.element.createElement("div",{className:"visualizer-settings__chart"},null!==this.props.chart&&"dataTable"===e?wp.element.createElement(R,{id:this.props.id,rows:r["visualizer-data"],columns:r["visualizer-series"],options:r["visualizer-settings"]}):(r["visualizer-data-exploded"],wp.element.createElement(O,{chartType:e,rows:r["visualizer-data"],columns:r["visualizer-series"],options:$(this.props.chart["visualizer-settings"].manual)?Bu()(V(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):V(this.props.chart["visualizer-settings"]),height:"500px"})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,t))))}}])&&Uu(n.prototype,r),a&&Uu(n,a),t}(Qu);function nc(e){return(nc="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 rc(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 ac(e,t){return!t||"object"!==nc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ic(e){return(ic=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oc(e,t){return(oc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var sc=lodash.startCase,lc=wp.i18n.__,uc=wp.element,cc=uc.Component,dc=uc.Fragment,mc=wp.components,pc=mc.Button,hc=mc.Dashicon,fc=mc.Toolbar,_c=mc.Tooltip,yc=(wp.blockEditor||wp.editor).BlockControls,gc=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ac(this,ic(t).apply(this,arguments))}var n,r,a;return 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}}),t&&oc(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e,t,n=U(JSON.parse(JSON.stringify(this.props.chart)));return e=0<=["gauge","table","timeline","dataTable"].indexOf(this.props.chart["visualizer-chart-type"])?"dataTable"===n["visualizer-chart-type"]?n["visualizer-chart-type"]:sc(this.props.chart["visualizer-chart-type"]):"".concat(sc(this.props.chart["visualizer-chart-type"]),"Chart"),n["visualizer-data-exploded"]&&(t=lc("Annotations in this chart may not display here but they will display in the front end.")),wp.element.createElement("div",{className:this.props.className},null!==this.props.chart&&wp.element.createElement(dc,null,wp.element.createElement(yc,{key:"toolbar-controls"},wp.element.createElement(fc,{className:"components-toolbar"},wp.element.createElement(_c,{text:lc("Edit Chart")},wp.element.createElement(pc,{className:"components-icon-button components-toolbar__control edit-pie-chart",onClick:this.props.editChart},wp.element.createElement(hc,{icon:"edit"}))))),"dataTable"===e?wp.element.createElement(R,{id:this.props.id,rows:n["visualizer-data"],columns:n["visualizer-series"],options:n["visualizer-settings"]}):(n["visualizer-data-exploded"],wp.element.createElement(O,{chartType:e,rows:n["visualizer-data"],columns:n["visualizer-series"],options:$(this.props.chart["visualizer-settings"].manual)?Bu()(V(this.props.chart["visualizer-settings"]),JSON.parse(this.props.chart["visualizer-settings"].manual)):V(this.props.chart["visualizer-settings"]),height:"500px"})),wp.element.createElement("div",{className:"visualizer-settings__charts-footer"},wp.element.createElement("sub",null,t))))}}])&&rc(n.prototype,r),a&&rc(n,a),t}(cc);function bc(e){return(bc="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 vc(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 wc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vc(n,!0).forEach((function(t){Mc(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vc(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kc(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function Lc(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){kc(i,r,a,o,s,"next",e)}function s(e){kc(i,r,a,o,s,"throw",e)}o(void 0)}))}}function Yc(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 Tc(e){return(Tc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Dc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sc(e,t){return(Sc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Oc=wp.i18n.__,jc=wp,xc=jc.apiFetch,Ec=jc.apiRequest,Cc=wp.element,Pc=Cc.Component,Hc=Cc.Fragment,zc=wp.components,Ac=zc.Button,Nc=zc.ButtonGroup,Fc=zc.Dashicon,Rc=zc.Placeholder,Wc=zc.Notice,Ic=zc.Spinner,Bc=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t){return!t||"object"!==bc(t)&&"function"!=typeof t?Dc(e):t}(this,Tc(t).apply(this,arguments))).getChart=e.getChart.bind(Dc(e)),e.editChart=e.editChart.bind(Dc(e)),e.editSettings=e.editSettings.bind(Dc(e)),e.editPermissions=e.editPermissions.bind(Dc(e)),e.readUploadedFile=e.readUploadedFile.bind(Dc(e)),e.editURL=e.editURL.bind(Dc(e)),e.editSchedule=e.editSchedule.bind(Dc(e)),e.editJSONSchedule=e.editJSONSchedule.bind(Dc(e)),e.editJSONURL=e.editJSONURL.bind(Dc(e)),e.editJSONHeaders=e.editJSONHeaders.bind(Dc(e)),e.editJSONRoot=e.editJSONRoot.bind(Dc(e)),e.editJSONPaging=e.editJSONPaging.bind(Dc(e)),e.JSONImportData=e.JSONImportData.bind(Dc(e)),e.editDatabaseSchedule=e.editDatabaseSchedule.bind(Dc(e)),e.databaseImportData=e.databaseImportData.bind(Dc(e)),e.uploadData=e.uploadData.bind(Dc(e)),e.getChartData=e.getChartData.bind(Dc(e)),e.editChartData=e.editChartData.bind(Dc(e)),e.updateChart=e.updateChart.bind(Dc(e)),e.state={route:e.props.attributes.route?e.props.attributes.route:"home",chart:null,isModified:!1,isLoading:!1,isScheduled:!1},e}var n,r,a,i,o,s;return 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}}),t&&Sc(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:(s=Lc(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.props.attributes.id){e.next=5;break}return e.next=3,xc({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 s.apply(this,arguments)})},{key:"getChart",value:(o=Lc(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.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,xc({path:"wp/v2/visualizer/".concat(t)});case 4:n=e.sent,this.setState({route:"chartSelect",chart:n.chart_data,isLoading:!1}),this.props.setAttributes({id:t,route:"chartSelect"});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=wc({},this.state.chart);t["visualizer-settings"]=e,this.setState({chart:t,isModified:!0})}},{key:"editPermissions",value:function(e){var t=wc({},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 i=a[1];i.length&&i!==t&&r.push([]);var o=void 0;o=a[2]?a[2].replace(new RegExp("''","g"),"'"):a[3],r[r.length-1].push(o)}return r}(r.result);t.editChartData(e,"Visualizer_Source_Csv")},r.readAsText(n)}},{key:"editURL",value:function(e){var t=wc({},this.state.chart);t["visualizer-chart-url"]=e,this.setState({chart:t})}},{key:"editSchedule",value:function(e){var t=wc({},this.state.chart);t["visualizer-chart-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"editJSONSchedule",value:function(e){var t=wc({},this.state.chart);t["visualizer-json-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"editJSONURL",value:function(e){var t=wc({},this.state.chart);t["visualizer-json-url"]=e,this.setState({chart:t})}},{key:"editJSONHeaders",value:function(e){var t=wc({},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=wc({},this.state.chart);t["visualizer-json-root"]=e,this.setState({chart:t})}},{key:"editJSONPaging",value:function(e){var t=wc({},this.state.chart);t["visualizer-json-paging"]=e,this.setState({chart:t})}},{key:"JSONImportData",value:function(e,t,n){var r=wc({},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=wc({},this.state.chart);t["visualizer-db-schedule"]=e,this.setState({chart:t,isModified:!0})}},{key:"databaseImportData",value:function(e,t,n,r){var a=wc({},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}),Ec({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=wc({},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"],i=r,o="series";return"pie"===n["visualizer-chart-type"]&&(i=n["visualizer-data"],o="slices"),i.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[o][r]&&(a[o][r]={},a[o][r].temp=1)}})),a[o]=a[o].filter((function(e,t){return t<("pie"!==n["visualizer-chart-type"]?i.length-1:i.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:(i=Lc(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.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,xc({path:"wp/v2/visualizer/".concat(t)});case 4:n=e.sent,(r=wc({},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 i.apply(this,arguments)})},{key:"editChartData",value:function(e,t){var n=wc({},this.state.chart),r=[],a=wc({},n["visualizer-settings"]),i=n["visualizer-chart-type"];e[0].map((function(t,n){r[n]={label:t,type:e[1][n]}})),e.splice(0,2);var o=r,s="series";"pie"===i&&(o=e,s="slices",e.map((function(e,t){switch(r[1].type){case"number":e[1]=parseFloat(e[1])}}))),o.map((function(e,t){if("pie"===i||0!==t){var n="pie"!==i?t-1:t;void 0===a[s][n]&&(a[s][n]={},a[s][n].temp=1)}})),a[s]=a[s].filter((function(e,t){return t<(-1>=["pie","tabular","dataTable"].indexOf(i)?o.length-1:o.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})),Ec({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(Wc,{status:"error",isDismissible:!1},wp.element.createElement(Fc,{icon:"chart-pie"}),Oc("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(gc,{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(Fc,{icon:"chart-pie"}),Oc("Visualizer")),"home"===this.state.route&&wp.element.createElement("div",{className:"visualizer-settings__content"},wp.element.createElement("div",{className:"visualizer-settings__content-description"},Oc("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"},Oc("Create a new chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement(Fc,{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"},Oc("Display an existing chart")),wp.element.createElement("div",{className:"visualizer-settings__content-option-icon"},wp.element.createElement(Fc,{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(Rc,null,wp.element.createElement(Ic,null)),"showCharts"===this.state.route&&!1===this.state.isLoading&&wp.element.createElement(ye,{getChart:this.getChart}),"chartSelect"===this.state.route&&null!==this.state.chart&&wp.element.createElement(tc,{id:this.props.attributes.id,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(Nc,null,wp.element.createElement(Ac,{isDefault:!0,isLarge:!0,onClick:function(){var t;"showCharts"===e.state.route?t="home":"chartSelect"===e.state.route&&(t="showCharts"),e.setState({route:t}),e.props.setAttributes({route:t})}},Oc("Back")),"chartSelect"===this.state.route&&wp.element.createElement(Hc,null,!1===this.state.isModified?wp.element.createElement(Ac,{isDefault:!0,isLarge:!0,className:"visualizer-bttn-done",onClick:function(){e.setState({route:"renderChart"}),e.props.setAttributes({route:"renderChart"})}},Oc("Done")):wp.element.createElement(Ac,{isPrimary:!0,isLarge:!0,className:"visualizer-bttn-save",isBusy:"updateChart"===this.state.isLoading,disabled:"updateChart"===this.state.isLoading,onClick:this.updateChart},Oc("Save"))))))}}])&&Yc(n.prototype,r),a&&Yc(n,a),t}(Pc),Jc=(n(153),wp.i18n.__),Uc=wp.blocks.registerBlockType;t.default=Uc("visualizer/chart",{title:Jc("Visualizer Chart"),description:Jc("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:[Jc("Visualizer"),Jc("Chart"),Jc("Google Charts")],attributes:{id:{type:"number"},route:{type:"string"}},supports:{customClassName:!1},edit:Bc,save:function(){return null}})}]);
classes/Visualizer/Gutenberg/src/Components/ChartSelect.js CHANGED
@@ -112,6 +112,7 @@ class ChartSelect extends Component {
112
 
113
  <PanelButton
114
  label={ __( 'Advanced Options' ) }
 
115
  icon="admin-tools"
116
  onClick={ () => this.setState({ route: 'showAdvanced' }) }
117
  />
112
 
113
  <PanelButton
114
  label={ __( 'Advanced Options' ) }
115
+ className="visualizer-advanced-options"
116
  icon="admin-tools"
117
  onClick={ () => this.setState({ route: 'showAdvanced' }) }
118
  />
classes/Visualizer/Gutenberg/src/Components/Sidebar.js CHANGED
@@ -20,6 +20,7 @@ import RowCellSettings from './Sidebar/RowCellSettings.js';
20
  import ComboSettings from './Sidebar/ComboSettings.js';
21
  import SeriesSettings from './Sidebar/SeriesSettings.js';
22
  import SlicesSettings from './Sidebar/SlicesSettings.js';
 
23
  import ColumnSettings from './Sidebar/ColumnSettings.js';
24
  import LayoutAndChartArea from './Sidebar/LayoutAndChartArea.js';
25
  import FrontendActions from './Sidebar/FrontendActions.js';
@@ -113,10 +114,15 @@ class Sidebar extends Component {
113
  <ComboSettings chart={ this.props.chart } edit={ this.props.edit } />
114
  ) }
115
 
116
- { ( -1 >= [ 'timeline', 'gauge', 'geo', 'pie', 'dataTable' ].indexOf( type ) ) && (
117
  <SeriesSettings chart={ this.props.chart } edit={ this.props.edit } />
118
  ) }
119
 
 
 
 
 
 
120
  { ( 0 <= [ 'pie' ].indexOf( type ) ) && (
121
  <SlicesSettings chart={ this.props.chart } edit={ this.props.edit } />
122
  ) }
20
  import ComboSettings from './Sidebar/ComboSettings.js';
21
  import SeriesSettings from './Sidebar/SeriesSettings.js';
22
  import SlicesSettings from './Sidebar/SlicesSettings.js';
23
+ import BubbleSettings from './Sidebar/BubbleSettings.js';
24
  import ColumnSettings from './Sidebar/ColumnSettings.js';
25
  import LayoutAndChartArea from './Sidebar/LayoutAndChartArea.js';
26
  import FrontendActions from './Sidebar/FrontendActions.js';
114
  <ComboSettings chart={ this.props.chart } edit={ this.props.edit } />
115
  ) }
116
 
117
+ { ( -1 >= [ 'timeline', 'bubble', 'gauge', 'geo', 'pie', 'dataTable' ].indexOf( type ) ) && (
118
  <SeriesSettings chart={ this.props.chart } edit={ this.props.edit } />
119
  ) }
120
 
121
+ { ( 0 <= [ 'bubble' ].indexOf( type ) ) && (
122
+ <BubbleSettings chart={ this.props.chart } edit={ this.props.edit } />
123
+ ) }
124
+
125
+
126
  { ( 0 <= [ 'pie' ].indexOf( type ) ) && (
127
  <SlicesSettings chart={ this.props.chart } edit={ this.props.edit } />
128
  ) }
classes/Visualizer/Gutenberg/src/Components/Sidebar/BubbleSettings.js ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ const { __ } = wp.i18n;
5
+
6
+ const { Component } = wp.element;
7
+
8
+ const { ColorPalette } = wp.blockEditor || wp.editor;
9
+
10
+ import { isChecked } from '../../utils.js';
11
+
12
+ const {
13
+ CheckboxControl,
14
+ BaseControl,
15
+ PanelBody,
16
+ TextControl
17
+ } = wp.components;
18
+
19
+ class BubbleSettings extends Component {
20
+ constructor() {
21
+ super( ...arguments );
22
+ }
23
+
24
+ componentDidMount() {
25
+
26
+ }
27
+
28
+ render() {
29
+
30
+ const settings = this.props.chart['visualizer-settings'];
31
+
32
+ return (
33
+ <PanelBody
34
+ title={ __( 'Bubble Settings' ) }
35
+ initialOpen={ false }
36
+ className="visualizer-advanced-panel"
37
+ >
38
+
39
+ <TextControl
40
+ label={ __( 'Opacity' ) }
41
+ help={ __( 'The default opacity of the bubbles, where 0.0 is fully transparent and 1.0 is fully opaque.' ) }
42
+ type="number"
43
+ min="0"
44
+ max="1"
45
+ step="0.1"
46
+ value={ settings.bubble.opacity }
47
+ onChange={ e => {
48
+ if ( ! settings.bubble ) {
49
+ settings.bubble = {};
50
+ }
51
+ settings.bubble.opacity = e;
52
+ this.props.edit( settings );
53
+ } }
54
+ />
55
+
56
+ <BaseControl
57
+ label={ __( 'Stroke Color' ) }
58
+ >
59
+ <ColorPalette
60
+ value={ settings.bubble.stroke }
61
+ onChange={ e => {
62
+ if ( ! settings.bubble ) {
63
+ settings.bubble = {};
64
+ }
65
+ settings.bubble.stroke = e;
66
+ this.props.edit( settings );
67
+ } }
68
+ />
69
+ </BaseControl>
70
+
71
+ <CheckboxControl
72
+ label={ __( 'Sort Bubbles by Size' ) }
73
+ help={ __( '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.' ) }
74
+ checked={ isChecked( settings, 'sortBubblesBySize' ) }
75
+ onChange={ e => {
76
+ settings.sortBubblesBySize = e;
77
+ this.props.edit( settings );
78
+ } }
79
+ />
80
+
81
+ <TextControl
82
+ label={ __( 'Size (max)' ) }
83
+ help={ __( 'The size value (as appears in the chart data) to be mapped to sizeAxis.maxSize. Larger values will be cropped to this value.' ) }
84
+ type="number"
85
+ step="1"
86
+ value={ settings.sizeAxis.maxValue }
87
+ onChange={ e => {
88
+ if ( ! settings.sizeAxis ) {
89
+ settings.sizeAxis = {};
90
+ }
91
+ settings.sizeAxis.maxValue = e;
92
+ this.props.edit( settings );
93
+ } }
94
+ />
95
+
96
+ <TextControl
97
+ label={ __( 'Size (min)' ) }
98
+ help={ __( 'The size value (as appears in the chart data) to be mapped to sizeAxis.minSize. Smaller values will be cropped to this value.' ) }
99
+ type="number"
100
+ step="1"
101
+ value={ settings.sizeAxis.minValue }
102
+ onChange={ e => {
103
+ if ( ! settings.sizeAxis ) {
104
+ settings.sizeAxis = {};
105
+ }
106
+ settings.sizeAxis.minValue = e;
107
+ this.props.edit( settings );
108
+ } }
109
+ />
110
+
111
+ </PanelBody>
112
+ );
113
+ }
114
+ }
115
+
116
+ export default BubbleSettings;
classes/Visualizer/Gutenberg/src/Components/Sidebar/FrontendActions.js CHANGED
@@ -31,6 +31,7 @@ class FrontendActions extends Component {
31
  render() {
32
 
33
  const settings = this.props.chart['visualizer-settings'];
 
34
 
35
  return (
36
  <PanelBody
@@ -111,6 +112,25 @@ class FrontendActions extends Component {
111
  } }
112
  />
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  </Fragment>
115
 
116
  ) }
31
  render() {
32
 
33
  const settings = this.props.chart['visualizer-settings'];
34
+ const type = this.props.chart['visualizer-chart-type'];
35
 
36
  return (
37
  <PanelBody
112
  } }
113
  />
114
 
115
+ { ( -1 >= [ 'dataTable', 'tabular', 'gauge', 'table' ].indexOf( type ) ) && (
116
+ <CheckboxControl
117
+ label={ __( 'Download Image' ) }
118
+ help={ __( 'To download the chart as an image.' ) }
119
+ checked={ ( 0 <= settings.actions.indexOf( 'image' ) ) }
120
+ onChange={ e => {
121
+ if ( 0 <= settings.actions.indexOf( 'image' ) ) {
122
+ const index = settings.actions.indexOf( 'image' );
123
+ if ( -1 !== index ) {
124
+ settings.actions.splice( index, 1 );
125
+ }
126
+ } else {
127
+ settings.actions.push( 'image' );
128
+ }
129
+ this.props.edit( settings );
130
+ } }
131
+ />
132
+ ) }
133
+
134
  </Fragment>
135
 
136
  ) }
classes/Visualizer/Gutenberg/src/Components/Sidebar/GeneralSettings.js CHANGED
@@ -230,7 +230,7 @@ class GeneralSettings extends Component {
230
  </PanelBody>
231
  ) }
232
 
233
- { ( -1 >= [ 'table', 'gauge', 'geo', 'dataTable' ].indexOf( type ) ) && (
234
  <PanelBody
235
  title={ __( 'Tooltip' ) }
236
  className="visualizer-inner-sections"
230
  </PanelBody>
231
  ) }
232
 
233
+ { ( -1 >= [ 'table', 'gauge', 'geo', 'dataTable', 'timeline' ].indexOf( type ) ) && (
234
  <PanelBody
235
  title={ __( 'Tooltip' ) }
236
  className="visualizer-inner-sections"
classes/Visualizer/Gutenberg/src/Editor.js CHANGED
@@ -29,6 +29,7 @@ const {
29
  ButtonGroup,
30
  Dashicon,
31
  Placeholder,
 
32
  Spinner
33
  } = wp.components;
34
 
@@ -78,11 +79,20 @@ class Editor extends Component {
78
 
79
  // Fetch review again if block loaded after saving.
80
  if ( this.props.attributes.id ) {
81
- let result = await apiFetch({ path: `wp/v2/visualizer/${this.props.attributes.id}` });
82
-
83
- this.setState({
84
- chart: result['chart_data']
85
- });
 
 
 
 
 
 
 
 
 
86
  }
87
  }
88
 
@@ -311,10 +321,11 @@ class Editor extends Component {
311
  });
312
  }
313
 
314
- editChartData( chartData, type ) {
315
  let chart = { ...this.state.chart };
316
  let series = [];
317
  let settings = { ...chart['visualizer-settings'] };
 
318
  chartData[0].map( ( i, index ) => {
319
  series[index] = {
320
  label: i,
@@ -327,30 +338,41 @@ class Editor extends Component {
327
  let map = series;
328
  let fieldName = 'series';
329
 
330
- if ( 'pie' === chart['visualizer-chart-type']) {
331
  map = chartData;
332
  fieldName = 'slices';
333
- }
 
 
 
 
 
 
 
 
 
 
 
334
 
335
  map.map( ( i, index ) => {
336
- if ( 'pie' !== chart['visualizer-chart-type'] && 0 === index ) {
337
- return;
338
  }
339
 
340
- const seriesIndex = 'pie' !== chart['visualizer-chart-type'] ? index - 1 : index;
341
 
342
  if ( settings[fieldName][seriesIndex] === undefined ) {
343
- settings[fieldName][seriesIndex] = {};
344
  settings[fieldName][seriesIndex].temp = 1;
345
- }
346
  });
347
 
348
  settings[fieldName] = settings[fieldName].filter( ( i, index ) => {
349
- const length = 'pie' !== chart['visualizer-chart-type'] ? map.length - 1 : map.length;
350
  return index < length;
351
  });
352
 
353
- chart['visualizer-source'] = type;
354
  chart['visualizer-default-data'] = 0;
355
  chart['visualizer-data'] = chartData;
356
  chart['visualizer-series'] = series;
@@ -379,15 +401,18 @@ class Editor extends Component {
379
  fieldName = 'slices';
380
  }
381
 
382
- Object.keys( data['visualizer-settings'][fieldName])
383
- .map( i => {
384
- if ( data['visualizer-settings'][fieldName][i] !== undefined ) {
385
- if ( data['visualizer-settings'][fieldName][i].temp !== undefined ) {
386
- delete data['visualizer-settings'][fieldName][i].temp;
387
- }
388
- }
389
- }
390
- );
 
 
 
391
 
392
  apiRequest({ path: `/visualizer/v1/update-chart?id=${ this.props.attributes.id }`, method: 'POST', data: data }).then(
393
  ( data ) => {
@@ -406,6 +431,18 @@ class Editor extends Component {
406
  }
407
 
408
  render() {
 
 
 
 
 
 
 
 
 
 
 
 
409
  if ( 'renderChart' === this.state.route && null !== this.state.chart ) {
410
  return (
411
  <ChartRender
@@ -534,6 +571,7 @@ class Editor extends Component {
534
  <Button
535
  isDefault
536
  isLarge
 
537
  onClick={ () => {
538
  this.setState({ route: 'renderChart' });
539
  this.props.setAttributes({ route: 'renderChart' });
@@ -544,6 +582,7 @@ class Editor extends Component {
544
  <Button
545
  isPrimary
546
  isLarge
 
547
  isBusy={ 'updateChart' === this.state.isLoading }
548
  disabled={ 'updateChart' === this.state.isLoading }
549
  onClick={ this.updateChart }
29
  ButtonGroup,
30
  Dashicon,
31
  Placeholder,
32
+ Notice,
33
  Spinner
34
  } = wp.components;
35
 
79
 
80
  // Fetch review again if block loaded after saving.
81
  if ( this.props.attributes.id ) {
82
+ let result = await apiFetch({ path: `wp/v2/visualizer/${this.props.attributes.id}` }).catch( function( error ) {
83
+ });
84
+
85
+ if ( result ) {
86
+ this.setState({
87
+ chart: result['chart_data']
88
+ });
89
+ } else {
90
+
91
+ // if the chart is not found.
92
+ this.setState({
93
+ route: 'error'
94
+ });
95
+ }
96
  }
97
  }
98
 
321
  });
322
  }
323
 
324
+ editChartData( chartData, source ) {
325
  let chart = { ...this.state.chart };
326
  let series = [];
327
  let settings = { ...chart['visualizer-settings'] };
328
+ let type = chart['visualizer-chart-type'];
329
  chartData[0].map( ( i, index ) => {
330
  series[index] = {
331
  label: i,
338
  let map = series;
339
  let fieldName = 'series';
340
 
341
+ if ( 'pie' === type ) {
342
  map = chartData;
343
  fieldName = 'slices';
344
+
345
+ // pie charts are finicky about a number being a number
346
+ // and editing a number makes it a string
347
+ // so let's convert it back into a number.
348
+ chartData.map( ( i, index ) => {
349
+ switch ( series[1].type ) {
350
+ case 'number':
351
+ i[1] = parseFloat( i[1]);
352
+ break;
353
+ }
354
+ });
355
+ }
356
 
357
  map.map( ( i, index ) => {
358
+ if ( 'pie' !== type && 0 === index ) {
359
+ return;
360
  }
361
 
362
+ const seriesIndex = 'pie' !== type ? index - 1 : index;
363
 
364
  if ( settings[fieldName][seriesIndex] === undefined ) {
365
+ settings[fieldName][seriesIndex] = {};
366
  settings[fieldName][seriesIndex].temp = 1;
367
+ }
368
  });
369
 
370
  settings[fieldName] = settings[fieldName].filter( ( i, index ) => {
371
+ const length = -1 >= [ 'pie', 'tabular', 'dataTable' ].indexOf( type ) ? map.length - 1 : map.length;
372
  return index < length;
373
  });
374
 
375
+ chart['visualizer-source'] = source;
376
  chart['visualizer-default-data'] = 0;
377
  chart['visualizer-data'] = chartData;
378
  chart['visualizer-series'] = series;
401
  fieldName = 'slices';
402
  }
403
 
404
+ // no series for bubble and timeline charts.
405
+ if ( -1 >= [ 'bubble', 'timeline' ].indexOf( data['visualizer-chart-type']) ) {
406
+ Object.keys( data['visualizer-settings'][fieldName])
407
+ .map( i => {
408
+ if ( data['visualizer-settings'][fieldName][i] !== undefined ) {
409
+ if ( data['visualizer-settings'][fieldName][i].temp !== undefined ) {
410
+ delete data['visualizer-settings'][fieldName][i].temp;
411
+ }
412
+ }
413
+ }
414
+ );
415
+ }
416
 
417
  apiRequest({ path: `/visualizer/v1/update-chart?id=${ this.props.attributes.id }`, method: 'POST', data: data }).then(
418
  ( data ) => {
431
  }
432
 
433
  render() {
434
+ if ( 'error' === this.state.route ) {
435
+ return (
436
+ <Notice
437
+ status="error"
438
+ isDismissible={ false }
439
+ >
440
+ <Dashicon icon="chart-pie" />
441
+ { __( 'This chart is not available; it might have been deleted. Please delete this block and resubmit your chart.' ) }
442
+ </Notice>
443
+ );
444
+ }
445
+
446
  if ( 'renderChart' === this.state.route && null !== this.state.chart ) {
447
  return (
448
  <ChartRender
571
  <Button
572
  isDefault
573
  isLarge
574
+ className="visualizer-bttn-done"
575
  onClick={ () => {
576
  this.setState({ route: 'renderChart' });
577
  this.props.setAttributes({ route: 'renderChart' });
582
  <Button
583
  isPrimary
584
  isLarge
585
+ className="visualizer-bttn-save"
586
  isBusy={ 'updateChart' === this.state.isLoading }
587
  disabled={ 'updateChart' === this.state.isLoading }
588
  onClick={ this.updateChart }
classes/Visualizer/Gutenberg/src/utils.js CHANGED
@@ -92,3 +92,8 @@ export const CSVToArray = ( strData, strDelimiter ) => {
92
 
93
  return ( arrData );
94
  };
 
 
 
 
 
92
 
93
  return ( arrData );
94
  };
95
+
96
+
97
+ export const isChecked = ( settings, param ) => {
98
+ return true === settings[param] || 'true' === settings[param] || '1' === settings[param] || 1 === settings[param];
99
+ };
classes/Visualizer/Module.php CHANGED
@@ -395,6 +395,20 @@ class Visualizer_Module {
395
  );
396
  }
397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
398
  /**
399
  * Undo revisions for the chart, and if necessary, restore the earliest version.
400
  *
@@ -402,7 +416,9 @@ class Visualizer_Module {
402
  */
403
  public final function undoRevisions( $chart_id, $restore = false ) {
404
  do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'undoRevisions for %d with%s restore', $chart_id, ( $restore ? '' : 'out' ) ), 'debug', __FILE__, __LINE__ );
405
-
 
 
406
  $revisions = wp_get_post_revisions( $chart_id, array( 'order' => 'ASC' ) );
407
  if ( count( $revisions ) > 1 ) {
408
  $revision_ids = array_keys( $revisions );
@@ -410,7 +426,7 @@ class Visualizer_Module {
410
  do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'found %d revisions = %s', count( $revisions ), print_r( $revision_ids, true ) ), 'debug', __FILE__, __LINE__ );
411
 
412
  // when we restore, a new revision is likely to be created. so, let's disable revisions for the time being.
413
- add_filter( 'wp_revisions_to_keep', '__return_false' );
414
 
415
  if ( $restore ) {
416
  // restore to the oldest one i.e. the first one.
@@ -431,8 +447,11 @@ class Visualizer_Module {
431
  * If existing revisions exist for the chart, restore the earliest version and then create a new revision to initiate editing.
432
  */
433
  public final function handleExistingRevisions( $chart_id, $chart ) {
434
- do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'handleExistingRevisions for %d', $chart_id ), 'debug', __FILE__, __LINE__ );
435
 
 
 
 
 
436
  // undo revisions.
437
  $revisions_found = $this->undoRevisions( $chart_id, true );
438
 
395
  );
396
  }
397
 
398
+ /**
399
+ * Disable revisions temporarily for visualizer post type.
400
+ */
401
+ protected final function disableRevisionsTemporarily() {
402
+ add_filter(
403
+ 'wp_revisions_to_keep', function( $num, $post ) {
404
+ if ( $post->post_type === Visualizer_Plugin::CPT_VISUALIZER ) {
405
+ return 0;
406
+ }
407
+ return $num;
408
+ }, 10, 2
409
+ );
410
+ }
411
+
412
  /**
413
  * Undo revisions for the chart, and if necessary, restore the earliest version.
414
  *
416
  */
417
  public final function undoRevisions( $chart_id, $restore = false ) {
418
  do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'undoRevisions for %d with%s restore', $chart_id, ( $restore ? '' : 'out' ) ), 'debug', __FILE__, __LINE__ );
419
+ if ( get_post_type( $chart_id ) !== Visualizer_Plugin::CPT_VISUALIZER ) {
420
+ return false;
421
+ }
422
  $revisions = wp_get_post_revisions( $chart_id, array( 'order' => 'ASC' ) );
423
  if ( count( $revisions ) > 1 ) {
424
  $revision_ids = array_keys( $revisions );
426
  do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'found %d revisions = %s', count( $revisions ), print_r( $revision_ids, true ) ), 'debug', __FILE__, __LINE__ );
427
 
428
  // when we restore, a new revision is likely to be created. so, let's disable revisions for the time being.
429
+ $this->disableRevisionsTemporarily();
430
 
431
  if ( $restore ) {
432
  // restore to the oldest one i.e. the first one.
447
  * If existing revisions exist for the chart, restore the earliest version and then create a new revision to initiate editing.
448
  */
449
  public final function handleExistingRevisions( $chart_id, $chart ) {
 
450
 
451
+ do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'handleExistingRevisions for %d', $chart_id ), 'debug', __FILE__, __LINE__ );
452
+ if ( get_post_type( $chart_id ) !== Visualizer_Plugin::CPT_VISUALIZER ) {
453
+ return $chart_id;
454
+ }
455
  // undo revisions.
456
  $revisions_found = $this->undoRevisions( $chart_id, true );
457
 
classes/Visualizer/Module/Admin.php CHANGED
@@ -978,6 +978,9 @@ class Visualizer_Module_Admin extends Visualizer_Module {
978
  ),
979
  'page_type' => 'library',
980
  'is_front' => false,
 
 
 
981
  )
982
  );
983
  // render library page
978
  ),
979
  'page_type' => 'library',
980
  'is_front' => false,
981
+ 'i10n' => array(
982
+ 'conflict' => __( 'We have detected a potential conflict with another component that prevents Visualizer from functioning properly. Please disable any of the following components if they are activated on your instance: Modern Events Calendar plugin, Acronix plugin. In case the aforementioned components are not activated or you continue to see this error message, please disable all other plugins and enable them one by one to find out the component that is causing the conflict.', 'visualizer' ),
983
+ ),
984
  )
985
  );
986
  // render library page
classes/Visualizer/Module/Chart.php CHANGED
@@ -684,7 +684,8 @@ class Visualizer_Module_Chart extends Visualizer_Module {
684
 
685
  // ensure that a revision is not created. If a revision is created it will have the proper data and the parent of the revision will have default data.
686
  // we do not want any difference in data so disable revisions temporarily.
687
- add_filter( 'wp_revisions_to_keep', '__return_false' );
 
688
  wp_update_post( $this->_chart->to_array() );
689
  }
690
  // save meta data only when it is NOT being canceled.
684
 
685
  // ensure that a revision is not created. If a revision is created it will have the proper data and the parent of the revision will have default data.
686
  // we do not want any difference in data so disable revisions temporarily.
687
+ $this->disableRevisionsTemporarily();
688
+
689
  wp_update_post( $this->_chart->to_array() );
690
  }
691
  // save meta data only when it is NOT being canceled.
classes/Visualizer/Module/Frontend.php CHANGED
@@ -120,15 +120,40 @@ class Visualizer_Module_Frontend extends Visualizer_Module {
120
  * @access private
121
  */
122
  private function get_actions() {
123
- return apply_filters(
124
  'visualizer_action_buttons',
125
  array(
126
- 'print' => __( 'Print', 'visualizer' ),
127
- 'csv' => __( 'CSV', 'visualizer' ),
128
- 'xls' => __( 'Excel', 'visualizer' ),
129
- 'copy' => __( 'Copy', 'visualizer' ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  )
131
  );
 
 
 
 
 
 
 
 
 
132
  }
133
 
134
  /**
@@ -161,6 +186,21 @@ class Visualizer_Module_Frontend extends Visualizer_Module {
161
  case 'xls':
162
  $data = $this->_getDataAs( $chart_id, 'xls' );
163
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  default:
165
  $data = apply_filters( 'visualizer_action_data', $data, $chart_id, $type, $params, $this );
166
  break;
@@ -296,8 +336,9 @@ class Visualizer_Module_Frontend extends Visualizer_Module {
296
  $key = $array[0];
297
  $mime = end( $array );
298
  }
299
- $label = $actions[ $key ];
300
- $actions_div .= '<a href="#" class="visualizer-action visualizer-action-' . $key . '" data-visualizer-type="' . $key . '" data-visualizer-chart-id="' . $atts['id'] . '" data-visualizer-container-id="' . $id . '" data-visualizer-mime="' . $mime . '" title="' . $label . '" ';
 
301
 
302
  if ( 'copy' === $key ) {
303
  $copy = $this->_getDataAs( $atts['id'], 'csv' );
@@ -334,7 +375,7 @@ class Visualizer_Module_Frontend extends Visualizer_Module {
334
  'map_api_key' => get_option( 'visualizer-map-api-key' ),
335
  'rest_url' => version_compare( $wp_version, '4.7.0', '>=' ) ? rest_url( 'visualizer/v' . VISUALIZER_REST_VERSION . '/action/#id#/#type#/' ) : '',
336
  'i10n' => array(
337
- 'copied' => __( 'Copied!', 'visualizer' ),
338
  ),
339
  'page_type' => 'frontend',
340
  'is_front' => true,
120
  * @access private
121
  */
122
  private function get_actions() {
123
+ $actions = apply_filters(
124
  'visualizer_action_buttons',
125
  array(
126
+ 'print' => array(
127
+ 'label' => esc_html__( 'Print', 'visualizer' ),
128
+ 'title' => esc_html__( 'Print Chart', 'visualizer' ),
129
+ ),
130
+ 'csv' => array(
131
+ 'label' => esc_html__( 'CSV', 'visualizer' ),
132
+ 'title' => esc_html__( 'Download as a CSV', 'visualizer' ),
133
+ ),
134
+ 'xls' => array(
135
+ 'label' => esc_html__( 'Excel', 'visualizer' ),
136
+ 'title' => esc_html__( 'Download as a spreadsheet', 'visualizer' ),
137
+ ),
138
+ 'copy' => array(
139
+ 'label' => esc_html__( 'Copy', 'visualizer' ),
140
+ 'title' => esc_html__( 'Copy data', 'visualizer' ),
141
+ ),
142
+ 'image' => array(
143
+ 'label' => esc_html__( 'Download', 'visualizer' ),
144
+ 'title' => esc_html__( 'Download as an image', 'visualizer' ),
145
+ ),
146
  )
147
  );
148
+
149
+ // backward compatibility before label and title attributes were introduced.
150
+ if ( isset( $actions['edit'] ) && is_string( $actions['edit'] ) ) {
151
+ $actions['edit'] = array(
152
+ 'label' => esc_html__( 'Edit', 'visualizer' ),
153
+ 'title' => esc_html__( 'Edit data', 'visualizer' ),
154
+ );
155
+ }
156
+ return $actions;
157
  }
158
 
159
  /**
186
  case 'xls':
187
  $data = $this->_getDataAs( $chart_id, 'xls' );
188
  break;
189
+ case 'image':
190
+ $settings = get_post_meta( $chart_id, Visualizer_Plugin::CF_SETTINGS, true );
191
+ $title = 'visualizer#' . $chart_id;
192
+ if ( ! empty( $settings['title'] ) ) {
193
+ $title = $settings['title'];
194
+ }
195
+ // for ChartJS, title is an array.
196
+ if ( is_array( $title ) && isset( $title['text'] ) ) {
197
+ $title = $title['text'];
198
+ }
199
+ if ( empty( $title ) ) {
200
+ $title = 'visualizer#' . $chart_id;
201
+ }
202
+ $data = array( 'name' => $title );
203
+ break;
204
  default:
205
  $data = apply_filters( 'visualizer_action_data', $data, $chart_id, $type, $params, $this );
206
  break;
336
  $key = $array[0];
337
  $mime = end( $array );
338
  }
339
+ $label = $actions[ $key ]['label'];
340
+ $title = $actions[ $key ]['title'];
341
+ $actions_div .= sprintf( '<a href="#" class="visualizer-action visualizer-action-%s" data-visualizer-type="%s" data-visualizer-chart-id="%s" data-visualizer-container-id="%s" data-visualizer-mime="%s" title="%s"', $key, $key, $atts['id'], $id, $mime, $title );
342
 
343
  if ( 'copy' === $key ) {
344
  $copy = $this->_getDataAs( $atts['id'], 'csv' );
375
  'map_api_key' => get_option( 'visualizer-map-api-key' ),
376
  'rest_url' => version_compare( $wp_version, '4.7.0', '>=' ) ? rest_url( 'visualizer/v' . VISUALIZER_REST_VERSION . '/action/#id#/#type#/' ) : '',
377
  'i10n' => array(
378
+ 'copied' => __( 'The data has been copied to your clipboard. Hit Ctrl-V/Cmd-V in your spreadsheet editor to paste the data.', 'visualizer' ),
379
  ),
380
  'page_type' => 'frontend',
381
  'is_front' => true,
classes/Visualizer/Module/Setup.php CHANGED
@@ -298,7 +298,7 @@ class Visualizer_Module_Setup extends Visualizer_Module {
298
 
299
  $error = $source->get_error();
300
  if ( empty( $error ) ) {
301
- add_filter( 'wp_revisions_to_keep', '__return_false' );
302
  if ( $load_series ) {
303
  update_post_meta( $chart_id, Visualizer_Plugin::CF_SERIES, $source->getSeries() );
304
  }
298
 
299
  $error = $source->get_error();
300
  if ( empty( $error ) ) {
301
+ $this->disableRevisionsTemporarily();
302
  if ( $load_series ) {
303
  update_post_meta( $chart_id, Visualizer_Plugin::CF_SERIES, $source->getSeries() );
304
  }
classes/Visualizer/Plugin.php CHANGED
@@ -28,7 +28,7 @@
28
  class Visualizer_Plugin {
29
 
30
  const NAME = 'visualizer';
31
- const VERSION = '3.4.3';
32
 
33
  // custom post types
34
  const CPT_VISUALIZER = 'visualizer';
28
  class Visualizer_Plugin {
29
 
30
  const NAME = 'visualizer';
31
+ const VERSION = '3.4.4';
32
 
33
  // custom post types
34
  const CPT_VISUALIZER = 'visualizer';
classes/Visualizer/Render.php CHANGED
@@ -171,4 +171,50 @@ abstract class Visualizer_Render {
171
  return false;
172
  }
173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  }
171
  return false;
172
  }
173
 
174
+ /**
175
+ * Gets the type of chart that is being rendered.
176
+ *
177
+ * This is useful if some type-specific functionality needs to be added.
178
+ *
179
+ * @since ?
180
+ *
181
+ * @access protected
182
+ * @return string
183
+ */
184
+ protected function get_chart_type( $with_library = false ) {
185
+ $lib_type = str_replace( 'Visualizer_Render_Sidebar_Type_', '', get_class( $this ) );
186
+ if ( $with_library ) {
187
+ return $lib_type;
188
+ }
189
+
190
+ $array = explode( '_', $lib_type );
191
+ return end( $array );
192
+ }
193
+
194
+ /**
195
+ * Determines if the type of chart can have a particular action.
196
+ *
197
+ * @since ?
198
+ *
199
+ * @access protected
200
+ * @return bool
201
+ */
202
+ protected function can_chart_have_action( $action, $chart_id = null ) {
203
+ $type = null;
204
+ if ( ! $chart_id ) {
205
+ $type = $this->get_chart_type( false );
206
+ } else {
207
+ $type = get_post_meta( $chart_id, Visualizer_Plugin::CF_CHART_TYPE, true );
208
+ $type = ucwords( $type );
209
+ }
210
+
211
+ switch ( $action ) {
212
+ case 'image':
213
+ return ! in_array( $type, array( 'Gauge', 'Tabular', 'DataTable', 'Table' ), true );
214
+ }
215
+
216
+ return true;
217
+ }
218
+
219
+
220
  }
classes/Visualizer/Render/Library.php CHANGED
@@ -336,6 +336,9 @@ class Visualizer_Render_Library extends Visualizer_Render {
336
  echo '<a class="visualizer-chart-action visualizer-chart-clone" href="', $clone_url, '" title="', esc_attr__( 'Clone', 'visualizer' ), '"></a>';
337
  echo '<a class="visualizer-chart-action visualizer-chart-edit" href="javascript:;" title="', esc_attr__( 'Edit', 'visualizer' ), '" data-chart="', $chart_id, '"></a>';
338
  echo '<a class="visualizer-chart-action visualizer-chart-export" href="javascript:;" title="', esc_attr__( 'Export', 'visualizer' ), '" data-chart="', $export_link, '"></a>';
 
 
 
339
  echo '<span class="visualizer-chart-shortcode" title="', esc_attr__( 'Click to select', 'visualizer' ), '">';
340
  echo '&nbsp;[visualizer id=&quot;', $chart_id, '&quot;]&nbsp;';
341
  echo '</span>';
336
  echo '<a class="visualizer-chart-action visualizer-chart-clone" href="', $clone_url, '" title="', esc_attr__( 'Clone', 'visualizer' ), '"></a>';
337
  echo '<a class="visualizer-chart-action visualizer-chart-edit" href="javascript:;" title="', esc_attr__( 'Edit', 'visualizer' ), '" data-chart="', $chart_id, '"></a>';
338
  echo '<a class="visualizer-chart-action visualizer-chart-export" href="javascript:;" title="', esc_attr__( 'Export', 'visualizer' ), '" data-chart="', $export_link, '"></a>';
339
+ if ( $this->can_chart_have_action( 'image', $chart_id ) ) {
340
+ echo '<a class="visualizer-chart-action visualizer-chart-image" href="javascript:;" title="', esc_attr__( 'Download as image', 'visualizer' ), '" data-chart="visualizer-', $chart_id, '" data-chart-title="', $title, '"></a>';
341
+ }
342
  echo '<span class="visualizer-chart-shortcode" title="', esc_attr__( 'Click to select', 'visualizer' ), '">';
343
  echo '&nbsp;[visualizer id=&quot;', $chart_id, '&quot;]&nbsp;';
344
  echo '</span>';
classes/Visualizer/Render/Sidebar.php CHANGED
@@ -63,26 +63,6 @@ abstract class Visualizer_Render_Sidebar extends Visualizer_Render {
63
  */
64
  protected $_yesno;
65
 
66
- /**
67
- * The array of available legend positions.
68
- *
69
- * @since 1.0.0
70
- *
71
- * @access protected
72
- * @var array
73
- */
74
- protected $_legendPositions;
75
-
76
- /**
77
- * The array of available alignments.
78
- *
79
- * @since 1.0.0
80
- *
81
- * @access protected
82
- * @var array
83
- */
84
- protected $_alignments;
85
-
86
  /**
87
  * Whether this chart supports animation or not.
88
  *
@@ -110,23 +90,6 @@ abstract class Visualizer_Render_Sidebar extends Visualizer_Render {
110
  public function __construct( $data = array() ) {
111
  parent::__construct( $data );
112
 
113
- $this->_legendPositions = array(
114
- '' => '',
115
- 'left' => esc_html__( 'Left of the chart', 'visualizer' ),
116
- 'right' => esc_html__( 'Right of the chart', 'visualizer' ),
117
- 'top' => esc_html__( 'Above the chart', 'visualizer' ),
118
- 'bottom' => esc_html__( 'Below the chart', 'visualizer' ),
119
- 'in' => esc_html__( 'Inside the chart', 'visualizer' ),
120
- 'none' => esc_html__( 'Omit the legend', 'visualizer' ),
121
- );
122
-
123
- $this->_alignments = array(
124
- '' => '',
125
- 'start' => esc_html__( 'Aligned to the start of the allocated area', 'visualizer' ),
126
- 'center' => esc_html__( 'Centered in the allocated area', 'visualizer' ),
127
- 'end' => esc_html__( 'Aligned to the end of the allocated area', 'visualizer' ),
128
- );
129
-
130
  $this->_yesno = array(
131
  '' => '',
132
  '1' => esc_html__( 'Yes', 'visualizer' ),
@@ -260,6 +223,17 @@ abstract class Visualizer_Render_Sidebar extends Visualizer_Render {
260
  $disable_actions ? '<span class="viz-section-error">' . esc_html__( 'Upgrade to at least WordPress 4.7 to use this.', 'visualizer' ) . '</span>' : esc_html__( 'To enable copying the data to the clipboard.', 'visualizer' ),
261
  $disable_actions
262
  );
 
 
 
 
 
 
 
 
 
 
 
263
  self::_renderSectionEnd();
264
  }
265
 
@@ -280,282 +254,6 @@ abstract class Visualizer_Render_Sidebar extends Visualizer_Render {
280
  return class_exists( 'PhpOffice\PhpSpreadsheet\Spreadsheet' ) && extension_loaded( 'zip' ) && extension_loaded( 'xml' ) && extension_loaded( 'fileinfo' );
281
  }
282
 
283
- /**
284
- * Renders chart general settings group.
285
- *
286
- * @since 1.0.0
287
- *
288
- * @access protected
289
- */
290
- protected function _renderGeneralSettings() {
291
- self::_renderGroupStart( esc_html__( 'General Settings', 'visualizer' ) );
292
- self::_renderSectionStart();
293
- self::_renderSectionDescription( esc_html__( 'Configure title, font styles, tooltip, legend and else settings for the chart.', 'visualizer' ) );
294
- self::_renderSectionEnd();
295
-
296
- self::_renderSectionStart( esc_html__( 'Title', 'visualizer' ), false );
297
- $this->_renderChartTitleSettings();
298
- self::_renderSectionEnd();
299
-
300
- self::_renderSectionStart( esc_html__( 'Font Styles', 'visualizer' ), false );
301
- echo '<div class="viz-section-item">';
302
- echo '<a class="more-info" href="javascript:;">[?]</a>';
303
- echo '<b>', esc_html__( 'Family And Size', 'visualizer' ), '</b>';
304
-
305
- echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
306
- echo '<tr>';
307
- echo '<td class="viz-section-table-column">';
308
- echo '<select name="fontName" class="control-select">';
309
- echo '<option></option>';
310
- foreach ( self::$_fontFamilies as $font => $label ) {
311
- echo '<option value="', $font, '"', selected( $font, $this->fontName, false ), '>';
312
- echo $label;
313
- echo '</option>';
314
- }
315
- echo '</select>';
316
- echo '</td>';
317
- echo '<td class="viz-section-table-column">';
318
- echo '<select name="fontSize" class="control-select">';
319
- echo '<option></option>';
320
- for ( $i = 7; $i <= 20; $i++ ) {
321
- echo '<option value="', $i, '"', selected( $i, $this->fontSize, false ), '>', $i, '</option>';
322
- }
323
- echo '</select>';
324
- echo '</td>';
325
- echo '</tr>';
326
- echo '</table>';
327
-
328
- echo '<p class="viz-section-description">';
329
- esc_html_e( 'The default font family and size for all text in the chart.', 'visualizer' );
330
- echo '</p>';
331
- echo '</div>';
332
- self::_renderSectionEnd();
333
-
334
- self::_renderSectionStart( esc_html__( 'Legend', 'visualizer' ), false );
335
- self::_renderSelectItem(
336
- esc_html__( 'Position', 'visualizer' ),
337
- 'legend[position]',
338
- $this->legend['position'],
339
- $this->_legendPositions,
340
- esc_html__( 'Determines where to place the legend, compared to the chart area.', 'visualizer' )
341
- );
342
-
343
- self::_renderSelectItem(
344
- esc_html__( 'Alignment', 'visualizer' ),
345
- 'legend[alignment]',
346
- $this->legend['alignment'],
347
- $this->_alignments,
348
- esc_html__( 'Determines the alignment of the legend.', 'visualizer' )
349
- );
350
-
351
- self::_renderColorPickerItem(
352
- esc_html__( 'Font Color', 'visualizer' ),
353
- 'legend[textStyle][color]',
354
- isset( $this->legend['textStyle']['color'] ) ? $this->legend['textStyle']['color'] : null,
355
- '#000'
356
- );
357
- self::_renderSectionEnd();
358
-
359
- self::_renderSectionStart( esc_html__( 'Tooltip', 'visualizer' ), false );
360
- $this->_renderTooltipSettigns();
361
- self::_renderSectionEnd();
362
-
363
- $this->_renderAnimationSettings();
364
-
365
- do_action( 'visualizer_chart_settings', get_class( $this ), $this->_data, 'general', array( 'generic' => true ) );
366
-
367
- self::_renderGroupEnd();
368
- }
369
-
370
- /**
371
- * Renders animation settings section.
372
- *
373
- * @access protected
374
- */
375
- protected function _renderAnimationSettings() {
376
- if ( ! $this->_supportsAnimation ) {
377
- return;
378
- }
379
-
380
- self::_renderSectionStart( esc_html__( 'Animation', 'visualizer' ), false );
381
-
382
- self::_renderCheckboxItem(
383
- esc_html__( 'Animate on startup', 'visualizer' ),
384
- 'animation[startup]',
385
- isset( $this->animation['startup'] ) ? $this->animation['startup'] : 0,
386
- true,
387
- esc_html__( 'Determines if the chart will animate on the initial draw.', 'visualizer' )
388
- );
389
-
390
- self::_renderTextItem(
391
- esc_html__( 'Duration', 'visualizer' ),
392
- 'animation[duration]',
393
- isset( $this->animation['duration'] ) ? $this->animation['duration'] : 0,
394
- esc_html__( 'The duration of the animation, in milliseconds', 'visualizer' ),
395
- 0,
396
- 'number'
397
- );
398
-
399
- self::_renderSelectItem(
400
- esc_html__( 'Easing', 'visualizer' ),
401
- 'animation[easing]',
402
- isset( $this->animation['easing'] ) ? $this->animation['easing'] : null,
403
- array(
404
- 'linear' => esc_html__( 'Constant speed', 'visualizer' ),
405
- 'in' => esc_html__( 'Start slow and speed up', 'visualizer' ),
406
- 'out' => esc_html__( 'Start fast and slow down', 'visualizer' ),
407
- 'inAndOut' => esc_html__( 'Start slow, speed up, then slow down', 'visualizer' ),
408
- ),
409
- esc_html__( 'The easing function applied to the animation.', 'visualizer' )
410
- );
411
-
412
- self::_renderSectionEnd();
413
-
414
- }
415
-
416
- /**
417
- * Renders tooltip settings section.
418
- *
419
- * @since 1.4.0
420
- *
421
- * @access protected
422
- */
423
- protected function _renderTooltipSettigns() {
424
- self::_renderSelectItem(
425
- esc_html__( 'Trigger', 'visualizer' ),
426
- 'tooltip[trigger]',
427
- isset( $this->tooltip['trigger'] ) ? $this->tooltip['trigger'] : null,
428
- array(
429
- '' => '',
430
- 'focus' => esc_html__( 'The tooltip will be displayed when the user hovers over an element', 'visualizer' ),
431
- 'selection' => esc_html__( 'The tooltip will be displayed when the user selects an element', 'visualizer' ),
432
- 'none' => esc_html__( 'The tooltip will not be displayed', 'visualizer' ),
433
- ),
434
- esc_html__( 'Determines the user interaction that causes the tooltip to be displayed.', 'visualizer' )
435
- );
436
-
437
- self::_renderSelectItem(
438
- esc_html__( 'Show Color Code', 'visualizer' ),
439
- 'tooltip[showColorCode]',
440
- isset( $this->tooltip['showColorCode'] ) ? $this->tooltip['showColorCode'] : null,
441
- $this->_yesno,
442
- esc_html__( 'If set to yes, will show colored squares next to the slice information in the tooltip.', 'visualizer' )
443
- );
444
- }
445
-
446
- /**
447
- * Renders chart view settings group.
448
- *
449
- * @since 1.0.0
450
- *
451
- * @access protected
452
- */
453
- protected function _renderViewSettings() {
454
- self::_renderGroupStart( esc_html__( 'Chart Size & Placement', 'visualizer' ) );
455
- self::_renderSectionStart( esc_html__( 'Chart Size/Layout', 'visualizer' ), false );
456
- self::_renderSectionDescription( esc_html__( 'Configure the total size of the chart. Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', 'visualizer' ) );
457
-
458
- echo '<div class="viz-section-item">';
459
- echo '<a class="more-info" href="javascript:;">[?]</a>';
460
- echo '<b>', esc_html__( 'Width And Height Of Chart', 'visualizer' ), '</b>';
461
-
462
- echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
463
- echo '<tr>';
464
- echo '<td class="viz-section-table-column">';
465
- echo '<input type="text" name="width" class="control-text" value="', esc_attr( $this->width ), '" placeholder="100%">';
466
- echo '</td>';
467
- echo '<td class="viz-section-table-column">';
468
- echo '<input type="text" name="height" class="control-text" value="', esc_attr( $this->height ), '" placeholder="400">';
469
- echo '</td>';
470
- echo '</tr>';
471
- echo '</table>';
472
-
473
- echo '<p class="viz-section-description">';
474
- esc_html_e( 'Determines the total width and height of the chart. This will only show in the front-end.', 'visualizer' );
475
- echo '</p>';
476
- echo '</div>';
477
-
478
- echo '<div class="viz-section-delimiter"></div>';
479
-
480
- self::_renderSectionDescription( esc_html__( 'Configure the background color for the main area of the chart and the chart border width and color.', 'visualizer' ) );
481
-
482
- self::_renderTextItem(
483
- esc_html__( 'Stroke Width', 'visualizer' ),
484
- 'backgroundColor[strokeWidth]',
485
- isset( $this->backgroundColor['strokeWidth'] ) ? $this->backgroundColor['strokeWidth'] : null,
486
- esc_html__( 'The chart border width in pixels.', 'visualizer' ),
487
- '0'
488
- );
489
-
490
- self::_renderColorPickerItem(
491
- esc_html__( 'Stroke Color', 'visualizer' ),
492
- 'backgroundColor[stroke]',
493
- ! empty( $this->backgroundColor['stroke'] ) ? $this->backgroundColor['stroke'] : null,
494
- '#666'
495
- );
496
-
497
- $background_color = ! empty( $this->backgroundColor['fill'] ) ? $this->backgroundColor['fill'] : null;
498
- self::_renderColorPickerItem(
499
- esc_html__( 'Background Color', 'visualizer' ),
500
- 'backgroundColor[fill]',
501
- $background_color,
502
- '#fff'
503
- );
504
-
505
- echo '<div class="viz-section-item">';
506
- echo '<label>';
507
- echo '<input type="checkbox" class="control-checkbox" name="backgroundColor[fill]" value="transparent"', checked( $background_color, 'transparent', false ), '> ';
508
- esc_html_e( 'Transparent background', 'visualizer' );
509
- echo '</label>';
510
- echo '</div>';
511
- self::_renderSectionEnd();
512
-
513
- self::_renderSectionStart( esc_html__( 'Placement', 'visualizer' ), false );
514
- self::_renderSectionDescription( esc_html__( 'Configure the placement and size of the chart area (where the chart itself is drawn, excluding axis and legends). Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', 'visualizer' ) );
515
-
516
- echo '<div class="viz-section-item">';
517
- echo '<a class="more-info" href="javascript:;">[?]</a>';
518
- echo '<b>', esc_html__( 'Left And Top Margins', 'visualizer' ), '</b>';
519
-
520
- echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
521
- echo '<tr>';
522
- echo '<td class="viz-section-table-column">';
523
- echo '<input type="text" name="chartArea[left]" class="control-text" value="', $this->chartArea['left'] || $this->chartArea['left'] === '0' ? esc_attr( $this->chartArea['left'] ) : '', '" placeholder="20%">';
524
- echo '</td>';
525
- echo '<td class="viz-section-table-column">';
526
- echo '<input type="text" name="chartArea[top]" class="control-text" value="', $this->chartArea['top'] || $this->chartArea['top'] === '0' ? esc_attr( $this->chartArea['top'] ) : '', '" placeholder="20%">';
527
- echo '</td>';
528
- echo '</tr>';
529
- echo '</table>';
530
-
531
- echo '<p class="viz-section-description">';
532
- esc_html_e( 'Determines how far to draw the chart from the left and top borders.', 'visualizer' );
533
- echo '</p>';
534
- echo '</div>';
535
-
536
- echo '<div class="viz-section-item">';
537
- echo '<a class="more-info" href="javascript:;">[?]</a>';
538
- echo '<b>', esc_html__( 'Width And Height Of Chart Area', 'visualizer' ), '</b>';
539
-
540
- echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
541
- echo '<tr>';
542
- echo '<td class="viz-section-table-column">';
543
- echo '<input type="text" name="chartArea[width]" class="control-text" value="', ! empty( $this->chartArea['width'] ) ? esc_attr( $this->chartArea['width'] ) : '', '" placeholder="60%">';
544
- echo '</td>';
545
- echo '<td class="viz-section-table-column">';
546
- echo '<input type="text" name="chartArea[height]" class="control-text" value="', ! empty( $this->chartArea['height'] ) ? esc_attr( $this->chartArea['height'] ) : '', '" placeholder="60%">';
547
- echo '</td>';
548
- echo '</tr>';
549
- echo '</table>';
550
-
551
- echo '<p class="viz-section-description">';
552
- esc_html_e( 'Determines the width and hight of the chart area.', 'visualizer' );
553
- echo '</p>';
554
- echo '</div>';
555
- self::_renderSectionEnd();
556
- self::_renderGroupEnd();
557
- }
558
-
559
  /**
560
  * Renders select item.
561
  *
63
  */
64
  protected $_yesno;
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  /**
67
  * Whether this chart supports animation or not.
68
  *
90
  public function __construct( $data = array() ) {
91
  parent::__construct( $data );
92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  $this->_yesno = array(
94
  '' => '',
95
  '1' => esc_html__( 'Yes', 'visualizer' ),
223
  $disable_actions ? '<span class="viz-section-error">' . esc_html__( 'Upgrade to at least WordPress 4.7 to use this.', 'visualizer' ) . '</span>' : esc_html__( 'To enable copying the data to the clipboard.', 'visualizer' ),
224
  $disable_actions
225
  );
226
+
227
+ // not all charts support downloading as an image.
228
+ $disabled = ! $this->can_chart_have_action( 'image' );
229
+ self::_renderCheckboxItem(
230
+ esc_html__( 'Download Image', 'visualizer' ),
231
+ 'actions[]',
232
+ isset( $this->actions ) && in_array( 'image', $this->actions, true ) ? true : false,
233
+ 'image',
234
+ $disable_actions ? '<span class="viz-section-error">' . esc_html__( 'Upgrade to at least WordPress 4.7 to use this.', 'visualizer' ) . '</span>' : ( $disabled ? '<span class="viz-section-error">' . esc_html__( 'Not supported for this chart type.', 'visualizer' ) . '</span>' : esc_html__( 'To download the chart as an image.', 'visualizer' ) ),
235
+ $disable_actions || $disabled
236
+ );
237
  self::_renderSectionEnd();
238
  }
239
 
254
  return class_exists( 'PhpOffice\PhpSpreadsheet\Spreadsheet' ) && extension_loaded( 'zip' ) && extension_loaded( 'xml' ) && extension_loaded( 'fileinfo' );
255
  }
256
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  /**
258
  * Renders select item.
259
  *
classes/Visualizer/Render/Sidebar/ChartJS.php CHANGED
@@ -12,6 +12,17 @@
12
  */
13
  abstract class Visualizer_Render_Sidebar_ChartJS extends Visualizer_Render_Sidebar {
14
 
 
 
 
 
 
 
 
 
 
 
 
15
  /**
16
  * The constructor.
17
  */
12
  */
13
  abstract class Visualizer_Render_Sidebar_ChartJS extends Visualizer_Render_Sidebar {
14
 
15
+ /**
16
+ * The array of available legend positions.
17
+ *
18
+ * @since 1.0.0
19
+ *
20
+ * @access protected
21
+ * @var array
22
+ */
23
+ protected $_legendPositions;
24
+
25
+
26
  /**
27
  * The constructor.
28
  */
classes/Visualizer/Render/Sidebar/Google.php CHANGED
@@ -31,12 +31,53 @@
31
  */
32
  abstract class Visualizer_Render_Sidebar_Google extends Visualizer_Render_Sidebar {
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  /**
35
  * The constructor.
36
  */
37
  public function __construct( $data = array() ) {
38
  $this->_library = 'google';
39
  parent::__construct( $data );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  }
41
 
42
  /**
@@ -108,4 +149,280 @@ abstract class Visualizer_Render_Sidebar_Google extends Visualizer_Render_Sideba
108
  sprintf( esc_html__( 'Determines whether the series has to be used for a special role as mentioned in %1$shere%2$s. You can view a few examples %3$shere%4$s.', 'visualizer' ), '<a href="https://developers.google.com/chart/interactive/docs/roles#what-roles-are-available" target="_blank">', '</a>', '<a href="https://docs.themeisle.com/article/1160-roles-for-series-visualizer" target="_blank">', '</a>' )
109
  );
110
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  }
31
  */
32
  abstract class Visualizer_Render_Sidebar_Google extends Visualizer_Render_Sidebar {
33
 
34
+ /**
35
+ * The array of available legend positions.
36
+ *
37
+ * @since 1.0.0
38
+ *
39
+ * @access protected
40
+ * @var array
41
+ */
42
+ protected $_legendPositions;
43
+
44
+ /**
45
+ * The array of available alignments.
46
+ *
47
+ * @since 1.0.0
48
+ *
49
+ * @access protected
50
+ * @var array
51
+ */
52
+ protected $_alignments;
53
+
54
  /**
55
  * The constructor.
56
  */
57
  public function __construct( $data = array() ) {
58
  $this->_library = 'google';
59
  parent::__construct( $data );
60
+
61
+ $this->_legendPositions = array(
62
+ '' => '',
63
+ 'left' => esc_html__( 'Left of the chart', 'visualizer' ),
64
+ 'right' => esc_html__( 'Right of the chart', 'visualizer' ),
65
+ 'top' => esc_html__( 'Above the chart', 'visualizer' ),
66
+ 'bottom' => esc_html__( 'Below the chart', 'visualizer' ),
67
+ 'none' => esc_html__( 'Omit the legend', 'visualizer' ),
68
+ );
69
+
70
+ if ( ! in_array( $this->get_chart_type( false ), array( 'Pie' ), true ) ) {
71
+ $this->_legendPositions['in'] = esc_html__( 'Inside the chart', 'visualizer' );
72
+ }
73
+
74
+ $this->_alignments = array(
75
+ '' => '',
76
+ 'start' => esc_html__( 'Aligned to the start of the allocated area', 'visualizer' ),
77
+ 'center' => esc_html__( 'Centered in the allocated area', 'visualizer' ),
78
+ 'end' => esc_html__( 'Aligned to the end of the allocated area', 'visualizer' ),
79
+ );
80
+
81
  }
82
 
83
  /**
149
  sprintf( esc_html__( 'Determines whether the series has to be used for a special role as mentioned in %1$shere%2$s. You can view a few examples %3$shere%4$s.', 'visualizer' ), '<a href="https://developers.google.com/chart/interactive/docs/roles#what-roles-are-available" target="_blank">', '</a>', '<a href="https://docs.themeisle.com/article/1160-roles-for-series-visualizer" target="_blank">', '</a>' )
150
  );
151
  }
152
+
153
+ /**
154
+ * Renders chart general settings group.
155
+ *
156
+ * @since 1.0.0
157
+ *
158
+ * @access protected
159
+ */
160
+ protected function _renderGeneralSettings() {
161
+ self::_renderGroupStart( esc_html__( 'General Settings', 'visualizer' ) );
162
+ self::_renderSectionStart();
163
+ self::_renderSectionDescription( esc_html__( 'Configure title, font styles, tooltip, legend and else settings for the chart.', 'visualizer' ) );
164
+ self::_renderSectionEnd();
165
+
166
+ self::_renderSectionStart( esc_html__( 'Title', 'visualizer' ), false );
167
+ $this->_renderChartTitleSettings();
168
+ self::_renderSectionEnd();
169
+
170
+ self::_renderSectionStart( esc_html__( 'Font Styles', 'visualizer' ), false );
171
+ echo '<div class="viz-section-item">';
172
+ echo '<a class="more-info" href="javascript:;">[?]</a>';
173
+ echo '<b>', esc_html__( 'Family And Size', 'visualizer' ), '</b>';
174
+
175
+ echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
176
+ echo '<tr>';
177
+ echo '<td class="viz-section-table-column">';
178
+ echo '<select name="fontName" class="control-select">';
179
+ echo '<option></option>';
180
+ foreach ( self::$_fontFamilies as $font => $label ) {
181
+ echo '<option value="', $font, '"', selected( $font, $this->fontName, false ), '>';
182
+ echo $label;
183
+ echo '</option>';
184
+ }
185
+ echo '</select>';
186
+ echo '</td>';
187
+ echo '<td class="viz-section-table-column">';
188
+ echo '<select name="fontSize" class="control-select">';
189
+ echo '<option></option>';
190
+ for ( $i = 7; $i <= 20; $i++ ) {
191
+ echo '<option value="', $i, '"', selected( $i, $this->fontSize, false ), '>', $i, '</option>';
192
+ }
193
+ echo '</select>';
194
+ echo '</td>';
195
+ echo '</tr>';
196
+ echo '</table>';
197
+
198
+ echo '<p class="viz-section-description">';
199
+ esc_html_e( 'The default font family and size for all text in the chart.', 'visualizer' );
200
+ echo '</p>';
201
+ echo '</div>';
202
+ self::_renderSectionEnd();
203
+
204
+ self::_renderSectionStart( esc_html__( 'Legend', 'visualizer' ), false );
205
+ self::_renderSelectItem(
206
+ esc_html__( 'Position', 'visualizer' ),
207
+ 'legend[position]',
208
+ $this->legend['position'],
209
+ $this->_legendPositions,
210
+ esc_html__( 'Determines where to place the legend, compared to the chart area.', 'visualizer' )
211
+ );
212
+
213
+ self::_renderSelectItem(
214
+ esc_html__( 'Alignment', 'visualizer' ),
215
+ 'legend[alignment]',
216
+ $this->legend['alignment'],
217
+ $this->_alignments,
218
+ esc_html__( 'Determines the alignment of the legend.', 'visualizer' )
219
+ );
220
+
221
+ self::_renderColorPickerItem(
222
+ esc_html__( 'Font Color', 'visualizer' ),
223
+ 'legend[textStyle][color]',
224
+ isset( $this->legend['textStyle']['color'] ) ? $this->legend['textStyle']['color'] : null,
225
+ '#000'
226
+ );
227
+ self::_renderSectionEnd();
228
+
229
+ self::_renderSectionStart( esc_html__( 'Tooltip', 'visualizer' ), false );
230
+ $this->_renderTooltipSettigns();
231
+ self::_renderSectionEnd();
232
+
233
+ $this->_renderAnimationSettings();
234
+
235
+ do_action( 'visualizer_chart_settings', get_class( $this ), $this->_data, 'general', array( 'generic' => true ) );
236
+
237
+ self::_renderGroupEnd();
238
+ }
239
+
240
+ /**
241
+ * Renders animation settings section.
242
+ *
243
+ * @access protected
244
+ */
245
+ protected function _renderAnimationSettings() {
246
+ if ( ! $this->_supportsAnimation ) {
247
+ return;
248
+ }
249
+
250
+ self::_renderSectionStart( esc_html__( 'Animation', 'visualizer' ), false );
251
+
252
+ self::_renderCheckboxItem(
253
+ esc_html__( 'Animate on startup', 'visualizer' ),
254
+ 'animation[startup]',
255
+ isset( $this->animation['startup'] ) ? $this->animation['startup'] : 0,
256
+ true,
257
+ esc_html__( 'Determines if the chart will animate on the initial draw.', 'visualizer' )
258
+ );
259
+
260
+ self::_renderTextItem(
261
+ esc_html__( 'Duration', 'visualizer' ),
262
+ 'animation[duration]',
263
+ isset( $this->animation['duration'] ) ? $this->animation['duration'] : 0,
264
+ esc_html__( 'The duration of the animation, in milliseconds', 'visualizer' ),
265
+ 0,
266
+ 'number'
267
+ );
268
+
269
+ self::_renderSelectItem(
270
+ esc_html__( 'Easing', 'visualizer' ),
271
+ 'animation[easing]',
272
+ isset( $this->animation['easing'] ) ? $this->animation['easing'] : null,
273
+ array(
274
+ 'linear' => esc_html__( 'Constant speed', 'visualizer' ),
275
+ 'in' => esc_html__( 'Start slow and speed up', 'visualizer' ),
276
+ 'out' => esc_html__( 'Start fast and slow down', 'visualizer' ),
277
+ 'inAndOut' => esc_html__( 'Start slow, speed up, then slow down', 'visualizer' ),
278
+ ),
279
+ esc_html__( 'The easing function applied to the animation.', 'visualizer' )
280
+ );
281
+
282
+ self::_renderSectionEnd();
283
+
284
+ }
285
+
286
+ /**
287
+ * Renders tooltip settings section.
288
+ *
289
+ * @since 1.4.0
290
+ *
291
+ * @access protected
292
+ */
293
+ protected function _renderTooltipSettigns() {
294
+ self::_renderSelectItem(
295
+ esc_html__( 'Trigger', 'visualizer' ),
296
+ 'tooltip[trigger]',
297
+ isset( $this->tooltip['trigger'] ) ? $this->tooltip['trigger'] : null,
298
+ array(
299
+ '' => '',
300
+ 'focus' => esc_html__( 'The tooltip will be displayed when the user hovers over an element', 'visualizer' ),
301
+ 'selection' => esc_html__( 'The tooltip will be displayed when the user selects an element', 'visualizer' ),
302
+ 'none' => esc_html__( 'The tooltip will not be displayed', 'visualizer' ),
303
+ ),
304
+ esc_html__( 'Determines the user interaction that causes the tooltip to be displayed.', 'visualizer' )
305
+ );
306
+
307
+ self::_renderSelectItem(
308
+ esc_html__( 'Show Color Code', 'visualizer' ),
309
+ 'tooltip[showColorCode]',
310
+ isset( $this->tooltip['showColorCode'] ) ? $this->tooltip['showColorCode'] : null,
311
+ $this->_yesno,
312
+ esc_html__( 'If set to yes, will show colored squares next to the slice information in the tooltip.', 'visualizer' )
313
+ );
314
+ }
315
+
316
+ /**
317
+ * Renders chart view settings group.
318
+ *
319
+ * @since 1.0.0
320
+ *
321
+ * @access protected
322
+ */
323
+ protected function _renderViewSettings() {
324
+ self::_renderGroupStart( esc_html__( 'Chart Size & Placement', 'visualizer' ) );
325
+ self::_renderSectionStart( esc_html__( 'Chart Size/Layout', 'visualizer' ), false );
326
+ self::_renderSectionDescription( esc_html__( 'Configure the total size of the chart. Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', 'visualizer' ) );
327
+
328
+ echo '<div class="viz-section-item">';
329
+ echo '<a class="more-info" href="javascript:;">[?]</a>';
330
+ echo '<b>', esc_html__( 'Width And Height Of Chart', 'visualizer' ), '</b>';
331
+
332
+ echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
333
+ echo '<tr>';
334
+ echo '<td class="viz-section-table-column">';
335
+ echo '<input type="text" name="width" class="control-text" value="', esc_attr( $this->width ), '" placeholder="100%">';
336
+ echo '</td>';
337
+ echo '<td class="viz-section-table-column">';
338
+ echo '<input type="text" name="height" class="control-text" value="', esc_attr( $this->height ), '" placeholder="400">';
339
+ echo '</td>';
340
+ echo '</tr>';
341
+ echo '</table>';
342
+
343
+ echo '<p class="viz-section-description">';
344
+ esc_html_e( 'Determines the total width and height of the chart. This will only show in the front-end.', 'visualizer' );
345
+ echo '</p>';
346
+ echo '</div>';
347
+
348
+ echo '<div class="viz-section-delimiter"></div>';
349
+
350
+ self::_renderSectionDescription( esc_html__( 'Configure the background color for the main area of the chart and the chart border width and color.', 'visualizer' ) );
351
+
352
+ self::_renderTextItem(
353
+ esc_html__( 'Stroke Width', 'visualizer' ),
354
+ 'backgroundColor[strokeWidth]',
355
+ isset( $this->backgroundColor['strokeWidth'] ) ? $this->backgroundColor['strokeWidth'] : null,
356
+ esc_html__( 'The chart border width in pixels.', 'visualizer' ),
357
+ '0'
358
+ );
359
+
360
+ self::_renderColorPickerItem(
361
+ esc_html__( 'Stroke Color', 'visualizer' ),
362
+ 'backgroundColor[stroke]',
363
+ ! empty( $this->backgroundColor['stroke'] ) ? $this->backgroundColor['stroke'] : null,
364
+ '#666'
365
+ );
366
+
367
+ $background_color = ! empty( $this->backgroundColor['fill'] ) ? $this->backgroundColor['fill'] : null;
368
+ self::_renderColorPickerItem(
369
+ esc_html__( 'Background Color', 'visualizer' ),
370
+ 'backgroundColor[fill]',
371
+ $background_color,
372
+ '#fff'
373
+ );
374
+
375
+ echo '<div class="viz-section-item">';
376
+ echo '<label>';
377
+ echo '<input type="checkbox" class="control-checkbox" name="backgroundColor[fill]" value="transparent"', checked( $background_color, 'transparent', false ), '> ';
378
+ esc_html_e( 'Transparent background', 'visualizer' );
379
+ echo '</label>';
380
+ echo '</div>';
381
+ self::_renderSectionEnd();
382
+
383
+ self::_renderSectionStart( esc_html__( 'Placement', 'visualizer' ), false );
384
+ self::_renderSectionDescription( esc_html__( 'Configure the placement and size of the chart area (where the chart itself is drawn, excluding axis and legends). Two formats are supported: a number, or a number followed by %. A simple number is a value in pixels; a number followed by % is a percentage.', 'visualizer' ) );
385
+
386
+ echo '<div class="viz-section-item">';
387
+ echo '<a class="more-info" href="javascript:;">[?]</a>';
388
+ echo '<b>', esc_html__( 'Left And Top Margins', 'visualizer' ), '</b>';
389
+
390
+ echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
391
+ echo '<tr>';
392
+ echo '<td class="viz-section-table-column">';
393
+ echo '<input type="text" name="chartArea[left]" class="control-text" value="', $this->chartArea['left'] || $this->chartArea['left'] === '0' ? esc_attr( $this->chartArea['left'] ) : '', '" placeholder="20%">';
394
+ echo '</td>';
395
+ echo '<td class="viz-section-table-column">';
396
+ echo '<input type="text" name="chartArea[top]" class="control-text" value="', $this->chartArea['top'] || $this->chartArea['top'] === '0' ? esc_attr( $this->chartArea['top'] ) : '', '" placeholder="20%">';
397
+ echo '</td>';
398
+ echo '</tr>';
399
+ echo '</table>';
400
+
401
+ echo '<p class="viz-section-description">';
402
+ esc_html_e( 'Determines how far to draw the chart from the left and top borders.', 'visualizer' );
403
+ echo '</p>';
404
+ echo '</div>';
405
+
406
+ echo '<div class="viz-section-item">';
407
+ echo '<a class="more-info" href="javascript:;">[?]</a>';
408
+ echo '<b>', esc_html__( 'Width And Height Of Chart Area', 'visualizer' ), '</b>';
409
+
410
+ echo '<table class="viz-section-table" cellspacing="0" cellpadding="0" border="0">';
411
+ echo '<tr>';
412
+ echo '<td class="viz-section-table-column">';
413
+ echo '<input type="text" name="chartArea[width]" class="control-text" value="', ! empty( $this->chartArea['width'] ) ? esc_attr( $this->chartArea['width'] ) : '', '" placeholder="60%">';
414
+ echo '</td>';
415
+ echo '<td class="viz-section-table-column">';
416
+ echo '<input type="text" name="chartArea[height]" class="control-text" value="', ! empty( $this->chartArea['height'] ) ? esc_attr( $this->chartArea['height'] ) : '', '" placeholder="60%">';
417
+ echo '</td>';
418
+ echo '</tr>';
419
+ echo '</table>';
420
+
421
+ echo '<p class="viz-section-description">';
422
+ esc_html_e( 'Determines the width and hight of the chart area.', 'visualizer' );
423
+ echo '</p>';
424
+ echo '</div>';
425
+ self::_renderSectionEnd();
426
+ self::_renderGroupEnd();
427
+ }
428
  }
classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Bubble.php CHANGED
@@ -81,7 +81,7 @@ class Visualizer_Render_Sidebar_Type_GoogleCharts_Bubble extends Visualizer_Rend
81
  self::_renderColorPickerItem(
82
  esc_html__( 'Stroke Color', 'visualizer' ),
83
  'bubble[stroke]',
84
- isset( $this->bubble[ $index ]['stroke'] ) ? $this->bubble[ $index ]['stroke'] : null,
85
  null
86
  );
87
 
@@ -90,7 +90,7 @@ class Visualizer_Render_Sidebar_Type_GoogleCharts_Bubble extends Visualizer_Rend
90
  'sortBubblesBySize',
91
  $this->sortBubblesBySize ? 1 : 0,
92
  1,
93
- esc_html__( 'If true, sorts the bubbles by size so the smaller bubbles appear above the larger bubbles. If false, bubbles are sorted according to their order in the DataTable.', 'visualizer' )
94
  );
95
 
96
  self::_renderTextItem(
81
  self::_renderColorPickerItem(
82
  esc_html__( 'Stroke Color', 'visualizer' ),
83
  'bubble[stroke]',
84
+ isset( $this->bubble['stroke'] ) ? $this->bubble['stroke'] : null,
85
  null
86
  );
87
 
90
  'sortBubblesBySize',
91
  $this->sortBubblesBySize ? 1 : 0,
92
  1,
93
+ esc_html__( '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.', 'visualizer' )
94
  );
95
 
96
  self::_renderTextItem(
css/library.css CHANGED
@@ -107,6 +107,10 @@
107
  background-position: -46px -64px;
108
  }
109
 
 
 
 
 
110
  .visualizer-nochart-clone,
111
  .visualizer-nochart-delete,
112
  .visualizer-nochart-edit {
107
  background-position: -46px -64px;
108
  }
109
 
110
+ .visualizer-chart-image {
111
+ background-position: -206px -129px;
112
+ }
113
+
114
  .visualizer-nochart-clone,
115
  .visualizer-nochart-delete,
116
  .visualizer-nochart-edit {
css/media.css CHANGED
@@ -1,5 +1,5 @@
1
  /*
2
- Version: 3.4.3
3
  */
4
  #visualizer-library-view {
5
  padding: 30px 10px 10px 30px;
1
  /*
2
+ Version: 3.4.4
3
  */
4
  #visualizer-library-view {
5
  padding: 30px 10px 10px 30px;
css/upsell.css CHANGED
@@ -9,7 +9,7 @@
9
  margin: 0 0 0 20px;
10
  padding: 0 0 0 70px;
11
  color: #3c3c3c;
12
- background: url(../img/wppr-logo.png) no-repeat left center;
13
  font-family: "Open Sans", sans-serif;
14
  font-size: 2em;
15
  font-weight: 700;
9
  margin: 0 0 0 20px;
10
  padding: 0 0 0 70px;
11
  color: #3c3c3c;
12
+ background: url(../images/icon.png) no-repeat left center;
13
  font-family: "Open Sans", sans-serif;
14
  font-size: 2em;
15
  font-weight: 700;
index.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Visualizer: Tables and Charts for WordPress
5
  Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs-lite/
6
  Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
7
- Version: 3.4.3
8
  Author: Themeisle
9
  Author URI: http://themeisle.com
10
  License: GPL v2.0 or later
4
  Plugin Name: Visualizer: Tables and Charts for WordPress
5
  Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs-lite/
6
  Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
7
+ Version: 3.4.4
8
  Author: Themeisle
9
  Author URI: http://themeisle.com
10
  License: GPL v2.0 or later
js/library.js CHANGED
@@ -23,7 +23,11 @@
23
  },
24
 
25
  open: function () {
26
- wpmv.MediaFrame.prototype.open.apply(this, arguments);
 
 
 
 
27
  this.$el.addClass('hide-menu');
28
  }
29
  });
@@ -139,9 +143,14 @@
139
  return false;
140
  });
141
 
 
 
 
 
 
142
  // if vaction=addnew is found as a GET request parameter, show the modal.
143
  if(location.href.indexOf('vaction=addnew') !== -1){
144
- $('.add-new-chart').trigger('click');
145
  }
146
 
147
  $(window).resize(function () {
23
  },
24
 
25
  open: function () {
26
+ try{
27
+ wpmv.MediaFrame.prototype.open.apply(this, arguments);
28
+ }catch(error){
29
+ alert(visualizer.i10n.conflict);
30
+ }
31
  this.$el.addClass('hide-menu');
32
  }
33
  });
143
  return false;
144
  });
145
 
146
+ $(".visualizer-chart-image").on("click", function () {
147
+ $('body').trigger('visualizer:action:specificchart', {action: 'image', id: $(this).attr("data-chart"), data: null, dataObj: {name: $(this).attr("data-chart-title")}});
148
+ return false;
149
+ });
150
+
151
  // if vaction=addnew is found as a GET request parameter, show the modal.
152
  if(location.href.indexOf('vaction=addnew') !== -1){
153
+ $('.add-new-chart').first().trigger('click');
154
  }
155
 
156
  $(window).resize(function () {
js/render-chartjs.js CHANGED
@@ -127,8 +127,16 @@
127
  // chart area
128
  if(v.is_front == true){ // jshint ignore:line
129
  $('#' + id).css('position', 'relative');
130
- chartjs.canvas.parentNode.style.height = settings.height;
131
- chartjs.canvas.parentNode.style.width = settings.width;
 
 
 
 
 
 
 
 
132
  }
133
 
134
  // allow user to extend the settings.
@@ -406,19 +414,33 @@
406
  });
407
 
408
  // front end actions
 
409
  $('body').on('visualizer:action:specificchart', function(event, v){
 
 
 
 
 
410
  switch(v.action){
411
  case 'print':
412
- var id = v.id;
413
- if(typeof rendered_charts[id] === 'undefined'){
414
- return;
415
- }
416
- var canvas = $('#' + id + ' canvas');
417
  var win = window.open();
418
  win.document.write("<br><img src='" + canvas[0].toDataURL() + "'/>");
419
  win.document.close();
420
  win.onload = function () { win.print(); setTimeout(win.close, 500); };
421
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
422
  }
423
  });
424
 
127
  // chart area
128
  if(v.is_front == true){ // jshint ignore:line
129
  $('#' + id).css('position', 'relative');
130
+ var height = settings.height.indexOf('%') === -1 ? ( settings.height + 'px' ) : settings.height;
131
+ var width = settings.width.indexOf('%') === -1 ? ( settings.width + 'px' ) : settings.width;
132
+ if(settings.height){
133
+ chartjs.canvas.parentNode.style.height = height;
134
+ $('#' + id + ' canvas').css('height', height);
135
+ }
136
+ if(settings.width){
137
+ chartjs.canvas.parentNode.style.width = width;
138
+ $('#' + id + ' canvas').css('width', width);
139
+ }
140
  }
141
 
142
  // allow user to extend the settings.
414
  });
415
 
416
  // front end actions
417
+ // 'image' is also called from the library
418
  $('body').on('visualizer:action:specificchart', function(event, v){
419
+ var id = v.id;
420
+ if(typeof rendered_charts[id] === 'undefined'){
421
+ return;
422
+ }
423
+ var canvas = $('#' + id + ' canvas');
424
  switch(v.action){
425
  case 'print':
 
 
 
 
 
426
  var win = window.open();
427
  win.document.write("<br><img src='" + canvas[0].toDataURL() + "'/>");
428
  win.document.close();
429
  win.onload = function () { win.print(); setTimeout(win.close, 500); };
430
  break;
431
+ case 'image':
432
+ var img = canvas[0].toDataURL();
433
+ if(img !== ''){
434
+ var $a = $("<a>"); // jshint ignore:line
435
+ $a.attr("href", img);
436
+ $("body").append($a);
437
+ $a.attr("download", v.dataObj.name);
438
+ $a[0].click();
439
+ $a.remove();
440
+ }else{
441
+ console.warn("No image generated");
442
+ }
443
+ break;
444
  }
445
  });
446
 
js/render-facade.js CHANGED
@@ -6,6 +6,9 @@
6
 
7
  function initActionsButtons(v) {
8
  if($('a.visualizer-action[data-visualizer-type=copy]').length > 0) {
 
 
 
9
  var clipboard = new Clipboard('a.visualizer-action[data-visualizer-type=copy]'); // jshint ignore:line
10
  clipboard.on('success', function(e) {
11
  window.alert(v.i10n['copied']);
@@ -17,7 +20,6 @@
17
  var container = $(this).attr( 'data-visualizer-container-id' );
18
  var lock = $('.visualizer-front.visualizer-front-' + chart);
19
  var mime = $(this).attr( 'data-visualizer-mime' );
20
- console.log(mime);
21
  lock.lock();
22
  e.preventDefault();
23
  $.ajax({
@@ -56,7 +58,8 @@
56
  }
57
  break;
58
  case 'print':
59
- $('body').trigger('visualizer:action:specificchart', {action: 'print', id: container, data: data.data.csv});
 
60
  break;
61
  default:
62
  if(window.visualizer_perform_action) {
@@ -88,24 +91,23 @@
88
  document.body.dispatchEvent(event);
89
  };
90
 
91
- // facade loads N times in the library (where N = the number of different chart libraries supported)
92
  // so all charts are also loaded N times
93
  // this will ensure that no matter how many times facade is loaded, it initializes all charts only once.
94
  // fixed as part of the issue to add annotations.
95
- if(visualizer.page_type === 'library'){
96
- if(localStorage.getItem( 'viz-facade-loaded' ) === '1'){
97
- // prevent library from hanging.
98
- setTimeout( function(){
99
- localStorage.removeItem( 'viz-facade-loaded' );
100
- }, 2000);
101
- return;
102
- }
103
- localStorage.setItem( 'viz-facade-loaded', '1');
104
- // remove the flag so that repeated loading of the library does not cause problems.
105
  setTimeout( function(){
106
  localStorage.removeItem( 'viz-facade-loaded' );
107
  }, 2000);
 
108
  }
 
 
 
 
 
 
109
  $('body').trigger('visualizer:render:chart:start', visualizer);
110
  initActionsButtons(visualizer);
111
  registerDefaultActions();
6
 
7
  function initActionsButtons(v) {
8
  if($('a.visualizer-action[data-visualizer-type=copy]').length > 0) {
9
+ $('a.visualizer-action[data-visualizer-type=copy]').on('click', function(e) {
10
+ e.preventDefault();
11
+ });
12
  var clipboard = new Clipboard('a.visualizer-action[data-visualizer-type=copy]'); // jshint ignore:line
13
  clipboard.on('success', function(e) {
14
  window.alert(v.i10n['copied']);
20
  var container = $(this).attr( 'data-visualizer-container-id' );
21
  var lock = $('.visualizer-front.visualizer-front-' + chart);
22
  var mime = $(this).attr( 'data-visualizer-mime' );
 
23
  lock.lock();
24
  e.preventDefault();
25
  $.ajax({
58
  }
59
  break;
60
  case 'print':
61
+ case 'image':
62
+ $('body').trigger('visualizer:action:specificchart', {action: type, id: container, data: data.data.csv, dataObj: data.data});
63
  break;
64
  default:
65
  if(window.visualizer_perform_action) {
91
  document.body.dispatchEvent(event);
92
  };
93
 
94
+ // facade loads N times in the library and front end (where N = the number of different chart libraries supported)
95
  // so all charts are also loaded N times
96
  // this will ensure that no matter how many times facade is loaded, it initializes all charts only once.
97
  // fixed as part of the issue to add annotations.
98
+ if(localStorage.getItem( 'viz-facade-loaded' ) === '1'){
99
+ // prevent library from hanging.
 
 
 
 
 
 
 
 
100
  setTimeout( function(){
101
  localStorage.removeItem( 'viz-facade-loaded' );
102
  }, 2000);
103
+ return;
104
  }
105
+ localStorage.setItem( 'viz-facade-loaded', '1');
106
+ // remove the flag so that repeated loading of the library does not cause problems.
107
+ setTimeout( function(){
108
+ localStorage.removeItem( 'viz-facade-loaded' );
109
+ }, 2000);
110
+
111
  $('body').trigger('visualizer:render:chart:start', visualizer);
112
  initActionsButtons(visualizer);
113
  registerDefaultActions();
js/render-google.js CHANGED
@@ -12,6 +12,16 @@ var __visualizer_chart_images = [];
12
  var rendered_charts = [];
13
 
14
  function renderChart(id) {
 
 
 
 
 
 
 
 
 
 
15
  renderSpecificChart(id, all_charts[id]);
16
  }
17
 
@@ -432,15 +442,16 @@ var __visualizer_chart_images = [];
432
  });
433
 
434
  // front end actions
 
435
  $('body').on('visualizer:action:specificchart', function(event, v){
 
 
 
 
 
 
436
  switch(v.action){
437
  case 'print':
438
- var id = v.id;
439
- if(typeof rendered_charts[id] === 'undefined'){
440
- return;
441
- }
442
- var arr = id.split('-');
443
- var img = __visualizer_chart_images[ arr[0] + '-' + arr[1] ];
444
  // for charts that have no rendered image defined, we print the data instead.
445
  var html = v.data;
446
  if(img !== ''){
@@ -448,6 +459,18 @@ var __visualizer_chart_images = [];
448
  }
449
  $('body').trigger('visualizer:action:specificchart:defaultprint', {data: html});
450
  break;
 
 
 
 
 
 
 
 
 
 
 
 
451
  }
452
  });
453
 
12
  var rendered_charts = [];
13
 
14
  function renderChart(id) {
15
+ var chart = all_charts[id];
16
+ var hasAnnotation = false;
17
+ if(id !== 'canvas' && typeof chart.series !== 'undefined' && typeof chart.settings.series !== 'undefined'){
18
+ hasAnnotation = chart.series.length - chart.settings.series.length > 1;
19
+ }
20
+ // re-render the chart only if it doesn't have annotations and it is on the front-end
21
+ // this is to prevent the chart from showing "All series on a given axis must be of the same data type" during resize.
22
+ if(hasAnnotation){
23
+ return;
24
+ }
25
  renderSpecificChart(id, all_charts[id]);
26
  }
27
 
442
  });
443
 
444
  // front end actions
445
+ // 'image' is also called from the library
446
  $('body').on('visualizer:action:specificchart', function(event, v){
447
+ var id = v.id;
448
+ if(typeof rendered_charts[id] === 'undefined'){
449
+ return;
450
+ }
451
+ var arr = id.split('-');
452
+ var img = __visualizer_chart_images[ arr[0] + '-' + arr[1] ];
453
  switch(v.action){
454
  case 'print':
 
 
 
 
 
 
455
  // for charts that have no rendered image defined, we print the data instead.
456
  var html = v.data;
457
  if(img !== ''){
459
  }
460
  $('body').trigger('visualizer:action:specificchart:defaultprint', {data: html});
461
  break;
462
+ case 'image':
463
+ if(img !== ''){
464
+ var $a = $("<a>"); // jshint ignore:line
465
+ $a.attr("href", img);
466
+ $("body").append($a);
467
+ $a.attr("download", v.dataObj.name);
468
+ $a[0].click();
469
+ $a.remove();
470
+ }else{
471
+ console.warn("No image generated");
472
+ }
473
+ break;
474
  }
475
  });
476
 
languages/visualizer.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: Visualizer: Tables and Charts for WordPress 3.4.3\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Codeinwp/visualizer/issues\n"
7
- "POT-Creation-Date: 2020-04-13 05:24:19+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -30,159 +30,159 @@ msgstr ""
30
  msgid "Unable to fetch data from the endpoint. Please try again."
31
  msgstr ""
32
 
33
- #: classes/Visualizer/Module/Admin.php:116
34
  msgid "PRO"
35
  msgstr ""
36
 
37
- #: classes/Visualizer/Module/Admin.php:120
38
  msgid "Developer"
39
  msgstr ""
40
 
41
- #: classes/Visualizer/Module/Admin.php:126
42
  msgid "Live"
43
  msgstr ""
44
 
45
- #: classes/Visualizer/Module/Admin.php:127
46
  msgid "Each hour"
47
  msgstr ""
48
 
49
- #: classes/Visualizer/Module/Admin.php:128
50
  msgid "Each 12 hours"
51
  msgstr ""
52
 
53
- #: classes/Visualizer/Module/Admin.php:129
54
  msgid "Each day"
55
  msgstr ""
56
 
57
- #: classes/Visualizer/Module/Admin.php:130
58
  msgid "Each 3 days"
59
  msgstr ""
60
 
61
- #: classes/Visualizer/Module/Admin.php:149
62
  msgid "More in the %s version"
63
  msgstr ""
64
 
65
- #: classes/Visualizer/Module/Admin.php:330
66
  msgid "Insert"
67
  msgstr ""
68
 
69
- #: classes/Visualizer/Module/Admin.php:358
70
  msgid "Visualizations"
71
  msgstr ""
72
 
73
- #: classes/Visualizer/Module/Admin.php:361
74
  msgid "From Library"
75
  msgstr ""
76
 
77
- #: classes/Visualizer/Module/Admin.php:362
78
  msgid "Create New"
79
  msgstr ""
80
 
81
- #: classes/Visualizer/Module/Admin.php:388
82
  msgid "All"
83
  msgstr ""
84
 
85
- #: classes/Visualizer/Module/Admin.php:397
86
- #: classes/Visualizer/Module/Admin.php:533
87
- #: classes/Visualizer/Module/Admin.php:535
88
- #: classes/Visualizer/Module/Admin.php:563
89
- #: classes/Visualizer/Module/Admin.php:565
90
  msgid "Table"
91
  msgstr ""
92
 
93
- #: classes/Visualizer/Module/Admin.php:402
94
  msgid "Pie/Donut"
95
  msgstr ""
96
 
97
- #: classes/Visualizer/Module/Admin.php:407
98
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Line.php:24
99
  msgid "Line"
100
  msgstr ""
101
 
102
- #: classes/Visualizer/Module/Admin.php:412
103
  msgid "Area"
104
  msgstr ""
105
 
106
- #: classes/Visualizer/Module/Admin.php:418
107
  msgid "Geo"
108
  msgstr ""
109
 
110
- #: classes/Visualizer/Module/Admin.php:423
111
  msgid "Bar"
112
  msgstr ""
113
 
114
- #: classes/Visualizer/Module/Admin.php:428
115
  msgid "Column"
116
  msgstr ""
117
 
118
- #: classes/Visualizer/Module/Admin.php:433
119
  msgid "Bubble"
120
  msgstr ""
121
 
122
- #: classes/Visualizer/Module/Admin.php:439
123
  msgid "Scatter"
124
  msgstr ""
125
 
126
- #: classes/Visualizer/Module/Admin.php:444
127
  msgid "Gauge"
128
  msgstr ""
129
 
130
- #: classes/Visualizer/Module/Admin.php:449
131
  msgid "Candlestick"
132
  msgstr ""
133
 
134
- #: classes/Visualizer/Module/Admin.php:455
135
  msgid "Table (Deprecated)"
136
  msgstr ""
137
 
138
- #: classes/Visualizer/Module/Admin.php:460
139
  msgid "Timeline"
140
  msgstr ""
141
 
142
- #: classes/Visualizer/Module/Admin.php:465
143
  msgid "Combo"
144
  msgstr ""
145
 
146
- #: classes/Visualizer/Module/Admin.php:470
147
  msgid "Polar Area"
148
  msgstr ""
149
 
150
- #: classes/Visualizer/Module/Admin.php:475
151
  msgid "Radar/Spider"
152
  msgstr ""
153
 
154
- #: classes/Visualizer/Module/Admin.php:688
155
  msgid "Visualizer"
156
  msgstr ""
157
 
 
158
  #: classes/Visualizer/Module/Admin.php:692
159
- #: classes/Visualizer/Module/Admin.php:693
160
  msgid "Chart Library"
161
  msgstr ""
162
 
 
163
  #: classes/Visualizer/Module/Admin.php:699
164
- #: classes/Visualizer/Module/Admin.php:700
165
  msgid "Add New Chart"
166
  msgstr ""
167
 
168
- #: classes/Visualizer/Module/Admin.php:706
169
- #: classes/Visualizer/Module/Admin.php:707 templates/support.php:24
170
  msgid "Support"
171
  msgstr ""
172
 
173
- #: classes/Visualizer/Module/Admin.php:729
174
  msgid "Number of charts per page:"
175
  msgstr ""
176
 
177
- #: classes/Visualizer/Module/Admin.php:1021
178
  msgid "Library"
179
  msgstr ""
180
 
181
- #: classes/Visualizer/Module/Admin.php:1046
182
  msgid "Docs"
183
  msgstr ""
184
 
185
- #: classes/Visualizer/Module/Admin.php:1051
186
  msgid "Pro Addon"
187
  msgstr ""
188
 
@@ -239,36 +239,71 @@ msgstr ""
239
  msgid "CSV file is broken or invalid. Please try again."
240
  msgstr ""
241
 
242
- #: classes/Visualizer/Module/Frontend.php:126
243
  #: classes/Visualizer/Render/Sidebar.php:230
244
  msgid "Print"
245
  msgstr ""
246
 
247
- #: classes/Visualizer/Module/Frontend.php:127
 
 
 
 
248
  #: classes/Visualizer/Render/Sidebar.php:238
249
  msgid "CSV"
250
  msgstr ""
251
 
252
- #: classes/Visualizer/Module/Frontend.php:128
 
 
 
 
253
  #: classes/Visualizer/Render/Sidebar.php:248
254
  msgid "Excel"
255
  msgstr ""
256
 
257
- #: classes/Visualizer/Module/Frontend.php:129
 
 
 
 
258
  #: classes/Visualizer/Render/Sidebar.php:256
259
  msgid "Copy"
260
  msgstr ""
261
 
262
- #: classes/Visualizer/Module/Frontend.php:147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  msgid "Invalid chart ID"
264
  msgstr ""
265
 
266
- #: classes/Visualizer/Module/Frontend.php:151
267
  msgid "Invalid action"
268
  msgstr ""
269
 
270
- #: classes/Visualizer/Module/Frontend.php:337
271
- msgid "Copied!"
 
 
272
  msgstr ""
273
 
274
  #: classes/Visualizer/Module/Sources.php:141
@@ -321,263 +356,263 @@ msgstr ""
321
  msgid "Use %1$sControl+Space%2$s for autocompleting keywords or table names."
322
  msgstr ""
323
 
324
- #: classes/Visualizer/Render/Layout.php:154
325
  msgid "STEP 1: Specify the JSON endpoint/URL"
326
  msgstr ""
327
 
328
- #: classes/Visualizer/Render/Layout.php:159
329
  msgid ""
330
  "If you want to add authentication or headers to the endpoint or change the "
331
  "request in any way, please refer to our document %1$shere%2$s."
332
  msgstr ""
333
 
334
- #: classes/Visualizer/Render/Layout.php:168
335
  msgid "Please enter the URL"
336
  msgstr ""
337
 
338
- #: classes/Visualizer/Render/Layout.php:170
339
  msgid "Fetch Endpoint"
340
  msgstr ""
341
 
342
- #: classes/Visualizer/Render/Layout.php:173
343
  msgid "Headers"
344
  msgstr ""
345
 
346
- #: classes/Visualizer/Render/Layout.php:176
347
  msgid "Request Type"
348
  msgstr ""
349
 
350
- #: classes/Visualizer/Render/Layout.php:186
351
  msgid "Credentials"
352
  msgstr ""
353
 
354
- #: classes/Visualizer/Render/Layout.php:193
355
  msgid "Username/Access Key"
356
  msgstr ""
357
 
358
- #: classes/Visualizer/Render/Layout.php:201
359
  msgid "Password/Secret Key"
360
  msgstr ""
361
 
362
- #: classes/Visualizer/Render/Layout.php:207
363
- #: classes/Visualizer/Render/Layout.php:421
364
  msgid "OR"
365
  msgstr ""
366
 
367
- #: classes/Visualizer/Render/Layout.php:210
368
  msgid "Authorization"
369
  msgstr ""
370
 
371
- #: classes/Visualizer/Render/Layout.php:217
372
  msgid "e.g. SharedKey <AccountName>:<Signature>"
373
  msgstr ""
374
 
375
- #: classes/Visualizer/Render/Layout.php:225
376
  msgid "STEP 2: Choose the JSON root"
377
  msgstr ""
378
 
379
- #: classes/Visualizer/Render/Layout.php:238
380
  msgid "Parse Endpoint"
381
  msgstr ""
382
 
383
- #: classes/Visualizer/Render/Layout.php:241
384
  msgid "STEP 3: Specify miscellaneous parameters"
385
  msgstr ""
386
 
387
- #: classes/Visualizer/Render/Layout.php:247
388
  msgid "Get results from the first page only"
389
  msgstr ""
390
 
391
- #: classes/Visualizer/Render/Layout.php:271
392
  msgid "STEP 4: Select the data to display in the chart"
393
  msgstr ""
394
 
395
- #: classes/Visualizer/Render/Layout.php:276
396
  msgid ""
397
  "If you see Invalid Data in the table, you may have selected the wrong root "
398
  "to fetch data from. Please select an alternative from the JSON root "
399
  "dropdown."
400
  msgstr ""
401
 
402
- #: classes/Visualizer/Render/Layout.php:277
403
- #: classes/Visualizer/Render/Layout.php:314
404
  msgid ""
405
  "Select whether to include the data in the chart. Each column selected will "
406
  "form one series."
407
  msgstr ""
408
 
409
- #: classes/Visualizer/Render/Layout.php:278
410
- #: classes/Visualizer/Render/Layout.php:315
411
  msgid "If a column is selected to be included, specify its data type."
412
  msgstr ""
413
 
414
- #: classes/Visualizer/Render/Layout.php:279
415
- #: classes/Visualizer/Render/Layout.php:316
416
  msgid ""
417
  "You can use drag/drop to reorder the columns but this column position is "
418
  "not saved. So when you reload the table, you may have to reorder again."
419
  msgstr ""
420
 
421
- #: classes/Visualizer/Render/Layout.php:280
422
- #: classes/Visualizer/Render/Layout.php:317
423
  msgid ""
424
  "You can select any number of columns but the chart type selected will "
425
  "determine how many will display in the chart."
426
  msgstr ""
427
 
428
- #: classes/Visualizer/Render/Layout.php:281
429
  msgid ""
430
  "Once you have made your selection, click 'Show Chart' on the right to view "
431
  "the chart."
432
  msgstr ""
433
 
434
- #: classes/Visualizer/Render/Layout.php:395
435
  msgid "Label"
436
  msgstr ""
437
 
438
- #: classes/Visualizer/Render/Layout.php:409
439
  msgid "Data Type"
440
  msgstr ""
441
 
442
- #: classes/Visualizer/Render/Layout.php:420
443
  msgid "Exclude from chart"
444
  msgstr ""
445
 
446
- #: classes/Visualizer/Render/Layout.php:420
447
  msgid "Exclude"
448
  msgstr ""
449
 
450
- #: classes/Visualizer/Render/Layout.php:421
451
  msgid "Include in chart and select data type"
452
  msgstr ""
453
 
454
- #: classes/Visualizer/Render/Layout.php:440
455
  msgid "Value"
456
  msgstr ""
457
 
458
- #: classes/Visualizer/Render/Layout.php:450
459
  msgid "Invalid Data"
460
  msgstr ""
461
 
462
- #: classes/Visualizer/Render/Layout.php:492
463
  msgid "Permissions"
464
  msgstr ""
465
 
466
- #: classes/Visualizer/Render/Layout.php:495
467
  msgid "Configure permissions for the chart."
468
  msgstr ""
469
 
470
- #: classes/Visualizer/Render/Layout.php:498
471
  msgid "Who can see this chart?"
472
  msgstr ""
473
 
474
- #: classes/Visualizer/Render/Layout.php:504
475
- #: classes/Visualizer/Render/Layout.php:535
476
  msgid "All Users"
477
  msgstr ""
478
 
479
- #: classes/Visualizer/Render/Layout.php:505
480
- #: classes/Visualizer/Render/Layout.php:536
481
  msgid "Select Users"
482
  msgstr ""
483
 
484
- #: classes/Visualizer/Render/Layout.php:506
485
- #: classes/Visualizer/Render/Layout.php:537
486
  msgid "Select Roles"
487
  msgstr ""
488
 
489
- #: classes/Visualizer/Render/Layout.php:529
490
  msgid "Who can edit this chart?"
491
  msgstr ""
492
 
493
- #: classes/Visualizer/Render/Layout.php:617
494
  msgid "Documentation"
495
  msgstr ""
496
 
497
- #: classes/Visualizer/Render/Layout.php:618
498
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Bar.php:73
499
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Pie.php:102
500
  msgid "General"
501
  msgstr ""
502
 
503
- #: classes/Visualizer/Render/Layout.php:620
504
  msgid "Main documentation page"
505
  msgstr ""
506
 
507
- #: classes/Visualizer/Render/Layout.php:621
508
  msgid "Custom code snippets"
509
  msgstr ""
510
 
511
- #: classes/Visualizer/Render/Layout.php:624
512
  msgid "%s chart"
513
  msgstr ""
514
 
515
- #: classes/Visualizer/Render/Layout.php:626
516
  msgid "View demo"
517
  msgstr ""
518
 
519
- #: classes/Visualizer/Render/Layout.php:627
520
  msgid "Articles containing \"%s\""
521
  msgstr ""
522
 
523
- #: classes/Visualizer/Render/Layout.php:678
524
  msgid "Import data from file"
525
  msgstr ""
526
 
527
- #: classes/Visualizer/Render/Layout.php:680
528
  msgid ""
529
  "Select and upload your data CSV file here. The first row of the CSV file "
530
  "should contain the column headings. The second one should contain series "
531
  "type (string, number, boolean, date, datetime, timeofday)."
532
  msgstr ""
533
 
534
- #: classes/Visualizer/Render/Layout.php:681
535
- #: classes/Visualizer/Render/Layout.php:702
536
  msgid ""
537
  "If you are unsure about how to format your data CSV then please take a look "
538
  "at this sample: %1$s %2$s%3$s. If you are using non-English characters, "
539
  "please make sure you save the file in UTF-8 encoding."
540
  msgstr ""
541
 
542
- #: classes/Visualizer/Render/Layout.php:689
543
- #: classes/Visualizer/Render/Layout.php:732
544
  msgid "Import"
545
  msgstr ""
546
 
547
- #: classes/Visualizer/Render/Layout.php:695
548
  msgid "Import data from URL"
549
  msgstr ""
550
 
551
- #: classes/Visualizer/Render/Layout.php:699
552
  msgid "Import from CSV"
553
  msgstr ""
554
 
555
- #: classes/Visualizer/Render/Layout.php:701
556
  msgid ""
557
  "You can use this to import data from a remote CSV file or %1$sGoogle "
558
  "Spreadsheet%2$s."
559
  msgstr ""
560
 
561
- #: classes/Visualizer/Render/Layout.php:706
562
  msgid "Please enter the URL of CSV file"
563
  msgstr ""
564
 
565
- #: classes/Visualizer/Render/Layout.php:713
566
- #: classes/Visualizer/Render/Layout.php:760
567
- #: classes/Visualizer/Render/Layout.php:878
568
- #: classes/Visualizer/Render/Layout.php:927
569
  msgid "One-time"
570
  msgstr ""
571
 
572
- #: classes/Visualizer/Render/Layout.php:736
573
  msgid "Import & Save schedule"
574
  msgstr ""
575
 
576
- #: classes/Visualizer/Render/Layout.php:745
577
  msgid "Import from JSON"
578
  msgstr ""
579
 
580
- #: classes/Visualizer/Render/Layout.php:747
581
  msgid ""
582
  "You can choose here to import/synchronize your chart data with a remote "
583
  "JSON source. For more info check <a "
@@ -585,122 +620,122 @@ msgid ""
585
  "json-data-rest-endpoints\" target=\"_blank\" >this</a> tutorial"
586
  msgstr ""
587
 
588
- #: classes/Visualizer/Render/Layout.php:751
589
  msgid "Modify Parameters"
590
  msgstr ""
591
 
592
- #: classes/Visualizer/Render/Layout.php:751
593
  msgid "Create Parameters"
594
  msgstr ""
595
 
596
- #: classes/Visualizer/Render/Layout.php:754
597
  msgid "How often do you want to check the URL"
598
  msgstr ""
599
 
600
- #: classes/Visualizer/Render/Layout.php:782
601
- #: classes/Visualizer/Render/Layout.php:894
602
- #: classes/Visualizer/Render/Layout.php:944
603
- #: classes/Visualizer/Render/Layout.php:981
604
- #: classes/Visualizer/Render/Layout.php:990
605
  msgid "Show Chart"
606
  msgstr ""
607
 
608
- #: classes/Visualizer/Render/Layout.php:788
609
- #: classes/Visualizer/Render/Layout.php:895
610
- #: classes/Visualizer/Render/Layout.php:945
611
  msgid "Save Schedule"
612
  msgstr ""
613
 
614
- #: classes/Visualizer/Render/Layout.php:800
615
  msgid "Import from other chart"
616
  msgstr ""
617
 
618
- #: classes/Visualizer/Render/Layout.php:804
619
  msgid "You can import here data from your previously created charts"
620
  msgstr ""
621
 
622
- #: classes/Visualizer/Render/Layout.php:847
623
  msgid "Import Chart"
624
  msgstr ""
625
 
626
- #: classes/Visualizer/Render/Layout.php:865
627
  msgid "Import from WordPress"
628
  msgstr ""
629
 
630
- #: classes/Visualizer/Render/Layout.php:869
631
  msgid "You can import data from WordPress here."
632
  msgstr ""
633
 
634
- #: classes/Visualizer/Render/Layout.php:871
635
  msgid "How often do you want to refresh the data from WordPress."
636
  msgstr ""
637
 
638
- #: classes/Visualizer/Render/Layout.php:874
639
  msgid "Modify Filter"
640
  msgstr ""
641
 
642
- #: classes/Visualizer/Render/Layout.php:874
643
  msgid "Create Filter"
644
  msgstr ""
645
 
646
- #: classes/Visualizer/Render/Layout.php:914
647
  msgid "Import from database"
648
  msgstr ""
649
 
650
- #: classes/Visualizer/Render/Layout.php:918
651
  msgid "You can import data from the database here."
652
  msgstr ""
653
 
654
- #: classes/Visualizer/Render/Layout.php:920
655
  msgid "How often do you want to refresh the data from the database."
656
  msgstr ""
657
 
658
- #: classes/Visualizer/Render/Layout.php:923
659
  msgid "Modify Query"
660
  msgstr ""
661
 
662
- #: classes/Visualizer/Render/Layout.php:923
663
  msgid "Create Query"
664
  msgstr ""
665
 
666
- #: classes/Visualizer/Render/Layout.php:954
667
  msgid "Manual Data"
668
  msgstr ""
669
 
670
- #: classes/Visualizer/Render/Layout.php:965
671
  msgid "Use the"
672
  msgstr ""
673
 
674
- #: classes/Visualizer/Render/Layout.php:971
675
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Pie.php:216
676
  msgid "Text"
677
  msgstr ""
678
 
679
- #: classes/Visualizer/Render/Layout.php:971
680
  msgid "Simple"
681
  msgstr ""
682
 
683
- #: classes/Visualizer/Render/Layout.php:976
684
  msgid "editor to manually edit the chart data."
685
  msgstr ""
686
 
687
- #: classes/Visualizer/Render/Layout.php:978
688
- #: classes/Visualizer/Render/Layout.php:987
689
  msgid "Undo Changes"
690
  msgstr ""
691
 
692
- #: classes/Visualizer/Render/Layout.php:980
693
- #: classes/Visualizer/Render/Layout.php:982
694
  msgid "Edit Data"
695
  msgstr ""
696
 
697
- #: classes/Visualizer/Render/Layout.php:984
698
- #: classes/Visualizer/Render/Layout.php:993
699
  msgid "Please make sure you click 'Show Chart' before you save the chart."
700
  msgstr ""
701
 
702
- #: classes/Visualizer/Render/Layout.php:989
703
- #: classes/Visualizer/Render/Layout.php:991
704
  msgid "View Editor"
705
  msgstr ""
706
 
@@ -773,7 +808,7 @@ msgstr ""
773
  #: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:132
774
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:74
775
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:60
776
- #: classes/Visualizer/Render/Sidebar.php:296
777
  msgid "Title"
778
  msgstr ""
779
 
@@ -814,68 +849,68 @@ msgstr ""
814
  msgid "Clone"
815
  msgstr ""
816
 
817
- #: classes/Visualizer/Render/Library.php:337
818
- msgid "Edit"
819
- msgstr ""
820
-
821
  #: classes/Visualizer/Render/Library.php:338
822
  msgid "Export"
823
  msgstr ""
824
 
825
- #: classes/Visualizer/Render/Library.php:339
 
 
 
 
826
  #: classes/Visualizer/Render/Templates.php:68
827
  msgid "Click to select"
828
  msgstr ""
829
 
830
- #: classes/Visualizer/Render/Library.php:342
831
  msgid "Last Updated"
832
  msgstr ""
833
 
834
- #: classes/Visualizer/Render/Library.php:354
835
  msgid "Discover the power of PRO!"
836
  msgstr ""
837
 
838
- #: classes/Visualizer/Render/Library.php:355
839
  msgid "Spreadsheet like editor"
840
  msgstr ""
841
 
842
- #: classes/Visualizer/Render/Library.php:356
843
  msgid "Import from other charts"
844
  msgstr ""
845
 
846
- #: classes/Visualizer/Render/Library.php:357
847
  msgid "Use database query to create charts"
848
  msgstr ""
849
 
850
- #: classes/Visualizer/Render/Library.php:358
851
  msgid "Create charts from WordPress tables"
852
  msgstr ""
853
 
854
- #: classes/Visualizer/Render/Library.php:359
855
  msgid "Frontend editor"
856
  msgstr ""
857
 
858
- #: classes/Visualizer/Render/Library.php:360
859
  msgid "Private charts"
860
  msgstr ""
861
 
862
- #: classes/Visualizer/Render/Library.php:361
863
  msgid "Auto-sync with online files"
864
  msgstr ""
865
 
866
- #: classes/Visualizer/Render/Library.php:362
867
  msgid "6 more chart types"
868
  msgstr ""
869
 
870
- #: classes/Visualizer/Render/Library.php:363
871
  msgid "View more features"
872
  msgstr ""
873
 
874
- #: classes/Visualizer/Render/Library.php:364
875
  msgid "We offer a 30-day no-questions-asked money back guarantee!"
876
  msgstr ""
877
 
878
- #: classes/Visualizer/Render/Library.php:365
879
  msgid "Don't see the features you need? Help us improve!"
880
  msgstr ""
881
 
@@ -984,12 +1019,12 @@ msgstr ""
984
  #: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:131
985
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:72
986
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:59
987
- #: classes/Visualizer/Render/Sidebar.php:291
988
  msgid "General Settings"
989
  msgstr ""
990
 
991
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:185
992
- #: classes/Visualizer/Render/Sidebar.php:293
993
  msgid ""
994
  "Configure title, font styles, tooltip, legend and else settings for the "
995
  "chart."
@@ -998,7 +1033,7 @@ msgstr ""
998
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:192
999
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:149
1000
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:251
1001
- #: classes/Visualizer/Render/Sidebar.php:300
1002
  msgid "Font Styles"
1003
  msgstr ""
1004
 
@@ -1006,27 +1041,27 @@ msgstr ""
1006
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:246
1007
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:160
1008
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:262
1009
- #: classes/Visualizer/Render/Sidebar.php:303
1010
  msgid "Family And Size"
1011
  msgstr ""
1012
 
1013
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:221
1014
- #: classes/Visualizer/Render/Sidebar.php:329
1015
  msgid "The default font family and size for all text in the chart."
1016
  msgstr ""
1017
 
1018
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:226
1019
- #: classes/Visualizer/Render/Sidebar.php:334
1020
  msgid "Legend"
1021
  msgstr ""
1022
 
1023
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:228
1024
- #: classes/Visualizer/Render/Sidebar.php:336
1025
  msgid "Position"
1026
  msgstr ""
1027
 
1028
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:233
1029
- #: classes/Visualizer/Render/Sidebar.php:340
1030
  msgid "Determines where to place the legend, compared to the chart area."
1031
  msgstr ""
1032
 
@@ -1041,39 +1076,39 @@ msgstr ""
1041
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:272
1042
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:152
1043
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:254
1044
- #: classes/Visualizer/Render/Sidebar.php:352
1045
  msgid "Font Color"
1046
  msgstr ""
1047
 
1048
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:282
1049
  #: classes/Visualizer/Render/Sidebar/Google.php:106
1050
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:165
1051
- #: classes/Visualizer/Render/Sidebar.php:359
1052
  msgid "Tooltip"
1053
  msgstr ""
1054
 
1055
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:301
1056
- #: classes/Visualizer/Render/Sidebar.php:380
1057
  msgid "Animation"
1058
  msgstr ""
1059
 
1060
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:304
1061
- #: classes/Visualizer/Render/Sidebar.php:391
1062
  msgid "Duration"
1063
  msgstr ""
1064
 
1065
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:307
1066
- #: classes/Visualizer/Render/Sidebar.php:394
1067
  msgid "The duration of the animation, in milliseconds"
1068
  msgstr ""
1069
 
1070
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:314
1071
- #: classes/Visualizer/Render/Sidebar.php:400
1072
  msgid "Easing"
1073
  msgstr ""
1074
 
1075
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:318
1076
- #: classes/Visualizer/Render/Sidebar.php:404
1077
  msgid "Constant speed"
1078
  msgstr ""
1079
 
@@ -1122,13 +1157,13 @@ msgid "easeOutQuint"
1122
  msgstr ""
1123
 
1124
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:331
1125
- #: classes/Visualizer/Render/Sidebar.php:409
1126
  msgid "The easing function applied to the animation."
1127
  msgstr ""
1128
 
1129
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:347
1130
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:180
1131
- #: classes/Visualizer/Render/Sidebar.php:425
1132
  msgid "Trigger"
1133
  msgstr ""
1134
 
@@ -1153,7 +1188,7 @@ msgstr ""
1153
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:383
1154
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:259
1155
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:363
1156
- #: classes/Visualizer/Render/Sidebar.php:456
1157
  msgid ""
1158
  "Configure the total size of the chart. Two formats are supported: a number, "
1159
  "or a number followed by %. A simple number is a value in pixels; a number "
@@ -1163,14 +1198,14 @@ msgstr ""
1163
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:387
1164
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:263
1165
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:367
1166
- #: classes/Visualizer/Render/Sidebar.php:460
1167
  msgid "Width And Height Of Chart"
1168
  msgstr ""
1169
 
1170
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:401
1171
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:277
1172
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:381
1173
- #: classes/Visualizer/Render/Sidebar.php:474
1174
  msgid ""
1175
  "Determines the total width and height of the chart. This will only show in "
1176
  "the front-end."
@@ -1473,7 +1508,7 @@ msgstr ""
1473
  #: classes/Visualizer/Render/Sidebar/Graph.php:447
1474
  #: classes/Visualizer/Render/Sidebar/Graph.php:476
1475
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Pie.php:62
1476
- #: classes/Visualizer/Render/Sidebar.php:743
1477
  msgid "Number Format"
1478
  msgstr ""
1479
 
@@ -1933,7 +1968,7 @@ msgstr ""
1933
  #: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:331
1934
  #: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:363
1935
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:414
1936
- #: classes/Visualizer/Render/Sidebar.php:499
1937
  msgid "Background Color"
1938
  msgstr ""
1939
 
@@ -2011,6 +2046,26 @@ msgid ""
2011
  "here%2$s."
2012
  msgstr ""
2013
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2014
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Area.php:73
2015
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Area.php:137
2016
  msgid "Area Opacity"
@@ -2047,7 +2102,7 @@ msgstr ""
2047
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Candlestick.php:110
2048
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Candlestick.php:134
2049
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:407
2050
- #: classes/Visualizer/Render/Sidebar.php:491
2051
  msgid "Stroke Color"
2052
  msgstr ""
2053
 
@@ -2093,7 +2148,7 @@ msgstr ""
2093
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Candlestick.php:102
2094
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Candlestick.php:126
2095
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:399
2096
- #: classes/Visualizer/Render/Sidebar.php:483
2097
  msgid "Stroke Width"
2098
  msgstr ""
2099
 
@@ -2297,17 +2352,17 @@ msgid "Markers"
2297
  msgstr ""
2298
 
2299
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:185
2300
- #: classes/Visualizer/Render/Sidebar.php:430
2301
  msgid "The tooltip will be displayed when the user hovers over an element"
2302
  msgstr ""
2303
 
2304
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:186
2305
- #: classes/Visualizer/Render/Sidebar.php:432
2306
  msgid "The tooltip will not be displayed"
2307
  msgstr ""
2308
 
2309
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:188
2310
- #: classes/Visualizer/Render/Sidebar.php:434
2311
  msgid "Determines the user interaction that causes the tooltip to be displayed."
2312
  msgstr ""
2313
 
@@ -2420,14 +2475,14 @@ msgid ""
2420
  msgstr ""
2421
 
2422
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:396
2423
- #: classes/Visualizer/Render/Sidebar.php:480
2424
  msgid ""
2425
  "Configure the background color for the main area of the chart and the chart "
2426
  "border width and color."
2427
  msgstr ""
2428
 
2429
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:402
2430
- #: classes/Visualizer/Render/Sidebar.php:486
2431
  msgid "The chart border width in pixels."
2432
  msgstr ""
2433
 
@@ -2620,6 +2675,7 @@ msgstr ""
2620
  #: classes/Visualizer/Render/Sidebar.php:242
2621
  #: classes/Visualizer/Render/Sidebar.php:252
2622
  #: classes/Visualizer/Render/Sidebar.php:260
 
2623
  msgid "Upgrade to at least WordPress 4.7 to use this."
2624
  msgstr ""
2625
 
@@ -2643,65 +2699,77 @@ msgstr ""
2643
  msgid "To enable copying the data to the clipboard."
2644
  msgstr ""
2645
 
2646
- #: classes/Visualizer/Render/Sidebar.php:344
 
 
 
 
 
 
 
 
 
 
 
 
2647
  msgid "Alignment"
2648
  msgstr ""
2649
 
2650
- #: classes/Visualizer/Render/Sidebar.php:348
2651
  msgid "Determines the alignment of the legend."
2652
  msgstr ""
2653
 
2654
- #: classes/Visualizer/Render/Sidebar.php:383
2655
  msgid "Animate on startup"
2656
  msgstr ""
2657
 
2658
- #: classes/Visualizer/Render/Sidebar.php:387
2659
  msgid "Determines if the chart will animate on the initial draw."
2660
  msgstr ""
2661
 
2662
- #: classes/Visualizer/Render/Sidebar.php:405
2663
  msgid "Start slow and speed up"
2664
  msgstr ""
2665
 
2666
- #: classes/Visualizer/Render/Sidebar.php:406
2667
  msgid "Start fast and slow down"
2668
  msgstr ""
2669
 
2670
- #: classes/Visualizer/Render/Sidebar.php:407
2671
  msgid "Start slow, speed up, then slow down"
2672
  msgstr ""
2673
 
2674
- #: classes/Visualizer/Render/Sidebar.php:431
2675
  msgid "The tooltip will be displayed when the user selects an element"
2676
  msgstr ""
2677
 
2678
- #: classes/Visualizer/Render/Sidebar.php:438
2679
  msgid "Show Color Code"
2680
  msgstr ""
2681
 
2682
- #: classes/Visualizer/Render/Sidebar.php:442
2683
  msgid ""
2684
  "If set to yes, will show colored squares next to the slice information in "
2685
  "the tooltip."
2686
  msgstr ""
2687
 
2688
- #: classes/Visualizer/Render/Sidebar.php:454
2689
  msgid "Chart Size & Placement"
2690
  msgstr ""
2691
 
2692
- #: classes/Visualizer/Render/Sidebar.php:455
2693
  msgid "Chart Size/Layout"
2694
  msgstr ""
2695
 
2696
- #: classes/Visualizer/Render/Sidebar.php:508
2697
  msgid "Transparent background"
2698
  msgstr ""
2699
 
2700
- #: classes/Visualizer/Render/Sidebar.php:513
2701
  msgid "Placement"
2702
  msgstr ""
2703
 
2704
- #: classes/Visualizer/Render/Sidebar.php:514
2705
  msgid ""
2706
  "Configure the placement and size of the chart area (where the chart itself "
2707
  "is drawn, excluding axis and legends). Two formats are supported: a number, "
@@ -2709,27 +2777,27 @@ msgid ""
2709
  "followed by % is a percentage."
2710
  msgstr ""
2711
 
2712
- #: classes/Visualizer/Render/Sidebar.php:518
2713
  msgid "Left And Top Margins"
2714
  msgstr ""
2715
 
2716
- #: classes/Visualizer/Render/Sidebar.php:532
2717
  msgid "Determines how far to draw the chart from the left and top borders."
2718
  msgstr ""
2719
 
2720
- #: classes/Visualizer/Render/Sidebar.php:538
2721
  msgid "Width And Height Of Chart Area"
2722
  msgstr ""
2723
 
2724
- #: classes/Visualizer/Render/Sidebar.php:552
2725
  msgid "Determines the width and hight of the chart area."
2726
  msgstr ""
2727
 
2728
- #: classes/Visualizer/Render/Sidebar.php:614
2729
  msgid "Hex Value"
2730
  msgstr ""
2731
 
2732
- #: classes/Visualizer/Render/Sidebar.php:746
2733
  msgid ""
2734
  "Enter custom format pattern to apply to this series value, similar to the "
2735
  "%1$sICU pattern set%2$s. Use something like #,### to get 1,234 as output, "
@@ -2737,11 +2805,11 @@ msgid ""
2737
  "percentage format then your values will be multiplied by 100."
2738
  msgstr ""
2739
 
2740
- #: classes/Visualizer/Render/Sidebar.php:754
2741
  msgid "Date Format"
2742
  msgstr ""
2743
 
2744
- #: classes/Visualizer/Render/Sidebar.php:757
2745
  msgid ""
2746
  "Enter custom format pattern to apply to this series value, similar to the "
2747
  "%1$sICU date and time format%2$s."
4
  msgstr ""
5
  "Project-Id-Version: Visualizer: Tables and Charts for WordPress 3.4.3\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Codeinwp/visualizer/issues\n"
7
+ "POT-Creation-Date: 2020-05-14 10:10:00+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
30
  msgid "Unable to fetch data from the endpoint. Please try again."
31
  msgstr ""
32
 
33
+ #: classes/Visualizer/Module/Admin.php:115
34
  msgid "PRO"
35
  msgstr ""
36
 
37
+ #: classes/Visualizer/Module/Admin.php:119
38
  msgid "Developer"
39
  msgstr ""
40
 
41
+ #: classes/Visualizer/Module/Admin.php:125
42
  msgid "Live"
43
  msgstr ""
44
 
45
+ #: classes/Visualizer/Module/Admin.php:126
46
  msgid "Each hour"
47
  msgstr ""
48
 
49
+ #: classes/Visualizer/Module/Admin.php:127
50
  msgid "Each 12 hours"
51
  msgstr ""
52
 
53
+ #: classes/Visualizer/Module/Admin.php:128
54
  msgid "Each day"
55
  msgstr ""
56
 
57
+ #: classes/Visualizer/Module/Admin.php:129
58
  msgid "Each 3 days"
59
  msgstr ""
60
 
61
+ #: classes/Visualizer/Module/Admin.php:148
62
  msgid "More in the %s version"
63
  msgstr ""
64
 
65
+ #: classes/Visualizer/Module/Admin.php:329
66
  msgid "Insert"
67
  msgstr ""
68
 
69
+ #: classes/Visualizer/Module/Admin.php:357
70
  msgid "Visualizations"
71
  msgstr ""
72
 
73
+ #: classes/Visualizer/Module/Admin.php:360
74
  msgid "From Library"
75
  msgstr ""
76
 
77
+ #: classes/Visualizer/Module/Admin.php:361
78
  msgid "Create New"
79
  msgstr ""
80
 
81
+ #: classes/Visualizer/Module/Admin.php:387
82
  msgid "All"
83
  msgstr ""
84
 
85
+ #: classes/Visualizer/Module/Admin.php:396
86
+ #: classes/Visualizer/Module/Admin.php:532
87
+ #: classes/Visualizer/Module/Admin.php:534
88
+ #: classes/Visualizer/Module/Admin.php:562
89
+ #: classes/Visualizer/Module/Admin.php:564
90
  msgid "Table"
91
  msgstr ""
92
 
93
+ #: classes/Visualizer/Module/Admin.php:401
94
  msgid "Pie/Donut"
95
  msgstr ""
96
 
97
+ #: classes/Visualizer/Module/Admin.php:406
98
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Line.php:24
99
  msgid "Line"
100
  msgstr ""
101
 
102
+ #: classes/Visualizer/Module/Admin.php:411
103
  msgid "Area"
104
  msgstr ""
105
 
106
+ #: classes/Visualizer/Module/Admin.php:417
107
  msgid "Geo"
108
  msgstr ""
109
 
110
+ #: classes/Visualizer/Module/Admin.php:422
111
  msgid "Bar"
112
  msgstr ""
113
 
114
+ #: classes/Visualizer/Module/Admin.php:427
115
  msgid "Column"
116
  msgstr ""
117
 
118
+ #: classes/Visualizer/Module/Admin.php:432
119
  msgid "Bubble"
120
  msgstr ""
121
 
122
+ #: classes/Visualizer/Module/Admin.php:438
123
  msgid "Scatter"
124
  msgstr ""
125
 
126
+ #: classes/Visualizer/Module/Admin.php:443
127
  msgid "Gauge"
128
  msgstr ""
129
 
130
+ #: classes/Visualizer/Module/Admin.php:448
131
  msgid "Candlestick"
132
  msgstr ""
133
 
134
+ #: classes/Visualizer/Module/Admin.php:454
135
  msgid "Table (Deprecated)"
136
  msgstr ""
137
 
138
+ #: classes/Visualizer/Module/Admin.php:459
139
  msgid "Timeline"
140
  msgstr ""
141
 
142
+ #: classes/Visualizer/Module/Admin.php:464
143
  msgid "Combo"
144
  msgstr ""
145
 
146
+ #: classes/Visualizer/Module/Admin.php:469
147
  msgid "Polar Area"
148
  msgstr ""
149
 
150
+ #: classes/Visualizer/Module/Admin.php:474
151
  msgid "Radar/Spider"
152
  msgstr ""
153
 
154
+ #: classes/Visualizer/Module/Admin.php:687
155
  msgid "Visualizer"
156
  msgstr ""
157
 
158
+ #: classes/Visualizer/Module/Admin.php:691
159
  #: classes/Visualizer/Module/Admin.php:692
 
160
  msgid "Chart Library"
161
  msgstr ""
162
 
163
+ #: classes/Visualizer/Module/Admin.php:698
164
  #: classes/Visualizer/Module/Admin.php:699
 
165
  msgid "Add New Chart"
166
  msgstr ""
167
 
168
+ #: classes/Visualizer/Module/Admin.php:705
169
+ #: classes/Visualizer/Module/Admin.php:706 templates/support.php:24
170
  msgid "Support"
171
  msgstr ""
172
 
173
+ #: classes/Visualizer/Module/Admin.php:728
174
  msgid "Number of charts per page:"
175
  msgstr ""
176
 
177
+ #: classes/Visualizer/Module/Admin.php:1020
178
  msgid "Library"
179
  msgstr ""
180
 
181
+ #: classes/Visualizer/Module/Admin.php:1045
182
  msgid "Docs"
183
  msgstr ""
184
 
185
+ #: classes/Visualizer/Module/Admin.php:1050
186
  msgid "Pro Addon"
187
  msgstr ""
188
 
239
  msgid "CSV file is broken or invalid. Please try again."
240
  msgstr ""
241
 
242
+ #: classes/Visualizer/Module/Frontend.php:127
243
  #: classes/Visualizer/Render/Sidebar.php:230
244
  msgid "Print"
245
  msgstr ""
246
 
247
+ #: classes/Visualizer/Module/Frontend.php:128
248
+ msgid "Print Chart"
249
+ msgstr ""
250
+
251
+ #: classes/Visualizer/Module/Frontend.php:131
252
  #: classes/Visualizer/Render/Sidebar.php:238
253
  msgid "CSV"
254
  msgstr ""
255
 
256
+ #: classes/Visualizer/Module/Frontend.php:132
257
+ msgid "Download as a CSV"
258
+ msgstr ""
259
+
260
+ #: classes/Visualizer/Module/Frontend.php:135
261
  #: classes/Visualizer/Render/Sidebar.php:248
262
  msgid "Excel"
263
  msgstr ""
264
 
265
+ #: classes/Visualizer/Module/Frontend.php:136
266
+ msgid "Download as a spreadsheet"
267
+ msgstr ""
268
+
269
+ #: classes/Visualizer/Module/Frontend.php:139
270
  #: classes/Visualizer/Render/Sidebar.php:256
271
  msgid "Copy"
272
  msgstr ""
273
 
274
+ #: classes/Visualizer/Module/Frontend.php:140
275
+ msgid "Copy data"
276
+ msgstr ""
277
+
278
+ #: classes/Visualizer/Module/Frontend.php:143
279
+ msgid "Download"
280
+ msgstr ""
281
+
282
+ #: classes/Visualizer/Module/Frontend.php:144
283
+ msgid "Download as an image"
284
+ msgstr ""
285
+
286
+ #: classes/Visualizer/Module/Frontend.php:152
287
+ #: classes/Visualizer/Render/Library.php:337
288
+ msgid "Edit"
289
+ msgstr ""
290
+
291
+ #: classes/Visualizer/Module/Frontend.php:153
292
+ msgid "Edit data"
293
+ msgstr ""
294
+
295
+ #: classes/Visualizer/Module/Frontend.php:172
296
  msgid "Invalid chart ID"
297
  msgstr ""
298
 
299
+ #: classes/Visualizer/Module/Frontend.php:176
300
  msgid "Invalid action"
301
  msgstr ""
302
 
303
+ #: classes/Visualizer/Module/Frontend.php:378
304
+ msgid ""
305
+ "The data has been copied to your clipboard. Hit Ctrl-V/Cmd-V in your "
306
+ "spreadsheet editor to paste the data."
307
  msgstr ""
308
 
309
  #: classes/Visualizer/Module/Sources.php:141
356
  msgid "Use %1$sControl+Space%2$s for autocompleting keywords or table names."
357
  msgstr ""
358
 
359
+ #: classes/Visualizer/Render/Layout.php:157
360
  msgid "STEP 1: Specify the JSON endpoint/URL"
361
  msgstr ""
362
 
363
+ #: classes/Visualizer/Render/Layout.php:162
364
  msgid ""
365
  "If you want to add authentication or headers to the endpoint or change the "
366
  "request in any way, please refer to our document %1$shere%2$s."
367
  msgstr ""
368
 
369
+ #: classes/Visualizer/Render/Layout.php:171
370
  msgid "Please enter the URL"
371
  msgstr ""
372
 
373
+ #: classes/Visualizer/Render/Layout.php:173
374
  msgid "Fetch Endpoint"
375
  msgstr ""
376
 
377
+ #: classes/Visualizer/Render/Layout.php:176
378
  msgid "Headers"
379
  msgstr ""
380
 
381
+ #: classes/Visualizer/Render/Layout.php:179
382
  msgid "Request Type"
383
  msgstr ""
384
 
385
+ #: classes/Visualizer/Render/Layout.php:189
386
  msgid "Credentials"
387
  msgstr ""
388
 
389
+ #: classes/Visualizer/Render/Layout.php:196
390
  msgid "Username/Access Key"
391
  msgstr ""
392
 
393
+ #: classes/Visualizer/Render/Layout.php:204
394
  msgid "Password/Secret Key"
395
  msgstr ""
396
 
397
+ #: classes/Visualizer/Render/Layout.php:210
398
+ #: classes/Visualizer/Render/Layout.php:424
399
  msgid "OR"
400
  msgstr ""
401
 
402
+ #: classes/Visualizer/Render/Layout.php:213
403
  msgid "Authorization"
404
  msgstr ""
405
 
406
+ #: classes/Visualizer/Render/Layout.php:220
407
  msgid "e.g. SharedKey <AccountName>:<Signature>"
408
  msgstr ""
409
 
410
+ #: classes/Visualizer/Render/Layout.php:228
411
  msgid "STEP 2: Choose the JSON root"
412
  msgstr ""
413
 
414
+ #: classes/Visualizer/Render/Layout.php:241
415
  msgid "Parse Endpoint"
416
  msgstr ""
417
 
418
+ #: classes/Visualizer/Render/Layout.php:244
419
  msgid "STEP 3: Specify miscellaneous parameters"
420
  msgstr ""
421
 
422
+ #: classes/Visualizer/Render/Layout.php:250
423
  msgid "Get results from the first page only"
424
  msgstr ""
425
 
426
+ #: classes/Visualizer/Render/Layout.php:274
427
  msgid "STEP 4: Select the data to display in the chart"
428
  msgstr ""
429
 
430
+ #: classes/Visualizer/Render/Layout.php:279
431
  msgid ""
432
  "If you see Invalid Data in the table, you may have selected the wrong root "
433
  "to fetch data from. Please select an alternative from the JSON root "
434
  "dropdown."
435
  msgstr ""
436
 
437
+ #: classes/Visualizer/Render/Layout.php:280
438
+ #: classes/Visualizer/Render/Layout.php:317
439
  msgid ""
440
  "Select whether to include the data in the chart. Each column selected will "
441
  "form one series."
442
  msgstr ""
443
 
444
+ #: classes/Visualizer/Render/Layout.php:281
445
+ #: classes/Visualizer/Render/Layout.php:318
446
  msgid "If a column is selected to be included, specify its data type."
447
  msgstr ""
448
 
449
+ #: classes/Visualizer/Render/Layout.php:282
450
+ #: classes/Visualizer/Render/Layout.php:319
451
  msgid ""
452
  "You can use drag/drop to reorder the columns but this column position is "
453
  "not saved. So when you reload the table, you may have to reorder again."
454
  msgstr ""
455
 
456
+ #: classes/Visualizer/Render/Layout.php:283
457
+ #: classes/Visualizer/Render/Layout.php:320
458
  msgid ""
459
  "You can select any number of columns but the chart type selected will "
460
  "determine how many will display in the chart."
461
  msgstr ""
462
 
463
+ #: classes/Visualizer/Render/Layout.php:284
464
  msgid ""
465
  "Once you have made your selection, click 'Show Chart' on the right to view "
466
  "the chart."
467
  msgstr ""
468
 
469
+ #: classes/Visualizer/Render/Layout.php:398
470
  msgid "Label"
471
  msgstr ""
472
 
473
+ #: classes/Visualizer/Render/Layout.php:412
474
  msgid "Data Type"
475
  msgstr ""
476
 
477
+ #: classes/Visualizer/Render/Layout.php:423
478
  msgid "Exclude from chart"
479
  msgstr ""
480
 
481
+ #: classes/Visualizer/Render/Layout.php:423
482
  msgid "Exclude"
483
  msgstr ""
484
 
485
+ #: classes/Visualizer/Render/Layout.php:424
486
  msgid "Include in chart and select data type"
487
  msgstr ""
488
 
489
+ #: classes/Visualizer/Render/Layout.php:443
490
  msgid "Value"
491
  msgstr ""
492
 
493
+ #: classes/Visualizer/Render/Layout.php:453
494
  msgid "Invalid Data"
495
  msgstr ""
496
 
497
+ #: classes/Visualizer/Render/Layout.php:495
498
  msgid "Permissions"
499
  msgstr ""
500
 
501
+ #: classes/Visualizer/Render/Layout.php:498
502
  msgid "Configure permissions for the chart."
503
  msgstr ""
504
 
505
+ #: classes/Visualizer/Render/Layout.php:501
506
  msgid "Who can see this chart?"
507
  msgstr ""
508
 
509
+ #: classes/Visualizer/Render/Layout.php:507
510
+ #: classes/Visualizer/Render/Layout.php:538
511
  msgid "All Users"
512
  msgstr ""
513
 
514
+ #: classes/Visualizer/Render/Layout.php:508
515
+ #: classes/Visualizer/Render/Layout.php:539
516
  msgid "Select Users"
517
  msgstr ""
518
 
519
+ #: classes/Visualizer/Render/Layout.php:509
520
+ #: classes/Visualizer/Render/Layout.php:540
521
  msgid "Select Roles"
522
  msgstr ""
523
 
524
+ #: classes/Visualizer/Render/Layout.php:532
525
  msgid "Who can edit this chart?"
526
  msgstr ""
527
 
528
+ #: classes/Visualizer/Render/Layout.php:620
529
  msgid "Documentation"
530
  msgstr ""
531
 
532
+ #: classes/Visualizer/Render/Layout.php:621
533
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Bar.php:73
534
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Pie.php:102
535
  msgid "General"
536
  msgstr ""
537
 
538
+ #: classes/Visualizer/Render/Layout.php:623
539
  msgid "Main documentation page"
540
  msgstr ""
541
 
542
+ #: classes/Visualizer/Render/Layout.php:624
543
  msgid "Custom code snippets"
544
  msgstr ""
545
 
546
+ #: classes/Visualizer/Render/Layout.php:627
547
  msgid "%s chart"
548
  msgstr ""
549
 
550
+ #: classes/Visualizer/Render/Layout.php:629
551
  msgid "View demo"
552
  msgstr ""
553
 
554
+ #: classes/Visualizer/Render/Layout.php:630
555
  msgid "Articles containing \"%s\""
556
  msgstr ""
557
 
558
+ #: classes/Visualizer/Render/Layout.php:681
559
  msgid "Import data from file"
560
  msgstr ""
561
 
562
+ #: classes/Visualizer/Render/Layout.php:683
563
  msgid ""
564
  "Select and upload your data CSV file here. The first row of the CSV file "
565
  "should contain the column headings. The second one should contain series "
566
  "type (string, number, boolean, date, datetime, timeofday)."
567
  msgstr ""
568
 
569
+ #: classes/Visualizer/Render/Layout.php:684
570
+ #: classes/Visualizer/Render/Layout.php:705
571
  msgid ""
572
  "If you are unsure about how to format your data CSV then please take a look "
573
  "at this sample: %1$s %2$s%3$s. If you are using non-English characters, "
574
  "please make sure you save the file in UTF-8 encoding."
575
  msgstr ""
576
 
577
+ #: classes/Visualizer/Render/Layout.php:692
578
+ #: classes/Visualizer/Render/Layout.php:735
579
  msgid "Import"
580
  msgstr ""
581
 
582
+ #: classes/Visualizer/Render/Layout.php:698
583
  msgid "Import data from URL"
584
  msgstr ""
585
 
586
+ #: classes/Visualizer/Render/Layout.php:702
587
  msgid "Import from CSV"
588
  msgstr ""
589
 
590
+ #: classes/Visualizer/Render/Layout.php:704
591
  msgid ""
592
  "You can use this to import data from a remote CSV file or %1$sGoogle "
593
  "Spreadsheet%2$s."
594
  msgstr ""
595
 
596
+ #: classes/Visualizer/Render/Layout.php:709
597
  msgid "Please enter the URL of CSV file"
598
  msgstr ""
599
 
600
+ #: classes/Visualizer/Render/Layout.php:716
601
+ #: classes/Visualizer/Render/Layout.php:763
602
+ #: classes/Visualizer/Render/Layout.php:881
603
+ #: classes/Visualizer/Render/Layout.php:930
604
  msgid "One-time"
605
  msgstr ""
606
 
607
+ #: classes/Visualizer/Render/Layout.php:739
608
  msgid "Import & Save schedule"
609
  msgstr ""
610
 
611
+ #: classes/Visualizer/Render/Layout.php:748
612
  msgid "Import from JSON"
613
  msgstr ""
614
 
615
+ #: classes/Visualizer/Render/Layout.php:750
616
  msgid ""
617
  "You can choose here to import/synchronize your chart data with a remote "
618
  "JSON source. For more info check <a "
620
  "json-data-rest-endpoints\" target=\"_blank\" >this</a> tutorial"
621
  msgstr ""
622
 
623
+ #: classes/Visualizer/Render/Layout.php:754
624
  msgid "Modify Parameters"
625
  msgstr ""
626
 
627
+ #: classes/Visualizer/Render/Layout.php:754
628
  msgid "Create Parameters"
629
  msgstr ""
630
 
631
+ #: classes/Visualizer/Render/Layout.php:757
632
  msgid "How often do you want to check the URL"
633
  msgstr ""
634
 
635
+ #: classes/Visualizer/Render/Layout.php:785
636
+ #: classes/Visualizer/Render/Layout.php:897
637
+ #: classes/Visualizer/Render/Layout.php:947
638
+ #: classes/Visualizer/Render/Layout.php:984
639
+ #: classes/Visualizer/Render/Layout.php:993
640
  msgid "Show Chart"
641
  msgstr ""
642
 
643
+ #: classes/Visualizer/Render/Layout.php:791
644
+ #: classes/Visualizer/Render/Layout.php:898
645
+ #: classes/Visualizer/Render/Layout.php:948
646
  msgid "Save Schedule"
647
  msgstr ""
648
 
649
+ #: classes/Visualizer/Render/Layout.php:803
650
  msgid "Import from other chart"
651
  msgstr ""
652
 
653
+ #: classes/Visualizer/Render/Layout.php:807
654
  msgid "You can import here data from your previously created charts"
655
  msgstr ""
656
 
657
+ #: classes/Visualizer/Render/Layout.php:850
658
  msgid "Import Chart"
659
  msgstr ""
660
 
661
+ #: classes/Visualizer/Render/Layout.php:868
662
  msgid "Import from WordPress"
663
  msgstr ""
664
 
665
+ #: classes/Visualizer/Render/Layout.php:872
666
  msgid "You can import data from WordPress here."
667
  msgstr ""
668
 
669
+ #: classes/Visualizer/Render/Layout.php:874
670
  msgid "How often do you want to refresh the data from WordPress."
671
  msgstr ""
672
 
673
+ #: classes/Visualizer/Render/Layout.php:877
674
  msgid "Modify Filter"
675
  msgstr ""
676
 
677
+ #: classes/Visualizer/Render/Layout.php:877
678
  msgid "Create Filter"
679
  msgstr ""
680
 
681
+ #: classes/Visualizer/Render/Layout.php:917
682
  msgid "Import from database"
683
  msgstr ""
684
 
685
+ #: classes/Visualizer/Render/Layout.php:921
686
  msgid "You can import data from the database here."
687
  msgstr ""
688
 
689
+ #: classes/Visualizer/Render/Layout.php:923
690
  msgid "How often do you want to refresh the data from the database."
691
  msgstr ""
692
 
693
+ #: classes/Visualizer/Render/Layout.php:926
694
  msgid "Modify Query"
695
  msgstr ""
696
 
697
+ #: classes/Visualizer/Render/Layout.php:926
698
  msgid "Create Query"
699
  msgstr ""
700
 
701
+ #: classes/Visualizer/Render/Layout.php:957
702
  msgid "Manual Data"
703
  msgstr ""
704
 
705
+ #: classes/Visualizer/Render/Layout.php:968
706
  msgid "Use the"
707
  msgstr ""
708
 
709
+ #: classes/Visualizer/Render/Layout.php:974
710
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Pie.php:216
711
  msgid "Text"
712
  msgstr ""
713
 
714
+ #: classes/Visualizer/Render/Layout.php:974
715
  msgid "Simple"
716
  msgstr ""
717
 
718
+ #: classes/Visualizer/Render/Layout.php:979
719
  msgid "editor to manually edit the chart data."
720
  msgstr ""
721
 
722
+ #: classes/Visualizer/Render/Layout.php:981
723
+ #: classes/Visualizer/Render/Layout.php:990
724
  msgid "Undo Changes"
725
  msgstr ""
726
 
727
+ #: classes/Visualizer/Render/Layout.php:983
728
+ #: classes/Visualizer/Render/Layout.php:985
729
  msgid "Edit Data"
730
  msgstr ""
731
 
732
+ #: classes/Visualizer/Render/Layout.php:987
733
+ #: classes/Visualizer/Render/Layout.php:996
734
  msgid "Please make sure you click 'Show Chart' before you save the chart."
735
  msgstr ""
736
 
737
+ #: classes/Visualizer/Render/Layout.php:992
738
+ #: classes/Visualizer/Render/Layout.php:994
739
  msgid "View Editor"
740
  msgstr ""
741
 
808
  #: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:132
809
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:74
810
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:60
811
+ #: classes/Visualizer/Render/Sidebar.php:307
812
  msgid "Title"
813
  msgstr ""
814
 
849
  msgid "Clone"
850
  msgstr ""
851
 
 
 
 
 
852
  #: classes/Visualizer/Render/Library.php:338
853
  msgid "Export"
854
  msgstr ""
855
 
856
+ #: classes/Visualizer/Render/Library.php:340
857
+ msgid "Download as image"
858
+ msgstr ""
859
+
860
+ #: classes/Visualizer/Render/Library.php:342
861
  #: classes/Visualizer/Render/Templates.php:68
862
  msgid "Click to select"
863
  msgstr ""
864
 
865
+ #: classes/Visualizer/Render/Library.php:345
866
  msgid "Last Updated"
867
  msgstr ""
868
 
869
+ #: classes/Visualizer/Render/Library.php:357
870
  msgid "Discover the power of PRO!"
871
  msgstr ""
872
 
873
+ #: classes/Visualizer/Render/Library.php:358
874
  msgid "Spreadsheet like editor"
875
  msgstr ""
876
 
877
+ #: classes/Visualizer/Render/Library.php:359
878
  msgid "Import from other charts"
879
  msgstr ""
880
 
881
+ #: classes/Visualizer/Render/Library.php:360
882
  msgid "Use database query to create charts"
883
  msgstr ""
884
 
885
+ #: classes/Visualizer/Render/Library.php:361
886
  msgid "Create charts from WordPress tables"
887
  msgstr ""
888
 
889
+ #: classes/Visualizer/Render/Library.php:362
890
  msgid "Frontend editor"
891
  msgstr ""
892
 
893
+ #: classes/Visualizer/Render/Library.php:363
894
  msgid "Private charts"
895
  msgstr ""
896
 
897
+ #: classes/Visualizer/Render/Library.php:364
898
  msgid "Auto-sync with online files"
899
  msgstr ""
900
 
901
+ #: classes/Visualizer/Render/Library.php:365
902
  msgid "6 more chart types"
903
  msgstr ""
904
 
905
+ #: classes/Visualizer/Render/Library.php:366
906
  msgid "View more features"
907
  msgstr ""
908
 
909
+ #: classes/Visualizer/Render/Library.php:367
910
  msgid "We offer a 30-day no-questions-asked money back guarantee!"
911
  msgstr ""
912
 
913
+ #: classes/Visualizer/Render/Library.php:368
914
  msgid "Don't see the features you need? Help us improve!"
915
  msgstr ""
916
 
1019
  #: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:131
1020
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:72
1021
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:59
1022
+ #: classes/Visualizer/Render/Sidebar.php:302
1023
  msgid "General Settings"
1024
  msgstr ""
1025
 
1026
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:185
1027
+ #: classes/Visualizer/Render/Sidebar.php:304
1028
  msgid ""
1029
  "Configure title, font styles, tooltip, legend and else settings for the "
1030
  "chart."
1033
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:192
1034
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:149
1035
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:251
1036
+ #: classes/Visualizer/Render/Sidebar.php:311
1037
  msgid "Font Styles"
1038
  msgstr ""
1039
 
1041
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:246
1042
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:160
1043
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:262
1044
+ #: classes/Visualizer/Render/Sidebar.php:314
1045
  msgid "Family And Size"
1046
  msgstr ""
1047
 
1048
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:221
1049
+ #: classes/Visualizer/Render/Sidebar.php:340
1050
  msgid "The default font family and size for all text in the chart."
1051
  msgstr ""
1052
 
1053
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:226
1054
+ #: classes/Visualizer/Render/Sidebar.php:345
1055
  msgid "Legend"
1056
  msgstr ""
1057
 
1058
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:228
1059
+ #: classes/Visualizer/Render/Sidebar.php:347
1060
  msgid "Position"
1061
  msgstr ""
1062
 
1063
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:233
1064
+ #: classes/Visualizer/Render/Sidebar.php:351
1065
  msgid "Determines where to place the legend, compared to the chart area."
1066
  msgstr ""
1067
 
1076
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:272
1077
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:152
1078
  #: classes/Visualizer/Render/Sidebar/Type/ChartJS/Linear.php:254
1079
+ #: classes/Visualizer/Render/Sidebar.php:363
1080
  msgid "Font Color"
1081
  msgstr ""
1082
 
1083
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:282
1084
  #: classes/Visualizer/Render/Sidebar/Google.php:106
1085
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:165
1086
+ #: classes/Visualizer/Render/Sidebar.php:370
1087
  msgid "Tooltip"
1088
  msgstr ""
1089
 
1090
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:301
1091
+ #: classes/Visualizer/Render/Sidebar.php:391
1092
  msgid "Animation"
1093
  msgstr ""
1094
 
1095
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:304
1096
+ #: classes/Visualizer/Render/Sidebar.php:402
1097
  msgid "Duration"
1098
  msgstr ""
1099
 
1100
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:307
1101
+ #: classes/Visualizer/Render/Sidebar.php:405
1102
  msgid "The duration of the animation, in milliseconds"
1103
  msgstr ""
1104
 
1105
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:314
1106
+ #: classes/Visualizer/Render/Sidebar.php:411
1107
  msgid "Easing"
1108
  msgstr ""
1109
 
1110
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:318
1111
+ #: classes/Visualizer/Render/Sidebar.php:415
1112
  msgid "Constant speed"
1113
  msgstr ""
1114
 
1157
  msgstr ""
1158
 
1159
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:331
1160
+ #: classes/Visualizer/Render/Sidebar.php:420
1161
  msgid "The easing function applied to the animation."
1162
  msgstr ""
1163
 
1164
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:347
1165
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:180
1166
+ #: classes/Visualizer/Render/Sidebar.php:436
1167
  msgid "Trigger"
1168
  msgstr ""
1169
 
1188
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:383
1189
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:259
1190
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:363
1191
+ #: classes/Visualizer/Render/Sidebar.php:467
1192
  msgid ""
1193
  "Configure the total size of the chart. Two formats are supported: a number, "
1194
  "or a number followed by %. A simple number is a value in pixels; a number "
1198
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:387
1199
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:263
1200
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:367
1201
+ #: classes/Visualizer/Render/Sidebar.php:471
1202
  msgid "Width And Height Of Chart"
1203
  msgstr ""
1204
 
1205
  #: classes/Visualizer/Render/Sidebar/ChartJS.php:401
1206
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Gauge.php:277
1207
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:381
1208
+ #: classes/Visualizer/Render/Sidebar.php:485
1209
  msgid ""
1210
  "Determines the total width and height of the chart. This will only show in "
1211
  "the front-end."
1508
  #: classes/Visualizer/Render/Sidebar/Graph.php:447
1509
  #: classes/Visualizer/Render/Sidebar/Graph.php:476
1510
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Pie.php:62
1511
+ #: classes/Visualizer/Render/Sidebar.php:754
1512
  msgid "Number Format"
1513
  msgstr ""
1514
 
1968
  #: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:331
1969
  #: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:363
1970
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:414
1971
+ #: classes/Visualizer/Render/Sidebar.php:510
1972
  msgid "Background Color"
1973
  msgstr ""
1974
 
2046
  "here%2$s."
2047
  msgstr ""
2048
 
2049
+ #: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:482
2050
+ msgid "Truthy value"
2051
+ msgstr ""
2052
+
2053
+ #: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:485
2054
+ msgid ""
2055
+ "Provide the HTML entity code for the value the table should display when "
2056
+ "the value of the column is true. e.g. %1$s (Code: %2$s) instead of true"
2057
+ msgstr ""
2058
+
2059
+ #: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:489
2060
+ msgid "Falsy value"
2061
+ msgstr ""
2062
+
2063
+ #: classes/Visualizer/Render/Sidebar/Type/DataTable/DataTable.php:492
2064
+ msgid ""
2065
+ "Provide the HTML entity code for the value the table should display when "
2066
+ "the value of the column is false. e.g. %1$s (Code: %2$s) instead of false"
2067
+ msgstr ""
2068
+
2069
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Area.php:73
2070
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Area.php:137
2071
  msgid "Area Opacity"
2102
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Candlestick.php:110
2103
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Candlestick.php:134
2104
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:407
2105
+ #: classes/Visualizer/Render/Sidebar.php:502
2106
  msgid "Stroke Color"
2107
  msgstr ""
2108
 
2148
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Candlestick.php:102
2149
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Candlestick.php:126
2150
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:399
2151
+ #: classes/Visualizer/Render/Sidebar.php:494
2152
  msgid "Stroke Width"
2153
  msgstr ""
2154
 
2352
  msgstr ""
2353
 
2354
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:185
2355
+ #: classes/Visualizer/Render/Sidebar.php:441
2356
  msgid "The tooltip will be displayed when the user hovers over an element"
2357
  msgstr ""
2358
 
2359
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:186
2360
+ #: classes/Visualizer/Render/Sidebar.php:443
2361
  msgid "The tooltip will not be displayed"
2362
  msgstr ""
2363
 
2364
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:188
2365
+ #: classes/Visualizer/Render/Sidebar.php:445
2366
  msgid "Determines the user interaction that causes the tooltip to be displayed."
2367
  msgstr ""
2368
 
2475
  msgstr ""
2476
 
2477
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:396
2478
+ #: classes/Visualizer/Render/Sidebar.php:491
2479
  msgid ""
2480
  "Configure the background color for the main area of the chart and the chart "
2481
  "border width and color."
2482
  msgstr ""
2483
 
2484
  #: classes/Visualizer/Render/Sidebar/Type/GoogleCharts/Geo.php:402
2485
+ #: classes/Visualizer/Render/Sidebar.php:497
2486
  msgid "The chart border width in pixels."
2487
  msgstr ""
2488
 
2675
  #: classes/Visualizer/Render/Sidebar.php:242
2676
  #: classes/Visualizer/Render/Sidebar.php:252
2677
  #: classes/Visualizer/Render/Sidebar.php:260
2678
+ #: classes/Visualizer/Render/Sidebar.php:271
2679
  msgid "Upgrade to at least WordPress 4.7 to use this."
2680
  msgstr ""
2681
 
2699
  msgid "To enable copying the data to the clipboard."
2700
  msgstr ""
2701
 
2702
+ #: classes/Visualizer/Render/Sidebar.php:267
2703
+ msgid "Download Image"
2704
+ msgstr ""
2705
+
2706
+ #: classes/Visualizer/Render/Sidebar.php:271
2707
+ msgid "Not supported for this chart type."
2708
+ msgstr ""
2709
+
2710
+ #: classes/Visualizer/Render/Sidebar.php:271
2711
+ msgid "To download the chart as an image."
2712
+ msgstr ""
2713
+
2714
+ #: classes/Visualizer/Render/Sidebar.php:355
2715
  msgid "Alignment"
2716
  msgstr ""
2717
 
2718
+ #: classes/Visualizer/Render/Sidebar.php:359
2719
  msgid "Determines the alignment of the legend."
2720
  msgstr ""
2721
 
2722
+ #: classes/Visualizer/Render/Sidebar.php:394
2723
  msgid "Animate on startup"
2724
  msgstr ""
2725
 
2726
+ #: classes/Visualizer/Render/Sidebar.php:398
2727
  msgid "Determines if the chart will animate on the initial draw."
2728
  msgstr ""
2729
 
2730
+ #: classes/Visualizer/Render/Sidebar.php:416
2731
  msgid "Start slow and speed up"
2732
  msgstr ""
2733
 
2734
+ #: classes/Visualizer/Render/Sidebar.php:417
2735
  msgid "Start fast and slow down"
2736
  msgstr ""
2737
 
2738
+ #: classes/Visualizer/Render/Sidebar.php:418
2739
  msgid "Start slow, speed up, then slow down"
2740
  msgstr ""
2741
 
2742
+ #: classes/Visualizer/Render/Sidebar.php:442
2743
  msgid "The tooltip will be displayed when the user selects an element"
2744
  msgstr ""
2745
 
2746
+ #: classes/Visualizer/Render/Sidebar.php:449
2747
  msgid "Show Color Code"
2748
  msgstr ""
2749
 
2750
+ #: classes/Visualizer/Render/Sidebar.php:453
2751
  msgid ""
2752
  "If set to yes, will show colored squares next to the slice information in "
2753
  "the tooltip."
2754
  msgstr ""
2755
 
2756
+ #: classes/Visualizer/Render/Sidebar.php:465
2757
  msgid "Chart Size & Placement"
2758
  msgstr ""
2759
 
2760
+ #: classes/Visualizer/Render/Sidebar.php:466
2761
  msgid "Chart Size/Layout"
2762
  msgstr ""
2763
 
2764
+ #: classes/Visualizer/Render/Sidebar.php:519
2765
  msgid "Transparent background"
2766
  msgstr ""
2767
 
2768
+ #: classes/Visualizer/Render/Sidebar.php:524
2769
  msgid "Placement"
2770
  msgstr ""
2771
 
2772
+ #: classes/Visualizer/Render/Sidebar.php:525
2773
  msgid ""
2774
  "Configure the placement and size of the chart area (where the chart itself "
2775
  "is drawn, excluding axis and legends). Two formats are supported: a number, "
2777
  "followed by % is a percentage."
2778
  msgstr ""
2779
 
2780
+ #: classes/Visualizer/Render/Sidebar.php:529
2781
  msgid "Left And Top Margins"
2782
  msgstr ""
2783
 
2784
+ #: classes/Visualizer/Render/Sidebar.php:543
2785
  msgid "Determines how far to draw the chart from the left and top borders."
2786
  msgstr ""
2787
 
2788
+ #: classes/Visualizer/Render/Sidebar.php:549
2789
  msgid "Width And Height Of Chart Area"
2790
  msgstr ""
2791
 
2792
+ #: classes/Visualizer/Render/Sidebar.php:563
2793
  msgid "Determines the width and hight of the chart area."
2794
  msgstr ""
2795
 
2796
+ #: classes/Visualizer/Render/Sidebar.php:625
2797
  msgid "Hex Value"
2798
  msgstr ""
2799
 
2800
+ #: classes/Visualizer/Render/Sidebar.php:757
2801
  msgid ""
2802
  "Enter custom format pattern to apply to this series value, similar to the "
2803
  "%1$sICU pattern set%2$s. Use something like #,### to get 1,234 as output, "
2805
  "percentage format then your values will be multiplied by 100."
2806
  msgstr ""
2807
 
2808
+ #: classes/Visualizer/Render/Sidebar.php:765
2809
  msgid "Date Format"
2810
  msgstr ""
2811
 
2812
+ #: classes/Visualizer/Render/Sidebar.php:768
2813
  msgid ""
2814
  "Enter custom format pattern to apply to this series value, similar to the "
2815
  "%1$sICU date and time format%2$s."
readme.md CHANGED
@@ -1,5 +1,5 @@
1
  # Visualizer: Tables and Charts Manager for WordPress # #
2
- **Contributors:** [codeinwp](https://profiles.wordpress.org/codeinwp), [marius2012](https://profiles.wordpress.org/marius2012), [marius_codeinwp](https://profiles.wordpress.org/marius_codeinwp), [hardeepasrani](https://profiles.wordpress.org/hardeepasrani), [themeisle](https://profiles.wordpress.org/themeisle), [Madalin_ThemeIsle](https://profiles.wordpress.org/Madalin_ThemeIsle), [contactashish13](https://profiles.wordpress.org/contactashish13)
3
  **Tags:** tables, charts, pie, visualization, graphs
4
  **Requires at least:** 3.5
5
  **Tested up to:** 5.4
@@ -162,6 +162,19 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
162
  13. Bar chart
163
 
164
  ## Changelog ##
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  ### 3.4.3 - 2020-05-04 ###
166
 
167
  * [Feat] Improved chart creation UX
@@ -553,4 +566,4 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
553
  * The bug with CSV file uploading was fixed.
554
 
555
  ### 1.0.0 ###
556
- * The first version of what wil be the best wp charts plugin.
1
  # Visualizer: Tables and Charts Manager for WordPress # #
2
+ **Contributors:** [codeinwp](https://profiles.wordpress.org/codeinwp), [themeisle](https://profiles.wordpress.org/themeisle), [marius2012](https://profiles.wordpress.org/marius2012), [marius_codeinwp](https://profiles.wordpress.org/marius_codeinwp), [hardeepasrani](https://profiles.wordpress.org/hardeepasrani), [rozroz](https://profiles.wordpress.org/rozroz), [Madalin_ThemeIsle](https://profiles.wordpress.org/Madalin_ThemeIsle)
3
  **Tags:** tables, charts, pie, visualization, graphs
4
  **Requires at least:** 3.5
5
  **Tested up to:** 5.4
162
  13. Bar chart
163
 
164
  ## Changelog ##
165
+ ### 3.4.4 - 2020-06-16 ###
166
+
167
+ * [Feat] Option to download charts as .png images
168
+ * [Fix] Make UI more intuitive when a chart is missing in the editor
169
+ * [Fix] Clicking Copy chart shows the Copied message multiple times
170
+ * [Fix] Conflict with Modern Events Calendar plugin
171
+ * [Fix] Chart size ( width and height ) options not working for ChartJS charts
172
+ * [Fix] Resizing the window causes annotation-based charts to throw an error
173
+ * [Fix] Remove Inside the Chart option as legend position for Google Pie charts
174
+ * [Fix] Clicking Advanced Options panel breaks Bubble chart
175
+ * [Fix] Missing posts revisions on chart update
176
+
177
+
178
  ### 3.4.3 - 2020-05-04 ###
179
 
180
  * [Feat] Improved chart creation UX
566
  * The bug with CSV file uploading was fixed.
567
 
568
  ### 1.0.0 ###
569
+ * The first version of what wil be the best wp charts plugin.
readme.txt CHANGED
@@ -1,5 +1,5 @@
1
  === Visualizer: Tables and Charts Manager for WordPress # ===
2
- Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle,contactashish13
3
  Tags: tables, charts, pie, visualization, graphs
4
  Requires at least: 3.5
5
  Tested up to: 5.4
@@ -162,6 +162,19 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
162
  13. Bar chart
163
 
164
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  = 3.4.3 - 2020-05-04 =
166
 
167
  * [Feat] Improved chart creation UX
@@ -553,4 +566,4 @@ Pay attention that to turn your shortcodes into graphs, your theme has to have `
553
  * The bug with CSV file uploading was fixed.
554
 
555
  ### 1.0.0 ###
556
- * The first version of what wil be the best wp charts plugin.
1
  === Visualizer: Tables and Charts Manager for WordPress # ===
2
+ Contributors: codeinwp,themeisle,marius2012,marius_codeinwp,hardeepasrani,rozroz,Madalin_ThemeIsle
3
  Tags: tables, charts, pie, visualization, graphs
4
  Requires at least: 3.5
5
  Tested up to: 5.4
162
  13. Bar chart
163
 
164
  == Changelog ==
165
+ = 3.4.4 - 2020-06-16 =
166
+
167
+ * [Feat] Option to download charts as .png images
168
+ * [Fix] Make UI more intuitive when a chart is missing in the editor
169
+ * [Fix] Clicking Copy chart shows the Copied message multiple times
170
+ * [Fix] Conflict with Modern Events Calendar plugin
171
+ * [Fix] Chart size ( width and height ) options not working for ChartJS charts
172
+ * [Fix] Resizing the window causes annotation-based charts to throw an error
173
+ * [Fix] Remove Inside the Chart option as legend position for Google Pie charts
174
+ * [Fix] Clicking Advanced Options panel breaks Bubble chart
175
+ * [Fix] Missing posts revisions on chart update
176
+
177
+
178
  = 3.4.3 - 2020-05-04 =
179
 
180
  * [Feat] Improved chart creation UX
566
  * The bug with CSV file uploading was fixed.
567
 
568
  ### 1.0.0 ###
569
+ * The first version of what wil be the best wp charts plugin.
templates/support.php CHANGED
@@ -36,7 +36,7 @@
36
 
37
  <div class="viz-features-content">
38
  <div class="viz-feature">
39
- <div id="feedzy_import_feeds" class="viz-feature-features">
40
  <?php
41
  switch ( $active_tab ) {
42
  case 'help':
36
 
37
  <div class="viz-features-content">
38
  <div class="viz-feature">
39
+ <div class="viz-feature-features">
40
  <?php
41
  switch ( $active_tab ) {
42
  case 'help':
themeisle-hash.json CHANGED
@@ -1 +1 @@
1
- {"index.php":"2701e13e479319c5fdcf252bd9f44f77"}
1
+ {"index.php":"4f756be0ba6c520ec5cd9546fe643ba8"}
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit5997c37a3e43a00915b960174c6e29d9::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitb11c4727328a8692ebac41e48739fbca::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInit2533f20162726d33d15a3b1d070885be::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInitf80d07c0530b306c03d9cd523ad7ef06::getLoader();
vendor/codeinwp/themeisle-sdk/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ##### [Version 3.2.8](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.7...v3.2.8) (2020-03-24)
2
 
3
  * change license handler method access
1
+ ##### [Version 3.2.14](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.13...v3.2.14) (2020-06-10)
2
+
3
+ > Things are getting better every day. 🚀
4
+
5
+ ##### [Version 3.2.13](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.12...v3.2.13) (2020-06-10)
6
+
7
+ Adds plan logic and expiration
8
+
9
+ ##### [Version 3.2.12](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.11...v3.2.12) (2020-06-10)
10
+
11
+ Adds key filter
12
+
13
+ ##### [Version 3.2.11](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.10...v3.2.11) (2020-06-04)
14
+
15
+ * remove non-printable chars
16
+
17
+ ##### [Version 3.2.10](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.9...v3.2.10) (2020-05-28)
18
+
19
+ * Remove extra files on export
20
+
21
+ ##### [Version 3.2.9](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.8...v3.2.9) (2020-05-18)
22
+
23
+ adds new endpoints
24
+
25
  ##### [Version 3.2.8](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.7...v3.2.8) (2020-03-24)
26
 
27
  * change license handler method access
vendor/codeinwp/themeisle-sdk/load.php CHANGED
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
14
  return;
15
  }
16
  // Current SDK version and path.
17
- $themeisle_sdk_version = '3.2.8';
18
  $themeisle_sdk_path = dirname( __FILE__ );
19
 
20
  global $themeisle_sdk_max_version;
14
  return;
15
  }
16
  // Current SDK version and path.
17
+ $themeisle_sdk_version = '3.2.14';
18
  $themeisle_sdk_path = dirname( __FILE__ );
19
 
20
  global $themeisle_sdk_max_version;
vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php CHANGED
@@ -190,18 +190,37 @@ class Licenser extends Abstract_Module {
190
  /**
191
  * Return the license status.
192
  *
 
 
193
  * @return string The License status.
194
  */
195
- public function get_license_status() {
196
 
197
  $license_data = get_option( $this->product->get_key() . '_license_data', '' );
198
 
199
  if ( '' === $license_data ) {
200
  return get_option( $this->product->get_key() . '_license_status', 'not_active' );
201
  }
 
 
 
 
 
 
 
202
 
203
- return isset( $license_data->license ) ? $license_data->license : get_option( $this->product->get_key() . '_license_status', 'not_active' );
 
 
 
 
 
 
 
 
 
204
 
 
205
  }
206
 
207
  /**
@@ -244,10 +263,10 @@ class Licenser extends Abstract_Module {
244
  return false;
245
  }
246
 
247
- $status = $this->get_license_status();
248
- $no_activations_string = apply_filters( $this->product->get_key() . '_lc_no_activations_string', 'No more activations left for %s. You need to upgrade your plan in order to use %s on more websites. If you need assistance, please get in touch with %s staff.' );
249
- $no_valid_string = apply_filters( $this->product->get_key() . '_lc_no_valid_string', 'In order to benefit from updates and support for %s, please add your license code from your <a href="%s" target="_blank">purchase history</a> and validate it <a href="%s">here</a>. ' );
250
-
251
  // No activations left for this license.
252
  if ( 'valid' != $status && $this->check_activation() ) {
253
  ?>
@@ -267,6 +286,19 @@ class Licenser extends Abstract_Module {
267
  <?php
268
  return false;
269
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  // Invalid license key.
271
  if ( 'valid' != $status ) {
272
  ?>
@@ -667,6 +699,7 @@ class Licenser extends Abstract_Module {
667
  if ( isset( $update_data->banners ) ) {
668
  $update_data->banners = (array) $update_data->banners;
669
  }
 
670
  return $update_data;
671
  }
672
 
@@ -696,6 +729,7 @@ class Licenser extends Abstract_Module {
696
  $_transient_data->response[ $this->product->get_slug() . '/' . $this->product->get_file() ] = $api_response;
697
  }
698
  }
 
699
  return $_transient_data;
700
  }
701
 
@@ -796,6 +830,9 @@ class Licenser extends Abstract_Module {
796
 
797
  if ( false !== $namespace ) {
798
  add_filter( 'themeisle_sdk_license_process_' . $namespace, [ $this, 'do_license_process' ], 10, 2 );
 
 
 
799
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
800
  \WP_CLI::add_command( $namespace . ' activate', [ $this, 'cli_activate' ] );
801
  \WP_CLI::add_command( $namespace . ' deactivate', [ $this, 'cli_deactivate' ] );
190
  /**
191
  * Return the license status.
192
  *
193
+ * @param bool $check_expiration Should check if license is valid, but expired.
194
+ *
195
  * @return string The License status.
196
  */
197
+ public function get_license_status( $check_expiration = false ) {
198
 
199
  $license_data = get_option( $this->product->get_key() . '_license_data', '' );
200
 
201
  if ( '' === $license_data ) {
202
  return get_option( $this->product->get_key() . '_license_status', 'not_active' );
203
  }
204
+ $status = isset( $license_data->license ) ? $license_data->license : get_option( $this->product->get_key() . '_license_status', 'not_active' );
205
+ if ( false === $check_expiration ) {
206
+ return $status;
207
+ }
208
+
209
+ return ( 'valid' === $status && isset( $license_data->is_expired ) && 'yes' === $license_data->is_expired ) ? 'active_expired' : $status;
210
+ }
211
 
212
+ /**
213
+ * License price id.
214
+ *
215
+ * @return int License plan.
216
+ */
217
+ public function get_plan() {
218
+ $license_data = get_option( $this->product->get_key() . '_license_data', '' );
219
+ if ( ! isset( $license_data->price_id ) ) {
220
+ return -1;
221
+ }
222
 
223
+ return (int) $license_data->price_id;
224
  }
225
 
226
  /**
263
  return false;
264
  }
265
 
266
+ $status = $this->get_license_status( true );
267
+ $no_activations_string = apply_filters( $this->product->get_key() . '_lc_no_activations_string', 'No more activations left for %s. You need to upgrade your plan in order to use %s on more websites. If you need assistance, please get in touch with %s staff.' );
268
+ $no_valid_string = apply_filters( $this->product->get_key() . '_lc_no_valid_string', 'In order to benefit from updates and support for %s, please add your license code from your <a href="%s" target="_blank">purchase history</a> and validate it <a href="%s">here</a>. ' );
269
+ $expired_license_string = apply_filters( $this->product->get_key() . '_lc_expired_string', 'Your %s License Key has expired. In order to continue receiving support and software updates you must <a href="%s" target="_blank">renew</a> your license key.' );
270
  // No activations left for this license.
271
  if ( 'valid' != $status && $this->check_activation() ) {
272
  ?>
286
  <?php
287
  return false;
288
  }
289
+
290
+ // Invalid license key.
291
+ if ( 'active_expired' === $status ) {
292
+ ?>
293
+ <div class="error">
294
+ <p>
295
+ <strong><?php echo sprintf( $expired_license_string, $this->product->get_name() . ' ' . $this->product->get_type(), $this->get_api_url() . '?license=' . $this->license_key ); ?> </strong>
296
+ </p>
297
+ </div>
298
+ <?php
299
+
300
+ return false;
301
+ }
302
  // Invalid license key.
303
  if ( 'valid' != $status ) {
304
  ?>
699
  if ( isset( $update_data->banners ) ) {
700
  $update_data->banners = (array) $update_data->banners;
701
  }
702
+
703
  return $update_data;
704
  }
705
 
729
  $_transient_data->response[ $this->product->get_slug() . '/' . $this->product->get_file() ] = $api_response;
730
  }
731
  }
732
+
733
  return $_transient_data;
734
  }
735
 
830
 
831
  if ( false !== $namespace ) {
832
  add_filter( 'themeisle_sdk_license_process_' . $namespace, [ $this, 'do_license_process' ], 10, 2 );
833
+ add_filter( 'product_' . $namespace . '_license_status', [ $this, 'get_license_status' ], PHP_INT_MAX );
834
+ add_filter( 'product_' . $namespace . '_license_key', [ $this->product, 'get_license' ] );
835
+ add_filter( 'product_' . $namespace . '_license_plan', [ $this, 'get_plan' ], PHP_INT_MAX );
836
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
837
  \WP_CLI::add_command( $namespace . ' activate', [ $this, 'cli_activate' ] );
838
  \WP_CLI::add_command( $namespace . ' deactivate', [ $this, 'cli_deactivate' ] );
vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php CHANGED
@@ -27,7 +27,7 @@ class Logger extends Abstract_Module {
27
  /**
28
  * Endpoint where to collect logs.
29
  */
30
- const TRACKING_ENDPOINT = 'http://log.themeisle.com/wp-json/v1/logs/';
31
 
32
 
33
  /**
@@ -90,19 +90,22 @@ class Logger extends Abstract_Module {
90
  * @return bool Is logger active?
91
  */
92
  private function is_logger_active() {
93
- if ( ! $this->product->is_wordpress_available() ) {
94
- return true;
95
- }
96
- $pro_slug = $this->product->get_pro_slug();
97
 
98
- if ( ! empty( $pro_slug ) ) {
99
- $all_products = Loader::get_products();
100
- if ( isset( $all_products[ $pro_slug ] ) ) {
101
- return true;
 
 
 
 
 
 
102
  }
103
  }
104
 
105
- return ( get_option( $this->product->get_key() . '_logger_flag', 'no' ) === 'yes' );
106
  }
107
 
108
  /**
@@ -151,6 +154,7 @@ class Logger extends Abstract_Module {
151
  $environment['theme'] = array();
152
  $environment['theme']['name'] = $theme->get( 'Name' );
153
  $environment['theme']['author'] = $theme->get( 'Author' );
 
154
  $environment['plugins'] = get_option( 'active_plugins' );
155
  global $wp_version;
156
  wp_remote_post(
@@ -159,14 +163,12 @@ class Logger extends Abstract_Module {
159
  'method' => 'POST',
160
  'timeout' => 3,
161
  'redirection' => 5,
162
- 'headers' => array(
163
- 'X-ThemeIsle-Event' => 'log_site',
164
- ),
165
  'body' => array(
166
  'site' => get_site_url(),
167
  'slug' => $this->product->get_slug(),
168
  'version' => $this->product->get_version(),
169
  'wp_version' => $wp_version,
 
170
  'data' => apply_filters( $this->product->get_key() . '_logger_data', array() ),
171
  'environment' => $environment,
172
  'license' => apply_filters( $this->product->get_key() . '_license_status', '' ),
27
  /**
28
  * Endpoint where to collect logs.
29
  */
30
+ const TRACKING_ENDPOINT = 'https://api.themeisle.com/tracking/log';
31
 
32
 
33
  /**
90
  * @return bool Is logger active?
91
  */
92
  private function is_logger_active() {
93
+ $default = 'no';
 
 
 
94
 
95
+ if ( ! $this->product->is_wordpress_available() ) {
96
+ $default = 'yes';
97
+ } else {
98
+ $pro_slug = $this->product->get_pro_slug();
99
+
100
+ if ( ! empty( $pro_slug ) ) {
101
+ $all_products = Loader::get_products();
102
+ if ( isset( $all_products[ $pro_slug ] ) ) {
103
+ $default = 'yes';
104
+ }
105
  }
106
  }
107
 
108
+ return ( get_option( $this->product->get_key() . '_logger_flag', $default ) === 'yes' );
109
  }
110
 
111
  /**
154
  $environment['theme'] = array();
155
  $environment['theme']['name'] = $theme->get( 'Name' );
156
  $environment['theme']['author'] = $theme->get( 'Author' );
157
+ $environment['theme']['parent'] = $theme->parent() !== false ? $theme->parent()->get( 'Name' ) : $theme->get( 'Name' );
158
  $environment['plugins'] = get_option( 'active_plugins' );
159
  global $wp_version;
160
  wp_remote_post(
163
  'method' => 'POST',
164
  'timeout' => 3,
165
  'redirection' => 5,
 
 
 
166
  'body' => array(
167
  'site' => get_site_url(),
168
  'slug' => $this->product->get_slug(),
169
  'version' => $this->product->get_version(),
170
  'wp_version' => $wp_version,
171
+ 'locale' => get_locale(),
172
  'data' => apply_filters( $this->product->get_key() . '_logger_data', array() ),
173
  'environment' => $environment,
174
  'license' => apply_filters( $this->product->get_key() . '_license_status', '' ),
vendor/codeinwp/themeisle-sdk/src/Modules/Review.php CHANGED
@@ -67,7 +67,7 @@ class Review extends Abstract_Module {
67
 
68
  $link = 'https://wordpress.org/support/' . $this->product->get_type() . '/' . $this->product->get_slug() . '/reviews/#wporg-footer';
69
 
70
- $message = apply_filters( $this->product->get_key() . '_feedback_review_message', '<p>Hey, its great to see you have <b>{product}</b> active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers! <br/> <br/>~ {developer}, developer of {product}</p>' );
71
 
72
  $button_submit = apply_filters( $this->product->get_key() . '_feedback_review_button_do', 'Ok, I will gladly help.' );
73
  $button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', 'No, thanks.' );
67
 
68
  $link = 'https://wordpress.org/support/' . $this->product->get_type() . '/' . $this->product->get_slug() . '/reviews/#wporg-footer';
69
 
70
+ $message = apply_filters( $this->product->get_key() . '_feedback_review_message', '<p>Hey, it\'s great to see you have <b>{product}</b> active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers! <br/> <br/>~ {developer}, developer of {product}</p>' );
71
 
72
  $button_submit = apply_filters( $this->product->get_key() . '_feedback_review_button_do', 'Ok, I will gladly help.' );
73
  $button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', 'No, thanks.' );
vendor/codeinwp/themeisle-sdk/src/Modules/Translate.php CHANGED
@@ -295,7 +295,7 @@ class Translate extends Abstract_Module {
295
  ),
296
  'gn' => array(
297
  'slug' => 'gn',
298
- 'name' => 'Guaraní',
299
  ),
300
  'gsw' => array(
301
  'slug' => 'gsw',
@@ -471,7 +471,7 @@ class Translate extends Abstract_Module {
471
  ),
472
  'nb_NO' => array(
473
  'slug' => 'nb',
474
- 'name' => 'Norwegian (Bokmål)',
475
  ),
476
  'nl_NL' => array(
477
  'slug' => 'nl',
295
  ),
296
  'gn' => array(
297
  'slug' => 'gn',
298
+ 'name' => 'Guarani',
299
  ),
300
  'gsw' => array(
301
  'slug' => 'gsw',
471
  ),
472
  'nb_NO' => array(
473
  'slug' => 'nb',
474
+ 'name' => 'Norwegian (Bokmal)',
475
  ),
476
  'nl_NL' => array(
477
  'slug' => 'nl',
vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php CHANGED
@@ -40,7 +40,7 @@ class Uninstall_Feedback extends Abstract_Module {
40
  *
41
  * @var string Endpoint url.
42
  */
43
- const FEEDBACK_ENDPOINT = 'http://feedback.themeisle.com/wordpress/wp-json/__pirate_feedback_/v1/feedback';
44
 
45
  /**
46
  * Default options for plugins.
@@ -109,7 +109,7 @@ class Uninstall_Feedback extends Abstract_Module {
109
  *
110
  * @var string $heading_plugin The heading of the modal
111
  */
112
- private $heading_plugin = 'Whats wrong?';
113
  /**
114
  * Default heading for theme.
115
  *
@@ -698,6 +698,7 @@ class Uninstall_Feedback extends Abstract_Module {
698
  'title' => 'Below is a detailed view of all data that ThemeIsle will receive if you fill in this survey. No domain name, email address or IP addresses are transmited after you submit the survey.',
699
  'items' => [
700
  sprintf( '%s %s version %s %s %s %s', '<strong>', ucwords( $this->product->get_type() ), '</strong>', '<code>', $this->product->get_version(), '</code>' ),
 
701
  sprintf( '%s Uninstall reason %s %s Selected reason from the above survey %s ', '<strong>', '</strong>', '<i>', '</i>' ),
702
  ],
703
  ],
@@ -782,6 +783,7 @@ class Uninstall_Feedback extends Abstract_Module {
782
  $version = $this->product->get_version();
783
  $attributes['slug'] = $slug;
784
  $attributes['version'] = $version;
 
785
 
786
  $response = wp_remote_post(
787
  self::FEEDBACK_ENDPOINT,
40
  *
41
  * @var string Endpoint url.
42
  */
43
+ const FEEDBACK_ENDPOINT = 'https://api.themeisle.com/tracking/uninstall';
44
 
45
  /**
46
  * Default options for plugins.
109
  *
110
  * @var string $heading_plugin The heading of the modal
111
  */
112
+ private $heading_plugin = 'What\'s wrong?';
113
  /**
114
  * Default heading for theme.
115
  *
698
  'title' => 'Below is a detailed view of all data that ThemeIsle will receive if you fill in this survey. No domain name, email address or IP addresses are transmited after you submit the survey.',
699
  'items' => [
700
  sprintf( '%s %s version %s %s %s %s', '<strong>', ucwords( $this->product->get_type() ), '</strong>', '<code>', $this->product->get_version(), '</code>' ),
701
+ sprintf( '%sCurrent website:%s %s %s %s', '<strong>', '</strong>', '<code>', get_site_url(), '</code>' ),
702
  sprintf( '%s Uninstall reason %s %s Selected reason from the above survey %s ', '<strong>', '</strong>', '<i>', '</i>' ),
703
  ],
704
  ],
783
  $version = $this->product->get_version();
784
  $attributes['slug'] = $slug;
785
  $attributes['version'] = $version;
786
+ $attributes['url'] = get_site_url();
787
 
788
  $response = wp_remote_post(
789
  self::FEEDBACK_ENDPOINT,
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit5997c37a3e43a00915b960174c6e29d9
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit5997c37a3e43a00915b960174c6e29d9
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit5997c37a3e43a00915b960174c6e29d9', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit5997c37a3e43a00915b960174c6e29d9', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
@@ -42,14 +42,14 @@ class ComposerAutoloaderInit5997c37a3e43a00915b960174c6e29d9
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
- composerRequire5997c37a3e43a00915b960174c6e29d9($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
- function composerRequire5997c37a3e43a00915b960174c6e29d9($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitb11c4727328a8692ebac41e48739fbca
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitb11c4727328a8692ebac41e48739fbca', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitb11c4727328a8692ebac41e48739fbca', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
+ composerRequireb11c4727328a8692ebac41e48739fbca($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
+ function composerRequireb11c4727328a8692ebac41e48739fbca($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  require $file;
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInit2533f20162726d33d15a3b1d070885be {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit2533f20162726d33d15a3b1d070885be {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit2533f20162726d33d15a3b1d070885be', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit2533f20162726d33d15a3b1d070885be', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInitf80d07c0530b306c03d9cd523ad7ef06 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitf80d07c0530b306c03d9cd523ad7ef06', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitf80d07c0530b306c03d9cd523ad7ef06', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
vendor/composer/installed.json CHANGED
@@ -6,12 +6,12 @@
6
  "source": {
7
  "type": "git",
8
  "url": "https://github.com/Codeinwp/themeisle-sdk.git",
9
- "reference": "ce152edef1634d7c3ce75ed292efcc7a5f73806e"
10
  },
11
  "dist": {
12
  "type": "zip",
13
- "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/ce152edef1634d7c3ce75ed292efcc7a5f73806e",
14
- "reference": "ce152edef1634d7c3ce75ed292efcc7a5f73806e",
15
  "shasum": ""
16
  },
17
  "require-dev": {
@@ -19,7 +19,7 @@
19
  "squizlabs/php_codesniffer": "^3.1",
20
  "wp-coding-standards/wpcs": "^1.0.0"
21
  },
22
- "time": "2020-03-24 16:54:54",
23
  "type": "library",
24
  "installation-source": "source",
25
  "notification-url": "https://packagist.org/downloads/",
6
  "source": {
7
  "type": "git",
8
  "url": "https://github.com/Codeinwp/themeisle-sdk.git",
9
+ "reference": "992f5e8347836e325ffc50760da1d550b79831c4"
10
  },
11
  "dist": {
12
  "type": "zip",
13
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/992f5e8347836e325ffc50760da1d550b79831c4",
14
+ "reference": "992f5e8347836e325ffc50760da1d550b79831c4",
15
  "shasum": ""
16
  },
17
  "require-dev": {
19
  "squizlabs/php_codesniffer": "^3.1",
20
  "wp-coding-standards/wpcs": "^1.0.0"
21
  },
22
+ "time": "2020-06-10 16:25:09",
23
  "type": "library",
24
  "installation-source": "source",
25
  "notification-url": "https://packagist.org/downloads/",