Version Description
Download this release
Release Info
Developer | smackcoders |
Plugin | Ultimate CSV Importer |
Version | 6.2.2 |
Comparing to | |
See all releases |
Code changes from version 6.2.1 to 6.2.2
- MediaHandling.php +13 -0
- Readme.txt +10 -5
- SaveMapping.php +5 -0
- assets/js/admin-v6.1.js +3 -3
MediaHandling.php
CHANGED
@@ -29,6 +29,19 @@ class MediaHandling{
|
|
29 |
public static function imageOptions(){
|
30 |
$media_settings['media_handle_option'] = $_POST['media_handle_option'];
|
31 |
$media_settings['use_ExistingImage'] = $_POST['use_ExistingImage'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
$image_info = array(
|
33 |
'media_settings' => $media_settings
|
34 |
);
|
29 |
public static function imageOptions(){
|
30 |
$media_settings['media_handle_option'] = $_POST['media_handle_option'];
|
31 |
$media_settings['use_ExistingImage'] = $_POST['use_ExistingImage'];
|
32 |
+
$media_settings['overwriteImage'] = isset($_POST['overwriteImage']) ? $_POST['overwriteImage'] : '';
|
33 |
+
$media_settings['file_name'] =isset( $_POST['file_name']) ? $_POST['file_name'] : '';
|
34 |
+
$media_settings['caption'] = sanitize_text_field($_POST['caption']);
|
35 |
+
$media_settings['alttext'] = sanitize_text_field($_POST['alttext']);
|
36 |
+
$media_settings['description'] = sanitize_text_field($_POST['description']);
|
37 |
+
$media_settings['thumbnail'] =isset( $_POST['thumbnail']) ? $_POST['thumbnail']: '';
|
38 |
+
$media_settings['medium'] =isset( $_POST['medium']) ? $_POST['medium']: '';
|
39 |
+
$media_settings['medium_large'] = isset( $_POST['medium_large']) ? $_POST['medium_large']: '';
|
40 |
+
$media_settings['large'] = isset( $_POST['large']) ? $_POST['large']: '';
|
41 |
+
$media_settings['custom'] = isset( $_POST['custom']) ? $_POST['custom']: '';
|
42 |
+
$media_settings['custom_slug'] =isset( $_POST['custom_slug']) ? $_POST['custom_slug']: '' ;
|
43 |
+
$media_settings['custom_slug'] = isset( $_POST['custom_width']) ? $_POST['custom_width']: '';
|
44 |
+
$media_settings['custom_height'] = isset( $_POST['custom_height']) ? $_POST['custom_height']: '';
|
45 |
$image_info = array(
|
46 |
'media_settings' => $media_settings
|
47 |
);
|
Readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: smackcoders, smacksupport
|
3 |
Requires at least: 5.0
|
4 |
Tested up to: 5.6
|
5 |
-
Stable tag: 6.2.
|
6 |
-
Version: 6.2.
|
7 |
Requires PHP: 5.2.4
|
8 |
Author: smackcoders
|
9 |
Author URI: http://profiles.wordpress.org/smackcoders/
|
@@ -82,12 +82,12 @@ Custom Field – WordPress default Text and Text area fields.
|
|
82 |
BBPress Plugin - Topic, Reply, and Forum Import.
|
83 |
LearnPress Plugin - Courses, Lessons, Quizzes, Orders and Questions Import.
|
84 |
WooCommerce - Products with categories, attributes, tags, and Images Import.
|
85 |
-
All in One SEO Plugin -
|
86 |
WP Customer Reviews – Reviews Import.
|
87 |
MultiLanguage by Websoft.
|
88 |
Post Expirator Plugin.
|
89 |
WooCommerce Product Bundles Plugin.
|
90 |
-
|
91 |
|
92 |
= Highlights =
|
93 |
* High performance, much comparable & much faster than all the other available plugins.
|
@@ -206,6 +206,9 @@ Import to WordPress done in different methods based on content source type, plat
|
|
206 |
|
207 |
|
208 |
== Changelog ==
|
|
|
|
|
|
|
209 |
= 6.2.1 =
|
210 |
* Added: Compatibility for WordPress 5.6
|
211 |
* Added: PHP 8 compatibility
|
@@ -680,6 +683,8 @@ Import to WordPress done in different methods based on content source type, plat
|
|
680 |
* Initial release version. Tested and found works well without any issues.
|
681 |
|
682 |
== Upgrade Notice ==
|
|
|
|
|
683 |
= 6.2.1 =
|
684 |
* Added: Upgrade now for latest updates.
|
685 |
= 6.2 =
|
@@ -883,4 +888,4 @@ Import to WordPress done in different methods based on content source type, plat
|
|
883 |
= 1.0.1 =
|
884 |
* Added features to import multiple tags and categories with different delimiters.
|
885 |
= 1.0.0 =
|
886 |
-
* Initial release of plugin.
|
2 |
Contributors: smackcoders, smacksupport
|
3 |
Requires at least: 5.0
|
4 |
Tested up to: 5.6
|
5 |
+
Stable tag: 6.2.2
|
6 |
+
Version: 6.2.2
|
7 |
Requires PHP: 5.2.4
|
8 |
Author: smackcoders
|
9 |
Author URI: http://profiles.wordpress.org/smackcoders/
|
82 |
BBPress Plugin - Topic, Reply, and Forum Import.
|
83 |
LearnPress Plugin - Courses, Lessons, Quizzes, Orders and Questions Import.
|
84 |
WooCommerce - Products with categories, attributes, tags, and Images Import.
|
85 |
+
All in One SEO Plugin - SEO Fields Import.
|
86 |
WP Customer Reviews – Reviews Import.
|
87 |
MultiLanguage by Websoft.
|
88 |
Post Expirator Plugin.
|
89 |
WooCommerce Product Bundles Plugin.
|
90 |
+
Rank Math SEO – Best SEO Plugin for WordPress
|
91 |
|
92 |
= Highlights =
|
93 |
* High performance, much comparable & much faster than all the other available plugins.
|
206 |
|
207 |
|
208 |
== Changelog ==
|
209 |
+
= 6.2.2 =
|
210 |
+
* Added: Import support for Rank Math SEO Plugin.
|
211 |
+
|
212 |
= 6.2.1 =
|
213 |
* Added: Compatibility for WordPress 5.6
|
214 |
* Added: PHP 8 compatibility
|
683 |
* Initial release version. Tested and found works well without any issues.
|
684 |
|
685 |
== Upgrade Notice ==
|
686 |
+
= 6.2.2 =
|
687 |
+
* Added: Upgrade now for latest updates.
|
688 |
= 6.2.1 =
|
689 |
* Added: Upgrade now for latest updates.
|
690 |
= 6.2 =
|
888 |
= 1.0.1 =
|
889 |
* Added features to import multiple tags and categories with different delimiters.
|
890 |
= 1.0.0 =
|
891 |
+
* Initial release of plugin.
|
SaveMapping.php
CHANGED
@@ -366,6 +366,10 @@ class SaveMapping{
|
|
366 |
$all_seo_instance = AllInOneSeoImport::getInstance();
|
367 |
$all_seo_instance->set_all_seo_values($header_array ,$value_array , $map['AIOSEO'], $post_id , $selected_type);
|
368 |
break;
|
|
|
|
|
|
|
|
|
369 |
|
370 |
case 'ECOMMETA':
|
371 |
$uci_woocomm_meta->set_product_meta_values($header_array ,$value_array , $map['ECOMMETA'], $post_id , $selected_type , $line_number , $get_mode);
|
@@ -595,6 +599,7 @@ class SaveMapping{
|
|
595 |
$import_type_value = $unmatched_object->import_post_types($import_type);
|
596 |
$import_name_as = $unmatched_object->import_name_as($import_type);
|
597 |
|
|
|
598 |
if($import_type_value == 'category' || $import_type_value == 'post_tag' || $import_type_value == 'product_cat' || $import_type_value == 'product_tag'){
|
599 |
|
600 |
$get_total_row_count = $wpdb->get_col("SELECT term_id FROM {$wpdb->prefix}term_taxonomy WHERE taxonomy = '$import_type_value'");
|
366 |
$all_seo_instance = AllInOneSeoImport::getInstance();
|
367 |
$all_seo_instance->set_all_seo_values($header_array ,$value_array , $map['AIOSEO'], $post_id , $selected_type);
|
368 |
break;
|
369 |
+
case 'RANKMATH':
|
370 |
+
$rankmath_instance = RankMathImport::getInstance();
|
371 |
+
$rankmath_instance->set_rankmath_values($header_array, $value_array, $map['RANKMATH'], $post_id, $selected_type);
|
372 |
+
break;
|
373 |
|
374 |
case 'ECOMMETA':
|
375 |
$uci_woocomm_meta->set_product_meta_values($header_array ,$value_array , $map['ECOMMETA'], $post_id , $selected_type , $line_number , $get_mode);
|
599 |
$import_type_value = $unmatched_object->import_post_types($import_type);
|
600 |
$import_name_as = $unmatched_object->import_name_as($import_type);
|
601 |
|
602 |
+
|
603 |
if($import_type_value == 'category' || $import_type_value == 'post_tag' || $import_type_value == 'product_cat' || $import_type_value == 'product_tag'){
|
604 |
|
605 |
$get_total_row_count = $wpdb->get_col("SELECT term_id FROM {$wpdb->prefix}term_taxonomy WHERE taxonomy = '$import_type_value'");
|
assets/js/admin-v6.1.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=455)}([function(e,t,n){"use strict";e.exports=n(255)},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";function r(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}n.d(t,"a",(function(){return r}))},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function o(){return t.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function p(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return Et(e,t,n,r,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function g(e){if(null==e._isValid){var t=m(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function _(e){var t=f(NaN);return null!=e?p(m(t),e):m(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=o.momentProperties=[],b=!1;function y(e,t){var n,r,o;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=m(t)),c(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)c(o=t[r=v[n]])||(e[r]=o);return e}function w(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,o.updateOffset(this),b=!1)}function k(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function x(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function M(e,t){var n=!0;return p((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){var r,a,i,l=[];for(a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(i in r+="\n["+a+"] ",arguments[0])s(arguments[0],i)&&(r+=i+": "+arguments[0][i]+", ");r=r.slice(0,-2)}else r=arguments[a];l.push(r)}x(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var E,T={};function S(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),T[e]||(x(t),T[e]=!0)}function D(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function L(e,t){var n,r=p({},e);for(n in t)s(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&i(e[n])&&(r[n]=p({},r[n]));return r}function C(e){null!=e&&this.set(e)}function P(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,E=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var O=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,A={},I={};function R(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(I[e]=o),t&&(I[t[0]]=function(){return P(o.apply(this,arguments),t[1],t[2])}),n&&(I[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function Y(e,t){return e.isValid()?(t=j(t,e.localeData()),A[t]=A[t]||function(e){var t,n,r,o=e.match(O);for(t=0,n=o.length;t<n;t++)I[o[t]]?o[t]=I[o[t]]:o[t]=(r=o[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,a="";for(r=0;r<n;r++)a+=D(o[r])?o[r].call(t,e):o[r];return a}}(t),A[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(N.lastIndex=0;n>=0&&N.test(e);)e=e.replace(N,r),N.lastIndex=0,n-=1;return e}var F={};function H(e,t){var n=e.toLowerCase();F[n]=F[n+"s"]=F[t]=e}function z(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function B(e){var t,n,r={};for(n in e)s(e,n)&&(t=z(n))&&(r[t]=e[n]);return r}var U={};function V(e,t){U[e]=t}function W(e){return e%4==0&&e%100!=0||e%400==0}function q(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function G(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=q(t)),n}function J(e,t){return function(n){return null!=n?(Q(this,e,n),o.updateOffset(this,t),this):K(this,e)}}function K(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Q(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&W(e.year())&&1===e.month()&&29===e.date()?(n=G(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),ke(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var X,$=/\d/,Z=/\d\d/,ee=/\d{3}/,te=/\d{4}/,ne=/[+-]?\d{6}/,re=/\d\d?/,oe=/\d\d\d\d?/,ae=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,se=/\d{1,4}/,le=/[+-]?\d{1,6}/,ce=/\d+/,ue=/[+-]?\d+/,de=/Z|[+-]\d\d:?\d\d/gi,he=/Z|[+-]\d\d(?::?\d\d)?/gi,pe=/[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;function fe(e,t,n){X[e]=D(t)?t:function(e,r){return e&&n?n:t}}function me(e,t){return s(X,e)?X[e](t._strict,t._locale):new RegExp(ge(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function ge(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}X={};var _e,ve={};function be(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),u(t)&&(r=function(e,n){n[t]=G(e)}),n=0;n<e.length;n++)ve[e[n]]=r}function ye(e,t){be(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function we(e,t,n){null!=t&&s(ve,e)&&ve[e](t,n._a,n,e)}function ke(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?W(e)?29:28:31-r%7%2}_e=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},R("M",["MM",2],"Mo",(function(){return this.month()+1})),R("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),R("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),H("month","M"),V("month",8),fe("M",re),fe("MM",re,Z),fe("MMM",(function(e,t){return t.monthsShortRegex(e)})),fe("MMMM",(function(e,t){return t.monthsRegex(e)})),be(["M","MM"],(function(e,t){t[1]=G(e)-1})),be(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[1]=o:m(n).invalidMonth=e}));var xe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Me="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ee=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Te=pe,Se=pe;function De(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=_e.call(this._shortMonthsParse,i))?o:null:-1!==(o=_e.call(this._longMonthsParse,i))?o:null:"MMM"===t?-1!==(o=_e.call(this._shortMonthsParse,i))||-1!==(o=_e.call(this._longMonthsParse,i))?o:null:-1!==(o=_e.call(this._longMonthsParse,i))||-1!==(o=_e.call(this._shortMonthsParse,i))?o:null}function Le(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=G(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),ke(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Ce(e){return null!=e?(Le(this,e),o.updateOffset(this,!0),this):K(this,"Month")}function Pe(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],a=[];for(t=0;t<12;t++)n=f([2e3,t]),r.push(this.monthsShort(n,"")),o.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(e),o.sort(e),a.sort(e),t=0;t<12;t++)r[t]=ge(r[t]),o[t]=ge(o[t]);for(t=0;t<24;t++)a[t]=ge(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Oe(e){return W(e)?366:365}R("Y",0,0,(function(){var e=this.year();return e<=9999?P(e,4):"+"+e})),R(0,["YY",2],0,(function(){return this.year()%100})),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),H("year","y"),V("year",1),fe("Y",ue),fe("YY",re,Z),fe("YYYY",se,te),fe("YYYYY",le,ne),fe("YYYYYY",le,ne),be(["YYYYY","YYYYYY"],0),be("YYYY",(function(e,t){t[0]=2===e.length?o.parseTwoDigitYear(e):G(e)})),be("YY",(function(e,t){t[0]=o.parseTwoDigitYear(e)})),be("Y",(function(e,t){t[0]=parseInt(e,10)})),o.parseTwoDigitYear=function(e){return G(e)+(G(e)>68?1900:2e3)};var Ne=J("FullYear",!0);function Ae(e,t,n,r,o,a,i){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,a,i),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,a,i),s}function Ie(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Re(e,t,n){var r=7+t-n;return-(7+Ie(e,0,r).getUTCDay()-t)%7+r-1}function Ye(e,t,n,r,o){var a,i,s=1+7*(t-1)+(7+n-r)%7+Re(e,r,o);return s<=0?i=Oe(a=e-1)+s:s>Oe(e)?(a=e+1,i=s-Oe(e)):(a=e,i=s),{year:a,dayOfYear:i}}function je(e,t,n){var r,o,a=Re(e.year(),t,n),i=Math.floor((e.dayOfYear()-a-1)/7)+1;return i<1?r=i+Fe(o=e.year()-1,t,n):i>Fe(e.year(),t,n)?(r=i-Fe(e.year(),t,n),o=e.year()+1):(o=e.year(),r=i),{week:r,year:o}}function Fe(e,t,n){var r=Re(e,t,n),o=Re(e+1,t,n);return(Oe(e)-r+o)/7}function He(e,t){return e.slice(t,7).concat(e.slice(0,t))}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),V("week",5),V("isoWeek",5),fe("w",re),fe("ww",re,Z),fe("W",re),fe("WW",re,Z),ye(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=G(e)})),R("d",0,"do","day"),R("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),R("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),R("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),V("day",11),V("weekday",11),V("isoWeekday",11),fe("d",re),fe("e",re),fe("E",re),fe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),fe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),fe("dddd",(function(e,t){return t.weekdaysRegex(e)})),ye(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:m(n).invalidWeekday=e})),ye(["d","e","E"],(function(e,t,n,r){t[r]=G(e)}));var ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Be="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ue="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ve=pe,We=pe,qe=pe;function Ge(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=_e.call(this._weekdaysParse,i))?o:null:"ddd"===t?-1!==(o=_e.call(this._shortWeekdaysParse,i))?o:null:-1!==(o=_e.call(this._minWeekdaysParse,i))?o:null:"dddd"===t?-1!==(o=_e.call(this._weekdaysParse,i))||-1!==(o=_e.call(this._shortWeekdaysParse,i))||-1!==(o=_e.call(this._minWeekdaysParse,i))?o:null:"ddd"===t?-1!==(o=_e.call(this._shortWeekdaysParse,i))||-1!==(o=_e.call(this._weekdaysParse,i))||-1!==(o=_e.call(this._minWeekdaysParse,i))?o:null:-1!==(o=_e.call(this._minWeekdaysParse,i))||-1!==(o=_e.call(this._weekdaysParse,i))||-1!==(o=_e.call(this._shortWeekdaysParse,i))?o:null}function Je(){function e(e,t){return t.length-e.length}var t,n,r,o,a,i=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=ge(this.weekdaysMin(n,"")),o=ge(this.weekdaysShort(n,"")),a=ge(this.weekdays(n,"")),i.push(r),s.push(o),l.push(a),c.push(r),c.push(o),c.push(a);i.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Ke(){return this.hours()%12||12}function Qe(e,t){R(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Xe(e,t){return t._meridiemParse}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,Ke),R("k",["kk",2],0,(function(){return this.hours()||24})),R("hmm",0,0,(function(){return""+Ke.apply(this)+P(this.minutes(),2)})),R("hmmss",0,0,(function(){return""+Ke.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)})),R("Hmm",0,0,(function(){return""+this.hours()+P(this.minutes(),2)})),R("Hmmss",0,0,(function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)})),Qe("a",!0),Qe("A",!1),H("hour","h"),V("hour",13),fe("a",Xe),fe("A",Xe),fe("H",re),fe("h",re),fe("k",re),fe("HH",re,Z),fe("hh",re,Z),fe("kk",re,Z),fe("hmm",oe),fe("hmmss",ae),fe("Hmm",oe),fe("Hmmss",ae),be(["H","HH"],3),be(["k","kk"],(function(e,t,n){var r=G(e);t[3]=24===r?0:r})),be(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),be(["h","hh"],(function(e,t,n){t[3]=G(e),m(n).bigHour=!0})),be("hmm",(function(e,t,n){var r=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r)),m(n).bigHour=!0})),be("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r,2)),t[5]=G(e.substr(o)),m(n).bigHour=!0})),be("Hmm",(function(e,t,n){var r=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r))})),be("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r,2)),t[5]=G(e.substr(o))}));var $e,Ze=J("Hours",!0),et={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",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:xe,monthsShort:Me,week:{dow:0,doy:6},weekdays:ze,weekdaysMin:Ue,weekdaysShort:Be,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function ot(e){return e?e.toLowerCase().replace("_","-"):e}function at(t){var r=null;if(void 0===tt[t]&&void 0!==e&&e&&e.exports)try{r=$e._abbr,n(290)("./"+t),it(r)}catch(e){tt[t]=null}return tt[t]}function it(e,t){var n;return e&&((n=c(t)?lt(e):st(e,t))?$e=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),$e._abbr}function st(e,t){if(null!==t){var n,r=et;if(t.abbr=e,null!=tt[e])S("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."),r=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])r=tt[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return tt[e]=new C(L(r,t)),nt[e]&&nt[e].forEach((function(e){st(e.name,e.config)})),it(e),tt[e]}return delete tt[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return $e;if(!a(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,r,o,a=0;a<e.length;){for(t=(o=ot(e[a]).split("-")).length,n=(n=ot(e[a+1]))?n.split("-"):null;t>0;){if(r=at(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&rt(o,n)>=t-1)break;t--}a++}return $e}(e)}function ct(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>ke(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,m(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),m(e)._overflowWeeks&&-1===t&&(t=7),m(e)._overflowWeekday&&-1===t&&(t=8),m(e).overflow=t),e}var ut=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["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}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ft=[["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/]],mt=/^\/?Date\((-?\d+)/i,gt=/^(?:(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}))$/,_t={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vt(e){var t,n,r,o,a,i,s=e._i,l=ut.exec(s)||dt.exec(s);if(l){for(m(e).iso=!0,t=0,n=pt.length;t<n;t++)if(pt[t][1].exec(l[1])){o=pt[t][0],r=!1!==pt[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=ft.length;t<n;t++)if(ft[t][1].exec(l[3])){a=(l[2]||" ")+ft[t][0];break}if(null==a)return void(e._isValid=!1)}if(!r&&null!=a)return void(e._isValid=!1);if(l[4]){if(!ht.exec(l[4]))return void(e._isValid=!1);i="Z"}e._f=o+(a||"")+(i||""),xt(e)}else e._isValid=!1}function bt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function yt(e){var t,n,r,o,a,i,s,l,c=gt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){if(n=c[4],r=c[3],o=c[2],a=c[5],i=c[6],s=c[7],l=[bt(n),Me.indexOf(r),parseInt(o,10),parseInt(a,10),parseInt(i,10)],s&&l.push(parseInt(s,10)),t=l,!function(e,t,n){return!e||Be.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}(c[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return _t[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}(c[8],c[9],c[10]),e._d=Ie.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function wt(e,t,n){return null!=e?e:null!=t?t:n}function kt(e){var t,n,r,a,i,s=[];if(!e._d){for(r=function(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,o,a,i,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,i=4,n=wt(t.GG,e._a[0],je(Tt(),1,4).year),r=wt(t.W,1),((o=wt(t.E,1))<1||o>7)&&(l=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,c=je(Tt(),a,i),n=wt(t.gg,e._a[0],c.year),r=wt(t.w,c.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+a,(t.e<0||t.e>6)&&(l=!0)):o=a),r<1||r>Fe(n,a,i)?m(e)._overflowWeeks=!0:null!=l?m(e)._overflowWeekday=!0:(s=Ye(n,r,o,a,i),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(i=wt(e._a[0],r[0]),(e._dayOfYear>Oe(i)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=Ie(i,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Ie:Ae).apply(null,s),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(m(e).weekdayMismatch=!0)}}function xt(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],m(e).empty=!0;var t,n,r,a,i,s,l=""+e._i,c=l.length,u=0;for(r=j(e._f,e._locale).match(O)||[],t=0;t<r.length;t++)a=r[t],(n=(l.match(me(a,e))||[])[0])&&((i=l.substr(0,l.indexOf(n))).length>0&&m(e).unusedInput.push(i),l=l.slice(l.indexOf(n)+n.length),u+=n.length),I[a]?(n?m(e).empty=!1:m(e).unusedTokens.push(a),we(a,n,e)):e._strict&&!n&&m(e).unusedTokens.push(a);m(e).charsLeftOver=c-u,l.length>0&&m(e).unusedInput.push(l),e._a[3]<=12&&!0===m(e).bigHour&&e._a[3]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(s=m(e).era)&&(e._a[0]=e._locale.erasConvertYear(s,e._a[0])),kt(e),ct(e)}else yt(e);else vt(e)}function Mt(e){var t=e._i,n=e._f;return e._locale=e._locale||lt(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new w(ct(t)):(d(t)?e._d=t:a(n)?function(e){var t,n,r,o,a,i,s=!1;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<e._f.length;o++)a=0,i=!1,t=y({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],xt(t),g(t)&&(i=!0),a+=m(t).charsLeftOver,a+=10*m(t).unusedTokens.length,m(t).score=a,s?a<r&&(r=a,n=t):(null==r||a<r||i)&&(r=a,n=t,i&&(s=!0));p(e,n||t)}(e):n?xt(e):function(e){var t=e._i;c(t)?e._d=new Date(o.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=mt.exec(e._i);null===t?(vt(e),!1===e._isValid&&(delete e._isValid,yt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:o.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):a(t)?(e._a=h(t.slice(0),(function(e){return parseInt(e,10)})),kt(e)):i(t)?function(e){if(!e._d){var t=B(e._i),n=void 0===t.day?t.date:t.day;e._a=h([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),kt(e)}}(e):u(t)?e._d=new Date(t):o.createFromInputFallback(e)}(e),g(e)||(e._d=null),e))}function Et(e,t,n,r,o){var s,c={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(i(e)&&l(e)||a(e)&&0===e.length)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=o,c._l=n,c._i=e,c._f=t,c._strict=r,(s=new w(ct(Mt(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Tt(e,t,n,r){return Et(e,t,n,r,!1)}o.createFromInputFallback=M("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. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var St=M("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),Dt=M("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));function Lt(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Ct=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Pt(e){var t=B(e),n=t.year||0,r=t.quarter||0,o=t.month||0,a=t.week||t.isoWeek||0,i=t.day||0,l=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,r=!1;for(t in e)if(s(e,t)&&(-1===_e.call(Ct,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<Ct.length;++n)if(e[Ct[n]]){if(r)return!1;parseFloat(e[Ct[n]])!==G(e[Ct[n]])&&(r=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*c+1e3*l*60*60,this._days=+i+7*a,this._months=+o+3*r+12*n,this._data={},this._locale=lt(),this._bubble()}function Ot(e){return e instanceof Pt}function Nt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function At(e,t){R(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+P(~~(e/60),2)+t+P(~~e%60,2)}))}At("Z",":"),At("ZZ",""),fe("Z",he),fe("ZZ",he),be(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Rt(he,e)}));var It=/([\+\-]|\d\d)/gi;function Rt(e,t){var n,r,o=(t||"").match(e);return null===o?null:0===(r=60*(n=((o[o.length-1]||[])+"").match(It)||["-",0,0])[1]+G(n[2]))?0:"+"===n[0]?r:-r}function Yt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(k(e)||d(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),o.updateOffset(n,!1),n):Tt(e).local()}function jt(e){return-Math.round(e._d.getTimezoneOffset())}function Ft(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Ht=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,zt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Bt(e,t){var n,r,o,a,i,l,c=e,d=null;return Ot(e)?c={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(c={},t?c[t]=+e:c.milliseconds=+e):(d=Ht.exec(e))?(n="-"===d[1]?-1:1,c={y:0,d:G(d[2])*n,h:G(d[3])*n,m:G(d[4])*n,s:G(d[5])*n,ms:G(Nt(1e3*d[6]))*n}):(d=zt.exec(e))?(n="-"===d[1]?-1:1,c={y:Ut(d[2],n),M:Ut(d[3],n),w:Ut(d[4],n),d:Ut(d[5],n),h:Ut(d[6],n),m:Ut(d[7],n),s:Ut(d[8],n)}):null==c?c={}:"object"==typeof c&&("from"in c||"to"in c)&&(a=Tt(c.from),i=Tt(c.to),o=a.isValid()&&i.isValid()?(i=Yt(i,a),a.isBefore(i)?l=Vt(a,i):((l=Vt(i,a)).milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0},(c={}).ms=o.milliseconds,c.M=o.months),r=new Pt(c),Ot(e)&&s(e,"_locale")&&(r._locale=e._locale),Ot(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Ut(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Vt(e,t){var n={};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 Wt(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(S(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."),o=n,n=r,r=o),qt(this,Bt(n,r),e),this}}function qt(e,t,n,r){var a=t._milliseconds,i=Nt(t._days),s=Nt(t._months);e.isValid()&&(r=null==r||r,s&&Le(e,K(e,"Month")+s*n),i&&Q(e,"Date",K(e,"Date")+i*n),a&&e._d.setTime(e._d.valueOf()+a*n),r&&o.updateOffset(e,i||s))}Bt.fn=Pt.prototype,Bt.invalid=function(){return Bt(NaN)};var Gt=Wt(1,"add"),Jt=Wt(-1,"subtract");function Kt(e){return"string"==typeof e||e instanceof String}function Qt(e){return k(e)||d(e)||Kt(e)||u(e)||function(e){var t=a(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&Kt(e)})).length),t&&n}(e)||function(e){var t,n,r=i(e)&&!l(e),o=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<a.length;t+=1)n=a[t],o=o||s(e,n);return r&&o}(e)||null==e}function Xt(e){var t,n=i(e)&&!l(e),r=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)r=r||s(e,o[t]);return n&&r}function $t(e,t){if(e.date()<t.date())return-$t(t,e);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 Zt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var en=M("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 tn(){return this._locale}function nn(e,t){return(e%t+t)%t}function rn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function on(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function an(e,t){return t.erasAbbrRegex(e)}function sn(){var e,t,n=[],r=[],o=[],a=[],i=this.eras();for(e=0,t=i.length;e<t;++e)r.push(ge(i[e].name)),n.push(ge(i[e].abbr)),o.push(ge(i[e].narrow)),a.push(ge(i[e].name)),a.push(ge(i[e].abbr)),a.push(ge(i[e].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function ln(e,t){R(0,[e,e.length],0,t)}function cn(e,t,n,r,o){var a;return null==e?je(this,r,o).year:(t>(a=Fe(e,r,o))&&(t=a),un.call(this,e,t,n,r,o))}function un(e,t,n,r,o){var a=Ye(e,t,n,r,o),i=Ie(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),fe("N",an),fe("NN",an),fe("NNN",an),fe("NNNN",(function(e,t){return t.erasNameRegex(e)})),fe("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),be(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?m(n).era=o:m(n).invalidEra=e})),fe("y",ce),fe("yy",ce),fe("yyy",ce),fe("yyyy",ce),fe("yo",(function(e,t){return t._eraYearOrdinalRegex||ce})),be(["y","yy","yyy","yyyy"],0),be(["yo"],(function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,o):t[0]=parseInt(e,10)})),R(0,["gg",2],0,(function(){return this.weekYear()%100})),R(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ln("gggg","weekYear"),ln("ggggg","weekYear"),ln("GGGG","isoWeekYear"),ln("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),V("weekYear",1),V("isoWeekYear",1),fe("G",ue),fe("g",ue),fe("GG",re,Z),fe("gg",re,Z),fe("GGGG",se,te),fe("gggg",se,te),fe("GGGGG",le,ne),fe("ggggg",le,ne),ye(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=G(e)})),ye(["gg","GG"],(function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)})),R("Q",0,"Qo","quarter"),H("quarter","Q"),V("quarter",7),fe("Q",$),be("Q",(function(e,t){t[1]=3*(G(e)-1)})),R("D",["DD",2],"Do","date"),H("date","D"),V("date",9),fe("D",re),fe("DD",re,Z),fe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),be(["D","DD"],2),be("Do",(function(e,t){t[2]=G(e.match(re)[0])}));var dn=J("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),V("dayOfYear",4),fe("DDD",ie),fe("DDDD",ee),be(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=G(e)})),R("m",["mm",2],0,"minute"),H("minute","m"),V("minute",14),fe("m",re),fe("mm",re,Z),be(["m","mm"],4);var hn=J("Minutes",!1);R("s",["ss",2],0,"second"),H("second","s"),V("second",15),fe("s",re),fe("ss",re,Z),be(["s","ss"],5);var pn,fn,mn=J("Seconds",!1);for(R("S",0,0,(function(){return~~(this.millisecond()/100)})),R(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),R(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),R(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),R(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),R(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),R(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),H("millisecond","ms"),V("millisecond",16),fe("S",ie,$),fe("SS",ie,Z),fe("SSS",ie,ee),pn="SSSS";pn.length<=9;pn+="S")fe(pn,ce);function gn(e,t){t[6]=G(1e3*("0."+e))}for(pn="S";pn.length<=9;pn+="S")be(pn,gn);fn=J("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");var _n=w.prototype;function vn(e){return e}_n.add=Gt,_n.calendar=function(e,t){1===arguments.length&&(arguments[0]?Qt(arguments[0])?(e=arguments[0],t=void 0):Xt(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Tt(),r=Yt(n,this).startOf("day"),a=o.calendarFormat(this,r)||"sameElse",i=t&&(D(t[a])?t[a].call(this,n):t[a]);return this.format(i||this.localeData().calendar(a,this,Tt(n)))},_n.clone=function(){return new w(this)},_n.diff=function(e,t,n){var r,o,a;if(!this.isValid())return NaN;if(!(r=Yt(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=z(t)){case"year":a=$t(this,r)/12;break;case"month":a=$t(this,r);break;case"quarter":a=$t(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-o)/864e5;break;case"week":a=(this-r-o)/6048e5;break;default:a=this-r}return n?a:q(a)},_n.endOf=function(e){var t,n;if(void 0===(e=z(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?on:rn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-nn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-nn(t,1e3)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},_n.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=Y(this,e);return this.localeData().postformat(t)},_n.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Tt(e).isValid())?Bt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},_n.fromNow=function(e){return this.from(Tt(),e)},_n.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Tt(e).isValid())?Bt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},_n.toNow=function(e){return this.to(Tt(),e)},_n.get=function(e){return D(this[e=z(e)])?this[e]():this},_n.invalidAt=function(){return m(this).overflow},_n.isAfter=function(e,t){var n=k(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=z(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},_n.isBefore=function(e,t){var n=k(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=z(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},_n.isBetween=function(e,t,n,r){var o=k(e)?e:Tt(e),a=k(t)?t:Tt(t);return!!(this.isValid()&&o.isValid()&&a.isValid())&&(("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n)))},_n.isSame=function(e,t){var n,r=k(e)?e:Tt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=z(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 g(this)},_n.lang=en,_n.locale=Zt,_n.localeData=tn,_n.max=Dt,_n.min=St,_n.parsingFlags=function(){return p({},m(this))},_n.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:U[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=B(e));for(n=0;n<r.length;n++)this[r[n].unit](e[r[n].unit])}else if(D(this[e=z(e)]))return this[e](t);return this},_n.startOf=function(e){var t,n;if(void 0===(e=z(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?on:rn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=nn(t,6e4);break;case"second":t=this._d.valueOf(),t-=nn(t,1e3)}return this._d.setTime(t),o.updateOffset(this,!0),this},_n.subtract=Jt,_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?Y(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Y(n,"Z")):Y(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,t,n,r="moment",o="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=o+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(_n[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),_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.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},_n.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},_n.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},_n.eraYear=function(){var e,t,n,r,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,r=this.clone().startOf("day").valueOf(),a[e].since<=r&&r<=a[e].until||a[e].until<=r&&r<=a[e].since)return(this.year()-o(a[e].since).year())*n+a[e].offset;return this.year()},_n.year=Ne,_n.isLeapYear=function(){return W(this.year())},_n.weekYear=function(e){return cn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},_n.isoWeekYear=function(e){return cn.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=Ce,_n.daysInMonth=function(){return ke(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=je(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},_n.weeksInYear=function(){var e=this.localeData()._week;return Fe(this.year(),e.dow,e.doy)},_n.weeksInWeekYear=function(){var e=this.localeData()._week;return Fe(this.weekYear(),e.dow,e.doy)},_n.isoWeeksInYear=function(){return Fe(this.year(),1,4)},_n.isoWeeksInISOWeekYear=function(){return Fe(this.isoWeekYear(),1,4)},_n.date=dn,_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=Ze,_n.minute=_n.minutes=hn,_n.second=_n.seconds=mn,_n.millisecond=_n.milliseconds=fn,_n.utcOffset=function(e,t,n){var r,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Rt(he,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=jt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==e&&(!t||this._changeInProgress?qt(this,Bt(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:jt(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(jt(this),"m")),this},_n.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Rt(de,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},_n.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(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=Ft,_n.isUTC=Ft,_n.zoneAbbr=function(){return this._isUTC?"UTC":""},_n.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},_n.dates=M("dates accessor is deprecated. Use date instead.",dn),_n.months=M("months accessor is deprecated. Use month instead",Ce),_n.years=M("years accessor is deprecated. Use year instead",Ne),_n.zone=M("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=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return y(t,this),(t=Mt(t))._a?(e=t._isUTC?f(t._a):Tt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,o=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),i=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&G(e[r])!==G(t[r]))&&i++;return i+a}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var bn=C.prototype;function yn(e,t,n,r){var o=lt(),a=f().set(r,t);return o[n](a,e)}function wn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return yn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=yn(e,r,n,"month");return o}function kn(e,t,n,r){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var o,a=lt(),i=e?a._week.dow:0,s=[];if(null!=n)return yn(t,(n+i)%7,r,"day");for(o=0;o<7;o++)s[o]=yn(t,(o+i)%7,r,"day");return s}bn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return D(r)?r.call(t,n):r},bn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(O).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},bn.invalidDate=function(){return this._invalidDate},bn.ordinal=function(e){return this._ordinal.replace("%d",e)},bn.preparse=vn,bn.postformat=vn,bn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return D(o)?o(e,t,n,r):o.replace(/%d/i,e)},bn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return D(n)?n(t):n.replace(/%s/i,t)},bn.set=function(e){var t,n;for(n in e)s(e,n)&&(D(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)},bn.eras=function(e,t){var n,r,a,i=this._eras||lt("en")._eras;for(n=0,r=i.length;n<r;++n){switch(typeof i[n].since){case"string":a=o(i[n].since).startOf("day"),i[n].since=a.valueOf()}switch(typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":a=o(i[n].until).startOf("day").valueOf(),i[n].until=a.valueOf()}}return i},bn.erasParse=function(e,t,n){var r,o,a,i,s,l=this.eras();for(e=e.toUpperCase(),r=0,o=l.length;r<o;++r)if(a=l[r].name.toUpperCase(),i=l[r].abbr.toUpperCase(),s=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(i===e)return l[r];break;case"NNNN":if(a===e)return l[r];break;case"NNNNN":if(s===e)return l[r]}else if([a,i,s].indexOf(e)>=0)return l[r]},bn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?o(e.since).year():o(e.since).year()+(t-e.offset)*n},bn.erasAbbrRegex=function(e){return s(this,"_erasAbbrRegex")||sn.call(this),e?this._erasAbbrRegex:this._erasRegex},bn.erasNameRegex=function(e){return s(this,"_erasNameRegex")||sn.call(this),e?this._erasNameRegex:this._erasRegex},bn.erasNarrowRegex=function(e){return s(this,"_erasNarrowRegex")||sn.call(this),e?this._erasNarrowRegex:this._erasRegex},bn.months=function(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ee).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone},bn.monthsShort=function(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ee.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},bn.monthsParse=function(e,t,n){var r,o,a;if(this._monthsParseExact)return De.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(a.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}},bn.monthsRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||Pe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=Se),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},bn.monthsShortRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||Pe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=Te),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},bn.week=function(e){return je(e,this._week.dow,this._week.doy).week},bn.firstDayOfYear=function(){return this._week.doy},bn.firstDayOfWeek=function(){return this._week.dow},bn.weekdays=function(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?He(n,this._week.dow):e?n[e.day()]:n},bn.weekdaysMin=function(e){return!0===e?He(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},bn.weekdaysShort=function(e){return!0===e?He(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},bn.weekdaysParse=function(e,t,n){var r,o,a;if(this._weekdaysParseExact)return Ge.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(a.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}},bn.weekdaysRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Ve),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},bn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=We),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},bn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=qe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},bn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},bn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},it("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===G(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=M("moment.lang is deprecated. Use moment.locale instead.",it),o.langData=M("moment.langData is deprecated. Use moment.localeData instead.",lt);var xn=Math.abs;function Mn(e,t,n,r){var o=Bt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function En(e){return e<0?Math.floor(e):Math.ceil(e)}function Tn(e){return 4800*e/146097}function Sn(e){return 146097*e/4800}function Dn(e){return function(){return this.as(e)}}var Ln=Dn("ms"),Cn=Dn("s"),Pn=Dn("m"),On=Dn("h"),Nn=Dn("d"),An=Dn("w"),In=Dn("M"),Rn=Dn("Q"),Yn=Dn("y");function jn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Fn=jn("milliseconds"),Hn=jn("seconds"),zn=jn("minutes"),Bn=jn("hours"),Un=jn("days"),Vn=jn("months"),Wn=jn("years"),qn=Math.round,Gn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Jn(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var Kn=Math.abs;function Qn(e){return(e>0)-(e<0)||+e}function Xn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,a,i,s,l=Kn(this._milliseconds)/1e3,c=Kn(this._days),u=Kn(this._months),d=this.asSeconds();return d?(e=q(l/60),t=q(e/60),l%=60,e%=60,n=q(u/12),u%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=d<0?"-":"",a=Qn(this._months)!==Qn(d)?"-":"",i=Qn(this._days)!==Qn(d)?"-":"",s=Qn(this._milliseconds)!==Qn(d)?"-":"",o+"P"+(n?a+n+"Y":"")+(u?a+u+"M":"")+(c?i+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var $n=Pt.prototype;return $n.isValid=function(){return this._isValid},$n.abs=function(){var e=this._data;return this._milliseconds=xn(this._milliseconds),this._days=xn(this._days),this._months=xn(this._months),e.milliseconds=xn(e.milliseconds),e.seconds=xn(e.seconds),e.minutes=xn(e.minutes),e.hours=xn(e.hours),e.months=xn(e.months),e.years=xn(e.years),this},$n.add=function(e,t){return Mn(this,e,t,1)},$n.subtract=function(e,t){return Mn(this,e,t,-1)},$n.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=z(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Tn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Sn(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)}},$n.asMilliseconds=Ln,$n.asSeconds=Cn,$n.asMinutes=Pn,$n.asHours=On,$n.asDays=Nn,$n.asWeeks=An,$n.asMonths=In,$n.asQuarters=Rn,$n.asYears=Yn,$n.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*G(this._months/12):NaN},$n._bubble=function(){var e,t,n,r,o,a=this._milliseconds,i=this._days,s=this._months,l=this._data;return a>=0&&i>=0&&s>=0||a<=0&&i<=0&&s<=0||(a+=864e5*En(Sn(s)+i),i=0,s=0),l.milliseconds=a%1e3,e=q(a/1e3),l.seconds=e%60,t=q(e/60),l.minutes=t%60,n=q(t/60),l.hours=n%24,i+=q(n/24),o=q(Tn(i)),s+=o,i-=En(Sn(o)),r=q(s/12),s%=12,l.days=i,l.months=s,l.years=r,this},$n.clone=function(){return Bt(this)},$n.get=function(e){return e=z(e),this.isValid()?this[e+"s"]():NaN},$n.milliseconds=Fn,$n.seconds=Hn,$n.minutes=zn,$n.hours=Bn,$n.days=Un,$n.weeks=function(){return q(this.days()/7)},$n.months=Vn,$n.years=Wn,$n.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,a=Gn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(a=Object.assign({},Gn,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),n=this.localeData(),r=function(e,t,n,r){var o=Bt(e).abs(),a=qn(o.as("s")),i=qn(o.as("m")),s=qn(o.as("h")),l=qn(o.as("d")),c=qn(o.as("M")),u=qn(o.as("w")),d=qn(o.as("y")),h=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||i<=1&&["m"]||i<n.m&&["mm",i]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(h=h||u<=1&&["w"]||u<n.w&&["ww",u]),(h=h||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=r,Jn.apply(null,h)}(this,!o,a,n),o&&(r=n.pastFuture(+this,r)),n.postformat(r)},$n.toISOString=Xn,$n.toString=Xn,$n.toJSON=Xn,$n.locale=Zt,$n.localeData=tn,$n.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Xn),$n.lang=en,R("X",0,0,"unix"),R("x",0,0,"valueOf"),fe("x",ue),fe("X",/[+-]?\d+(\.\d{1,3})?/),be("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),be("x",(function(e,t,n){n._d=new Date(G(e))})),
|
2 |
//! moment.js
|
3 |
-
o.version="2.29.1",t=Tt,o.fn=_n,o.min=function(){var e=[].slice.call(arguments,0);return Lt("isBefore",e)},o.max=function(){var e=[].slice.call(arguments,0);return Lt("isAfter",e)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=f,o.unix=function(e){return Tt(1e3*e)},o.months=function(e,t){return wn(e,t,"months")},o.isDate=d,o.locale=it,o.invalid=_,o.duration=Bt,o.isMoment=k,o.weekdays=function(e,t,n){return kn(e,t,n,"weekdays")},o.parseZone=function(){return Tt.apply(null,arguments).parseZone()},o.localeData=lt,o.isDuration=Ot,o.monthsShort=function(e,t){return wn(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return kn(e,t,n,"weekdaysMin")},o.defineLocale=st,o.updateLocale=function(e,t){if(null!=t){var n,r,o=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(L(tt[e]._config,t)):(null!=(r=at(e))&&(o=r._config),t=L(o,t),null==r&&(t.abbr=e),(n=new C(t)).parentLocale=tt[e],tt[e]=n),it(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===it()&&it(e)):null!=tt[e]&&delete tt[e]);return tt[e]},o.locales=function(){return E(tt)},o.weekdaysShort=function(e,t,n){return kn(e,t,n,"weekdaysShort")},o.normalizeUnits=z,o.relativeTimeRounding=function(e){return void 0===e?qn:"function"==typeof e&&(qn=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==Gn[e]&&(void 0===t?Gn[e]:(Gn[e]=t,"s"===e&&(Gn.ss=t-1),!0))},o.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"},o.prototype=_n,o.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:"GGGG-[W]WW",MONTH:"YYYY-MM"},o}()}).call(this,n(64)(e))},function(e,t,n){e.exports=n(261)},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(2);function o(e){Object(r.a)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){"use strict";function r(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}n.d(t,"a",(function(){return r}))},function(e,t){function n(e,t,n,r,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function s(e){n(i,o,a,s,l,"next",e)}function l(e){n(i,o,a,s,l,"throw",e)}s(void 0)}))}}},function(e,t,n){e.exports=n(262)},function(e,t,n){"use strict";t.__esModule=!0;var r=l(n(279));t.ToastContainer=r.default;var o=n(91);t.Bounce=o.Bounce,t.Slide=o.Slide,t.Zoom=o.Zoom,t.Flip=o.Flip;var a=n(34);t.ToastPosition=a.POSITION,t.ToastType=a.TYPE;var i=l(n(289));t.toast=i.default;var s=l(n(92));function l(e){return e&&e.__esModule?e:{default:e}}t.cssTransition=s.default},function(e,t){e.exports=function(e
|
4 |
/*!
|
5 |
* react-filepond v5.0.0
|
6 |
* A handy FilePond adapter component for React
|
@@ -320,7 +320,7 @@ e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月
|
|
320 |
//! moment.js locale configuration
|
321 |
e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(3))},function(e,t,n){!function(e){"use strict";
|
322 |
//! moment.js locale configuration
|
323 |
-
e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(3))},function(e,t,n){var r=n(291);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(293)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){"use strict";var r=Array.prototype.slice,o=n(231),a=Object.keys,i=a?function(e){return a(e)}:n(337),s=Object.keys;i.shim=function(){Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return o(e)?s(r.call(e)):s(e)}):Object.keys=i;return Object.keys||i},e.exports=i},function(e,t,n){"use strict";var r=Object.prototype.toString;e.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";var r=SyntaxError,o=Function,a=TypeError,i=function(e){try{return Function('"use strict"; return ('+e+").constructor;")()}catch(e){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(e){s=null}var l=function(){throw new a},c=s?function(){try{return l}catch(e){try{return s(arguments,"callee").get}catch(e){return l}}}():l,u=n(65)(),d=Object.getPrototypeOf||function(e){return e.__proto__},h=i("async function* () {}"),p=h?h.prototype:void 0,f=p?p.prototype:void 0,m="undefined"==typeof Uint8Array?void 0:d(Uint8Array),g={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":u?d([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":i("async function () {}"),"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":f?d(f):void 0,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":i("function* () {}"),"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u?d(d([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&u?d((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&u?d((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u?d(""[Symbol.iterator]()):void 0,"%Symbol%":u?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":c,"%TypedArray%":m,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},_={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=n(36),b=n(342),y=v.call(Function.call,Array.prototype.concat),w=v.call(Function.apply,Array.prototype.splice),k=v.call(Function.call,String.prototype.replace),x=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,E=function(e){var t=[];return k(e,x,(function(e,n,r,o){t[t.length]=r?k(o,M,"$1"):n||e})),t},T=function(e,t){var n,o=e;if(b(_,o)&&(o="%"+(n=_[o])[0]+"%"),b(g,o)){var i=g[o];if(void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:o,value:i}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');var n=E(e),r=n.length>0?n[0]:"",o=T("%"+r+"%",t),i=o.name,l=o.value,c=!1,u=o.alias;u&&(r=u[0],w(n,y([0,1],u)));for(var d=1,h=!0;d<n.length;d+=1){var p=n[d];if("constructor"!==p&&h||(c=!0),b(g,i="%"+(r+="."+p)+"%"))l=g[i];else if(null!=l){if(s&&d+1>=n.length){var f=s(l,p);if(h=!!f,!t&&!(p in l))throw new a("base intrinsic for "+e+" exists, but the property is not available.");l=h&&"get"in f&&!("originalValue"in f.get)?f.get:l[p]}else h=b(l,p),l=l[p];h&&!c&&(g[i]=l)}}return l}},function(e,t,n){"use strict";var r=n(36),o=n(232),a=o("%Function.prototype.apply%"),i=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||r.call(i,a),l=o("%Object.defineProperty%",!0);if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(){return s(r,i,arguments)};var c=function(){return s(r,a,arguments)};l?l(e.exports,"apply",{value:c}):e.exports.apply=c},function(e,t,n){"use strict";var r=function(e){return e!=e};e.exports=function(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!r(e)||!r(t))}},function(e,t,n){"use strict";var r=n(234);e.exports=function(){return"function"==typeof Object.is?Object.is:r}},function(e,t,n){"use strict";var r=Object,o=TypeError;e.exports=function(){if(null!=this&&this!==r(this))throw new o("RegExp.prototype.flags getter called on non-object");var e="";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e}},function(e,t,n){"use strict";var r=n(236),o=n(37).supportsDescriptors,a=Object.getOwnPropertyDescriptor,i=TypeError;e.exports=function(){if(!o)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=a(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return r}},function(e,t,n){var r=n(45),o=n(361),a=n(362),i=n(363),s=n(364),l=n(365);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=s,c.prototype.set=l,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(38),o=n(68);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(35))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(384),o=n(387),a=n(388);e.exports=function(e,t,n,i,s,l){var c=1&n,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f<u;){var _=e[f],v=t[f];if(i)var b=c?i(v,_,f,t,e,l):i(_,v,f,e,t,l);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!o(t,(function(e,t){if(!a(g,t)&&(_===e||s(_,e,n,i,l)))return g.push(t)}))){m=!1;break}}else if(_!==v&&!s(_,v,n,i,l)){m=!1;break}}return l.delete(e),l.delete(t),m}},function(e,t,n){var r=n(402),o=n(39),a=Object.prototype,i=a.hasOwnProperty,s=a.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},function(e,t,n){(function(e){var r=n(24),o=n(403),a=t&&!t.nodeType&&t,i=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=i&&i.exports===a?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l}).call(this,n(64)(e))},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(404),o=n(405),a=n(406),i=a&&a.isTypedArray,s=i?o(i):r;e.exports=s},function(e,t,n){var r=n(240),o=n(71);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(68);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(252),o=n(50);e.exports=function(e,t){for(var n=0,a=(t=r(t,e)).length;null!=e&&n<a;)e=e[o(t[n++])];return n&&n==a?e:void 0}},function(e,t,n){var r=n(25),o=n(72),a=n(433),i=n(436);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:a(i(e))}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){var r=n(230),o=n(338),a=n(343),i=n(345),s=n(346),l=n(350),c=Date.prototype.getTime;function u(e,t,n){var p=n||{};return!!(p.strict?a(e,t):e===t)||(!e||!t||"object"!=typeof e&&"object"!=typeof t?p.strict?a(e,t):e==t:function(e,t,n){var a,p;if(typeof e!=typeof t)return!1;if(d(e)||d(t))return!1;if(e.prototype!==t.prototype)return!1;if(o(e)!==o(t))return!1;var f=i(e),m=i(t);if(f!==m)return!1;if(f||m)return e.source===t.source&&s(e)===s(t);if(l(e)&&l(t))return c.call(e)===c.call(t);var g=h(e),_=h(t);if(g!==_)return!1;if(g||_){if(e.length!==t.length)return!1;for(a=0;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}if(typeof e!=typeof t)return!1;try{var v=r(e),b=r(t)}catch(e){return!1}if(v.length!==b.length)return!1;for(v.sort(),b.sort(),a=v.length-1;a>=0;a--)if(v[a]!=b[a])return!1;for(a=v.length-1;a>=0;a--)if(p=v[a],!u(e[p],t[p],n))return!1;return!0}(e,t,p))}function d(e){return null==e}function h(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(e.length>0&&"number"!=typeof e[0]))}e.exports=u},function(e,t,n){"use strict";
|
324 |
/** @license React v16.14.0
|
325 |
* react.production.min.js
|
326 |
*
|
@@ -358,4 +358,4 @@ e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.
|
|
358 |
* (c) 2020 Chart.js Contributors
|
359 |
* Released under the MIT License
|
360 |
*/
|
361 |
-
e.exports=function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[t[r]]=r);var o=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var a in o)if(o.hasOwnProperty(a)){if(!("channels"in o[a]))throw new Error("missing channels property: "+a);if(!("labels"in o[a]))throw new Error("missing channel labels property: "+a);if(o[a].labels.length!==o[a].channels)throw new Error("channel and label counts mismatch: "+a);var i=o[a].channels,s=o[a].labels;delete o[a].channels,delete o[a].labels,Object.defineProperty(o[a],"channels",{value:i}),Object.defineProperty(o[a],"labels",{value:s})}o.rgb.hsl=function(e){var t,n,r=e[0]/255,o=e[1]/255,a=e[2]/255,i=Math.min(r,o,a),s=Math.max(r,o,a),l=s-i;return s===i?t=0:r===s?t=(o-a)/l:o===s?t=2+(a-r)/l:a===s&&(t=4+(r-o)/l),(t=Math.min(60*t,360))<0&&(t+=360),n=(i+s)/2,[t,100*(s===i?0:n<=.5?l/(s+i):l/(2-s-i)),100*n]},o.rgb.hsv=function(e){var t,n,r,o,a,i=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(i,s,l),u=c-Math.min(i,s,l),d=function(e){return(c-e)/6/u+.5};return 0===u?o=a=0:(a=u/c,t=d(i),n=d(s),r=d(l),i===c?o=r-n:s===c?o=1/3+t-r:l===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*a,100*c]},o.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[o.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(n,r))*100,100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},o.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-o)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-o-t)/(1-t)||0),100*t]},o.rgb.keyword=function(e){var r=n[e];if(r)return r;var o,a,i,s=1/0;for(var l in t)if(t.hasOwnProperty(l)){var c=t[l],u=(a=e,i=c,Math.pow(a[0]-i[0],2)+Math.pow(a[1]-i[1],2)+Math.pow(a[2]-i[2],2));u<s&&(s=u,o=l)}return o},o.keyword.rgb=function(e){return t[e]},o.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},o.rgb.lab=function(e){var t=o.rgb.xyz(e),n=t[0],r=t[1],a=t[2];return r/=100,a/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]},o.hsl.rgb=function(e){var t,n,r,o,a,i=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[a=255*l,a,a];t=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var c=0;c<3;c++)(r=i+1/3*-(c-1))<0&&r++,r>1&&r--,a=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,o[c]=255*a;return o},o.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,o=n,a=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,o*=a<=1?a:2-a,[t,100*(0===r?2*o/(a+o):2*n/(r+n)),(r+n)/2*100]},o.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,o=Math.floor(t)%6,a=t-Math.floor(t),i=255*r*(1-n),s=255*r*(1-n*a),l=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,l,i];case 1:return[s,r,i];case 2:return[i,r,l];case 3:return[i,s,r];case 4:return[l,i,r];case 5:return[r,i,s]}},o.hsv.hsl=function(e){var t,n,r,o=e[0],a=e[1]/100,i=e[2]/100,s=Math.max(i,.01);return r=(2-a)*i,n=a*s,[o,100*(n=(n/=(t=(2-a)*s)<=1?t:2-t)||0),100*(r/=2)]},o.hwb.rgb=function(e){var t,n,r,o,a,i,s,l=e[0]/360,c=e[1]/100,u=e[2]/100,d=c+u;switch(d>1&&(c/=d,u/=d),r=6*l-(t=Math.floor(6*l)),0!=(1&t)&&(r=1-r),o=c+r*((n=1-u)-c),t){default:case 6:case 0:a=n,i=o,s=c;break;case 1:a=o,i=n,s=c;break;case 2:a=c,i=n,s=o;break;case 3:a=c,i=o,s=n;break;case 4:a=o,i=c,s=n;break;case 5:a=n,i=c,s=o}return[255*a,255*i,255*s]},o.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},o.xyz.rgb=function(e){var t,n,r,o=e[0]/100,a=e[1]/100,i=e[2]/100;return n=-.9689*o+1.8758*a+.0415*i,r=.0557*o+-.204*a+1.057*i,t=(t=3.2406*o+-1.5372*a+-.4986*i)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},o.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},o.lab.xyz=function(e){var t,n,r,o=e[0];t=e[1]/500+(n=(o+16)/116),r=n-e[2]/200;var a=Math.pow(n,3),i=Math.pow(t,3),s=Math.pow(r,3);return n=a>.008856?a:(n-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},o.lab.lch=function(e){var t,n=e[0],r=e[1],o=e[2];return(t=360*Math.atan2(o,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+o*o),t]},o.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},o.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],a=1 in arguments?arguments[1]:o.rgb.hsv(e)[2];if(0===(a=Math.round(a/50)))return 30;var i=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===a&&(i+=60),i},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},o.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},o.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},o.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},o.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255,a=Math.max(Math.max(n,r),o),i=Math.min(Math.min(n,r),o),s=a-i;return t=s<=0?0:a===n?(r-o)/s%6:a===r?2+(o-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?i/(1-s):0)]},o.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,o=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},o.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},o.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var o,a=[0,0,0],i=t%1*6,s=i%1,l=1-s;switch(Math.floor(i)){case 0:a[0]=1,a[1]=s,a[2]=0;break;case 1:a[0]=l,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=s;break;case 3:a[0]=0,a[1]=l,a[2]=1;break;case 4:a[0]=s,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=l}return o=(1-n)*r,[255*(n*a[0]+o),255*(n*a[1]+o),255*(n*a[2]+o)]},o.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},o.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},o.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},o.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=o.gray.hsv=function(e){return[0,0,e[0]]},o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}));function r(e){var t=function(){for(var e={},t=Object.keys(n),r=t.length,o=0;o<r;o++)e[t[o]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;)for(var o=r.pop(),a=Object.keys(n[o]),i=a.length,s=0;s<i;s++){var l=a[s],c=t[l];-1===c.distance&&(c.distance=t[o].distance+1,c.parent=o,r.unshift(l))}return t}function o(e,t){return function(n){return t(e(n))}}function a(e,t){for(var r=[t[e].parent,e],a=n[t[e].parent][e],i=t[e].parent;t[i].parent;)r.unshift(t[i].parent),a=o(n[t[i].parent][i],a),i=t[i].parent;return a.conversion=r,a}n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;var i={};Object.keys(n).forEach((function(e){i[e]={},Object.defineProperty(i[e],"channels",{value:n[e].channels}),Object.defineProperty(i[e],"labels",{value:n[e].labels});var t=function(e){for(var t=r(e),n={},o=Object.keys(t),i=o.length,s=0;s<i;s++){var l=o[s];null!==t[l].parent&&(n[l]=a(l,t))}return n}(e);Object.keys(t).forEach((function(n){var r=t[n];i[e][n]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,o=0;o<r;o++)n[o]=Math.round(n[o]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(r),i[e][n].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))}));var s=i,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},c={getRgba:u,getHsla:d,getRgb:function(e){var t=u(e);return t&&t.slice(0,3)},getHsl:function(e){var t=d(e);return t&&t.slice(0,3)},getHwb:h,getAlpha:function(e){var t=u(e);return t||(t=d(e))||(t=h(e))?t[3]:void 0},hexString:function(e,t){return t=void 0!==t&&3===e.length?t:e[3],"#"+_(e[0])+_(e[1])+_(e[2])+(t>=0&&t<1?_(Math.round(255*t)):"")},rgbString:function(e,t){return t<1||e[3]&&e[3]<1?p(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:p,percentString:function(e,t){if(t<1||e[3]&&e[3]<1)return f(e,t);var n=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),o=Math.round(e[2]/255*100);return"rgb("+n+"%, "+r+"%, "+o+"%)"},percentaString:f,hslString:function(e,t){return t<1||e[3]&&e[3]<1?m(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:m,hwbString:function(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function(e){return v[e.slice(0,3)]}};function u(e){if(e){var t=[0,0,0],n=1,r=e.match(/^#([a-fA-F0-9]{3,4})$/i),o="";if(r){o=(r=r[1])[3];for(var a=0;a<t.length;a++)t[a]=parseInt(r[a]+r[a],16);o&&(n=Math.round(parseInt(o+o,16)/255*100)/100)}else if(r=e.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(o=r[2],r=r[1],a=0;a<t.length;a++)t[a]=parseInt(r.slice(2*a,2*a+2),16);o&&(n=Math.round(parseInt(o,16)/255*100)/100)}else if(r=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<t.length;a++)t[a]=parseInt(r[a+1]);n=parseFloat(r[4])}else if(r=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<t.length;a++)t[a]=Math.round(2.55*parseFloat(r[a+1]));n=parseFloat(r[4])}else if(r=e.match(/(\w+)/)){if("transparent"==r[1])return[0,0,0,0];if(!(t=l[r[1]]))return}for(a=0;a<t.length;a++)t[a]=g(t[a],0,255);return n=n||0==n?g(n,0,1):1,t[3]=n,t}}function d(e){if(e){var t=e.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[g(parseInt(t[1]),0,360),g(parseFloat(t[2]),0,100),g(parseFloat(t[3]),0,100),g(isNaN(n)?1:n,0,1)]}}}function h(e){if(e){var t=e.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[g(parseInt(t[1]),0,360),g(parseFloat(t[2]),0,100),g(parseFloat(t[3]),0,100),g(isNaN(n)?1:n,0,1)]}}}function p(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function f(e,t){return"rgba("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%, "+(t||e[3]||1)+")"}function m(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function g(e,t,n){return Math.min(Math.max(t,e),n)}function _(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var v={};for(var b in l)v[l[b]]=b;var y=function(e){return e instanceof y?e:this instanceof y?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof e?(t=c.getRgba(e))?this.setValues("rgb",t):(t=c.getHsla(e))?this.setValues("hsl",t):(t=c.getHwb(e))&&this.setValues("hwb",t):"object"==typeof e&&(void 0!==(t=e).r||void 0!==t.red?this.setValues("rgb",t):void 0!==t.l||void 0!==t.lightness?this.setValues("hsl",t):void 0!==t.v||void 0!==t.value?this.setValues("hsv",t):void 0!==t.w||void 0!==t.whiteness?this.setValues("hwb",t):void 0===t.c&&void 0===t.cyan||this.setValues("cmyk",t)))):new y(e);var t};y.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var e=this.values;return 1!==e.alpha?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values;return e.hsl.concat([e.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return c.hexString(this.values.rgb)},rgbString:function(){return c.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return c.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return c.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return c.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return c.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return c.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return c.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],n=0;n<e.length;n++){var r=e[n]/255;t[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,n=(t[0]+e)%360;return t[0]=n<0?360+n:n,this.setValues("hsl",t),this},mix:function(e,t){var n=e,r=void 0===t?.5:t,o=2*r-1,a=this.alpha()-n.alpha(),i=((o*a==-1?o:(o+a)/(1+o*a))+1)/2,s=1-i;return this.rgb(i*this.red()+s*n.red(),i*this.green()+s*n.green(),i*this.blue()+s*n.blue()).alpha(this.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var e,t,n=new y,r=this.values,o=n.values;for(var a in r)r.hasOwnProperty(a)&&(e=r[a],"[object Array]"===(t={}.toString.call(e))?o[a]=e.slice(0):"[object Number]"===t?o[a]=e:console.error("unexpected color value:",e));return n}},y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},y.prototype.getValues=function(e){for(var t=this.values,n={},r=0;r<e.length;r++)n[e.charAt(r)]=t[e][r];return 1!==t.alpha&&(n.a=t.alpha),n},y.prototype.setValues=function(e,t){var n,r,o=this.values,a=this.spaces,i=this.maxes,l=1;if(this.valid=!0,"alpha"===e)l=t;else if(t.length)o[e]=t.slice(0,e.length),l=t[e.length];else if(void 0!==t[e.charAt(0)]){for(n=0;n<e.length;n++)o[e][n]=t[e.charAt(n)];l=t.a}else if(void 0!==t[a[e][0]]){var c=a[e];for(n=0;n<e.length;n++)o[e][n]=t[c[n]];l=t.alpha}if(o.alpha=Math.max(0,Math.min(1,void 0===l?o.alpha:l)),"alpha"===e)return!1;for(n=0;n<e.length;n++)r=Math.max(0,Math.min(i[e][n],o[e][n])),o[e][n]=Math.round(r);for(var u in a)u!==e&&(o[u]=s[e][u](o[e]));return!0},y.prototype.setSpace=function(e,t){var n=t[0];return void 0===n?this.getValues(e):("number"==typeof n&&(n=Array.prototype.slice.call(t)),this.setValues(e,n),this)},y.prototype.setChannel=function(e,t,n){var r=this.values[e];return void 0===n?r[t]:(n===r[t]||(r[t]=n,this.setValues(e,r)),this)},"undefined"!=typeof window&&(window.Color=y);var w=y;function k(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}var x,M={noop:function(){},uid:(x=0,function(){return x++}),isNullOrUndef:function(e){return null==e},isArray:function(e){if(Array.isArray&&Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)},isObject:function(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)},isFinite:function(e){return("number"==typeof e||e instanceof Number)&&isFinite(e)},valueOrDefault:function(e,t){return void 0===e?t:e},valueAtIndexOrDefault:function(e,t,n){return M.valueOrDefault(M.isArray(e)?e[t]:e,n)},callback:function(e,t,n){if(e&&"function"==typeof e.call)return e.apply(n,t)},each:function(e,t,n,r){var o,a,i;if(M.isArray(e))if(a=e.length,r)for(o=a-1;o>=0;o--)t.call(n,e[o],o);else for(o=0;o<a;o++)t.call(n,e[o],o);else if(M.isObject(e))for(a=(i=Object.keys(e)).length,o=0;o<a;o++)t.call(n,e[i[o]],i[o])},arrayEquals:function(e,t){var n,r,o,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(o=e[n],a=t[n],o instanceof Array&&a instanceof Array){if(!M.arrayEquals(o,a))return!1}else if(o!==a)return!1;return!0},clone:function(e){if(M.isArray(e))return e.map(M.clone);if(M.isObject(e)){for(var t=Object.create(e),n=Object.keys(e),r=n.length,o=0;o<r;++o)t[n[o]]=M.clone(e[n[o]]);return t}return e},_merger:function(e,t,n,r){if(k(e)){var o=t[e],a=n[e];M.isObject(o)&&M.isObject(a)?M.merge(o,a,r):t[e]=M.clone(a)}},_mergerIf:function(e,t,n){if(k(e)){var r=t[e],o=n[e];M.isObject(r)&&M.isObject(o)?M.mergeIf(r,o):t.hasOwnProperty(e)||(t[e]=M.clone(o))}},merge:function(e,t,n){var r,o,a,i,s,l=M.isArray(t)?t:[t],c=l.length;if(!M.isObject(e))return e;for(r=(n=n||{}).merger||M._merger,o=0;o<c;++o)if(t=l[o],M.isObject(t))for(s=0,i=(a=Object.keys(t)).length;s<i;++s)r(a[s],e,t,n);return e},mergeIf:function(e,t){return M.merge(e,t,{merger:M._mergerIf})},extend:Object.assign||function(e){return M.merge(e,[].slice.call(arguments,1),{merger:function(e,t,n){t[e]=n[e]}})},inherits:function(e){var t=this,n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},r=function(){this.constructor=n};return r.prototype=t.prototype,n.prototype=new r,n.extend=M.inherits,e&&M.extend(n.prototype,e),n.__super__=t.prototype,n},_deprecated:function(e,t,n,r){void 0!==t&&console.warn(e+': "'+n+'" is deprecated. Please use "'+r+'" instead')}},E=M;M.callCallback=M.callback,M.indexOf=function(e,t,n){return Array.prototype.indexOf.call(e,t,n)},M.getValueOrDefault=M.valueOrDefault,M.getValueAtIndexOrDefault=M.valueAtIndexOrDefault;var T={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return(e-=1)*e*e+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-((e-=1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return(e-=1)*e*e*e*e+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return 1-Math.cos(e*(Math.PI/2))},easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function(e){return 0===e?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return e>=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n))},easeOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:2==(e/=.5)?1:(n||(n=.45),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),e<1?r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-T.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*T.easeInBounce(2*e):.5*T.easeOutBounce(2*e-1)+.5}},S={effects:T};E.easingEffects=T;var D=Math.PI,L=D/180,C=2*D,P=D/2,O=D/4,N=2*D/3,A={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,n,r,o,a){if(a){var i=Math.min(a,o/2,r/2),s=t+i,l=n+i,c=t+r-i,u=n+o-i;e.moveTo(t,l),s<c&&l<u?(e.arc(s,l,i,-D,-P),e.arc(c,l,i,-P,0),e.arc(c,u,i,0,P),e.arc(s,u,i,P,D)):s<c?(e.moveTo(s,n),e.arc(c,l,i,-P,P),e.arc(s,l,i,P,D+P)):l<u?(e.arc(s,l,i,-D,0),e.arc(s,u,i,0,D)):e.arc(s,l,i,-D,D),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,r,o)},drawPoint:function(e,t,n,r,o,a){var i,s,l,c,u,d=(a||0)*L;if(t&&"object"==typeof t&&("[object HTMLImageElement]"===(i=t.toString())||"[object HTMLCanvasElement]"===i))return e.save(),e.translate(r,o),e.rotate(d),e.drawImage(t,-t.width/2,-t.height/2,t.width,t.height),void e.restore();if(!(isNaN(n)||n<=0)){switch(e.beginPath(),t){default:e.arc(r,o,n,0,C),e.closePath();break;case"triangle":e.moveTo(r+Math.sin(d)*n,o-Math.cos(d)*n),d+=N,e.lineTo(r+Math.sin(d)*n,o-Math.cos(d)*n),d+=N,e.lineTo(r+Math.sin(d)*n,o-Math.cos(d)*n),e.closePath();break;case"rectRounded":c=n-(u=.516*n),s=Math.cos(d+O)*c,l=Math.sin(d+O)*c,e.arc(r-s,o-l,u,d-D,d-P),e.arc(r+l,o-s,u,d-P,d),e.arc(r+s,o+l,u,d,d+P),e.arc(r-l,o+s,u,d+P,d+D),e.closePath();break;case"rect":if(!a){c=Math.SQRT1_2*n,e.rect(r-c,o-c,2*c,2*c);break}d+=O;case"rectRot":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,o-l),e.lineTo(r+l,o-s),e.lineTo(r+s,o+l),e.lineTo(r-l,o+s),e.closePath();break;case"crossRot":d+=O;case"cross":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,o-l),e.lineTo(r+s,o+l),e.moveTo(r+l,o-s),e.lineTo(r-l,o+s);break;case"star":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,o-l),e.lineTo(r+s,o+l),e.moveTo(r+l,o-s),e.lineTo(r-l,o+s),d+=O,s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,o-l),e.lineTo(r+s,o+l),e.moveTo(r+l,o-s),e.lineTo(r-l,o+s);break;case"line":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,o-l),e.lineTo(r+s,o+l);break;case"dash":e.moveTo(r,o),e.lineTo(r+Math.cos(d)*n,o+Math.sin(d)*n)}e.fill(),e.stroke()}},_isPointInArea:function(e,t){return e.x>t.left-1e-6&&e.x<t.right+1e-6&&e.y>t.top-1e-6&&e.y<t.bottom+1e-6},clipArea:function(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()},unclipArea:function(e){e.restore()},lineTo:function(e,t,n,r){var o=n.steppedLine;if(o){if("middle"===o){var a=(t.x+n.x)/2;e.lineTo(a,r?n.y:t.y),e.lineTo(a,r?t.y:n.y)}else"after"===o&&!r||"after"!==o&&r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}else n.tension?e.bezierCurveTo(r?t.controlPointPreviousX:t.controlPointNextX,r?t.controlPointPreviousY:t.controlPointNextY,r?n.controlPointNextX:n.controlPointPreviousX,r?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):e.lineTo(n.x,n.y)}},I=A;E.clear=A.clear,E.drawRoundedRectangle=function(e){e.beginPath(),A.roundedRect.apply(A,arguments)};var R={_set:function(e,t){return E.merge(this[e]||(this[e]={}),t)}};R._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var Y=R,j=E.valueOrDefault,F={toLineHeight:function(e,t){var n=(""+e).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e},toPadding:function(e){var t,n,r,o;return E.isObject(e)?(t=+e.top||0,n=+e.right||0,r=+e.bottom||0,o=+e.left||0):t=n=r=o=+e||0,{top:t,right:n,bottom:r,left:o,height:t+r,width:o+n}},_parseFont:function(e){var t=Y.global,n=j(e.fontSize,t.defaultFontSize),r={family:j(e.fontFamily,t.defaultFontFamily),lineHeight:E.options.toLineHeight(j(e.lineHeight,t.defaultLineHeight),n),size:n,style:j(e.fontStyle,t.defaultFontStyle),weight:null,string:""};return r.string=function(e){return!e||E.isNullOrUndef(e.size)||E.isNullOrUndef(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(r),r},resolve:function(e,t,n,r){var o,a,i,s=!0;for(o=0,a=e.length;o<a;++o)if(void 0!==(i=e[o])&&(void 0!==t&&"function"==typeof i&&(i=i(t),s=!1),void 0!==n&&E.isArray(i)&&(i=i[n],s=!1),void 0!==i))return r&&!s&&(r.cacheable=!1),i}},H={_factorize:function(e){var t,n=[],r=Math.sqrt(e);for(t=1;t<r;t++)e%t==0&&(n.push(t),n.push(e/t));return r===(0|r)&&n.push(r),n.sort((function(e,t){return e-t})).pop(),n},log10:Math.log10||function(e){var t=Math.log(e)*Math.LOG10E,n=Math.round(t);return e===Math.pow(10,n)?n:t}},z=H;E.log10=H.log10;var B=E,U=S,V=I,W=F,q=z,G={getRtlAdapter:function(e,t,n){return e?function(e,t){return{x:function(n){return e+e+t-n},setWidth:function(e){t=e},textAlign:function(e){return"center"===e?e:"right"===e?"left":"right"},xPlus:function(e,t){return e-t},leftForLtr:function(e,t){return e-t}}}(t,n):{x:function(e){return e},setWidth:function(e){},textAlign:function(e){return e},xPlus:function(e,t){return e+t},leftForLtr:function(e,t){return e}}},overrideTextDirection:function(e,t){var n,r;"ltr"!==t&&"rtl"!==t||(r=[(n=e.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)},restoreTextDirection:function(e){var t=e.prevTextDirection;void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}};B.easing=U,B.canvas=V,B.options=W,B.math=q,B.rtl=G;var J=function(e){B.extend(this,e),this.initialize.apply(this,arguments)};B.extend(J.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var e=this;return e._view||(e._view=B.extend({},e._model)),e._start={},e},transition:function(e){var t=this,n=t._model,r=t._start,o=t._view;return n&&1!==e?(o||(o=t._view={}),r||(r=t._start={}),function(e,t,n,r){var o,a,i,s,l,c,u,d,h,p=Object.keys(n);for(o=0,a=p.length;o<a;++o)if(c=n[i=p[o]],t.hasOwnProperty(i)||(t[i]=c),(s=t[i])!==c&&"_"!==i[0]){if(e.hasOwnProperty(i)||(e[i]=s),(u=typeof c)==typeof(l=e[i]))if("string"===u){if((d=w(l)).valid&&(h=w(c)).valid){t[i]=h.mix(d,r).rgbString();continue}}else if(B.isFinite(l)&&B.isFinite(c)){t[i]=l+(c-l)*r;continue}t[i]=c}}(r,o,n,e),t):(t._view=B.extend({},n),t._start=null,t)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return B.isNumber(this._model.x)&&B.isNumber(this._model.y)}}),J.extend=B.inherits;var K=J,Q=K.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),X=Q;Object.defineProperty(Q.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(Q.prototype,"chartInstance",{get:function(){return this.chart},set:function(e){this.chart=e}}),Y._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:B.noop,onComplete:B.noop}});var $={animations:[],request:null,addAnimation:function(e,t,n,r){var o,a,i=this.animations;for(t.chart=e,t.startTime=Date.now(),t.duration=n,r||(e.animating=!0),o=0,a=i.length;o<a;++o)if(i[o].chart===e)return void(i[o]=t);i.push(t),1===i.length&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=B.findIndex(this.animations,(function(t){return t.chart===e}));-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var e=this;null===e.request&&(e.request=B.requestAnimFrame.call(window,(function(){e.request=null,e.startDigest()})))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var e,t,n,r,o=this.animations,a=0;a<o.length;)t=(e=o[a]).chart,n=e.numSteps,r=Math.floor((Date.now()-e.startTime)/e.duration*n)+1,e.currentStep=Math.min(r,n),B.callback(e.render,[t,e],t),B.callback(e.onAnimationProgress,[e],t),e.currentStep>=n?(B.callback(e.onAnimationComplete,[e],t),t.animating=!1,o.splice(a,1)):++a}},Z=B.options.resolve,ee=["push","pop","shift","splice","unshift"];function te(e,t){var n=e._chartjs;if(n){var r=n.listeners,o=r.indexOf(t);-1!==o&&r.splice(o,1),r.length>0||(ee.forEach((function(t){delete e[t]})),delete e._chartjs)}}var ne=function(e,t){this.initialize(e,t)};B.extend(ne.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var n=this;n.chart=e,n.index=t,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this.getMeta(),t=this.chart,n=t.scales,r=this.getDataset(),o=t.options.scales;null!==e.xAxisID&&e.xAxisID in n&&!r.xAxisID||(e.xAxisID=r.xAxisID||o.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in n&&!r.yAxisID||(e.yAxisID=r.yAxisID||o.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&te(this._data,this)},createMetaDataset:function(){var e=this.datasetElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(e){var t=this.dataElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index,_index:e})},addElements:function(){var e,t,n=this.getMeta(),r=this.getDataset().data||[],o=n.data;for(e=0,t=r.length;e<t;++e)o[e]=o[e]||this.createMetaData(e);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(e){var t=this.createMetaData(e);this.getMeta().data.splice(e,0,t),this.updateElement(t,e,!0)},buildOrUpdateElements:function(){var e,t,n=this,r=n.getDataset(),o=r.data||(r.data=[]);n._data!==o&&(n._data&&te(n._data,n),o&&Object.isExtensible(o)&&(t=n,(e=o)._chartjs?e._chartjs.listeners.push(t):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ee.forEach((function(t){var n="onData"+t.charAt(0).toUpperCase()+t.slice(1),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:function(){var t=Array.prototype.slice.call(arguments),o=r.apply(this,t);return B.each(e._chartjs.listeners,(function(e){"function"==typeof e[n]&&e[n].apply(e,t)})),o}})})))),n._data=o),n.resyncElements()},_configure:function(){this._config=B.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(e,t,n){"_meta"!==e&&"data"!==e&&B._merger(e,t,n)}})},_update:function(e){this._configure(),this._cachedDataOpts=null,this.update(e)},update:B.noop,transition:function(e){for(var t=this.getMeta(),n=t.data||[],r=n.length,o=0;o<r;++o)n[o].transition(e);t.dataset&&t.dataset.transition(e)},draw:function(){var e=this.getMeta(),t=e.data||[],n=t.length,r=0;for(e.dataset&&e.dataset.draw();r<n;++r)t[r].draw()},getStyle:function(e){var t,n=this.getMeta(),r=n.dataset;return this._configure(),r&&void 0===e?t=this._resolveDatasetElementOptions(r||{}):(e=e||0,t=this._resolveDataElementOptions(n.data[e]||{},e)),!1!==t.fill&&null!==t.fill||(t.backgroundColor=t.borderColor),t},_resolveDatasetElementOptions:function(e,t){var n,r,o,a,i=this,s=i.chart,l=i._config,c=e.custom||{},u=s.options.elements[i.datasetElementType.prototype._type]||{},d=i._datasetElementOptions,h={},p={chart:s,dataset:i.getDataset(),datasetIndex:i.index,hover:t};for(n=0,r=d.length;n<r;++n)o=d[n],a=t?"hover"+o.charAt(0).toUpperCase()+o.slice(1):o,h[o]=Z([c[a],l[a],u[a]],p);return h},_resolveDataElementOptions:function(e,t){var n=this,r=e&&e.custom,o=n._cachedDataOpts;if(o&&!r)return o;var a,i,s,l,c=n.chart,u=n._config,d=c.options.elements[n.dataElementType.prototype._type]||{},h=n._dataElementOptions,p={},f={chart:c,dataIndex:t,dataset:n.getDataset(),datasetIndex:n.index},m={cacheable:!r};if(r=r||{},B.isArray(h))for(i=0,s=h.length;i<s;++i)p[l=h[i]]=Z([r[l],u[l],d[l]],f,t,m);else for(i=0,s=(a=Object.keys(h)).length;i<s;++i)p[l=a[i]]=Z([r[l],u[h[l]],u[l],d[l]],f,t,m);return m.cacheable&&(n._cachedDataOpts=Object.freeze(p)),p},removeHoverStyle:function(e){B.merge(e._model,e.$previousStyle||{}),delete e.$previousStyle},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],n=e._index,r=e.custom||{},o=e._model,a=B.getHoverColor;e.$previousStyle={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderWidth:o.borderWidth},o.backgroundColor=Z([r.hoverBackgroundColor,t.hoverBackgroundColor,a(o.backgroundColor)],void 0,n),o.borderColor=Z([r.hoverBorderColor,t.hoverBorderColor,a(o.borderColor)],void 0,n),o.borderWidth=Z([r.hoverBorderWidth,t.hoverBorderWidth,o.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var e=this.getMeta().dataset;e&&this.removeHoverStyle(e)},_setDatasetHoverStyle:function(){var e,t,n,r,o,a,i=this.getMeta().dataset,s={};if(i){for(a=i._model,o=this._resolveDatasetElementOptions(i,!0),e=0,t=(r=Object.keys(o)).length;e<t;++e)s[n=r[e]]=a[n],a[n]=o[n];i.$previousStyle=s}},resyncElements:function(){var e=this.getMeta(),t=this.getDataset().data,n=e.data.length,r=t.length;r<n?e.data.splice(r,n-r):r>n&&this.insertElements(n,r-n)},insertElements:function(e,t){for(var n=0;n<t;++n)this.addElementAndReset(e+n)},onDataPush:function(){var e=arguments.length;this.insertElements(this.getDataset().data.length-e,e)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(e,t){this.getMeta().data.splice(e,t),this.insertElements(e,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),ne.extend=B.inherits;var re=ne,oe=2*Math.PI;function ae(e,t){var n=t.startAngle,r=t.endAngle,o=t.pixelMargin,a=o/t.outerRadius,i=t.x,s=t.y;e.beginPath(),e.arc(i,s,t.outerRadius,n-a,r+a),t.innerRadius>o?(a=o/t.innerRadius,e.arc(i,s,t.innerRadius-o,r+a,n-a,!0)):e.arc(i,s,o,r+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip()}function ie(e,t,n){var r="inner"===t.borderAlign;r?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),n.fullCircles&&function(e,t,n,r){var o,a=n.endAngle;for(r&&(n.endAngle=n.startAngle+oe,ae(e,n),n.endAngle=a,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=oe,n.fullCircles--)),e.beginPath(),e.arc(n.x,n.y,n.innerRadius,n.startAngle+oe,n.startAngle,!0),o=0;o<n.fullCircles;++o)e.stroke();for(e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.startAngle+oe),o=0;o<n.fullCircles;++o)e.stroke()}(e,t,n,r),r&&ae(e,n),e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.endAngle),e.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),e.closePath(),e.stroke()}Y._set("global",{elements:{arc:{backgroundColor:Y.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var se=K.extend({_type:"arc",inLabelRange:function(e){var t=this._view;return!!t&&Math.pow(e-t.x,2)<Math.pow(t.radius+t.hoverRadius,2)},inRange:function(e,t){var n=this._view;if(n){for(var r=B.getAngleFromPoint(n,{x:e,y:t}),o=r.angle,a=r.distance,i=n.startAngle,s=n.endAngle;s<i;)s+=oe;for(;o>s;)o-=oe;for(;o<i;)o+=oe;var l=o>=i&&o<=s,c=a>=n.innerRadius&&a<=n.outerRadius;return l&&c}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,n=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,n=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},draw:function(){var e,t=this._chart.ctx,n=this._view,r="inner"===n.borderAlign?.33:0,o={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-r,0),pixelMargin:r,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/oe)};if(t.save(),t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,o.fullCircles){for(o.endAngle=o.startAngle+oe,t.beginPath(),t.arc(o.x,o.y,o.outerRadius,o.startAngle,o.endAngle),t.arc(o.x,o.y,o.innerRadius,o.endAngle,o.startAngle,!0),t.closePath(),e=0;e<o.fullCircles;++e)t.fill();o.endAngle=o.startAngle+n.circumference%oe}t.beginPath(),t.arc(o.x,o.y,o.outerRadius,o.startAngle,o.endAngle),t.arc(o.x,o.y,o.innerRadius,o.endAngle,o.startAngle,!0),t.closePath(),t.fill(),n.borderWidth&&ie(t,n,o),t.restore()}}),le=B.valueOrDefault,ce=Y.global.defaultColor;Y._set("global",{elements:{line:{tension:.4,backgroundColor:ce,borderWidth:3,borderColor:ce,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var ue=K.extend({_type:"line",draw:function(){var e,t,n,r=this,o=r._view,a=r._chart.ctx,i=o.spanGaps,s=r._children.slice(),l=Y.global,c=l.elements.line,u=-1,d=r._loop;if(s.length){if(r._loop){for(e=0;e<s.length;++e)if(t=B.previousItem(s,e),!s[e]._view.skip&&t._view.skip){s=s.slice(e).concat(s.slice(0,e)),d=i;break}d&&s.push(s[0])}for(a.save(),a.lineCap=o.borderCapStyle||c.borderCapStyle,a.setLineDash&&a.setLineDash(o.borderDash||c.borderDash),a.lineDashOffset=le(o.borderDashOffset,c.borderDashOffset),a.lineJoin=o.borderJoinStyle||c.borderJoinStyle,a.lineWidth=le(o.borderWidth,c.borderWidth),a.strokeStyle=o.borderColor||l.defaultColor,a.beginPath(),(n=s[0]._view).skip||(a.moveTo(n.x,n.y),u=0),e=1;e<s.length;++e)n=s[e]._view,t=-1===u?B.previousItem(s,e):s[u],n.skip||(u!==e-1&&!i||-1===u?a.moveTo(n.x,n.y):B.canvas.lineTo(a,t._view,n),u=e);d&&a.closePath(),a.stroke(),a.restore()}}}),de=B.valueOrDefault,he=Y.global.defaultColor;function pe(e){var t=this._view;return!!t&&Math.abs(e-t.x)<t.radius+t.hitRadius}Y._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:he,borderColor:he,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var fe=K.extend({_type:"point",inRange:function(e,t){var n=this._view;return!!n&&Math.pow(e-n.x,2)+Math.pow(t-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:pe,inXRange:pe,inYRange:function(e){var t=this._view;return!!t&&Math.abs(e-t.y)<t.radius+t.hitRadius},getCenterPoint:function(){var e=this._view;return{x:e.x,y:e.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function(e){var t=this._view,n=this._chart.ctx,r=t.pointStyle,o=t.rotation,a=t.radius,i=t.x,s=t.y,l=Y.global,c=l.defaultColor;t.skip||(void 0===e||B.canvas._isPointInArea(t,e))&&(n.strokeStyle=t.borderColor||c,n.lineWidth=de(t.borderWidth,l.elements.point.borderWidth),n.fillStyle=t.backgroundColor||c,B.canvas.drawPoint(n,r,a,i,s,o))}}),me=Y.global.defaultColor;function ge(e){return e&&void 0!==e.width}function _e(e){var t,n,r,o,a;return ge(e)?(a=e.width/2,t=e.x-a,n=e.x+a,r=Math.min(e.y,e.base),o=Math.max(e.y,e.base)):(a=e.height/2,t=Math.min(e.x,e.base),n=Math.max(e.x,e.base),r=e.y-a,o=e.y+a),{left:t,top:r,right:n,bottom:o}}function ve(e,t,n){return e===t?n:e===n?t:e}function be(e,t,n){var r,o,a,i,s=e.borderWidth,l=function(e){var t=e.borderSkipped,n={};return t?(e.horizontal?e.base>e.x&&(t=ve(t,"left","right")):e.base<e.y&&(t=ve(t,"bottom","top")),n[t]=!0,n):n}(e);return B.isObject(s)?(r=+s.top||0,o=+s.right||0,a=+s.bottom||0,i=+s.left||0):r=o=a=i=+s||0,{t:l.top||r<0?0:r>n?n:r,r:l.right||o<0?0:o>t?t:o,b:l.bottom||a<0?0:a>n?n:a,l:l.left||i<0?0:i>t?t:i}}function ye(e,t,n){var r=null===t,o=null===n,a=!(!e||r&&o)&&_e(e);return a&&(r||t>=a.left&&t<=a.right)&&(o||n>=a.top&&n<=a.bottom)}Y._set("global",{elements:{rectangle:{backgroundColor:me,borderColor:me,borderSkipped:"bottom",borderWidth:0}}});var we=K.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,n=function(e){var t=_e(e),n=t.right-t.left,r=t.bottom-t.top,o=be(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r},inner:{x:t.left+o.l,y:t.top+o.t,w:n-o.l-o.r,h:r-o.t-o.b}}}(t),r=n.outer,o=n.inner;e.fillStyle=t.backgroundColor,e.fillRect(r.x,r.y,r.w,r.h),r.w===o.w&&r.h===o.h||(e.save(),e.beginPath(),e.rect(r.x,r.y,r.w,r.h),e.clip(),e.fillStyle=t.borderColor,e.rect(o.x,o.y,o.w,o.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return ye(this._view,e,t)},inLabelRange:function(e,t){var n=this._view;return ge(n)?ye(n,e,null):ye(n,null,t)},inXRange:function(e){return ye(this._view,e,null)},inYRange:function(e){return ye(this._view,null,e)},getCenterPoint:function(){var e,t,n=this._view;return ge(n)?(e=n.x,t=(n.y+n.base)/2):(e=(n.x+n.base)/2,t=n.y),{x:e,y:t}},getArea:function(){var e=this._view;return ge(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),ke={},xe=se,Me=ue,Ee=fe,Te=we;ke.Arc=xe,ke.Line=Me,ke.Point=Ee,ke.Rectangle=Te;var Se=B._deprecated,De=B.valueOrDefault;function Le(e,t,n){var r,o,a=n.barThickness,i=t.stackCount,s=t.pixels[e],l=B.isNullOrUndef(a)?function(e,t){var n,r,o,a,i=e._length;for(o=1,a=t.length;o<a;++o)i=Math.min(i,Math.abs(t[o]-t[o-1]));for(o=0,a=e.getTicks().length;o<a;++o)r=e.getPixelForTick(o),i=o>0?Math.min(i,Math.abs(r-n)):i,n=r;return i}(t.scale,t.pixels):-1;return B.isNullOrUndef(a)?(r=l*n.categoryPercentage,o=n.barPercentage):(r=a*i,o=1),{chunk:r/i,ratio:o,start:s-r/2}}Y._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),Y._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Ce=re.extend({dataElementType:ke.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var e,t,n=this;re.prototype.initialize.apply(n,arguments),(e=n.getMeta()).stack=n.getDataset().stack,e.bar=!0,t=n._getIndexScale().options,Se("bar chart",t.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Se("bar chart",t.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Se("bar chart",t.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Se("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Se("bar chart",t.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var t,n,r=this.getMeta().data;for(this._ruler=this.getRuler(),t=0,n=r.length;t<n;++t)this.updateElement(r[t],t,e)},updateElement:function(e,t,n){var r=this,o=r.getMeta(),a=r.getDataset(),i=r._resolveDataElementOptions(e,t);e._xScale=r.getScaleForId(o.xAxisID),e._yScale=r.getScaleForId(o.yAxisID),e._datasetIndex=r.index,e._index=t,e._model={backgroundColor:i.backgroundColor,borderColor:i.borderColor,borderSkipped:i.borderSkipped,borderWidth:i.borderWidth,datasetLabel:a.label,label:r.chart.data.labels[t]},B.isArray(a.data[t])&&(e._model.borderSkipped=null),r._updateElementGeometry(e,t,n,i),e.pivot()},_updateElementGeometry:function(e,t,n,r){var o=this,a=e._model,i=o._getValueScale(),s=i.getBasePixel(),l=i.isHorizontal(),c=o._ruler||o.getRuler(),u=o.calculateBarValuePixels(o.index,t,r),d=o.calculateBarIndexPixels(o.index,t,c,r);a.horizontal=l,a.base=n?s:u.base,a.x=l?n?s:u.head:d.center,a.y=l?d.center:n?s:u.head,a.height=l?d.size:void 0,a.width=l?void 0:d.size},_getStacks:function(e){var t,n,r=this._getIndexScale(),o=r._getMatchingVisibleMetas(this._type),a=r.options.stacked,i=o.length,s=[];for(t=0;t<i&&(n=o[t],(!1===a||-1===s.indexOf(n.stack)||void 0===a&&void 0===n.stack)&&s.push(n.stack),n.index!==e);++t);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(e,t){var n=this._getStacks(e),r=void 0!==t?n.indexOf(t):-1;return-1===r?n.length-1:r},getRuler:function(){var e,t,n=this._getIndexScale(),r=[];for(e=0,t=this.getMeta().data.length;e<t;++e)r.push(n.getPixelForValue(null,e,this.index));return{pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(e,t,n){var r,o,a,i,s,l,c,u=this.chart,d=this._getValueScale(),h=d.isHorizontal(),p=u.data.datasets,f=d._getMatchingVisibleMetas(this._type),m=d._parseValue(p[e].data[t]),g=n.minBarLength,_=d.options.stacked,v=this.getMeta().stack,b=void 0===m.start?0:m.max>=0&&m.min>=0?m.min:m.max,y=void 0===m.start?m.end:m.max>=0&&m.min>=0?m.max-m.min:m.min-m.max,w=f.length;if(_||void 0===_&&void 0!==v)for(r=0;r<w&&(o=f[r]).index!==e;++r)o.stack===v&&(a=void 0===(c=d._parseValue(p[o.index].data[t])).start?c.end:c.min>=0&&c.max>=0?c.max:c.min,(m.min<0&&a<0||m.max>=0&&a>0)&&(b+=a));return i=d.getPixelForValue(b),l=(s=d.getPixelForValue(b+y))-i,void 0!==g&&Math.abs(l)<g&&(l=g,s=y>=0&&!h||y<0&&h?i-g:i+g),{size:l,base:i,head:s,center:s+l/2}},calculateBarIndexPixels:function(e,t,n,r){var o="flex"===r.barThickness?function(e,t,n){var r,o=t.pixels,a=o[e],i=e>0?o[e-1]:null,s=e<o.length-1?o[e+1]:null,l=n.categoryPercentage;return null===i&&(i=a-(null===s?t.end-t.start:s-a)),null===s&&(s=a+a-i),r=a-(a-Math.min(i,s))/2*l,{chunk:Math.abs(s-i)/2*l/t.stackCount,ratio:n.barPercentage,start:r}}(t,n,r):Le(t,n,r),a=this.getStackIndex(e,this.getMeta().stack),i=o.start+o.chunk*a+o.chunk/2,s=Math.min(De(r.maxBarThickness,1/0),o.chunk*o.ratio);return{base:i-s/2,head:i+s/2,center:i,size:s}},draw:function(){var e=this.chart,t=this._getValueScale(),n=this.getMeta().data,r=this.getDataset(),o=n.length,a=0;for(B.canvas.clipArea(e.ctx,e.chartArea);a<o;++a){var i=t._parseValue(r.data[a]);isNaN(i.min)||isNaN(i.max)||n[a].draw()}B.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var e=this,t=B.extend({},re.prototype._resolveDataElementOptions.apply(e,arguments)),n=e._getIndexScale().options,r=e._getValueScale().options;return t.barPercentage=De(n.barPercentage,t.barPercentage),t.barThickness=De(n.barThickness,t.barThickness),t.categoryPercentage=De(n.categoryPercentage,t.categoryPercentage),t.maxBarThickness=De(n.maxBarThickness,t.maxBarThickness),t.minBarLength=De(r.minBarLength,t.minBarLength),t}}),Pe=B.valueOrDefault,Oe=B.options.resolve;Y._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.datasets[e.datasetIndex].label||"",r=t.datasets[e.datasetIndex].data[e.index];return n+": ("+e.xLabel+", "+e.yLabel+", "+r.r+")"}}}});var Ne=re.extend({dataElementType:ke.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(e){var t=this,n=t.getMeta().data;B.each(n,(function(n,r){t.updateElement(n,r,e)}))},updateElement:function(e,t,n){var r=this,o=r.getMeta(),a=e.custom||{},i=r.getScaleForId(o.xAxisID),s=r.getScaleForId(o.yAxisID),l=r._resolveDataElementOptions(e,t),c=r.getDataset().data[t],u=r.index,d=n?i.getPixelForDecimal(.5):i.getPixelForValue("object"==typeof c?c:NaN,t,u),h=n?s.getBasePixel():s.getPixelForValue(c,t,u);e._xScale=i,e._yScale=s,e._options=l,e._datasetIndex=u,e._index=t,e._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:a.skip||isNaN(d)||isNaN(h),x:d,y:h},e.pivot()},setHoverStyle:function(e){var t=e._model,n=e._options,r=B.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Pe(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Pe(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Pe(n.hoverBorderWidth,n.borderWidth),t.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(e,t){var n=this,r=n.chart,o=n.getDataset(),a=e.custom||{},i=o.data[t]||{},s=re.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:r,dataIndex:t,dataset:o,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=B.extend({},s)),s.radius=Oe([a.radius,i.r,n._config.radius,r.options.elements.point.radius],l,t),s}}),Ae=B.valueOrDefault,Ie=Math.PI,Re=2*Ie,Ye=Ie/2;Y._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(e){var t,n,r,o=document.createElement("ul"),a=e.data,i=a.datasets,s=a.labels;if(o.setAttribute("class",e.id+"-legend"),i.length)for(t=0,n=i[0].data.length;t<n;++t)(r=o.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=i[0].backgroundColor[t],s[t]&&r.appendChild(document.createTextNode(s[t]));return o.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map((function(n,r){var o=e.getDatasetMeta(0),a=o.controller.getStyle(r);return{text:n,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,hidden:isNaN(t.datasets[0].data[r])||o.data[r].hidden,index:r}})):[]}},onClick:function(e,t){var n,r,o,a=t.index,i=this.chart;for(n=0,r=(i.data.datasets||[]).length;n<r;++n)(o=i.getDatasetMeta(n)).data[a]&&(o.data[a].hidden=!o.data[a].hidden);i.update()}},cutoutPercentage:50,rotation:-Ye,circumference:Re,tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.labels[e.index],r=": "+t.datasets[e.datasetIndex].data[e.index];return B.isArray(n)?(n=n.slice())[0]+=r:n+=r,n}}}});var je=re.extend({dataElementType:ke.Arc,linkScales:B.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&++t;return t},update:function(e){var t,n,r,o,a=this,i=a.chart,s=i.chartArea,l=i.options,c=1,u=1,d=0,h=0,p=a.getMeta(),f=p.data,m=l.cutoutPercentage/100||0,g=l.circumference,_=a._getRingWeight(a.index);if(g<Re){var v=l.rotation%Re,b=(v+=v>=Ie?-Re:v<-Ie?Re:0)+g,y=Math.cos(v),w=Math.sin(v),k=Math.cos(b),x=Math.sin(b),M=v<=0&&b>=0||b>=Re,E=v<=Ye&&b>=Ye||b>=Re+Ye,T=v<=-Ye&&b>=-Ye||b>=Ie+Ye,S=v===-Ie||b>=Ie?-1:Math.min(y,y*m,k,k*m),D=T?-1:Math.min(w,w*m,x,x*m),L=M?1:Math.max(y,y*m,k,k*m),C=E?1:Math.max(w,w*m,x,x*m);c=(L-S)/2,u=(C-D)/2,d=-(L+S)/2,h=-(C+D)/2}for(r=0,o=f.length;r<o;++r)f[r]._options=a._resolveDataElementOptions(f[r],r);for(i.borderWidth=a.getMaxBorderWidth(),t=(s.right-s.left-i.borderWidth)/c,n=(s.bottom-s.top-i.borderWidth)/u,i.outerRadius=Math.max(Math.min(t,n)/2,0),i.innerRadius=Math.max(i.outerRadius*m,0),i.radiusLength=(i.outerRadius-i.innerRadius)/(a._getVisibleDatasetWeightTotal()||1),i.offsetX=d*i.outerRadius,i.offsetY=h*i.outerRadius,p.total=a.calculateTotal(),a.outerRadius=i.outerRadius-i.radiusLength*a._getRingWeightOffset(a.index),a.innerRadius=Math.max(a.outerRadius-i.radiusLength*_,0),r=0,o=f.length;r<o;++r)a.updateElement(f[r],r,e)},updateElement:function(e,t,n){var r=this,o=r.chart,a=o.chartArea,i=o.options,s=i.animation,l=(a.left+a.right)/2,c=(a.top+a.bottom)/2,u=i.rotation,d=i.rotation,h=r.getDataset(),p=n&&s.animateRotate||e.hidden?0:r.calculateCircumference(h.data[t])*(i.circumference/Re),f=n&&s.animateScale?0:r.innerRadius,m=n&&s.animateScale?0:r.outerRadius,g=e._options||{};B.extend(e,{_datasetIndex:r.index,_index:t,_model:{backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,borderAlign:g.borderAlign,x:l+o.offsetX,y:c+o.offsetY,startAngle:u,endAngle:d,circumference:p,outerRadius:m,innerRadius:f,label:B.valueAtIndexOrDefault(h.label,t,o.data.labels[t])}});var _=e._model;n&&s.animateRotate||(_.startAngle=0===t?i.rotation:r.getMeta().data[t-1]._model.endAngle,_.endAngle=_.startAngle+_.circumference),e.pivot()},calculateTotal:function(){var e,t=this.getDataset(),n=this.getMeta(),r=0;return B.each(n.data,(function(n,o){e=t.data[o],isNaN(e)||n.hidden||(r+=Math.abs(e))})),r},calculateCircumference:function(e){var t=this.getMeta().total;return t>0&&!isNaN(e)?Re*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,n,r,o,a,i,s,l,c=0,u=this.chart;if(!e)for(t=0,n=u.data.datasets.length;t<n;++t)if(u.isDatasetVisible(t)){e=(r=u.getDatasetMeta(t)).data,t!==this.index&&(a=r.controller);break}if(!e)return 0;for(t=0,n=e.length;t<n;++t)o=e[t],a?(a._configure(),i=a._resolveDataElementOptions(o,t)):i=o._options,"inner"!==i.borderAlign&&(s=i.borderWidth,c=(l=i.hoverBorderWidth)>(c=s>c?s:c)?l:c);return c},setHoverStyle:function(e){var t=e._model,n=e._options,r=B.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=Ae(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Ae(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Ae(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t},_getRingWeight:function(e){return Math.max(Ae(this.chart.data.datasets[e].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});Y._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),Y._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Fe=Ce.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),He=B.valueOrDefault,ze=B.options.resolve,Be=B.canvas._isPointInArea;function Ue(e,t){var n=e&&e.options.ticks||{},r=n.reverse,o=void 0===n.min?t:0,a=void 0===n.max?t:0;return{start:r?a:o,end:r?o:a}}function Ve(e,t,n){var r=n/2,o=Ue(e,r),a=Ue(t,r);return{top:a.end,right:o.end,bottom:a.start,left:o.start}}function We(e){var t,n,r,o;return B.isObject(e)?(t=e.top,n=e.right,r=e.bottom,o=e.left):t=n=r=o=e,{top:t,right:n,bottom:r,left:o}}Y._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var qe=re.extend({datasetElementType:ke.Line,dataElementType:ke.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(e){var t,n,r=this,o=r.getMeta(),a=o.dataset,i=o.data||[],s=r.chart.options,l=r._config,c=r._showLine=He(l.showLine,s.showLines);for(r._xScale=r.getScaleForId(o.xAxisID),r._yScale=r.getScaleForId(o.yAxisID),c&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),a._scale=r._yScale,a._datasetIndex=r.index,a._children=i,a._model=r._resolveDatasetElementOptions(a),a.pivot()),t=0,n=i.length;t<n;++t)r.updateElement(i[t],t,e);for(c&&0!==a._model.tension&&r.updateBezierControlPoints(),t=0,n=i.length;t<n;++t)i[t].pivot()},updateElement:function(e,t,n){var r,o,a=this,i=a.getMeta(),s=e.custom||{},l=a.getDataset(),c=a.index,u=l.data[t],d=a._xScale,h=a._yScale,p=i.dataset._model,f=a._resolveDataElementOptions(e,t);r=d.getPixelForValue("object"==typeof u?u:NaN,t,c),o=n?h.getBasePixel():a.calculatePointY(u,t,c),e._xScale=d,e._yScale=h,e._options=f,e._datasetIndex=c,e._index=t,e._model={x:r,y:o,skip:s.skip||isNaN(r)||isNaN(o),radius:f.radius,pointStyle:f.pointStyle,rotation:f.rotation,backgroundColor:f.backgroundColor,borderColor:f.borderColor,borderWidth:f.borderWidth,tension:He(s.tension,p?p.tension:0),steppedLine:!!p&&p.steppedLine,hitRadius:f.hitRadius}},_resolveDatasetElementOptions:function(e){var t=this,n=t._config,r=e.custom||{},o=t.chart.options,a=o.elements.line,i=re.prototype._resolveDatasetElementOptions.apply(t,arguments);return i.spanGaps=He(n.spanGaps,o.spanGaps),i.tension=He(n.lineTension,a.tension),i.steppedLine=ze([r.steppedLine,n.steppedLine,a.stepped]),i.clip=We(He(n.clip,Ve(t._xScale,t._yScale,i.borderWidth))),i},calculatePointY:function(e,t,n){var r,o,a,i,s,l,c,u=this.chart,d=this._yScale,h=0,p=0;if(d.options.stacked){for(s=+d.getRightValue(e),c=(l=u._getSortedVisibleDatasetMetas()).length,r=0;r<c&&(a=l[r]).index!==n;++r)o=u.data.datasets[a.index],"line"===a.type&&a.yAxisID===d.id&&((i=+d.getRightValue(o.data[t]))<0?p+=i||0:h+=i||0);return s<0?d.getPixelForValue(p+s):d.getPixelForValue(h+s)}return d.getPixelForValue(e)},updateBezierControlPoints:function(){var e,t,n,r,o=this.chart,a=this.getMeta(),i=a.dataset._model,s=o.chartArea,l=a.data||[];function c(e,t,n){return Math.max(Math.min(e,n),t)}if(i.spanGaps&&(l=l.filter((function(e){return!e._model.skip}))),"monotone"===i.cubicInterpolationMode)B.splineCurveMonotone(l);else for(e=0,t=l.length;e<t;++e)n=l[e]._model,r=B.splineCurve(B.previousItem(l,e)._model,n,B.nextItem(l,e)._model,i.tension),n.controlPointPreviousX=r.previous.x,n.controlPointPreviousY=r.previous.y,n.controlPointNextX=r.next.x,n.controlPointNextY=r.next.y;if(o.options.elements.line.capBezierPoints)for(e=0,t=l.length;e<t;++e)n=l[e]._model,Be(n,s)&&(e>0&&Be(l[e-1]._model,s)&&(n.controlPointPreviousX=c(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=c(n.controlPointPreviousY,s.top,s.bottom)),e<l.length-1&&Be(l[e+1]._model,s)&&(n.controlPointNextX=c(n.controlPointNextX,s.left,s.right),n.controlPointNextY=c(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var e,t=this.chart,n=this.getMeta(),r=n.data||[],o=t.chartArea,a=t.canvas,i=0,s=r.length;for(this._showLine&&(e=n.dataset._model.clip,B.canvas.clipArea(t.ctx,{left:!1===e.left?0:o.left-e.left,right:!1===e.right?a.width:o.right+e.right,top:!1===e.top?0:o.top-e.top,bottom:!1===e.bottom?a.height:o.bottom+e.bottom}),n.dataset.draw(),B.canvas.unclipArea(t.ctx));i<s;++i)r[i].draw(o)},setHoverStyle:function(e){var t=e._model,n=e._options,r=B.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=He(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=He(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=He(n.hoverBorderWidth,n.borderWidth),t.radius=He(n.hoverRadius,n.radius)}}),Ge=B.options.resolve;Y._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(e){var t,n,r,o=document.createElement("ul"),a=e.data,i=a.datasets,s=a.labels;if(o.setAttribute("class",e.id+"-legend"),i.length)for(t=0,n=i[0].data.length;t<n;++t)(r=o.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=i[0].backgroundColor[t],s[t]&&r.appendChild(document.createTextNode(s[t]));return o.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map((function(n,r){var o=e.getDatasetMeta(0),a=o.controller.getStyle(r);return{text:n,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,hidden:isNaN(t.datasets[0].data[r])||o.data[r].hidden,index:r}})):[]}},onClick:function(e,t){var n,r,o,a=t.index,i=this.chart;for(n=0,r=(i.data.datasets||[]).length;n<r;++n)(o=i.getDatasetMeta(n)).data[a].hidden=!o.data[a].hidden;i.update()}},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return t.labels[e.index]+": "+e.yLabel}}}});var Je=re.extend({dataElementType:ke.Arc,linkScales:B.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t,n,r,o=this,a=o.getDataset(),i=o.getMeta(),s=o.chart.options.startAngle||0,l=o._starts=[],c=o._angles=[],u=i.data;for(o._updateRadius(),i.count=o.countVisibleElements(),t=0,n=a.data.length;t<n;t++)l[t]=s,r=o._computeAngle(t),c[t]=r,s+=r;for(t=0,n=u.length;t<n;++t)u[t]._options=o._resolveDataElementOptions(u[t],t),o.updateElement(u[t],t,e)},_updateRadius:function(){var e=this,t=e.chart,n=t.chartArea,r=t.options,o=Math.min(n.right-n.left,n.bottom-n.top);t.outerRadius=Math.max(o/2,0),t.innerRadius=Math.max(r.cutoutPercentage?t.outerRadius/100*r.cutoutPercentage:1,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),e.outerRadius=t.outerRadius-t.radiusLength*e.index,e.innerRadius=e.outerRadius-t.radiusLength},updateElement:function(e,t,n){var r=this,o=r.chart,a=r.getDataset(),i=o.options,s=i.animation,l=o.scale,c=o.data.labels,u=l.xCenter,d=l.yCenter,h=i.startAngle,p=e.hidden?0:l.getDistanceFromCenterForValue(a.data[t]),f=r._starts[t],m=f+(e.hidden?0:r._angles[t]),g=s.animateScale?0:l.getDistanceFromCenterForValue(a.data[t]),_=e._options||{};B.extend(e,{_datasetIndex:r.index,_index:t,_scale:l,_model:{backgroundColor:_.backgroundColor,borderColor:_.borderColor,borderWidth:_.borderWidth,borderAlign:_.borderAlign,x:u,y:d,innerRadius:0,outerRadius:n?g:p,startAngle:n&&s.animateRotate?h:f,endAngle:n&&s.animateRotate?h:m,label:B.valueAtIndexOrDefault(c,t,c[t])}}),e.pivot()},countVisibleElements:function(){var e=this.getDataset(),t=this.getMeta(),n=0;return B.each(t.data,(function(t,r){isNaN(e.data[r])||t.hidden||n++})),n},setHoverStyle:function(e){var t=e._model,n=e._options,r=B.getHoverColor,o=B.valueOrDefault;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=o(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=o(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=o(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(e){var t=this,n=this.getMeta().count,r=t.getDataset(),o=t.getMeta();if(isNaN(r.data[e])||o.data[e].hidden)return 0;var a={chart:t.chart,dataIndex:e,dataset:r,datasetIndex:t.index};return Ge([t.chart.options.elements.arc.angle,2*Math.PI/n],a,e)}});Y._set("pie",B.clone(Y.doughnut)),Y._set("pie",{cutoutPercentage:0});var Ke=je,Qe=B.valueOrDefault;Y._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Xe=re.extend({datasetElementType:ke.Line,dataElementType:ke.Point,linkScales:B.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t,n,r=this,o=r.getMeta(),a=o.dataset,i=o.data||[],s=r.chart.scale,l=r._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),a._scale=s,a._datasetIndex=r.index,a._children=i,a._loop=!0,a._model=r._resolveDatasetElementOptions(a),a.pivot(),t=0,n=i.length;t<n;++t)r.updateElement(i[t],t,e);for(r.updateBezierControlPoints(),t=0,n=i.length;t<n;++t)i[t].pivot()},updateElement:function(e,t,n){var r=this,o=e.custom||{},a=r.getDataset(),i=r.chart.scale,s=i.getPointPositionForValue(t,a.data[t]),l=r._resolveDataElementOptions(e,t),c=r.getMeta().dataset._model,u=n?i.xCenter:s.x,d=n?i.yCenter:s.y;e._scale=i,e._options=l,e._datasetIndex=r.index,e._index=t,e._model={x:u,y:d,skip:o.skip||isNaN(u)||isNaN(d),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Qe(o.tension,c?c.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var e=this,t=e._config,n=e.chart.options,r=re.prototype._resolveDatasetElementOptions.apply(e,arguments);return r.spanGaps=Qe(t.spanGaps,n.spanGaps),r.tension=Qe(t.lineTension,n.elements.line.tension),r},updateBezierControlPoints:function(){var e,t,n,r,o=this.getMeta(),a=this.chart.chartArea,i=o.data||[];function s(e,t,n){return Math.max(Math.min(e,n),t)}for(o.dataset._model.spanGaps&&(i=i.filter((function(e){return!e._model.skip}))),e=0,t=i.length;e<t;++e)n=i[e]._model,r=B.splineCurve(B.previousItem(i,e,!0)._model,n,B.nextItem(i,e,!0)._model,n.tension),n.controlPointPreviousX=s(r.previous.x,a.left,a.right),n.controlPointPreviousY=s(r.previous.y,a.top,a.bottom),n.controlPointNextX=s(r.next.x,a.left,a.right),n.controlPointNextY=s(r.next.y,a.top,a.bottom)},setHoverStyle:function(e){var t=e._model,n=e._options,r=B.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Qe(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Qe(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Qe(n.hoverBorderWidth,n.borderWidth),t.radius=Qe(n.hoverRadius,n.radius)}});Y._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(e){return"("+e.xLabel+", "+e.yLabel+")"}}}}),Y._set("global",{datasets:{scatter:{showLine:!1}}});var $e={bar:Ce,bubble:Ne,doughnut:je,horizontalBar:Fe,line:qe,polarArea:Je,pie:Ke,radar:Xe,scatter:qe};function Ze(e,t){return e.native?{x:e.x,y:e.y}:B.getRelativePosition(e,t)}function et(e,t){var n,r,o,a,i,s,l=e._getSortedVisibleDatasetMetas();for(r=0,a=l.length;r<a;++r)for(o=0,i=(n=l[r].data).length;o<i;++o)(s=n[o])._view.skip||t(s)}function tt(e,t){var n=[];return et(e,(function(e){e.inRange(t.x,t.y)&&n.push(e)})),n}function nt(e,t,n,r){var o=Number.POSITIVE_INFINITY,a=[];return et(e,(function(e){if(!n||e.inRange(t.x,t.y)){var i=e.getCenterPoint(),s=r(t,i);s<o?(a=[e],o=s):s===o&&a.push(e)}})),a}function rt(e){var t=-1!==e.indexOf("x"),n=-1!==e.indexOf("y");return function(e,r){var o=t?Math.abs(e.x-r.x):0,a=n?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function ot(e,t,n){var r=Ze(t,e);n.axis=n.axis||"x";var o=rt(n.axis),a=n.intersect?tt(e,r):nt(e,r,!1,o),i=[];return a.length?(e._getSortedVisibleDatasetMetas().forEach((function(e){var t=e.data[a[0]._index];t&&!t._view.skip&&i.push(t)})),i):[]}var at={modes:{single:function(e,t){var n=Ze(t,e),r=[];return et(e,(function(e){if(e.inRange(n.x,n.y))return r.push(e),r})),r.slice(0,1)},label:ot,index:ot,dataset:function(e,t,n){var r=Ze(t,e);n.axis=n.axis||"xy";var o=rt(n.axis),a=n.intersect?tt(e,r):nt(e,r,!1,o);return a.length>0&&(a=e.getDatasetMeta(a[0]._datasetIndex).data),a},"x-axis":function(e,t){return ot(e,t,{intersect:!1})},point:function(e,t){return tt(e,Ze(t,e))},nearest:function(e,t,n){var r=Ze(t,e);n.axis=n.axis||"xy";var o=rt(n.axis);return nt(e,r,n.intersect,o)},x:function(e,t,n){var r=Ze(t,e),o=[],a=!1;return et(e,(function(e){e.inXRange(r.x)&&o.push(e),e.inRange(r.x,r.y)&&(a=!0)})),n.intersect&&!a&&(o=[]),o},y:function(e,t,n){var r=Ze(t,e),o=[],a=!1;return et(e,(function(e){e.inYRange(r.y)&&o.push(e),e.inRange(r.x,r.y)&&(a=!0)})),n.intersect&&!a&&(o=[]),o}}},it=B.extend;function st(e,t){return B.where(e,(function(e){return e.pos===t}))}function lt(e,t){return e.sort((function(e,n){var r=t?n:e,o=t?e:n;return r.weight===o.weight?r.index-o.index:r.weight-o.weight}))}function ct(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function ut(e,t,n){var r,o,a=n.box,i=e.maxPadding;if(n.size&&(e[n.pos]-=n.size),n.size=n.horizontal?a.height:a.width,e[n.pos]+=n.size,a.getPadding){var s=a.getPadding();i.top=Math.max(i.top,s.top),i.left=Math.max(i.left,s.left),i.bottom=Math.max(i.bottom,s.bottom),i.right=Math.max(i.right,s.right)}if(r=t.outerWidth-ct(i,e,"left","right"),o=t.outerHeight-ct(i,e,"top","bottom"),r!==e.w||o!==e.h){e.w=r,e.h=o;var l=n.horizontal?[r,e.w]:[o,e.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function dt(e,t){var n=t.maxPadding;function r(e){var r={left:0,top:0,right:0,bottom:0};return e.forEach((function(e){r[e]=Math.max(t[e],n[e])})),r}return r(e?["left","right"]:["top","bottom"])}function ht(e,t,n){var r,o,a,i,s,l,c=[];for(r=0,o=e.length;r<o;++r)(i=(a=e[r]).box).update(a.width||t.w,a.height||t.h,dt(a.horizontal,t)),ut(t,n,a)&&(l=!0,c.length&&(s=!0)),i.fullWidth||c.push(a);return s&&ht(c,t,n)||l}function pt(e,t,n){var r,o,a,i,s=n.padding,l=t.x,c=t.y;for(r=0,o=e.length;r<o;++r)i=(a=e[r]).box,a.horizontal?(i.left=i.fullWidth?s.left:t.left,i.right=i.fullWidth?n.outerWidth-s.right:t.left+t.w,i.top=c,i.bottom=c+i.height,i.width=i.right-i.left,c=i.bottom):(i.left=l,i.right=l+i.width,i.top=t.top,i.bottom=t.top+t.h,i.height=i.bottom-i.top,l=i.right);t.x=l,t.y=c}Y._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ft,mt={defaults:{},addBox:function(e,t){e.boxes||(e.boxes=[]),t.fullWidth=t.fullWidth||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw:function(){t.draw.apply(t,arguments)}}]},e.boxes.push(t)},removeBox:function(e,t){var n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure:function(e,t,n){for(var r,o=["fullWidth","position","weight"],a=o.length,i=0;i<a;++i)r=o[i],n.hasOwnProperty(r)&&(t[r]=n[r])},update:function(e,t,n){if(e){var r=e.options.layout||{},o=B.options.toPadding(r.padding),a=t-o.width,i=n-o.height,s=function(e){var t=function(e){var t,n,r,o=[];for(t=0,n=(e||[]).length;t<n;++t)r=e[t],o.push({index:t,box:r,pos:r.position,horizontal:r.isHorizontal(),weight:r.weight});return o}(e),n=lt(st(t,"left"),!0),r=lt(st(t,"right")),o=lt(st(t,"top"),!0),a=lt(st(t,"bottom"));return{leftAndTop:n.concat(o),rightAndBottom:r.concat(a),chartArea:st(t,"chartArea"),vertical:n.concat(r),horizontal:o.concat(a)}}(e.boxes),l=s.vertical,c=s.horizontal,u=Object.freeze({outerWidth:t,outerHeight:n,padding:o,availableWidth:a,vBoxMaxWidth:a/2/l.length,hBoxMaxHeight:i/2}),d=it({maxPadding:it({},o),w:a,h:i,x:o.left,y:o.top},o);!function(e,t){var n,r,o;for(n=0,r=e.length;n<r;++n)(o=e[n]).width=o.horizontal?o.box.fullWidth&&t.availableWidth:t.vBoxMaxWidth,o.height=o.horizontal&&t.hBoxMaxHeight}(l.concat(c),u),ht(l,d,u),ht(c,d,u)&&ht(l,d,u),function(e){var t=e.maxPadding;function n(n){var r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(d),pt(s.leftAndTop,d,u),d.x+=d.w,d.y+=d.h,pt(s.rightAndBottom,d,u),e.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h},B.each(s.chartArea,(function(t){var n=t.box;it(n,e.chartArea),n.update(d.w,d.h)}))}}},gt=(ft=Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"}))&&ft.default||ft,_t=["animationstart","webkitAnimationStart"],vt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function bt(e,t){var n=B.getStyle(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}var yt=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(e){}return e}()&&{passive:!0};function wt(e,t,n){e.addEventListener(t,n,yt)}function kt(e,t,n){e.removeEventListener(t,n,yt)}function xt(e,t,n,r,o){return{type:e,chart:t,native:o||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function Mt(e){var t=document.createElement("div");return t.className=e||"",t}function Et(e,t,n){var r,o,a,i,s=e.$chartjs||(e.$chartjs={}),l=s.resizer=function(e){var t=Mt("chartjs-size-monitor"),n=Mt("chartjs-size-monitor-expand"),r=Mt("chartjs-size-monitor-shrink");n.appendChild(Mt()),r.appendChild(Mt()),t.appendChild(n),t.appendChild(r),t._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var o=function(){t._reset(),e()};return wt(n,"scroll",o.bind(n,"expand")),wt(r,"scroll",o.bind(r,"shrink")),t}((r=function(){if(s.resizer){var r=n.options.maintainAspectRatio&&e.parentNode,o=r?r.clientWidth:0;t(xt("resize",n)),r&&r.clientWidth<o&&n.canvas&&t(xt("resize",n))}},a=!1,i=[],function(){i=Array.prototype.slice.call(arguments),o=o||this,a||(a=!0,B.requestAnimFrame.call(window,(function(){a=!1,r.apply(o,i)})))}));!function(e,t){var n=e.$chartjs||(e.$chartjs={}),r=n.renderProxy=function(e){"chartjs-render-animation"===e.animationName&&t()};B.each(_t,(function(t){wt(e,t,r)})),n.reflow=!!e.offsetParent,e.classList.add("chartjs-render-monitor")}(e,(function(){if(s.resizer){var t=e.parentNode;t&&t!==l.parentNode&&t.insertBefore(l,t.firstChild),l._reset()}}))}function Tt(e){var t=e.$chartjs||{},n=t.resizer;delete t.resizer,function(e){var t=e.$chartjs||{},n=t.renderProxy;n&&(B.each(_t,(function(t){kt(e,t,n)})),delete t.renderProxy),e.classList.remove("chartjs-render-monitor")}(e),n&&n.parentNode&&n.parentNode.removeChild(n)}var St={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(e){if(!this.disableCSSInjection){var t=e.getRootNode?e.getRootNode():document;!function(e,t){var n=e.$chartjs||(e.$chartjs={});if(!n.containsStyles){n.containsStyles=!0,t="/* Chart.js */\n"+t;var r=document.createElement("style");r.setAttribute("type","text/css"),r.appendChild(document.createTextNode(t)),e.appendChild(r)}}(t.host?t:document.head,gt)}},acquireContext:function(e,t){"string"==typeof e?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas);var n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(this._ensureLoaded(e),function(e,t){var n=e.style,r=e.getAttribute("height"),o=e.getAttribute("width");if(e.$chartjs={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===o||""===o){var a=bt(e,"width");void 0!==a&&(e.width=a)}if(null===r||""===r)if(""===e.style.height)e.height=e.width/(t.options.aspectRatio||2);else{var i=bt(e,"height");void 0!==a&&(e.height=i)}}(e,t),n):null},releaseContext:function(e){var t=e.canvas;if(t.$chartjs){var n=t.$chartjs.initial;["height","width"].forEach((function(e){var r=n[e];B.isNullOrUndef(r)?t.removeAttribute(e):t.setAttribute(e,r)})),B.each(n.style||{},(function(e,n){t.style[n]=e})),t.width=t.width,delete t.$chartjs}},addEventListener:function(e,t,n){var r=e.canvas;if("resize"!==t){var o=n.$chartjs||(n.$chartjs={});wt(r,t,(o.proxies||(o.proxies={}))[e.id+"_"+t]=function(t){n(function(e,t){var n=vt[e.type]||e.type,r=B.getRelativePosition(e,t);return xt(n,t,r.x,r.y,e)}(t,e))})}else Et(r,n,e)},removeEventListener:function(e,t,n){var r=e.canvas;if("resize"!==t){var o=((n.$chartjs||{}).proxies||{})[e.id+"_"+t];o&&kt(r,t,o)}else Tt(r)}};B.addEvent=wt,B.removeEvent=kt;var Dt=St._enabled?St:{acquireContext:function(e){return e&&e.canvas&&(e=e.canvas),e&&e.getContext("2d")||null}},Lt=B.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Dt);Y._set("global",{plugins:{}});var Ct={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach((function(e){-1===t.indexOf(e)&&t.push(e)})),this._cacheId++},unregister:function(e){var t=this._plugins;[].concat(e).forEach((function(e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,n){var r,o,a,i,s,l=this.descriptors(e),c=l.length;for(r=0;r<c;++r)if("function"==typeof(s=(a=(o=l[r]).plugin)[t])&&((i=[e].concat(n||[])).push(o.options),!1===s.apply(a,i)))return!1;return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={});if(t.id===this._cacheId)return t.descriptors;var n=[],r=[],o=e&&e.config||{},a=o.options&&o.options.plugins||{};return this._plugins.concat(o.plugins||[]).forEach((function(e){if(-1===n.indexOf(e)){var t=e.id,o=a[t];!1!==o&&(!0===o&&(o=B.clone(Y.global.plugins[t])),n.push(e),r.push({plugin:e,options:o||{}}))}})),t.descriptors=r,t.id=this._cacheId,r},_invalidate:function(e){delete e.$plugins}},Pt={constructors:{},defaults:{},registerScaleType:function(e,t,n){this.constructors[e]=t,this.defaults[e]=B.clone(n)},getScaleConstructor:function(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function(e){return this.defaults.hasOwnProperty(e)?B.merge(Object.create(null),[Y.scale,this.defaults[e]]):{}},updateScaleDefaults:function(e,t){this.defaults.hasOwnProperty(e)&&(this.defaults[e]=B.extend(this.defaults[e],t))},addScalesToLayout:function(e){B.each(e.scales,(function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,mt.addBox(e,t)}))}},Ot=B.valueOrDefault,Nt=B.rtl.getRtlAdapter;Y._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:B.noop,title:function(e,t){var n="",r=t.labels,o=r?r.length:0;if(e.length>0){var a=e[0];a.label?n=a.label:a.xLabel?n=a.xLabel:o>0&&a.index<o&&(n=r[a.index])}return n},afterTitle:B.noop,beforeBody:B.noop,beforeLabel:B.noop,label:function(e,t){var n=t.datasets[e.datasetIndex].label||"";return n&&(n+=": "),B.isNullOrUndef(e.value)?n+=e.yLabel:n+=e.value,n},labelColor:function(e,t){var n=t.getDatasetMeta(e.datasetIndex).data[e.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:B.noop,afterBody:B.noop,beforeFooter:B.noop,footer:B.noop,afterFooter:B.noop}}});var At={average:function(e){if(!e.length)return!1;var t,n,r=0,o=0,a=0;for(t=0,n=e.length;t<n;++t){var i=e[t];if(i&&i.hasValue()){var s=i.tooltipPosition();r+=s.x,o+=s.y,++a}}return{x:r/a,y:o/a}},nearest:function(e,t){var n,r,o,a=t.x,i=t.y,s=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n<r;++n){var l=e[n];if(l&&l.hasValue()){var c=l.getCenterPoint(),u=B.distanceBetweenPoints(t,c);u<s&&(s=u,o=l)}}if(o){var d=o.tooltipPosition();a=d.x,i=d.y}return{x:a,y:i}}};function It(e,t){return t&&(B.isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Rt(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function Yt(e){var t=Y.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:Ot(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:Ot(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:Ot(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:Ot(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:Ot(e.titleFontStyle,t.defaultFontStyle),titleFontSize:Ot(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:Ot(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:Ot(e.footerFontStyle,t.defaultFontStyle),footerFontSize:Ot(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function jt(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function Ft(e){return It([],Rt(e))}var Ht=K.extend({initialize:function(){this._model=Yt(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options,n=t.callbacks,r=n.beforeTitle.apply(e,arguments),o=n.title.apply(e,arguments),a=n.afterTitle.apply(e,arguments),i=[];return i=It(i,Rt(r)),i=It(i,Rt(o)),i=It(i,Rt(a))},getBeforeBody:function(){return Ft(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var n=this,r=n._options.callbacks,o=[];return B.each(e,(function(e){var a={before:[],lines:[],after:[]};It(a.before,Rt(r.beforeLabel.call(n,e,t))),It(a.lines,r.label.call(n,e,t)),It(a.after,Rt(r.afterLabel.call(n,e,t))),o.push(a)})),o},getAfterBody:function(){return Ft(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,n=t.beforeFooter.apply(e,arguments),r=t.footer.apply(e,arguments),o=t.afterFooter.apply(e,arguments),a=[];return a=It(a,Rt(n)),a=It(a,Rt(r)),a=It(a,Rt(o))},update:function(e){var t,n,r,o,a,i,s,l,c,u,d=this,h=d._options,p=d._model,f=d._model=Yt(h),m=d._active,g=d._data,_={xAlign:p.xAlign,yAlign:p.yAlign},v={x:p.x,y:p.y},b={width:p.width,height:p.height},y={x:p.caretX,y:p.caretY};if(m.length){f.opacity=1;var w=[],k=[];y=At[h.position].call(d,m,d._eventPosition);var x=[];for(t=0,n=m.length;t<n;++t)x.push((r=m[t],o=void 0,a=void 0,i=void 0,s=void 0,l=void 0,c=void 0,u=void 0,o=r._xScale,a=r._yScale||r._scale,i=r._index,s=r._datasetIndex,l=r._chart.getDatasetMeta(s).controller,c=l._getIndexScale(),u=l._getValueScale(),{xLabel:o?o.getLabelForIndex(i,s):"",yLabel:a?a.getLabelForIndex(i,s):"",label:c?""+c.getLabelForIndex(i,s):"",value:u?""+u.getLabelForIndex(i,s):"",index:i,datasetIndex:s,x:r._model.x,y:r._model.y}));h.filter&&(x=x.filter((function(e){return h.filter(e,g)}))),h.itemSort&&(x=x.sort((function(e,t){return h.itemSort(e,t,g)}))),B.each(x,(function(e){w.push(h.callbacks.labelColor.call(d,e,d._chart)),k.push(h.callbacks.labelTextColor.call(d,e,d._chart))})),f.title=d.getTitle(x,g),f.beforeBody=d.getBeforeBody(x,g),f.body=d.getBody(x,g),f.afterBody=d.getAfterBody(x,g),f.footer=d.getFooter(x,g),f.x=y.x,f.y=y.y,f.caretPadding=h.caretPadding,f.labelColors=w,f.labelTextColors=k,f.dataPoints=x,b=function(e,t){var n=e._chart.ctx,r=2*t.yPadding,o=0,a=t.body,i=a.reduce((function(e,t){return e+t.before.length+t.lines.length+t.after.length}),0);i+=t.beforeBody.length+t.afterBody.length;var s=t.title.length,l=t.footer.length,c=t.titleFontSize,u=t.bodyFontSize,d=t.footerFontSize;r+=s*c,r+=s?(s-1)*t.titleSpacing:0,r+=s?t.titleMarginBottom:0,r+=i*u,r+=i?(i-1)*t.bodySpacing:0,r+=l?t.footerMarginTop:0,r+=l*d,r+=l?(l-1)*t.footerSpacing:0;var h=0,p=function(e){o=Math.max(o,n.measureText(e).width+h)};return n.font=B.fontString(c,t._titleFontStyle,t._titleFontFamily),B.each(t.title,p),n.font=B.fontString(u,t._bodyFontStyle,t._bodyFontFamily),B.each(t.beforeBody.concat(t.afterBody),p),h=t.displayColors?u+2:0,B.each(a,(function(e){B.each(e.before,p),B.each(e.lines,p),B.each(e.after,p)})),h=0,n.font=B.fontString(d,t._footerFontStyle,t._footerFontFamily),B.each(t.footer,p),{width:o+=2*t.xPadding,height:r}}(this,f),v=function(e,t,n,r){var o=e.x,a=e.y,i=e.caretSize,s=e.caretPadding,l=e.cornerRadius,c=n.xAlign,u=n.yAlign,d=i+s,h=l+s;return"right"===c?o-=t.width:"center"===c&&((o-=t.width/2)+t.width>r.width&&(o=r.width-t.width),o<0&&(o=0)),"top"===u?a+=d:a-="bottom"===u?t.height+d:t.height/2,"center"===u?"left"===c?o+=d:"right"===c&&(o-=d):"left"===c?o-=h:"right"===c&&(o+=h),{x:o,y:a}}(f,b,_=function(e,t){var n,r,o,a,i,s=e._model,l=e._chart,c=e._chart.chartArea,u="center",d="center";s.y<t.height?d="top":s.y>l.height-t.height&&(d="bottom");var h=(c.left+c.right)/2,p=(c.top+c.bottom)/2;"center"===d?(n=function(e){return e<=h},r=function(e){return e>h}):(n=function(e){return e<=t.width/2},r=function(e){return e>=l.width-t.width/2}),o=function(e){return e+t.width+s.caretSize+s.caretPadding>l.width},a=function(e){return e-t.width-s.caretSize-s.caretPadding<0},i=function(e){return e<=p?"top":"bottom"},n(s.x)?(u="left",o(s.x)&&(u="center",d=i(s.y))):r(s.x)&&(u="right",a(s.x)&&(u="center",d=i(s.y)));var f=e._options;return{xAlign:f.xAlign?f.xAlign:u,yAlign:f.yAlign?f.yAlign:d}}(this,b),d._chart)}else f.opacity=0;return f.xAlign=_.xAlign,f.yAlign=_.yAlign,f.x=v.x,f.y=v.y,f.width=b.width,f.height=b.height,f.caretX=y.x,f.caretY=y.y,d._model=f,e&&h.custom&&h.custom.call(d,f),d},drawCaret:function(e,t){var n=this._chart.ctx,r=this._view,o=this.getCaretPosition(e,t,r);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(e,t,n){var r,o,a,i,s,l,c=n.caretSize,u=n.cornerRadius,d=n.xAlign,h=n.yAlign,p=e.x,f=e.y,m=t.width,g=t.height;if("center"===h)s=f+g/2,"left"===d?(o=(r=p)-c,a=r,i=s+c,l=s-c):(o=(r=p+m)+c,a=r,i=s-c,l=s+c);else if("left"===d?(r=(o=p+u+c)-c,a=o+c):"right"===d?(r=(o=p+m-u-c)-c,a=o+c):(r=(o=n.caretX)-c,a=o+c),"top"===h)s=(i=f)-c,l=i;else{s=(i=f+g)+c,l=i;var _=a;a=r,r=_}return{x1:r,x2:o,x3:a,y1:i,y2:s,y3:l}},drawTitle:function(e,t,n){var r,o,a,i=t.title,s=i.length;if(s){var l=Nt(t.rtl,t.x,t.width);for(e.x=jt(t,t._titleAlign),n.textAlign=l.textAlign(t._titleAlign),n.textBaseline="middle",r=t.titleFontSize,o=t.titleSpacing,n.fillStyle=t.titleFontColor,n.font=B.fontString(r,t._titleFontStyle,t._titleFontFamily),a=0;a<s;++a)n.fillText(i[a],l.x(e.x),e.y+r/2),e.y+=r+o,a+1===s&&(e.y+=t.titleMarginBottom-o)}},drawBody:function(e,t,n){var r,o,a,i,s,l,c,u,d=t.bodyFontSize,h=t.bodySpacing,p=t._bodyAlign,f=t.body,m=t.displayColors,g=0,_=m?jt(t,"left"):0,v=Nt(t.rtl,t.x,t.width),b=function(t){n.fillText(t,v.x(e.x+g),e.y+d/2),e.y+=d+h},y=v.textAlign(p);for(n.textAlign=p,n.textBaseline="middle",n.font=B.fontString(d,t._bodyFontStyle,t._bodyFontFamily),e.x=jt(t,y),n.fillStyle=t.bodyFontColor,B.each(t.beforeBody,b),g=m&&"right"!==y?"center"===p?d/2+1:d+2:0,s=0,c=f.length;s<c;++s){for(r=f[s],o=t.labelTextColors[s],a=t.labelColors[s],n.fillStyle=o,B.each(r.before,b),l=0,u=(i=r.lines).length;l<u;++l){if(m){var w=v.x(_);n.fillStyle=t.legendColorBackground,n.fillRect(v.leftForLtr(w,d),e.y,d,d),n.lineWidth=1,n.strokeStyle=a.borderColor,n.strokeRect(v.leftForLtr(w,d),e.y,d,d),n.fillStyle=a.backgroundColor,n.fillRect(v.leftForLtr(v.xPlus(w,1),d-2),e.y+1,d-2,d-2),n.fillStyle=o}b(i[l])}B.each(r.after,b)}g=0,B.each(t.afterBody,b),e.y-=h},drawFooter:function(e,t,n){var r,o,a=t.footer,i=a.length;if(i){var s=Nt(t.rtl,t.x,t.width);for(e.x=jt(t,t._footerAlign),e.y+=t.footerMarginTop,n.textAlign=s.textAlign(t._footerAlign),n.textBaseline="middle",r=t.footerFontSize,n.fillStyle=t.footerFontColor,n.font=B.fontString(r,t._footerFontStyle,t._footerFontFamily),o=0;o<i;++o)n.fillText(a[o],s.x(e.x),e.y+r/2),e.y+=r+t.footerSpacing}},drawBackground:function(e,t,n,r){n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,n.lineWidth=t.borderWidth;var o=t.xAlign,a=t.yAlign,i=e.x,s=e.y,l=r.width,c=r.height,u=t.cornerRadius;n.beginPath(),n.moveTo(i+u,s),"top"===a&&this.drawCaret(e,r),n.lineTo(i+l-u,s),n.quadraticCurveTo(i+l,s,i+l,s+u),"center"===a&&"right"===o&&this.drawCaret(e,r),n.lineTo(i+l,s+c-u),n.quadraticCurveTo(i+l,s+c,i+l-u,s+c),"bottom"===a&&this.drawCaret(e,r),n.lineTo(i+u,s+c),n.quadraticCurveTo(i,s+c,i,s+c-u),"center"===a&&"left"===o&&this.drawCaret(e,r),n.lineTo(i,s+u),n.quadraticCurveTo(i,s,i+u,s),n.closePath(),n.fill(),t.borderWidth>0&&n.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var n={width:t.width,height:t.height},r={x:t.x,y:t.y},o=Math.abs(t.opacity<.001)?0:t.opacity,a=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;this._options.enabled&&a&&(e.save(),e.globalAlpha=o,this.drawBackground(r,t,e,n),r.y+=t.yPadding,B.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),B.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t,n=this,r=n._options;return n._lastActive=n._lastActive||[],"mouseout"===e.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(e,r.mode,r),r.reverse&&n._active.reverse()),(t=!B.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(r.enabled||r.custom)&&(n._eventPosition={x:e.x,y:e.y},n.update(!0),n.pivot())),t}}),zt=At,Bt=Ht;Bt.positioners=zt;var Ut=B.valueOrDefault;function Vt(){return B.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,r){if("xAxes"===e||"yAxes"===e){var o,a,i,s=n[e].length;for(t[e]||(t[e]=[]),o=0;o<s;++o)i=n[e][o],a=Ut(i.type,"xAxes"===e?"category":"linear"),o>=t[e].length&&t[e].push({}),!t[e][o].type||i.type&&i.type!==t[e][o].type?B.merge(t[e][o],[Pt.getScaleDefaults(a),i]):B.merge(t[e][o],i)}else B._merger(e,t,n,r)}})}function Wt(){return B.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,r){var o=t[e]||Object.create(null),a=n[e];"scales"===e?t[e]=Vt(o,a):"scale"===e?t[e]=B.merge(o,[Pt.getScaleDefaults(a.type),a]):B._merger(e,t,n,r)}})}function qt(e){var t=e.options;B.each(e.scales,(function(t){mt.removeBox(e,t)})),t=Wt(Y.global,Y[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function Gt(e,t,n){var r,o=function(e){return e.id===r};do{r=t+n++}while(B.findIndex(e,o)>=0);return r}function Jt(e){return"top"===e||"bottom"===e}function Kt(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}Y._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Qt=function(e,t){return this.construct(e,t),this};B.extend(Qt.prototype,{construct:function(e,t){var n=this;t=function(e){var t=(e=e||Object.create(null)).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=Wt(Y.global,Y[e.type],e.options||{}),e}(t);var r=Lt.acquireContext(e,t),o=r&&r.canvas,a=o&&o.height,i=o&&o.width;n.id=B.uid(),n.ctx=r,n.canvas=o,n.config=t,n.width=i,n.height=a,n.aspectRatio=a?i/a:null,n.options=t.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Qt.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(e){n.config.data=e}}),r&&o?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return Ct.notify(e,"beforeInit"),B.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),Ct.notify(e,"afterInit"),e},clear:function(){return B.canvas.clear(this),this},stop:function(){return $.cancelAnimation(this),this},resize:function(e){var t=this,n=t.options,r=t.canvas,o=n.maintainAspectRatio&&t.aspectRatio||null,a=Math.max(0,Math.floor(B.getMaximumWidth(r))),i=Math.max(0,Math.floor(o?a/o:B.getMaximumHeight(r)));if((t.width!==a||t.height!==i)&&(r.width=t.width=a,r.height=t.height=i,r.style.width=a+"px",r.style.height=i+"px",B.retinaScale(t,n.devicePixelRatio),!e)){var s={width:a,height:i};Ct.notify(t,"resize",[s]),n.onResize&&n.onResize(t,s),t.stop(),t.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},n=e.scale;B.each(t.xAxes,(function(e,n){e.id||(e.id=Gt(t.xAxes,"x-axis-",n))})),B.each(t.yAxes,(function(e,n){e.id||(e.id=Gt(t.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,n=e.scales||{},r=[],o=Object.keys(n).reduce((function(e,t){return e[t]=!1,e}),{});t.scales&&(r=r.concat((t.scales.xAxes||[]).map((function(e){return{options:e,dtype:"category",dposition:"bottom"}})),(t.scales.yAxes||[]).map((function(e){return{options:e,dtype:"linear",dposition:"left"}})))),t.scale&&r.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),B.each(r,(function(t){var r=t.options,a=r.id,i=Ut(r.type,t.dtype);Jt(r.position)!==Jt(t.dposition)&&(r.position=t.dposition),o[a]=!0;var s=null;if(a in n&&n[a].type===i)(s=n[a]).options=r,s.ctx=e.ctx,s.chart=e;else{var l=Pt.getScaleConstructor(i);if(!l)return;s=new l({id:a,type:i,options:r,ctx:e.ctx,chart:e}),n[s.id]=s}s.mergeTicksOptions(),t.isDefault&&(e.scale=s)})),B.each(o,(function(e,t){e||delete n[t]})),e.scales=n,Pt.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,n=this,r=[],o=n.data.datasets;for(e=0,t=o.length;e<t;e++){var a=o[e],i=n.getDatasetMeta(e),s=a.type||n.config.type;if(i.type&&i.type!==s&&(n.destroyDatasetMeta(e),i=n.getDatasetMeta(e)),i.type=s,i.order=a.order||0,i.index=e,i.controller)i.controller.updateIndex(e),i.controller.linkScales();else{var l=$e[i.type];if(void 0===l)throw new Error('"'+i.type+'" is not a chart type.');i.controller=new l(n,e),r.push(i.controller)}}return r},resetElements:function(){var e=this;B.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.reset()}),e)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var t,n,r=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),qt(r),Ct._invalidate(r),!1!==Ct.notify(r,"beforeUpdate")){r.tooltip._data=r.data;var o=r.buildOrUpdateControllers();for(t=0,n=r.data.datasets.length;t<n;t++)r.getDatasetMeta(t).controller.buildOrUpdateElements();r.updateLayout(),r.options.animation&&r.options.animation.duration&&B.each(o,(function(e){e.reset()})),r.updateDatasets(),r.tooltip.initialize(),r.lastActive=[],Ct.notify(r,"afterUpdate"),r._layers.sort(Kt("z","_idx")),r._bufferedRender?r._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:r.render(e)}},updateLayout:function(){var e=this;!1!==Ct.notify(e,"beforeLayout")&&(mt.update(this,this.width,this.height),e._layers=[],B.each(e.boxes,(function(t){t._configure&&t._configure(),e._layers.push.apply(e._layers,t._layers())}),e),e._layers.forEach((function(e,t){e._idx=t})),Ct.notify(e,"afterScaleUpdate"),Ct.notify(e,"afterLayout"))},updateDatasets:function(){if(!1!==Ct.notify(this,"beforeDatasetsUpdate")){for(var e=0,t=this.data.datasets.length;e<t;++e)this.updateDataset(e);Ct.notify(this,"afterDatasetsUpdate")}},updateDataset:function(e){var t=this.getDatasetMeta(e),n={meta:t,index:e};!1!==Ct.notify(this,"beforeDatasetUpdate",[n])&&(t.controller._update(),Ct.notify(this,"afterDatasetUpdate",[n]))},render:function(e){var t=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var n=t.options.animation,r=Ut(e.duration,n&&n.duration),o=e.lazy;if(!1!==Ct.notify(t,"beforeRender")){var a=function(e){Ct.notify(t,"afterRender"),B.callback(n&&n.onComplete,[e],t)};if(n&&r){var i=new X({numSteps:r/16.66,easing:e.easing||n.easing,render:function(e,t){var n=B.easing.effects[t.easing],r=t.currentStep,o=r/t.numSteps;e.draw(n(o),o,r)},onAnimationProgress:n.onProgress,onAnimationComplete:a});$.addAnimation(t,i,r,o)}else t.draw(),a(new X({numSteps:0,chart:t}));return t}},draw:function(e){var t,n,r=this;if(r.clear(),B.isNullOrUndef(e)&&(e=1),r.transition(e),!(r.width<=0||r.height<=0)&&!1!==Ct.notify(r,"beforeDraw",[e])){for(n=r._layers,t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(r.chartArea);for(r.drawDatasets(e);t<n.length;++t)n[t].draw(r.chartArea);r._drawTooltip(e),Ct.notify(r,"afterDraw",[e])}},transition:function(e){for(var t=0,n=(this.data.datasets||[]).length;t<n;++t)this.isDatasetVisible(t)&&this.getDatasetMeta(t).controller.transition(e);this.tooltip.transition(e)},_getSortedDatasetMetas:function(e){var t,n,r=[];for(t=0,n=(this.data.datasets||[]).length;t<n;++t)e&&!this.isDatasetVisible(t)||r.push(this.getDatasetMeta(t));return r.sort(Kt("order","index")),r},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(e){var t,n;if(!1!==Ct.notify(this,"beforeDatasetsDraw",[e])){for(n=(t=this._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)this.drawDataset(t[n],e);Ct.notify(this,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var n={meta:e,index:e.index,easingValue:t};!1!==Ct.notify(this,"beforeDatasetDraw",[n])&&(e.controller.draw(t),Ct.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(e){var t=this.tooltip,n={tooltip:t,easingValue:e};!1!==Ct.notify(this,"beforeTooltipDraw",[n])&&(t.draw(),Ct.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(e){return at.modes.single(this,e)},getElementsAtEvent:function(e){return at.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return at.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,n){var r=at.modes[t];return"function"==typeof r?r(this,e,n):[]},getDatasetAtEvent:function(e){return at.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this.data.datasets[e];t._meta||(t._meta={});var n=t._meta[this.id];return n||(n=t._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t.order||0,index:e}),n},getVisibleDatasetCount:function(){for(var e=0,t=0,n=this.data.datasets.length;t<n;++t)this.isDatasetVisible(t)&&e++;return e},isDatasetVisible:function(e){var t=this.getDatasetMeta(e);return"boolean"==typeof t.hidden?!t.hidden:!this.data.datasets[e].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(e){var t=this.id,n=this.data.datasets[e],r=n._meta&&n._meta[t];r&&(r.controller.destroy(),delete n._meta[t])},destroy:function(){var e,t,n=this,r=n.canvas;for(n.stop(),e=0,t=n.data.datasets.length;e<t;++e)n.destroyDatasetMeta(e);r&&(n.unbindEvents(),B.canvas.clear(n),Lt.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Ct.notify(n,"destroy"),delete Qt.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new Bt({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var e=this,t=e._listeners={},n=function(){e.eventHandler.apply(e,arguments)};B.each(e.options.events,(function(r){Lt.addEventListener(e,r,n),t[r]=n})),e.options.responsive&&(n=function(){e.resize()},Lt.addEventListener(e,"resize",n),t.resize=n)},unbindEvents:function(){var e=this,t=e._listeners;t&&(delete e._listeners,B.each(t,(function(t,n){Lt.removeEventListener(e,n,t)})))},updateHoverStyle:function(e,t,n){var r,o,a,i=n?"set":"remove";for(o=0,a=e.length;o<a;++o)(r=e[o])&&this.getDatasetMeta(r._datasetIndex).controller[i+"HoverStyle"](r);"dataset"===t&&this.getDatasetMeta(e[0]._datasetIndex).controller["_"+i+"DatasetHoverStyle"]()},eventHandler:function(e){var t=this,n=t.tooltip;if(!1!==Ct.notify(t,"beforeEvent",[e])){t._bufferedRender=!0,t._bufferedRequest=null;var r=t.handleEvent(e);n&&(r=n._start?n.handleEvent(e):r|n.handleEvent(e)),Ct.notify(t,"afterEvent",[e]);var o=t._bufferedRequest;return o?t.render(o):r&&!t.animating&&(t.stop(),t.render({duration:t.options.hover.animationDuration,lazy:!0})),t._bufferedRender=!1,t._bufferedRequest=null,t}},handleEvent:function(e){var t,n=this,r=n.options||{},o=r.hover;return n.lastActive=n.lastActive||[],"mouseout"===e.type?n.active=[]:n.active=n.getElementsAtEventForMode(e,o.mode,o),B.callback(r.onHover||r.hover.onHover,[e.native,n.active],n),"mouseup"!==e.type&&"click"!==e.type||r.onClick&&r.onClick.call(n,e.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,o.mode,!1),n.active.length&&o.mode&&n.updateHoverStyle(n.active,o.mode,!0),t=!B.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,t}}),Qt.instances={};var Xt=Qt;function $t(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Zt(e){this.options=e||{}}Qt.Controller=Qt,Qt.types={},B.configMerge=Wt,B.scaleMerge=Vt,B.extend(Zt.prototype,{formats:$t,parse:$t,format:$t,add:$t,diff:$t,startOf:$t,endOf:$t,_create:function(e){return e}}),Zt.override=function(e){B.extend(Zt.prototype,e)};var en={_date:Zt},tn={formatters:{values:function(e){return B.isArray(e)?e:""+e},linear:function(e,t,n){var r=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&e!==Math.floor(e)&&(r=e-Math.floor(e));var o=B.log10(Math.abs(r)),a="";if(0!==e)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var i=B.log10(Math.abs(e)),s=Math.floor(i)-Math.floor(o);s=Math.max(Math.min(s,20),0),a=e.toExponential(s)}else{var l=-1*Math.floor(o);l=Math.max(Math.min(l,20),0),a=e.toFixed(l)}else a="0";return a},logarithmic:function(e,t,n){var r=e/Math.pow(10,Math.floor(B.log10(e)));return 0===e?"0":1===r||2===r||5===r||0===t||t===n.length-1?e.toExponential():""}}},nn=B.isArray,rn=B.isNullOrUndef,on=B.valueOrDefault,an=B.valueAtIndexOrDefault;function sn(e,t,n){var r,o=e.getTicks().length,a=Math.min(t,o-1),i=e.getPixelForTick(a),s=e._startPixel,l=e._endPixel;if(!(n&&(r=1===o?Math.max(i-s,l-i):0===t?(e.getPixelForTick(1)-i)/2:(i-e.getPixelForTick(a-1))/2,(i+=a<t?r:-r)<s-1e-6||i>l+1e-6)))return i}function ln(e,t,n,r){var o,a,i,s,l,c,u,d,h,p,f,m,g,_=n.length,v=[],b=[],y=[],w=0,k=0;for(o=0;o<_;++o){if(s=n[o].label,l=n[o].major?t.major:t.minor,e.font=c=l.string,u=r[c]=r[c]||{data:{},gc:[]},d=l.lineHeight,h=p=0,rn(s)||nn(s)){if(nn(s))for(a=0,i=s.length;a<i;++a)f=s[a],rn(f)||nn(f)||(h=B.measureText(e,u.data,u.gc,h,f),p+=d)}else h=B.measureText(e,u.data,u.gc,h,s),p=d;v.push(h),b.push(p),y.push(d/2),w=Math.max(h,w),k=Math.max(p,k)}function x(e){return{width:v[e]||0,height:b[e]||0,offset:y[e]||0}}return function(e,t){B.each(e,(function(e){var n,r=e.gc,o=r.length/2;if(o>t){for(n=0;n<o;++n)delete e.data[r[n]];r.splice(0,o)}}))}(r,_),m=v.indexOf(w),g=b.indexOf(k),{first:x(0),last:x(_-1),widest:x(m),highest:x(g)}}function cn(e){return e.drawTicks?e.tickMarkLength:0}function un(e){var t,n;return e.display?(t=B.options._parseFont(e),n=B.options.toPadding(e.padding),t.lineHeight+n.height):0}function dn(e,t){return B.extend(B.options._parseFont({fontFamily:on(t.fontFamily,e.fontFamily),fontSize:on(t.fontSize,e.fontSize),fontStyle:on(t.fontStyle,e.fontStyle),lineHeight:on(t.lineHeight,e.lineHeight)}),{color:B.options.resolve([t.fontColor,e.fontColor,Y.global.defaultFontColor])})}function hn(e){var t=dn(e,e.minor);return{minor:t,major:e.major.enabled?dn(e,e.major):t}}function pn(e){var t,n,r,o=[];for(n=0,r=e.length;n<r;++n)void 0!==(t=e[n])._index&&o.push(t);return o}function fn(e,t,n,r){var o,a,i,s,l=on(n,0),c=Math.min(on(r,e.length),e.length),u=0;for(t=Math.ceil(t),r&&(t=(o=r-n)/Math.floor(o/t)),s=l;s<0;)u++,s=Math.round(l+u*t);for(a=Math.max(l,0);a<c;a++)i=e[a],a===s?(i._index=a,u++,s=Math.round(l+u*t)):delete i.label}Y._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:tn.formatters.values,minor:{},major:{}}});var mn=K.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){B.callback(this.options.beforeUpdate,[this])},update:function(e,t,n){var r,o,a,i,s,l=this,c=l.options.ticks,u=c.sampleSize;if(l.beforeUpdate(),l.maxWidth=e,l.maxHeight=t,l.margins=B.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),i=l.buildTicks()||[],(!(i=l.afterBuildTicks(i)||i)||!i.length)&&l.ticks)for(i=[],r=0,o=l.ticks.length;r<o;++r)i.push({value:l.ticks[r],major:!1});return l._ticks=i,s=u<i.length,a=l._convertTicksToLabels(s?function(e,t){for(var n=[],r=e.length/t,o=0,a=e.length;o<a;o+=r)n.push(e[Math.floor(o)]);return n}(i,u):i),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=c.display&&(c.autoSkip||"auto"===c.source)?l._autoSkip(i):i,s&&(a=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=a,l.afterUpdate(),l.minSize},_configure:function(){var e,t,n=this,r=n.options.ticks.reverse;n.isHorizontal()?(e=n.left,t=n.right):(e=n.top,t=n.bottom,r=!r),n._startPixel=e,n._endPixel=t,n._reversePixels=r,n._length=t-e},afterUpdate:function(){B.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){B.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0},afterSetDimensions:function(){B.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){B.callback(this.options.beforeDataLimits,[this])},determineDataLimits:B.noop,afterDataLimits:function(){B.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){B.callback(this.options.beforeBuildTicks,[this])},buildTicks:B.noop,afterBuildTicks:function(e){var t=this;return nn(e)&&e.length?B.callback(t.options.afterBuildTicks,[t,e]):(t.ticks=B.callback(t.options.afterBuildTicks,[t,t.ticks])||t.ticks,e)},beforeTickToLabelConversion:function(){B.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var e=this.options.ticks;this.ticks=this.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){B.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){B.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var e,t,n,r,o,a,i,s=this,l=s.options,c=l.ticks,u=s.getTicks().length,d=c.minRotation||0,h=c.maxRotation,p=d;!s._isVisible()||!c.display||d>=h||u<=1||!s.isHorizontal()?s.labelRotation=d:(t=(e=s._getLabelSizes()).widest.width,n=e.highest.height-e.highest.offset,r=Math.min(s.maxWidth,s.chart.width-t),t+6>(o=l.offset?s.maxWidth/u:r/(u-1))&&(o=r/(u-(l.offset?.5:1)),a=s.maxHeight-cn(l.gridLines)-c.padding-un(l.scaleLabel),i=Math.sqrt(t*t+n*n),p=B.toDegrees(Math.min(Math.asin(Math.min((e.highest.height+6)/o,1)),Math.asin(Math.min(a/i,1))-Math.asin(n/i))),p=Math.max(d,Math.min(h,p))),s.labelRotation=p)},afterCalculateTickRotation:function(){B.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){B.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},n=e.chart,r=e.options,o=r.ticks,a=r.scaleLabel,i=r.gridLines,s=e._isVisible(),l="bottom"===r.position,c=e.isHorizontal();if(c?t.width=e.maxWidth:s&&(t.width=cn(i)+un(a)),c?s&&(t.height=cn(i)+un(a)):t.height=e.maxHeight,o.display&&s){var u=hn(o),d=e._getLabelSizes(),h=d.first,p=d.last,f=d.widest,m=d.highest,g=.4*u.minor.lineHeight,_=o.padding;if(c){var v=0!==e.labelRotation,b=B.toRadians(e.labelRotation),y=Math.cos(b),w=Math.sin(b),k=w*f.width+y*(m.height-(v?m.offset:0))+(v?0:g);t.height=Math.min(e.maxHeight,t.height+k+_);var x,M,E=e.getPixelForTick(0)-e.left,T=e.right-e.getPixelForTick(e.getTicks().length-1);v?(x=l?y*h.width+w*h.offset:w*(h.height-h.offset),M=l?w*(p.height-p.offset):y*p.width+w*p.offset):(x=h.width/2,M=p.width/2),e.paddingLeft=Math.max((x-E)*e.width/(e.width-E),0)+3,e.paddingRight=Math.max((M-T)*e.width/(e.width-T),0)+3}else{var S=o.mirror?0:f.width+_+g;t.width=Math.min(e.maxWidth,t.width+S),e.paddingTop=h.height/2,e.paddingBottom=p.height/2}}e.handleMargins(),c?(e.width=e._length=n.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=n.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){B.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(rn(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var t,n,r,o=this;for(o.ticks=e.map((function(e){return e.value})),o.beforeTickToLabelConversion(),t=o.convertTicksToLabels(e)||o.ticks,o.afterTickToLabelConversion(),n=0,r=e.length;n<r;++n)e[n].label=t[n];return t},_getLabelSizes:function(){var e=this,t=e._labelSizes;return t||(e._labelSizes=t=ln(e.ctx,hn(e.options.ticks),e.getTicks(),e.longestTextCache),e.longestLabelWidth=t.widest.width),t},_parseValue:function(e){var t,n,r,o;return nn(e)?(t=+this.getRightValue(e[0]),n=+this.getRightValue(e[1]),r=Math.min(t,n),o=Math.max(t,n)):(t=void 0,n=e=+this.getRightValue(e),r=e,o=e),{min:r,max:o,start:t,end:n}},_getScaleLabel:function(e){var t=this._parseValue(e);return void 0!==t.start?"["+t.start+", "+t.end+"]":+this.getRightValue(e)},getLabelForIndex:B.noop,getPixelForValue:B.noop,getValueForPixel:B.noop,getPixelForTick:function(e){var t=this.options.offset,n=this._ticks.length,r=1/Math.max(n-(t?0:1),1);return e<0||e>n-1?null:this.getPixelForDecimal(e*r+(t?r/2:0))},getPixelForDecimal:function(e){return this._reversePixels&&(e=1-e),this._startPixel+e*this._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this.min,t=this.max;return this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0},_autoSkip:function(e){var t,n,r,o,a=this.options.ticks,i=this._length,s=a.maxTicksLimit||i/this._tickSize()+1,l=a.major.enabled?function(e){var t,n,r=[];for(t=0,n=e.length;t<n;t++)e[t].major&&r.push(t);return r}(e):[],c=l.length,u=l[0],d=l[c-1];if(c>s)return function(e,t,n){var r,o,a=0,i=t[0];for(n=Math.ceil(n),r=0;r<e.length;r++)o=e[r],r===i?(o._index=r,i=t[++a*n]):delete o.label}(e,l,c/s),pn(e);if(r=function(e,t,n,r){var o,a,i,s,l=function(e){var t,n,r=e.length;if(r<2)return!1;for(n=e[0],t=1;t<r;++t)if(e[t]-e[t-1]!==n)return!1;return n}(e),c=(t.length-1)/r;if(!l)return Math.max(c,1);for(i=0,s=(o=B.math._factorize(l)).length-1;i<s;i++)if((a=o[i])>c)return a;return Math.max(c,1)}(l,e,0,s),c>0){for(t=0,n=c-1;t<n;t++)fn(e,r,l[t],l[t+1]);return o=c>1?(d-u)/(c-1):null,fn(e,r,B.isNullOrUndef(o)?0:u-o,u),fn(e,r,d,B.isNullOrUndef(o)?e.length:d+o),pn(e)}return fn(e,r),pn(e)},_tickSize:function(){var e=this.options.ticks,t=B.toRadians(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),o=this._getLabelSizes(),a=e.autoSkipPadding||0,i=o?o.widest.width+a:0,s=o?o.highest.height+a:0;return this.isHorizontal()?s*n>i*r?i/n:s/r:s*r<i*n?s/n:i/r},_isVisible:function(){var e,t,n,r=this.chart,o=this.options.display;if("auto"!==o)return!!o;for(e=0,t=r.data.datasets.length;e<t;++e)if(r.isDatasetVisible(e)&&((n=r.getDatasetMeta(e)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(e){var t,n,r,o,a,i,s,l,c,u,d,h,p,f,m,g,_,v=this,b=v.chart,y=v.options,w=y.gridLines,k=y.position,x=w.offsetGridLines,M=v.isHorizontal(),E=v._ticksToDraw,T=E.length+(x?1:0),S=cn(w),D=[],L=w.drawBorder?an(w.lineWidth,0,0):0,C=L/2,P=B._alignPixel,O=function(e){return P(b,e,L)};for("top"===k?(t=O(v.bottom),s=v.bottom-S,c=t-C,d=O(e.top)+C,p=e.bottom):"bottom"===k?(t=O(v.top),d=e.top,p=O(e.bottom)-C,s=t+C,c=v.top+S):"left"===k?(t=O(v.right),i=v.right-S,l=t-C,u=O(e.left)+C,h=e.right):(t=O(v.left),u=e.left,h=O(e.right)-C,i=t+C,l=v.left+S),n=0;n<T;++n)r=E[n]||{},rn(r.label)&&n<E.length||(n===v.zeroLineIndex&&y.offset===x?(f=w.zeroLineWidth,m=w.zeroLineColor,g=w.zeroLineBorderDash||[],_=w.zeroLineBorderDashOffset||0):(f=an(w.lineWidth,n,1),m=an(w.color,n,"rgba(0,0,0,0.1)"),g=w.borderDash||[],_=w.borderDashOffset||0),void 0!==(o=sn(v,r._index||n,x))&&(a=P(b,o,f),M?i=l=u=h=a:s=c=d=p=a,D.push({tx1:i,ty1:s,tx2:l,ty2:c,x1:u,y1:d,x2:h,y2:p,width:f,color:m,borderDash:g,borderDashOffset:_})));return D.ticksLength=T,D.borderValue=t,D},_computeLabelItems:function(){var e,t,n,r,o,a,i,s,l,c,u,d,h=this,p=h.options,f=p.ticks,m=p.position,g=f.mirror,_=h.isHorizontal(),v=h._ticksToDraw,b=hn(f),y=f.padding,w=cn(p.gridLines),k=-B.toRadians(h.labelRotation),x=[];for("top"===m?(a=h.bottom-w-y,i=k?"left":"center"):"bottom"===m?(a=h.top+w+y,i=k?"right":"center"):"left"===m?(o=h.right-(g?0:w)-y,i=g?"left":"right"):(o=h.left+(g?0:w)+y,i=g?"right":"left"),e=0,t=v.length;e<t;++e)r=(n=v[e]).label,rn(r)||(s=h.getPixelForTick(n._index||e)+f.labelOffset,c=(l=n.major?b.major:b.minor).lineHeight,u=nn(r)?r.length:1,_?(o=s,d="top"===m?((k?1:.5)-u)*c:(k?0:.5)*c):(a=s,d=(1-u)*c/2),x.push({x:o,y:a,rotation:k,label:r,font:l,textOffset:d,textAlign:i}));return x},_drawGrid:function(e){var t=this,n=t.options.gridLines;if(n.display){var r,o,a,i,s,l=t.ctx,c=t.chart,u=B._alignPixel,d=n.drawBorder?an(n.lineWidth,0,0):0,h=t._gridLineItems||(t._gridLineItems=t._computeGridLineItems(e));for(a=0,i=h.length;a<i;++a)r=(s=h[a]).width,o=s.color,r&&o&&(l.save(),l.lineWidth=r,l.strokeStyle=o,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(d){var p,f,m,g,_=d,v=an(n.lineWidth,h.ticksLength-1,1),b=h.borderValue;t.isHorizontal()?(p=u(c,t.left,_)-_/2,f=u(c,t.right,v)+v/2,m=g=b):(m=u(c,t.top,_)-_/2,g=u(c,t.bottom,v)+v/2,p=f=b),l.lineWidth=d,l.strokeStyle=an(n.color,0),l.beginPath(),l.moveTo(p,m),l.lineTo(f,g),l.stroke()}}},_drawLabels:function(){var e=this;if(e.options.ticks.display){var t,n,r,o,a,i,s,l,c=e.ctx,u=e._labelItems||(e._labelItems=e._computeLabelItems());for(t=0,r=u.length;t<r;++t){if(i=(a=u[t]).font,c.save(),c.translate(a.x,a.y),c.rotate(a.rotation),c.font=i.string,c.fillStyle=i.color,c.textBaseline="middle",c.textAlign=a.textAlign,s=a.label,l=a.textOffset,nn(s))for(n=0,o=s.length;n<o;++n)c.fillText(""+s[n],0,l),l+=i.lineHeight;else c.fillText(s,0,l);c.restore()}}},_drawTitle:function(){var e=this,t=e.ctx,n=e.options,r=n.scaleLabel;if(r.display){var o,a,i=on(r.fontColor,Y.global.defaultFontColor),s=B.options._parseFont(r),l=B.options.toPadding(r.padding),c=s.lineHeight/2,u=n.position,d=0;if(e.isHorizontal())o=e.left+e.width/2,a="bottom"===u?e.bottom-c-l.bottom:e.top+c+l.top;else{var h="left"===u;o=h?e.left+c+l.top:e.right-c-l.top,a=e.top+e.height/2,d=h?-.5*Math.PI:.5*Math.PI}t.save(),t.translate(o,a),t.rotate(d),t.textAlign="center",t.textBaseline="middle",t.fillStyle=i,t.font=s.string,t.fillText(r.labelString,0,0),t.restore()}},draw:function(e){this._isVisible()&&(this._drawGrid(e),this._drawTitle(),this._drawLabels())},_layers:function(){var e=this,t=e.options,n=t.ticks&&t.ticks.z||0,r=t.gridLines&&t.gridLines.z||0;return e._isVisible()&&n!==r&&e.draw===e._draw?[{z:r,draw:function(){e._drawGrid.apply(e,arguments),e._drawTitle.apply(e,arguments)}},{z:n,draw:function(){e._drawLabels.apply(e,arguments)}}]:[{z:n,draw:function(){e.draw.apply(e,arguments)}}]},_getMatchingVisibleMetas:function(e){var t=this,n=t.isHorizontal();return t.chart._getSortedVisibleDatasetMetas().filter((function(r){return(!e||r.type===e)&&(n?r.xAxisID===t.id:r.yAxisID===t.id)}))}});mn.prototype._draw=mn.prototype.draw;var gn=mn,_n=B.isNullOrUndef,vn=gn.extend({determineDataLimits:function(){var e,t=this,n=t._getLabels(),r=t.options.ticks,o=r.min,a=r.max,i=0,s=n.length-1;void 0!==o&&(e=n.indexOf(o))>=0&&(i=e),void 0!==a&&(e=n.indexOf(a))>=0&&(s=e),t.minIndex=i,t.maxIndex=s,t.min=n[i],t.max=n[s]},buildTicks:function(){var e=this._getLabels(),t=this.minIndex,n=this.maxIndex;this.ticks=0===t&&n===e.length-1?e:e.slice(t,n+1)},getLabelForIndex:function(e,t){var n=this.chart;return n.getDatasetMeta(t).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[t].data[e]):this._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,n=e.ticks;gn.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),n&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(n.length-(t?0:1),1))},getPixelForValue:function(e,t,n){var r,o,a,i=this;return _n(t)||_n(n)||(e=i.chart.data.datasets[n].data[t]),_n(e)||(r=i.isHorizontal()?e.x:e.y),(void 0!==r||void 0!==e&&isNaN(t))&&(o=i._getLabels(),e=B.valueOrDefault(r,e),t=-1!==(a=o.indexOf(e))?a:t,isNaN(t)&&(t=e)),i.getPixelForDecimal((t-i._startValue)/i._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange);return Math.min(Math.max(t,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),bn={position:"bottom"};vn._defaults=bn;var yn=B.noop,wn=B.isNullOrUndef,kn=gn.extend({getRightValue:function(e){return"string"==typeof e?+e:gn.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;if(t.beginAtZero){var n=B.sign(e.min),r=B.sign(e.max);n<0&&r<0?e.max=0:n>0&&r>0&&(e.min=0)}var o=void 0!==t.min||void 0!==t.suggestedMin,a=void 0!==t.max||void 0!==t.suggestedMax;void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(null===e.min?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(null===e.max?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),o!==a&&e.min>=e.max&&(o?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this.options.ticks,n=t.stepSize,r=t.maxTicksLimit;return n?e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(e=this._computeTickLimit(),r=r||11),r&&(e=Math.min(r,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:yn,buildTicks:function(){var e=this,t=e.options.ticks,n=e.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:t.min,max:t.max,precision:t.precision,stepSize:B.valueOrDefault(t.fixedStepSize,t.stepSize)},o=e.ticks=function(e,t){var n,r,o,a,i=[],s=e.stepSize,l=s||1,c=e.maxTicks-1,u=e.min,d=e.max,h=e.precision,p=t.min,f=t.max,m=B.niceNum((f-p)/c/l)*l;if(m<1e-14&&wn(u)&&wn(d))return[p,f];(a=Math.ceil(f/m)-Math.floor(p/m))>c&&(m=B.niceNum(a*m/c/l)*l),s||wn(h)?n=Math.pow(10,B._decimalPlaces(m)):(n=Math.pow(10,h),m=Math.ceil(m*n)/n),r=Math.floor(p/m)*m,o=Math.ceil(f/m)*m,s&&(!wn(u)&&B.almostWhole(u/m,m/1e3)&&(r=u),!wn(d)&&B.almostWhole(d/m,m/1e3)&&(o=d)),a=(o-r)/m,a=B.almostEquals(a,Math.round(a),m/1e3)?Math.round(a):Math.ceil(a),r=Math.round(r*n)/n,o=Math.round(o*n)/n,i.push(wn(u)?r:u);for(var g=1;g<a;++g)i.push(Math.round((r+g*m)*n)/n);return i.push(wn(d)?o:d),i}(r,e);e.handleDirectionalChanges(),e.max=B.max(o),e.min=B.min(o),t.reverse?(o.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),gn.prototype.convertTicksToLabels.call(e)},_configure:function(){var e,t=this,n=t.getTicks(),r=t.min,o=t.max;gn.prototype._configure.call(t),t.options.offset&&n.length&&(r-=e=(o-r)/Math.max(n.length-1,1)/2,o+=e),t._startValue=r,t._endValue=o,t._valueRange=o-r}}),xn={position:"left",ticks:{callback:tn.formatters.linear}};function Mn(e,t,n,r){var o,a,i=e.options,s=function(e,t,n){var r=[n.type,void 0===t&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===e[r]&&(e[r]={pos:[],neg:[]}),e[r]}(t,i.stacked,n),l=s.pos,c=s.neg,u=r.length;for(o=0;o<u;++o)a=e._parseValue(r[o]),isNaN(a.min)||isNaN(a.max)||n.data[o].hidden||(l[o]=l[o]||0,c[o]=c[o]||0,i.relativePoints?l[o]=100:a.min<0||a.max<0?c[o]+=a.min:l[o]+=a.max)}function En(e,t,n){var r,o,a=n.length;for(r=0;r<a;++r)o=e._parseValue(n[r]),isNaN(o.min)||isNaN(o.max)||t.data[r].hidden||(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max))}var Tn=kn.extend({determineDataLimits:function(){var e,t,n,r,o=this,a=o.options,i=o.chart.data.datasets,s=o._getMatchingVisibleMetas(),l=a.stacked,c={},u=s.length;if(o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,void 0===l)for(e=0;!l&&e<u;++e)l=void 0!==(t=s[e]).stack;for(e=0;e<u;++e)n=i[(t=s[e]).index].data,l?Mn(o,c,t,n):En(o,t,n);B.each(c,(function(e){r=e.pos.concat(e.neg),o.min=Math.min(o.min,B.min(r)),o.max=Math.max(o.max,B.max(r))})),o.min=B.isFinite(o.min)&&!isNaN(o.min)?o.min:0,o.max=B.isFinite(o.max)&&!isNaN(o.max)?o.max:1,o.handleTickRangeOptions()},_computeTickLimit:function(){var e;return this.isHorizontal()?Math.ceil(this.width/40):(e=B.options._parseFont(this.options.ticks),Math.ceil(this.height/e.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForValue:function(e){return this.getPixelForDecimal((+this.getRightValue(e)-this._startValue)/this._valueRange)},getValueForPixel:function(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange},getPixelForTick:function(e){var t=this.ticksAsNumbers;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])}}),Sn=xn;Tn._defaults=Sn;var Dn=B.valueOrDefault,Ln=B.math.log10,Cn={position:"left",ticks:{callback:tn.formatters.logarithmic}};function Pn(e,t){return B.isFinite(e)&&e>=0?e:t}var On=gn.extend({determineDataLimits:function(){var e,t,n,r,o,a,i=this,s=i.options,l=i.chart,c=l.data.datasets,u=i.isHorizontal();function d(e){return u?e.xAxisID===i.id:e.yAxisID===i.id}i.min=Number.POSITIVE_INFINITY,i.max=Number.NEGATIVE_INFINITY,i.minNotZero=Number.POSITIVE_INFINITY;var h=s.stacked;if(void 0===h)for(e=0;e<c.length;e++)if(t=l.getDatasetMeta(e),l.isDatasetVisible(e)&&d(t)&&void 0!==t.stack){h=!0;break}if(s.stacked||h){var p={};for(e=0;e<c.length;e++){var f=[(t=l.getDatasetMeta(e)).type,void 0===s.stacked&&void 0===t.stack?e:"",t.stack].join(".");if(l.isDatasetVisible(e)&&d(t))for(void 0===p[f]&&(p[f]=[]),o=0,a=(r=c[e].data).length;o<a;o++){var m=p[f];n=i._parseValue(r[o]),isNaN(n.min)||isNaN(n.max)||t.data[o].hidden||n.min<0||n.max<0||(m[o]=m[o]||0,m[o]+=n.max)}}B.each(p,(function(e){if(e.length>0){var t=B.min(e),n=B.max(e);i.min=Math.min(i.min,t),i.max=Math.max(i.max,n)}}))}else for(e=0;e<c.length;e++)if(t=l.getDatasetMeta(e),l.isDatasetVisible(e)&&d(t))for(o=0,a=(r=c[e].data).length;o<a;o++)n=i._parseValue(r[o]),isNaN(n.min)||isNaN(n.max)||t.data[o].hidden||n.min<0||n.max<0||(i.min=Math.min(n.min,i.min),i.max=Math.max(n.max,i.max),0!==n.min&&(i.minNotZero=Math.min(n.min,i.minNotZero)));i.min=B.isFinite(i.min)?i.min:null,i.max=B.isFinite(i.max)?i.max:null,i.minNotZero=B.isFinite(i.minNotZero)?i.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;e.min=Pn(t.min,e.min),e.max=Pn(t.max,e.max),e.min===e.max&&(0!==e.min&&null!==e.min?(e.min=Math.pow(10,Math.floor(Ln(e.min))-1),e.max=Math.pow(10,Math.floor(Ln(e.max))+1)):(e.min=1,e.max=10)),null===e.min&&(e.min=Math.pow(10,Math.floor(Ln(e.max))-1)),null===e.max&&(e.max=0!==e.min?Math.pow(10,Math.floor(Ln(e.min))+1):10),null===e.minNotZero&&(e.min>0?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(Ln(e.max))):e.minNotZero=1)},buildTicks:function(){var e=this,t=e.options.ticks,n=!e.isHorizontal(),r={min:Pn(t.min),max:Pn(t.max)},o=e.ticks=function(e,t){var n,r,o=[],a=Dn(e.min,Math.pow(10,Math.floor(Ln(t.min)))),i=Math.floor(Ln(t.max)),s=Math.ceil(t.max/Math.pow(10,i));0===a?(n=Math.floor(Ln(t.minNotZero)),r=Math.floor(t.minNotZero/Math.pow(10,n)),o.push(a),a=r*Math.pow(10,n)):(n=Math.floor(Ln(a)),r=Math.floor(a/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{o.push(a),10==++r&&(r=1,l=++n>=0?1:l),a=Math.round(r*Math.pow(10,n)*l)/l}while(n<i||n===i&&r<s);var c=Dn(e.max,a);return o.push(c),o}(r,e);e.max=B.max(o),e.min=B.min(o),t.reverse?(n=!n,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),n&&o.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),gn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){var t=this.tickValues;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(Ln(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,n=0;gn.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),n=Dn(e.options.ticks.fontSize,Y.global.defaultFontSize)/e._length),e._startValue=Ln(t),e._valueOffset=n,e._valueRange=(Ln(e.max)-Ln(t))/(1-n)},getPixelForValue:function(e){var t=this,n=0;return(e=+t.getRightValue(e))>t.min&&e>0&&(n=(Ln(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(n)},getValueForPixel:function(e){var t=this,n=t.getDecimalForPixel(e);return 0===n&&0===t.min?0:Math.pow(10,t._startValue+(n-t._valueOffset)*t._valueRange)}}),Nn=Cn;On._defaults=Nn;var An=B.valueOrDefault,In=B.valueAtIndexOrDefault,Rn=B.options.resolve,Yn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:tn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function jn(e){var t=e.ticks;return t.display&&e.display?An(t.fontSize,Y.global.defaultFontSize)+2*t.backdropPaddingY:0}function Fn(e,t,n,r,o){return e===r||e===o?{start:t-n/2,end:t+n/2}:e<r||e>o?{start:t-n,end:t}:{start:t,end:t+n}}function Hn(e){return 0===e||180===e?"center":e<180?"left":"right"}function zn(e,t,n,r){var o,a,i=n.y+r/2;if(B.isArray(t))for(o=0,a=t.length;o<a;++o)e.fillText(t[o],n.x,i),i+=r;else e.fillText(t,n.x,i)}function Bn(e,t,n){90===e||270===e?n.y-=t.h/2:(e>270||e<90)&&(n.y-=t.h)}function Un(e){return B.isNumber(e)?e:0}var Vn=kn.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=jn(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;B.each(t.data.datasets,(function(o,a){if(t.isDatasetVisible(a)){var i=t.getDatasetMeta(a);B.each(o.data,(function(t,o){var a=+e.getRightValue(t);isNaN(a)||i.data[o].hidden||(n=Math.min(a,n),r=Math.max(a,r))}))}})),e.min=n===Number.POSITIVE_INFINITY?0:n,e.max=r===Number.NEGATIVE_INFINITY?0:r,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/jn(this.options))},convertTicksToLabels:function(){var e=this;kn.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map((function(){var t=B.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""}))},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this.options;e.display&&e.pointLabels.display?function(e){var t,n,r,o=B.options._parseFont(e.options.pointLabels),a={l:0,r:e.width,t:0,b:e.height-e.paddingTop},i={};e.ctx.font=o.string,e._pointLabelSizes=[];var s,l,c,u=e.chart.data.labels.length;for(t=0;t<u;t++){r=e.getPointPosition(t,e.drawingArea+5),s=e.ctx,l=o.lineHeight,c=e.pointLabels[t],n=B.isArray(c)?{w:B.longestText(s,s.font,c),h:c.length*l}:{w:s.measureText(c).width,h:l},e._pointLabelSizes[t]=n;var d=e.getIndexAngle(t),h=B.toDegrees(d)%360,p=Fn(h,r.x,n.w,0,180),f=Fn(h,r.y,n.h,90,270);p.start<a.l&&(a.l=p.start,i.l=d),p.end>a.r&&(a.r=p.end,i.r=d),f.start<a.t&&(a.t=f.start,i.t=d),f.end>a.b&&(a.b=f.end,i.b=d)}e.setReductions(e.drawingArea,a,i)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(e,t,n){var r=this,o=t.l/Math.sin(n.l),a=Math.max(t.r-r.width,0)/Math.sin(n.r),i=-t.t/Math.cos(n.t),s=-Math.max(t.b-(r.height-r.paddingTop),0)/Math.cos(n.b);o=Un(o),a=Un(a),i=Un(i),s=Un(s),r.drawingArea=Math.min(Math.floor(e-(o+a)/2),Math.floor(e-(i+s)/2)),r.setCenterPoint(o,a,i,s)},setCenterPoint:function(e,t,n,r){var o=this,a=o.width-t-o.drawingArea,i=e+o.drawingArea,s=n+o.drawingArea,l=o.height-o.paddingTop-r-o.drawingArea;o.xCenter=Math.floor((i+a)/2+o.left),o.yCenter=Math.floor((s+l)/2+o.top+o.paddingTop)},getIndexAngle:function(e){var t=this.chart,n=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(B.isNullOrUndef(e))return NaN;var n=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*n:(e-t.min)*n},getPointPosition:function(e,t){var n=this.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this.min,n=this.max;return this.getPointPositionForValue(e||0,this.beginAtZero?0:t<0&&n<0?n:t>0&&n>0?t:0)},_drawGrid:function(){var e,t,n,r=this,o=r.ctx,a=r.options,i=a.gridLines,s=a.angleLines,l=An(s.lineWidth,i.lineWidth),c=An(s.color,i.color);if(a.pointLabels.display&&function(e){var t=e.ctx,n=e.options,r=n.pointLabels,o=jn(n),a=e.getDistanceFromCenterForValue(n.ticks.reverse?e.min:e.max),i=B.options._parseFont(r);t.save(),t.font=i.string,t.textBaseline="middle";for(var s=e.chart.data.labels.length-1;s>=0;s--){var l=0===s?o/2:0,c=e.getPointPosition(s,a+l+5),u=In(r.fontColor,s,Y.global.defaultFontColor);t.fillStyle=u;var d=e.getIndexAngle(s),h=B.toDegrees(d);t.textAlign=Hn(h),Bn(h,e._pointLabelSizes[s],c),zn(t,e.pointLabels[s],c,i.lineHeight)}t.restore()}(r),i.display&&B.each(r.ticks,(function(e,n){0!==n&&(t=r.getDistanceFromCenterForValue(r.ticksAsNumbers[n]),function(e,t,n,r){var o,a=e.ctx,i=t.circular,s=e.chart.data.labels.length,l=In(t.color,r-1),c=In(t.lineWidth,r-1);if((i||s)&&l&&c){if(a.save(),a.strokeStyle=l,a.lineWidth=c,a.setLineDash&&(a.setLineDash(t.borderDash||[]),a.lineDashOffset=t.borderDashOffset||0),a.beginPath(),i)a.arc(e.xCenter,e.yCenter,n,0,2*Math.PI);else{o=e.getPointPosition(0,n),a.moveTo(o.x,o.y);for(var u=1;u<s;u++)o=e.getPointPosition(u,n),a.lineTo(o.x,o.y)}a.closePath(),a.stroke(),a.restore()}}(r,i,t,n))})),s.display&&l&&c){for(o.save(),o.lineWidth=l,o.strokeStyle=c,o.setLineDash&&(o.setLineDash(Rn([s.borderDash,i.borderDash,[]])),o.lineDashOffset=Rn([s.borderDashOffset,i.borderDashOffset,0])),e=r.chart.data.labels.length-1;e>=0;e--)t=r.getDistanceFromCenterForValue(a.ticks.reverse?r.min:r.max),n=r.getPointPosition(e,t),o.beginPath(),o.moveTo(r.xCenter,r.yCenter),o.lineTo(n.x,n.y),o.stroke();o.restore()}},_drawLabels:function(){var e=this,t=e.ctx,n=e.options.ticks;if(n.display){var r,o,a=e.getIndexAngle(0),i=B.options._parseFont(n),s=An(n.fontColor,Y.global.defaultFontColor);t.save(),t.font=i.string,t.translate(e.xCenter,e.yCenter),t.rotate(a),t.textAlign="center",t.textBaseline="middle",B.each(e.ticks,(function(a,l){(0!==l||n.reverse)&&(r=e.getDistanceFromCenterForValue(e.ticksAsNumbers[l]),n.showLabelBackdrop&&(o=t.measureText(a).width,t.fillStyle=n.backdropColor,t.fillRect(-o/2-n.backdropPaddingX,-r-i.size/2-n.backdropPaddingY,o+2*n.backdropPaddingX,i.size+2*n.backdropPaddingY)),t.fillStyle=s,t.fillText(a,0,-r))})),t.restore()}},_drawTitle:B.noop}),Wn=Yn;Vn._defaults=Wn;var qn=B._deprecated,Gn=B.options.resolve,Jn=B.valueOrDefault,Kn=Number.MIN_SAFE_INTEGER||-9007199254740991,Qn=Number.MAX_SAFE_INTEGER||9007199254740991,Xn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},$n=Object.keys(Xn);function Zn(e,t){return e-t}function er(e){return B.valueOrDefault(e.time.min,e.ticks.min)}function tr(e){return B.valueOrDefault(e.time.max,e.ticks.max)}function nr(e,t,n,r){var o=function(e,t,n){for(var r,o,a,i=0,s=e.length-1;i>=0&&i<=s;){if(o=e[(r=i+s>>1)-1]||null,a=e[r],!o)return{lo:null,hi:a};if(a[t]<n)i=r+1;else{if(!(o[t]>n))return{lo:o,hi:a};s=r-1}}return{lo:a,hi:null}}(e,t,n),a=o.lo?o.hi?o.lo:e[e.length-2]:e[0],i=o.lo?o.hi?o.hi:e[e.length-1]:e[1],s=i[t]-a[t],l=s?(n-a[t])/s:0,c=(i[r]-a[r])*l;return a[r]+c}function rr(e,t){var n=e._adapter,r=e.options.time,o=r.parser,a=o||r.format,i=t;return"function"==typeof o&&(i=o(i)),B.isFinite(i)||(i="string"==typeof a?n.parse(i,a):n.parse(i)),null!==i?+i:(o||"function"!=typeof a||(i=a(t),B.isFinite(i)||(i=n.parse(i))),i)}function or(e,t){if(B.isNullOrUndef(t))return null;var n=e.options.time,r=rr(e,e.getRightValue(t));return null===r||n.round&&(r=+e._adapter.startOf(r,n.round)),r}function ar(e,t,n,r){var o,a,i,s=$n.length;for(o=$n.indexOf(e);o<s-1;++o)if(i=(a=Xn[$n[o]]).steps?a.steps:Qn,a.common&&Math.ceil((n-t)/(i*a.size))<=r)return $n[o];return $n[s-1]}function ir(e,t,n){var r,o,a=[],i={},s=t.length;for(r=0;r<s;++r)i[o=t[r]]=r,a.push({value:o,major:!1});return 0!==s&&n?function(e,t,n,r){var o,a,i=e._adapter,s=+i.startOf(t[0].value,r),l=t[t.length-1].value;for(o=s;o<=l;o=+i.add(o,1,r))(a=n[o])>=0&&(t[a].major=!0);return t}(e,a,i,n):a}var sr=gn.extend({initialize:function(){this.mergeTicksOptions(),gn.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,n=t.time||(t.time={}),r=e._adapter=new en._date(t.adapters.date);return qn("time scale",n.format,"time.format","time.parser"),qn("time scale",n.min,"time.min","ticks.min"),qn("time scale",n.max,"time.max","ticks.max"),B.mergeIf(n.displayFormats,r.formats()),gn.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),gn.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e,t,n,r,o,a,i,s=this,l=s.chart,c=s._adapter,u=s.options,d=u.time.unit||"day",h=Qn,p=Kn,f=[],m=[],g=[],_=s._getLabels();for(e=0,n=_.length;e<n;++e)g.push(or(s,_[e]));for(e=0,n=(l.data.datasets||[]).length;e<n;++e)if(l.isDatasetVisible(e))if(o=l.data.datasets[e].data,B.isObject(o[0]))for(m[e]=[],t=0,r=o.length;t<r;++t)a=or(s,o[t]),f.push(a),m[e][t]=a;else m[e]=g.slice(0),i||(f=f.concat(g),i=!0);else m[e]=[];g.length&&(h=Math.min(h,g[0]),p=Math.max(p,g[g.length-1])),f.length&&(f=n>1?function(e){var t,n,r,o={},a=[];for(t=0,n=e.length;t<n;++t)o[r=e[t]]||(o[r]=!0,a.push(r));return a}(f).sort(Zn):f.sort(Zn),h=Math.min(h,f[0]),p=Math.max(p,f[f.length-1])),h=or(s,er(u))||h,p=or(s,tr(u))||p,h=h===Qn?+c.startOf(Date.now(),d):h,p=p===Kn?+c.endOf(Date.now(),d)+1:p,s.min=Math.min(h,p),s.max=Math.max(h+1,p),s._table=[],s._timestamps={data:f,datasets:m,labels:g}},buildTicks:function(){var e,t,n,r=this,o=r.min,a=r.max,i=r.options,s=i.ticks,l=i.time,c=r._timestamps,u=[],d=r.getLabelCapacity(o),h=s.source,p=i.distribution;for(c="data"===h||"auto"===h&&"series"===p?c.data:"labels"===h?c.labels:function(e,t,n,r){var o,a=e._adapter,i=e.options,s=i.time,l=s.unit||ar(s.minUnit,t,n,r),c=Gn([s.stepSize,s.unitStepSize,1]),u="week"===l&&s.isoWeekday,d=t,h=[];if(u&&(d=+a.startOf(d,"isoWeek",u)),d=+a.startOf(d,u?"day":l),a.diff(n,t,l)>1e5*c)throw t+" and "+n+" are too far apart with stepSize of "+c+" "+l;for(o=d;o<n;o=+a.add(o,c,l))h.push(o);return o!==n&&"ticks"!==i.bounds||h.push(o),h}(r,o,a,d),"ticks"===i.bounds&&c.length&&(o=c[0],a=c[c.length-1]),o=or(r,er(i))||o,a=or(r,tr(i))||a,e=0,t=c.length;e<t;++e)(n=c[e])>=o&&n<=a&&u.push(n);return r.min=o,r.max=a,r._unit=l.unit||(s.autoSkip?ar(l.minUnit,r.min,r.max,d):function(e,t,n,r,o){var a,i;for(a=$n.length-1;a>=$n.indexOf(n);a--)if(i=$n[a],Xn[i].common&&e._adapter.diff(o,r,i)>=t-1)return i;return $n[n?$n.indexOf(n):0]}(r,u.length,l.minUnit,r.min,r.max)),r._majorUnit=s.major.enabled&&"year"!==r._unit?function(e){for(var t=$n.indexOf(e)+1,n=$n.length;t<n;++t)if(Xn[$n[t]].common)return $n[t]}(r._unit):void 0,r._table=function(e,t,n,r){if("linear"===r||!e.length)return[{time:t,pos:0},{time:n,pos:1}];var o,a,i,s,l,c=[],u=[t];for(o=0,a=e.length;o<a;++o)(s=e[o])>t&&s<n&&u.push(s);for(u.push(n),o=0,a=u.length;o<a;++o)l=u[o+1],i=u[o-1],s=u[o],void 0!==i&&void 0!==l&&Math.round((l+i)/2)===s||c.push({time:s,pos:o/(a-1)});return c}(r._timestamps.data,o,a,p),r._offsets=function(e,t,n,r,o){var a,i,s=0,l=0;return o.offset&&t.length&&(a=nr(e,"time",t[0],"pos"),s=1===t.length?1-a:(nr(e,"time",t[1],"pos")-a)/2,i=nr(e,"time",t[t.length-1],"pos"),l=1===t.length?i:(i-nr(e,"time",t[t.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(r._table,u,0,0,i),s.reverse&&u.reverse(),ir(r,u,r._majorUnit)},getLabelForIndex:function(e,t){var n=this,r=n._adapter,o=n.chart.data,a=n.options.time,i=o.labels&&e<o.labels.length?o.labels[e]:"",s=o.datasets[t].data[e];return B.isObject(s)&&(i=n.getRightValue(s)),a.tooltipFormat?r.format(rr(n,i),a.tooltipFormat):"string"==typeof i?i:r.format(rr(n,i),a.displayFormats.datetime)},tickFormatFunction:function(e,t,n,r){var o=this._adapter,a=this.options,i=a.time.displayFormats,s=i[this._unit],l=this._majorUnit,c=i[l],u=n[t],d=a.ticks,h=l&&c&&u&&u.major,p=o.format(e,r||(h?c:s)),f=h?d.major:d.minor,m=Gn([f.callback,f.userCallback,d.callback,d.userCallback]);return m?m(p,t,n):p},convertTicksToLabels:function(e){var t,n,r=[];for(t=0,n=e.length;t<n;++t)r.push(this.tickFormatFunction(e[t].value,t,e));return r},getPixelForOffset:function(e){var t=this._offsets,n=nr(this._table,"time",e,"pos");return this.getPixelForDecimal((t.start+n)*t.factor)},getPixelForValue:function(e,t,n){var r=null;if(void 0!==t&&void 0!==n&&(r=this._timestamps.datasets[n][t]),null===r&&(r=or(this,e)),null!==r)return this.getPixelForOffset(r)},getPixelForTick:function(e){var t=this.getTicks();return e>=0&&e<t.length?this.getPixelForOffset(t[e].value):null},getValueForPixel:function(e){var t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end,r=nr(this._table,"pos",n,"time");return this._adapter._create(r)},_getLabelSize:function(e){var t=this.options.ticks,n=this.ctx.measureText(e).width,r=B.toRadians(this.isHorizontal()?t.maxRotation:t.minRotation),o=Math.cos(r),a=Math.sin(r),i=Jn(t.fontSize,Y.global.defaultFontSize);return{w:n*o+i*a,h:n*a+i*o}},getLabelWidth:function(e){return this._getLabelSize(e).w},getLabelCapacity:function(e){var t=this,n=t.options.time,r=n.displayFormats,o=r[n.unit]||r.millisecond,a=t.tickFormatFunction(e,0,ir(t,[e],t._majorUnit),o),i=t._getLabelSize(a),s=Math.floor(t.isHorizontal()?t.width/i.w:t.height/i.h);return t.options.offset&&s--,s>0?s:1}}),lr={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};sr._defaults=lr;var cr={category:vn,linear:Tn,logarithmic:On,radialLinear:Vn,time:sr},ur={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};en._date.override("function"==typeof e?{_id:"moment",formats:function(){return ur},parse:function(t,n){return"string"==typeof t&&"string"==typeof n?t=e(t,n):t instanceof e||(t=e(t)),t.isValid()?t.valueOf():null},format:function(t,n){return e(t).format(n)},add:function(t,n,r){return e(t).add(n,r).valueOf()},diff:function(t,n,r){return e(t).diff(e(n),r)},startOf:function(t,n,r){return t=e(t),"isoWeek"===n?t.isoWeekday(r).valueOf():t.startOf(n).valueOf()},endOf:function(t,n){return e(t).endOf(n).valueOf()},_create:function(t){return e(t)}}:{}),Y._set("global",{plugins:{filler:{propagate:!0}}});var dr={dataset:function(e){var t=e.fill,n=e.chart,r=n.getDatasetMeta(t),o=r&&n.isDatasetVisible(t)&&r.dataset._children||[],a=o.length||0;return a?function(e,t){return t<a&&o[t]._view||null}:null},boundary:function(e){var t=e.boundary,n=t?t.x:null,r=t?t.y:null;return B.isArray(t)?function(e,n){return t[n]}:function(e){return{x:null===n?e.x:n,y:null===r?e.y:r}}}};function hr(e,t,n){var r,o=e._model||{},a=o.fill;if(void 0===a&&(a=!!o.backgroundColor),!1===a||null===a)return!1;if(!0===a)return"origin";if(r=parseFloat(a,10),isFinite(r)&&Math.floor(r)===r)return"-"!==a[0]&&"+"!==a[0]||(r=t+r),!(r===t||r<0||r>=n)&&r;switch(a){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return a;default:return!1}}function pr(e){return(e.el._scale||{}).getPointPositionForValue?function(e){var t,n,r,o,a,i=e.el._scale,s=i.options,l=i.chart.data.labels.length,c=e.fill,u=[];if(!l)return null;for(t=s.ticks.reverse?i.max:i.min,n=s.ticks.reverse?i.min:i.max,r=i.getPointPositionForValue(0,t),o=0;o<l;++o)a="start"===c||"end"===c?i.getPointPositionForValue(o,"start"===c?t:n):i.getBasePosition(o),s.gridLines.circular&&(a.cx=r.x,a.cy=r.y,a.angle=i.getIndexAngle(o)-Math.PI/2),u.push(a);return u}(e):function(e){var t,n=e.el._model||{},r=e.el._scale||{},o=e.fill,a=null;if(isFinite(o))return null;if("start"===o?a=void 0===n.scaleBottom?r.bottom:n.scaleBottom:"end"===o?a=void 0===n.scaleTop?r.top:n.scaleTop:void 0!==n.scaleZero?a=n.scaleZero:r.getBasePixel&&(a=r.getBasePixel()),null!=a){if(void 0!==a.x&&void 0!==a.y)return a;if(B.isFinite(a))return{x:(t=r.isHorizontal())?a:null,y:t?null:a}}return null}(e)}function fr(e,t,n){var r,o=e[t].fill,a=[t];if(!n)return o;for(;!1!==o&&-1===a.indexOf(o);){if(!isFinite(o))return o;if(!(r=e[o]))return!1;if(r.visible)return o;a.push(o),o=r.fill}return!1}function mr(e){var t=e.fill,n="dataset";return!1===t?null:(isFinite(t)||(n="boundary"),dr[n](e))}function gr(e){return e&&!e.skip}function _r(e,t,n,r,o){var a,i,s,l;if(r&&o){for(e.moveTo(t[0].x,t[0].y),a=1;a<r;++a)B.canvas.lineTo(e,t[a-1],t[a]);if(void 0===n[0].angle)for(e.lineTo(n[o-1].x,n[o-1].y),a=o-1;a>0;--a)B.canvas.lineTo(e,n[a],n[a-1],!0);else for(i=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-i,2)+Math.pow(n[0].y-s,2)),a=o-1;a>0;--a)e.arc(i,s,l,n[a].angle,n[a-1].angle,!0)}}function vr(e,t,n,r,o,a){var i,s,l,c,u,d,h,p,f=t.length,m=r.spanGaps,g=[],_=[],v=0,b=0;for(e.beginPath(),i=0,s=f;i<s;++i)u=n(c=t[l=i%f]._view,l,r),d=gr(c),h=gr(u),a&&void 0===p&&d&&(s=f+(p=i+1)),d&&h?(v=g.push(c),b=_.push(u)):v&&b&&(m?(d&&g.push(c),h&&_.push(u)):(_r(e,g,_,v,b),v=b=0,g=[],_=[]));_r(e,g,_,v,b),e.closePath(),e.fillStyle=o,e.fill()}var br={id:"filler",afterDatasetsUpdate:function(e,t){var n,r,o,a,i=(e.data.datasets||[]).length,s=t.propagate,l=[];for(r=0;r<i;++r)a=null,(o=(n=e.getDatasetMeta(r)).dataset)&&o._model&&o instanceof ke.Line&&(a={visible:e.isDatasetVisible(r),fill:hr(o,r,i),chart:e,el:o}),n.$filler=a,l.push(a);for(r=0;r<i;++r)(a=l[r])&&(a.fill=fr(l,r,s),a.boundary=pr(a),a.mapper=mr(a))},beforeDatasetsDraw:function(e){var t,n,r,o,a,i,s,l=e._getSortedVisibleDatasetMetas(),c=e.ctx;for(n=l.length-1;n>=0;--n)(t=l[n].$filler)&&t.visible&&(o=(r=t.el)._view,a=r._children||[],i=t.mapper,s=o.backgroundColor||Y.global.defaultColor,i&&s&&a.length&&(B.canvas.clipArea(c,e.chartArea),vr(c,a,i,o,s,r._loop),B.canvas.unclipArea(c)))}},yr=B.rtl.getRtlAdapter,wr=B.noop,kr=B.valueOrDefault;function xr(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}Y._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var n=t.datasetIndex,r=this.chart,o=r.getDatasetMeta(n);o.hidden=null===o.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,n=e.options.legend||{},r=n.labels&&n.labels.usePointStyle;return e._getSortedDatasetMetas().map((function(n){var o=n.controller.getStyle(r?0:void 0);return{text:t[n.index].label,fillStyle:o.backgroundColor,hidden:!e.isDatasetVisible(n.index),lineCap:o.borderCapStyle,lineDash:o.borderDash,lineDashOffset:o.borderDashOffset,lineJoin:o.borderJoinStyle,lineWidth:o.borderWidth,strokeStyle:o.borderColor,pointStyle:o.pointStyle,rotation:o.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(e){var t,n,r,o=document.createElement("ul"),a=e.data.datasets;for(o.setAttribute("class",e.id+"-legend"),t=0,n=a.length;t<n;t++)(r=o.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[t].backgroundColor,a[t].label&&r.appendChild(document.createTextNode(a[t].label));return o.outerHTML}});var Mr=K.extend({initialize:function(e){B.extend(this,e),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:wr,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:wr,beforeSetDimensions:wr,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:wr,beforeBuildLabels:wr,buildLabels:function(){var e=this,t=e.options.labels||{},n=B.callback(t.generateLabels,[e.chart],e)||[];t.filter&&(n=n.filter((function(n){return t.filter(n,e.chart.data)}))),e.options.reverse&&n.reverse(),e.legendItems=n},afterBuildLabels:wr,beforeFit:wr,fit:function(){var e=this,t=e.options,n=t.labels,r=t.display,o=e.ctx,a=B.options._parseFont(n),i=a.size,s=e.legendHitBoxes=[],l=e.minSize,c=e.isHorizontal();if(c?(l.width=e.maxWidth,l.height=r?10:0):(l.width=r?10:0,l.height=e.maxHeight),r){if(o.font=a.string,c){var u=e.lineWidths=[0],d=0;o.textAlign="left",o.textBaseline="middle",B.each(e.legendItems,(function(e,t){var r=xr(n,i)+i/2+o.measureText(e.text).width;(0===t||u[u.length-1]+r+2*n.padding>l.width)&&(d+=i+n.padding,u[u.length-(t>0?0:1)]=0),s[t]={left:0,top:0,width:r,height:i},u[u.length-1]+=r+n.padding})),l.height+=d}else{var h=n.padding,p=e.columnWidths=[],f=e.columnHeights=[],m=n.padding,g=0,_=0;B.each(e.legendItems,(function(e,t){var r=xr(n,i)+i/2+o.measureText(e.text).width;t>0&&_+i+2*h>l.height&&(m+=g+n.padding,p.push(g),f.push(_),g=0,_=0),g=Math.max(g,r),_+=i+h,s[t]={left:0,top:0,width:r,height:i}})),m+=g,p.push(g),f.push(_),l.width+=m}e.width=l.width,e.height=l.height}else e.width=l.width=e.height=l.height=0},afterFit:wr,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,n=t.labels,r=Y.global,o=r.defaultColor,a=r.elements.line,i=e.height,s=e.columnHeights,l=e.width,c=e.lineWidths;if(t.display){var u,d=yr(t.rtl,e.left,e.minSize.width),h=e.ctx,p=kr(n.fontColor,r.defaultFontColor),f=B.options._parseFont(n),m=f.size;h.textAlign=d.textAlign("left"),h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=p,h.fillStyle=p,h.font=f.string;var g=xr(n,m),_=e.legendHitBoxes,v=function(e,r){switch(t.align){case"start":return n.padding;case"end":return e-r;default:return(e-r+n.padding)/2}},b=e.isHorizontal();u=b?{x:e.left+v(l,c[0]),y:e.top+n.padding,line:0}:{x:e.left+n.padding,y:e.top+v(i,s[0]),line:0},B.rtl.overrideTextDirection(e.ctx,t.textDirection);var y=m+n.padding;B.each(e.legendItems,(function(t,r){var p=h.measureText(t.text).width,f=g+m/2+p,w=u.x,k=u.y;d.setWidth(e.minSize.width),b?r>0&&w+f+n.padding>e.left+e.minSize.width&&(k=u.y+=y,u.line++,w=u.x=e.left+v(l,c[u.line])):r>0&&k+y>e.top+e.minSize.height&&(w=u.x=w+e.columnWidths[u.line]+n.padding,u.line++,k=u.y=e.top+v(i,s[u.line]));var x=d.x(w);!function(e,t,r){if(!(isNaN(g)||g<=0)){h.save();var i=kr(r.lineWidth,a.borderWidth);if(h.fillStyle=kr(r.fillStyle,o),h.lineCap=kr(r.lineCap,a.borderCapStyle),h.lineDashOffset=kr(r.lineDashOffset,a.borderDashOffset),h.lineJoin=kr(r.lineJoin,a.borderJoinStyle),h.lineWidth=i,h.strokeStyle=kr(r.strokeStyle,o),h.setLineDash&&h.setLineDash(kr(r.lineDash,a.borderDash)),n&&n.usePointStyle){var s=g*Math.SQRT2/2,l=d.xPlus(e,g/2),c=t+m/2;B.canvas.drawPoint(h,r.pointStyle,s,l,c,r.rotation)}else h.fillRect(d.leftForLtr(e,g),t,g,m),0!==i&&h.strokeRect(d.leftForLtr(e,g),t,g,m);h.restore()}}(x,k,t),_[r].left=d.leftForLtr(x,_[r].width),_[r].top=k,function(e,t,n,r){var o=m/2,a=d.xPlus(e,g+o),i=t+o;h.fillText(n.text,a,i),n.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(a,i),h.lineTo(d.xPlus(a,r),i),h.stroke())}(x,k,t,p),b?u.x+=f+n.padding:u.y+=y})),B.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var n,r,o,a=this;if(e>=a.left&&e<=a.right&&t>=a.top&&t<=a.bottom)for(o=a.legendHitBoxes,n=0;n<o.length;++n)if(e>=(r=o[n]).left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height)return a.legendItems[n];return null},handleEvent:function(e){var t,n=this,r=n.options,o="mouseup"===e.type?"click":e.type;if("mousemove"===o){if(!r.onHover&&!r.onLeave)return}else{if("click"!==o)return;if(!r.onClick)return}t=n._getLegendItemAt(e.x,e.y),"click"===o?t&&r.onClick&&r.onClick.call(n,e.native,t):(r.onLeave&&t!==n._hoveredItem&&(n._hoveredItem&&r.onLeave.call(n,e.native,n._hoveredItem),n._hoveredItem=t),r.onHover&&t&&r.onHover.call(n,e.native,t))}});function Er(e,t){var n=new Mr({ctx:e.ctx,options:t,chart:e});mt.configure(e,n,t),mt.addBox(e,n),e.legend=n}var Tr={id:"legend",_element:Mr,beforeInit:function(e){var t=e.options.legend;t&&Er(e,t)},beforeUpdate:function(e){var t=e.options.legend,n=e.legend;t?(B.mergeIf(t,Y.global.legend),n?(mt.configure(e,n,t),n.options=t):Er(e,t)):n&&(mt.removeBox(e,n),delete e.legend)},afterEvent:function(e,t){var n=e.legend;n&&n.handleEvent(t)}},Sr=B.noop;Y._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Dr=K.extend({initialize:function(e){B.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:Sr,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:Sr,beforeSetDimensions:Sr,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:Sr,beforeBuildLabels:Sr,buildLabels:Sr,afterBuildLabels:Sr,beforeFit:Sr,fit:function(){var e,t=this,n=t.options,r=t.minSize={},o=t.isHorizontal();n.display?(e=(B.isArray(n.text)?n.text.length:1)*B.options._parseFont(n).lineHeight+2*n.padding,t.width=r.width=o?t.maxWidth:e,t.height=r.height=o?e:t.maxHeight):t.width=r.width=t.height=r.height=0},afterFit:Sr,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,n=e.options;if(n.display){var r,o,a,i=B.options._parseFont(n),s=i.lineHeight,l=s/2+n.padding,c=0,u=e.top,d=e.left,h=e.bottom,p=e.right;t.fillStyle=B.valueOrDefault(n.fontColor,Y.global.defaultFontColor),t.font=i.string,e.isHorizontal()?(o=d+(p-d)/2,a=u+l,r=p-d):(o="left"===n.position?d+l:p-l,a=u+(h-u)/2,r=h-u,c=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(o,a),t.rotate(c),t.textAlign="center",t.textBaseline="middle";var f=n.text;if(B.isArray(f))for(var m=0,g=0;g<f.length;++g)t.fillText(f[g],0,m,r),m+=s;else t.fillText(f,0,0,r);t.restore()}}});function Lr(e,t){var n=new Dr({ctx:e.ctx,options:t,chart:e});mt.configure(e,n,t),mt.addBox(e,n),e.titleBlock=n}var Cr={},Pr=br,Or=Tr,Nr={id:"title",_element:Dr,beforeInit:function(e){var t=e.options.title;t&&Lr(e,t)},beforeUpdate:function(e){var t=e.options.title,n=e.titleBlock;t?(B.mergeIf(t,Y.global.title),n?(mt.configure(e,n,t),n.options=t):Lr(e,t)):n&&(mt.removeBox(e,n),delete e.titleBlock)}};for(var Ar in Cr.filler=Pr,Cr.legend=Or,Cr.title=Nr,Xt.helpers=B,function(){function e(e,t,n){var r;return"string"==typeof e?(r=parseInt(e,10),-1!==e.indexOf("%")&&(r=r/100*t.parentNode[n])):r=e,r}function t(e){return null!=e&&"none"!==e}function n(n,r,o){var a=document.defaultView,i=B._getParentNode(n),s=a.getComputedStyle(n)[r],l=a.getComputedStyle(i)[r],c=t(s),u=t(l),d=Number.POSITIVE_INFINITY;return c||u?Math.min(c?e(s,n,o):d,u?e(l,i,o):d):"none"}B.where=function(e,t){if(B.isArray(e)&&Array.prototype.filter)return e.filter(t);var n=[];return B.each(e,(function(e){t(e)&&n.push(e)})),n},B.findIndex=Array.prototype.findIndex?function(e,t,n){return e.findIndex(t,n)}:function(e,t,n){n=void 0===n?e:n;for(var r=0,o=e.length;r<o;++r)if(t.call(n,e[r],r,e))return r;return-1},B.findNextWhere=function(e,t,n){B.isNullOrUndef(n)&&(n=-1);for(var r=n+1;r<e.length;r++){var o=e[r];if(t(o))return o}},B.findPreviousWhere=function(e,t,n){B.isNullOrUndef(n)&&(n=e.length);for(var r=n-1;r>=0;r--){var o=e[r];if(t(o))return o}},B.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},B.almostEquals=function(e,t,n){return Math.abs(e-t)<n},B.almostWhole=function(e,t){var n=Math.round(e);return n-t<=e&&n+t>=e},B.max=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.max(e,t)}),Number.NEGATIVE_INFINITY)},B.min=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.min(e,t)}),Number.POSITIVE_INFINITY)},B.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0==(e=+e)||isNaN(e)?e:e>0?1:-1},B.toRadians=function(e){return e*(Math.PI/180)},B.toDegrees=function(e){return e*(180/Math.PI)},B._decimalPlaces=function(e){if(B.isFinite(e)){for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}},B.getAngleFromPoint=function(e,t){var n=t.x-e.x,r=t.y-e.y,o=Math.sqrt(n*n+r*r),a=Math.atan2(r,n);return a<-.5*Math.PI&&(a+=2*Math.PI),{angle:a,distance:o}},B.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},B.aliasPixel=function(e){return e%2==0?0:.5},B._alignPixel=function(e,t,n){var r=e.currentDevicePixelRatio,o=n/2;return Math.round((t-o)*r)/r+o},B.splineCurve=function(e,t,n,r){var o=e.skip?t:e,a=t,i=n.skip?t:n,s=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),l=Math.sqrt(Math.pow(i.x-a.x,2)+Math.pow(i.y-a.y,2)),c=s/(s+l),u=l/(s+l),d=r*(c=isNaN(c)?0:c),h=r*(u=isNaN(u)?0:u);return{previous:{x:a.x-d*(i.x-o.x),y:a.y-d*(i.y-o.y)},next:{x:a.x+h*(i.x-o.x),y:a.y+h*(i.y-o.y)}}},B.EPSILON=Number.EPSILON||1e-14,B.splineCurveMonotone=function(e){var t,n,r,o,a,i,s,l,c,u=(e||[]).map((function(e){return{model:e._model,deltaK:0,mK:0}})),d=u.length;for(t=0;t<d;++t)if(!(r=u[t]).model.skip){if(n=t>0?u[t-1]:null,(o=t<d-1?u[t+1]:null)&&!o.model.skip){var h=o.model.x-r.model.x;r.deltaK=0!==h?(o.model.y-r.model.y)/h:0}!n||n.model.skip?r.mK=r.deltaK:!o||o.model.skip?r.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(r.deltaK)?r.mK=0:r.mK=(n.deltaK+r.deltaK)/2}for(t=0;t<d-1;++t)r=u[t],o=u[t+1],r.model.skip||o.model.skip||(B.almostEquals(r.deltaK,0,this.EPSILON)?r.mK=o.mK=0:(a=r.mK/r.deltaK,i=o.mK/r.deltaK,(l=Math.pow(a,2)+Math.pow(i,2))<=9||(s=3/Math.sqrt(l),r.mK=a*s*r.deltaK,o.mK=i*s*r.deltaK)));for(t=0;t<d;++t)(r=u[t]).model.skip||(n=t>0?u[t-1]:null,o=t<d-1?u[t+1]:null,n&&!n.model.skip&&(c=(r.model.x-n.model.x)/3,r.model.controlPointPreviousX=r.model.x-c,r.model.controlPointPreviousY=r.model.y-c*r.mK),o&&!o.model.skip&&(c=(o.model.x-r.model.x)/3,r.model.controlPointNextX=r.model.x+c,r.model.controlPointNextY=r.model.y+c*r.mK))},B.nextItem=function(e,t,n){return n?t>=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},B.previousItem=function(e,t,n){return n?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},B.niceNum=function(e,t){var n=Math.floor(B.log10(e)),r=e/Math.pow(10,n);return(t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,n)},B.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},B.getRelativePosition=function(e,t){var n,r,o=e.originalEvent||e,a=e.target||e.srcElement,i=a.getBoundingClientRect(),s=o.touches;s&&s.length>0?(n=s[0].clientX,r=s[0].clientY):(n=o.clientX,r=o.clientY);var l=parseFloat(B.getStyle(a,"padding-left")),c=parseFloat(B.getStyle(a,"padding-top")),u=parseFloat(B.getStyle(a,"padding-right")),d=parseFloat(B.getStyle(a,"padding-bottom")),h=i.right-i.left-l-u,p=i.bottom-i.top-c-d;return{x:n=Math.round((n-i.left-l)/h*a.width/t.currentDevicePixelRatio),y:r=Math.round((r-i.top-c)/p*a.height/t.currentDevicePixelRatio)}},B.getConstraintWidth=function(e){return n(e,"max-width","clientWidth")},B.getConstraintHeight=function(e){return n(e,"max-height","clientHeight")},B._calculatePadding=function(e,t,n){return(t=B.getStyle(e,t)).indexOf("%")>-1?n*parseInt(t,10)/100:parseInt(t,10)},B._getParentNode=function(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},B.getMaximumWidth=function(e){var t=B._getParentNode(e);if(!t)return e.clientWidth;var n=t.clientWidth,r=n-B._calculatePadding(t,"padding-left",n)-B._calculatePadding(t,"padding-right",n),o=B.getConstraintWidth(e);return isNaN(o)?r:Math.min(r,o)},B.getMaximumHeight=function(e){var t=B._getParentNode(e);if(!t)return e.clientHeight;var n=t.clientHeight,r=n-B._calculatePadding(t,"padding-top",n)-B._calculatePadding(t,"padding-bottom",n),o=B.getConstraintHeight(e);return isNaN(o)?r:Math.min(r,o)},B.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},B.retinaScale=function(e,t){var n=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var r=e.canvas,o=e.height,a=e.width;r.height=o*n,r.width=a*n,e.ctx.scale(n,n),r.style.height||r.style.width||(r.style.height=o+"px",r.style.width=a+"px")}},B.fontString=function(e,t,n){return t+" "+e+"px "+n},B.longestText=function(e,t,n,r){var o=(r=r||{}).data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(o=r.data={},a=r.garbageCollect=[],r.font=t),e.font=t;var i,s,l,c,u,d=0,h=n.length;for(i=0;i<h;i++)if(null!=(c=n[i])&&!0!==B.isArray(c))d=B.measureText(e,o,a,d,c);else if(B.isArray(c))for(s=0,l=c.length;s<l;s++)null==(u=c[s])||B.isArray(u)||(d=B.measureText(e,o,a,d,u));var p=a.length/2;if(p>n.length){for(i=0;i<p;i++)delete o[a[i]];a.splice(0,p)}return d},B.measureText=function(e,t,n,r,o){var a=t[o];return a||(a=t[o]=e.measureText(o).width,n.push(o)),a>r&&(r=a),r},B.numberOfLabelLines=function(e){var t=1;return B.each(e,(function(e){B.isArray(e)&&e.length>t&&(t=e.length)})),t},B.color=w?function(e){return e instanceof CanvasGradient&&(e=Y.global.defaultColor),w(e)}:function(e){return console.error("Color.js not found!"),e},B.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:B.color(e).saturate(.5).darken(.1).rgbString()}}(),Xt._adapters=en,Xt.Animation=X,Xt.animationService=$,Xt.controllers=$e,Xt.DatasetController=re,Xt.defaults=Y,Xt.Element=K,Xt.elements=ke,Xt.Interaction=at,Xt.layouts=mt,Xt.platform=Lt,Xt.plugins=Ct,Xt.Scale=gn,Xt.scaleService=Pt,Xt.Ticks=tn,Xt.Tooltip=Bt,Xt.helpers.each(cr,(function(e,t){Xt.scaleService.registerScaleType(t,e,e._defaults)})),Cr)Cr.hasOwnProperty(Ar)&&Xt.plugins.register(Cr[Ar]);Xt.platform.initialize();var Ir=Xt;return"undefined"!=typeof window&&(window.Chart=Xt),Xt.Chart=Xt,Xt.Legend=Cr.legend._element,Xt.Title=Cr.title._element,Xt.pluginService=Xt.plugins,Xt.PluginBase=Xt.Element.extend({}),Xt.canvasHelpers=Xt.helpers.canvas,Xt.layoutService=Xt.layouts,Xt.LinearScaleBase=kn,Xt.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(e){Xt[e]=function(t,n){return new Xt(t,Xt.helpers.merge(n||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}})),Ir}(function(){try{return n(3)}catch(e){}}())},function(e,t,n){var r=n(66);e.exports=function(e,t){return r(e,t)}},function(e,t,n){var r=n(238),o=n(243),a=n(389),i=n(393),s=n(411),l=n(25),c=n(245),u=n(247),d="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,p,f,m){var g=l(e),_=l(t),v=g?"[object Array]":s(e),b=_?"[object Array]":s(t),y=(v="[object Arguments]"==v?d:v)==d,w=(b="[object Arguments]"==b?d:b)==d,k=v==b;if(k&&c(e)){if(!c(t))return!1;g=!0,y=!1}if(k&&!y)return m||(m=new r),g||u(e)?o(e,t,n,p,f,m):a(e,t,v,n,p,f,m);if(!(1&n)){var x=y&&h.call(e,"__wrapped__"),M=w&&h.call(t,"__wrapped__");if(x||M){var E=x?e.value():e,T=M?t.value():t;return m||(m=new r),f(E,T,n,p,m)}}return!!k&&(m||(m=new r),i(e,t,n,p,f,m))}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(46),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(46);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(46);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(46);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(45);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(45),o=n(67),a=n(69);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(240),o=n(369),a=n(68),i=n(242),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?h:s).test(i(e))}},function(e,t,n){var r=n(47),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[s]=n:delete e[s]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(370),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(373),o=n(45),a=n(67);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(374),o=n(375),a=n(376),i=n(377),s=n(378);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},function(e,t,n){var r=n(48);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(48),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(48),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(48);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(49);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(49);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(49);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(49);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(69),o=n(385),a=n(386);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=o,i.prototype.has=a,e.exports=i},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(47),o=n(390),a=n(239),i=n(243),s=n(391),l=n(392),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var f=1&r;if(p||(p=l),e.size!=t.size&&!f)return!1;var m=h.get(e);if(m)return m==t;r|=2,h.set(e,t);var g=i(p(e),p(t),r,c,d,h);return h.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},function(e,t,n){var r=n(24).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(394),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,i,s){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var d=u;d--;){var h=c[d];if(!(l?h in t:o.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var m=!0;s.set(e,t),s.set(t,e);for(var g=l;++d<u;){var _=e[h=c[d]],v=t[h];if(a)var b=l?a(v,_,h,t,e,s):a(_,v,h,e,t,s);if(!(void 0===b?_===v||i(_,v,n,a,s):b)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var y=e.constructor,w=t.constructor;y==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof w&&w instanceof w||(m=!1)}return s.delete(e),s.delete(t),m}},function(e,t,n){var r=n(395),o=n(397),a=n(70);e.exports=function(e){return r(e,a,o)}},function(e,t,n){var r=n(396),o=n(25);e.exports=function(e,t,n){var a=t(e);return o(e)?a:r(a,n(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(398),o=n(399),a=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(e){return null==e?[]:(e=Object(e),r(i(e),(function(t){return a.call(e,t)})))}:o;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(401),o=n(244),a=n(25),i=n(245),s=n(246),l=n(247),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),u=!n&&o(e),d=!n&&!u&&i(e),h=!n&&!u&&!d&&l(e),p=n||u||d||h,f=p?r(e.length,String):[],m=f.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||f.push(g);return f}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(38),o=n(39);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(38),o=n(71),a=n(39),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&o(e.length)&&!!i[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(241),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=s}).call(this,n(64)(e))},function(e,t,n){var r=n(408),o=n(409),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(410)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(412),o=n(67),a=n(413),i=n(414),s=n(415),l=n(38),c=n(242),u=c(r),d=c(o),h=c(a),p=c(i),f=c(s),m=l;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=m(new o)||a&&"[object Promise]"!=m(a.resolve())||i&&"[object Set]"!=m(new i)||s&&"[object WeakMap]"!=m(new s))&&(m=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case u:return"[object DataView]";case d:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case f:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){var r=n(27)(n(24),"DataView");e.exports=r},function(e,t,n){var r=n(27)(n(24),"Promise");e.exports=r},function(e,t,n){var r=n(27)(n(24),"Set");e.exports=r},function(e,t,n){var r=n(27)(n(24),"WeakMap");e.exports=r},function(e,t,n){var r=n(417),o=n(419)((function(e,t,n){r(e,n,t)}));e.exports=o},function(e,t,n){var r=n(418);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(27),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(420),o=n(421),a=n(427),i=n(25);e.exports=function(e,t){return function(n,s){var l=i(n)?r:o,c=t?t():{};return l(n,e,a(s,2),c)}}},function(e,t){e.exports=function(e,t,n,r){for(var o=-1,a=null==e?0:e.length;++o<a;){var i=e[o];t(r,i,n(i),e)}return r}},function(e,t,n){var r=n(422);e.exports=function(e,t,n,o){return r(e,(function(e,r,a){t(o,e,n(e),a)})),o}},function(e,t,n){var r=n(423),o=n(426)(r);e.exports=o},function(e,t,n){var r=n(424),o=n(70);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(425)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(!1===n(a[l],l,a))break}return t}}},function(e,t,n){var r=n(248);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var a=n.length,i=t?a:-1,s=Object(n);(t?i--:++i<a)&&!1!==o(s[i],i,s););return n}}},function(e,t,n){var r=n(428),o=n(431),a=n(442),i=n(25),s=n(443);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?i(e)?o(e[0],e[1]):r(e):s(e)}},function(e,t,n){var r=n(429),o=n(430),a=n(250);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(238),o=n(66);e.exports=function(e,t,n,a){var i=n.length,s=i,l=!a;if(null==e)return!s;for(e=Object(e);i--;){var c=n[i];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<s;){var u=(c=n[i])[0],d=e[u],h=c[1];if(l&&c[2]){if(void 0===d&&!(u in e))return!1}else{var p=new r;if(a)var f=a(d,h,u,e,t,p);if(!(void 0===f?o(h,d,3,a,p):f))return!1}}return!0}},function(e,t,n){var r=n(249),o=n(70);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var a=t[n],i=e[a];t[n]=[a,i,r(i)]}return t}},function(e,t,n){var r=n(66),o=n(432),a=n(439),i=n(72),s=n(249),l=n(250),c=n(50);e.exports=function(e,t){return i(e)&&s(t)?l(c(e),t):function(n){var i=o(n,e);return void 0===i&&i===t?a(n,e):r(t,i,3)}}},function(e,t,n){var r=n(251);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=n(434),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,i=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(a,"$1"):n||e)})),t}));e.exports=i},function(e,t,n){var r=n(435);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(69);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},function(e,t,n){var r=n(437);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(47),o=n(438),a=n(25),i=n(73),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return o(t,e)+"";if(i(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t,n){var r=n(440),o=n(441);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(252),o=n(244),a=n(25),i=n(246),s=n(71),l=n(50);e.exports=function(e,t,n){for(var c=-1,u=(t=r(t,e)).length,d=!1;++c<u;){var h=l(t[c]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++c!=u?d:!!(u=null==e?0:e.length)&&s(u)&&i(h,u)&&(a(e)||o(e))}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(444),o=n(445),a=n(72),i=n(50);e.exports=function(e){return a(e)?r(i(e)):o(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(251);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){!function(e){"use strict";var t,n,r=function(e){return e instanceof HTMLElement},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Object.assign({},e),o=[],a=[],i=function(){return Object.assign({},r)},s=function(){var e=[].concat(o);return o.length=0,e},l=function(){var e=[].concat(a);a.length=0,e.forEach((function(e){var t=e.type,n=e.data;c(t,n)}))},c=function(e,t,n){n?a.push({type:e,data:t}):(p[e]&&p[e](t),o.push({type:e,data:t}))},u=function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return h[e]?(t=h)[e].apply(t,r):null},d={getState:i,processActionQueue:s,processDispatchQueue:l,dispatch:c,query:u},h={};t.forEach((function(e){h=Object.assign({},e(r),h)}));var p={};return n.forEach((function(e){p=Object.assign({},e(c,u,r),p)})),d},a=function(e,t){for(var n in e)e.hasOwnProperty(n)&&t(n,e[n])},i=function(e){var t={};return a(e,(function(n){!function(e,t,n){"function"!=typeof n?Object.defineProperty(e,t,Object.assign({},n)):e[t]=n}(t,n,e[n])})),t},s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null===n)return e.getAttribute(t)||e.hasAttribute(t);e.setAttribute(t,n)},l="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},c=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},d="http://www.w3.org/2000/svg",h=["svg","path"],p=function(e){return h.includes(e)},f=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"===(void 0===t?"undefined":l(t))&&(n=t,t=null);var r=p(e)?document.createElementNS(d,e):document.createElement(e);return t&&(p(e)?s(r,"class",t):r.className=t),a(n,(function(e,t){s(r,e,t)})),r},m=function(e){return function(t,n){void 0!==n&&e.children[n]?e.insertBefore(t,e.children[n]):e.appendChild(t)}},g=function(e,t){return function(e,n){return void 0!==n?t.splice(n,0,e):t.push(e),e}},_=function(e,t){return function(n){return t.splice(t.indexOf(n),1),n.element.parentNode&&e.removeChild(n.element),n}},v=function(e,t,n,r){var o=n[0]||e.left,a=n[1]||e.top,i=o+e.width,s=a+e.height*(r[1]||1),l={element:Object.assign({},e),inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:o,top:a,right:i,bottom:s}};return t.filter((function(e){return!e.isRectIgnored()})).map((function(e){return e.rect})).forEach((function(e){b(l.inner,Object.assign({},e.inner)),b(l.outer,Object.assign({},e.outer))})),y(l.inner),l.outer.bottom+=l.element.marginBottom,l.outer.right+=l.element.marginRight,y(l.outer),l},b=function(e,t){t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},y=function(e){e.width=e.right-e.left,e.height=e.bottom-e.top},w=function(e){return"number"==typeof e},k=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.001;return Math.abs(e-t)<r&&Math.abs(n)<r},x=function(e){return e<.5?2*e*e:(4-2*e)*e-1},M={spring:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiffness,n=void 0===t?.5:t,r=e.damping,o=void 0===r?.75:r,a=e.mass,s=void 0===a?10:a,l=null,c=null,u=0,d=!1,h=function(){if(!d){if(!w(l)||!w(c))return d=!0,void(u=0);k(c+=u+=-(c-l)*n/s,l,u*=o)?(c=l,u=0,d=!0,f.onupdate(c),f.oncomplete(c)):f.onupdate(c)}},p=function(e){if(w(e)&&!w(c)&&(c=e),null===l&&(l=e,c=e),c===(l=e)||void 0===l)return d=!0,u=0,f.onupdate(c),void f.oncomplete(c);d=!1},f=i({interpolate:h,target:{set:p,get:function(){return l}},resting:{get:function(){return d}},onupdate:function(e){},oncomplete:function(e){}});return f},tween:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.duration,n=void 0===t?500:t,r=e.easing,o=void 0===r?x:r,a=e.delay,s=void 0===a?0:a,l=null,c=void 0,u=void 0,d=!0,h=!1,p=null,f=function(e){d||null===p||(null===l&&(l=e),e-l<s||((c=e-l-s)<n?(u=c/n,m.onupdate((c>=0?o(h?1-u:u):0)*p)):(c=1,u=h?0:1,m.onupdate(u*p),m.oncomplete(u*p),d=!0)))},m=i({interpolate:f,target:{get:function(){return h?0:p},set:function(e){if(null===p)return p=e,m.onupdate(e),void m.oncomplete(e);e<p?(p=1,h=!0):(h=!1,p=e),d=!1,l=null}},resting:{get:function(){return d}},onupdate:function(e){},oncomplete:function(e){}});return m}},E=function(e,t,n){var r=e[t]&&"object"===l(e[t][n])?e[t][n]:e[t]||e,o="string"==typeof r?r:r.type,a="object"===(void 0===r?"undefined":l(r))?Object.assign({},r):{};return M[o]?M[o](a):null},T=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];(t=Array.isArray(t)?t:[t]).forEach((function(t){e.forEach((function(e){var o=e,a=function(){return n[e]},i=function(t){return n[e]=t};"object"===(void 0===e?"undefined":l(e))&&(o=e.key,a=e.getter||a,i=e.setter||i),t[o]&&!r||(t[o]={get:a,set:i})}))}))},S=function(e){return null!=e},D={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},L=function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!0;for(var n in t)if(t[n]!==e[n])return!0;return!1},C=function(e,t){var n=t.opacity,r=t.perspective,o=t.translateX,a=t.translateY,i=t.scaleX,s=t.scaleY,l=t.rotateX,c=t.rotateY,u=t.rotateZ,d=t.originX,h=t.originY,p=t.width,f=t.height,m="",g="";(S(d)||S(h))&&(g+="transform-origin: "+(d||0)+"px "+(h||0)+"px;"),S(r)&&(m+="perspective("+r+"px) "),(S(o)||S(a))&&(m+="translate3d("+(o||0)+"px, "+(a||0)+"px, 0) "),(S(i)||S(s))&&(m+="scale3d("+(S(i)?i:1)+", "+(S(s)?s:1)+", 1) "),S(u)&&(m+="rotateZ("+u+"rad) "),S(l)&&(m+="rotateX("+l+"rad) "),S(c)&&(m+="rotateY("+c+"rad) "),m.length&&(g+="transform:"+m+";"),S(n)&&(g+="opacity:"+n+";",0===n&&(g+="visibility:hidden;"),n<1&&(g+="pointer-events:none;")),S(f)&&(g+="height:"+f+"px;"),S(p)&&(g+="width:"+p+"px;");var _=e.elementCurrentStyle||"";g.length===_.length&&g===_||(e.setAttribute("style",g),e.elementCurrentStyle=g)},P={styles:function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewInternalAPI,o=e.viewExternalAPI,a=e.view,i=Object.assign({},n),s={};T(t,[r,o],n);var l=function(){return a.rect?v(a.rect,a.childViews,[n.translateX||0,n.translateY||0],[n.scaleX||0,n.scaleY||0]):null};return r.rect={get:l},o.rect={get:l},t.forEach((function(e){n[e]=void 0===i[e]?D[e]:i[e]})),{write:function(){if(L(s,n))return C(a.element,n),Object.assign(s,Object.assign({},n)),!0},destroy:function(){}}},listeners:function(e){e.mixinConfig,e.viewProps,e.viewInternalAPI;var t,n=e.viewExternalAPI,r=(e.viewState,e.view),o=[],a=(t=r.element,function(e,n){t.addEventListener(e,n)}),i=function(e){return function(t,n){e.removeEventListener(t,n)}}(r.element);return n.on=function(e,t){o.push({type:e,fn:t}),a(e,t)},n.off=function(e,t){o.splice(o.findIndex((function(n){return n.type===e&&n.fn===t})),1),i(e,t)},{write:function(){return!0},destroy:function(){o.forEach((function(e){i(e.type,e.fn)}))}}},animations:function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewInternalAPI,o=e.viewExternalAPI,i=Object.assign({},n),s=[];return a(t,(function(e,t){var a=E(t);a&&(a.onupdate=function(t){n[e]=t},a.target=i[e],T([{key:e,setter:function(e){a.target!==e&&(a.target=e)},getter:function(){return n[e]}}],[r,o],n,!0),s.push(a))})),{write:function(e){var t=!0;return s.forEach((function(n){n.resting||(t=!1),n.interpolate(e)})),t},destroy:function(){}}},apis:function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewExternalAPI;T(t,r,n)}},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.layoutCalculated||(e.paddingTop=parseInt(n.paddingTop,10)||0,e.marginTop=parseInt(n.marginTop,10)||0,e.marginRight=parseInt(n.marginRight,10)||0,e.marginBottom=parseInt(n.marginBottom,10)||0,e.marginLeft=parseInt(n.marginLeft,10)||0,t.layoutCalculated=!0),e.left=t.offsetLeft||0,e.top=t.offsetTop||0,e.width=t.offsetWidth||0,e.height=t.offsetHeight||0,e.right=e.left+e.width,e.bottom=e.top+e.height,e.scrollTop=t.scrollTop,e.hidden=null===t.offsetParent,e},N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tag,n=void 0===t?"div":t,r=e.name,o=void 0===r?null:r,a=e.attributes,s=void 0===a?{}:a,l=e.read,c=void 0===l?function(){}:l,u=e.write,d=void 0===u?function(){}:u,h=e.create,p=void 0===h?function(){}:h,b=e.destroy,y=void 0===b?function(){}:b,w=e.filterFrameActionsForChild,k=void 0===w?function(e,t){return t}:w,x=e.didCreateView,M=void 0===x?function(){}:x,E=e.didWriteView,T=void 0===E?function(){}:E,S=e.ignoreRect,D=void 0!==S&&S,L=e.ignoreRectUpdate,C=void 0!==L&&L,N=e.mixins,A=void 0===N?[]:N;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=f(n,"filepond--"+o,s),a=window.getComputedStyle(r,null),l=O(),u=null,h=!1,b=[],w=[],x={},E={},S=[d],L=[c],N=[y],I=function(){return r},R=function(){return[].concat(b)},Y=function(){return x},j=function(e){return function(t,n){return t(e,n)}},F=function(){return u||(u=v(l,b,[0,0],[1,1]))},H=function(){return a},z=function(){u=null,b.forEach((function(e){return e._read()})),!(C&&l.width&&l.height)&&O(l,r,a);var e={root:J,props:t,rect:l};L.forEach((function(t){return t(e)}))},B=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=0===n.length;return S.forEach((function(o){!1===o({props:t,root:J,actions:n,timestamp:e})&&(r=!1)})),w.forEach((function(t){!1===t.write(e)&&(r=!1)})),b.filter((function(e){return!!e.element.parentNode})).forEach((function(t){t._write(e,k(t,n))||(r=!1)})),b.forEach((function(t,o){t.element.parentNode||(J.appendChild(t.element,o),t._read(),t._write(e,k(t,n)),r=!1)})),h=r,T({props:t,root:J,actions:n,timestamp:e}),r},U=function(){w.forEach((function(e){return e.destroy()})),N.forEach((function(e){e({root:J,props:t})})),b.forEach((function(e){return e._destroy()}))},V={element:{get:I},style:{get:H},childViews:{get:R}},W=Object.assign({},V,{rect:{get:F},ref:{get:Y},is:function(e){return o===e},appendChild:m(r),createChildView:j(e),linkView:function(e){return b.push(e),e},unlinkView:function(e){b.splice(b.indexOf(e),1)},appendChildView:g(0,b),removeChildView:_(r,b),registerWriter:function(e){return S.push(e)},registerReader:function(e){return L.push(e)},registerDestroyer:function(e){return N.push(e)},invalidateLayout:function(){return r.layoutCalculated=!1},dispatch:e.dispatch,query:e.query}),q={element:{get:I},childViews:{get:R},rect:{get:F},resting:{get:function(){return h}},isRectIgnored:function(){return D},_read:z,_write:B,_destroy:U},G=Object.assign({},V,{rect:{get:function(){return l}}});Object.keys(A).sort((function(e,t){return"styles"===e?1:"styles"===t?-1:0})).forEach((function(e){var n=P[e]({mixinConfig:A[e],viewProps:t,viewState:E,viewInternalAPI:W,viewExternalAPI:q,view:i(G)});n&&w.push(n)}));var J=i(W);p({root:J,props:t});var K=r.children.length;return b.forEach((function(e,t){J.appendChild(e.element,K+t)})),M(J),i(q)}},A=function(e,t){return function(n){var r=n.root,o=n.props,a=n.actions,i=void 0===a?[]:a,s=n.timestamp;i.filter((function(t){return e[t.type]})).forEach((function(t){return e[t.type]({root:r,props:o,action:t.data,timestamp:s})})),t&&t({root:r,props:o,actions:i,timestamp:s})}},I=function(e,t){return t.parentNode.insertBefore(e,t)},R=function(e,t){return t.parentNode.insertBefore(e,t.nextSibling)},Y=function(e){return Array.isArray(e)},j=function(e){return null==e},F=function(e){return e.trim()},H=function(e){return""+e},z=function(e){return"boolean"==typeof e},B=function(e){return z(e)?e:"true"===e},U=function(e){return"string"==typeof e},V=function(e){return w(e)?e:U(e)?H(e).replace(/[a-z]+/gi,""):0},W=function(e){return parseInt(V(e),10)},q=function(e){return w(e)&&isFinite(e)&&Math.floor(e)===e},G=function(e){if(q(e))return e;var t=H(e).trim();return/MB$/i.test(t)?(t=t.replace(/MB$i/,"").trim(),1e3*W(t)*1e3):/KB/i.test(t)?(t=t.replace(/KB$i/,"").trim(),1e3*W(t)):W(t)},J=function(e){return"function"==typeof e},K={process:"POST",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},Q=function(e,t,n,r){if(null===t)return null;if("function"==typeof t)return t;var o={url:"GET"===n?"?"+e+"=":"",method:n,headers:{},withCredentials:!1,timeout:r,onload:null,ondata:null,onerror:null};if(U(t))return o.url=t,o;if(Object.assign(o,t),U(o.headers)){var a=o.headers.split(/:(.+)/);o.headers={header:a[0],value:a[1]}}return o.withCredentials=B(o.withCredentials),o},X=function(e){return"object"===(void 0===e?"undefined":l(e))&&null!==e},$=function(e){return Y(e)?"array":function(e){return null===e}(e)?"null":q(e)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(e)?"bytes":function(e){return X(e)&&U(e.url)&&X(e.process)&&X(e.revert)&&X(e.restore)&&X(e.fetch)}(e)?"api":void 0===e?"undefined":l(e)},Z={array:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return j(e)?[]:Y(e)?e:H(e).split(t).map(F).filter((function(e){return e.length}))},boolean:B,int:function(e){return"bytes"===$(e)?G(e):W(e)},float:function(e){return parseFloat(V(e))},bytes:G,string:function(e){return J(e)?e:H(e)},serverapi:function(e){return(n={}).url=U(t=e)?t:t.url||"",n.timeout=t.timeout?parseInt(t.timeout,10):0,a(K,(function(e){n[e]=Q(e,t[e],K[e],n.timeout)})),n.remove=t.remove||null,n;var t,n},object:function(e){try{return JSON.parse(e.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",'))}catch(e){return null}},function:function(e){return function(e){for(var t=self,n=e.split("."),r=null;r=n.shift();)if(!(t=t[r]))return null;return t}(e)}},ee=function(e,t,n){if(e===t)return e;var r,o=$(e);if(o!==n){var a=(r=e,Z[n](r));if(o=$(a),null===a)throw'Trying to assign value with incorrect type to "'+option+'", allowed type: "'+n+'"';e=a}return e},te=function(e){var t={};return a(e,(function(n){var r,o,a,i=e[n];t[n]=(r=i[0],o=i[1],a=r,{enumerable:!0,get:function(){return a},set:function(e){a=ee(e,r,o)}})})),i(t)},ne=function(e){return{items:[],listUpdateTimeout:null,processingQueue:[],options:te(e)}},re=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.split(/(?=[A-Z])/).map((function(e){return e.toLowerCase()})).join(t)},oe=function(e,t){var n={};return a(t,(function(t){n[t]={get:function(){return e.getState().options[t]},set:function(n){e.dispatch("SET_"+re(t,"_").toUpperCase(),{value:n})}}})),n},ae=function(e){return function(t,n,r){var o={};return a(e,(function(e){var n=re(e,"_").toUpperCase();o["SET_"+n]=function(o){try{r.options[e]=o.value}catch(e){}t("DID_SET_"+n,{value:r.options[e]})}})),o}},ie=function(e){return function(t){var n={};return a(e,(function(e){n["GET_"+re(e,"_").toUpperCase()]=function(n){return t.options[e]}})),n}},se=1,le=2,ce=3,ue=4,de=5,he=function(){return Math.random().toString(36).substr(2,9)},pe=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:75;return e.map((function(e,r){return new Promise((function(o,a){setTimeout((function(){t(e),o()}),n*r)}))}))},fe=function(e,t){return e.splice(t,1)},me=function(){var e=[],t=function(t,n){fe(e,e.findIndex((function(e){return e.event===t&&(e.cb===n||!n)})))};return{fire:function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.filter((function(e){return e.event===t})).map((function(e){return e.cb})).forEach((function(e){setTimeout((function(){e.apply(void 0,r)}),0)}))},on:function(t,n){e.push({event:t,cb:n})},onOnce:function(n,r){e.push({event:n,cb:function(){t(n,r),r.apply(void 0,arguments)}})},off:t}},ge=function(e,t,n){Object.getOwnPropertyNames(e).filter((function(e){return!n.includes(e)})).forEach((function(n){return Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))},_e=["fire","process","revert","load","on","off","onOnce","retryLoad","extend","archive","archived","release","released","requestProcessing"],ve=function(e){var t={};return ge(e,t,_e),t},be=function(e){e.forEach((function(t,n){t.released&&fe(e,n)}))},ye=function(e){return/[^0-9]+/.exec(e)},we=function(){return ye(1.1.toLocaleString())[0]},ke={BOOLEAN:"boolean",INT:"int",STRING:"string",ARRAY:"array",OBJECT:"object",FUNCTION:"function",ACTION:"action",SERVER_API:"serverapi",REGEX:"regex"},xe=[],Me=function(e,t,n){return new Promise((function(r,o){var a=xe.filter((function(t){return t.key===e})).map((function(e){return e.cb}));if(0!==a.length){var i=a.shift();a.reduce((function(e,t){return e.then((function(e){return t(e,n)}))}),i(t,n)).then((function(e){return r(e)})).catch((function(e){return o(e)}))}else r(t)}))},Ee=function(e,t,n){return xe.filter((function(t){return t.key===e})).map((function(e){return e.cb(t,n)}))},Te=function(e,t){return xe.push({key:e,cb:t})},Se=function(){return Object.assign({},De)},De={id:[null,ke.STRING],name:["filepond",ke.STRING],className:[null,ke.STRING],required:[!1,ke.BOOLEAN],captureMethod:[null,ke.STRING],allowDrop:[!0,ke.BOOLEAN],allowBrowse:[!0,ke.BOOLEAN],allowPaste:[!0,ke.BOOLEAN],allowMultiple:[!1,ke.BOOLEAN],allowReplace:[!0,ke.BOOLEAN],allowRevert:[!0,ke.BOOLEAN],forceRevert:[!1,ke.BOOLEAN],maxFiles:[null,ke.INT],checkValidity:[!1,ke.BOOLEAN],dropOnPage:[!1,ke.BOOLEAN],dropOnElement:[!0,ke.BOOLEAN],dropValidation:[!1,ke.BOOLEAN],ignoredFiles:[[".ds_store","thumbs.db","desktop.ini"],ke.ARRAY],instantUpload:[!0,ke.BOOLEAN],maxParallelUploads:[2,ke.INT],server:[null,ke.SERVER_API],labelDecimalSeparator:[we(),ke.STRING],labelThousandsSeparator:[(t=we(),n=1e3.toLocaleString(),n!==1e3.toString()?ye(n)[0]:"."===t?",":"."),ke.STRING],labelIdle:['Drag & Drop your files or <span class="filepond--label-action">Browse</span>',ke.STRING],labelInvalidField:["Field contains invalid files",ke.STRING],labelFileWaitingForSize:["Waiting for size",ke.STRING],labelFileSizeNotAvailable:["Size not available",ke.STRING],labelFileCountSingular:["file in list",ke.STRING],labelFileCountPlural:["files in list",ke.STRING],labelFileLoading:["Loading",ke.STRING],labelFileAdded:["Added",ke.STRING],labelFileLoadError:["Error during load",ke.STRING],labelFileRemoved:["Removed",ke.STRING],labelFileRemoveError:["Error during remove",ke.STRING],labelFileProcessing:["Uploading",ke.STRING],labelFileProcessingComplete:["Upload complete",ke.STRING],labelFileProcessingAborted:["Upload cancelled",ke.STRING],labelFileProcessingError:["Error during upload",ke.STRING],labelFileProcessingRevertError:["Error during revert",ke.STRING],labelTapToCancel:["tap to cancel",ke.STRING],labelTapToRetry:["tap to retry",ke.STRING],labelTapToUndo:["tap to undo",ke.STRING],labelButtonRemoveItem:["Remove",ke.STRING],labelButtonAbortItemLoad:["Abort",ke.STRING],labelButtonRetryItemLoad:["Retry",ke.STRING],labelButtonAbortItemProcessing:["Cancel",ke.STRING],labelButtonUndoItemProcessing:["Undo",ke.STRING],labelButtonRetryItemProcessing:["Retry",ke.STRING],labelButtonProcessItem:["Upload",ke.STRING],iconRemove:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M11.586 13l-2.293 2.293a1 1 0 0 0 1.414 1.414L13 14.414l2.293 2.293a1 1 0 0 0 1.414-1.414L14.414 13l2.293-2.293a1 1 0 0 0-1.414-1.414L13 11.586l-2.293-2.293a1 1 0 0 0-1.414 1.414L11.586 13z" fill="currentColor" fill-rule="nonzero"/></svg>',ke.STRING],iconProcess:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M14 10.414v3.585a1 1 0 0 1-2 0v-3.585l-1.293 1.293a1 1 0 0 1-1.414-1.415l3-3a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1-1.414 1.415L14 10.414zM9 18a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2H9z" fill="currentColor" fill-rule="evenodd"/></svg>',ke.STRING],iconRetry:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M10.81 9.185l-.038.02A4.997 4.997 0 0 0 8 13.683a5 5 0 0 0 5 5 5 5 0 0 0 5-5 1 1 0 0 1 2 0A7 7 0 1 1 9.722 7.496l-.842-.21a.999.999 0 1 1 .484-1.94l3.23.806c.535.133.86.675.73 1.21l-.804 3.233a.997.997 0 0 1-1.21.73.997.997 0 0 1-.73-1.21l.23-.928v-.002z" fill="currentColor" fill-rule="nonzero"/></svg>',ke.STRING],iconUndo:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M9.185 10.81l.02-.038A4.997 4.997 0 0 1 13.683 8a5 5 0 0 1 5 5 5 5 0 0 1-5 5 1 1 0 0 0 0 2A7 7 0 1 0 7.496 9.722l-.21-.842a.999.999 0 1 0-1.94.484l.806 3.23c.133.535.675.86 1.21.73l3.233-.803a.997.997 0 0 0 .73-1.21.997.997 0 0 0-1.21-.73l-.928.23-.002-.001z" fill="currentColor" fill-rule="nonzero"/></svg>',ke.STRING],iconDone:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M18.293 9.293a1 1 0 0 1 1.414 1.414l-7.002 7a1 1 0 0 1-1.414 0l-3.998-4a1 1 0 1 1 1.414-1.414L12 15.586l6.294-6.293z" fill="currentColor" fill-rule="nonzero"/></svg>',ke.STRING],oninit:[null,ke.FUNCTION],onwarning:[null,ke.FUNCTION],onerror:[null,ke.FUNCTION],onaddfilestart:[null,ke.FUNCTION],onaddfileprogress:[null,ke.FUNCTION],onaddfile:[null,ke.FUNCTION],onprocessfilestart:[null,ke.FUNCTION],onprocessfileprogress:[null,ke.FUNCTION],onprocessfileabort:[null,ke.FUNCTION],onprocessfilerevert:[null,ke.FUNCTION],onprocessfile:[null,ke.FUNCTION],onremovefile:[null,ke.FUNCTION],onpreparefile:[null,ke.FUNCTION],onupdatefiles:[null,ke.FUNCTION],beforeAddFile:[null,ke.FUNCTION],beforeRemoveFile:[null,ke.FUNCTION],stylePanelLayout:[null,ke.STRING],stylePanelAspectRatio:[null,ke.STRING],styleButtonRemoveItemPosition:["left",ke.STRING],styleButtonProcessItemPosition:["right",ke.STRING],styleLoadIndicatorPosition:["right",ke.STRING],styleProgressIndicatorPosition:["right",ke.STRING],files:[[],ke.ARRAY]},Le=function(e,t){return j(t)?e[0]||null:q(t)?e[t]||null:("object"===(void 0===t?"undefined":l(t))&&(t=t.id),e.find((function(e){return e.id===t}))||null)},Ce=function(e){if(j(e))return e;if(/:/.test(e)){var t=e.split(":"),n=c(t,2),r=n[0];return n[1]/r}return parseFloat(e)},Pe=function(e){return e.filter((function(e){return!e.archived}))},Oe=function(e){return{GET_ITEM:function(t){return Le(e.items,t)},GET_ACTIVE_ITEM:function(t){return Le(Pe(e.items),t)},GET_ACTIVE_ITEMS:function(t){return Pe(e.items)},GET_ITEMS:function(t){return e.items},GET_ITEM_NAME:function(t){var n=Le(e.items,t);return n?n.filename:null},GET_ITEM_SIZE:function(t){var n=Le(e.items,t);return n?n.fileSize:null},GET_STYLES:function(){return Object.keys(e.options).filter((function(e){return/^style/.test(e)})).map((function(t){return{name:t,value:e.options[t]}}))},GET_PANEL_ASPECT_RATIO:function(){return/circle/.test(e.options.stylePanelLayout)?1:Ce(e.options.stylePanelAspectRatio)},GET_ITEMS_BY_STATUS:function(t){return Pe(e.items).filter((function(e){return e.status===t}))},GET_TOTAL_ITEMS:function(){return Pe(e.items).length},IS_ASYNC:function(){return X(e.options.server)&&(X(e.options.server.process)||J(e.options.server.process))}}},Ne=function(e,t,n){return j(t)?null:void 0===n?(e.push(t),t):(r=n,o=0,a=e.length,function(e,t,n){e.splice(t,0,n)}(e,n=Math.max(Math.min(a,r),o),t),t);var r,o,a},Ae=function(e){return/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(e)},Ie=function(e){return e.split("/").pop().split("?").shift()},Re=function(e){return e.split(".").pop()},Ye=function(e){if("string"!=typeof e)return"";var t=e.split("/").pop();return/svg/.test(t)?"svg":/zip|compressed/.test(t)?"zip":/plain/.test(t)?"txt":/msword/.test(t)?"doc":/[a-z]+/.test(t)?"jpeg"===t?"jpg":t:""},je=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(t+e).slice(-t.length)},Fe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return e.getFullYear()+"-"+je(e.getMonth()+1,"00")+"-"+je(e.getDate(),"00")+"_"+je(e.getHours(),"00")+"-"+je(e.getMinutes(),"00")+"-"+je(e.getSeconds(),"00")},He=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o="string"==typeof n?e.slice(0,e.size,n):e.slice(0,e.size,e.type);return o.lastModifiedDate=new Date,U(t)||(t=Fe()),t&&null===r&&Re(t)?o.name=t:(r=r||Ye(o.type),o.name=t+(r?"."+r:"")),o},ze=function(e,t){var n=window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(n){var r=new n;return r.append(e),r.getBlob(t)}return new Blob([e],{type:t})},Be=function(e){return(/^data:(.+);/.exec(e)||[])[1]||null},Ue=function(e){var t=Be(e);return function(e,t){for(var n=new ArrayBuffer(e.length),r=new Uint8Array(n),o=0;o<e.length;o++)r[o]=e.charCodeAt(o);return ze(n,t)}(function(e){return atob(function(e){return e.split(",")[1].replace(/\s/g,"")}(e))}(e),t)},Ve=function(e){var t=e.match(/(?:filename="(.+)")|(?:filename=(.+))/)||[];return t[1]||t[2]},We=function(e){if(/content-length:/i.test(e)){var t=e.match(/[0-9]+/)[0];return t?parseInt(t,10):null}return null},qe=function(e){return/x-content-transfer-id:/i.test(e)&&(e.split(":")[1]||"").trim()||null},Ge=function(e){var t={source:null,name:null,size:null},n=e.split("\n"),r=!0,o=!1,a=void 0;try{for(var i,s=n[Symbol.iterator]();!(r=(i=s.next()).done);r=!0){var l=i.value,c=Ve(l);if(c)t.name=c;else{var u=We(l);if(u)t.size=u;else{var d=qe(l);d&&(t.source=d)}}}}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return t},Je=function(e){var t={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},n=function(n){e?(t.timestamp=Date.now(),t.request=e(n,(function(e){t.duration=Date.now()-t.timestamp,t.complete=!0,e instanceof Blob&&(e=He(e,Ie(n))),r.fire("load",e instanceof Blob?e:e.body)}),(function(e){r.fire("error","string"==typeof e?{type:"error",code:0,body:e}:e)}),(function(e,n,o){o&&(t.size=o),t.duration=Date.now()-t.timestamp,e?(t.progress=n/o,r.fire("progress",t.progress)):t.progress=null}),(function(){r.fire("abort")}),(function(e){var n=Ge("string"==typeof e?e:e.headers);r.fire("meta",{size:t.size||n.size,filename:n.name,source:n.source})}))):r.fire("error",{type:"error",body:"Can't load URL",code:400})},r=Object.assign({},me(),{setSource:function(e){return t.source=e},getProgress:function(){return t.progress},abort:function(){t.request&&t.request.abort()},load:function(){var e,o,a=t.source;r.fire("init",a),a instanceof File?r.fire("load",a):a instanceof Blob?r.fire("load",He(a,a.name)):Ae(a)?r.fire("load",He(Ue(a),e,null,o)):n(a)}});return r},Ke=function(e){return/GET|HEAD/.test(e)},Qe=function(e,t,n){var r={onheaders:function(){},onprogress:function(){},onload:function(){},ontimeout:function(){},onerror:function(){},onabort:function(){},abort:function(){o=!0,i.abort()}},o=!1,a=!1;n=Object.assign({method:"POST",headers:{},withCredentials:!1},n),t=encodeURI(t),Ke(n.method)&&e&&(t=""+t+encodeURIComponent("string"==typeof e?e:JSON.stringify(e)));var i=new XMLHttpRequest;return(Ke(n.method)?i:i.upload).onprogress=function(e){o||r.onprogress(e.lengthComputable,e.loaded,e.total)},i.onreadystatechange=function(){i.readyState<2||4===i.readyState&&0===i.status||a||(a=!0,r.onheaders(i))},i.onload=function(){i.status>=200&&i.status<300?r.onload(i):r.onerror(i)},i.onerror=function(){return r.onerror(i)},i.onabort=function(){o=!0,r.onabort()},i.ontimeout=function(){return r.ontimeout(i)},i.open(n.method,t,!0),q(n.timeout)&&(i.timeout=n.timeout),Object.keys(n.headers).forEach((function(e){i.setRequestHeader(e,n.headers[e])})),n.responseType&&(i.responseType=n.responseType),n.withCredentials&&(i.withCredentials=!0),i.send(e),r},Xe=function(e,t,n,r){return{type:e,code:t,body:n,headers:r}},$e=function(e){return function(t){e(Xe("error",0,"Timeout",t.getAllResponseHeaders()))}},Ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments[1];if("function"==typeof t)return t;if(!t||!U(t.url))return null;var n=t.onload||function(e){return e},r=t.onerror||function(e){return null};return function(o,a,i,s,l,c){var u=Qe(o,e+t.url,Object.assign({},t,{responseType:"blob"}));return u.onload=function(e){var t=e.getAllResponseHeaders(),r=Ge(t).name||Ie(o);a(Xe("load",e.status,He(n(e.response),r),t))},u.onerror=function(e){i(Xe("error",e.status,r(e.response)||e.statusText,e.getAllResponseHeaders()))},u.onheaders=function(e){c(Xe("headers",e.status,null,e.getAllResponseHeaders()))},u.ontimeout=$e(i),u.onprogress=s,u.onabort=l,u}},et=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments[1];if("function"==typeof t)return t;if(!t||!U(t.url))return function(e,t){return t()};var n=t.onload||function(e){return e},r=t.onerror||function(e){return null};return function(o,a,i){var s=Qe(o,e+t.url,t);return s.onload=function(e){a(Xe("load",e.status,n(e.response),e.getAllResponseHeaders()))},s.onerror=function(e){i(Xe("error",e.status,r(e.response)||e.statusText,e.getAllResponseHeaders()))},s.ontimeout=$e(i),s}},tt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e+Math.random()*(t-e)},nt=function(e){var t={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},n=function(){t.request&&(t.perceivedPerformanceUpdater.clear(),t.request.abort(),t.complete=!0)},r=Object.assign({},me(),{process:function(n,o){var a=function(){0!==t.duration&&null!==t.progress&&r.fire("progress",r.getProgress())},i=function(){t.complete=!0,r.fire("load-perceived",t.response.body)};r.fire("start"),t.timestamp=Date.now(),t.perceivedPerformanceUpdater=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:25,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,o=null,a=Date.now(),i=function i(){var s=Date.now()-a,l=tt(n,r);s+l>t&&(l=s+l-t);var c=s/t;c>=1?e(1):(e(c),o=setTimeout(i,l))};return i(),{clear:function(){clearTimeout(o)}}}((function(e){t.perceivedProgress=e,t.perceivedDuration=Date.now()-t.timestamp,a(),t.response&&1===t.perceivedProgress&&!t.complete&&i()}),tt(750,1500)),t.request=e(n,o,(function(e){t.response=X(e)?e:{type:"load",code:200,body:""+e,headers:{}},t.duration=Date.now()-t.timestamp,t.progress=1,r.fire("load",t.response.body),1===t.perceivedProgress&&i()}),(function(e){t.perceivedPerformanceUpdater.clear(),r.fire("error",X(e)?e:{type:"error",code:0,body:""+e})}),(function(e,n,r){t.duration=Date.now()-t.timestamp,t.progress=e?n/r:null,a()}),(function(){t.perceivedPerformanceUpdater.clear(),r.fire("abort",t.response?t.response.body:null)}))},abort:n,getProgress:function(){return t.progress?Math.min(t.progress,t.perceivedProgress):null},getDuration:function(){return Math.min(t.duration,t.perceivedDuration)},reset:function(){n(),t.complete=!1,t.perceivedProgress=0,t.progress=0,t.timestamp=null,t.perceivedDuration=0,t.duration=0,t.request=null,t.response=null}});return r},rt=function(e){return e.substr(0,e.lastIndexOf("."))||e},ot={INIT:1,IDLE:2,PROCESSING_QUEUED:9,PROCESSING:3,PROCESSING_COMPLETE:5,PROCESSING_ERROR:6,PROCESSING_REVERT_ERROR:10,LOADING:7,LOAD_ERROR:8},at=function(e){var t=[e.name,e.size,e.type];return e instanceof Blob||Ae(e)?t[0]=e.name||Fe():Ae(e)?(t[1]=e.length,t[2]=Be(e)):U(e)&&(t[0]=Ie(e),t[1]=0,t[2]="application/octet-stream"),{name:t[0],size:t[1],type:t[2]}},it={INPUT:1,LIMBO:2,LOCAL:3},st=function e(t){if(!X(t))return t;var n=Y(t)?[]:{};for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];n[r]=o&&X(o)?e(o):o}return n},lt=function(e,t){var n=function(e,t){return j(t)?0:U(t)?e.findIndex((function(e){return e.id===t})):-1}(e,t);if(!(n<0))return e[n]||null},ct=function(e,t,n,r,o,a){var i=Qe(null,e,{method:"GET",responseType:"blob"});return i.onload=function(n){var r=n.getAllResponseHeaders(),o=Ge(r).name||Ie(e);t(Xe("load",n.status,He(n.response,o),r))},i.onerror=function(e){n(Xe("error",e.status,e.statusText,e.getAllResponseHeaders()))},i.onheaders=function(e){a(Xe("headers",e.status,null,e.getAllResponseHeaders()))},i.ontimeout=$e(n),i.onprogress=r,i.onabort=o,i},ut=function(e){return 0===e.indexOf("//")&&(e=location.protocol+e),e.toLowerCase().replace("blob:","").replace(/([a-z])?:\/\//,"$1").split("/")[0]},dt=function(e){return e instanceof File||e instanceof Blob&&e.name},ht=function(e){return function(){return J(e)?e.apply(void 0,arguments):e}},pt=function(e,t){clearTimeout(t.listUpdateTimeout),t.listUpdateTimeout=setTimeout((function(){e("DID_UPDATE_ITEMS",{items:Pe(t.items)})}),0)},ft=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new Promise((function(t){if(!e)return t(!0);var r=e.apply(void 0,n);return null==r?t(!0):"boolean"==typeof r?t(r):void("function"==typeof r.then&&r.then(t))}))},mt=function(e,t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.query,o=n.success,a=void 0===o?function(){}:o,i=n.failure,s=void 0===i?function(){}:i,l=Le(e.items,r);l?t(l,a,s):s({error:Xe("error",0,"Item not found"),file:null})}},gt=function(e,t,n){return{ABORT_ALL:function(){Pe(n.items).forEach((function(e){e.abortLoad(),e.abortProcessing()}))},DID_SET_FILES:function(t){var r=t.value,o=(void 0===r?[]:r).map((function(e){return{source:e.source?e.source:e,options:e.options}})),a=Pe(n.items);a.forEach((function(t){o.find((function(e){return e.source===t.source||e.source===t.file}))||e("REMOVE_ITEM",{query:t})})),a=Pe(n.items),o.forEach((function(t,n){a.find((function(e){return e.source===t.source||e.file===t.source}))||e("ADD_ITEM",Object.assign({},t,{interactionMethod:de,index:n}))}))},DID_UPDATE_ITEM_METADATA:function(r){var o=r.id,a=lt(n.items,o);if(t("IS_ASYNC")){var i,s=function(){setTimeout((function(){e("REQUEST_ITEM_PROCESSING",{query:o})}),32)};return a.status===ot.PROCESSING_COMPLETE?(i=n.options.instantUpload,void a.revert(et(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then(i?s:function(){}).catch((function(){}))):a.status===ot.PROCESSING?function(e){a.abortProcessing().then(e?s:function(){})}(n.options.instantUpload):void(n.options.instantUpload&&s())}Me("SHOULD_PREPARE_OUTPUT",!1,{item:a,query:t}).then((function(t){t&&e("REQUEST_PREPARE_OUTPUT",{query:o,item:a,ready:function(t){e("DID_PREPARE_OUTPUT",{id:o,file:t})}},!0)}))},ADD_ITEM:function(r){var o=r.source,a=r.index,s=r.interactionMethod,l=r.success,c=void 0===l?function(){}:l,u=r.failure,d=void 0===u?function(){}:u,h=r.options,p=void 0===h?{}:h;if(j(o))d({error:Xe("error",0,"No source"),file:null});else if(!dt(o)||!n.options.ignoredFiles.includes(o.name.toLowerCase())){if(!function(e){var t=Pe(e.items).length;if(!e.options.allowMultiple)return 0===t;var n=e.options.maxFiles;return null===n||t<n}(n)){if(n.options.allowMultiple||!n.options.allowMultiple&&!n.options.allowReplace){var f=Xe("warning",0,"Max files");return e("DID_THROW_MAX_FILES",{source:o,error:f}),void d({error:f,file:null})}var m=Pe(n.items)[0];if(m.status===ot.PROCESSING_COMPLETE||m.status===ot.PROCESSING_REVERT_ERROR){var g=t("GET_FORCE_REVERT");if(m.revert(et(n.options.server.url,n.options.server.revert),g).then((function(){g&&e("ADD_ITEM",{source:o,index:a,interactionMethod:s,success:c,failure:d,options:p})})).catch((function(){})),g)return}e("REMOVE_ITEM",{query:m.id})}var _="local"===p.type?it.LOCAL:"limbo"===p.type?it.LIMBO:it.INPUT,v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=he(),o={archived:!1,released:!1,source:null,file:n,serverFileReference:t,status:t?ot.PROCESSING_COMPLETE:ot.INIT,activeLoader:null,activeProcessor:null},a=null,s={},l=function(e){return o.status=e},c=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.released||x.fire.apply(x,[e].concat(n))},u=function(){return Re(o.file.name)},d=function(){return o.file.type},h=function(){return o.file.size},p=function(){return o.file},f=function(t,n,r){o.source=t,o.file?c("load-skip"):(o.file=at(t),n.on("init",(function(){c("load-init")})),n.on("meta",(function(t){o.file.size=t.size,o.file.filename=t.filename,t.source&&(e=it.LIMBO,o.serverFileReference=t.source,o.status=ot.PROCESSING_COMPLETE),c("load-meta")})),n.on("progress",(function(e){l(ot.LOADING),c("load-progress",e)})),n.on("error",(function(e){l(ot.LOAD_ERROR),c("load-request-error",e)})),n.on("abort",(function(){l(ot.INIT),c("load-abort")})),n.on("load",(function(t){o.activeLoader=null;var n=function(t){o.file=t.size>0?t:o.file,e===it.LIMBO&&o.serverFileReference?l(ot.PROCESSING_COMPLETE):l(ot.IDLE),c("load")};o.serverFileReference?n(t):r(t,n,(function(e){o.file=t,c("load-meta"),l(ot.LOAD_ERROR),c("load-file-error",e)}))})),n.setSource(t),o.activeLoader=n,n.load())},m=function(){o.activeLoader&&o.activeLoader.load()},g=function(){o.activeLoader&&o.activeLoader.abort()},_=function e(t,n){l(ot.PROCESSING),a=null,o.file instanceof Blob?(t.on("load",(function(e){o.serverFileReference=e})),t.on("load-perceived",(function(e){o.activeProcessor=null,o.serverFileReference=e,l(ot.PROCESSING_COMPLETE),c("process-complete",e)})),t.on("start",(function(){c("process-start")})),t.on("error",(function(e){o.activeProcessor=null,l(ot.PROCESSING_ERROR),c("process-error",e)})),t.on("abort",(function(e){o.activeProcessor=null,o.serverFileReference=e,l(ot.IDLE),c("process-abort"),a&&a()})),t.on("progress",(function(e){c("process-progress",e)})),n(o.file,(function(e){o.archived||t.process(e,Object.assign({},s))}),(function(e){})),o.activeProcessor=t):x.on("load",(function(){e(t,n)}))},v=function(){l(ot.PROCESSING_QUEUED)},b=function(){return new Promise((function(e){if(!o.activeProcessor)return l(ot.IDLE),c("process-abort"),void e();a=function(){e()},o.activeProcessor.abort()}))},y=function(e,t){return new Promise((function(n,r){null!==o.serverFileReference?(e(o.serverFileReference,(function(){o.serverFileReference=null,n()}),(function(e){t?(l(ot.PROCESSING_REVERT_ERROR),c("process-revert-error"),r(e)):n()})),l(ot.IDLE),c("process-revert")):n()}))},w=function(e,t,n){var r=e.split("."),o=r[0],a=r.pop(),i=s;r.forEach((function(e){return i=i[e]})),JSON.stringify(i[a])!==JSON.stringify(t)&&(i[a]=t,n||c("metadata-update",{key:o,value:s[o]}))},k=function(e){return st(e?s[e]:s)},x=Object.assign({id:{get:function(){return r}},origin:{get:function(){return e}},serverId:{get:function(){return o.serverFileReference}},status:{get:function(){return o.status}},filename:{get:function(){return o.file.name}},filenameWithoutExtension:{get:function(){return rt(o.file.name)}},fileExtension:{get:u},fileType:{get:d},fileSize:{get:h},file:{get:p},source:{get:function(){return o.source}},getMetadata:k,setMetadata:function(e,t,n){if(X(e)){var r=e;return Object.keys(r).forEach((function(e){w(e,r[e],t)})),e}return w(e,t,n),t},extend:function(e,t){return M[e]=t},abortLoad:g,retryLoad:m,requestProcessing:v,abortProcessing:b,load:f,process:_,revert:y},me(),{release:function(){return o.released=!0},released:{get:function(){return o.released}},archive:function(){return o.archived=!0},archived:{get:function(){return o.archived}}}),M=i(x);return M}(_,_===it.INPUT?null:o,p.file);Object.keys(p.metadata||{}).forEach((function(e){v.setMetadata(e,p.metadata[e])})),Ee("DID_CREATE_ITEM",v,{query:t,dispatch:e}),Ne(n.items,v,a);var b=v.id;v.on("load-init",(function(){e("DID_START_ITEM_LOAD",{id:b})})),v.on("load-meta",(function(){e("DID_UPDATE_ITEM_META",{id:b})})),v.on("load-progress",(function(t){e("DID_UPDATE_ITEM_LOAD_PROGRESS",{id:b,progress:t})})),v.on("load-request-error",(function(t){var r=ht(n.options.labelFileLoadError)(t);if(t.code>=400&&t.code<500)return e("DID_THROW_ITEM_INVALID",{id:b,error:t,status:{main:r,sub:t.code+" ("+t.body+")"}}),void d({error:t,file:ve(v)});e("DID_THROW_ITEM_LOAD_ERROR",{id:b,error:t,status:{main:r,sub:n.options.labelTapToRetry}})})),v.on("load-file-error",(function(t){e("DID_THROW_ITEM_INVALID",Object.assign({},t,{id:b}))})),v.on("load-abort",(function(){e("REMOVE_ITEM",{query:b})})),v.on("load-skip",(function(){e("COMPLETE_LOAD_ITEM",{query:b,item:v,data:{source:o,success:c}})})),v.on("load",(function(){var r=function(r){r?(v.on("metadata-update",(function(t){e("DID_UPDATE_ITEM_METADATA",{id:b,change:t})})),Me("SHOULD_PREPARE_OUTPUT",!1,{item:v,query:t}).then((function(t){var r=function(){e("COMPLETE_LOAD_ITEM",{query:b,item:v,data:{source:o,success:c}}),pt(e,n)};t?e("REQUEST_PREPARE_OUTPUT",{query:b,item:v,ready:function(t){e("DID_PREPARE_OUTPUT",{id:b,file:t}),r()}},!0):r()}))):e("REMOVE_ITEM",{query:b})};Me("DID_LOAD_ITEM",v,{query:t,dispatch:e}).then((function(){ft(t("GET_BEFORE_ADD_FILE"),ve(v)).then(r)})).catch((function(){r(!1)}))})),v.on("process-start",(function(){e("DID_START_ITEM_PROCESSING",{id:b})})),v.on("process-progress",(function(t){e("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id:b,progress:t})})),v.on("process-error",(function(t){e("DID_THROW_ITEM_PROCESSING_ERROR",{id:b,error:t,status:{main:ht(n.options.labelFileProcessingError)(t),sub:n.options.labelTapToRetry}})})),v.on("process-revert-error",(function(t){e("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id:b,error:t,status:{main:ht(n.options.labelFileProcessingRevertError)(t),sub:n.options.labelTapToRetry}})})),v.on("process-complete",(function(t){e("DID_COMPLETE_ITEM_PROCESSING",{id:b,error:null,serverFileReference:t})})),v.on("process-abort",(function(){e("DID_ABORT_ITEM_PROCESSING",{id:b})})),v.on("process-revert",(function(){e("DID_REVERT_ITEM_PROCESSING",{id:b})})),e("DID_ADD_ITEM",{id:b,index:a,interactionMethod:s}),pt(e,n);var y=n.options.server||{},w=y.url,k=y.load,x=y.restore,M=y.fetch;v.load(o,Je(_===it.INPUT?U(o)&&function(e){return(e.indexOf(":")>-1||e.indexOf("//")>-1)&&ut(location.href)!==ut(e)}(o)?Ze(w,M):ct:Ze(w,_===it.LIMBO?x:k)),(function(e,n,r){Me("LOAD_FILE",e,{query:t}).then(n).catch(r)}))}},REQUEST_PREPARE_OUTPUT:function(e){var n=e.item,r=e.ready;Me("PREPARE_OUTPUT",n.file,{query:t,item:n}).then((function(e){Me("COMPLETE_PREPARE_OUTPUT",e,{query:t,item:n}).then((function(e){r(e)}))}))},COMPLETE_LOAD_ITEM:function(r){var o=r.item,a=r.data,i=a.success,s=a.source;e("DID_LOAD_ITEM",{id:o.id,error:null,serverFileReference:o.origin===it.INPUT?null:s}),i(ve(o)),o.origin!==it.LOCAL?o.origin!==it.LIMBO?t("IS_ASYNC")&&n.options.instantUpload&&e("REQUEST_ITEM_PROCESSING",{query:o.id}):e("DID_COMPLETE_ITEM_PROCESSING",{id:o.id,error:null,serverFileReference:s}):e("DID_LOAD_LOCAL_ITEM",{id:o.id})},RETRY_ITEM_LOAD:mt(n,(function(e){e.retryLoad()})),REQUEST_ITEM_PROCESSING:mt(n,(function(r,o,a){if(r.status===ot.IDLE||r.status===ot.PROCESSING_ERROR)r.status!==ot.PROCESSING_QUEUED&&(r.requestProcessing(),e("DID_REQUEST_ITEM_PROCESSING",{id:r.id}),e("PROCESS_ITEM",{query:r,success:o,failure:a},!0));else{var i=function(){setTimeout((function(){e("REQUEST_ITEM_PROCESSING",{query:r,success:o,failure:a})}),32)};r.status===ot.PROCESSING_COMPLETE||r.status===ot.PROCESSING_REVERT_ERROR?r.revert(et(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then(i).catch((function(){})):r.status===ot.PROCESSING&&r.abortProcessing().then(i)}})),PROCESS_ITEM:mt(n,(function(r,o,a){var i=t("GET_MAX_PARALLEL_UPLOADS");t("GET_ITEMS_BY_STATUS",ot.PROCESSING).length!==i?r.status!==ot.PROCESSING&&(r.onOnce("process-complete",(function(){o(ve(r));var t=n.processingQueue.shift();t&&e("PROCESS_ITEM",{query:t.item,success:t.success,failure:t.failure},!0)})),r.onOnce("process-error",(function(e){a({error:e,file:ve(r)})})),r.process(nt(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments[1],n=arguments[2];return"function"==typeof t?function(){for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.apply(void 0,[n].concat(r))}:t&&U(t.url)?function(r,o,a,i,s,l){var c=t.ondata||function(e){return e},u=t.onload||function(e){return e},d=t.onerror||function(e){return null};if(r){var h=new FormData;X(o)&&h.append(n,JSON.stringify(o)),(r instanceof Blob?[{name:null,file:r}]:r).forEach((function(e){h.append(n,e.file,null===e.name?e.file.name:""+e.name+e.file.name)}));var p=Qe(c(h),e+t.url,t);return p.onload=function(e){a(Xe("load",e.status,u(e.response),e.getAllResponseHeaders()))},p.onerror=function(e){i(Xe("error",e.status,d(e.response)||e.statusText,e.getAllResponseHeaders()))},p.ontimeout=$e(i),p.onprogress=s,p.onabort=l,p}}:null}(n.options.server.url,n.options.server.process,n.options.name)),(function(n,o,a){Me("PREPARE_OUTPUT",n,{query:t,item:r}).then((function(t){e("DID_PREPARE_OUTPUT",{id:r.id,file:t}),o(t)})).catch(a)}))):n.processingQueue.push({item:r,success:o,failure:a})})),RETRY_ITEM_PROCESSING:mt(n,(function(t){e("REQUEST_ITEM_PROCESSING",{query:t})})),REQUEST_REMOVE_ITEM:mt(n,(function(n){ft(t("GET_BEFORE_REMOVE_FILE"),ve(n)).then((function(t){t&&e("REMOVE_ITEM",{query:n})}))})),RELEASE_ITEM:mt(n,(function(e){e.release()})),REMOVE_ITEM:mt(n,(function(t,r){var o=function(){var o=t.id;lt(n.items,o).archive(),e("DID_REMOVE_ITEM",{id:o,item:t}),pt(e,n),r(ve(t))},a=n.options.server;t.origin===it.LOCAL&&a&&J(a.remove)?(e("DID_START_ITEM_REMOVE",{id:t.id}),a.remove(t.source,(function(){return o()}),(function(r){e("DID_THROW_ITEM_REMOVE_ERROR",{id:t.id,error:Xe("error",0,r,null),status:{main:ht(n.options.labelFileRemoveError)(r),sub:n.options.labelTapToRetry}})}))):o()})),ABORT_ITEM_LOAD:mt(n,(function(e){e.abortLoad()})),ABORT_ITEM_PROCESSING:mt(n,(function(t){t.serverId?e("REVERT_ITEM_PROCESSING",{id:t.id}):t.abortProcessing().then((function(){n.options.instantUpload&&e("REMOVE_ITEM",{query:t.id})}))})),REQUEST_REVERT_ITEM_PROCESSING:mt(n,(function(r){if(n.options.instantUpload){var o=function(t){t&&e("REVERT_ITEM_PROCESSING",{query:r})},a=t("GET_BEFORE_REMOVE_FILE");if(!a)return o(!0);var i=a(ve(r));return null==i?o(!0):"boolean"==typeof i?o(i):void("function"==typeof i.then&&i.then(o))}e("REVERT_ITEM_PROCESSING",{query:r})})),REVERT_ITEM_PROCESSING:mt(n,(function(r){r.revert(et(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then((function(){(n.options.instantUpload||function(e){return!dt(e.file)}(r))&&e("REMOVE_ITEM",{query:r.id})})).catch((function(){}))})),SET_OPTIONS:function(t){var n=t.options;a(n,(function(t,n){e("SET_"+re(t,"_").toUpperCase(),{value:n})}))}}},_t=function(e){return document.createElement(e)},vt=function(e,t){var n=e.childNodes[0];n?t!==n.nodeValue&&(n.nodeValue=t):(n=document.createTextNode(t),e.appendChild(n))},bt=function(e,t,n,r){var o=(r%360-90)*Math.PI/180;return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}},yt=function(e,t,n,r,o){var a=1;return o>r&&o-r<=.5&&(a=0),r>o&&r-o>=.5&&(a=0),function(e,t,n,r,o,a){var i=bt(e,t,n,o),s=bt(e,t,n,r);return["M",i.x,i.y,"A",n,n,0,a,0,s.x,s.y].join(" ")}(e,t,n,360*Math.min(.9999,r),360*Math.min(.9999,o),a)},wt=N({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create:function(e){var t=e.root,n=e.props;n.spin=!1,n.progress=0,n.opacity=0;var r=f("svg");t.ref.path=f("path",{"stroke-width":2,"stroke-linecap":"round"}),r.appendChild(t.ref.path),t.ref.svg=r,t.appendChild(r)},write:function(e){var t=e.root,n=e.props;if(0!==n.opacity){n.align&&(t.element.dataset.align=n.align);var r=parseInt(s(t.ref.path,"stroke-width"),10),o=.5*t.rect.element.width,a=0,i=0;n.spin?(a=0,i=.5):(a=0,i=n.progress);var l=yt(o,o,o-r,a,i);s(t.ref.path,"d",l),s(t.ref.path,"stroke-opacity",n.spin||n.progress>0?1:0)}},mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),kt=N({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:function(e){var t=e.root,n=e.props;t.element.title=n.label,t.element.innerHTML=n.icon||"",n.disabled=!1},write:function(e){var t=e.root,n=e.props;0!==n.opacity||n.disabled?n.opacity>0&&n.disabled&&(n.disabled=!1,t.element.removeAttribute("disabled")):(n.disabled=!0,s(t.element,"disabled","disabled"))}}),xt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".";return(e=Math.round(Math.abs(e)))<1e3?e+" bytes":e<Et?Math.floor(e/Mt)+" KB":e<Tt?St(e/Et,1,t)+" MB":St(e/Tt,2,t)+" GB"},Mt=1e3,Et=1e6,Tt=1e9,St=function(e,t,n){return e.toFixed(t).split(".").filter((function(e){return"0"!==e})).join(n)},Dt=function(e){var t=e.root,n=e.props;vt(t.ref.fileSize,xt(t.query("GET_ITEM_SIZE",n.id))),vt(t.ref.fileName,t.query("GET_ITEM_NAME",n.id))},Lt=function(e){var t=e.root,n=e.props;q(t.query("GET_ITEM_SIZE",n.id))||vt(t.ref.fileSize,t.query("GET_LABEL_FILE_SIZE_NOT_AVAILABLE"))},Ct=N({name:"file-info",ignoreRect:!0,ignoreRectUpdate:!0,write:A({DID_LOAD_ITEM:Dt,DID_UPDATE_ITEM_META:Dt,DID_THROW_ITEM_LOAD_ERROR:Lt,DID_THROW_ITEM_INVALID:Lt}),didCreateView:function(e){Ee("CREATE_VIEW",Object.assign({},e,{view:e}))},create:function(e){var t=e.root,n=e.props,r=_t("span");r.className="filepond--file-info-main",s(r,"aria-hidden","true"),t.appendChild(r),t.ref.fileName=r;var o=_t("span");o.className="filepond--file-info-sub",t.appendChild(o),t.ref.fileSize=o,vt(o,t.query("GET_LABEL_FILE_WAITING_FOR_SIZE")),vt(r,t.query("GET_ITEM_NAME",n.id))},mixins:{styles:["translateX","translateY"],animations:{translateX:"spring",translateY:"spring"}}}),Pt=function(e){return Math.round(100*e)},Ot=function(e){var t=e.root,n=e.action,r=null===n.progress?t.query("GET_LABEL_FILE_LOADING"):t.query("GET_LABEL_FILE_LOADING")+" "+Pt(n.progress)+"%";vt(t.ref.main,r),vt(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},Nt=function(e){var t=e.root;vt(t.ref.main,""),vt(t.ref.sub,"")},At=function(e){var t=e.root,n=e.action;vt(t.ref.main,n.status.main),vt(t.ref.sub,n.status.sub)},It=N({name:"file-status",ignoreRect:!0,ignoreRectUpdate:!0,write:A({DID_LOAD_ITEM:Nt,DID_REVERT_ITEM_PROCESSING:Nt,DID_REQUEST_ITEM_PROCESSING:function(e){var t=e.root;vt(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING")),vt(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},DID_ABORT_ITEM_PROCESSING:function(e){var t=e.root;vt(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING_ABORTED")),vt(t.ref.sub,t.query("GET_LABEL_TAP_TO_RETRY"))},DID_COMPLETE_ITEM_PROCESSING:function(e){var t=e.root;vt(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING_COMPLETE")),vt(t.ref.sub,t.query("GET_LABEL_TAP_TO_UNDO"))},DID_UPDATE_ITEM_PROCESS_PROGRESS:function(e){var t=e.root,n=e.action,r=null===n.progress?t.query("GET_LABEL_FILE_PROCESSING"):t.query("GET_LABEL_FILE_PROCESSING")+" "+Pt(n.progress)+"%";vt(t.ref.main,r),vt(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},DID_UPDATE_ITEM_LOAD_PROGRESS:Ot,DID_THROW_ITEM_LOAD_ERROR:At,DID_THROW_ITEM_INVALID:At,DID_THROW_ITEM_PROCESSING_ERROR:At,DID_THROW_ITEM_PROCESSING_REVERT_ERROR:At,DID_THROW_ITEM_REMOVE_ERROR:At}),didCreateView:function(e){Ee("CREATE_VIEW",Object.assign({},e,{view:e}))},create:function(e){var t=e.root,n=_t("span");n.className="filepond--file-status-main",t.appendChild(n),t.ref.main=n;var r=_t("span");r.className="filepond--file-status-sub",t.appendChild(r),t.ref.sub=r,Ot({root:t,action:{progress:null}})},mixins:{styles:["translateX","translateY","opacity"],animations:{opacity:{type:"tween",duration:250},translateX:"spring",translateY:"spring"}}}),Rt={AbortItemLoad:{label:"GET_LABEL_BUTTON_ABORT_ITEM_LOAD",action:"ABORT_ITEM_LOAD",className:"filepond--action-abort-item-load",align:"LOAD_INDICATOR_POSITION"},RetryItemLoad:{label:"GET_LABEL_BUTTON_RETRY_ITEM_LOAD",action:"RETRY_ITEM_LOAD",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-load",align:"BUTTON_PROCESS_ITEM_POSITION"},RemoveItem:{label:"GET_LABEL_BUTTON_REMOVE_ITEM",action:"REQUEST_REMOVE_ITEM",icon:"GET_ICON_REMOVE",className:"filepond--action-remove-item",align:"BUTTON_REMOVE_ITEM_POSITION"},ProcessItem:{label:"GET_LABEL_BUTTON_PROCESS_ITEM",action:"REQUEST_ITEM_PROCESSING",icon:"GET_ICON_PROCESS",className:"filepond--action-process-item",align:"BUTTON_PROCESS_ITEM_POSITION"},AbortItemProcessing:{label:"GET_LABEL_BUTTON_ABORT_ITEM_PROCESSING",action:"ABORT_ITEM_PROCESSING",className:"filepond--action-abort-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RetryItemProcessing:{label:"GET_LABEL_BUTTON_RETRY_ITEM_PROCESSING",action:"RETRY_ITEM_PROCESSING",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RevertItemProcessing:{label:"GET_LABEL_BUTTON_UNDO_ITEM_PROCESSING",action:"REQUEST_REVERT_ITEM_PROCESSING",icon:"GET_ICON_UNDO",className:"filepond--action-revert-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"}},Yt=[];a(Rt,(function(e){Yt.push(e)}));var jt,Ft=function(e){return e.ref.buttonRemoveItem.rect.element.width+e.ref.buttonRemoveItem.rect.element.left},Ht=function(e){return Math.floor(e.ref.buttonRemoveItem.rect.element.height/4)},zt=function(e){return Math.floor(e.ref.buttonRemoveItem.rect.element.left/2)},Bt=function(e){return e.query("GET_STYLE_BUTTON_REMOVE_ITEM_POSITION")},Ut={buttonAbortItemLoad:{opacity:0},buttonRetryItemLoad:{opacity:0},buttonRemoveItem:{opacity:0},buttonProcessItem:{opacity:0},buttonAbortItemProcessing:{opacity:0},buttonRetryItemProcessing:{opacity:0},buttonRevertItemProcessing:{opacity:0},loadProgressIndicator:{opacity:0,align:function(e){return e.query("GET_STYLE_LOAD_INDICATOR_POSITION")}},processProgressIndicator:{opacity:0,align:function(e){return e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}},processingCompleteIndicator:{opacity:0,scaleX:.75,scaleY:.75},info:{translateX:0,translateY:0,opacity:0},status:{translateX:0,translateY:0,opacity:0}},Vt={buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:Ft},status:{translateX:Ft}},Wt={buttonAbortItemProcessing:{opacity:1},processProgressIndicator:{opacity:1},status:{opacity:1}},qt={DID_THROW_ITEM_INVALID:{buttonRemoveItem:{opacity:1},info:{translateX:Ft},status:{translateX:Ft,opacity:1}},DID_START_ITEM_LOAD:{buttonAbortItemLoad:{opacity:1},loadProgressIndicator:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_LOAD_ERROR:{buttonRetryItemLoad:{opacity:1},buttonRemoveItem:{opacity:1},info:{translateX:Ft},status:{opacity:1}},DID_START_ITEM_REMOVE:{processProgressIndicator:{opacity:1,align:Bt},info:{translateX:Ft},status:{opacity:0}},DID_THROW_ITEM_REMOVE_ERROR:{processProgressIndicator:{opacity:0,align:Bt},buttonRemoveItem:{opacity:1},info:{translateX:Ft},status:{opacity:1,translateX:Ft}},DID_LOAD_ITEM:Vt,DID_LOAD_LOCAL_ITEM:{buttonRemoveItem:{opacity:1},info:{translateX:Ft},status:{translateX:Ft}},DID_START_ITEM_PROCESSING:Wt,DID_REQUEST_ITEM_PROCESSING:Wt,DID_UPDATE_ITEM_PROCESS_PROGRESS:Wt,DID_COMPLETE_ITEM_PROCESSING:{buttonRevertItemProcessing:{opacity:1},info:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_PROCESSING_ERROR:{buttonRemoveItem:{opacity:1},buttonRetryItemProcessing:{opacity:1},status:{opacity:1},info:{translateX:Ft}},DID_THROW_ITEM_PROCESSING_REVERT_ERROR:{buttonRevertItemProcessing:{opacity:1},status:{opacity:1},info:{opacity:1}},DID_ABORT_ITEM_PROCESSING:{buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:Ft},status:{opacity:1}},DID_REVERT_ITEM_PROCESSING:Vt},Gt=N({create:function(e){var t=e.root;t.element.innerHTML=t.query("GET_ICON_DONE")},name:"processing-complete-indicator",ignoreRect:!0,mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",opacity:{type:"tween",duration:250}}}}),Jt=A({DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING:function(e){var t=e.root,n=e.action;t.ref.buttonAbortItemProcessing.label=n.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD:function(e){var t=e.root,n=e.action;t.ref.buttonAbortItemLoad.label=n.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL:function(e){var t=e.root,n=e.action;t.ref.buttonAbortItemRemoval.label=n.value},DID_REQUEST_ITEM_PROCESSING:function(e){var t=e.root;t.ref.processProgressIndicator.spin=!0,t.ref.processProgressIndicator.progress=0},DID_START_ITEM_LOAD:function(e){var t=e.root;t.ref.loadProgressIndicator.spin=!0,t.ref.loadProgressIndicator.progress=0},DID_START_ITEM_REMOVE:function(e){var t=e.root;t.ref.processProgressIndicator.spin=!0,t.ref.processProgressIndicator.progress=0},DID_UPDATE_ITEM_LOAD_PROGRESS:function(e){var t=e.root,n=e.action;t.ref.loadProgressIndicator.spin=!1,t.ref.loadProgressIndicator.progress=n.progress},DID_UPDATE_ITEM_PROCESS_PROGRESS:function(e){var t=e.root,n=e.action;t.ref.processProgressIndicator.spin=!1,t.ref.processProgressIndicator.progress=n.progress}}),Kt=N({create:function(e){var t=e.root,n=e.props.id,r=t.query("GET_ALLOW_REVERT"),o=t.query("GET_INSTANT_UPLOAD"),i=t.query("IS_ASYNC"),s=i?Yt.concat():Yt.filter((function(e){return!/Process/.test(e)}));if(i&&!r){s.splice(-1,1);var l=qt.DID_COMPLETE_ITEM_PROCESSING;l.info.translateX=zt,l.info.translateY=Ht,l.status.translateY=Ht,l.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}o&&r&&(Rt.RevertItemProcessing.label="GET_LABEL_BUTTON_REMOVE_ITEM",Rt.RevertItemProcessing.icon="GET_ICON_REMOVE"),a(Rt,(function(e,r){var o=t.createChildView(kt,{label:t.query(r.label),icon:t.query(r.icon),opacity:0});s.includes(e)&&t.appendChildView(o),o.element.dataset.align=t.query("GET_STYLE_"+r.align),o.element.classList.add(r.className),o.on("click",(function(){t.dispatch(r.action,{query:n})})),t.ref["button"+e]=o})),t.ref.info=t.appendChildView(t.createChildView(Ct,{id:n})),t.ref.status=t.appendChildView(t.createChildView(It,{id:n})),t.ref.processingCompleteIndicator=t.appendChildView(t.createChildView(Gt)),t.ref.processingCompleteIndicator.element.dataset.align=t.query("GET_STYLE_BUTTON_PROCESS_ITEM_POSITION");var c=t.appendChildView(t.createChildView(wt,{opacity:0,align:t.query("GET_STYLE_LOAD_INDICATOR_POSITION")}));c.element.classList.add("filepond--load-indicator"),t.ref.loadProgressIndicator=c;var u=t.appendChildView(t.createChildView(wt,{opacity:0,align:t.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}));u.element.classList.add("filepond--process-indicator"),t.ref.processProgressIndicator=u},write:function(e){var t=e.root,n=e.actions,r=e.props;Jt({root:t,actions:n,props:r});var o=[].concat(u(n)).filter((function(e){return/^DID_/.test(e.type)})).reverse().find((function(e){return qt[e.type]}));if(o&&(!o||o.type!==t.ref.currentAction)){t.ref.currentAction=o.type;var i=qt[t.ref.currentAction];a(Ut,(function(e,n){var r=t.ref[e];a(n,(function(n,o){var a=i[e]&&void 0!==i[e][n]?i[e][n]:o;r[n]="function"==typeof a?a(t):a}))}))}},didCreateView:function(e){Ee("CREATE_VIEW",Object.assign({},e,{view:e}))},name:"file"}),Qt=N({create:function(e){var t=e.root,n=e.props;t.ref.fileName=_t("legend"),t.appendChild(t.ref.fileName),t.ref.file=t.appendChildView(t.createChildView(Kt,{id:n.id}));var r=_t("input");r.type="hidden",r.name=t.query("GET_NAME"),t.ref.data=r,t.appendChild(r)},ignoreRect:!0,write:A({DID_LOAD_ITEM:function(e){var t=e.root,n=e.action,r=e.props;t.ref.data.value=n.serverFileReference,vt(t.ref.fileName,t.query("GET_ITEM_NAME",r.id))},DID_REMOVE_ITEM:function(e){e.root.ref.data.removeAttribute("value")},DID_COMPLETE_ITEM_PROCESSING:function(e){var t=e.root,n=e.action;t.ref.data.value=n.serverFileReference},DID_REVERT_ITEM_PROCESSING:function(e){e.root.ref.data.removeAttribute("value")}}),didCreateView:function(e){Ee("CREATE_VIEW",Object.assign({},e,{view:e}))},tag:"fieldset",name:"file-wrapper"}),Xt={type:"spring",damping:.6,mass:7},$t=function(e,t,n){var r=N({name:"panel-"+t.name+" filepond--"+n,mixins:t.mixins,ignoreRectUpdate:!0}),o=e.createChildView(r,t.props);e.ref[t.name]=e.appendChildView(o)},Zt=N({name:"panel",write:function(e){var t=e.root,n=e.props;if(null!==t.ref.scalable&&n.scalable===t.ref.scalable||(t.ref.scalable=!z(n.scalable)||n.scalable,t.element.dataset.scalable=t.ref.scalable),n.height){var r=t.ref.top.rect.element,o=t.ref.bottom.rect.element,a=Math.max(r.height+o.height,n.height);t.ref.center.translateY=r.height,t.ref.center.scaleY=(a-r.height-o.height)/100,t.ref.bottom.translateY=a-o.height}},create:function(e){var t=e.root,n=e.props;[{name:"top"},{name:"center",props:{translateY:null,scaleY:null},mixins:{animations:{scaleY:Xt},styles:["translateY","scaleY"]}},{name:"bottom",props:{translateY:null},mixins:{animations:{translateY:Xt},styles:["translateY"]}}].forEach((function(e){$t(t,e,n.name)})),t.element.classList.add("filepond--"+n.name),t.ref.scalable=null},ignoreRect:!0,mixins:{apis:["height","scalable"]}}),en={DID_START_ITEM_LOAD:"busy",DID_UPDATE_ITEM_LOAD_PROGRESS:"loading",DID_THROW_ITEM_INVALID:"load-invalid",DID_THROW_ITEM_LOAD_ERROR:"load-error",DID_LOAD_ITEM:"idle",DID_THROW_ITEM_REMOVE_ERROR:"remove-error",DID_START_ITEM_REMOVE:"busy",DID_START_ITEM_PROCESSING:"busy",DID_REQUEST_ITEM_PROCESSING:"busy",DID_UPDATE_ITEM_PROCESS_PROGRESS:"processing",DID_COMPLETE_ITEM_PROCESSING:"processing-complete",DID_THROW_ITEM_PROCESSING_ERROR:"processing-error",DID_THROW_ITEM_PROCESSING_REVERT_ERROR:"processing-revert-error",DID_ABORT_ITEM_PROCESSING:"cancelled",DID_REVERT_ITEM_PROCESSING:"idle"},tn=N({create:function(e){var t=e.root,n=e.props;t.ref.controls=t.appendChildView(t.createChildView(Qt,{id:n.id})),t.ref.panel=t.appendChildView(t.createChildView(Zt,{name:"item-panel"})),t.ref.panel.height=0,n.markedForRemoval=!1},write:function(e){var t=e.root,n=e.actions,r=e.props;t.ref.panel.height=t.ref.controls.rect.inner.height;var o=t.query("GET_PANEL_ASPECT_RATIO"),a=t.query("GET_ALLOW_MULTIPLE");t.height=o&&!a?t.rect.element.width*o:t.ref.controls.rect.inner.height;var i=[].concat(u(n)).filter((function(e){return/^DID_/.test(e.type)})).reverse().find((function(e){return en[e.type]}));!i||i&&i.type===r.currentState||(r.currentState=i.type,t.element.dataset.filepondItemState=en[r.currentState]||"")},destroy:function(e){var t=e.root,n=e.props;t.dispatch("RELEASE_ITEM",{query:n.id})},tag:"li",name:"item",mixins:{apis:["id","markedForRemoval"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:150}}}}),nn=A({DID_ADD_ITEM:function(e){var t=e.root,n=e.action,r=n.id,o=n.index,a=n.interactionMethod,i={opacity:0};a===de&&(i.translateY=null),a===le&&(i.scaleX=.8,i.scaleY=.8,i.translateY=null),a===ce&&(i.translateY=-30),a===se&&(i.translateX=-100,i.translateY=null),t.appendChildView(t.createChildView(tn,Object.assign({id:r},i)),o)},DID_REMOVE_ITEM:function(e){var t=e.root,n=e.action.id,r=t.childViews.find((function(e){return e.id===n}));r&&(r.scaleX=.9,r.scaleY=.9,r.opacity=0,r.markedForRemoval=!0)}}),rn=N({create:function(e){var t=e.root;s(t.element,"role","list")},write:function(e){var t=e.root,n=e.props,r=e.actions;nn({root:t,props:n,actions:r});var o=0;return t.childViews.filter((function(e){return e.rect.outer.height})).forEach((function(e,t){var r=e.rect;e.translateX=0,e.translateY=o+(n.dragIndex>-1?function(e,t,n){return e-1===t?n/6:e===t?n/2:e+1===t?-n/2:e+2===t?-n/6:0}(t,n.dragIndex,10):0),e.markedForRemoval||(e.scaleX=1,e.scaleY=1,e.opacity=1);var a=r.element.height+r.element.marginTop+r.element.marginBottom,i=e.markedForRemoval?a*e.opacity:a;o+=i})),!0},read:function(e){var t=e.root,n=0;t.childViews.filter((function(e){return e.rect.outer.height})).forEach((function(e){var t,r,o=e.rect.element.height+e.rect.element.marginBottom;n+=e.markedForRemoval?o*(t=e.opacity,r=t-1,Math.sqrt(1-r*r)):o})),t.rect.outer.height=n,t.rect.outer.bottom=t.rect.outer.height},tag:"ul",name:"list",didWriteView:function(e){var t=e.root;t.childViews.filter((function(e){return e.markedForRemoval&&0===e.opacity&&e.resting})).forEach((function(e){e._destroy(),t.removeChildView(e)}))},filterFrameActionsForChild:function(e,t){return t.filter((function(t){return!t.data||!t.data.id||e.id===t.data.id}))},mixins:{apis:["dragIndex"]}}),on=function(e,t){for(var n=0,r=e.childViews,o=r.length;n<o;n++){var a=r[n].rect.outer,i=a.top+.5*a.height;if(t.top<i)return n}return o},an=A({DID_DRAG:function(e){var t=e.root,n=e.props,r=e.action;n.dragCoordinates={left:r.position.scopeLeft,top:r.position.scopeTop-t.rect.outer.top+t.rect.element.scrollTop}},DID_END_DRAG:function(e){e.props.dragCoordinates=null}}),sn=N({create:function(e){var t=e.root,n=e.props;t.ref.list=t.appendChildView(t.createChildView(rn)),n.dragCoordinates=null,n.overflowing=!1},write:function(e){var t=e.root,n=e.props,r=e.actions;if(an({root:t,props:n,actions:r}),t.ref.list.dragIndex=n.dragCoordinates?on(t.ref.list,n.dragCoordinates):-1,n.overflowing&&!n.overflow&&(n.overflowing=!1,t.element.dataset.state="",t.height=null),n.overflow){var o=Math.round(n.overflow);o!==t.height&&(n.overflowing=!0,t.element.dataset.state="overflow",t.height=o)}},name:"list-scroller",mixins:{apis:["overflow"],styles:["height","translateY"],animations:{translateY:"spring"}}}),ln=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";n?s(e,t,r):e.removeAttribute(t)},cn=function(e){var t=e.root;t.query("GET_TOTAL_ITEMS")>0?ln(t.element,"required",!1):(t.query("GET_CHECK_VALIDITY")&&t.element.setCustomValidity(""),t.query("GET_REQUIRED")&&ln(t.element,"required",!0))},un=N({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:function(e){var t=e.root,n=e.props;t.element.id="filepond--browser-"+n.id,s(t.element,"aria-controls","filepond--assistant-"+n.id),s(t.element,"aria-labelledby","filepond--drop-label-"+n.id),t.ref.handleChange=function(e){if(t.element.value){var r=[].concat(u(t.element.files));setTimeout((function(){n.onload(r),function(e){if(e&&""!==e.value){try{e.value=""}catch(e){}if(e.value){var t=_t("form"),n=e.parentNode,r=e.nextSibling;t.appendChild(e),t.reset(),r?n.insertBefore(e,r):n.appendChild(e)}}}(t.element)}),250)}},t.element.addEventListener("change",t.ref.handleChange)},destroy:function(e){var t=e.root;t.element.removeEventListener("change",t.ref.handleChange)},write:A({DID_LOAD_ITEM:cn,DID_THROW_ITEM_INVALID:function(e){var t=e.root;t.query("GET_CHECK_VALIDITY")&&t.element.setCustomValidity(t.query("GET_LABEL_INVALID_FIELD"))},DID_REMOVE_ITEM:cn,DID_SET_ALLOW_BROWSE:function(e){var t=e.root,n=e.action;ln(t.element,"disabled",!n.value)},DID_SET_ALLOW_MULTIPLE:function(e){var t=e.root,n=e.action;ln(t.element,"multiple",n.value)},DID_SET_ACCEPTED_FILE_TYPES:function(e){var t=e.root,n=e.action;ln(t.element,"accept",!!n.value,n.value?n.value.join(","):"")},DID_SET_CAPTURE_METHOD:function(e){var t=e.root,n=e.action;ln(t.element,"capture",!!n.value,!0===n.value?"":n.value)},DID_SET_REQUIRED:function(e){var t=e.root;e.action.value?0===t.query("GET_TOTAL_ITEMS")&&ln(t.element,"required",!0):ln(t.element,"required",!1)}})}),dn=13,hn=32,pn=function(e,t){e.innerHTML=t;var n=e.querySelector(".filepond--label-action");return n&&s(n,"tabindex","0"),t},fn=N({name:"drop-label",ignoreRect:!0,create:function(e){var t=e.root,n=e.props,r=_t("label");s(r,"for","filepond--browser-"+n.id),s(r,"id","filepond--drop-label-"+n.id),s(r,"aria-hidden","true"),r.addEventListener("keydown",(function(e){e.keyCode!==dn&&e.keyCode!==hn||(e.preventDefault(),t.ref.label.click())})),pn(r,n.caption),t.appendChild(r),t.ref.label=r},write:A({DID_SET_LABEL_IDLE:function(e){var t=e.root,n=e.action;pn(t.ref.label,n.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),mn=N({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),gn=A({DID_DRAG:function(e){var t=e.root,n=e.action;t.ref.blob?(t.ref.blob.translateX=n.position.scopeLeft,t.ref.blob.translateY=n.position.scopeTop,t.ref.blob.scaleX=1,t.ref.blob.scaleY=1,t.ref.blob.opacity=1):function(e){var t=e.root,n=.5*t.rect.element.width,r=.5*t.rect.element.height;t.ref.blob=t.appendChildView(t.createChildView(mn,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:n,translateY:r}))}({root:t})},DID_DROP:function(e){var t=e.root;t.ref.blob&&(t.ref.blob.scaleX=2.5,t.ref.blob.scaleY=2.5,t.ref.blob.opacity=0)},DID_END_DRAG:function(e){var t=e.root;t.ref.blob&&(t.ref.blob.opacity=0)}}),_n=N({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:function(e){var t=e.root,n=e.props,r=e.actions;gn({root:t,props:n,actions:r});var o=t.ref.blob;0===r.length&&o&&0===o.opacity&&(t.removeChildView(o),t.ref.blob=null)}}),vn=function(e){return new Promise((function(t,n){var r=Tn(e);r.length?t(r):bn(e).then(t)}))},bn=function(e){return new Promise((function(t,n){var r=(e.items?[].concat(u(e.items)):[]).filter((function(e){return yn(e)})).map((function(e){return wn(e)}));r.length?Promise.all(r).then((function(e){var n=[];e.forEach((function(e){n.push.apply(n,u(e))})),t(n.filter((function(e){return e})))})):t(e.files?[].concat(u(e.files)):[])}))},yn=function(e){if(Mn(e)){var t=En(e);if(t)return t.isFile||t.isDirectory}return"file"===e.kind},wn=function(e){return new Promise((function(t,n){xn(e)?kn(En(e)).then(t):t([e.getAsFile()])}))},kn=function(e){return new Promise((function(t,n){var r=[],o=0;!function e(n){n.createReader().readEntries((function(n){n.forEach((function(n){n.isDirectory?e(n):(o++,n.file((function(e){r.push(e),o===r.length&&t(r)})))}))}))}(e)}))},xn=function(e){return Mn(e)&&(En(e)||{}).isDirectory},Mn=function(e){return"webkitGetAsEntry"in e},En=function(e){return e.webkitGetAsEntry()},Tn=function(e){var t=[];try{if((t=Dn(e)).length)return t;t=Sn(e)}catch(e){}return t},Sn=function(e){var t=e.getData("url");return"string"==typeof t&&t.length?[t]:[]},Dn=function(e){var t=e.getData("text/html");if("string"==typeof t&&t.length){var n=t.match(/src\s*=\s*"(.+?)"/);if(n)return[n[1]]}return[]},Ln=[],Cn=function(e){return{pageLeft:e.pageX,pageTop:e.pageY,scopeLeft:e.offsetX||e.layerX,scopeTop:e.offsetY||e.layerY}},Pn=function(e){var t=Ln.find((function(t){return t.element===e}));if(t)return t;var n=On(e);return Ln.push(n),n},On=function(e){var t=[],n={dragenter:Rn,dragover:Yn,dragleave:Fn,drop:jn},r={};a(n,(function(n,o){r[n]=o(e,t),e.addEventListener(n,r[n],!1)}));var o={element:e,addListener:function(i){return t.push(i),function(){t.splice(t.indexOf(i),1),0===t.length&&(Ln.splice(Ln.indexOf(o),1),a(n,(function(t){e.removeEventListener(t,r[t],!1)})))}}};return o},Nn=function(e,t){var n,r=function(e,t){return"elementFromPoint"in e||(e=document),e.elementFromPoint(t.x,t.y)}("getRootNode"in(n=t)?n.getRootNode():document,{x:e.pageX-window.pageXOffset,y:e.pageY-window.pageYOffset});return r===t||t.contains(r)},An=null,In=function(e,t){try{e.dropEffect=t}catch(e){}},Rn=function(e,t){return function(e){e.preventDefault(),An=e.target,t.forEach((function(t){var n=t.element,r=t.onenter;Nn(e,n)&&(t.state="enter",r(Cn(e)))}))}},Yn=function(e,t){return function(e){e.preventDefault();var n=e.dataTransfer;vn(n).then((function(r){var o=!1;t.some((function(t){var a=t.filterElement,i=t.element,s=t.onenter,l=t.onexit,c=t.ondrag,u=t.allowdrop;In(n,"copy");var d=u(r);if(d)if(Nn(e,i)){if(o=!0,null===t.state)return t.state="enter",void s(Cn(e));if(t.state="over",a&&!d)return void In(n,"none");c(Cn(e))}else a&&!o&&In(n,"none"),t.state&&(t.state=null,l(Cn(e)));else In(n,"none")}))}))}},jn=function(e,t){return function(e){e.preventDefault();var n=e.dataTransfer;vn(n).then((function(n){t.forEach((function(t){var r=t.filterElement,o=t.element,a=t.ondrop,i=t.onexit,s=t.allowdrop;t.state=null,s(n)?r&&!Nn(e,o)||a(Cn(e),n):i(Cn(e))}))}))}},Fn=function(e,t){return function(e){An===e.target&&t.forEach((function(t){var n=t.onexit;t.state=null,n(Cn(e))}))}},Hn=function(e,t,n){e.classList.add("filepond--hopper");var r=n.catchesDropsOnPage,o=n.requiresDropOnElement,a=function(e,t,n){var r=Pn(t),o={element:e,filterElement:n,state:null,ondrop:function(){},onenter:function(){},ondrag:function(){},onexit:function(){},onload:function(){},allowdrop:function(){}};return o.destroy=r.addListener(o),o}(e,r?document.documentElement:e,o),i="",s="";a.allowdrop=function(e){return t(e)},a.ondrop=function(e,n){t(n)?(s="drag-drop",l.onload(n,e)):l.ondragend(e)},a.ondrag=function(e){l.ondrag(e)},a.onenter=function(e){s="drag-over",l.ondragstart(e)},a.onexit=function(e){s="drag-exit",l.ondragend(e)};var l={updateHopperState:function(){i!==s&&(e.dataset.hopperState=s,i=s)},onload:function(){},ondragstart:function(){},ondrag:function(){},ondragend:function(){},destroy:function(){a.destroy()}};return l},zn=!1,Bn=[],Un=function(e){vn(e.clipboardData).then((function(e){e.length&&Bn.forEach((function(t){return t(e)}))}))},Vn=function(){var e=function(e){t.onload(e)},t={destroy:function(){var t;t=e,fe(Bn,Bn.indexOf(t)),0===Bn.length&&(document.removeEventListener("paste",Un),zn=!1)},onload:function(){}};return function(e){Bn.includes(e)||(Bn.push(e),zn||(zn=!0,document.addEventListener("paste",Un)))}(e),t},Wn=null,qn=null,Gn=[],Jn=function(e,t){e.element.textContent=t},Kn=function(e,t,n){var r=e.query("GET_TOTAL_ITEMS");Jn(e,n+" "+t+", "+r+" "+(1===r?e.query("GET_LABEL_FILE_COUNT_SINGULAR"):e.query("GET_LABEL_FILE_COUNT_PLURAL"))),clearTimeout(qn),qn=setTimeout((function(){!function(e){e.element.textContent=""}(e)}),1500)},Qn=function(e){return e.element.parentNode.contains(document.activeElement)},Xn=function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename,o=t.query("GET_LABEL_FILE_PROCESSING_ABORTED");Jn(t,r+" "+o)},$n=function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename;Jn(t,n.status.main+" "+r+" "+n.status.sub)},Zn=N({create:function(e){var t=e.root,n=e.props;t.element.id="filepond--assistant-"+n.id,s(t.element,"role","status"),s(t.element,"aria-live","polite"),s(t.element,"aria-relevant","additions")},ignoreRect:!0,ignoreRectUpdate:!0,write:A({DID_LOAD_ITEM:function(e){var t=e.root,n=e.action;if(Qn(t)){t.element.textContent="";var r=t.query("GET_ITEM",n.id);Gn.push(r.filename),clearTimeout(Wn),Wn=setTimeout((function(){Kn(t,Gn.join(", "),t.query("GET_LABEL_FILE_ADDED")),Gn.length=0}),750)}},DID_REMOVE_ITEM:function(e){var t=e.root,n=e.action;if(Qn(t)){var r=n.item;Kn(t,r.filename,t.query("GET_LABEL_FILE_REMOVED"))}},DID_COMPLETE_ITEM_PROCESSING:function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename,o=t.query("GET_LABEL_FILE_PROCESSING_COMPLETE");Jn(t,r+" "+o)},DID_ABORT_ITEM_PROCESSING:Xn,DID_REVERT_ITEM_PROCESSING:Xn,DID_THROW_ITEM_REMOVE_ERROR:$n,DID_THROW_ITEM_LOAD_ERROR:$n,DID_THROW_ITEM_INVALID:$n,DID_THROW_ITEM_PROCESSING_ERROR:$n}),tag:"span",name:"assistant"}),er=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.replace(new RegExp(t+".","g"),(function(e){return e.charAt(1).toUpperCase()}))},tr=function(e){var t=e.ref.list.childViews[0].childViews[0];return t?{top:t.rect.element.marginTop,bottom:t.rect.element.marginBottom}:{top:0,bottom:0}},nr=function(e,t){var n=0,r=0;return e.ref.list.childViews[0].childViews.forEach((function(e,o){if(!(o>=t)){var a=e.rect.element,i=a.height+a.marginTop+a.marginBottom;r+=i,n+=e.markedForRemoval?e.opacity*i:i}})),{visual:n,bounds:r}},rr=function(e){var t=e.ref.measureHeight||null;return{cappedHeight:parseInt(e.style.maxHeight,10)||null,fixedHeight:0===t?null:t}},or=function(e,t){var n=e.query("GET_ALLOW_REPLACE"),r=e.query("GET_ALLOW_MULTIPLE"),o=e.query("GET_TOTAL_ITEMS"),a=e.query("GET_MAX_FILES"),i=t.length;return!r&&i>1||!!(q(a=r||n?a:1)&&o+i>a)&&(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:Xe("warning",0,"Max files")}),!0)},ar=A({DID_SET_ALLOW_BROWSE:function(e){var t=e.root,n=e.props;e.action.value?t.ref.browser=t.appendChildView(t.createChildView(un,Object.assign({},n,{onload:function(e){if(or(t,e))return!1;pe(e,(function(e){t.dispatch("ADD_ITEM",{interactionMethod:ce,source:e,index:0})}))}})),0):t.ref.browser&&t.removeChildView(t.ref.browser)},DID_SET_ALLOW_DROP:function(e){var t=e.root,n=(e.props,e.action);if(n.value&&!t.ref.hopper){var r=Hn(t.element,(function(e){return!or(t,e)&&(!t.query("GET_DROP_VALIDATION")||e.every((function(e){return Ee("ALLOW_HOPPER_ITEM",e,{query:t.query}).every((function(e){return!0===e}))})))}),{catchesDropsOnPage:t.query("GET_DROP_ON_PAGE"),requiresDropOnElement:t.query("GET_DROP_ON_ELEMENT")});r.onload=function(e,n){var r=t.ref.list.childViews[0],o=on(r,{left:n.scopeLeft,top:n.scopeTop-t.ref.list.rect.outer.top+t.ref.list.element.scrollTop});pe(e,(function(e){t.dispatch("ADD_ITEM",{interactionMethod:le,source:e,index:o})})),t.dispatch("DID_DROP",{position:n}),t.dispatch("DID_END_DRAG",{position:n})},r.ondragstart=function(e){t.dispatch("DID_START_DRAG",{position:e})},r.ondrag=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Date.now(),o=null;return function(){for(var a=arguments.length,i=Array(a),s=0;s<a;s++)i[s]=arguments[s];clearTimeout(o);var l=Date.now()-r,c=function(){r=Date.now(),e.apply(void 0,i)};l<t?n||(o=setTimeout(c,t-l)):c()}}((function(e){t.dispatch("DID_DRAG",{position:e})})),r.ondragend=function(e){t.dispatch("DID_END_DRAG",{position:e})},t.ref.hopper=r,t.ref.drip=t.appendChildView(t.createChildView(_n))}else!n.value&&t.ref.hopper&&(t.ref.hopper.destroy(),t.ref.hopper=null,t.removeChildView(t.ref.drip))},DID_SET_ALLOW_PASTE:function(e){var t=e.root;e.action.value?(t.ref.paster=Vn(),t.ref.paster.onload=function(e){pe(e,(function(e){t.dispatch("ADD_ITEM",{interactionMethod:ue,source:e,index:0})}))}):t.ref.paster&&(t.ref.paster.destroy(),t.ref.paster=null)}}),ir=N({name:"root",read:function(e){var t=e.root;t.ref.measure&&(t.ref.measureHeight=t.ref.measure.offsetHeight)},create:function(e){var t=e.root,n=e.props,r=t.query("GET_ID");r&&(t.element.id=r);var o=t.query("GET_CLASS_NAME");o&&o.split(" ").forEach((function(e){t.element.classList.add(e)})),t.ref.label=t.appendChildView(t.createChildView(fn,Object.assign({},n,{translateY:null,caption:t.query("GET_LABEL_IDLE")}))),t.ref.list=t.appendChildView(t.createChildView(sn,{translateY:null})),t.ref.panel=t.appendChildView(t.createChildView(Zt,{name:"panel-root"})),t.ref.assistant=t.appendChildView(t.createChildView(Zn,Object.assign({},n))),t.ref.measure=_t("div"),t.ref.measure.style.height="100%",t.element.appendChild(t.ref.measure),t.ref.bounds=null,t.query("GET_STYLES").filter((function(e){return!j(e.value)})).map((function(e){var n=e.name,r=e.value;t.element.dataset[n]=r}))},write:function(e){var t=e.root,n=e.props,r=e.actions,o=t.ref.bounds;o||(o=t.ref.bounds=rr(t),t.element.removeChild(t.ref.measure),t.ref.measure=null),ar({root:t,props:n,actions:r}),r.filter((function(e){return/^DID_SET_STYLE_/.test(e.type)})).filter((function(e){return!j(e.data.value)})).map((function(e){var n=e.type,r=e.data,o=er(n.substr(8).toLowerCase(),"_");t.element.dataset[o]=r.value,t.invalidateLayout()}));var a=t.ref,i=a.hopper,s=a.label,l=a.list,c=a.panel;i&&i.updateHopperState();var u=t.query("GET_PANEL_ASPECT_RATIO"),d=t.query("GET_ALLOW_MULTIPLE"),h=t.query("GET_TOTAL_ITEMS"),p=d?t.query("GET_MAX_FILES")||1e6:1,f=h===p,m=r.find((function(e){return"DID_ADD_ITEM"===e.type}));if(f&&m){var g=m.data.interactionMethod;s.opacity=0,d?s.translateY=-40:g===se?s.translateX=40:s.translateY=g===ce?40:30}else f||(s.opacity=1,s.translateX=0,s.translateY=0);var _=tr(t),v=nr(t,p),b=s.rect.element.height,y=!d||f?0:b,w=f?l.rect.element.marginTop:0,k=0===h?0:l.rect.element.marginBottom,x=y+w+v.visual+k,M=y+w+v.bounds+k;if(l.translateY=Math.max(0,y-l.rect.element.marginTop)-_.top,u){var E=t.rect.element.width*u;c.scalable=!1,c.height=E;var T=E-y-(k-_.bottom)-(f?w:0);v.visual>T?l.overflow=T:l.overflow=null,t.height=E}else if(o.fixedHeight){c.scalable=!1;var S=o.fixedHeight-y-(k-_.bottom)-(f?w:0);v.visual>S?l.overflow=S:l.overflow=null}else if(o.cappedHeight){var D=x>=o.cappedHeight,L=Math.min(o.cappedHeight,x);c.scalable=!0,c.height=D?L:L-_.top-_.bottom;var C=L-y-(k-_.bottom)-(f?w:0);x>o.cappedHeight&&v.visual>C?l.overflow=C:l.overflow=null,t.height=Math.min(o.cappedHeight,M-_.top-_.bottom)}else{var P=h>0?_.top+_.bottom:0;c.scalable=!0,c.height=Math.max(b,x-P),t.height=Math.max(b,M-P)}},destroy:function(e){var t=e.root;t.ref.paster&&t.ref.paster.destroy(),t.ref.hopper&&t.ref.hopper.destroy()},mixins:{styles:["height"]}}),sr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null,n=Se(),r=o(ne(n),[Oe,ie(n)],[gt,ae(n)]);r.dispatch("SET_OPTIONS",{options:e});var a=ir(r,{id:he()}),s=!1,c=!1,d={_read:function(){s||(a._read(),c=a.rect.element.hidden)},_write:function(e){if(!c){var t=r.processActionQueue().filter((function(e){return!/^SET_/.test(e.type)}));s&&!t.length||(m(t),s=a._write(e,t),be(r.query("GET_ITEMS")),s&&r.processDispatchQueue())}}},h=function(e){return function(t){var n={type:e};if(!t)return n;if(t.hasOwnProperty("error")&&(n.error=t.error?Object.assign({},t.error):null),t.status&&(n.status=Object.assign({},t.status)),t.file&&(n.output=t.file),t.source)n.file=t.source;else if(t.item||t.id){var o=t.item?t.item:r.query("GET_ITEM",t.id);n.file=o?ve(o):null}return t.items&&(n.items=t.items.map(ve)),/progress/.test(e)&&(n.progress=t.progress),n}},p={DID_DESTROY:h("destroy"),DID_INIT:h("init"),DID_THROW_MAX_FILES:h("warning"),DID_START_ITEM_LOAD:h("addfilestart"),DID_UPDATE_ITEM_LOAD_PROGRESS:h("addfileprogress"),DID_LOAD_ITEM:h("addfile"),DID_THROW_ITEM_INVALID:[h("error"),h("addfile")],DID_THROW_ITEM_LOAD_ERROR:[h("error"),h("addfile")],DID_PREPARE_OUTPUT:h("preparefile"),DID_START_ITEM_PROCESSING:h("processfilestart"),DID_UPDATE_ITEM_PROCESS_PROGRESS:h("processfileprogress"),DID_ABORT_ITEM_PROCESSING:h("processfileabort"),DID_COMPLETE_ITEM_PROCESSING:h("processfile"),DID_REVERT_ITEM_PROCESSING:h("processfilerevert"),DID_THROW_ITEM_PROCESSING_ERROR:[h("error"),h("processfile")],DID_REMOVE_ITEM:h("removefile"),DID_UPDATE_ITEMS:h("updatefiles")},f=function(e){var t=Object.assign({pond:T},e);delete t.type,a.element.dispatchEvent(new CustomEvent("FilePond:"+e.type,{detail:t,bubbles:!0,cancelable:!0,composed:!0}));var n=[];e.hasOwnProperty("error")&&n.push(e.error),e.hasOwnProperty("file")&&n.push(e.file);var o=["type","error","file"];Object.keys(e).filter((function(e){return!o.includes(e)})).forEach((function(t){return n.push(e[t])})),T.fire.apply(T,[e.type].concat(n));var i=r.query("GET_ON"+e.type.toUpperCase());i&&i.apply(void 0,n)},m=function(e){e.length&&e.forEach((function(e){if(p[e.type]){var t=p[e.type];(Array.isArray(t)?t:[t]).forEach((function(t){setTimeout((function(){f(t(e.data))}),0)}))}}))},g=function(e){return r.dispatch("SET_OPTIONS",{options:e})},_=function(e){return r.query("GET_ACTIVE_ITEM",e)},v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,o){r.dispatch("ADD_ITEM",{interactionMethod:se,source:e,index:t.index,success:n,failure:o,options:t})}))},b=function(e){return r.dispatch("REMOVE_ITEM",{query:e}),null===r.query("GET_ACTIVE_ITEM",e)},y=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Promise((function(e,n){var r=[],o={};if(Y(t[0]))r.push.apply(r,u(t[0])),Object.assign(o,t[1]||{});else{var a=t[t.length-1];"object"!==(void 0===a?"undefined":l(a))||a instanceof Blob||Object.assign(o,t.pop()),r.push.apply(r,t)}var i=[],s=pe(r,(function(e){i.push(v(e,o))}));Promise.all(s).then((function(){Promise.all(i).then((function(t){e(t)}))}))}))},k=function(){return r.query("GET_ACTIVE_ITEMS")},x=function(e){return new Promise((function(t,n){r.dispatch("REQUEST_ITEM_PROCESSING",{query:e,success:function(e){t(e)},failure:function(e){n(e)}})}))},M=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Array.isArray(t[0])?t[0]:t;if(!r.length){var o=k().filter((function(e){return e.status!==ot.PROCESSING&&e.status!==ot.PROCESSING_COMPLETE&&e.status!==ot.PROCESSING_REVERT_ERROR}));return Promise.all(o.map(x))}return Promise.all(r.map(x))},E=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Array.isArray(t[0])?t[0]:t,o=k();if(!r.length)return Promise.all(o.map(b));var a=r.map((function(e){return w(e)?o[e]?o[e].id:null:e})).filter((function(e){return e}));return a.map(b)},T=Object.assign({},me(),d,oe(r,n),{setOptions:g,addFile:v,addFiles:y,getFile:_,processFile:x,removeFile:b,getFiles:k,processFiles:M,removeFiles:E,browse:function(){var e=a.element.querySelector("input[type=file]");e&&e.click()},destroy:function(){T.fire("destroy",a.element),r.dispatch("ABORT_ALL"),a._destroy(),r.dispatch("DID_DESTROY")},insertBefore:function(e){return I(a.element,e)},insertAfter:function(e){return R(a.element,e)},appendTo:function(e){return e.appendChild(a.element)},replaceElement:function(e){I(a.element,e),e.parentNode.removeChild(e),t=e},restoreElement:function(){t&&(R(t,a.element),a.element.parentNode.removeChild(a.element),t=null)},isAttachedTo:function(e){return a.element===e||t===e},element:{get:function(){return a.element}}});return r.dispatch("DID_INIT"),i(T)},lr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};a(Se(),(function(e,n){t[e]=n[0]}));var n=sr(Object.assign({},t,e));return n},cr=function(e){return er(e.replace(/^data-/,""))},ur=function e(t,n){a(n,(function(n,r){a(t,(function(e,o){var a=new RegExp(n);if(a.test(e)&&(delete t[e],!1!==r))if(U(r))t[r]=o;else{var i,s=r.group;X(r)&&!t[s]&&(t[s]={}),t[s][(i=e.replace(a,""),i.charAt(0).toLowerCase()+i.slice(1))]=o}})),r.mapping&&e(t[r.group],r.mapping)}))},dr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];a(e.attributes,(function(t){n.push(e.attributes[t])}));var r=n.filter((function(e){return e.name})).reduce((function(t,n){var r=s(e,n.name);return t[cr(n.name)]=r===n.name||r,t}),{});return ur(r,t),r},hr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};Ee("SET_ATTRIBUTE_TO_OPTION_MAP",n);var r=Object.assign({},t),o=dr("FIELDSET"===e.nodeName?e.querySelector("input[type=file]"):e,n);Object.keys(o).forEach((function(e){X(o[e])?(X(r[e])||(r[e]={}),Object.assign(r[e],o[e])):r[e]=o[e]})),r.files=(t.files||[]).concat([].concat(u(e.querySelectorAll("input:not([type=file])"))).map((function(e){return{source:e.value,options:{type:e.dataset.type}}})));var a=lr(r);return e.files&&[].concat(u(e.files)).forEach((function(e){a.addFile(e)})),a.replaceElement(e),a},pr=function(){return r(arguments.length<=0?void 0:arguments[0])?hr.apply(void 0,arguments):lr.apply(void 0,arguments)},fr=["fire","_read","_write"],mr=function(e){var t={};return ge(e,t,fr),t},gr=function(e,t){return e.replace(/(?:{([a-zA-Z]+)})/g,(function(e,n){return t[n]}))},_r=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],vr=["css","csv","html","txt"],br={zip:"zip|compressed",epub:"application/epub+zip"},yr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=e.toLowerCase(),_r.includes(e)?"image/"+("jpg"===e?"jpeg":"svg"===e?"svg+xml":e):vr.includes(e)?"text/"+e:br[e]||null},wr=function(e){var t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),n=URL.createObjectURL(t),r=new Worker(n);return{transfer:function(e,t){},post:function(e,t,n){var o=he();r.onmessage=function(e){e.data.id===o&&t(e.data.message)},r.postMessage({id:o,message:e},n)},terminate:function(){r.terminate(),URL.revokeObjectURL(n)}}},kr=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e}))},xr=function(e,t){var n=e.slice(0,e.size,e.type);return n.lastModifiedDate=e.lastModifiedDate,n.name=t,n},Mr=function(e){return xr(e,e.name)},Er=[],Tr=function(e){if(!Er.includes(e)){Er.push(e);var t,n=e({addFilter:Te,utils:{Type:ke,forin:a,isString:U,isFile:dt,toNaturalFileSize:xt,replaceInString:gr,getExtensionFromFilename:Re,getFilenameWithoutExtension:rt,guesstimateMimeType:yr,getFileFromBlob:He,getFilenameFromURL:Ie,createRoute:A,createWorker:wr,createView:N,createItemAPI:ve,loadImage:kr,copyFile:Mr,renameFile:xr,createBlob:ze,applyFilterChain:Me,text:vt,getNumericAspectRatioFromString:Ce},views:{fileActionButton:kt}});t=n.options,Object.assign(De,t)}},Sr=(jt="undefined"!=typeof window&&void 0!==window.document&&!("[object OperaMini]"===Object.prototype.toString.call(window.operamini))&&"visibilityState"in document&&"Promise"in window&&"slice"in Blob.prototype&&"URL"in window&&"createObjectURL"in window.URL&&"performance"in window,function(){return jt}),Dr={apps:[]},Lr=function(){};if(e.FileStatus={},e.OptionTypes={},e.create=Lr,e.destroy=Lr,e.parse=Lr,e.find=Lr,e.registerPlugin=Lr,e.getOptions=Lr,e.setOptions=Lr,e.FileOrigin={},Sr()){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,r="__framePainter";if(window[r])return window[r].readers.push(e),void window[r].writers.push(t);window[r]={readers:[e],writers:[t]};var o=window[r],a=1e3/n,i=null,s=function e(t){window.requestAnimationFrame(e),i||(i=t);var n=t-i;n<=a||(i=t-n%a,o.readers.forEach((function(e){return e()})),o.writers.forEach((function(e){return e(t)})))};s(performance.now())}((function(){Dr.apps.forEach((function(e){return e._read()}))}),(function(e){Dr.apps.forEach((function(t){return t._write(e)}))}));var Cr=function t(){document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported:Sr,create:e.create,destroy:e.destroy,parse:e.parse,find:e.find,registerPlugin:e.registerPlugin,setOptions:e.setOptions}})),document.removeEventListener("DOMContentLoaded",t)};"loading"!==document.readyState?setTimeout((function(){return Cr()}),0):document.addEventListener("DOMContentLoaded",Cr);var Pr=function(){return a(Se(),(function(t,n){e.OptionTypes[t]=n[1]}))};e.FileOrigin=Object.assign({},it),e.FileStatus=Object.assign({},ot),e.OptionTypes={},Pr(),e.create=function(){var t=pr.apply(void 0,arguments);return t.on("destroy",e.destroy),Dr.apps.push(t),mr(t)},e.destroy=function(e){var t=Dr.apps.findIndex((function(t){return t.isAttachedTo(e)}));return t>=0&&(Dr.apps.splice(t,1)[0].restoreElement(),!0)},e.parse=function(t){return[].concat(u(t.querySelectorAll(".filepond"))).filter((function(e){return!Dr.apps.find((function(t){return t.isAttachedTo(e)}))})).map((function(t){return e.create(t)}))},e.find=function(e){var t=Dr.apps.find((function(t){return t.isAttachedTo(e)}));return t?mr(t):null},e.registerPlugin=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach(Tr),Pr()},e.getOptions=function(){var e={};return a(Se(),(function(t,n){e[t]=n[0]})),e},e.setOptions=function(t){return X(t)&&(Dr.apps.forEach((function(e){e.setOptions(t)})),function(e){a(e,(function(e,t){De[e]&&(De[e][0]=ee(t,De[e][0],De[e][1]))}))}(t)),e.getOptions()}}e.supported=Sr,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(0))&&r.__esModule?r:{default:r};function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 l(e,t){return!t||"object"!==a(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 c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){function t(){return i(this,t),l(this,c(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&&u(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e="div",t=Object.assign({},this.props);return this.props.wrapperComponent&&(e=this.props.wrapperComponent.type,delete(t=Object.assign(t,this.props.wrapperComponent.props)).wrapperComponent),this.props.enabled&&(t.draggable="true",t.onDragEnd=this.onDragEnd.bind(this),t.onDragStart=this.onDragStart.bind(this)),delete t.enabled,o.default.createElement(e,t,t.children)}},{key:"onDragStart",value:function(e){"function"==typeof this.props.onDragStart&&this.props.onDragStart(e);var t=Object.assign({},this.props);this.props.wrapperComponent&&(t=Object.assign(t,this.props.wrapperComponent.props)),e.dataTransfer.setData(t.type,t.data)}},{key:"onDragEnd",value:function(e){"function"==typeof this.props.onDragEnd&&this.props.onDragEnd(e)}}])&&s(n.prototype,r),a&&s(n,a),t}(o.default.Component);t.default=d,d.defaultProps={enabled:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(0)),o=a(n(449));function a(e){return e&&e.__esModule?e:{default:e}}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return!t||"object"!==i(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 u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){return e.dataTransfer?e.dataTransfer.types:[]}var p=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=c(this,u(t).call(this,e))).state={over:!1},n.droppable=r.default.createRef(),n}var n,a,i;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&&d(e,t)}(t,e),n=t,(a=[{key:"render",value:function(){var e="div",t=Object.assign({},this.props);this.props.wrapperComponent&&(e=this.props.wrapperComponent.type,t=Object.assign(t,this.props.wrapperComponent.props));var n="Droppable";return t.className&&(n+=" ".concat(t.className)),this.state.over&&(n+=" over"),r.default.createElement(e,s({ref:this.droppable,className:n},function(e){var t=["types","className","enabled","wrapperComponent"];return Object.keys(e).reduce((function(n,r){return t.includes(r)||(n[r]=e[r]),n}),{})}(t),{onDrop:this.onDrop.bind(this),onDragOver:this.onDragOver.bind(this),onDragEnter:this.onDragEnter.bind(this),onDragLeave:this.onDragLeave.bind(this),onDragExit:this.onDragLeave.bind(this)}),t.children)}},{key:"onDragOver",value:function(e){e.preventDefault(),this.allowed(h(e))&&"function"==typeof this.props.onDragOver&&this.props.onDragOver(e)}},{key:"onDragEnter",value:function(e){e.preventDefault(),this.state.over||this.allowed(h(e))&&("function"==typeof this.props.onDragEnter&&this.props.onDragEnter(e),this.setState({over:!0}))}},{key:"onDragLeave",value:function(e){if(e.preventDefault(),this.allowed(h(e))){var t=!0;(e.clientX<=this.position.left||e.clientX>=this.position.right)&&(t=!1),(e.clientY<=this.position.top||e.clientY>=this.position.bottom)&&(t=!1),t||(this.setState({over:!1}),"function"==typeof this.props.onDragLeave&&this.props.onDragLeave(e))}}},{key:"onDrop",value:function(e){if(e.preventDefault(),this.allowed(h(e))){this.setState({over:!1});var t=Object.assign({},this.props);this.props.wrapperComponent&&(t=Object.assign(t,this.props.wrapperComponent.props));var n=t.types?[].concat(t.types).reduce((function(t,n){return t[n]=e.dataTransfer.getData(n),t}),{}):null;"function"==typeof this.props.onDrop&&this.props.onDrop(n,e)}}},{key:"allowed",value:function(e){var t=Object.assign({},this.props);if(this.props.wrapperComponent&&(t=Object.assign(t,this.props.wrapperComponent.props)),!t.enabled)return!1;var n=o.default.toArray(e);return!t.types||[].concat(t.types).reduce((function(e,t){return n.indexOf(t)>=0||e}),!1)}},{key:"componentDidMount",value:function(){var e=this.droppable.current;this.position={top:e.offsetTop+5,left:e.offsetLeft+5,right:e.offsetLeft+e.offsetWidth-5,bottom:e.offsetTop+e.offsetHeight-5}}}])&&l(n.prototype,a),i&&l(n,i),t}(r.default.Component);t.default=p,p.defaultProps={enabled:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={toArray:function(e){for(var t=[],n=e.length>>>0;n--;)t[n]=e[n];return t}};t.default=r},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}}},function(e,t,n){var r=n(453);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(40),i=n.n(a),s=n(12),l=n.n(s),c=n(13),u=n.n(c),d=n(14),h=n.n(d),p=n(15),f=n.n(p),m=n(6),g=n.n(m),_=n(4),v=n.n(_),b=n(8),y=n.n(b),w=n(11),k=n.n(w),x=n(1),M=n.n(x),E=o.a.createContext(),T=n(9),S=n.n(T),D=n(10);function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(){return(P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function O(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 N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t){return!t||"object"!=typeof 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 R(e){return function(){return e}}var Y=function(){};Y.thatReturns=R,Y.thatReturnsFalse=R(!1),Y.thatReturnsTrue=R(!0),Y.thatReturnsNull=R(null),Y.thatReturnsThis=function(){return this},Y.thatReturnsArgument=function(e){return e};var j=Y;var F=function(e,t,n,r,o,a,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}},H=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;function U(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(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;var V="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";var W=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){e.exports=function(){function e(e,t,n,r,o,a){a!==V&&F(!1,"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")}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,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=j,n.PropTypes=n,n}()})),q={HIDE:"__react_tooltip_hide_event",REBUILD:"__react_tooltip_rebuild_event",SHOW:"__react_tooltip_show_event"},G=function(e,t){var n;"function"==typeof window.CustomEvent?n=new window.CustomEvent(e,{detail:t}):((n=document.createEvent("Event")).initEvent(e,!1,!0),n.detail=t),window.dispatchEvent(n)};var J=function(e,t){var n=this.state.show,r=this.props.id,o=this.isCapture(t.currentTarget),a=t.currentTarget.getAttribute("currentItem");o||t.stopPropagation(),n&&"true"===a?e||this.hideTooltip(t):(t.currentTarget.setAttribute("currentItem","true"),K(t.currentTarget,this.getTargetArray(r)),this.showTooltip(t))},K=function(e,t){for(var n=0;n<t.length;n++)e!==t[n]?t[n].setAttribute("currentItem","false"):t[n].setAttribute("currentItem","true")},Q={id:"9b69f92e-d3fe-498b-b1b4-c5e63a51b0cf",set:function(e,t,n){this.id in e?e[this.id][t]=n:Object.defineProperty(e,this.id,{configurable:!0,value:C({},t,n)})},get:function(e,t){var n=e[this.id];if(void 0!==n)return n[t]}};var X=function(e,t,n){var r=t.respectEffect,o=void 0!==r&&r,a=t.customEvent,i=void 0!==a&&a,s=this.props.id,l=n.target.getAttribute("data-tip")||null,c=n.target.getAttribute("data-for")||null,u=n.target;if(!this.isCustomEvent(u)||i){var d=null==s&&null==c||c===s;if(null!=l&&(!o||"float"===this.getEffect(u))&&d){var h=function(e){var t={};for(var n in e)"function"==typeof e[n]?t[n]=e[n].bind(e):t[n]=e[n];return t}(n);h.currentTarget=u,e(h)}}},$=function(e,t){var n={};return e.forEach((function(e){var r=e.getAttribute(t);r&&r.split(" ").forEach((function(e){return n[e]=!0}))})),n},Z=function(){return document.getElementsByTagName("body")[0]};function ee(e,t,n,r,o,a,i){for(var s=oe(n),l=s.width,c=s.height,u=oe(t),d=u.width,h=u.height,p=ae(e,t,a),f=p.mouseX,m=p.mouseY,g=ie(a,d,h,l,c),_=se(i),v=_.extraOffset_X,b=_.extraOffset_Y,y=window.innerWidth,w=window.innerHeight,k=le(n),x=k.parentTop,M=k.parentLeft,E=function(e){var t=g[e].l;return f+t+v},T=function(e){var t=g[e].t;return m+t+b},S=function(e){return function(e){var t=g[e].r;return f+t+v}(e)>y},D=function(e){return function(e){var t=g[e].b;return m+t+b}(e)>w},L=function(e){return function(e){return E(e)<0}(e)||S(e)||function(e){return T(e)<0}(e)||D(e)},C=function(e){return!L(e)},P=["top","bottom","left","right"],O=[],N=0;N<4;N++){var A=P[N];C(A)&&O.push(A)}var I,R=!1,Y=o!==r;return C(o)&&Y?(R=!0,I=o):O.length>0&&Y&&L(o)&&L(r)&&(R=!0,I=O[0]),R?{isNewState:!0,newState:{place:I}}:{isNewState:!1,position:{left:parseInt(E(r)-M,10),top:parseInt(T(r)-x,10)}}}var te,ne,re,oe=function(e){var t=e.getBoundingClientRect(),n=t.height,r=t.width;return{height:parseInt(n,10),width:parseInt(r,10)}},ae=function(e,t,n){var r=t.getBoundingClientRect(),o=r.top,a=r.left,i=oe(t),s=i.width,l=i.height;return"float"===n?{mouseX:e.clientX,mouseY:e.clientY}:{mouseX:a+s/2,mouseY:o+l/2}},ie=function(e,t,n,r,o){var a,i,s,l;return"float"===e?(a={l:-r/2,r:r/2,t:-(o+3+2),b:-3},s={l:-r/2,r:r/2,t:15,b:o+3+2+12},l={l:-(r+3+2),r:-3,t:-o/2,b:o/2},i={l:3,r:r+3+2,t:-o/2,b:o/2}):"solid"===e&&(a={l:-r/2,r:r/2,t:-(n/2+o+2),b:-n/2},s={l:-r/2,r:r/2,t:n/2,b:n/2+o+2},l={l:-(r+t/2+2),r:-t/2,t:-o/2,b:o/2},i={l:t/2,r:r+t/2+2,t:-o/2,b:o/2}),{top:a,bottom:s,left:l,right:i}},se=function(e){var t=0,n=0;for(var r in"[object String]"===Object.prototype.toString.apply(e)&&(e=JSON.parse(e.toString().replace(/\'/g,'"'))),e)"top"===r?n-=parseInt(e[r],10):"bottom"===r?n+=parseInt(e[r],10):"left"===r?t-=parseInt(e[r],10):"right"===r&&(t+=parseInt(e[r],10));return{extraOffset_X:t,extraOffset_Y:n}},le=function(e){for(var t=e;t&&"none"===window.getComputedStyle(t).getPropertyValue("transform");)t=t.parentElement;return{parentTop:t&&t.getBoundingClientRect().top||0,parentLeft:t&&t.getBoundingClientRect().left||0}};function ce(e,t,n,r){if(t)return t;if(null!=n)return n;if(null===n)return null;var a=/<br\s*\/?>/;return r&&"false"!==r&&a.test(e)?e.split(a).map((function(e,t){return o.a.createElement("span",{key:t,className:"multi-line"},e)})):e}function ue(e){var t={};return Object.keys(e).filter((function(e){return/(^aria-\w+$|^role$)/.test(e)})).forEach((function(n){t[n]=e[n]})),t}!function(e){if(e&&"undefined"!=typeof window){var t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t)}}('.__react_component_tooltip {\n border-radius: 3px;\n display: inline-block;\n font-size: 13px;\n left: -999em;\n opacity: 0;\n padding: 8px 21px;\n position: fixed;\n pointer-events: none;\n transition: opacity 0.3s ease-out;\n top: -999em;\n visibility: hidden;\n z-index: 999;\n}\n.__react_component_tooltip.allow_hover, .__react_component_tooltip.allow_click {\n pointer-events: auto;\n}\n.__react_component_tooltip:before, .__react_component_tooltip:after {\n content: "";\n width: 0;\n height: 0;\n position: absolute;\n}\n.__react_component_tooltip.show {\n opacity: 0.9;\n margin-top: 0px;\n margin-left: 0px;\n visibility: visible;\n}\n.__react_component_tooltip.type-dark {\n color: #fff;\n background-color: #222;\n}\n.__react_component_tooltip.type-dark.place-top:after {\n border-top-color: #222;\n border-top-style: solid;\n border-top-width: 6px;\n}\n.__react_component_tooltip.type-dark.place-bottom:after {\n border-bottom-color: #222;\n border-bottom-style: solid;\n border-bottom-width: 6px;\n}\n.__react_component_tooltip.type-dark.place-left:after {\n border-left-color: #222;\n border-left-style: solid;\n border-left-width: 6px;\n}\n.__react_component_tooltip.type-dark.place-right:after {\n border-right-color: #222;\n border-right-style: solid;\n border-right-width: 6px;\n}\n.__react_component_tooltip.type-dark.border {\n border: 1px solid #fff;\n}\n.__react_component_tooltip.type-dark.border.place-top:before {\n border-top: 8px solid #fff;\n}\n.__react_component_tooltip.type-dark.border.place-bottom:before {\n border-bottom: 8px solid #fff;\n}\n.__react_component_tooltip.type-dark.border.place-left:before {\n border-left: 8px solid #fff;\n}\n.__react_component_tooltip.type-dark.border.place-right:before {\n border-right: 8px solid #fff;\n}\n.__react_component_tooltip.type-success {\n color: #fff;\n background-color: #8DC572;\n}\n.__react_component_tooltip.type-success.place-top:after {\n border-top-color: #8DC572;\n border-top-style: solid;\n border-top-width: 6px;\n}\n.__react_component_tooltip.type-success.place-bottom:after {\n border-bottom-color: #8DC572;\n border-bottom-style: solid;\n border-bottom-width: 6px;\n}\n.__react_component_tooltip.type-success.place-left:after {\n border-left-color: #8DC572;\n border-left-style: solid;\n border-left-width: 6px;\n}\n.__react_component_tooltip.type-success.place-right:after {\n border-right-color: #8DC572;\n border-right-style: solid;\n border-right-width: 6px;\n}\n.__react_component_tooltip.type-success.border {\n border: 1px solid #fff;\n}\n.__react_component_tooltip.type-success.border.place-top:before {\n border-top: 8px solid #fff;\n}\n.__react_component_tooltip.type-success.border.place-bottom:before {\n border-bottom: 8px solid #fff;\n}\n.__react_component_tooltip.type-success.border.place-left:before {\n border-left: 8px solid #fff;\n}\n.__react_component_tooltip.type-success.border.place-right:before {\n border-right: 8px solid #fff;\n}\n.__react_component_tooltip.type-warning {\n color: #fff;\n background-color: #F0AD4E;\n}\n.__react_component_tooltip.type-warning.place-top:after {\n border-top-color: #F0AD4E;\n border-top-style: solid;\n border-top-width: 6px;\n}\n.__react_component_tooltip.type-warning.place-bottom:after {\n border-bottom-color: #F0AD4E;\n border-bottom-style: solid;\n border-bottom-width: 6px;\n}\n.__react_component_tooltip.type-warning.place-left:after {\n border-left-color: #F0AD4E;\n border-left-style: solid;\n border-left-width: 6px;\n}\n.__react_component_tooltip.type-warning.place-right:after {\n border-right-color: #F0AD4E;\n border-right-style: solid;\n border-right-width: 6px;\n}\n.__react_component_tooltip.type-warning.border {\n border: 1px solid #fff;\n}\n.__react_component_tooltip.type-warning.border.place-top:before {\n border-top: 8px solid #fff;\n}\n.__react_component_tooltip.type-warning.border.place-bottom:before {\n border-bottom: 8px solid #fff;\n}\n.__react_component_tooltip.type-warning.border.place-left:before {\n border-left: 8px solid #fff;\n}\n.__react_component_tooltip.type-warning.border.place-right:before {\n border-right: 8px solid #fff;\n}\n.__react_component_tooltip.type-error {\n color: #fff;\n background-color: #BE6464;\n}\n.__react_component_tooltip.type-error.place-top:after {\n border-top-color: #BE6464;\n border-top-style: solid;\n border-top-width: 6px;\n}\n.__react_component_tooltip.type-error.place-bottom:after {\n border-bottom-color: #BE6464;\n border-bottom-style: solid;\n border-bottom-width: 6px;\n}\n.__react_component_tooltip.type-error.place-left:after {\n border-left-color: #BE6464;\n border-left-style: solid;\n border-left-width: 6px;\n}\n.__react_component_tooltip.type-error.place-right:after {\n border-right-color: #BE6464;\n border-right-style: solid;\n border-right-width: 6px;\n}\n.__react_component_tooltip.type-error.border {\n border: 1px solid #fff;\n}\n.__react_component_tooltip.type-error.border.place-top:before {\n border-top: 8px solid #fff;\n}\n.__react_component_tooltip.type-error.border.place-bottom:before {\n border-bottom: 8px solid #fff;\n}\n.__react_component_tooltip.type-error.border.place-left:before {\n border-left: 8px solid #fff;\n}\n.__react_component_tooltip.type-error.border.place-right:before {\n border-right: 8px solid #fff;\n}\n.__react_component_tooltip.type-info {\n color: #fff;\n background-color: #337AB7;\n}\n.__react_component_tooltip.type-info.place-top:after {\n border-top-color: #337AB7;\n border-top-style: solid;\n border-top-width: 6px;\n}\n.__react_component_tooltip.type-info.place-bottom:after {\n border-bottom-color: #337AB7;\n border-bottom-style: solid;\n border-bottom-width: 6px;\n}\n.__react_component_tooltip.type-info.place-left:after {\n border-left-color: #337AB7;\n border-left-style: solid;\n border-left-width: 6px;\n}\n.__react_component_tooltip.type-info.place-right:after {\n border-right-color: #337AB7;\n border-right-style: solid;\n border-right-width: 6px;\n}\n.__react_component_tooltip.type-info.border {\n border: 1px solid #fff;\n}\n.__react_component_tooltip.type-info.border.place-top:before {\n border-top: 8px solid #fff;\n}\n.__react_component_tooltip.type-info.border.place-bottom:before {\n border-bottom: 8px solid #fff;\n}\n.__react_component_tooltip.type-info.border.place-left:before {\n border-left: 8px solid #fff;\n}\n.__react_component_tooltip.type-info.border.place-right:before {\n border-right: 8px solid #fff;\n}\n.__react_component_tooltip.type-light {\n color: #222;\n background-color: #fff;\n}\n.__react_component_tooltip.type-light.place-top:after {\n border-top-color: #fff;\n border-top-style: solid;\n border-top-width: 6px;\n}\n.__react_component_tooltip.type-light.place-bottom:after {\n border-bottom-color: #fff;\n border-bottom-style: solid;\n border-bottom-width: 6px;\n}\n.__react_component_tooltip.type-light.place-left:after {\n border-left-color: #fff;\n border-left-style: solid;\n border-left-width: 6px;\n}\n.__react_component_tooltip.type-light.place-right:after {\n border-right-color: #fff;\n border-right-style: solid;\n border-right-width: 6px;\n}\n.__react_component_tooltip.type-light.border {\n border: 1px solid #222;\n}\n.__react_component_tooltip.type-light.border.place-top:before {\n border-top: 8px solid #222;\n}\n.__react_component_tooltip.type-light.border.place-bottom:before {\n border-bottom: 8px solid #222;\n}\n.__react_component_tooltip.type-light.border.place-left:before {\n border-left: 8px solid #222;\n}\n.__react_component_tooltip.type-light.border.place-right:before {\n border-right: 8px solid #222;\n}\n.__react_component_tooltip.place-top {\n margin-top: -10px;\n}\n.__react_component_tooltip.place-top:before {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n bottom: -8px;\n left: 50%;\n margin-left: -10px;\n}\n.__react_component_tooltip.place-top:after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n bottom: -6px;\n left: 50%;\n margin-left: -8px;\n}\n.__react_component_tooltip.place-bottom {\n margin-top: 10px;\n}\n.__react_component_tooltip.place-bottom:before {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n top: -8px;\n left: 50%;\n margin-left: -10px;\n}\n.__react_component_tooltip.place-bottom:after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n top: -6px;\n left: 50%;\n margin-left: -8px;\n}\n.__react_component_tooltip.place-left {\n margin-left: -10px;\n}\n.__react_component_tooltip.place-left:before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n right: -8px;\n top: 50%;\n margin-top: -5px;\n}\n.__react_component_tooltip.place-left:after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n right: -6px;\n top: 50%;\n margin-top: -4px;\n}\n.__react_component_tooltip.place-right {\n margin-left: 10px;\n}\n.__react_component_tooltip.place-right:before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n left: -8px;\n top: 50%;\n margin-top: -5px;\n}\n.__react_component_tooltip.place-right:after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n left: -6px;\n top: 50%;\n margin-top: -4px;\n}\n.__react_component_tooltip .multi-line {\n display: block;\n padding: 2px 0px;\n text-align: center;\n}');var de,he=function(e){e.hide=function(e){G(q.HIDE,{target:e})},e.rebuild=function(){G(q.REBUILD)},e.show=function(e){G(q.SHOW,{target:e})},e.prototype.globalRebuild=function(){this.mount&&(this.unbindListener(),this.bindListener())},e.prototype.globalShow=function(e){if(this.mount){var t={currentTarget:e.detail.target};this.showTooltip(t,!0)}},e.prototype.globalHide=function(e){if(this.mount){var t=!!(e&&e.detail&&e.detail.target);this.hideTooltip({currentTarget:t&&e.detail.target},t)}}}(te=function(e){e.prototype.bindWindowEvents=function(e){window.removeEventListener(q.HIDE,this.globalHide),window.addEventListener(q.HIDE,this.globalHide,!1),window.removeEventListener(q.REBUILD,this.globalRebuild),window.addEventListener(q.REBUILD,this.globalRebuild,!1),window.removeEventListener(q.SHOW,this.globalShow),window.addEventListener(q.SHOW,this.globalShow,!1),e&&(window.removeEventListener("resize",this.onWindowResize),window.addEventListener("resize",this.onWindowResize,!1))},e.prototype.unbindWindowEvents=function(){window.removeEventListener(q.HIDE,this.globalHide),window.removeEventListener(q.REBUILD,this.globalRebuild),window.removeEventListener(q.SHOW,this.globalShow),window.removeEventListener("resize",this.onWindowResize)},e.prototype.onWindowResize=function(){this.mount&&this.hideTooltip()}}(te=function(e){e.prototype.isCustomEvent=function(e){return this.state.event||!!e.getAttribute("data-event")},e.prototype.customBindListener=function(e){var t=this,n=this.state,r=n.event,o=n.eventOff,a=e.getAttribute("data-event")||r,i=e.getAttribute("data-event-off")||o;a.split(" ").forEach((function(n){e.removeEventListener(n,Q.get(e,n));var r=J.bind(t,i);Q.set(e,n,r),e.addEventListener(n,r,!1)})),i&&i.split(" ").forEach((function(n){e.removeEventListener(n,t.hideTooltip),e.addEventListener(n,t.hideTooltip,!1)}))},e.prototype.customUnbindListener=function(e){var t=this.state,n=t.event,r=t.eventOff,o=n||e.getAttribute("data-event"),a=r||e.getAttribute("data-event-off");e.removeEventListener(o,Q.get(e,n)),a&&e.removeEventListener(a,this.hideTooltip)}}(te=function(e){e.prototype.isCapture=function(e){return e&&"true"===e.getAttribute("data-iscapture")||this.props.isCapture||!1}}(te=function(e){e.prototype.getEffect=function(e){return e.getAttribute("data-effect")||this.props.effect||"float"}}(te=function(e){e.prototype.isBodyMode=function(){return!!this.props.bodyMode},e.prototype.bindBodyListener=function(e){var t=this,n=this.state,r=n.event,o=n.eventOff,a=n.possibleCustomEvents,i=n.possibleCustomEventsOff,s=Z(),l=$(e,"data-event"),c=$(e,"data-event-off");null!=r&&(l[r]=!0),null!=o&&(c[o]=!0),a.split(" ").forEach((function(e){return l[e]=!0})),i.split(" ").forEach((function(e){return c[e]=!0})),this.unbindBodyListener(s);var u=this.bodyModeListeners={};for(var d in null==r&&(u.mouseover=X.bind(this,this.showTooltip,{}),u.mousemove=X.bind(this,this.updateTooltip,{respectEffect:!0}),u.mouseout=X.bind(this,this.hideTooltip,{})),l)u[d]=X.bind(this,(function(e){var n=e.currentTarget.getAttribute("data-event-off")||o;J.call(t,n,e)}),{customEvent:!0});for(var h in c)u[h]=X.bind(this,this.hideTooltip,{customEvent:!0});for(var p in u)s.addEventListener(p,u[p])},e.prototype.unbindBodyListener=function(e){e=e||Z();var t=this.bodyModeListeners;for(var n in t)e.removeEventListener(n,t[n])}}((re=ne=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=I(this,N(t).call(this,e))).state={place:e.place||"top",desiredPlace:e.place||"top",type:"dark",effect:"float",show:!1,border:!1,offset:{},extraClass:"",html:!1,delayHide:0,delayShow:0,event:e.event||null,eventOff:e.eventOff||null,currentEvent:null,currentTarget:null,ariaProps:ue(e),isEmptyTip:!1,disable:!1,possibleCustomEvents:e.possibleCustomEvents||"",possibleCustomEventsOff:e.possibleCustomEventsOff||"",originTooltip:null,isMultiline:!1},n.bind(["showTooltip","updateTooltip","hideTooltip","hideTooltipOnScroll","getTooltipContent","globalRebuild","globalShow","globalHide","onWindowResize","mouseOnToolTip"]),n.mount=!0,n.delayShowLoop=null,n.delayHideLoop=null,n.delayReshow=null,n.intervalUpdateContent=null,n}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&&A(e,t)}(t,e),n=t,a=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.ariaProps,r=ue(e);return Object.keys(r).some((function(e){return r[e]!==n[e]}))?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{ariaProps:r}):null}}],(r=[{key:"bind",value:function(e){var t=this;e.forEach((function(e){t[e]=t[e].bind(t)}))}},{key:"componentDidMount",value:function(){var e=this.props,t=(e.insecure,e.resizeHide);this.bindListener(),this.bindWindowEvents(t)}},{key:"componentWillUnmount",value:function(){this.mount=!1,this.clearTimer(),this.unbindListener(),this.removeScrollListener(),this.unbindWindowEvents()}},{key:"mouseOnToolTip",value:function(){return!(!this.state.show||!this.tooltipRef)&&(this.tooltipRef.matches||(this.tooltipRef.msMatchesSelector?this.tooltipRef.matches=this.tooltipRef.msMatchesSelector:this.tooltipRef.matches=this.tooltipRef.mozMatchesSelector),this.tooltipRef.matches(":hover"))}},{key:"getTargetArray",value:function(e){var t,n,r;if(e){var o=e.replace(/\\/g,"\\\\").replace(/"/g,'\\"');t=document.querySelectorAll('[data-tip][data-for="'.concat(o,'"]'))}else t=document.querySelectorAll("[data-tip]:not([data-for])");return r=(n=t).length,n.hasOwnProperty?Array.prototype.slice.call(n):new Array(r).fill().map((function(e){return n[e]}))}},{key:"bindListener",value:function(){var e=this,t=this.props,n=t.id,r=t.globalEventOff,o=t.isCapture,a=this.getTargetArray(n);a.forEach((function(t){null===t.getAttribute("currentItem")&&t.setAttribute("currentItem","false"),e.unbindBasicListener(t),e.isCustomEvent(t)&&e.customUnbindListener(t)})),this.isBodyMode()?this.bindBodyListener(a):a.forEach((function(t){var n=e.isCapture(t),r=e.getEffect(t);e.isCustomEvent(t)?e.customBindListener(t):(t.addEventListener("mouseenter",e.showTooltip,n),"float"===r&&t.addEventListener("mousemove",e.updateTooltip,n),t.addEventListener("mouseleave",e.hideTooltip,n))})),r&&(window.removeEventListener(r,this.hideTooltip),window.addEventListener(r,this.hideTooltip,o)),this.bindRemovalTracker()}},{key:"unbindListener",value:function(){var e=this,t=this.props,n=t.id,r=t.globalEventOff;this.isBodyMode()?this.unbindBodyListener():this.getTargetArray(n).forEach((function(t){e.unbindBasicListener(t),e.isCustomEvent(t)&&e.customUnbindListener(t)})),r&&window.removeEventListener(r,this.hideTooltip),this.unbindRemovalTracker()}},{key:"unbindBasicListener",value:function(e){var t=this.isCapture(e);e.removeEventListener("mouseenter",this.showTooltip,t),e.removeEventListener("mousemove",this.updateTooltip,t),e.removeEventListener("mouseleave",this.hideTooltip,t)}},{key:"getTooltipContent",value:function(){var e,t=this.props,n=t.getContent,r=t.children;return n&&(e=Array.isArray(n)?n[0]&&n[0](this.state.originTooltip):n(this.state.originTooltip)),ce(this.state.originTooltip,r,e,this.state.isMultiline)}},{key:"isEmptyTip",value:function(e){return"string"==typeof e&&""===e||null===e}},{key:"showTooltip",value:function(e,t){if(!t||this.getTargetArray(this.props.id).some((function(t){return t===e.currentTarget}))){var n=this.props,r=n.multiline,o=n.getContent,a=e.currentTarget.getAttribute("data-tip"),i=e.currentTarget.getAttribute("data-multiline")||r||!1,s=e instanceof window.FocusEvent||t,l=!0;e.currentTarget.getAttribute("data-scroll-hide")?l="true"===e.currentTarget.getAttribute("data-scroll-hide"):null!=this.props.scrollHide&&(l=this.props.scrollHide);var c=e.currentTarget.getAttribute("data-place")||this.props.place||"top",u=s?"solid":this.getEffect(e.currentTarget),d=e.currentTarget.getAttribute("data-offset")||this.props.offset||{},h=ee(e,e.currentTarget,this.tooltipRef,c,c,u,d);h.position&&this.props.overridePosition&&(h.position=this.props.overridePosition(h.position,e.currentTarget,this.tooltipRef,c,c,u,d));var p=h.isNewState?h.newState.place:c;this.clearTimer();var f=e.currentTarget,m=this.state.show?f.getAttribute("data-delay-update")||this.props.delayUpdate:0,g=this,_=function(){g.setState({originTooltip:a,isMultiline:i,desiredPlace:c,place:p,type:f.getAttribute("data-type")||g.props.type||"dark",effect:u,offset:d,html:f.getAttribute("data-html")?"true"===f.getAttribute("data-html"):g.props.html||!1,delayShow:f.getAttribute("data-delay-show")||g.props.delayShow||0,delayHide:f.getAttribute("data-delay-hide")||g.props.delayHide||0,delayUpdate:f.getAttribute("data-delay-update")||g.props.delayUpdate||0,border:f.getAttribute("data-border")?"true"===f.getAttribute("data-border"):g.props.border||!1,extraClass:f.getAttribute("data-class")||g.props.class||g.props.className||"",disable:f.getAttribute("data-tip-disable")?"true"===f.getAttribute("data-tip-disable"):g.props.disable||!1,currentTarget:f},(function(){l&&g.addScrollListener(g.state.currentTarget),g.updateTooltip(e),o&&Array.isArray(o)&&(g.intervalUpdateContent=setInterval((function(){if(g.mount){var e=g.props.getContent,t=ce(a,"",e[0](),i),n=g.isEmptyTip(t);g.setState({isEmptyTip:n}),g.updatePosition()}}),o[1]))}))};m?this.delayReshow=setTimeout(_,m):_()}}},{key:"updateTooltip",value:function(e){var t=this,n=this.state,r=n.delayShow,o=n.disable,a=this.props.afterShow,i=this.getTooltipContent(),s=parseInt(r,10),l=e.currentTarget||e.target;if(!this.mouseOnToolTip()&&!this.isEmptyTip(i)&&!o){var c=function(){if(Array.isArray(i)&&i.length>0||i){var n=!t.state.show;t.setState({currentEvent:e,currentTarget:l,show:!0},(function(){t.updatePosition(),n&&a&&a(e)}))}};clearTimeout(this.delayShowLoop),r?this.delayShowLoop=setTimeout(c,s):c()}}},{key:"listenForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.addEventListener("mouseleave",this.hideTooltip)}},{key:"removeListenerForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.removeEventListener("mouseleave",this.hideTooltip)}},{key:"hideTooltip",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isScroll:!1},o=this.state.disable,a=r.isScroll,i=a?0:this.state.delayHide,s=this.props.afterHide,l=this.getTooltipContent();if(this.mount&&!this.isEmptyTip(l)&&!o){if(t){var c=this.getTargetArray(this.props.id),u=c.some((function(t){return t===e.currentTarget}));if(!u||!this.state.show)return}var d=function(){var t=n.state.show;n.mouseOnToolTip()?n.listenForTooltipExit():(n.removeListenerForTooltipExit(),n.setState({show:!1},(function(){n.removeScrollListener(),t&&s&&s(e)})))};this.clearTimer(),i?this.delayHideLoop=setTimeout(d,parseInt(i,10)):d()}}},{key:"hideTooltipOnScroll",value:function(e,t){this.hideTooltip(e,t,{isScroll:!0})}},{key:"addScrollListener",value:function(e){var t=this.isCapture(e);window.addEventListener("scroll",this.hideTooltipOnScroll,t)}},{key:"removeScrollListener",value:function(){window.removeEventListener("scroll",this.hideTooltipOnScroll)}},{key:"updatePosition",value:function(){var e=this,t=this.state,n=t.currentEvent,r=t.currentTarget,o=t.place,a=t.desiredPlace,i=t.effect,s=t.offset,l=this.tooltipRef,c=ee(n,r,l,o,a,i,s);if(c.position&&this.props.overridePosition&&(c.position=this.props.overridePosition(c.position,n,r,l,o,a,i,s)),c.isNewState)return this.setState(c.newState,(function(){e.updatePosition()}));l.style.left=c.position.left+"px",l.style.top=c.position.top+"px"}},{key:"clearTimer",value:function(){clearTimeout(this.delayShowLoop),clearTimeout(this.delayHideLoop),clearTimeout(this.delayReshow),clearInterval(this.intervalUpdateContent)}},{key:"render",value:function(){var e=this,n=this.state,r=n.extraClass,a=n.html,i=n.ariaProps,s=n.disable,l=this.getTooltipContent(),c=this.isEmptyTip(l),u="__react_component_tooltip"+(!this.state.show||s||c?"":" show")+(this.state.border?" border":"")+" place-".concat(this.state.place)+" type-".concat(this.state.type)+(this.props.delayUpdate?" allow_hover":"")+(this.props.clickable?" allow_click":""),d=this.props.wrapper;t.supportedWrappers.indexOf(d)<0&&(d=t.defaultProps.wrapper);var h=[u,r].filter(Boolean).join(" ");return a?o.a.createElement(d,P({className:h,id:this.props.id,ref:function(t){return e.tooltipRef=t}},i,{"data-id":"tooltip",dangerouslySetInnerHTML:{__html:l}})):o.a.createElement(d,P({className:h,id:this.props.id},i,{ref:function(t){return e.tooltipRef=t},"data-id":"tooltip"}),l)}}])&&L(n.prototype,r),a&&L(n,a),t}(o.a.Component),C(ne,"propTypes",{children:W.any,place:W.string,type:W.string,effect:W.string,offset:W.object,multiline:W.bool,border:W.bool,insecure:W.bool,class:W.string,className:W.string,id:W.string,html:W.bool,delayHide:W.number,delayUpdate:W.number,delayShow:W.number,event:W.string,eventOff:W.string,watchWindow:W.bool,isCapture:W.bool,globalEventOff:W.string,getContent:W.any,afterShow:W.func,afterHide:W.func,overridePosition:W.func,disable:W.bool,scrollHide:W.bool,resizeHide:W.bool,wrapper:W.string,bodyMode:W.bool,possibleCustomEvents:W.string,possibleCustomEventsOff:W.string,clickable:W.bool}),C(ne,"defaultProps",{insecure:!0,resizeHide:!0,wrapper:"div",clickable:!1}),C(ne,"supportedWrappers",["div","span"]),C(ne,"displayName","ReactTooltip"),(de=te=re).prototype.bindRemovalTracker=function(){var e=this,t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(null!=t){var n=new t((function(t){for(var n=0;n<t.length;n++)for(var r=t[n],o=0;o<r.removedNodes.length;o++)if(r.removedNodes[o]===e.state.currentTarget)return void e.hideTooltip()}));n.observe(window.document,{childList:!0,subtree:!0}),this.removalTracker=n}},te=void(de.prototype.unbindRemovalTracker=function(){this.removalTracker&&(this.removalTracker.disconnect(),this.removalTracker=null)})||te))||te)||te)||te)||te)||te)||te;function pe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var fe=function(e){h()(a,e);var t,n,r=pe(a);function a(e){var t;return l()(this,a),(t=r.call(this,e)).state={loading:!1,logs:[],downloadLogLink:""},t}return u()(a,[{key:"componentDidMount",value:function(){this.displayLogs(),this.context.setSelectedTabOnCookies("manager")}},{key:"displayLogs",value:(n=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","display_log"),this.setState({loading:!0}),e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:200==(n=e.sent).status&&(this.setState({loading:!1}),n.data.success&&this.setState({logs:n.data.info}));case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"downloadLog",value:(t=y()(v.a.mark((function e(t,n){var r,o;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new FormData).set("action","download_log"),r.set("filename",t),r.set("revision",n),e.next=6,S()({method:"post",url:ajaxurl,data:r,config:{headers:{"Content-Type":"multipart/form-data"}}});case 6:(o=e.sent).data.success?(this.setState({downloadLogLink:o.data.log_link}),document.getElementById("downloadFile").click()):D.toast.error("Log Doesn't Exists");case 8:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this,t={padding:"20px 0 10px 0"};return o.a.createElement("div",{className:"col-sm-8 col-md-9"},o.a.createElement("div",{className:"setting-tab-pane setting-tabpane5 active"},o.a.createElement("div",{className:"row justify-content-center"},o.a.createElement("div",{className:"col-md-12 mt20"},o.a.createElement("h1",{className:"main-heading"},"Log Info"),o.a.createElement("table",{className:"table log-manager"},o.a.createElement("thead",null,o.a.createElement("tr",null,o.a.createElement("th",null,this.context.language.FileName),o.a.createElement("th",null,this.context.language.Module),o.a.createElement("th",null,this.context.language.Inserted),o.a.createElement("th",null,this.context.language.Updated),o.a.createElement("th",null,this.context.language.Skipped),o.a.createElement("th",{className:"text-center"},this.context.language.Download))),o.a.createElement("tbody",null,this.state.loading?o.a.createElement("tr",null,o.a.createElement("td",{colspan:"6"},o.a.createElement("div",{className:"loader loader-1 mt15"}))):0!==this.state.logs.length?this.state.logs.map((function(n,r){return o.a.createElement("tr",{style:t},o.a.createElement("td",null,n.filename," ",o.a.createElement("br",null),o.a.createElement("b",null,e.context.language.Revision,": ")," ",n.revision),o.a.createElement("td",null,n.module),o.a.createElement("td",null,n.inserted),o.a.createElement("td",null,n.updated),o.a.createElement("td",null,n.skipped),o.a.createElement("td",{className:"text-center"},o.a.createElement("div",{className:"download-icon"},o.a.createElement("a",{className:"action-icon text-success text-bold",onClick:function(){e.downloadLog(n.filename,n.revision)},"data-tip":"Download"},o.a.createElement("i",{className:"csv-icon-download-cloud"}))),o.a.createElement(he,{effect:"solid"})))})):o.a.createElement("tr",null,o.a.createElement("td",{colspan:"6"},o.a.createElement("span",{className:"text-danger"},this.context.language.NoLogRecordFound))))),o.a.createElement("a",{id:"downloadFile",className:"hidden",href:this.state.downloadLogLink,download:!0},this.context.language.Download)))))}}]),a}(r.Component);M()(fe,"contextType",E);var me=fe;function ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var _e=function(e){h()(n,e);var t=ge(n);function n(e){var r;return l()(this,n),(r=t.call(this,e)).state={loading:!1},r}return u()(n,[{key:"render",value:function(){return o.a.createElement("div",{className:"col-md-9",style:{height:"300px"}},o.a.createElement("div",{className:"row justify-content-center h-100"},o.a.createElement("div",{className:"align-self-center upgrade-to-pro text-center"},o.a.createElement("img",{src:"".concat(window.wpr_object.imagePath,"upgrade-to-pro.png")}),o.a.createElement("p",null,"This feature is available in"," ",o.a.createElement("a",{target:"_blank",className:"csv-link",href:"https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=plugin&utm_campaign=csv_importer_free&utm_medium=wordpress"},"WP Ultimate CSV Importer"," ")," ","Premium Version"),o.a.createElement("a",{target:"_blank",href:"https://www.smackcoders.com/contact-us.html?utm_source=plugin&utm_campaign=csv_importer_free&utm_medium=wordpress",className:"smack-btn btn-default "},"Contact us for Presale Enquiry"))))}}]),n}(r.Component);function ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var be=function(e){h()(n,e);var t=ve(n);function n(e){var r;return l()(this,n),(r=t.call(this,e)).state={fileManagerTabActive:"",templatesTabActive:"",logManagerTabActive:"active",showTemplateEditMapping:!1},r}return u()(n,[{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("manager")}},{key:"showManagerOptions",value:function(){var e=this;return o.a.createElement("div",{className:"setting-tab-section col-sm-4 col-md-3"},o.a.createElement("ul",{className:"setting-tab"},o.a.createElement("li",{"data-setting":"setting-tabpane5",className:"setting-tab-list ".concat(this.state.logManagerTabActive),onClick:function(t){e.setState({logManagerTabActive:"active",fileManagerTabActive:"",smartScheduleTabActive:"",scheduledExportTabActive:"",templatesTabActive:"",mediaReportTabActive:""})}},o.a.createElement("i",{className:"csv-icon-layers","aria-hidden":"true"}),this.context.language.LogManager),o.a.createElement("li",{"data-setting":"setting-tabpane1",className:"setting-tab-list pro-tag ".concat(this.state.fileManagerTabActive),onClick:function(t){e.setState({fileManagerTabActive:"active",smartScheduleTabActive:"",scheduledExportTabActive:"",templatesTabActive:"",logManagerTabActive:"",mediaReportTabActive:""})}},o.a.createElement("i",{className:"csv-icon-hard-drive1","aria-hidden":"true"}),this.context.language.FileManager),o.a.createElement("li",{"data-setting":"setting-tabpane4",className:"setting-tab-list pro-tag ".concat(this.state.templatesTabActive),onClick:function(t){e.setState({templatesTabActive:"active",fileManagerTabActive:"",smartScheduleTabActive:"",scheduledExportTabActive:"",logManagerTabActive:"",mediaReportTabActive:""})}},o.a.createElement("i",{className:"csv-icon-layout","aria-hidden":"true"}),this.context.language.Templates)))}},{key:"render",value:function(){return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{id:"mapping-accordion",className:"container"},o.a.createElement("div",{className:"card csv-importer-panel mt20"},o.a.createElement("div",{className:"row"},this.showManagerOptions(),"active"===this.state.fileManagerTabActive||"active"===this.state.templatesTabActive?o.a.createElement(_e,null):"active"===this.state.logManagerTabActive?o.a.createElement(me,null):o.a.createElement("div",null,this.context.language.NotSelectedAnyTab)))))}}]),n}(r.Component);M()(be,"contextType",E);var ye=be;function we(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 ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){M()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var Me=function(e){h()(i,e);var t,n,r,a=xe(i);function i(e){var t;return l()(this,i),(t=a.call(this,e)).state={customPostType:[],taxonomies:[],moduleRecordCount:"0 Data",customPostOption:"",taxonomiesOption:""},t.moduleName="",t.getModuleData=t.getModuleData.bind(k()(t)),t}return u()(i,[{key:"componentDidMount",value:function(){this.context.activateExporter&&(this.getPostTypes(),this.getTaxonomies())}},{key:"getPostTypes",value:(r=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","get_post_types"),this.setState({loading:!0}),e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:200==(n=e.sent).status&&(this.setState({loading:!1}),this.setState({customPostType:n.data.custom_post_type}));case 7:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getTaxonomies",value:(n=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","get_taxonomies"),this.setState({loading:!0}),e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:200==(n=e.sent).status&&(this.setState({loading:!1}),this.setState({taxonomies:n.data.taxonomies}));case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getModuleData",value:(t=y()(v.a.mark((function e(t){var n,r,o,a,i=arguments;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>1&&void 0!==i[1]&&i[1],r=t.target.id,n&&(r=t.target.name,t.target.id),"Taxonomies"!==r&&"CustomPosts"!==r||!n?this.context.setExportInfo(ke(ke({},this.context.exportInfo),{},{moduleName:r})):this.context.setExportInfo(ke(ke({},this.context.exportInfo),{},{optionalType:t.target.value,moduleName:r})),(o=new FormData).set("action","total_records"),o.set("module",r),"Taxonomies"!==r&&"CustomPosts"!==r||!n||o.set("optionalType",t.target.value),this.setState({loading:!0}),e.prev=9,e.next=12,S()({method:"post",url:ajaxurl,data:o,config:{headers:{"Content-Type":"multipart/form-data"}}});case 12:200===(a=e.sent).status&&(this.setState({loading:!1}),""!=r?this.setState({moduleRecordCount:a.data+" "+r}):this.setState({moduleRecordCount:a.data+" Data"}),a.data>0?document.getElementById("exportbtn").disabled=!1:document.getElementById("exportbtn").disabled=!0),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(9),console.log(e.t0);case 19:case"end":return e.stop()}}),e,this,[[9,16]])}))),function(e){return t.apply(this,arguments)})},{key:"getExportOption",value:function(){""!=this.context.exportInfo.exportModule?this.context.setShowExport("export-filter"):D.toast.error("Select any module to export")}},{key:"render",value:function(){var e=this;return o.a.createElement("div",{id:"mapping-accordion",className:"container"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col-md-9"},o.a.createElement("div",{className:"card csv-importer-panel mt20"},this.context.activateExporter?o.a.createElement("div",{className:"row export"},o.a.createElement("h1",{class:"main-heading pr15 pl15 col-md-12 mt20 mb30"},this.context.language.Selectyourmoduletoexportthedata," ",o.a.createElement("div",{className:"float-right"},this.state.loading?o.a.createElement("div",{className:"btn ajax-loader loading",style:{marginTop:"-5px",marginRight:"-25px"}}):""," ",o.a.createElement("span",{className:"exportData"},this.state.moduleRecordCount," Found"))),o.a.createElement("div",{className:"export-section col-md-6"},o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"Posts",onClick:this.getModuleData}),o.a.createElement("label",{for:"Posts"},"Posts")),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"Pages",onClick:this.getModuleData}),o.a.createElement("label",{for:"Pages"},"Pages")),o.a.createElement("div",{className:"form-group row ml0"},o.a.createElement("div",{className:"col-md-4 pl0"},o.a.createElement("input",{type:"radio",name:"export",id:"CustomPosts",onClick:this.getModuleData}),o.a.createElement("label",{for:"CustomPosts"},"Custom Posts")),o.a.createElement("div",{className:"col-md-8",style:{display:"CustomPosts"===this.context.exportInfo.moduleName?"block":"none"}},o.a.createElement("select",M()({className:"select form-control",id:"customPostOption",name:"CustomPosts",onChange:function(t){e.setState({customPostOption:t.target.value}),e.getModuleData(t,!0)}},"id",""),o.a.createElement("option",{value:""},"-select-"),this.state.customPostType.map((function(e,t){return o.a.createElement("option",{value:e},e)}))))),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"Tags",onClick:this.getModuleData}),o.a.createElement("label",{for:"Tags"},"Post Tags")),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"Categories",onClick:this.getModuleData}),o.a.createElement("label",{for:"Categories"},"Post Categories")),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"Users",onClick:this.getModuleData}),o.a.createElement("label",{for:"Users"},"Users")),o.a.createElement("div",{className:"form-group row ml0"},o.a.createElement("div",{className:"col-md-4 pl0",style:{opacity:.6}},o.a.createElement("input",{class:"form-check-input",type:"radio",name:"export",id:"Taxonomies",checked:"",onClick:function(){D.toast.info("Please Upgrade to PRO for this Feature")}}),o.a.createElement("label",{class:"form-check-label",for:"Taxonomies"},"Taxonomies")),o.a.createElement("div",{className:"col-md-8",style:{display:"Taxonomies"===this.context.exportInfo.moduleName?"block":"none"}},o.a.createElement("select",M()({className:"select form-control",id:"taxonomiesOption",name:"Taxonomies",checked:"",onChange:function(t){e.setState({taxonomiesOption:t.target.value}),e.getModuleData(t,!0)}},"id",""),o.a.createElement("option",{value:""},"-select-"),this.state.taxonomies.map((function(e,t){return o.a.createElement("option",{value:e},e)})))))),o.a.createElement("div",{className:"export-section offset-md-1 col-md-5"},o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"Comments",onClick:this.getModuleData}),o.a.createElement("label",{for:"Comments"},"Comments")),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"CustomerReviews",onClick:this.getModuleData}),o.a.createElement("label",{for:"CustomerReviews"},"Customer Reviews")),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"WooCommerce",onClick:this.getModuleData}),o.a.createElement("label",{for:"WooCommerce"},"WooCommerce Products")),o.a.createElement("div",{className:"form-group",style:{opacity:.6}},o.a.createElement("input",{class:"form-check-input",type:"radio",name:"export",id:"WooCommerceCoupons",checked:"",onClick:function(){D.toast.info("Please Upgrade to PRO for this Feature")}}),o.a.createElement("label",{class:"form-check-label",for:"WooCommerceCoupons"},"WooCommerce Coupons")),o.a.createElement("div",{className:"form-group",style:{opacity:.6}},o.a.createElement("input",{class:"form-check-input",type:"radio",name:"export",id:"WooCommerceRefunds",checked:"",onClick:function(){D.toast.info("Please Upgrade to PRO for this Feature")}}),o.a.createElement("label",{class:"form-check-label",for:"WooCommerceRefunds"},"WooCommerce Refunds")),o.a.createElement("div",{className:"form-group",style:{opacity:.6}},o.a.createElement("input",{class:"form-check-input",type:"radio",name:"export",id:"WooCommerceVariations",checked:"",onClick:function(){D.toast.info("Please Upgrade to PRO for this Feature")}}),o.a.createElement("label",{class:"form-check-label",for:"WooCommerceVariations"},"WooCommerce Variations"))),o.a.createElement("div",{className:"col-md-12 mt45"},o.a.createElement("div",{className:"float-right"},o.a.createElement("input",{type:"button",className:"smack-btn smack-btn-primary mb20",id:"exportbtn",onClick:function(t){e.getExportOption()},value:this.context.language.Continue})))):o.a.createElement("div",{className:"d-flex justify-content-center align-items-center",style:{minHeight:"300px"}},o.a.createElement("div",{className:"text-center"},o.a.createElement("h5",{style:{color:"#2D3748"},className:"col-md-8 offset-md-2 mb30"},"Please install the Ultimate Exporter to export all your WordPress data as CSV."),o.a.createElement("a",{href:"https://wordpress.org/plugins/wp-ultimate-exporter/",className:"smack-btn smack-btn-secondary",target:"_blank"},"Click here to install"))))),o.a.createElement("div",{className:"col-md-3"},o.a.createElement("div",{className:"cardbanner m110 border-rad mt20"},o.a.createElement("div",{className:"mt0 mb10 mr10 ml10"},o.a.createElement("h2",{className:"title"},"Ultimate Exporter Pro"),o.a.createElement("hr",{className:"divider"}),o.a.createElement("b",{className:"title"}," Export filtered data "),o.a.createElement("ul",null,o.a.createElement("li",{className:"ml30"},"Lets you get only required data with the different advanced filters")),o.a.createElement("b",{className:"title"},"Backup in editable format"),o.a.createElement("div",null,o.a.createElement("ul",null,o.a.createElement("li",{className:"ml30"},"Backup in 4 different file formats like CSV, XML, JSON, XLS."))),o.a.createElement("b",{className:"title"},"Auto Scheduled Backups"),o.a.createElement("div",null,o.a.createElement("ul",null,o.a.createElement("li",{className:"ml30"},"Scheduled export helps backup as editable text file format in regular interval."))),o.a.createElement("a",{className:"basic-button border-rad",href:"https://www.smackcoders.com/ultimate-exporter.html?utm_source=plugin&utm_campaign=promo_widget&utm_medium=exporter",target:"blank"},"BUY NOW!"))))))}}]),i}(r.Component);M()(Me,"contextType",E);var Ee=n(41),Te=n.n(Ee);n(229);function Se(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 De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){M()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var Ce=n(3),Pe=function(e){h()(a,e);var t,n,r=Le(a);function a(e){var t;return l()(this,a),(t=r.call(this,e)).state={loading:!1,exportName:"",exportType:"csv",authorList:[],startDate:new Date,endDate:new Date,conditions:{specific_period:{is_check:!1},specific_authors:{is_check:!1,author:""}},enableSchedule:!1,offset:0,exportProgress:"0",totalExportRecord:0,stopWatch:"00:00:00",activeDowloadTab:!1,exportSuccess:!1,showDownloadBtn:!1,exportedFileUrl:""},t.stopSeconds=0,t.stopMinutes=0,t.stopHours=0,t.handleChangeStart=t.handleChangeStart.bind(k()(t)),t.handleChangeEnd=t.handleChangeEnd.bind(k()(t)),t.onInputChange=t.onInputChange.bind(k()(t)),t}return u()(a,[{key:"onInputChange",value:function(e){this.setState(M()({},e.target.name,e.target.value),(function(){}))}},{key:"handleChangeStart",value:function(e){this.setState({startDate:e})}},{key:"handleChangeEnd",value:function(e){this.setState({endDate:e})}},{key:"componentDidMount",value:function(){this.getAuthors(),setInterval(function(){!this.state.exportSuccess&&this.state.activeDowloadTab&&this.stopWatch()}.bind(this),1e3)}},{key:"getAuthors",value:(n=y()(v.a.mark((function e(){var t,n,r,o,a;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","get_authors"),this.setState({loading:!0}),e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:if(n=e.sent,this.setState({loading:!1}),200==n.status){for(r=n.data.user_id.length,o=[],a=0;a<r;a++)o.push({user_id:n.data.user_id[a],user_name:n.data.user_name[a]});this.setState({authorList:o})}case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"handleCheck",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";t&&(this.state.conditions[e.target.name].is_check=e.target.checked,this.setState({conditions:this.state.conditions},(function(){}))),t||n||this.setState(M()({},e.target.name,e.target.checked)),n&&(e.target.checked?this.state.eventExclusion.exclusion_headers.header[r]=!0:delete this.state.eventExclusion.exclusion_headers.header[r],this.setState(De(De({},this.state.eventExclusion),{},{eventExclusion:this.state.eventExclusion}),(function(){})))}},{key:"handleChange",value:function(e){var t=e.target.id;"specific_authors"===t&&(this.state.conditions.specific_authors.author=e.target.value),"specific_status"===t&&(this.state.conditions.specific_status.status=e.target.value),"delimiter"===t&&(this.state.conditions.delimiter.delimiter=e.target.value),"other_delimiter"===t&&(this.state.conditions.delimiter.optional_delimiter=e.target.value),this.setState(De(De({},this.state.conditions),{},{conditions:this.state.conditions}),(function(){}))}},{key:"stopWatch",value:function(){this.stopSeconds++,this.stopSeconds>=60&&(this.stopSeconds=0,this.stopMinutes++,this.stopMinutes>=60&&(this.stopMinutes=0,this.stopHours++)),this.stopHours.toString().length<2&&(this.stopHours="0"+this.stopHours),this.stopMinutes.toString().length<2&&(this.stopMinutes="0"+this.stopMinutes),this.stopSeconds.toString().length<2&&(this.stopSeconds="0"+this.stopSeconds);var e=this.stopHours+":"+this.stopMinutes+":"+this.stopSeconds;this.setState({stopWatch:e})}},{key:"exportConfiguration",value:(t=y()(v.a.mark((function e(){var t,n,r,o,a,i,s,l;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((t=this.state.conditions).specific_period.from=Ce(this.state.startDate).format("YYYY-MM-DD"),t.specific_period.to=Ce(this.state.endDate).format("YYYY-MM-DD"),""!=document.getElementById("export-file-name").value){e.next=7;break}return D.toast.error("Please Type Export File Name"),document.getElementById("export-file-name").focus(),e.abrupt("return");case 7:return this.setState({activeDowloadTab:!0}),(n=new FormData).set("action","parse_data"),n.set("module",this.context.exportInfo.moduleName),"Taxonomies"!==(r=this.context.exportInfo.moduleName)&&"CustomPosts"!==r||n.set("optionalType",this.context.exportInfo.optionalType),n.set("fileName",this.state.exportName),n.set("exp_type",this.state.exportType),n.set("conditions",JSON.stringify(t)),n.set("export_mode","normal"),n.set("offset",this.state.offset),this.setState({loading:!0}),e.next=21,S()({method:"post",url:ajaxurl,data:n,config:{headers:{"Content-Type":"multipart/form-data"}}});case 21:o=e.sent,a=o.data,200==o.status&&(i=o.data.new_offset,(s=o.data.total_row_count)<i?this.setState({offset:s}):this.setState({offset:o.data.new_offset}),this.setState({exportSuccess:o.data.success,totalExportRecord:a.total_row_count}),l=a.new_offset/a.total_row_count*100,(l=Math.round(l))>.9&&this.setState({exportProgress:l}),l>=100&&this.setState({exportProgress:"100"}),o.data.success?this.setState({exportedFileUrl:o.data.exported_file,showDownloadBtn:!0}):this.exportConfiguration());case 24:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.state,n=(t.showSplitRecord,t.conditions),r=t.exportName,a=(t.exportType,t.authorList),i={width:this.state.exportProgress+"%"},s={display:this.state.showDownloadBtn?"block":"none"},l={opacity:.6};return o.a.createElement("div",{id:"mapping-accordion",className:"container"},o.a.createElement("div",{className:"card csv-importer-panel mt20 pt30 pb30 ".concat(this.state.activeDowloadTab?"d-none":"d-block")},o.a.createElement("div",{className:"row export"},o.a.createElement("h1",{className:"main-heading pr15 pl15 mb20 mt20 col-md-12"},this.context.language.Toexportdatabasedonthefilters),o.a.createElement("div",{className:"col-md-12"},o.a.createElement("div",{className:"form-group col-md-5 row export_file_name"},o.a.createElement("label",null,this.context.language.ExportFileName),o.a.createElement("input",{type:"text",className:"form-control",id:"export-file-name",value:r,onChange:function(t){e.setState({exportName:t.target.value})}}),o.a.createElement("span",{className:"export_file_type"},".",this.state.exportType)),o.a.createElement("hr",null),o.a.createElement("h3",{className:"main-heading"},this.context.language.AdvancedFilters),o.a.createElement("div",{className:"advanced-filter"},o.a.createElement("div",{className:"checkbox"},o.a.createElement("input",{type:"checkbox",className:"",name:"specific_period",id:"export_specific_period",onClick:function(t){e.handleCheck(t,!0)}}),o.a.createElement("label",{for:"export_specific_period"},this.context.language.Exportdataforthespecificperiod)),o.a.createElement("div",{className:"row bg-gray-section pl15 pr15 mt15",style:{display:n.specific_period.is_check?"block":"none"}},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"form-group col-md-5"},o.a.createElement("label",{for:""},this.context.language.StartFrom),o.a.createElement(Te.a,{className:"form-control",selected:this.state.startDate,onChange:this.handleChangeStart}),o.a.createElement("i",{className:"csv-icon-calendar2 input-icon"})),o.a.createElement("div",{className:"form-group col-md-5"},o.a.createElement("label",{for:""},this.context.language.EndTo," "),o.a.createElement(Te.a,{className:"form-control",selected:this.state.endDate,onChange:this.handleChangeEnd}),o.a.createElement("i",{className:"csv-icon-calendar2 input-icon"}))))),o.a.createElement("div",{className:"advanced-filter"},o.a.createElement("div",{className:"checkbox"},o.a.createElement("input",{type:"checkbox",className:"",name:"specific_authors",id:"export_specific_author",onClick:function(t){e.handleCheck(t,!0)}}),o.a.createElement("label",{for:"export_specific_author"},this.context.language.Exportdatabyspecificauthors)),o.a.createElement("div",{className:"row mt20 bg-gray-section",style:{display:n.specific_authors.is_check?"block":"none"}},o.a.createElement("div",{className:"form-group col-md-5"},o.a.createElement("label",{className:"advanced"},this.context.language.Authors),o.a.createElement("select",{className:"select form-control",id:"specific_authors",value:n.specific_authors.author,onChange:function(t){e.handleChange(t)}},o.a.createElement("option",{value:""},"Select Author"),a.map((function(e){return o.a.createElement("option",{value:e.user_id},e.user_name)})))))),o.a.createElement("div",{className:"advanced-filter",style:l},o.a.createElement("div",{className:"checkbox"},o.a.createElement("input",{type:"checkbox",className:"",name:"specific_status",id:"export_specific_status",checked:this.state.enableSchedule,onClick:function(){D.toast.info("Please upgrade to PRO for Export data with the specific status")}}),o.a.createElement("label",{for:"export_specific_status"},this.context.language.Exportdatawiththespecificstatus))),o.a.createElement("div",{className:"advanced-filter",style:l},o.a.createElement("div",{className:"checkbox"},o.a.createElement("input",{type:"checkbox",className:"",name:"delimiter",id:"export_auto_delimiter",checked:this.state.enableSchedule,onClick:function(){D.toast.info("Please upgrade to PRO for Export data with auto delimiters")}}),o.a.createElement("label",{for:"export_auto_delimiter"},this.context.language.Exportdatawithautodelimiters))),o.a.createElement("div",{className:"advanced-filter",style:l},o.a.createElement("div",{className:"checkbox"},o.a.createElement("input",{type:"checkbox",name:"setInclusions",id:"export_specific_inclusion",checked:this.state.enableSchedule,onClick:function(){D.toast.info("Please upgrade to PRO for Export data based on specific Inclusions ")}}),o.a.createElement("label",{for:"export_specific_inclusion",className:""},this.context.language.ExportdatabasedonspecificInclusions))),o.a.createElement("div",{className:"advanced-filter",style:l},o.a.createElement("div",{className:"checkbox"},o.a.createElement("input",{type:"checkbox",id:"export_this_schedule",checked:this.state.enableSchedule,onClick:function(){D.toast.info("Please upgrade to PRO for Export Schedule")}}),o.a.createElement("label",{for:"export_this_schedule"},this.context.language.DoyouwanttoSchedulethisExport))),o.a.createElement("div",{className:"form-group mt30 clearfix"},o.a.createElement("div",{className:"float-left"},o.a.createElement("button",{type:"button",className:"smack-btn btn-default",onClick:function(){e.context.setShowExport("export-module")}},this.context.language.Back)),o.a.createElement("div",{className:"float-right"},o.a.createElement("button",{type:"button",className:"smack-btn smack-btn-primary",onClick:function(){e.exportConfiguration()}},this.context.language.Export)))))),o.a.createElement("div",{className:"card csv-importer-panel mt20 pt30 pb30 ".concat(this.state.activeDowloadTab?"d-block":"d-none")},o.a.createElement("div",{className:"card-body"},o.a.createElement("div",{className:"importing-details"},o.a.createElement("div",{className:"progress-status"},this.state.exportSuccess&&this.state.exportProgress>"99"?"In Progress":""),o.a.createElement("div",{className:"import-progress"},o.a.createElement("div",{className:"progress-loading"},this.state.exportProgress+"%"," ",this.context.language.Completed),o.a.createElement("div",{className:"progress-timing"},o.a.createElement("i",{className:"csv-icon-schedule"})," ",this.state.stopWatch))),o.a.createElement("div",{className:"progress mt10 mb40"},o.a.createElement("div",{className:"progress-bar",role:"progressbar",style:i,"aria-valuenow":"10","aria-valuemin":"0","aria-valuemax":"100"})),o.a.createElement("p",{className:"float-none"},this.context.language.DataExported," :"," ",o.a.createElement("span",null,this.state.offset)," /"," ",this.state.totalExportRecord," "),o.a.createElement("div",{className:"form-group mt30 clearfix"},o.a.createElement("div",{className:"float-right"},o.a.createElement("a",{href:this.state.exportedFileUrl,style:s,download:!0,className:"smack-btn smack-btn-primary",onClick:function(){window.location.href}},o.a.createElement("i",{className:"csv-icon-download-cloud mr10"}),this.context.language.Download)),o.a.createElement("div",{className:"float-left"},o.a.createElement("button",{type:"button",className:"smack-btn btn-default",onClick:function(){e.context.setShowExport("export-module")}},this.context.language.Back))))))}}]),a}(r.Component);function Oe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}M()(Pe,"contextType",E);var Ne=function(e){h()(n,e);var t=Oe(n);function n(){return l()(this,n),t.apply(this,arguments)}return u()(n,[{key:"render",value:function(){return"export-module"===this.context.showExport?o.a.createElement(Me,null):"export-filter"===this.context.showExport?o.a.createElement(Pe,null):void 0}}]),n}(r.Component);function Ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}M()(Ne,"contextType",E);var Ie=function(e){h()(a,e);var t,n,r=Ae(a);function a(e){var t;return l()(this,a),(t=r.call(this,e)).state={loading:!1,drop_table:!1,send_log_email:!1,send_user_password:!1,woocomattr:!1,unmatchedrow:!1,CMB2metafields:""},t}return u()(a,[{key:"componentDidMount",value:function(){this.displayGeneralSettings(),this.context.setSelectedTabOnCookies("settings")}},{key:"displayGeneralSettings",value:(n=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","get_options"),this.setState({loading:!0}),e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:n=e.sent,this.setState({loading:!1}),void 0!==n.data.options&&n.data.options,this.setState(n.data.options),200==n.status&&n.data.success;case 10:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"updateGeneralSetting",value:(t=y()(v.a.mark((function e(t,n){var r,o;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"drop_table"===n?this.setState({drop_table:t.target.checked}):"send_log_email"===n?this.setState({send_log_email:t.target.checked}):"send_user_password"===n?this.setState({send_user_password:t.target.checked}):"woocomattr"===n?this.setState({woocomattr:t.target.checked}):"unmatchedrow"===n&&this.setState({unmatchedrow:t.target.checked}),(r=new FormData).set("action","settings_options"),r.set("option",n),"cmb2"===n?r.set("value",t.target.value):r.set("value",t.target.checked),this.setState({loading:!0}),e.next=8,S()({method:"post",url:ajaxurl,data:r,config:{headers:{"Content-Type":"multipart/form-data"}}});case 8:o=e.sent,this.setState({loading:!1}),200==o.status&&o.data.success&&D.toast.success("Settings Successfully Updated");case 11:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"col-sm-8 col-md-9"},o.a.createElement("div",{className:"setting-tab-pane setting-tabpane1 active"},o.a.createElement("div",{className:"row justify-content-center"},o.a.createElement("div",{className:"col-md-10 mt20"},o.a.createElement("h1",{className:"main-heading"},this.context.language.GeneralSettings," "),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-xs-12 col-sm-8 col-md-8 nopadding"},o.a.createElement("h4",null,this.context.language.DropTable),o.a.createElement("small",{className:"form-text text-muted"},this.context.language.Ifenabledplugindeactivationwillremoveplugindatathiscannotberestored)),o.a.createElement("div",{className:"col-xs-12 col-sm-4 col-md-3"},o.a.createElement("div",{className:"form-group col-md-6 fieldset"},o.a.createElement("h1",null,this.state.drop_table),o.a.createElement("input",{type:"checkbox",className:"form-control",id:"drop-table-check",checked:this.state.drop_table,onChange:function(t){e.updateGeneralSetting(t,"drop_table")}}),o.a.createElement("label",{className:"switch-ios",for:"drop-table-check"},o.a.createElement("i",null))))),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-xs-12 col-sm-8 col-md-8 nopadding"},o.a.createElement("h4",null,this.context.language.Scheduledlogmails),o.a.createElement("small",{className:"form-text text-muted"},this.context.language.Enabletogetscheduledlogmails)),o.a.createElement("div",{className:"col-xs-12 col-sm-4 col-md-3"},o.a.createElement("div",{className:"form-group col-md-6 fieldset"},o.a.createElement("input",{type:"checkbox",className:"ios-switch",onClick:function(){e.setState({send_log_email:!1},(function(){D.toast.info("Please Upgrade to PRO for this Feature")}))},checked:this.state.send_log_email,id:"scheduled-log-check"}),o.a.createElement("label",{className:"switch-ios",for:"scheduled-log-check"},o.a.createElement("i",null))))),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-xs-12 col-sm-8 col-md-8 nopadding"},o.a.createElement("h4",null,this.context.language.Sendpasswordtouser),o.a.createElement("small",{className:"form-text text-muted"},this.context.language.Enabletosendpasswordinformationthroughemail)),o.a.createElement("div",{className:"col-xs-12 col-sm-4 col-md-3"},o.a.createElement("div",{className:"form-group col-md-6 fieldset"},o.a.createElement("input",{type:"checkbox",className:"ios-switch",checked:this.state.send_user_password,onClick:function(t){e.updateGeneralSetting(t,"send_user_password")},id:"send-information"}),o.a.createElement("label",{className:"switch-ios",for:"send-information"},o.a.createElement("i",null))))),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-xs-12 col-sm-8 col-md-8 nopadding"},o.a.createElement("h4",null,this.context.language.WoocommerceCustomattribute),o.a.createElement("small",{className:"form-text text-muted"},this.context.language.Enablestoregisterwoocommercecustomattribute)),o.a.createElement("div",{className:"col-xs-12 col-sm-4 col-md-3"},o.a.createElement("div",{className:"form-group col-md-6 fieldset"},o.a.createElement("input",{type:"checkbox",className:"ios-switch",checked:this.state.send_log_email,onClick:function(){e.setState({send_log_email:!1},(function(){D.toast.info("Please Upgrade to PRO for this Feature")}))},id:"register-woocommerce"}),o.a.createElement("label",{className:"switch-ios",for:"register-woocommerce"},o.a.createElement("i",null))))),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-xs-12 col-sm-8 col-md-8 nopadding"},o.a.createElement("h4",null,this.context.language.DeletedatafromWordPress),o.a.createElement("small",{className:"form-text text-muted"},this.context.language.EnabletodeletetheitemsnotpresentinCSVXMLfile)),o.a.createElement("div",{className:"col-xs-12 col-sm-4 col-md-3"},o.a.createElement("div",{className:"form-group col-md-6 fieldset"},o.a.createElement("input",{type:"checkbox",className:"ios-switch",checked:this.state.unmatchedrow,onClick:function(t){e.updateGeneralSetting(t,"unmatchedrow")},id:"unmatchedrow"}),o.a.createElement("label",{className:"switch-ios",for:"unmatchedrow"},o.a.createElement("i",null)))))))))}}]),a}(r.Component);M()(Ie,"contextType",E);var Re=Ie;function Ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var je=function(e){h()(i,e);var t,n,r,a=Ye(i);function i(e){var t;return l()(this,i),(t=a.call(this,e)).state={loading:!1,securityData:[],author_editor_access:!1},t}return u()(i,[{key:"componentDidMount",value:function(){this.displaySecurityPerformance(),this.displayGeneralSettings(),this.context.setSelectedTabOnCookies("settings")}},{key:"displayGeneralSettings",value:(r=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","get_options"),this.setState({loading:!0}),e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:n=e.sent,this.setState({loading:!1}),this.setState(n.data.options);case 8:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"updateGeneralSetting",value:(n=y()(v.a.mark((function e(t){var n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({author_editor_access:t.target.checked}),(n=new FormData).set("action","settings_options"),n.set("option","author_editor_access"),n.set("value",t.target.checked),this.setState({loading:!0}),e.next=8,S()({method:"post",url:ajaxurl,data:n,config:{headers:{"Content-Type":"multipart/form-data"}}});case 8:r=e.sent,this.setState({loading:!1}),200==r.status&&r.data.success&&D.toast.success("Settings Successfully Updated");case 11:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"displaySecurityPerformance",value:(t=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","security_performance"),this.setState({loading:!0}),e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:n=e.sent,this.setState({loading:!1}),200==n.status&&this.setState({securityData:n.data});case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"col-sm-8 col-md-9"},o.a.createElement("div",{className:"setting-tab-pane setting-tabpane3 active"},o.a.createElement("div",{className:"row justify-content-center"},o.a.createElement("div",{className:"col-md-10 mt20"},o.a.createElement("h1",{className:"main-heading pb5"},this.context.language.SecurityandPerformance),o.a.createElement("div",{className:"form-group row mt30"},o.a.createElement("div",{className:"col-xs-12 col-sm-7 col-md-7 nopadding"},o.a.createElement("h4",null,this.context.language.Allowauthorseditorstoimport),o.a.createElement("small",{className:"form-text text-muted"},this.context.language.Thisenablesauthorseditorstoimport)),o.a.createElement("div",{className:"col-xs-12 col-sm-4 col-md-3 "},o.a.createElement("div",{className:"form-group col-md-6 fieldset"},o.a.createElement("input",{type:"checkbox",className:"ios-switch",checked:this.state.author_editor_access,onClick:function(t){e.updateGeneralSetting(t)},id:"two"}),o.a.createElement("label",{className:"switch-ios inline",for:"two"},o.a.createElement("i",null))))),o.a.createElement("table",{className:"table table-striped"},o.a.createElement("tbody",null,o.a.createElement("tr",null,o.a.createElement("th",{colspan:"3"},o.a.createElement("h5",{className:"text-capitalize"},this.context.language.MinimumrequiredphpinivaluesIniconfiguredvalues))),o.a.createElement("tr",null,o.a.createElement("th",null,o.a.createElement("label",null,this.context.language.Variables)),o.a.createElement("th",{className:"ini-configured-values"},o.a.createElement("label",null,this.context.language.SystemValues)),o.a.createElement("th",{className:"min-requirement-values"},o.a.createElement("label",null,this.context.language.MinimumRequirements))),o.a.createElement("tr",null,o.a.createElement("td",null,"post_max_size "),o.a.createElement("td",{className:"ini-configured-values"},""!==this.state.securityData.post_max_size?this.state.securityData.post_max_size:"-"),o.a.createElement("td",{className:"min-requirement-values"},"10M")),o.a.createElement("tr",null,o.a.createElement("td",null,"auto_append_file"),o.a.createElement("td",{className:"ini-configured-values"}," ",""!==this.state.securityData.auto_append_file?this.state.securityData.auto_append_file:"-"," "),o.a.createElement("td",{className:"min-requirement-values"},"-")),o.a.createElement("tr",null,o.a.createElement("td",null,"auto_prepend_file "),o.a.createElement("td",{className:"ini-configured-values"},""!==this.state.securityData.auto_prepend_file?this.state.securityData.auto_prepend_file:"-"),o.a.createElement("td",{className:"min-requirement-values"},"-")),o.a.createElement("tr",null,o.a.createElement("td",null,"upload_max_filesize "),o.a.createElement("td",{className:"ini-configured-values"},""!==this.state.securityData.upload_max_filesize?this.state.securityData.upload_max_filesize:"-"),o.a.createElement("td",{className:"min-requirement-values"},"2M")),o.a.createElement("tr",null,o.a.createElement("td",null,"file_uploads "),o.a.createElement("td",{className:"ini-configured-values"},""!==this.state.securityData.file_uploads?this.state.securityData.file_uploads:"-"),o.a.createElement("td",{className:"min-requirement-values"},"On")),o.a.createElement("tr",null,o.a.createElement("td",null,"allow_url_fopen "),o.a.createElement("td",{className:"ini-configured-values"},""!==this.state.securityData.allow_url_fopen?this.state.securityData.allow_url_fopen:"-"),o.a.createElement("td",{className:"min-requirement-values"},"On")),o.a.createElement("tr",null,o.a.createElement("td",null,"max_execution_time "),o.a.createElement("td",{className:"ini-configured-values"},""!==this.state.securityData.max_execution_time?this.state.securityData.max_execution_time:"-"),o.a.createElement("td",{className:"min-requirement-values"},"3000")),o.a.createElement("tr",null,o.a.createElement("td",null,"max_input_time "),o.a.createElement("td",{className:"ini-configured-values"},""!==this.state.securityData.max_input_time?this.state.securityData.max_input_time:"-"),o.a.createElement("td",{className:"min-requirement-values"},"3000")),o.a.createElement("tr",null,o.a.createElement("td",null,"max_input_vars "),o.a.createElement("td",{className:"ini-configured-values"},""!==this.state.securityData.max_input_vars?this.state.securityData.max_input_vars:"-"),o.a.createElement("td",{className:"min-requirement-values"},"3000")),o.a.createElement("tr",null,o.a.createElement("td",null,"memory_limit "),o.a.createElement("td",{className:"ini-configured-values"},""!==this.state.securityData.wp_memory_limit?this.state.securityData.wp_memory_limit:"-"),o.a.createElement("td",{className:"min-requirement-values"},"99M")))),o.a.createElement("h4",{class:"mt30"},this.context.language.RequiredtoenabledisableLoadersExtentionsandmodules),o.a.createElement("table",{className:"table table-striped"},o.a.createElement("tbody",null,o.a.createElement("tr",null,o.a.createElement("td",null,"PDO"),o.a.createElement("td",null,""!==this.state.securityData.PDO?this.state.securityData.PDO:"-"),o.a.createElement("td",null)),o.a.createElement("tr",null,o.a.createElement("td",null,"Curl "),o.a.createElement("td",null,""!==this.state.securityData.curl?this.state.securityData.curl:"-"),o.a.createElement("td",null)))),o.a.createElement("h4",{className:"mt30"},this.context.language.DebugInformation),o.a.createElement("table",{className:"table table-striped"},o.a.createElement("tbody",null,o.a.createElement("tr",null,o.a.createElement("td",{className:"debug-info-name",style:{width:"25%"}},"WordPress Version"),o.a.createElement("td",null,""!==this.state.securityData.wp_version?this.state.securityData.wp_version:"-"),o.a.createElement("td",null)),o.a.createElement("tr",null,o.a.createElement("td",{className:"debug-info-name"},"PHP Version"),o.a.createElement("td",null,""!==this.state.securityData.php_version?this.state.securityData.php_version:"-"),o.a.createElement("td",null)),o.a.createElement("tr",null,o.a.createElement("td",{className:"debug-info-name"},"MySQL Version"),o.a.createElement("td",null,""!==this.state.securityData.db_version?this.state.securityData.db_version:"-"),o.a.createElement("td",null)),o.a.createElement("tr",null,o.a.createElement("td",{className:"debug-info-name"},"Server SoftWare"),o.a.createElement("td",null,""!==this.state.securityData.server_software?this.state.securityData.server_software:"-"),o.a.createElement("td",null)),o.a.createElement("tr",null,o.a.createElement("td",{className:"debug-info-name"},"Your User Agent"),o.a.createElement("td",null,""!==this.state.securityData.http_agent?this.state.securityData.http_agent:"-"),o.a.createElement("td",null)),o.a.createElement("tr",null,o.a.createElement("td",{className:"debug-info-name"},"WPDB Prefix"),o.a.createElement("td",null,""!==this.state.securityData.db_prefix?this.state.securityData.db_prefix:"-"),o.a.createElement("td",null)),o.a.createElement("tr",null,o.a.createElement("td",{className:"debug-info-name"},"WP Multisite Mode"),o.a.createElement("td",null,""!==this.state.securityData.wp_multi_site?this.state.securityData.wp_multi_site:"-"," "),o.a.createElement("td",null)),o.a.createElement("tr",null,o.a.createElement("td",{className:"debug-info-name"},"WP Memory Limit"),o.a.createElement("td",null,""!==this.state.securityData.wp_memory_limit?this.state.securityData.wp_memory_limit:"-"),o.a.createElement("td",null))))))))}}]),i}(r.Component);M()(je,"contextType",E);var Fe=je;function He(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var ze=function(e){h()(n,e);var t=He(n);function n(){return l()(this,n),t.apply(this,arguments)}return u()(n,[{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("settings")}},{key:"render",value:function(){return o.a.createElement("div",{className:"col-sm-8 col-md-9"},o.a.createElement("div",{className:"setting-tab-pane setting-tabpane4 active"},o.a.createElement("div",{className:"row justify-content-center"},o.a.createElement("div",{className:"col-md-10 mt20"},o.a.createElement("h1",{className:"main-heading"},this.context.language.Documentation),o.a.createElement("div",{className:"embed-responsive embed-responsive-16by9"},o.a.createElement("iframe",{className:"embed-responsive-item",src:"https://www.youtube.com/embed/GbDlQcbnNJY",allowfullscreen:!0})),o.a.createElement("h1",{className:"main-heading"},this.context.language.SmackcodersGuidelines),o.a.createElement("ul",{className:"list-unstyled"},o.a.createElement("li",null,o.a.createElement("a",{href:"https://goo.gl/OAVF9u",target:"_blank"},this.context.language.DevelopmentNews," ")),o.a.createElement("li",null,o.a.createElement("a",{href:"https://goo.gl/kKWPui",target:"_blank"},this.context.language.WhatsNew," ")),o.a.createElement("li",null,o.a.createElement("a",{href:"https://goo.gl/hyU5G1",target:"_blank"},this.context.language.Documentation," ")),o.a.createElement("li",null,o.a.createElement("a",{href:"https://www.youtube.com/watch?v=48soc8Wu4zs&feature=youtu.be",target:"_blank"},this.context.language.YoutubeChannel," ")),o.a.createElement("li",null,o.a.createElement("a",{href:"https://goo.gl/smw3WV",target:"_blank"},this.context.language.OtherWordPressPlugins," ")))))))}}]),n}(r.Component);M()(ze,"contextType",E);var Be=ze;function Ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var Ve=function(e){h()(n,e);var t=Ue(n);function n(e){var r;return l()(this,n),(r=t.call(this,e)).state={generalSettingsTabActive:"active",databaseOptimizationTabActive:"",securityAndPerformanceTabActive:"",documentationTabActive:""},r}return u()(n,[{key:"showSettingsOptions",value:function(){var e=this;return o.a.createElement("div",{className:"setting-tab-section col-sm-4 col-md-3"},o.a.createElement("ul",{className:"setting-tab"},o.a.createElement("li",{"data-setting":"setting-tabpane1",className:"setting-tab-list ".concat(this.state.generalSettingsTabActive),onClick:function(t){e.setState({generalSettingsTabActive:"active",databaseOptimizationTabActive:"",securityAndPerformanceTabActive:"",documentationTabActive:"",mediaReportTabActive:""})}},o.a.createElement("i",{className:"csv-icon-cog","aria-hidden":"true"}),this.context.language.GeneralSettings),o.a.createElement("li",{"data-setting":"setting-tabpane2",className:"setting-tab-list pro-tag ".concat(this.state.databaseOptimizationTabActive),onClick:function(t){e.setState({databaseOptimizationTabActive:"active",generalSettingsTabActive:"",securityAndPerformanceTabActive:"",documentationTabActive:"",mediaReportTabActive:""})}},o.a.createElement("i",{className:"csv-icon-database","aria-hidden":"true"}),this.context.language.DatabaseOptimization),o.a.createElement("li",{"data-setting":"setting-tabpane3",className:"setting-tab-list ".concat(this.state.securityAndPerformanceTabActive),onClick:function(t){e.setState({securityAndPerformanceTabActive:"active",generalSettingsTabActive:"",databaseOptimizationTabActive:"",documentationTabActive:"",mediaReportTabActive:""})}},o.a.createElement("i",{className:"csv-icon-settings1","aria-hidden":"true"})," ",this.context.language.SecurityandPerformance),o.a.createElement("li",{"data-setting":"setting-tabpane4",className:"setting-tab-list ".concat(this.state.documentationTabActive),onClick:function(t){e.setState({documentationTabActive:"active",generalSettingsTabActive:"",databaseOptimizationTabActive:"",securityAndPerformanceTabActive:"",mediaReportTabActive:""})}},o.a.createElement("i",{className:"csv-icon-file-text","aria-hidden":"true"})," ",this.context.language.Documentation)))}},{key:"render",value:function(){return o.a.createElement("div",{id:"mapping-accordion",className:"container"},o.a.createElement("div",{className:"card csv-importer-panel mt20"},o.a.createElement("div",{className:"row"},this.showSettingsOptions(),"active"===this.state.generalSettingsTabActive?o.a.createElement(Re,null):"active"===this.state.databaseOptimizationTabActive?o.a.createElement(_e,null):"active"===this.state.securityAndPerformanceTabActive?o.a.createElement(Fe,null):"active"===this.state.documentationTabActive?o.a.createElement(Be,null):o.a.createElement("div",null," ",this.context.language.NotSelectedAnyTab," "))))}}]),n}(r.Component);M()(Ve,"contextType",E);var We=Ve,qe=o.a.createContext();function Ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var Je=function(e){h()(r,e);var t,n=Ge(r);function r(e){var t;return l()(this,r),(t=n.call(this,e)).state={setExistingBucket:"",rewriteUrl:!1,loading:!1},t}return u()(r,[{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("storage"),this.checkContextValues()}},{key:"checkContextValues",value:function(){console.log("rewrite_url",this.context.rewriteUrl),console.log("offloadmedia",this.context.offloadMedia),console.log("copyfiles",this.context.statusCopyFiles)}},{key:"updateStorageSetting",value:(t=y()(v.a.mark((function e(){var t;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","storage_settings_details"),t.set("copyfiles",this.context.statusCopyFiles),t.set("yearpath",this.context.statusYearPath),t.set("offloadmedia",this.context.offloadMedia),t.set("rewriteurl",this.context.rewriteUrl),t.set("statusPath",this.context.statusPathSettings),t.set("cnamePath",this.context.cnamePathSettings),t.set("path",this.context.mediaPath),t.set("cname",this.context.domainPath),t.set("provider",this.context.chosenServiceProvider),t.set("updatedbucket",this.context.selectedBucketsName),this.setState({loading:!0}),e.next=15,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 15:200==e.sent.status&&(this.setState({loading:!1}),console.log("rewrite",this.context.rewriteUrl),D.toast.success("Settings Successfully Updated"));case 17:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this;return console.log("text",this.context.chosenServiceProvider),this.state.backToselectbucket?o.a.createElement($e,null):o.a.createElement("div",{className:"wp-ultimate-csv-importer"},o.a.createElement("div",{id:"mapping-accordian",className:"container"},o.a.createElement("div",{className:"card csv-importer-panel mt20"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col-sm-12 col-md-12"},o.a.createElement("div",{className:"setting-tab-pane setting-tabpane1 active"},o.a.createElement("div",{className:"row justify-content-center"},o.a.createElement("div",{className:"col-md-10 mt20"},o.a.createElement("h1",{className:"main-heading"},"Storage Settings"),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-md-5"},o.a.createElement("h4",null,"Providers")),o.a.createElement("div",{className:"col-md-7"},this.context.chosenServiceProvider)),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-md-5"},o.a.createElement("h4",null,"Origin")),o.a.createElement("div",{className:"col-md-7"},o.a.createElement("a",{href:this.context.endPoints,target:"_blank"}," ",this.context.endPoints))),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-md-5"},o.a.createElement("h4",null,"Edge")),o.a.createElement("div",{className:"col-md-7"},o.a.createElement("a",{href:this.context.edgePoints,target:"_blank"}," ",this.context.edgePoints))),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-md-5"},o.a.createElement("h4",null,"Buckets")),o.a.createElement("div",{className:"col-md-7"},this.context.selectedBucketsName," ",o.a.createElement("a",{href:"","data-toggle":"modal","data-target":"#myModal"},o.a.createElement("u",null,"change")))),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-md-5"},o.a.createElement("h4",null,"Copy Files to Bucket"),o.a.createElement("small",{className:"form-text text-muted"},"When a file is uploaded to the Media Library, copy it to the bucket")),o.a.createElement("div",{className:"col-md-7"},o.a.createElement("div",{className:"form-group fieldset"},o.a.createElement("input",{id:"copyFiles",className:"form-control",type:"checkbox",checked:this.context.statusCopyFiles,onClick:function(t){e.context.statusCopyFiles=t.target.checked,e.context.setStatusCopyFile(e.context.statusCopyFiles)}}),o.a.createElement("label",{className:"switch-ios",for:"copyFiles"},o.a.createElement("i",null))))),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-md-5"},o.a.createElement("h4",null,"Year/Month"),o.a.createElement("small",{className:"form-text text-muted"},"Add the Year/Month to the end of the path above just like WordPress does by default.")),o.a.createElement("div",{className:"col-md-7"},o.a.createElement("div",{className:"form-group fieldset"},o.a.createElement("input",{id:"yearpath",className:"form-control",type:"checkbox",checked:this.context.statusYearPath,onClick:function(t){e.context.statusYearPath=t.target.checked,e.context.setStatusYearPath(e.context.statusYearPath)}}),o.a.createElement("label",{className:"switch-ios",for:"yearpath"},o.a.createElement("i",null))))),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-md-5"},o.a.createElement("h4",null,"Offload Media Images"),o.a.createElement("small",{className:"form-text text-muted"},"Copy all Media images to Digital Ocean")),o.a.createElement("div",{className:"col-md-7"},o.a.createElement("div",{className:"form-group fieldset"},o.a.createElement("input",{id:"offloadmedia",className:"form-control",type:"checkbox",checked:this.context.offloadMedia,onClick:function(t){e.context.offloadMedia=t.target.checked,e.context.setOffloadMedia(e.context.offloadMedia)}}),o.a.createElement("label",{className:"switch-ios",for:"offloadmedia"},o.a.createElement("i",null))))),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-md-5"},o.a.createElement("h4",null,"Rewrite image URL"),o.a.createElement("small",{className:"form-text text-muted"},"Url loaded from Digital Ocean")),o.a.createElement("div",{className:"col-md-7"},o.a.createElement("div",{className:"form-group fieldset"},o.a.createElement("input",{id:"rewriteurl",className:"form-control",type:"checkbox",checked:this.context.rewriteUrl,onClick:function(t){e.context.rewriteUrl=t.target.checked,e.context.setRewriteUrl(e.context.rewriteUrl),console.log(e.context.rewriteUrl)}}),o.a.createElement("label",{className:"switch-ios",for:"rewriteurl"},o.a.createElement("i",null))))),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-md-5"},o.a.createElement("h4",null,"Path"),o.a.createElement("small",{className:"form-text text-muted"},'By default the path is the same as your local WordPress files Don\'t start any path with a forward slash, or it will give "SignatureDoesNotMatch" exception'),this.context.statusPathSettings?o.a.createElement("div",{className:"new-bucket"},o.a.createElement("div",{className:"tab-content",id:"v-pills-tabContent"},o.a.createElement("div",{className:"form-group col-md-12"},o.a.createElement("input",{id:"path",className:"form-control",type:"text",placeholder:"path",value:this.context.mediaPath,onChange:function(t){console.log("path",t.target.value),e.context.mediaPath=t.target.value,e.context.setMediaPath(e.context.mediaPath)}})))):""),o.a.createElement("div",{className:"col-md-7"},o.a.createElement("div",{className:"form-group fieldset"},o.a.createElement("input",{id:"path",className:"form-control",type:"checkbox",checked:this.context.statusPathSettings,onClick:function(t){console.log("Checked Status",t.target.checked),e.context.statusPathSettings=t.target.checked,e.context.setStatusPathSettings(e.context.statusPathSettings)}}),o.a.createElement("label",{className:"switch-ios",for:"path"},o.a.createElement("i",null))))),o.a.createElement("div",{className:"form-group row"},o.a.createElement("div",{className:"col-md-5"},o.a.createElement("h4",null,"CNAME(Custom Domain)"),o.a.createElement("small",{className:"form-text text-muted"},"We strongly recommend you configure a CDN to point at your bucket and configure a subdomain of localhost to point at your CDN."),o.a.createElement("div",{className:"new-bucket"},this.context.cnamePathSettings?o.a.createElement("div",{className:"tab-content",id:"v-pills-tabContent"},o.a.createElement("div",{className:"form-group col-md-12"},o.a.createElement("input",{id:"path",className:"form-control",type:"text",placeholder:"cname",value:this.context.domainPath,onChange:function(t){console.log("path",t.target.value),e.context.domainPath=t.target.value,e.context.setDomainPath(e.context.domainPath)}}))):"")),o.a.createElement("div",{className:"col-md-7"},o.a.createElement("div",{className:"form-group fieldset"},o.a.createElement("input",{id:"cname",className:"form-control",type:"checkbox",checked:this.context.cnamePathSettings,onClick:function(t){e.context.cnamePathSettings=t.target.checked,e.context.setCnamePathSettings(e.context.cnamePathSettings),console.log("Checked",t.target.checked)}}),o.a.createElement("label",{className:"switch-ios",for:"cname"},o.a.createElement("i",null))))),o.a.createElement("div",{className:"float-left pad10 "},o.a.createElement("input",{className:"smack-btn smack-btn-primary",type:"button",value:"Back",onClick:function(t){console.log("back"),e.setState({backToselectbucket:!0})}})),o.a.createElement("div",{className:"float-right pad10 "},this.state.loading?this.context.loaderText:o.a.createElement("input",{className:"smack-btn smack-btn-primary",type:"button",value:"Configure",onClick:function(t){e.updateStorageSetting()}}))))))))),o.a.createElement("div",{className:"modal-bucket"},o.a.createElement("div",{className:"modal",id:"myModal"},o.a.createElement("div",{className:"modal-dialog"},o.a.createElement("div",{className:"modal-content"},o.a.createElement("div",{className:"modal-header"},o.a.createElement("h1",{className:"main-heading"},"Choose From Existing Bucket"),o.a.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},"×")),o.a.createElement("div",{className:"modal-body"},o.a.createElement("div",{className:"form-group"},o.a.createElement("div",{className:"bucket-list"},this.context.bucketLists.map((function(t){return o.a.createElement("li",{style:{backgroundColor:t===e.context.selectedBucketsName?"#00a699":""},onClick:function(n){console.log("bucket",t),e.context.setExistingBucket(t)}},o.a.createElement("i",{className:"list-icon"})," ",t," ")}))))))))))}}]),r}(r.Component);M()(Je,"contextType",E);var Ke=Je;function Qe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var Xe=function(e){h()(r,e);var t,n=Qe(r);function r(e){var t;return l()(this,r),(t=n.call(this,e)).state={createBucketsection:!1,backTomediadisplay:!1,selectedBucket:"",createNewBucket:!1,setExistingBucket:""},t}return u()(r,[{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("bucket")}},{key:"getBucketDetails",value:(t=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","get_bucket_details"),t.set("bucketname",this.state.selectedBucket),t.set("existingbucket",this.context.selectedBucketsName),e.next=6,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 6:n=e.sent,console.log("origin",n.data.origin),console.log("edge",n.data.edge),200==n.status&&(this.context.setEndPoint(n.data.origin),this.context.setEdgePoint(n.data.edge),this.setState({createBucketsection:!0}),D.toast.success("Bucket selected"));case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this;return this.state.backTomediadisplay?o.a.createElement(tt,null):this.state.createBucketsection?o.a.createElement(Ke,null):o.a.createElement("div",{className:"wp-ultimate-csv-importer"},o.a.createElement("div",{id:"mapping-accordian",className:"container"},o.a.createElement("div",{className:"card csv-importer-panel mt20"},o.a.createElement("div",{className:"choose-bucket"},o.a.createElement("div",{className:"row justify-content-center"},o.a.createElement("div",{className:"col-md-10"},o.a.createElement("div",{className:"form-group mb3"},o.a.createElement("input",{id:"existingBucket",type:"checkbox",name:"bucketchange"}),o.a.createElement("label",{for:"existingBucket"},o.a.createElement("h6",null,"Choose from Existing Bucket")),o.a.createElement("ul",{className:"bucket-list select-bucket col-md-11"},this.context.bucketLists.map((function(t){return o.a.createElement("li",{style:{backgroundColor:t===e.context.selectedBucketsName?"#00a699":""},onClick:function(n){console.log("bucket",t),e.context.setExistingBucket(t)}},o.a.createElement("i",{className:"list-icon"})," ",t," ")})))),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{id:"newBucket",type:"checkbox",name:"bucketchange",onClick:function(t){e.setState({createNewBucket:t.target.checked}),console.log("Checked Status",t.target.checked)}}),o.a.createElement("label",{for:"newBucket"},o.a.createElement("h6",null,"Create New Bucket")),this.state.createNewBucket?o.a.createElement("div",{className:"new-bucket"},o.a.createElement("div",{className:"tab-content",id:"v-pills-tabContent"},o.a.createElement("div",{className:"form-group col-md-12"},o.a.createElement("input",{id:"bucketName",className:"form-control",type:"text",placeholder:"Bucket Name",onChange:function(t){console.log("bucket",t.target.value),e.setState({selectedBucket:t.target.value})}})))):""),o.a.createElement("div",{className:"float-left pad10 "},o.a.createElement("input",{className:"smack-btn smack-btn-primary",type:"button",value:"Back",onClick:function(t){console.log("back"),e.setState({backTomediadisplay:!0})}})),o.a.createElement("div",{className:"float-right pad10 "},this.state.createNewBucket?o.a.createElement("input",{className:"smack-btn smack-btn-primary",type:"button",value:"Create Bucket",onClick:function(t){e.getBucketDetails()}}):o.a.createElement("input",{className:"smack-btn smack-btn-primary",type:"button",value:"Choose Bucket",onClick:function(t){e.getBucketDetails()}}))))))))}}]),r}(r.Component);M()(Xe,"contextType",E);var $e=Xe;function Ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var et=function(e){h()(a,e);var t,n,r=Ze(a);function a(e){var t;return l()(this,a),(t=r.call(this,e)).state={loading:!1,activateBucketsection:!1,choosenServiceProvider:"",selectedRegion:""},t}return u()(a,[{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("media"),this.displayActualComponent()}},{key:"displayActualComponent",value:(n=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","get_actual_component_details"),e.prev=2,e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:n=e.sent,console.log("Response",n.data),200==n.status&&n.data.success?(this.context.setExistingBucket(n.data.bucket),this.context.setEndPoint(n.data.origin),this.context.setSelectedServiceProvider(n.data.provider),this.context.setStatusCopyFile(n.data.copy_files),this.context.setStatusYearPath(n.data.copy_year),this.context.setOffloadMedia(n.data.offload_media),this.context.setRewriteUrl(n.data.rewrite_url),this.context.setMediaPath(n.data.media_path),this.context.setStatusPathSettings(n.data.status_path),this.context.setDomainPath(n.data.domain_name),this.context.setCnamePathSettings(n.data.cname_path),this.context.setEdgePoint(n.data.edge),this.context.setBucketLists(n.data.bucket_list)):200==n.status&&n.data.success,e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),console.log(e.t0);case 13:case"end":return e.stop()}}),e,this,[[2,10]])}))),function(){return n.apply(this,arguments)})},{key:"getServiceProvider",value:(t=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","get_service_provider"),t.set("provider",this.context.chosenServiceProvider),t.set("accesskey",this.context.accessKey),t.set("secretkey",this.context.secretKey),t.set("region",this.state.selectedRegion),this.setState({loading:!0}),e.prev=7,e.next=10,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 10:n=e.sent,console.log("Response",n.data),200==n.status&&n.data.buckets&&(this.setState({loading:!1}),this.context.setBucketLists(n.data.buckets),this.setState({activateBucketsection:!0}),D.toast.success("Service provider Activated")),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(7),e.t0&&(this.setState({loading:!1}),D.toast.error("Please check your credentials"));case 18:case"end":return e.stop()}}),e,this,[[7,15]])}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this;return this.context.endPoints?o.a.createElement(Ke,null):this.state.activateBucketsection?o.a.createElement($e,null):o.a.createElement("div",{className:"wp-ultimate-csv-importer"},o.a.createElement("div",{id:"mapping-accordian",class:"container"},o.a.createElement("div",{className:"card csv-importer-panel mt20"},o.a.createElement("div",{className:"row p15"},o.a.createElement("div",{className:"col-sm-12 col-md-12"},o.a.createElement("div",{className:"setting-tab-pane setting-tabpane1 active"},o.a.createElement("div",{className:"csv-importer-provider"},o.a.createElement("div",{className:"row justify-content-center"},o.a.createElement("div",{className:"form-group"},o.a.createElement("h1",{className:"main-heading"},"Choose Storage Provider"),o.a.createElement("div",{className:"d-flex mt10"},o.a.createElement("div",{className:"form-check form-check-inline form-group synctype"},o.a.createElement("input",{id:"amazon",className:"form-check-input",type:"radio",name:"sync_type",onClick:function(t){e.context.setSelectedServiceProvider("amazonS3")}}),o.a.createElement("label",{className:"form-check-label",for:"amazon"},o.a.createElement("img",{src:"".concat(window.wpr_object.imagePath,"amazon-s3.png"),className:"image-section",alt:"amazon-s3"}),"Amazon S3")),o.a.createElement("div",{className:"form-check form-check-inline form-group synctype"},o.a.createElement("input",{id:"digitalOcean",className:"form-check-input",type:"radio",name:"sync_type",onClick:function(t){e.context.setSelectedServiceProvider("digitalOcean")}}),o.a.createElement("label",{className:"form-check-label",for:"digitalOcean"},o.a.createElement("img",{src:"".concat(window.wpr_object.imagePath,"digitalocean.png"),className:"image-section",alt:"digitalocean"}),"Digital Ocean"))))),o.a.createElement("div",{className:"tab-content",id:"v-pills-tabContent"},o.a.createElement("div",{className:"row justify-content-center"},o.a.createElement("div",{className:"form-group col-md-9"},o.a.createElement("h6",null,"Input Credentials"),o.a.createElement("label",{className:"pt10",for:"accesskey"},"Access Key"),o.a.createElement("input",{id:"accesskey",className:"form-control",type:"text",value:this.context.accessKey,placeholder:"",onChange:function(t){e.context.accessKey=t.target.value,e.context.setAccessKey(e.context.accessKey)}}),o.a.createElement("label",{className:"pt10",for:"secretkey"},"Secret Key"),o.a.createElement("input",{id:"secretkey",className:"form-control",type:"text",value:this.context.secretKey,placeholder:"",onChange:function(t){e.context.secretKey=t.target.value,e.context.setSecretKey(e.context.secretKey)}}),console.log(this.context.chosenServiceProvider),"digitalOcean"===this.context.chosenServiceProvider?o.a.createElement("div",{className:"pt10"},o.a.createElement("h4",null,"Region"),o.a.createElement("div",{className:"pt10"},o.a.createElement("select",{className:"col-md-7",value:this.context.selectedRegion,onClick:function(t){e.setState({selectedRegion:t.target.value})}},o.a.createElement("option",{value:"New York"},"New York"),o.a.createElement("option",{value:"Amsterdam"},"Amsterdam"),o.a.createElement("option",{value:"Singapore"},"Singapore"),o.a.createElement("option",{value:"San Francisco"},"San Francisco"),o.a.createElement("option",{value:"Frankfurt"},"Frankfurt")))):"amazonS3"===this.context.chosenServiceProvider?o.a.createElement("div",{className:"pt10"},o.a.createElement("h4",null,"Region"),o.a.createElement("div",{className:"pt10"},o.a.createElement("select",{className:"col-md-7",onClick:function(t){console.log("Region",t.target.value),e.setState({selectedRegion:t.target.value})}},o.a.createElement("option",{value:"US East (N. Virginia)"},"US East (N. Virginia)"),o.a.createElement("option",{value:"US East (Ohio)"},"US East (Ohio)"),o.a.createElement("option",{value:"US West (N. California)"},"US West (N. California)"),o.a.createElement("option",{value:"US West (Oregon)"},"US West (Oregon)"),o.a.createElement("option",{value:"Canada (Central)"},"Canada (Central)"),o.a.createElement("option",{value:"Asia Pacific (Mumbai)"},"Asia Pacific (Mumbai)"),o.a.createElement("option",{value:"Asia Pacific (Seoul)"},"Asia Pacific (Seoul)"),o.a.createElement("option",{value:"Asia Pacific (Singapore)"},"Asia Pacific (Singapore)"),o.a.createElement("option",{value:"Asia Pacific (Sydney)"},"Asia Pacific (Sydney)"),o.a.createElement("option",{value:"Asia Pacific (Tokyo)"},"Asia Pacific (Tokyo)"),o.a.createElement("option",{value:"EU (Frankfurt)"},"EU (Frankfurt)"),o.a.createElement("option",{value:"EU (Ireland)"},"EU (Ireland)"),o.a.createElement("option",{value:"EU (London)"},"EU (London)"),o.a.createElement("option",{value:"EU (Paris)"},"EU (Paris)"),o.a.createElement("option",{value:"South America (Sao Paulo)"},"South America (Sao Paulo)")))):"googlecloud"===this.context.chosenServiceProvider?o.a.createElement("div",{className:"pt10"},o.a.createElement("h4",null,"Region"),o.a.createElement("div",{className:"pt10"},o.a.createElement("select",{className:"col-md-7",onClick:function(t){console.log("Region",t.target.value),e.setState({selectedRegion:t.target.value})}},o.a.createElement("option",{value:"United States (Multi-Regional)"},"United States (Multi-Regional)"),o.a.createElement("option",{value:"Asia (Multi-Regional)"},"Asia (Multi-Regional)"),o.a.createElement("option",{value:"European Union (Multi-Regional)"},"European Union (Multi-Regional)"),o.a.createElement("option",{value:"Montréal"},"Montréal"),o.a.createElement("option",{value:"Iowa"},"Iowa"),o.a.createElement("option",{value:"South Carolina"},"South Carolina"),o.a.createElement("option",{value:"Northern Virginia"},"Northern Virginia"),o.a.createElement("option",{value:"Oregon"},"Oregon"),o.a.createElement("option",{value:"Los Angeles"},"Los Angeles"),o.a.createElement("option",{value:"São Paulo"},"São Paulo"),o.a.createElement("option",{value:"Finland"},"Finland"),o.a.createElement("option",{value:"Belgium"},"Belgium"),o.a.createElement("option",{value:"London"},"London"),o.a.createElement("option",{value:"Frankfurt"},"Frankfurt"),o.a.createElement("option",{value:"Netherlands"},"Netherlands"),o.a.createElement("option",{value:"Taiwan"},"Taiwan"),o.a.createElement("option",{value:"Hong Kong"},"Hong Kong"),o.a.createElement("option",{value:"Tokyo"},"Tokyo"),o.a.createElement("option",{value:"Mumbai"},"Mumbai"),o.a.createElement("option",{value:"Singapore"},"Singapore"),o.a.createElement("option",{value:"Sydney"},"Sydney"),o.a.createElement("option",{value:"Zurich"},"Zurich"),o.a.createElement("option",{value:"Seoul"},"Seoul"),o.a.createElement("option",{value:"Salt Lake City"},"Salt Lake City")))):"",o.a.createElement("div",{className:"float-right"},this.state.loading?this.context.loaderText:o.a.createElement("input",{className:"smack-btn smack-btn-primary",type:"button",value:"Activate",onClick:function(t){e.getServiceProvider()}}))))))))))))}}]),a}(r.Component);M()(et,"contextType",E);var tt=et;function nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var rt=function(e){h()(a,e);var t,n,r=nt(a);function a(e){var t;return l()(this,a),(t=r.call(this,e)).state={loadingSupport:!1,loadingSubscription:!1,supportEmail:"",supportType:"",message:"",newsletterEmail:"",errors:""},t.supportEmail="",t}return u()(a,[{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("support")}},{key:"submitContactForm",value:(n=y()(v.a.mark((function e(t){var n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new FormData).set("action","support_mail"),n.set("email",this.state.supportEmail),n.set("query",this.state.supportType),n.set("message",this.state.message),this.setState({loadingSupport:!0}),e.next=8,S()({method:"post",url:ajaxurl,data:n,config:{headers:{"Content-Type":"multipart/form-data"}}});case 8:200==e.sent.status&&(this.setState({loadingSupport:!1,supportEmail:"",message:""}),D.toast.success("Mail Sent Successfully"));case 10:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"submitSubscriptionForm",value:(t=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","send_subscribe_email"),t.set("subscribe_email",this.state.newsletterEmail),this.setState({loadingSubscription:!0}),e.next=6,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 6:(n=e.sent)&&n.data&&200==n.status&&(this.setState({loadingSubscription:!1,newsletterEmail:""}),D.toast.success("Successfull Subscribe to Newsletter"));case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"handleValidation",value:function(e){this.supportEmail=e;var t=!0;return""===this.supportEmail&&(t=!1),void 0!==this.supportEmail&&(t=!!new RegExp(/[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,15}/g).test(this.supportEmail)),t}},{key:"render",value:function(){var e=this;return o.a.createElement("div",{id:"mapping-accordion",className:"container"},o.a.createElement("div",{className:"card csv-importer-panel mt20"},o.a.createElement("div",{className:"card-body"},o.a.createElement("div",{className:"row justify-content-around"},o.a.createElement("div",{className:"col-md-12 text-center mt10 mb30"},o.a.createElement("p",null,this.context.language.LoveWPUltimateCSVImporterGivea5starreviewon," ",o.a.createElement("a",{className:"csv-link",href:"https://wordpress.org/support/plugin/wp-ultimate-csv-importer/reviews/?filter=5",target:"_blank"}," ","wordpress.org!"))),o.a.createElement("div",{className:"col-md-6"},o.a.createElement("div",{className:"border-container"},o.a.createElement("h5",{className:"border-container-header"},this.context.language.ContactSupport),o.a.createElement("form",{method:"",action:""},o.a.createElement("div",{className:"form-group"},o.a.createElement("label",null,this.context.language.Email),o.a.createElement("input",{type:"text",className:"form-control",value:this.state.supportEmail,onChange:function(t){e.setState({supportEmail:t.target.value})}}),o.a.createElement("p",{style:{color:"red"}},this.state.errors)),o.a.createElement("div",{className:"form-group"},o.a.createElement("label",null,this.context.Supporttype),o.a.createElement("select",{className:"form-control",value:this.state.supportType,onClick:function(t){e.setState({supportType:t.target.value})}},o.a.createElement("option",{value:"bug_reporting"},this.context.language.BugReporting),o.a.createElement("option",{value:"feature_enhancement"},this.context.language.FeatureEnhancement))),o.a.createElement("div",{className:"form-group"},o.a.createElement("label",null,this.context.language.Message),o.a.createElement("textarea",{className:"form-control",value:this.state.message,onChange:function(t){e.setState({message:t.target.value})},rows:"5"})),o.a.createElement("div",{className:"form-group d-flex justify-content-end"},this.state.loadingSupport?this.context.loaderText:o.a.createElement("input",{type:"button",name:"",onClick:function(t){""===e.state.errors&&""!==e.state.message?e.submitContactForm.bind(e)(t):(""!==e.state.errors&&D.toast.info("Email you entered is not valid"),""===e.state.message&&D.toast.info("You don't describe the bug or feature you want to enhance"))},className:"smack-btn smack-btn-primary",value:this.context.language.Send}))))),o.a.createElement("div",{className:"col-md-6"},o.a.createElement("div",{className:"border-container"},o.a.createElement("h5",{className:"border-container-header"},this.context.language.NewsletterSubscription),o.a.createElement("form",{action:"",method:""},o.a.createElement("div",{className:"form-group"},o.a.createElement("label",null,this.context.language.Email),o.a.createElement("input",{type:"email",name:"",className:"form-control",value:this.state.newsletterEmail,onChange:function(t){e.setState({newsletterEmail:t.target.value}),e.handleValidation(e.state.newsletterEmail)?e.setState({errorsSubscribe:""}):e.setState({errorsSubscribe:"Email entered is not Valid"})}}),o.a.createElement("p",{style:{color:"red"}},this.state.errorsSubscribe)),o.a.createElement("div",{className:"form-group d-flex justify-content-end"},this.state.loadingSubscription?this.context.loaderText:o.a.createElement("input",{type:"button",name:"",className:"smack-btn smack-btn-primary",onClick:function(){""===e.state.errorsSubscribe?e.submitSubscriptionForm():D.toast.info("Email you entered is not valid")},value:this.context.language.Subscribe})))),o.a.createElement("div",{className:"mt40 p15"},o.a.createElement("h5",null,this.context.language.Note),o.a.createElement("div",{className:"mt20"},o.a.createElement("i",{className:"csv-icon-document-text text-primary mr5"}),this.context.language.SubscribetoSmackcodersMailinglistafewmessagesayear),o.a.createElement("div",{className:"mt20"},o.a.createElement("i",{className:"csv-icon-mail text-primary mr5"}),this.context.language.Pleasedraftamailto," ",o.a.createElement("span",{className:"text-primary font-weight-bold"},"support@smackcoders.com.")," ",this.context.language.Ifyoudoesnotgetanyacknowledgementwithinanhour)))))))}}]),a}(r.Component);M()(rt,"contextType",E);var ot=rt,at=n(83);function it(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var st=function(e){h()(a,e);var t,n,r=it(a);function a(e){var t;return l()(this,a),(t=r.call(this,e)).state={loading:!1,barChartLabel:[],createdValue:[],skippedValue:[],updatedValue:[],monthList:[],lineChartData:[]},t.chartOptions={scales:{xAxes:[{stacked:!0}],yAxes:[{stacked:!0}],maintainAspectRatio:!1,delay:500}},t.lineOptions={scales:{maintainAspectRatio:!1,delay:500}},t.lineDataNew=[],t}return u()(a,[{key:"componentDidMount",value:function(){this.getBarData(),this.listLastMonths(),this.getLineData(),this.context.setSelectedTabOnCookies("dashboard")}},{key:"getRandomColor",value:function(){var e=new Array("#e8e8e8","#f5ddde","#bee4e5","#cfe0c7","#f7e4bb","#9c89b8 ","#f0a6ca","#efc3e6","#f0e6ef","#b8bedd");return e[Math.floor(Math.random()*e.length)]}},{key:"getLineData",value:(n=y()(v.a.mark((function e(){var t,n,r,o,a,i,s,l,c,u,d,h,p;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","LineChart"),this.setState({loading:!0}),e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:if(200==(n=e.sent).status&&n.data.success){for(r=n.data,o={data:[],label:n.data.label,color:[]},a=0;a<r.data.length;a++){for(i=[],s=0;s<r.data[a].length;s++)l=parseInt(r.data[a][s]),i.push(l);o.data.push(i),o.color.push(this.getRandomColor())}for(u in this.setState({lineChartData:o}),c=[],o)if(o.hasOwnProperty(u))for(d=0;d<o.label.length;d++)h={label:"",fill:!0,stack:"stack1",lineTension:.6,borderCapStyle:"round",borderDashOffset:0,borderJoinStyle:"miter",backgroundColor:"rgba(75,192,192,0.1)",borderColor:"",pointBackgroundColor:"#fff",pointBorderWidth:1,pointHoverRadius:5,pointHoverBorderWidth:2,pointRadius:1,pointHitRadius:10,data:[]},"data"===u&&(Object.assign(h,{data:o[u][d]}),c.push(h)),"label"===u&&(c[d].label=o[u][d]),"color"===u&&(p=this.getRandomColor(),c[d].borderColor=p,c[d].backgroundColor="rgba(".concat(p,",0.1)"));this.lineDataNew=c,this.forceUpdate()}case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getBarData",value:(t=y()(v.a.mark((function e(){var t,n,r,o,a,i,s,l,c;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","BarChart"),this.setState({loading:!0}),e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:if(200==(n=e.sent).status&&n.data.success){for(a in r=n.data,o=[],r)r.hasOwnProperty(a)&&"success"!==a&&o.push(a);for(c in this.setState({barChartLabel:o}),i=[],s=[],l=[],r)r.hasOwnProperty(c)&&"success"!==c&&(i.push(r[c].created),s.push(r[c].skipped),l.push(r[c].updated));this.setState({createdValue:i,skippedValue:s,updatedValue:l})}case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"listLastMonths",value:function(){var e,t=new Array("January","February","March","April","May","June","July","August","September","October","November","December"),n=(new Date).getMonth()+1,r=[];for(e=0;e<12;e++)r.push(t[n]),++n>11&&(n=0);this.setState({monthList:r})}},{key:"render",value:function(){this.state.lineChartData;return this.lineData={labels:this.state.monthList,datasets:this.lineDataNew},this.barData={labels:this.state.barChartLabel,datasets:[{stack:"stack1",backgroundColor:"rgba(255,99,132,1)",borderColor:"rgba(255,99,132,1)",label:"Inserted",data:this.state.createdValue},{stack:"stack1",label:"Updated",backgroundColor:"rgba(44,195,193,1)",borderColor:"rgba(255,99,132,1)",data:this.state.updatedValue},{stack:"stack1",label:"Skipped",backgroundColor:"rgba(50, 173, 255,1)",borderColor:"rgba(50, 173, 255,1)",data:this.state.skippedValue}]},o.a.createElement("div",{className:" container"},o.a.createElement("div",{className:"csv-importer-panel mt20"},o.a.createElement("div",null,o.a.createElement("div",{className:"col-md-12 mb30"},o.a.createElement("h2",{className:"main-heading"},this.context.language.ImportersActivity),o.a.createElement(at.Line,{data:this.lineData,width:"1000px",height:"450px",options:this.lineOptions})),o.a.createElement("hr",null),o.a.createElement("div",{className:"col-md-12"},o.a.createElement("h2",{className:"main-heading"},this.context.language.ImportStatistics),o.a.createElement(at.Bar,{data:this.barData,width:"1000px",height:"450px",options:this.chartOptions})))))}}]),a}(r.Component);M()(st,"contextType",E);var lt=st,ct=n(26),ut=function(e){var t=[];if(e)for(var n=0;n<e.length;n++){var r=e[n];if(1==Object.keys(r).length)t.push(r);else for(var o in r){var a={};r[o],a[o]=r[o],t.push(a)}}return t},dt={core_fields:{languageName:"WordPressCoreFields",name:"WordPress Core Fields",resultKey:"CORE",Users_MandatoryFields:["user_login","user_email"]},terms_and_taxonomies:{languageName:"TermsandTaxonomies",name:"Terms and Taxonomies",resultKey:"TERMS"},wordpress_custom_fields:{languageName:"WordPressCustomFields",name:"WordPress Custom Fields",resultKey:"CORECUSTFIELDS"},acf_pro_fields:{languageName:"ACFProFields",name:"ACF PRO Fields",resultKey:"ACF"},acf_fields:{languageName:"ACFProFields",name:"ACF PRO Fields",resultKey:"ACF"},acf_group_fields:{languageName:"ACFGroupFields",name:"ACF Group Fields",resultKey:"GF"},acf_repeater_fields:{languageName:"ACFRepeaterFields",name:"ACF Repeater Fields",resultKey:"RF"},types_fields:{languageName:"TypesCustomFields",name:"Types Custom Fields",resultKey:"TYPES"},pods_fields:{languageName:"PodsFields",name:"Pods Fields",resultKey:"PODS"},jetengine_fields:{languageName:"JetEngineFields",name:"Jet Engine Fields",resultKey:"JE"},jetengine_rf_fields:{languageName:"JetEngineRFFields",name:"Jet Engine RF Fields",resultKey:"JERF"},jetenginecpt_fields:{languageName:"JetEngineCPTFields",name:"Jet Engine CPT Fields",resultKey:"JECPT"},jetenginecpt_rf_fields:{languageName:"JetEngineCPTRFFields",name:"Jet Engine CPT RF Fields",resultKey:"JECPTRF"},jetenginetaxonomy_fields:{languageName:"JetEngineTaxonomyFields",name:"Jet Engine Taxonomy Fields",resultKey:"JETAX"},jetenginetaxonomy_rf_fields:{languageName:"JetEngineTaxonomyRFFields",name:"Jet Engine Taxonomy RF Fields",resultKey:"JETAXRF"},custom_fields_suite_fields:{languageName:"CustomFieldSuite",name:"Custom Field Suite",resultKey:"CFS"},all_in_one_seo_fields:{languageName:"AllInOneSeoFields",name:"All In One Seo Fields",resultKey:"AIOSEO"},forum_attributes_fields:{languageName:"forumattributesfields",name:"Forum Attributes Fields",resultKey:"FORUM"},topic_attributes_fields:{languageName:"topicattributesfields",name:"Topic Attributes Fields",resultKey:"TOPIC"},reply_attributes_fields:{languageName:"replyattributesfields",name:"Reply Attributes Fields",resultKey:"REPLY"},yoast_seo_fields:{languageName:"YoastSeoFields",name:"Yoast Seo Fields",resultKey:"YOASTSEO"},bp_fields:{languageName:"BuddyFields",name:"BuddyPress Fields",resultKey:"BP"},billing_and_shipping_information:{languageName:"BillingAndShippingInformation",name:"Billing And Shipping Information",resultKey:"BSI"},custom_fields_wp_members:{languageName:"CustomFieldsWPMemberFields",name:"Custom Fields WP Member Fields",resultKey:"WPMEMBERS"},product_meta_fields:{languageName:"ProductMetaFields",name:"WooCommerce Product Meta Fields",resultKey:"ECOMMETA"},product_bundle_meta_fields:{languageName:"ProductBundleMetaFields",name:"WooCommerce Product Bundle Meta Fields",resultKey:"BUNDLEMETA"},order_meta_fields:{languageName:"OrderMetaFields",name:"WooCommerce Order Meta Fields",resultKey:"ORDERMETA"},coupon_meta_fields:{languageName:"CouponMetaFields",name:"WooCommerce Coupon Meta Fields",resultKey:"COUPONMETA"},refund_meta_fields:{languageName:"RefundMetaFields",name:"Refund Meta Fields",resultKey:"REFUNDMETA"},wp_ecom_custom_fields:{languageName:"WPECommerceCustomFields",name:"WP ECommerce Custom Fields",resultKey:"WPECOMMETA"},events_manager_fields:{languageName:"EventsManagerFields",name:"Events Manager Fields",resultKey:"EVENTS"},wpml_fields:{languageName:"WPMLFields",name:"WPML Fields",resultKey:"WPML"},cmb2_fields:{languageName:"CMB2CustomFields",name:"CMB2 Custom Fields",resultKey:"CMB2"},course_settings_fields:{languageName:"CourseSettingsFields",name:"Course Settings Fields",resultKey:"LPCOURSE"},curriculum_settings_fields:{languageName:"CurriculumSettingsFields",name:"Curriculum Settings Fields",resultKey:"LPCURRICULUM"},lesson_settings_fields:{languageName:"LessonSettingsFields",name:"Lesson Settings Fields",resultKey:"LPLESSON"},quiz_settings_fields:{languageName:"QuizSettingsFields",name:"Quiz Settings Fields",resultKey:"LPQUIZ"},question_settings_fields:{languageName:"QuestionSettingsFields",name:"Question Settings Fields",resultKey:"LPQUESTION"},order_settings_fields:{languageName:"OrderSettingsFields",name:"Order Settings Fields",resultKey:"LPORDER"}},ht=function(e){return dt[e]},pt=function(e,t){if(e&&t)for(var n=0;n<e.length;n++)if(e[n]===t)return!0;return!1};function ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var mt=function(e){h()(i,e);var t,n,r,a=ft(i);function i(){var e;l()(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=a.call.apply(a,[this].concat(n)),M()(k()(e),"state",{loading:!1,checkSimilarity:!0,customFields:[],mediaZipFileNames:[],mediaUploadData:{zipFileName:"",data:[]},updateFieldsList:[],enableSchedule:!1,showOnSchedule:"none",hiddenOnSchedule:"block",displayDuplicate:!1,updateField:""}),M()(k()(e),"formulaIconOnClick",(function(e,t){if(document.getElementById("".concat(e,"-").concat(t,"-csv-icon-sum")).classList.contains("active")){var n=document.getElementById("".concat(e,"-").concat(t,"-manipulative-screen"));n.classList.contains("active")?n.classList.remove("active"):n.classList.add("active")}else D.toast.info("Please choose Header Manipulation in the drop down")})),M()(k()(e),"sumIconOnClick",(function(e,t){if(document.getElementById("".concat(e,"-").concat(t,"-csv-icon-plus")).classList.contains("active")){var n=document.getElementById("".concat(e,"-").concat(t,"-static-manipulative-screen"));n.classList.contains("active")?n.classList.remove("active"):n.classList.add("active")}else D.toast.info("Please choose Header Manipulation in the drop down")})),e}return u()(i,[{key:"isSimilar",value:function(e,t,n){if(this.context.mappingResult){var r=ht(e).resultKey;if(this.context.mappingResult[r]&&this.context.mappingResult[r][t]===n)return!0}return!(t.toLowerCase()!==n.toLowerCase()||!this.state.checkSimilarity)&&(this.onMappingSelect(e,t,n,!1),!0)}},{key:"onMappingSelect",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,a=ht(e).resultKey,i=this.context.mappingResult[a];if(-1!=o){var s=document.getElementById("".concat(e,"-").concat(o,"-csv-icon-sum")),l=document.getElementById("".concat(e,"-").concat(o,"-csv-icon-plus"));"Header Manipulation"===n?(s.classList.add("active"),l.classList.add("active")):(s.classList.remove("active"),l.classList.remove("active"))}if("--select--"===n||"Header Manipulation"===n)return i?void(this.context.mappingResult[a][t]&&(delete this.context.mappingResult[a][t],this.setState({checkSimilarity:!1}),this.context.setMappingResult(this.context.mappingResult))):void 0;i?r?this.context.mappingResult[a][t]=n:this.context.mappingResult[a][t]||(this.context.mappingResult[a][t]=n):(this.context.mappingResult[a]={},this.context.mappingResult[a][t]=n),this.setState({checkSimilarity:!1}),this.context.setMappingResult(this.context.mappingResult)}},{key:"isHeaderManipulation",value:function(e,t,n){var r=ht(e).resultKey;return!(!this.context.mappingResult[r]||!this.context.mappingResult[r][t]||pt(this.context.csvFields,this.context.mappingResult[r][t]))&&(setInterval((function(){var t=document.getElementById("".concat(e,"-").concat(n,"-csv-icon-sum")),r=document.getElementById("".concat(e,"-").concat(n,"-csv-icon-plus"));t&&!t.classList.contains("active")&&t.classList.add("active"),r&&!r.classList.contains("active")&&r.classList.add("active")}),500),!0)}},{key:"getFieldValueFromResult",value:function(e,t){var n=ht(e).resultKey;return this.context.mappingResult[n]&&this.context.mappingResult[n][t]?this.context.mappingResult[n][t]:""}},{key:"getFieldValueFromCustomFields",value:function(e){var t=this.state.customFields[e];if(t)return t.value}},{key:"addCustomField",value:function(){this.state.customFields.push({name:"",label:"",value:""}),this.setState({customFields:this.state.customFields})}},{key:"onCustomFieldLabelChange",value:function(e,t){this.state.customFields[t].label=e,this.state.customFields[t].name=e.trim().replace(/\s+/g,"-").toLowerCase(),this.setState({customFields:this.state.customFields})}},{key:"deleteCustomField",value:function(e){this.state.customFields.splice(e,1),this.setState({customFields:this.state.customFields})}},{key:"onCustomFieldValueSelect",value:function(e,t){var n=document.getElementById("custom-field-creator-".concat(t,"-csv-icon-sum")),r=document.getElementById("custom-field-creator-".concat(t,"-csv-icon-plus"));if("Header Manipulation"===e)return n.classList.add("active"),r.classList.add("active"),this.state.customFields[t].value="",void this.setState({customFields:this.state.customFields});this.state.customFields[t].value="--select--"===e?"":e,n.classList.remove("active"),r.classList.remove("active")}},{key:"onCustomFieldValueChange",value:function(e,t){this.state.customFields[t].value=e,this.setState({customFields:this.state.customFields})}},{key:"onZipProcess",value:function(e,t,n,r,o,a,i){var s=new FormData;s.append("zipFile",t,t.name),s.append("action","zip_upload");var l=new XMLHttpRequest;return l.open("POST",ajaxurl),l.upload.onprogress=function(e){a(e.lengthComputable,e.loaded,e.total)},l.onload=function(){if(l.status>=200&&l.status<300){r(JSON.parse(l.responseText));var e=JSON.parse(l.responseText);if(e.success)if(null==e.filename)D.toast.info("There is no image files in the uploaded zip file");else{this.setState({mediaZipFileNames:e.filename}),document.getElementById("upload-zip-open").click();for(var t=[],n=e.filename.length,a=0;a<n;a++)t.push({filename:e.filename[a],size:e.size[a]});this.state.mediaUploadData.zipFileName=e.zip_file_name,this.state.mediaUploadData.data=t,this.setState({mediaUploadData:this.state.mediaUploadData},(function(){}))}else D.toast.error(e.message)}else o("oh no")}.bind(this),l.send(s),{abort:function(){l.abort(),i()}}}},{key:"deleteImage",value:(r=y()(v.a.mark((function e(t,n){var r,o;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new FormData).set("action","delete_image"),r.set("image",t),e.prev=3,e.next=6,S()({method:"post",url:ajaxurl,data:r,config:{headers:{"Content-Type":"multipart/form-data"}}});case 6:(o=e.sent)&&o.data&&200==o.status&&o.data.success&&(this.state.mediaUploadData.data.splice(n,1),this.setState({mediaZipFileNames:this.state.mediaZipFileNames})),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),console.log(e.t0);case 13:case"end":return e.stop()}}),e,this,[[3,10]])}))),function(e,t){return r.apply(this,arguments)})},{key:"checkMandatory",value:function(){for(var e=["language_code","translated_post_title","translated_taxonomy_title","user_login","user_email","post_title"],t=0;t<this.context.allPluginFields.length;t++){var n=this.context.allPluginFields[t];for(var r in n){var o=n[r];if(o)for(var a=0;a<o.length;a++)if(e.includes(o[a].name)&&!this.checkKeyExistInMapping(o[a].name))return!1}}return!0}},{key:"checkKeyExistInMapping",value:function(e){var t=!1;for(var n in this.context.mappingResult){if(this.context.mappingResult[n])Object.keys(this.context.mappingResult[n]).includes(e)&&this.context.mappingResult[n][e]&&(t=!0)}return!!t||(D.toast.error(e+" is mandatory field"),!1)}},{key:"sendMappedFields",value:(n=y()(v.a.mark((function e(){var t,n,r,o,a;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.state.customFields)for(t=0;t<this.state.customFields.length;t++)n=this.state.customFields[t],r=n.name.trim(),n.value&&r&&(this.context.mappingResult.CORECUSTFIELDS?this.context.mappingResult.CORECUSTFIELDS[n.name]=n.value:(this.context.mappingResult.CORECUSTFIELDS={},this.context.mseleappingResult.CORECUSTFIELDS[n.name]=n.value));if(this.checkMandatory()){e.next=3;break}return e.abrupt("return");case 3:return this.context.setMappingType("mapping-section"),(o=new FormData).set("action","saveMappedFields"),o.set("HashKey",this.context.csvInfo.hashKey),o.set("Types",this.context.csvInfo.selectedtype),o.set("MappedFields",JSON.stringify(this.context.mappingResult)),o.set("MappingType","mapping-section"),o.set("selectedMode",this.context.simpleModeSelection?"simpleMode":this.context.advancedModeSelection?"advancedMode":""),this.setState({loading:!0}),e.prev=12,e.next=15,S()({method:"post",url:ajaxurl,data:o,config:{headers:{"Content-Type":"multipart/form-data"}}});case 15:(a=e.sent)&&a.data&&(200==a.status&&a.data.success?(this.setState({loading:!1}),"WooCommerce Orders"===this.context.csvInfo.selectedtype||"WooCommerce Coupons"===this.context.csvInfo.selectedtype||"WooCommerce Product Variations"===this.context.csvInfo.selectedtype||"WooCommerce Refunds"===this.context.csvInfo.selectedtype||"WooCommerce Attributes"===this.context.csvInfo.selectedtype||"Users"===this.context.csvInfo.selectedtype||"Comments"===this.context.csvInfo.selectedtype||"nav_menu_item"===this.context.csvInfo.selectedtype||"widgets"===this.context.csvInfo.selectedtype?this.context.setShowComponent("import-config"):this.context.setShowComponent("media-handling"),this.startSimpleImport()):this.setState({loading:!1})),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(12),this.setState({loading:!1});case 22:case"end":return e.stop()}}),e,this,[[12,19]])}))),function(){return n.apply(this,arguments)})},{key:"startSimpleImport",value:(t=y()(v.a.mark((function e(){var t,n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","bulk_file_import"),t.set("HashKey",this.context.csvInfo.hashKey),this.context.setShowImportLog(!0),this.context.setImportLogDataLink("".concat(window.wpr_object.logfielpath,"/").concat(this.context.csvInfo.hashKey,"/").concat(this.context.csvInfo.hashKey,".html")),this.setState({loading:!0}),e.prev=6,e.next=9,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 9:return n=e.sent,this.setState({loading:!1}),r="csv"===n.data.file_extension||"txt"===n.data.file_extension?Math.ceil(n.data.total_rows/5):Math.ceil(n.data.total_rows/3),console.log("Simple Import Response",n.data),this.context.bulkImportData.totalPages=r,this.context.bulkImportData.totalRows=n.data.total_rows,this.context.bulkImportData.fileName=n.data.file_name,this.context.bulkImportData.fileSize=n.data.filesize,this.context.bulkImportData.fileExtension=n.data.file_extension,this.context.bulkImportData.fileIteration=5,this.context.bulkImportData.Check=!0,this.context.setBulkImportData({totalPages:r,totalRows:n.data.total_rows,fileName:n.data.file_name,fileSize:n.data.filesize,fileExtension:n.data.file_extension,fileIteration:n.data.file_iteration,Check:!0}),this.context.setShowComponent("simple-import"),e.abrupt("return");case 25:e.prev=25,e.t0=e.catch(6);case 27:case"end":return e.stop()}}),e,this,[[6,25]])}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"container",id:"mapping-accordion"},o.a.createElement("div",{className:"clearfix"}),o.a.createElement("div",{className:"mt50"}),this.context.allPluginFields.map((function(t,n){var r=Object.keys(t)[0];if(!ht(r))return o.a.createElement("div",null);var a=!1;return r||(a=!0),t[r]||Array.isArray(t[r])||(a=!0,"wordpress_custom_fields"===r)?a?void 0:o.a.createElement("div",null,o.a.createElement("div",{className:"card csv-importer-panel "},o.a.createElement("h1",{className:"card-header main-heading ".concat(0==n?"active":""),id:r,onClick:function(){toggle_func(r)}},e.context.language[ht(r).languageName]," ",o.a.createElement("span",{className:"csv-icon-angle-down float-right"})),o.a.createElement("div",{className:"card-body",id:"".concat(r,"-body"),style:{display:0==n?"block":"none"}},o.a.createElement("table",{className:"table table-mapping"},o.a.createElement("thead",null,o.a.createElement("tr",null,o.a.createElement("th",null,e.context.language.WPFIELDS),o.a.createElement("th",null,e.context.language.CSVHEADER),o.a.createElement("th",null,e.context.language.Action))),o.a.createElement("tbody",null,t[r].map((function(t,n){return o.a.createElement("tr",null,o.a.createElement("td",null,o.a.createElement("label",{className:"wpfields"},t.label),o.a.createElement("label",{className:"sub-text"},"[",e.context.language.Name,": ",t.name,"] ")),o.a.createElement("td",null,o.a.createElement("select",{className:"select form-control w-75",onChange:function(o){e.onMappingSelect.bind(e)(r,t.name,o.target.value,!0,n)}},o.a.createElement("optgroup",{label:ht(r).name},o.a.createElement("option",null,"--select--"),e.context.csvFields.map((function(n){return o.a.createElement("option",{selected:e.isSimilar(r,t.name,n)},n)})),o.a.createElement("option",{selected:e.isHeaderManipulation(r,t.name,n)},"Header Manipulation")))),o.a.createElement("td",{className:"action"},o.a.createElement("a",{className:"action-icon","data-toggle":"tooltip",title:"Static"},o.a.createElement("i",{id:"".concat(r,"-").concat(n,"-csv-icon-plus"),className:"csv-icon-plus-square",onClick:function(){e.sumIconOnClick(r,n)}}),o.a.createElement("div",{id:"".concat(r,"-").concat(n,"-static-manipulative-screen"),className:"manipulation-screen"},o.a.createElement("div",{className:"close",onClick:function(){e.sumIconOnClick(r,n)}},"×"),o.a.createElement("div",{className:"clearfix"}),o.a.createElement("div",{className:"form-group"},o.a.createElement("textarea",{onChange:function(n){e.onMappingSelect.bind(e)(r,t.name,n.target.value)},value:e.getFieldValueFromResult(r,t.name),className:"form-control"})),o.a.createElement("div",{className:"csv-hint"},o.a.createElement("b",null,e.context.language.HINT," :")," Specify the CSV header to be added in between the curley braces(",").",o.a.createElement("div",{className:"d-block"},o.a.createElement("b",null,e.context.language.Example," : ")," ","{post_title}"," ")))),o.a.createElement("a",{className:"action-icon","data-toggle":"tooltip",title:"Formula"},o.a.createElement("i",{id:"".concat(r,"-").concat(n,"-csv-icon-sum"),className:"csv-icon-sum",onClick:function(t){e.formulaIconOnClick(r,n)}}),o.a.createElement("div",{id:"".concat(r,"-").concat(n,"-manipulative-screen"),className:"manipulation-screen"},o.a.createElement("span",{className:"close",onClick:function(){e.formulaIconOnClick(r,n)}},"×"),o.a.createElement("div",{className:"clearfix"}),o.a.createElement("div",{className:"form-group"},o.a.createElement("textarea",{onChange:function(n){e.onMappingSelect.bind(e)(r,t.name,n.target.value)},value:e.getFieldValueFromResult(r,t.name),class:"form-control"})),o.a.createElement("div",{className:"csv-hint"},o.a.createElement("b",null,e.context.language.HIN," :")," Specify operator(+,-,*,/) and CSV header as operand in MATH() within ",o.a.createElement("div",{class:"d-block"},o.a.createElement("b",null,e.context.language.Example," :")," ","MATH ({product_quantity}/{discount_price})"," "))))))}))))))):o.a.createElement("div",{className:"card csv-importer-panel "},o.a.createElement("h1",{className:"card-header main-heading bg-white pro-tag"},e.context.language[ht(r).languageName]," "))})),o.a.createElement("div",{class:"col-md-12 mt40 p0"},o.a.createElement("div",{class:"float-left"},o.a.createElement("button",{type:"button",class:"smack-btn btn-default",onClick:function(){e.context.setShowComponent("upload-dashboard")}},"Back")),o.a.createElement("div",{className:"float-right mb20"},this.state.loading?this.context.loaderText:o.a.createElement("button",{className:"smack-btn smack-btn-primary",onClick:function(t){e.sendMappedFields()}},this.context.language.Continue))),o.a.createElement("a",{href:"#",className:"smack-btn smack-btn-primary d-none",id:"upload-zip-open","data-toggle":"modal","data-target":"#upload_media"}),o.a.createElement("div",{id:"upload_media",className:"modal fade payment_modal active",role:"dialog"},o.a.createElement("div",{className:"modal-dialog modal-lg modal-dialog-centered"},o.a.createElement("div",{className:"modal-content"},o.a.createElement("div",{className:"modal-header border border-0"},o.a.createElement("h1",{className:"main-heading text-center py-1 m-auto"},this.state.mediaUploadData.zipFileName),o.a.createElement("button",{type:"button",className:"close ml0","data-dismiss":"modal"},"×")),o.a.createElement("div",{className:"modal-body my-2"},o.a.createElement("table",{className:"table table-striped"},o.a.createElement("thead",null,o.a.createElement("tr",null,o.a.createElement("th",null,this.context.language.Name),o.a.createElement("th",null,this.context.language.Size),o.a.createElement("th",{class:"text-center"},this.context.language.Action))),o.a.createElement("tbody",null,this.state.mediaUploadData.data.map((function(t,n){return o.a.createElement("tr",null,o.a.createElement("td",null,t.filename),o.a.createElement("td",null,t.size),o.a.createElement("td",null,o.a.createElement("a",{className:"action-icon",onClick:function(r){e.deleteImage(t.filename,n)},"data-toggle":"tooltip",title:"Delete"},o.a.createElement("i",{className:"csv-icon-trash-2"}))))})))))))))}}]),i}(r.Component);function gt(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 _t(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(n),!0).forEach((function(t){M()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}M()(mt,"contextType",E);var bt=function(e){h()(r,e);var t,n=vt(r);function r(){var e;l()(this,r);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=n.call.apply(n,[this].concat(o)),M()(k()(e),"state",{loading:!1,onChangeSelectStatus:!1}),e}return u()(r,[{key:"componentDidMount",value:function(){this.context.setCSVInfo(_t(_t({},this.context.csvInfo),{},{replaceExistingItem:"Insert"}))}},{key:"sendConfiguration",value:(t=y()(v.a.mark((function e(){var t,n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","mappingfields"),t.set("HashKey",this.context.csvInfo.hashKey),t.set("Types",this.context.csvInfo.selectedtype),t.set("Mode",this.context.csvInfo.replaceExistingItem),this.setState({loading:!0}),e.prev=6,e.next=9,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 9:(n=e.sent)&&n.data&&200==n.status&&n.data.success&&(this.setState({loading:!1}),!0===n.data.show_template?(this.context.setIsTemplate(!0),this.context.setSaveTemplateData(n.data.info),this.context.setShowComponent("save-template")):(this.context.setCsvFields(n.data.csv_fields),r=ut(n.data.fields),this.context.setAllPluginFields(r),"xml"===this.context.csvInfo.fileType?this.context.setShowComponent("dragdrop-section"):this.context.setShowComponent("mapping-section"))),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(6),console.log(e.t0);case 16:case"end":return e.stop()}}),e,this,[[6,13]])}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"csv-importer-panel mt20 container"},o.a.createElement("div",{className:"file-info-container clearfix"},o.a.createElement("div",{className:"csvinfo"},o.a.createElement("h3",{className:"file-name"},this.context.csvInfo.fileName," -"," ",o.a.createElement("span",{className:"size"},this.context.csvInfo.fileSize)),o.a.createElement("div",{class:"d-flex justify-content-center mt40"},o.a.createElement("div",{className:"form-check form-check-inline form-group"},o.a.createElement("input",{className:"form-check-input ",onClick:function(){e.context.setCSVInfo(_t(_t({},e.context.csvInfo),{},{replaceExistingItem:"Insert"}))},type:"radio",id:"insertRad",name:"post-item",value:"Insert",checked:"Insert"===this.context.csvInfo.replaceExistingItem})," ",o.a.createElement("label",{for:"insertRad",class:"form-check-label"},"New Item")),o.a.createElement("div",{className:"form-check form-check-inline form-group",style:{opacity:.6}},o.a.createElement("input",{className:"form-check-input",onClick:function(){D.toast.info("Please Upgrade to PRO for this Feature")},type:"radio",id:"updateRad",name:"post-item",value:"Update",checked:"Update"===this.context.csvInfo.replaceExistingItem})," ",o.a.createElement("label",{for:"updateRad",className:"form-check-label"},"Existing Items"))),o.a.createElement("div",{className:"d-flex justify-content-center mt40"},o.a.createElement("div",{className:"form-group"},o.a.createElement("label",null,"Import each record as"),o.a.createElement("div",null,o.a.createElement("select",{value:this.state.onChangeSelectStatus?this.context.csvInfo.selectedtype:"select",className:"select form-control",onChange:function(t){e.context.csvInfo.selectedtype=t.target.value,e.setState({onChangeSelectStatus:!0}),e.sendConfiguration()},name:"",id:""},o.a.createElement("optgroup",{label:"PostType"},o.a.createElement("option",{value:"select"},"Select"),this.context.csvInfo.postTypes.map((function(e){return o.a.createElement("option",{value:e},e)})))))))),o.a.createElement("div",{class:"col-md-12 mt40 p0"},o.a.createElement("div",{class:"float-left"},o.a.createElement("button",{type:"button",class:"smack-btn btn-default",onClick:function(){e.context.setShowComponent("upload-dashboard")}},"Back")))))}}]),r}(r.Component);function yt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}M()(bt,"contextType",E);var wt=function(e){h()(a,e);var t,n,r=yt(a);function a(e){var t;return l()(this,a),t=r.call(this,e),M()(k()(t),"pauseBulkImport",y()(v.a.mark((function e(){var n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new FormData).set("action","PauseImport"),n.set("HashKey",t.context.csvInfo.hashKey),e.next=5,S()({method:"post",url:ajaxurl,data:n,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:r=e.sent,t.setState({controlImportProcess:!1}),r.data.pause_state&&t.timer&&clearInterval(t.timer);case 8:case"end":return e.stop()}}),e)})))),M()(k()(t),"resumeBulkImport",y()(v.a.mark((function e(){var n,r,o;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({controlImportProcess:!0}),(n=new FormData).set("action","ResumeImport"),n.set("HashKey",t.context.csvInfo.hashKey),e.next=6,S()({method:"post",url:ajaxurl,data:n,config:{headers:{"Content-Type":"multipart/form-data"}}});case 6:(r=e.sent).data.resume_state&&(o="",o=t.context.rollBackMode?"true":"false",t.alternateWorker.bind(k()(t))(t.context.csvInfo.hashKey,o,r.data.page_number,t.context.bulkImportData.totalPages,t.context.bulkImportData.Check),t.timer=setInterval(t.stopWatch.bind(k()(t)),1e3));case 8:case"end":return e.stop()}}),e)})))),M()(k()(t),"bulkImportProcess",(function(){var e="";e=t.context.rollBackMode?"true":"false";var n=t.context.bulkImportData.totalRows;"csv"===t.context.bulkImportData.fileExtension||"txt"===t.context.bulkImportData.fileExtension?t.bulkImportCount=5:t.bulkImportCount=3;var r=0*t.bulkImportCount+t.bulkImportCount;r>n&&(r=n);var o="1 - "+r;t.setState({processingRecords:o,remainingRecords:n}),t.alternateWorker.bind(k()(t))(t.context.csvInfo.hashKey,e,1,t.context.bulkImportData.totalPages,t.context.bulkImportData.Check),t.timer=setInterval(t.stopWatch.bind(k()(t)),1e3)})),t.state={loading:!0,check:"",fileName:"",processingRecords:"",remainingRecords:"",totalRecords:"",fileSize:"",process:"",remainingTime:"00:00:00",stopWatch:"00:00:00",progWidth:"0",importStatus:"Processing",enableDownload:!1,controlImportProcess:!0,rollBackProgress:!1},t.bulkImportCount=0,t.loopCount=0,t.remainingTime=0,t.stopSeconds=0,t.stopMinutes=0,t.stopHours=0,t.progressWidth,t.url,t}return u()(a,[{key:"componentDidMount",value:function(){this.checkAjaxURL(),this.bulkImportProcess(),this.state.loading&&this.stopWatch(),"csv"===this.context.bulkImportData.fileExtension||"txt"===this.context.bulkImportData.fileExtension?this.bulkImportCount=5:this.bulkImportCount=3}},{key:"checkAjaxURL",value:function(){ajaxurl.includes("http")?this.url=ajaxurl:this.url=window.location.origin+ajaxurl}},{key:"loadProgress",value:function(e){e.processing_records!==e.total_records?this.progressWidth=e.processing_records/e.total_records*100:e.progress||(this.progressWidth=e.processing_records/e.total_records*100),this.progressWidth=Math.round(this.progressWidth),this.progressWidth>.9&&(this.progressWidth>100?this.setState({progWidth:100},(function(){})):this.setState({progWidth:this.progressWidth},(function(){})))}},{key:"componentWillUnmount",value:function(){}},{key:"alternateWorker",value:(n=y()(v.a.mark((function e(t,n,r,o,a){var i,s,l,c,u,d,h;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=r;case 1:if(!(i<=o)){e.next=35;break}return s=performance.now(),(l=new FormData).append("action","bulk_import"),l.append("HashKey",t),l.append("PageNumber",i),l.append("RollBack",n),l.append("Check",a),e.prev=9,e.next=12,S()({method:"post",url:ajaxurl,data:l,config:{headers:{"Content-Type":"multipart/form-data"}}});case 12:if(200!=(c=e.sent).status){e.next=21;break}if(u=performance.now(),d=c.data,h=((u-s)%6e4/1e3).toFixed(0),0!=d.success){e.next=20;break}return this.updateProgressBar({result:d,completedPage:i,secondsToComplete:h}),e.abrupt("break",35);case 20:this.updateProgressBar({result:d,completedPage:i,secondsToComplete:h});case 21:e.next=30;break;case 23:if(e.prev=23,e.t0=e.catch(9),504!=e.t0.response.status||502!=e.t0.response.status){e.next=29;break}this.alternateWorker.bind(this)(t,n,r+1,o,a),e.next=30;break;case 29:return e.abrupt("return");case 30:if(this.state.controlImportProcess){e.next=32;break}return e.abrupt("return");case 32:i++,e.next=1;break;case 35:case"end":return e.stop()}}),e,this,[[9,23]])}))),function(e,t,r,o,a){return n.apply(this,arguments)})},{key:"updateProgressBar",value:function(e){this.loopCount=this.loopCount+1;var t=e.result,n=e.completedPage,r=e.secondsToComplete;0==t.success&&this.timer&&clearInterval(this.timer);var o=this.context.bulkImportData.totalRows,a=Math.ceil(o/this.bulkImportCount),i=a-n,s=n*this.bulkImportCount+1,l=n*this.bulkImportCount+this.bulkImportCount;l>o&&(l=o);var c=s+" - "+l;s>o&&(c="",this.timer&&clearInterval(this.timer));var u=o-n*this.bulkImportCount;u<0&&(u=0),n!=a?this.setState({loading:!0}):this.setState({loading:!1,importStatus:"Completed"}),this.setState({remainingRecords:u,processingRecords:c});var d={total_records:o,processing_records:s,remaining_records:u};this.remainingTime=r*i,this.secondsToHms(this.remainingTime),this.loadProgress(d)}},{key:"secondsToHms",value:function(e){e=Number(e);var t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);t.toString().length<2&&(t="0"+t),n.toString().length<2&&(n="0"+n),r.toString().length<2&&(r="0"+r);var o=t+":"+n+":"+r;this.setState({remainingTime:o})}},{key:"stopWatch",value:function(){this.stopSeconds++,this.stopSeconds>=60&&(this.stopSeconds=0,this.stopMinutes++,this.stopMinutes>=60&&(this.stopMinutes=0,this.stopHours++)),this.stopHours.toString().length<2&&(this.stopHours="0"+this.stopHours),this.stopMinutes.toString().length<2&&(this.stopMinutes="0"+this.stopMinutes),this.stopSeconds.toString().length<2&&(this.stopSeconds="0"+this.stopSeconds);var e=this.stopHours+":"+this.stopMinutes+":"+this.stopSeconds;this.setState({stopWatch:e})}},{key:"startRollBackMode",value:(t=y()(v.a.mark((function e(){var t,n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({rollBackProgress:!0}),(t=new FormData).set("action","rollback_now"),t.set("HashKey",this.context.csvInfo.hashKey),e.next=6,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 6:n=e.sent,this.setState({rollBackProgress:!1}),(r=n.data).success?(this.context.setRollBackMode(!1),D.toast.success(r.message)):D.toast.error(r.message);case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this,t={width:this.state.progWidth+"%"},n=(!this.state.loading&&this.context.showImportLog,this.context.bulkImportData),r=n.fileSize,a=n.fileName,i=n.totalRows;return o.a.createElement("div",{className:"wp-ultimate-csv-importer"},o.a.createElement("div",{className:" container"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"importer-log col-md-9"},o.a.createElement("div",{className:"card csv-importer-panel mt40 col-md-12"},o.a.createElement("div",{className:"card-body mb10"},o.a.createElement("h4",{className:"text-center"},"Import ",this.state.importStatus),o.a.createElement("div",{className:"row justify-content-center"},o.a.createElement("div",{className:"mt30 "},"Completed"===this.state.importStatus?o.a.createElement(o.a.Fragment,null,o.a.createElement("input",{type:"button",className:"smack-btn btn-default",value:"Close",onClick:function(t){e.context.setShowComponent("upload-dashboard"),window.location.reload()}}),this.context.rollBackMode?o.a.createElement(o.a.Fragment,null,o.a.createElement("input",{type:"button",className:"ml20 smack-btn smack-btn-danger",value:"RoleBack Now",onClick:function(t){e.startRollBackMode()}})," ",this.state.rollBackProgress?o.a.createElement("div",{className:"btn ajax-loader loading",style:{marginLeft:"25px",marginRight:"0",bottom:"5px",padding:"0"}}):""," "):void 0):this.state.controlImportProcess?o.a.createElement("input",{type:"button",className:"smack-btn smack-btn-warning",value:"Pause",onClick:this.pauseBulkImport}):o.a.createElement("input",{type:"button",className:"smack-btn smack-btn-primary",value:"Resume",onClick:this.resumeBulkImport}))),o.a.createElement("table",{className:"table mt40"},o.a.createElement("tbody",null,o.a.createElement("tr",null,o.a.createElement("td",{className:"text-left"},this.context.language.FileName,":"," ",o.a.createElement("span",null,a)),o.a.createElement("td",{className:"text-right"},this.context.language.FileSize,":"," ",o.a.createElement("span",null,r))),o.a.createElement("tr",null,o.a.createElement("td",{className:"text-left"},this.context.language.Process,":"," ",o.a.createElement("span",null,this.context.csvInfo.replaceExistingItem)),o.a.createElement("td",{className:"text-right"},this.context.language.Totalnoofrecords,":"," ",o.a.createElement("span",null,i))),o.a.createElement("tr",null,o.a.createElement("td",{className:"text-left"},o.a.createElement("span",{className:"font-weight-normal text-success"}," ",this.context.language.CurrentProcessingRecord,":"," ",o.a.createElement("span",null,this.state.processingRecords))),o.a.createElement("td",{className:"text-right"},o.a.createElement("span",{className:"font-weight-normal text-danger"},this.context.language.RemainingRecord,":"," ",o.a.createElement("span",null,this.state.remainingRecords)))))),o.a.createElement("div",{className:"card-body px-3"},o.a.createElement("div",{className:"importing-details"},o.a.createElement("div",{className:"progress-status"},"Processing"===this.state.importStatus?"In Progress":""),o.a.createElement("div",{className:"import-progress"},o.a.createElement("div",{className:"progress-loading"},this.state.progWidth+"%"," ",this.context.language.Completed),o.a.createElement("div",{className:"progress-timing"},o.a.createElement("i",{className:"csv-icon-schedule"})," ",this.context.language.TimeElapsed,":"," ",o.a.createElement("span",null," ",this.state.stopWatch,"/"," "),this.state.remainingTime,"(",this.context.language.approximate,")"))),o.a.createElement("div",{className:"progress mt5 mb40"},o.a.createElement("div",{className:"progress-bar",style:t,role:"progressbar","aria-valuenow":"10","aria-valuemin":"0","aria-valuemax":"100"})))))),o.a.createElement("div",{className:"cardprogress col-md-3 mt40 mb5 border-rad"},o.a.createElement("div",{className:"mt0 mr10 tit"},o.a.createElement("h2",{className:"title"},"Ultimate CSV Importer Pro"),o.a.createElement("hr",{className:"divider"}),o.a.createElement("ul",null,o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," Update older posts from single import"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," Auto Schedule with reusable templates"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," Advanced Custom Field/Post Plugins Importer"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," Import/Update any Toolset Types, ACF pro / Free and Pods fields"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," AIO WooCommerce Importer"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," WPML Importer"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," SEO Plugins Data Importer"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," Exporter with advanced filters")),o.a.createElement("a",{className:"basic-button border-rad mt25",href:"https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=plugin&utm_campaign=promo_widget&utm_medium=pro_edition",target:"blank"},"BUY NOW!"))))),o.a.createElement("button",{type:"button",className:"d-none","data-toggle":"modal","data-target":"#displayLogText",id:"triggerLog"}),o.a.createElement("div",{id:"displayLogText",className:"modal fade",role:"dialog"},o.a.createElement("div",{className:"modal-dialog modal-lg modal-dialog-centered"},o.a.createElement("div",{className:"modal-content"},o.a.createElement("div",{className:"modal-header"},o.a.createElement("h1",{class:"main-heading"},"Import Log for ",this.state.fileName),o.a.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},"×")),o.a.createElement("div",{className:"modal-body my-2"},o.a.createElement("div",{id:"showLogText"}))))))}}]),a}(r.Component);function kt(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 xt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kt(Object(n),!0).forEach((function(t){M()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}M()(wt,"contextType",E);var Et=function(e){h()(r,e);var t,n=Mt(r);function r(){var e;l()(this,r);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=n.call.apply(n,[this].concat(o)),M()(k()(e),"state",{loading:!1,zipCsvFileName:[],zipCsvUrls:[],zipSelectedFileUrl:""}),e}return u()(r,[{key:"onFilePondProcess",value:function(e,t,n,o,a,i,s){var l=new FormData;l.append("csvFile",t,t.name),l.append("action","get_desktop");var c=new XMLHttpRequest;return c.open("POST",ajaxurl),c.upload.onprogress=function(e){i(e.lengthComputable,e.loaded,e.total)},c.onload=function(){if(c.status>=200&&c.status<300){o(JSON.parse(c.responseText));var e=JSON.parse(c.responseText);r.filePondResponse=e,r.filePondResponse.success?r.showRecord=!0:(r.showRecord=!1,D.toast.error(r.filePondResponse.message))}else a("oh no")},c.send(l),{abort:function(){c.abort(),s()}}}},{key:"onProcessFile",value:function(){if("csv"===r.filePondResponse.file_type||"xml"===r.filePondResponse.file_type||"txt"===r.filePondResponse.file_type)return this.context.setCSVInfo(xt(xt({},this.context.csvInfo),{},{hashKey:r.filePondResponse.hashkey,templateName:r.filePondResponse.filename.slice(0,-4),selectedtype:r.filePondResponse.selectedtype,fileName:r.filePondResponse.filename,connectionType:"desktop",postTypes:r.filePondResponse.posttype,fileSize:r.filePondResponse.file_size,fileType:r.filePondResponse.file_type})),"xml"===r.filePondResponse.file_type?this.context.setIsXML(!0):this.context.setIsXML(!1),void this.context.setShowComponent("csv-info");if("zip"===r.filePondResponse.file_type){for(var e=0;e<r.filePondResponse.info.length;e++)this.state.zipCsvFileName.push(r.filePondResponse.info[e].name),this.state.zipCsvUrls.push(r.filePondResponse.info[e].path);return this.context.setCSVInfo(xt(xt({},this.context.csvInfo),{},{connectionType:"desktop"})),void this.setState({zipCsvFileName:this.state.zipCsvFileName,zipCsvUrls:this.state.zipCsvUrls},(function(){document.getElementById("desk-csv-open").click()}))}}},{key:"onRemoveFile",value:function(){}},{key:"sendFileUrl",value:(t=y()(v.a.mark((function e(){var t,n,o;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","get_csv_url"),t.set("url",this.context.selectedFileUrl),this.setState({loading:!0}),e.prev=4,e.next=7,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 7:if(!(n=e.sent)||!n.data){e.next=14;break}if(200!=n.status||!n.data.success){e.next=14;break}return this.context.setCSVInfo(xt(xt({},this.context.csvInfo),{},(o={hashKey:n.data.hashkey,templateName:r.filePondResponse.filename.slice(0,-4),selectedtype:n.data.selectedtype},M()(o,"templateName","From-url"),M()(o,"postTypes",n.data.posttype),M()(o,"fileName",n.data.filename),M()(o,"fileType",n.data.file_type),M()(o,"fileSize",n.data.file_size),o))),document.getElementById("desk-csv-close").click(),this.context.setShowComponent("csv-info"),e.abrupt("return");case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),console.log(e.t0);case 19:case"end":return e.stop()}}),e,this,[[4,16]])}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this;return o.a.createElement("div",{class:"col-md-9 ".concat(r.showRecord&&this.state.showImportRecord?"min":"")},o.a.createElement("div",{className:"tab-content",id:"v-pills-tabContent"},o.a.createElement("div",{className:"tab-pane fade show active",id:"v-pills-home",role:"tabpanel","aria-labelledby":"v-pills-home-tab",style:{height:"150%"}},o.a.createElement(ct.FilePond,{acceptedFileTypes:["text/csv/xml"].zip,allowMultiple:!1,maxFiles:1,server:{process:this.onFilePondProcess.bind(this)},onprocessfile:this.onProcessFile.bind(this),onremovefile:this.onRemoveFile.bind(this)}))),o.a.createElement("a",{href:"#",className:"smack-btn smack-btn-primary d-none",id:"desk-csv-open","data-toggle":"modal","data-target":"#upload_csv"},this.context.language.UploadedCSVFileLists),o.a.createElement("div",{id:"upload_csv",className:"modal fade payment_modal",role:"dialog"},o.a.createElement("div",{className:"modal-dialog modal-lg modal-dialog-centered"},o.a.createElement("div",{className:"modal-content"},o.a.createElement("div",{className:"modal-header"},o.a.createElement("button",{type:"button",id:"desk-csv-close",className:"close","data-dismiss":"modal"},"×")),o.a.createElement("div",{className:"modal-body my-2"},o.a.createElement("ul",null,this.state.zipCsvFileName.map((function(t,n){return o.a.createElement("li",null,o.a.createElement("div",{className:"form-check form-check-inline"},o.a.createElement("label",{class:"form-check-label"},o.a.createElement("input",{className:"form-check-input",onClick:function(t){t.target.checked&&e.context.setSelectedFileUrl(e.state.zipCsvUrls[n])},type:"radio",name:"post-item",id:""})," ",t)))}))),o.a.createElement("div",{className:"float-right"},o.a.createElement("input",{type:"button",className:"smack-btn smack-btn-primary mb20",onClick:this.sendFileUrl.bind(this),value:"Choose CSV File"})))))))}}]),r}(r.Component);function Tt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}M()(Et,"contextType",E);var St=function(e){h()(a,e);var t,n,r=Tt(a);function a(){var e;l()(this,a);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return e=r.call.apply(r,[this].concat(n)),M()(k()(e),"state",{loading:!1,checkSimilarity:!0,customFields:[],mediaZipFileNames:[],mediaUploadData:{zipFileName:"",data:[]}}),M()(k()(e),"formulaIconOnClick",(function(e,t){if(document.getElementById("".concat(e,"-").concat(t,"-csv-icon-sum")).classList.contains("active")){var n=document.getElementById("".concat(e,"-").concat(t,"-manipulative-screen"));n.classList.contains("active")?n.classList.remove("active"):n.classList.add("active")}else D.toast.info("Please choose Header Manipulation in the drop down")})),M()(k()(e),"sumIconOnClick",(function(e,t){if(document.getElementById("".concat(e,"-").concat(t,"-csv-icon-plus")).classList.contains("active")){var n=document.getElementById("".concat(e,"-").concat(t,"-static-manipulative-screen"));n.classList.contains("active")?n.classList.remove("active"):n.classList.add("active")}else D.toast.info("Please choose Header Manipulation in the drop down")})),e}return u()(a,[{key:"isSimilar",value:function(e,t,n){if(this.context.mappingResult){var r=ht(e).resultKey;if(this.context.mappingResult[r]&&this.context.mappingResult[r][t]===n)return!0}return!(t.toLowerCase()!==n.toLowerCase()||!this.state.checkSimilarity)&&(this.onMappingSelect(e,t,n,!1),!0)}},{key:"onMappingSelect",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,a=ht(e).resultKey,i=this.context.mappingResult[a];if(-1!=o){var s=document.getElementById("".concat(e,"-").concat(o,"-csv-icon-sum")),l=document.getElementById("".concat(e,"-").concat(o,"-csv-icon-plus"));"Header Manipulation"===n?(s.classList.add("active"),l.classList.add("active")):(s.classList.remove("active"),l.classList.remove("active"))}if("--select--"===n||"Header Manipulation"===n)return i?void(this.context.mappingResult[a][t]&&(delete this.context.mappingResult[a][t],this.setState({checkSimilarity:!1}),this.context.setMappingResult(this.context.mappingResult))):void 0;i?r?this.context.mappingResult[a][t]=n:this.context.mappingResult[a][t]||(this.context.mappingResult[a][t]=n):(this.context.mappingResult[a]={},this.context.mappingResult[a][t]=n),this.setState({checkSimilarity:!1}),this.context.setMappingResult(this.context.mappingResult)}},{key:"isHeaderManipulation",value:function(e,t,n){var r=ht(e).resultKey;return!(!this.context.mappingResult[r]||!this.context.mappingResult[r][t]||pt(this.context.csvFields,this.context.mappingResult[r][t]))&&(setInterval((function(){var t=document.getElementById("".concat(e,"-").concat(n,"-csv-icon-sum")),r=document.getElementById("".concat(e,"-").concat(n,"-csv-icon-plus"));t&&!t.classList.contains("active")&&t.classList.add("active"),r&&!r.classList.contains("active")&&r.classList.add("active")}),500),!0)}},{key:"getFieldValueFromResult",value:function(e,t){var n=ht(e).resultKey;return this.context.mappingResult[n]&&this.context.mappingResult[n][t]?this.context.mappingResult[n][t]:""}},{key:"getFieldValueFromCustomFields",value:function(e){var t=this.state.customFields[e];if(t)return t.value}},{key:"addCustomField",value:function(){this.state.customFields.push({name:"",label:"",value:""}),this.setState({customFields:this.state.customFields})}},{key:"onCustomFieldLabelChange",value:function(e,t){this.state.customFields[t].label=e,this.state.customFields[t].name=e.trim().replace(/\s+/g,"-").toLowerCase(),this.setState({customFields:this.state.customFields})}},{key:"deleteCustomField",value:function(e){this.state.customFields.splice(e,1),this.setState({customFields:this.state.customFields})}},{key:"onCustomFieldValueSelect",value:function(e,t){var n=document.getElementById("custom-field-creator-".concat(t,"-csv-icon-sum")),r=document.getElementById("custom-field-creator-".concat(t,"-csv-icon-plus"));if("Header Manipulation"===e)return n.classList.add("active"),r.classList.add("active"),this.state.customFields[t].value="",void this.setState({customFields:this.state.customFields});this.state.customFields[t].value="--select--"===e?"":e,n.classList.remove("active"),r.classList.remove("active")}},{key:"onCustomFieldValueChange",value:function(e,t){this.state.customFields[t].value=e,this.setState({customFields:this.state.customFields})}},{key:"onZipProcess",value:function(e,t,n,r,o,a,i){var s=new FormData;s.append("zipFile",t,t.name),s.append("action","zip_upload");var l=new XMLHttpRequest;return l.open("POST",ajaxurl),l.upload.onprogress=function(e){a(e.lengthComputable,e.loaded,e.total)},l.onload=function(){if(l.status>=200&&l.status<300){r(JSON.parse(l.responseText));var e=JSON.parse(l.responseText);if(e.success)if(null==e.filename)D.toast.info("There is no image files in the uploaded zip file");else{this.setState({mediaZipFileNames:e.filename}),document.getElementById("upload-zip-open").click();for(var t=[],n=e.filename.length,a=0;a<n;a++)t.push({filename:e.filename[a],size:e.size[a]});this.state.mediaUploadData.zipFileName=e.zip_file_name,this.state.mediaUploadData.data=t,this.setState({mediaUploadData:this.state.mediaUploadData},(function(){}))}else D.toast.error(e.message)}else o("oh no")}.bind(this),l.send(s),{abort:function(){l.abort(),i()}}}},{key:"deleteImage",value:(n=y()(v.a.mark((function e(t,n){var r,o;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new FormData).set("action","delete_image"),r.set("image",t),e.prev=3,e.next=6,S()({method:"post",url:ajaxurl,data:r,config:{headers:{"Content-Type":"multipart/form-data"}}});case 6:(o=e.sent)&&o.data&&200==o.status&&o.data.success&&(this.state.mediaUploadData.data.splice(n,1),this.setState({mediaZipFileNames:this.state.mediaZipFileNames})),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),console.log(e.t0);case 13:case"end":return e.stop()}}),e,this,[[3,10]])}))),function(e,t){return n.apply(this,arguments)})},{key:"checkMandatory",value:function(){for(var e=["language_code","translated_post_title","translated_taxonomy_title","user_login","user_email","post_title"],t=0;t<this.context.allPluginFields.length;t++){var n=this.context.allPluginFields[t];for(var r in n){var o=n[r];if(o)for(var a=0;a<o.length;a++)if(e.includes(o[a].name)&&!this.checkKeyExistInMapping(o[a].name))return!1}}return!0}},{key:"checkKeyExistInMapping",value:function(e){var t=!1;for(var n in this.context.mappingResult){if(this.context.mappingResult[n])Object.keys(this.context.mappingResult[n]).includes(e)&&this.context.mappingResult[n][e]&&(t=!0)}return!!t||(D.toast.error(e+" is mandatory field"),!1)}},{key:"sendMappedFields",value:(t=y()(v.a.mark((function e(){var t,n,r,o,a;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.state.customFields)for(t=0;t<this.state.customFields.length;t++)n=this.state.customFields[t],r=n.name.trim(),n.value&&r&&(this.context.mappingResult.CORECUSTFIELDS||(this.context.mappingResult.CORECUSTFIELDS={}),this.context.mappingResult.CORECUSTFIELDS[n.name]=n.value);if(this.checkMandatory()){e.next=3;break}return e.abrupt("return");case 3:return this.context.setMappingType("mapping-section"),(o=new FormData).set("action","saveMappedFields"),o.set("HashKey",this.context.csvInfo.hashKey),o.set("Types",this.context.csvInfo.selectedtype),o.set("MappedFields",JSON.stringify(this.context.mappingResult)),o.set("MappingType","mapping-section"),this.setState({loading:!0}),e.prev=11,e.next=14,S()({method:"post",url:ajaxurl,data:o,config:{headers:{"Content-Type":"multipart/form-data"}}});case 14:(a=e.sent)&&a.data&&(200==a.status&&a.data.success?(this.setState({loading:!1}),"WooCommerce Orders"===this.context.csvInfo.selectedtype||"WooCommerce Coupons"===this.context.csvInfo.selectedtype||"WooCommerce Product Variations"===this.context.csvInfo.selectedtype||"WooCommerce Refunds"===this.context.csvInfo.selectedtype||"WooCommerce Attributes"===this.context.csvInfo.selectedtype||"Users"===this.context.csvInfo.selectedtype||"Comments"===this.context.csvInfo.selectedtype||"nav_menu_item"===this.context.csvInfo.selectedtype||"widgets"===this.context.csvInfo.selectedtype?this.context.setShowComponent("import-config"):this.context.setShowComponent("media-handling")):this.setState({loading:!1})),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(11),this.setState({loading:!1});case 21:case"end":return e.stop()}}),e,this,[[11,18]])}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"container",id:"mapping-accordion"},o.a.createElement("div",{className:"clearfix"}),o.a.createElement("div",{className:"d-flex justify-content-center"},o.a.createElement("div",{className:"col-md-6"},o.a.createElement("ul",{className:"mapping-switcher"},o.a.createElement("li",{className:"active",onClick:function(){e.context.setShowComponent("mapping-section")}},this.context.language.ADVANCEDMODE),o.a.createElement("li",{onClick:function(){e.context.setShowComponent("dragdrop-section")}},this.context.language.DRAGDROPMODE)))),o.a.createElement("div",{className:"clearfix"}),o.a.createElement("div",{className:"mt50"}),this.context.allPluginFields.map((function(t,n){var r=Object.keys(t)[0];if(!ht(r))return o.a.createElement("div",null);var a=!1;return r||(a=!0),t[r]||Array.isArray(t[r])||(a=!0,"wordpress_custom_fields"===r)?a?void 0:o.a.createElement("div",null,o.a.createElement("div",{className:"card csv-importer-panel "},o.a.createElement("h1",{className:"card-header main-heading ".concat(0==n?"active":""),id:r,onClick:function(){toggle_func(r)}},e.context.language[ht(r).languageName]," ",o.a.createElement("span",{className:"csv-icon-angle-down float-right"})),o.a.createElement("div",{className:"card-body",id:"".concat(r,"-body"),style:{display:0==n?"block":"none"}},o.a.createElement("table",{className:"table table-mapping"},o.a.createElement("thead",null,o.a.createElement("tr",null,o.a.createElement("th",null,e.context.language.WPFIELDS),o.a.createElement("th",null,e.context.language.CSVHEADER),o.a.createElement("th",null,e.context.language.Action))),o.a.createElement("tbody",null,t[r].map((function(t,n){return o.a.createElement("tr",null,o.a.createElement("td",null,o.a.createElement("label",{className:"wpfields"},t.label),o.a.createElement("label",{className:"sub-text"},"[",e.context.language.Name,": ",t.name,"] ")),o.a.createElement("td",null,o.a.createElement("select",{className:"select form-control w-75",onChange:function(o){e.onMappingSelect.bind(e)(r,t.name,o.target.value,!0,n)}},o.a.createElement("optgroup",{label:ht(r).name},o.a.createElement("option",null,"--select--"),e.context.csvFields.map((function(n){return o.a.createElement("option",{selected:e.isSimilar(r,t.name,n)},n)})),o.a.createElement("option",{selected:e.isHeaderManipulation(r,t.name,n)},"Header Manipulation")))),o.a.createElement("td",{className:"action"},o.a.createElement("a",{className:"action-icon","data-toggle":"tooltip",title:"Static"},o.a.createElement("i",{id:"".concat(r,"-").concat(n,"-csv-icon-plus"),className:"csv-icon-plus-square",onClick:function(){e.sumIconOnClick(r,n)}}),o.a.createElement("div",{id:"".concat(r,"-").concat(n,"-static-manipulative-screen"),className:"manipulation-screen"},o.a.createElement("div",{className:"close",onClick:function(){e.sumIconOnClick(r,n)}},"×"),o.a.createElement("div",{className:"clearfix"}),o.a.createElement("div",{className:"form-group"},o.a.createElement("textarea",{onChange:function(n){e.onMappingSelect.bind(e)(r,t.name,n.target.value)},value:e.getFieldValueFromResult(r,t.name),className:"form-control"})),o.a.createElement("div",{className:"csv-hint"},o.a.createElement("b",null,e.context.language.HINT," :")," Specify the CSV header to be added in between the curley braces(",").",o.a.createElement("div",{className:"d-block"},o.a.createElement("b",null,e.context.language.Example," : ")," ","{post_title}"," ")))),o.a.createElement("a",{className:"action-icon","data-toggle":"tooltip",title:"Formula"},o.a.createElement("i",{id:"".concat(r,"-").concat(n,"-csv-icon-sum"),className:"csv-icon-sum",onClick:function(t){e.formulaIconOnClick(r,n)}}),o.a.createElement("div",{id:"".concat(r,"-").concat(n,"-manipulative-screen"),className:"manipulation-screen"},o.a.createElement("span",{className:"close",onClick:function(){e.formulaIconOnClick(r,n)}},"×"),o.a.createElement("div",{className:"clearfix"}),o.a.createElement("div",{className:"form-group"},o.a.createElement("textarea",{onChange:function(n){e.onMappingSelect.bind(e)(r,t.name,n.target.value)},value:e.getFieldValueFromResult(r,t.name),class:"form-control"})),o.a.createElement("div",{className:"csv-hint"},o.a.createElement("b",null,e.context.language.HIN," :")," Specify operator(+,-,*,/) and CSV header as operand in MATH() within ",o.a.createElement("div",{class:"d-block"},o.a.createElement("b",null,e.context.language.Example," :")," ","MATH ({product_quantity}/{discount_price})"," "))))))}))))))):o.a.createElement("div",{className:"card csv-importer-panel "},o.a.createElement("h1",{className:"card-header main-heading bg-white pro-tag"},e.context.language[ht(r).languageName]," "))})),o.a.createElement("div",{class:"col-md-12 mt40 p0"},o.a.createElement("div",{class:"float-left"},o.a.createElement("button",{type:"button",class:"smack-btn btn-default",onClick:function(){e.context.setShowComponent("upload-dashboard")}},"Back")),o.a.createElement("div",{className:"float-right mb20"},this.state.loading?this.context.loaderText:o.a.createElement("button",{className:"smack-btn smack-btn-primary",onClick:this.sendMappedFields.bind(this)},this.context.language.Continue))),o.a.createElement("a",{href:"#",className:"smack-btn smack-btn-primary d-none",id:"upload-zip-open","data-toggle":"modal","data-target":"#upload_media"}),o.a.createElement("div",{id:"upload_media",className:"modal fade payment_modal active",role:"dialog"},o.a.createElement("div",{className:"modal-dialog modal-lg modal-dialog-centered"},o.a.createElement("div",{className:"modal-content"},o.a.createElement("div",{className:"modal-header border border-0"},o.a.createElement("h1",{className:"main-heading text-center py-1 m-auto"},this.state.mediaUploadData.zipFileName),o.a.createElement("button",{type:"button",className:"close ml0","data-dismiss":"modal"},"×")),o.a.createElement("div",{className:"modal-body my-2"},o.a.createElement("table",{className:"table table-striped"},o.a.createElement("thead",null,o.a.createElement("tr",null,o.a.createElement("th",null,this.context.language.Name),o.a.createElement("th",null,this.context.language.Size),o.a.createElement("th",{class:"text-center"},this.context.language.Action))),o.a.createElement("tbody",null,this.state.mediaUploadData.data.map((function(t,n){return o.a.createElement("tr",null,o.a.createElement("td",null,t.filename),o.a.createElement("td",null,t.size),o.a.createElement("td",null,o.a.createElement("a",{className:"action-icon",onClick:function(r){e.deleteImage(t.filename,n)},"data-toggle":"tooltip",title:"Delete"},o.a.createElement("i",{className:"csv-icon-trash-2"}))))})))))))))}}]),a}(r.Component);M()(St,"contextType",E);var Dt=n(23),Lt=n(55),Ct=n.n(Lt),Pt=n(56),Ot=n.n(Pt);function Nt(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 At(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nt(Object(n),!0).forEach((function(t){M()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function It(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var Rt=function(e){h()(a,e);var t,n,r=It(a);function a(e){var t;return l()(this,a),(t=r.call(this,e)).state={loading:!1,initialRowSize:1,totalCsvRows:"",csvInformation:[],currentMode:"draganddrop",customFields:[],xmlData:[]},t.csvInformation=[],t.handleScroll=t.handleScroll.bind(k()(t)),t}return u()(a,[{key:"componentDidMount",value:function(){this.checkRTLSupport(),this.getCsvFields(this.state.initialRowSize),window.addEventListener("scroll",this.handleScroll)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("scroll",this.handleScroll)}},{key:"checkRTLSupport",value:function(){document.querySelector("html").getAttribute("dir")&&document.getElementById("mapping-sidebar").classList.add("rltsupport")}},{key:"handleScroll",value:function(e){var t=document.getElementById("mapping-sidebar"),n=document.getElementById("mapping-accordion").offsetHeight-300;window.scrollY>200?(t.classList.add("mapping-sidebar-fixed"),window.scrollY>n?t.classList.add("fixed-bottom-position"):t.classList.remove("fixed-bottom-position")):t.classList.remove("mapping-sidebar-fixed")}},{key:"getCsvFields",value:(n=y()(v.a.mark((function e(t){var n,r,o,a,i;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new FormData,this.context.isXML?n.set("action","get_parse_xml"):n.set("action","displayCSV"),n.set("row",t),this.props.fromEditTemplate?n.set("templatename",this.context.csvInfo.templateName):n.set("HashKey",this.context.csvInfo.hashKey),this.setState({loading:!0}),e.prev=5,e.next=8,S()({method:"post",url:ajaxurl,data:n,config:{headers:{"Content-Type":"multipart/form-data"}}});case 8:if((r=e.sent)&&r.data&&200==r.status&&r.data.success){if(this.context.isXML)this.setState({xmlData:r.data.xml_array});else{for(o=[],a=[],this.csvInformation=[],i=0;i<r.data.Headers.length;i++)o.push(r.data.Headers[i]),a.push(r.data.Values[i]);for(i=0;i<r.data.Headers.length;i++)this.csvInformation.push({csvHeaders:r.data.Headers[i],csvValues:r.data.Values[i]})}this.setState({totalCsvRows:r.data.total_rows,loading:!1})}e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),console.log(e.t0);case 15:case"end":return e.stop()}}),e,this,[[5,12]])}))),function(e){return n.apply(this,arguments)})},{key:"onMappingSelect",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=ht(e).resultKey,a=this.context.dragAndDropMappingResult[o];a?r?this.context.dragAndDropMappingResult[o][t]=n:this.context.dragAndDropMappingResult[o][t]?this.context.dragAndDropMappingResult[o][t]+=n:this.context.dragAndDropMappingResult[o][t]=n:(this.context.dragAndDropMappingResult[o]={},this.context.dragAndDropMappingResult[o][t]=n),this.forceUpdate()}},{key:"addCustomField",value:function(){this.state.customFields.push({name:"",label:"",value:""}),this.setState({customFields:this.state.customFields})}},{key:"onCustomFieldLabelChange",value:function(e,t){this.state.customFields[t].label=e,this.state.customFields[t].name=e.trim().replace(/\s+/g,"-").toLowerCase(),this.setState({customFields:this.state.customFields})}},{key:"onCustomFieldValueChange",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];n?this.state.customFields[t].value=e:this.state.customFields[t].value+=e,this.setState({customFields:this.state.customFields})}},{key:"deleteCustomField",value:function(e){this.state.customFields.splice(e,1),this.setState({customFields:this.state.customFields})}},{key:"checkMandatory",value:function(){for(var e=["language_code","translated_post_title","translated_taxonomy_title","user_login","user_email"],t=0;t<this.context.allPluginFields.length;t++){var n=this.context.allPluginFields[t];for(var r in n){var o=n[r];if(o)for(var a=0;a<o.length;a++)if(e.includes(o[a].name)&&!this.checkKeyExistInMapping(o[a].name))return!1}}return!0}},{key:"checkKeyExistInMapping",value:function(e){var t=!1;for(var n in this.context.dragAndDropMappingResult){if(this.context.dragAndDropMappingResult[n])Object.keys(this.context.dragAndDropMappingResult[n]).includes(e)&&this.context.dragAndDropMappingResult[n][e]&&(t=!0)}return!!t||(D.toast.error(e+" is mandatory field"),!1)}},{key:"sendMappedFields",value:(t=y()(v.a.mark((function e(){var t,n,r,o,a;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.state.customFields)for(t=0;t<this.state.customFields.length;t++)n=this.state.customFields[t],r=n.name.trim(),n.value&&r&&(this.context.dragAndDropMappingResult.CORECUSTFIELDS||(this.context.dragAndDropMappingResult.CORECUSTFIELDS={}),this.context.dragAndDropMappingResult.CORECUSTFIELDS[n.name]=n.value);if(this.checkMandatory()){e.next=3;break}return e.abrupt("return");case 3:return this.context.setMappingType("dragdrop-section"),o=new FormData,this.props.fromEditTemplate?o.set("action","saveTemplate"):(o.set("action","saveMappedFields"),o.set("HashKey",this.context.csvInfo.hashKey)),o.set("Types",this.context.csvInfo.selectedtype),o.set("MappedFields",JSON.stringify(this.context.dragAndDropMappingResult)),o.set("MappingType","dragdrop-section"),this.context.isTemplate&&o.set("UseTemplateState","true"),this.context.isTemplate||this.props.fromEditTemplate?(o.set("TemplateName",this.context.existingTemplateName),o.set("NewTemplate",this.context.csvInfo.templateName)):(o.set("TemplateName",this.context.csvInfo.templateName),o.set("UseTemplateState","false")),e.prev=11,e.next=14,S()({method:"post",url:ajaxurl,data:o,config:{headers:{"Content-Type":"multipart/form-data"}}});case 14:a=e.sent,this.setState({loading:!0}),a&&a.data&&(200==a.status&&a.data.success?(this.setState({loading:!1}),this.props.fromEditTemplate?this.props.onEditTemplate(!1):"WooCommerce Orders"===this.context.csvInfo.selectedtype||"WooCommerce Coupons"===this.context.csvInfo.selectedtype||"WooCommerce Product Variations"===this.context.csvInfo.selectedtype||"WooCommerce Refunds"===this.context.csvInfo.selectedtype||"WooCommerce Attributes"===this.context.csvInfo.selectedtype||"Users"===this.context.csvInfo.selectedtype||"Comments"===this.context.csvInfo.selectedtype||"nav_menu_item"===this.context.csvInfo.selectedtype||"widgets"===this.context.csvInfo.selectedtype?this.context.setShowComponent("import-config"):this.context.setShowComponent("media-handling")):(this.setState({loading:!1}),D.toast.error(a.data.message+" Please Choose Another Name"))),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(11),this.setState({loading:!1});case 22:case"end":return e.stop()}}),e,this,[[11,19]])}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.state,n=(t.initialRowSize,t.totalCsvRows);t.xmlData;return o.a.createElement(o.a.Fragment,null,this.context.isXML?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{className:"container"},o.a.createElement("div",{className:"d-flex justify-content-center"},o.a.createElement("div",{className:"col-md-6"},o.a.createElement("ul",{className:"mapping-switcher"},o.a.createElement("li",{onClick:function(){e.context.setShowComponent("mapping-section")}},this.context.language.ADVANCEDMODE),o.a.createElement("li",{className:"active",onClick:function(){e.context.setShowComponent("dragdrop-section")}},this.context.language.DRAGDROPMODE))))),o.a.createElement("div",{className:"clearfix"}),o.a.createElement("div",{className:"row container-fluid ",style:{maxWidth:"1400px",margin:"auto"}},o.a.createElement("div",{id:"mapping-accordion",className:"col-md-8"},o.a.createElement("div",{className:"mt50"}),this.context.allPluginFields.map((function(t,n){var r=Object.keys(t)[0];if(!ht(r))return o.a.createElement("div",null," ","This ",r," support not implemented"," ");var a=!1;return r||(a=!0),t[r]||Array.isArray(t[r])||(a=!0,"wordpress_custom_fields"===r)?a?void 0:o.a.createElement("div",{className:"card csv-importer-panel"},o.a.createElement("h1",{className:"card-header main-heading ".concat(0==n?"active":""),id:r,onClick:function(){toggle_func(r)}},e.context.language[ht(r).languageName]," ",o.a.createElement("span",{className:"csv-icon-angle-down float-right"})),o.a.createElement("div",{className:"card-body",id:"".concat(r,"-body"),style:{display:0==n?"block":"none"},"data-display":e.state.display},t[r].map((function(t,n){return o.a.createElement("div",{className:"form-group"},o.a.createElement("label",null,t.label),o.a.createElement(Dt.Droppable,{types:["csvheader"],onDrop:function(n){e.onMappingSelect.bind(e)(r,t.name,"{".concat(n.csvheader,"}"),!1)}},"post_content"===t.name?o.a.createElement(Ct.a,{editor:Ot.a,data:function(){var n=ht(r).resultKey;if(e.context.dragAndDropMappingResult[n])return e.context.dragAndDropMappingResult[n][t.name]}(),onInit:function(e){},onChange:function(n,o){var a=o.getData();e.onMappingSelect.bind(e)(r,t.name,a)}}):o.a.createElement("input",{value:function(){var n=ht(r).resultKey;if(e.context.dragAndDropMappingResult[n])return e.context.dragAndDropMappingResult[n][t.name]}(),type:"text",name:"",id:t.name+"_text",className:"form-control",onChange:function(n){e.onMappingSelect.bind(e)(r,t.name,n.target.value)}})))})))):o.a.createElement("div",{className:"card csv-importer-panel "},o.a.createElement("h1",{className:"card-header main-heading bg-white pro-tag"},e.context.language[ht(r).languageName]," "))})),"WooCommerce Coupons"!==this.context.csvInfo.selectedtype&&"WooCommerce Product Variations"!==this.context.csvInfo.selectedtype&&"WooCommerce Refunds"!==this.context.csvInfo.selectedtype&&"WPeCommerce Coupons"!==this.context.csvInfo.selectedtype&&"WooCommerce Product"!==this.context.csvInfo.selectedtype&&"Customer Reviews"!==this.context.csvInfo.selectedtype&&"Images"!==this.context.csvInfo.selectedtype&&"eShop Products"!==this.context.csvInfo.selectedtype&&"MarketPress Product"!==this.context.csvInfo.selectedtype&&"WPeCommerce Coupons"!==this.context.csvInfo.selectedtype&&"Comments"!==this.context.csvInfo.selectedtype&&"nav_menu_item"!==this.context.csvInfo.selectedtype&&"widgets"!==this.context.csvInfo.selectedtype?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"card csv-importer-panel"},o.a.createElement("h1",{className:"card-header main-heading",id:"custom-field-creator",onClick:function(){return toggle_func("custom-field-creator")}},"Create WP Custom Fields"," ",o.a.createElement("span",{className:"csv-icon-angle-down float-right"})),o.a.createElement("div",{className:"card-body",id:"custom-field-creator-body"},o.a.createElement("table",{className:"table table-mapping"},o.a.createElement("thead",null,o.a.createElement("tr",null,o.a.createElement("th",null,this.context.language.WPFIELDS),o.a.createElement("th",null,this.context.language.CSVHEADER),o.a.createElement("th",{className:"text-center"},this.context.language.Action))),o.a.createElement("tbody",null,0!=this.state.customFields.length?this.state.customFields.map((function(t,n){return o.a.createElement("tr",null,o.a.createElement("td",{style:{width:"40%"}},o.a.createElement("label",{className:"wpfields"},o.a.createElement("input",{type:"text",value:t.label,className:"form-control",onChange:function(t){e.onCustomFieldLabelChange(t.target.value,n)}})),o.a.createElement("label",{className:"sub-text"},"[Name: ".concat(t.name,"]")," ")),o.a.createElement("td",{style:{width:"40%",verticalAlign:"top"}},o.a.createElement(Dt.Droppable,{types:["csvheader"],onDrop:function(t){e.onCustomFieldValueChange.bind(e)("{".concat(t.csvheader,"}"),n,!1)}},o.a.createElement("input",{value:e.state.customFields[n].value,type:"text",name:"",id:"text_"+n,className:"form-control",onChange:function(t){e.onCustomFieldValueChange.bind(e)(t.target.value,n)}}))),o.a.createElement("td",{className:"action text-center"},o.a.createElement("a",{className:"action-icon","data-tip":"Delete",onClick:function(t){e.deleteCustomField(n)}},o.a.createElement("i",{className:"csv-icon-trash-2"})),o.a.createElement(he,{effect:"solid"})))})):o.a.createElement("tr",null,o.a.createElement("td",{colSpan:"3",className:"text-center border-bottom text-danger"},"No WP Custom Fields")))),o.a.createElement("div",{className:"float-right mb20 mt20"},o.a.createElement("a",{className:"smack-btn smack-btn-secondary",onClick:function(t){e.addCustomField()}},"Add Custom Field"))))):void 0,o.a.createElement("div",{className:"mt40"},o.a.createElement("div",{className:"col-md-12 text-center mt30"},this.context.isTemplate?o.a.createElement("div",null,o.a.createElement("label",null,"Update this mapping as"),o.a.createElement("input",{type:"text",className:"form-control ml10 d-inline w-25",onChange:function(t){e.context.setCSVInfo(At(At({},e.context.csvInfo),{},{templateName:t.target.value}))},value:this.context.csvInfo.templateName})):o.a.createElement("div",null,o.a.createElement("label",null,"Save this mapping as"),o.a.createElement("input",{type:"text",onChange:function(t){e.context.setCSVInfo(At(At({},e.context.csvInfo),{},{templateName:t.target.value}))},className:"form-control ml10 d-inline w-25",value:this.context.csvInfo.templateName}))),o.a.createElement("div",{className:"col-md-12 mt40 p0"},o.a.createElement("div",{className:"float-left"},o.a.createElement("button",{className:"smack-btn btn-default",onClick:function(){e.context.setShowComponent("upload-dashboard")}},"Back")),this.props.fromEditTemplate?o.a.createElement("div",{className:"float-right mb20"},o.a.createElement("button",{className:"smack-btn smack-btn-primary",onClick:this.sendMappedFields.bind(this)},"Save")):o.a.createElement("div",{className:"float-right mb20"},o.a.createElement("button",{className:"smack-btn smack-btn-primary",onClick:this.sendMappedFields.bind(this)},this.context.language.Continue)),o.a.createElement("div",{className:"clearfix"})))),o.a.createElement("div",{className:"col-md-4 "},o.a.createElement("div",{className:"mapping-sidebar",id:"mapping-sidebar"},o.a.createElement("table",{className:"mapping-sidebar-title"},o.a.createElement("tbody",null,o.a.createElement("tr",null,o.a.createElement("td",{className:"mapping-sidebar-arrow"},o.a.createElement("span",{className:"csv-icon-chevron-with-circle-left",onClick:function(t){e.state.initialRowSize--,e.state.initialRowSize>=1?e.getCsvFields(e.state.initialRowSize):e.state.initialRowSize++}})),o.a.createElement("td",{className:"mapping-sidebar-textbox-section"},o.a.createElement("strong",null,o.a.createElement("input",{id:"current_row",value:this.state.initialRowSize,type:"text",pattern:"[0-9]*",onChange:function(t){parseInt(t.target.value)>e.state.totalCsvRows?e.setState({initialRowSize:e.state.totalCsvRows},(function(){e.getCsvFields(e.state.initialRowSize)})):(e.setState({initialRowSize:t.target.value}),e.getCsvFields(e.state.initialRowSize))}}))," ",o.a.createElement("span",{className:"mapping-textbox-out-of"},"of",o.a.createElement("strong",null," ",n))),o.a.createElement("td",{className:"mapping-sidebar-arrow"},o.a.createElement("span",{className:"csv-icon-chevron-with-circle-right",onClick:function(t){e.state.initialRowSize++,e.state.initialRowSize<=e.state.totalCsvRows?e.getCsvFields(e.state.initialRowSize):e.state.initialRowSize--}}))))),o.a.createElement("div",{className:"uci_mapping"},o.a.createElement("table",{className:"table table-bordered",cellspacing:"10"},this.context.isXML?this.state.loading||0==this.state.xmlData.length?o.a.createElement("div",{className:"loader loader-1 mt15 text-center"}):this.state.xmlData.map((function(e,t){return o.a.createElement("tr",null,o.a.createElement("td",{style:{width:"40%"},title:e.node_path,className:"text-primary font-weight-bold"},o.a.createElement(Dt.Draggable,{type:"csvheader",data:e.node_path},e.name)),o.a.createElement("td",null,e.value))})):this.state.loading||0==this.csvInformation.length?o.a.createElement("div",{className:"loader loader-1 mt15 text-center"}):this.csvInformation.map((function(e,t){return o.a.createElement("tr",null,o.a.createElement("td",{style:{width:"40%"},className:"text-primary font-weight-bold"},o.a.createElement(Dt.Draggable,{type:"csvheader",data:e.csvHeaders},e.csvHeaders)),o.a.createElement("td",null,e.csvValues))}))))))))}}]),a}(r.Component);function Yt(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 jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yt(Object(n),!0).forEach((function(t){M()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}M()(Rt,"contextType",E);var Ht=function(e){h()(r,e);var t,n=Ft(r);function r(){var e;l()(this,r);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return e=n.call.apply(n,[this].concat(o)),M()(k()(e),"state",{loading:!1}),e}return u()(r,[{key:"componentDidMount",value:function(){this.context.setCSVInfo(jt(jt({},this.context.csvInfo),{},{replaceExistingItem:"Insert"}))}},{key:"sendConfiguration",value:(t=y()(v.a.mark((function e(){var t,n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","mappingfields"),t.set("HashKey",this.context.csvInfo.hashKey),t.set("Types",this.context.csvInfo.selectedtype),t.set("Mode",this.context.csvInfo.replaceExistingItem),this.setState({loading:!0}),e.prev=6,e.next=9,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 9:(n=e.sent)&&n.data&&200==n.status&&n.data.success&&(this.setState({loading:!1}),!0===n.data.show_template?(this.context.setIsTemplate(!0),this.context.setSaveTemplateData(n.data.info),this.context.setShowComponent("save-template")):(this.context.setCsvFields(n.data.csv_fields),r=ut(n.data.fields),this.context.setAllPluginFields(r),"xml"===this.context.csvInfo.fileType?this.context.setShowComponent("dragdrop-section"):this.context.setShowComponent("mapping-section"))),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(6),console.log(e.t0);case 16:case"end":return e.stop()}}),e,this,[[6,13]])}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"csv-importer-panel mt20 container"},o.a.createElement("div",{className:"file-info-container clearfix"},o.a.createElement("div",{className:"csvinfo"},o.a.createElement("h3",{className:"file-name"},this.context.csvInfo.fileName," -"," ",o.a.createElement("span",{className:"size"},this.context.csvInfo.fileSize)),o.a.createElement("div",{class:"d-flex justify-content-center mt40"},o.a.createElement("div",{className:"form-check form-check-inline form-group"},o.a.createElement("input",{className:"form-check-input ",onClick:function(){e.context.setCSVInfo(jt(jt({},e.context.csvInfo),{},{replaceExistingItem:"Insert"}))},type:"radio",id:"insertRad",name:"post-item",value:"Insert",checked:"Insert"===this.context.csvInfo.replaceExistingItem})," ",o.a.createElement("label",{for:"insertRad",class:"form-check-label"},"New Item")),o.a.createElement("div",{className:"form-check form-check-inline form-group",style:{opacity:.6}},o.a.createElement("input",{className:"form-check-input",onClick:function(){D.toast.info("Please Upgrade to PRO for this Feature")},type:"radio",id:"updateRad",name:"post-item",value:"Update",checked:"Update"===this.context.csvInfo.replaceExistingItem})," ",o.a.createElement("label",{for:"updateRad",className:"form-check-label"},"Existing Items"))),o.a.createElement("div",{className:"d-flex justify-content-center mt40"},o.a.createElement("div",{className:"form-group"},o.a.createElement("label",null,"Import each record as"),o.a.createElement("div",null,o.a.createElement("select",{value:this.context.csvInfo.selectedtype,className:"select form-control",onChange:function(t){e.context.setCSVInfo(jt(jt({},e.context.csvInfo),{},{selectedtype:t.target.value}))},name:"",id:""},o.a.createElement("optgroup",{label:"PostType"},this.context.csvInfo.postTypes.map((function(e){return o.a.createElement("option",{value:e},e)})))))))),o.a.createElement("div",{class:"col-md-12 mt40 p0"},o.a.createElement("div",{class:"float-left"},o.a.createElement("button",{type:"button",class:"smack-btn btn-default",onClick:function(){e.context.setShowComponent("upload-dashboard")}},this.context.language.Back)),o.a.createElement("div",{className:"float-right"},this.state.loading?this.context.loaderText:o.a.createElement("input",{type:"button",className:"smack-btn smack-btn-primary",onClick:this.sendConfiguration.bind(this),value:this.context.language.Continue})))))}}]),r}(r.Component);function zt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}M()(Ht,"contextType",E);var Bt=function(e){h()(r,e);var t,n=zt(r);function r(e){var t;return l()(this,r),(t=n.call(this,e)).state={mediaHandlingEnabled:!1,useMediaImagesIfAlreadyAvailable:!1,usePostContentImageOption:!1},t}return u()(r,[{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("import-update")}},{key:"sendMediaHandlingConfiguration",value:(t=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("Media Handle Option",this.state.mediaHandlingEnabled),(t=new FormData).set("action","image_options"),t.set("media_handle_option",this.state.mediaHandlingEnabled),t.set("use_ExistingImage",this.state.useMediaImagesIfAlreadyAvailable),t.set("postContent_image_option",this.state.usePostContentImageOption),this.setState({loading:!0}),e.next=9,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 9:200==(n=e.sent).status&&n.data.success&&(this.setState({loading:!1}),this.context.setShowComponent("import-config"));case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this;return o.a.createElement("div",{id:"mapping-accordion",className:"container"},o.a.createElement("div",{className:"card csv-importer-panel mt20"},o.a.createElement("div",{className:"card-body"},o.a.createElement("h5",null,this.context.language.MediaHandling),o.a.createElement("div",{className:"col-md-12 row mt30 justify-content-center"},o.a.createElement("label",{className:"align-self-center"},this.context.language.Downloadexternalimagestoyourmedia),o.a.createElement("div",{className:"form-group fieldset ml30"},o.a.createElement("input",{type:"checkbox",className:"ios-switch",name:"media-handle",id:"media-handle",onClick:function(t){e.state.mediaHandlingEnabled?e.setState({mediaHandlingEnabled:!1}):e.setState({mediaHandlingEnabled:!0})},checked:this.state.mediaHandlingEnabled}),o.a.createElement("label",{className:"switch-ios",for:"media-handle"},o.a.createElement("i",null)))),o.a.createElement("div",{className:"media-fields ".concat(this.state.mediaHandlingEnabled?"active":"")},o.a.createElement("div",{className:"col-md-12 mt20"},o.a.createElement("div",{className:"border-container"},o.a.createElement("h5",{className:"border-container-header"},this.context.language.ImageHandling),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"checkbox",name:"media-image",className:"",id:"media-image-existing",disabled:!1,onClick:function(t){e.setState({useMediaImagesIfAlreadyAvailable:t.target.checked})}}),o.a.createElement("label",{className:"ml10",for:"media-image-existing"},this.context.language.Usemediaimagesifalreadyavailable)),o.a.createElement("div",{className:"form-group d-flex",style:{alignItems:"center"}},o.a.createElement("input",{type:"checkbox",name:"media-image",id:"media-image-overwrite",disabled:!0,onClick:function(t){e.setState({useMediaImagesIfAlreadyAvailable:!1}),D.toast.info("Please upgrade to PRO for Advanced Media Handling.")}}),o.a.createElement("label",{className:"ml10",for:"media-image-overwrite"},this.context.language.Doyouwanttooverwritetheexistingimages),o.a.createElement("a",{className:"nav-link pro-tag ml20"})),o.a.createElement("div",{className:"form-group d-flex",style:{alignItems:"center"}},o.a.createElement("input",{type:"checkbox",name:"media-image",className:"",id:"media-new-image",disabled:!0,onClick:function(t){e.setState({useMediaImagesIfAlreadyAvailable:!1}),D.toast.info("Please upgrade to PRO for Advanced Media Handling.")}}),o.a.createElement("label",{className:"ml10",for:"media-new-image"},"Always create as new image"),o.a.createElement("a",{className:"nav-link pro-tag ml20"})))),o.a.createElement("div",{className:"col-md-12 mt50"},o.a.createElement("div",{className:"border-container"},o.a.createElement("h5",{className:"border-container-header"},this.context.language.PostContentImageOption),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"checkbox",name:"postcontent-image",className:"",id:"postcontent-image-existing",disabled:!1,onClick:function(t){e.setState({usePostContentImageOption:t.target.checked})}}),o.a.createElement("label",{className:"ml10",for:"postcontent-image-existing"},this.context.language.DownloadPostContentExternalImagestoMedia)))),o.a.createElement("div",{className:"col-md-12 mt50"},o.a.createElement("div",{className:"border-container"},o.a.createElement("h5",{className:"border-container-header"},this.context.language.MediaSEOAdvancedOptions),o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"form-group col-md-4"},o.a.createElement("label",{className:"d-block"},this.context.language.SetimageTitle," ",":"," "),o.a.createElement("select",{disabled:!0,className:"form-control",name:"mediaImageTitle"},o.a.createElement("option",{value:""},"--select--"),this.context.csvFields.map((function(e){return o.a.createElement("option",{value:e,disabled:!0},e)})))),o.a.createElement("div",{className:"form-group col-md-4"},o.a.createElement("label",{className:"d-block"},this.context.language.SetimageCaption," ",":"," "),o.a.createElement("select",{disabled:!0,className:"form-control",name:"mediaImageCaption"},o.a.createElement("option",{value:""},"--select--"),this.context.csvFields.map((function(e,t){return o.a.createElement("option",{value:e},e)})))),o.a.createElement("div",{className:"form-group col-md-4"},o.a.createElement("label",{className:"d-block"},this.context.language.SetimageAltText," ",":"," "),o.a.createElement("select",{disabled:!0,className:"form-control",name:"mediaImageAltText"},o.a.createElement("option",{value:""},"--select--"),this.context.csvFields.map((function(e,t){return o.a.createElement("option",{value:e},e)})))),o.a.createElement("div",{className:"form-group col-md-4"},o.a.createElement("label",{className:"d-block"},this.context.language.SetimageDescription," ",":"," "),o.a.createElement("select",{disabled:!0,className:"form-control",name:"mediaImageDescription"},o.a.createElement("option",{value:""},"--select--"),this.context.csvFields.map((function(e){return o.a.createElement("option",{value:e},e)})))),o.a.createElement("div",{className:"form-group col-md-4"},o.a.createElement("label",{className:"d-block"},this.context.language.Changeimagefilenameto," ",":"," "),o.a.createElement("select",{disabled:!0,className:"form-control",name:"mediaImageFileName"},o.a.createElement("option",{value:""},"--select--"),this.context.csvFields.map((function(e){return o.a.createElement("option",{value:e},e)}))))),o.a.createElement("a",{className:"nav-link pro-tag"})))),o.a.createElement("div",{className:"form-group mt30"},o.a.createElement("div",{className:"float-left"},o.a.createElement("button",{type:"button",class:"smack-btn btn-default",onClick:function(){e.context.setShowComponent(e.context.mappingType)}},this.context.language.Back)),o.a.createElement("div",{className:"float-right"},this.state.loading?this.context.loaderText:o.a.createElement("button",{type:"button",className:"smack-btn smack-btn-primary",onClick:function(){e.sendMediaHandlingConfiguration()}},this.context.language.Continue))))))}}]),r}(r.Component);M()(Bt,"contextType",E);var Ut=Bt;function Vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}n(3);var Wt=function(e){h()(s,e);var t,n,r,a,i=Vt(s);function s(e){var t;return l()(this,s),(t=i.call(this,e)).state={loading:!1,updateFieldsList:[],enableSchedule:!1,showOnSchedule:"none",hiddenOnSchedule:"block",displayDuplicate:!1,updateField:"",showAdaptiveProcessingOptions:!1,highSpeedSmallFileProcessing:!1,iterativePieceByPieceProcessing:!0,iterationProcessRecordNumber:5,maximumProcessRecordNumber:50,minimumProcessRecordNumber:1,splitFileRecordChunk:!0,iterationProcessRecordLimitExceed:!1,totalRecords:""},t.handleDateChange=t.handleDateChange.bind(k()(t)),t.handleChange=t.handleChange.bind(k()(t)),t}return u()(s,[{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("import-update"),this.getUpdateFields()}},{key:"setEnableSchedule",value:function(e){var t=this;this.setState({enableSchedule:e},(function(){t.state.enableSchedule?t.setState({showOnSchedule:"block",hiddenOnSchedule:"none"}):t.setState({showOnSchedule:"none",hiddenOnSchedule:"block"})}))}},{key:"startBulkImport",value:(a=y()(v.a.mark((function e(){var t,n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","bulk_file_import"),t.set("HashKey",this.context.csvInfo.hashKey),t.set("highspeed",this.state.highSpeedSmallFileProcessing),t.set("PieceByPiece",this.state.iterativePieceByPieceProcessing),t.set("FileIteration",this.state.iterationProcessRecordNumber),t.set("SplitChunks",this.state.splitFileRecordChunk),this.context.setShowImportLog(!0),this.context.setImportLogDataLink("".concat(window.wpr_object.logfielpath,"/").concat(this.context.csvInfo.hashKey,"/").concat(this.context.csvInfo.hashKey,".html")),this.setState({loading:!0}),e.prev=10,e.next=13,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 13:return n=e.sent,this.setState({loading:!1}),"csv"===n.data.file_extension||n.data.file_extension,r=Math.ceil(n.data.total_rows/n.data.file_iteration),this.context.setBulkImportData({totalPages:r,totalRows:n.data.total_rows,fileName:n.data.file_name,fileSize:n.data.filesize,fileExtension:n.data.file_extension,fileIteration:n.data.file_iteration,Check:this.state.updateField}),this.context.setShowComponent("bulk-import"),e.abrupt("return");case 21:e.prev=21,e.t0=e.catch(10);case 23:case"end":return e.stop()}}),e,this,[[10,21]])}))),function(){return a.apply(this,arguments)})},{key:"importConfiguration",value:(r=y()(v.a.mark((function e(){var t,n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.state.displayDuplicate||""!=this.state.updateField){e.next=3;break}return D.toast.error("Please Select field to Handle Duplicate"),e.abrupt("return");case 3:return this.context.setShowComponent("import-process"),(t=new FormData).set("action","StartImport"),n="",n=this.context.rollBackMode?"true":"false",t.set("HashKey",this.context.csvInfo.hashKey),t.set("Check",this.state.updateField),t.set("RollBack",n),this.context.setShowImportLog(!0),this.context.setImportLogDataLink("".concat(window.wpr_object.logfielpath,"/").concat(this.context.csvInfo.hashKey,"/").concat(this.context.csvInfo.hashKey,".html")),this.setState({loading:!0}),e.prev=14,e.next=17,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 17:r=e.sent,this.setState({loading:!1}),200==r.status&&r.data.success,e.next=25;break;case 22:e.prev=22,e.t0=e.catch(14),console.log(e.t0);case 25:case"end":return e.stop()}}),e,this,[[14,22]])}))),function(){return r.apply(this,arguments)})},{key:"getUpdateFields",value:(n=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","updatefields"),t.set("Types",this.context.csvInfo.selectedtype),t.set("Mode",this.context.csvInfo.replaceExistingItem),t.set("HashKey",this.context.csvInfo.hashKey),this.setState({loading:!0}),e.prev=6,e.next=9,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 9:n=e.sent,this.setState({loading:!1}),n&&n.data&&200==n.status&&this.setState({updateFieldsList:n.data.update_fields,totalRecords:n.data.total_records}),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(6),console.log(e.t0);case 17:case"end":return e.stop()}}),e,this,[[6,14]])}))),function(){return n.apply(this,arguments)})},{key:"updateMaintenanceMode",value:(t=y()(v.a.mark((function e(t){var n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new FormData).set("action","settings_options"),n.set("option","enable_main_mode"),n.set("value",t),e.next=6,S()({method:"post",url:ajaxurl,data:n,config:{headers:{"Content-Type":"multipart/form-data"}}});case 6:e.sent,this.context.setMaintenanceMode(t);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"handleChange",value:function(e){this.setState(M()({},e.target.name,e.target.value),(function(){}))}},{key:"handleDateChange",value:function(e){this.setState({selectedDate:e})}},{key:"render",value:function(){var e=this,t=this.state,n=t.updateField;t.selectedUTC,t.selectedDate,t.scheduleTime,t.scheduleFrequency;return o.a.createElement("div",{id:"import-configuration",className:"container"},o.a.createElement("div",{className:"card csv-importer-panel mt20 pt30 pb30"},o.a.createElement("div",{className:"row export"},o.a.createElement("h1",{className:"main-heading pr15 pl15 mb20 col-md-12"},"Import configuration Section"),o.a.createElement("div",{style:{display:this.state.hiddenOnSchedule},className:"advanced-filter col-md-12"},o.a.createElement("div",{className:"checkbox"},o.a.createElement("input",{type:"checkbox",id:"import_configuration_maintenance_mode",checked:this.context.maintenanceMode,onClick:function(t){e.updateMaintenanceMode(t.target.checked)}}),o.a.createElement("label",{for:"import_configuration_maintenance_mode"},"Do you want to SWITCH ON Maintenance mode while import ?"))),o.a.createElement("div",{className:"advanced-filter col-md-12"},o.a.createElement("div",{className:"checkbox"},o.a.createElement("input",{type:"checkbox",id:"import_configuration_duplicate_handle",className:"",onChange:function(t){e.setState({displayDuplicate:t.target.checked})},checked:this.state.displayDuplicate}),o.a.createElement("label",{for:"import_configuration_duplicate_handle"},"Do you want to handle the duplicate on existing records ?")),o.a.createElement("div",{className:"row mt20 col-md-6",style:{display:this.state.displayDuplicate?"block":"none"}},o.a.createElement("div",{className:"form-group col"},"Insert"===this.context.csvInfo.replaceExistingItem?o.a.createElement("label",null,this.context.language.Mentionthefieldswhichyouwanttohandleduplicates):"Update"===this.context.csvInfo.replaceExistingItem?o.a.createElement("label",null,this.context.language.Updaterecordsbasedon):"",o.a.createElement("select",{className:"select form-control",name:"updateField",value:n,onChange:this.handleChange},o.a.createElement("option",{value:""},"Select Field"),0!=this.state.updateFieldsList.length?this.state.updateFieldsList.map((function(e,t){return o.a.createElement("option",{value:e},e)})):void 0)))),o.a.createElement("div",{className:"advanced-filter col-md-12"},o.a.createElement("div",{className:"checkbox"},o.a.createElement("input",{type:"checkbox",id:"import_configuration_split_record",checked:this.state.showAdaptiveProcessingOptions,onClick:function(t){e.setState({showAdaptiveProcessingOptions:t.target.checked})}}),o.a.createElement("label",{for:"import_configuration_split_record"},"Do you want adaptive file processing of record"," ","?"),this.state.showAdaptiveProcessingOptions?o.a.createElement("div",{className:"ml-5"},o.a.createElement("div",{className:"radio ".concat(this.state.totalRecords>1e3?"file-processing-tag":"")},o.a.createElement("input",{type:"radio",id:"high_speed_small_file_processing",disabled:this.state.totalRecords>1e3,checked:this.state.highSpeedSmallFileProcessing,onClick:function(t){e.setState({highSpeedSmallFileProcessing:t.target.checked,iterativePieceByPieceProcessing:!1})}}),o.a.createElement("label",{for:"high_speed_file_processing"},"High Speed Small File Processing")),o.a.createElement("div",{className:"radio"},o.a.createElement("input",{type:"radio",id:"iterative_piece_by_piece_processing",checked:this.state.iterativePieceByPieceProcessing,onClick:function(t){e.setState({iterativePieceByPieceProcessing:t.target.checked,highSpeedSmallFileProcessing:!1})}}),o.a.createElement("label",{for:"high_speed_file_processing"},"Iterative, Piece-by-Piece Processing"),this.state.iterativePieceByPieceProcessing?o.a.createElement("div",{className:"ml-5"},o.a.createElement("div",{className:"checkbox"},o.a.createElement("label",{for:"records_need_to_iterate"},"In each iteration how many records need to process"),o.a.createElement("input",{type:"number",max:this.state.maximumProcessRecordNumber,min:this.state.minimumProcessRecordNumber,value:this.state.iterationProcessRecordNumber,id:"records_processed_per_iteration",onChange:function(t){t.target.value<=50&&t.target.value>=1&&e.setState({iterationProcessRecordNumber:t.target.value})}})),o.a.createElement("br",null),o.a.createElement("div",{className:"checkbox"},o.a.createElement("input",{type:"checkbox",checked:this.state.splitFileRecordChunk,id:"split_record_chunk",onClick:function(t){t.target.checked?e.setState({splitFileRecordChunk:!0}):e.setState({splitFileRecordChunk:!1})}}),o.a.createElement("label",{for:"split_record_chunk"},"Do you need to split the file into 1000 records and process it"))):"")):"")),o.a.createElement("div",{className:"advanced-filter col-md-12",style:{opacity:.6}},o.a.createElement("div",{className:"checkbox"},o.a.createElement("input",{type:"checkbox",id:"import_configuration_schedule_import",checked:this.state.enableSchedule,onClick:function(){D.toast.info("Please upgrade to PRO for Schedule you Import")}}),o.a.createElement("label",{for:"import_configuration_schedule_import"},this.context.language.DoyouwanttoSchedulethisImport))),o.a.createElement("div",{className:"form-group col-md-12 mt30"},o.a.createElement("div",{className:"float-left"},"WooCommerce Orders"===this.context.csvInfo.selectedtype||"WooCommerce Coupons"===this.context.csvInfo.selectedtype||"WooCommerce Product Variations"===this.context.csvInfo.selectedtype||"WooCommerce Refunds"===this.context.csvInfo.selectedtype||"WooCommerce Attributes"===this.context.csvInfo.selectedtype||"Users"===this.context.csvInfo.selectedtype||"Comments"===this.context.csvInfo.selectedtype||"widgets"===this.context.csvInfo.selectedtype||"nav_menu_item"===this.context.csvInfo.selectedtype?o.a.createElement("button",{type:"button",class:"smack-btn btn-default",onClick:function(){e.context.setShowComponent(e.context.mappingType)}},this.context.language.Back):o.a.createElement("button",{type:"button",className:"smack-btn btn-default",onClick:function(){e.context.setShowComponent("media-handling")}},this.context.language.Back)),o.a.createElement("div",{className:"float-right"},this.state.loading?this.context.loaderText:o.a.createElement(o.a.Fragment,null,o.a.createElement("button",{type:"button",className:"smack-btn smack-btn-primary",onClick:function(){e.startBulkImport()}},this.context.language.Import)))))))}}]),s}(r.Component);function qt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}M()(Wt,"contextType",E);var Gt=function(e){h()(s,e);var t,n,r,a,i=qt(s);function s(e){var t;return l()(this,s),(t=i.call(this,e)).state={loading:!0,check:"",fileName:"",processingRecords:"",remainingRecords:"",totalRecords:"",fileSize:"",process:"",remainingTime:"00:00:00",stopWatch:"00:00:00",progWidth:"0",importStatus:"Processing",enableDownload:!1,controlImportProcess:!0,rollBackProgress:!1},t.message=[],t.status=[],t.verify=[],t.tag=[],t.categories=[],t.loopCount=0,t.remainingTime=0,t.stopSeconds=0,t.stopMinutes=0,t.stopHours=0,t.onUnload=t.onUnload.bind(k()(t)),t.progressWidth,t}return u()(s,[{key:"onUnload",value:(a=y()(v.a.mark((function e(t){var n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new FormData).set("action","ImportStop"),n.set("Stop","false"),e.next=5,S()({method:"post",url:ajaxurl,data:n,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:e.sent,t.returnValue="Hellooww";case 7:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("import-update"),this.refreshIntervalId=setInterval(function(){this.getProgress.bind(this)(),this.state.loading&&this.state.controlImportProcess&&this.stopWatch()}.bind(this),1e3),window.addEventListener("beforeunload",this.onUnload)}},{key:"getProgress",value:(r=y()(v.a.mark((function e(){var t,n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","GetProgress"),t.set("HashKey",this.context.csvInfo.hashKey),e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:if(200==(n=e.sent).status&&n.data.success){for(this.message=[],this.status=[],this.verify=[],this.tag=[],this.categories=[],r=0;r<n.data.Info.length;r++)this.message.push(n.data.Info[r].message),this.status.push(n.data.Info[r].status),this.verify.push(n.data.Info[r].verify),this.tag.push(n.data.Info[r].tags),this.categories.push(n.data.Info[r].categories);this.setState({fileName:n.data.file_name}),this.setState({fileSize:n.data.filesize}),this.setState({processingRecords:n.data.processing_records}),this.setState({remainingRecords:n.data.remaining_records}),this.setState({totalRecords:n.data.total_records}),this.setState({loading:n.data.progress}),this.setState({importStatus:n.data.status}),this.loopCount=this.loopCount+1,n.data.processing_records>2&&(this.remainingTime=this.loopCount/n.data.processing_records*n.data.remaining_records,this.secondsToHms(this.remainingTime)),this.loadProgress(n.data)}case 7:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"loadProgress",value:function(e){e.processing_records!==e.total_records?this.progressWidth=e.processing_records/e.total_records*100:e.progress||(this.progressWidth=e.processing_records/e.total_records*100),this.progressWidth=Math.round(this.progressWidth),this.progressWidth>.9&&this.setState({progWidth:this.progressWidth})}},{key:"secondsToHms",value:function(e){e=Number(e);var t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);t.toString().length<2&&(t="0"+t),n.toString().length<2&&(n="0"+n),r.toString().length<2&&(r="0"+r);var o=t+":"+n+":"+r;this.setState({remainingTime:o})}},{key:"stopWatch",value:function(){this.stopSeconds++,this.stopSeconds>=60&&(this.stopSeconds=0,this.stopMinutes++,this.stopMinutes>=60&&(this.stopMinutes=0,this.stopHours++)),this.stopHours.toString().length<2&&(this.stopHours="0"+this.stopHours),this.stopMinutes.toString().length<2&&(this.stopMinutes="0"+this.stopMinutes),this.stopSeconds.toString().length<2&&(this.stopSeconds="0"+this.stopSeconds);var e=this.stopHours+":"+this.stopMinutes+":"+this.stopSeconds;this.setState({stopWatch:e})}},{key:"accessImportProcess",value:(n=y()(v.a.mark((function e(t){var n,r,o,a;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.target.value,r="","Pause"===n?(this.setState({controlImportProcess:!1}),r="false",clearInterval(this.refreshIntervalId)):(this.setState({controlImportProcess:!0}),r="true"),(o=new FormData).set("action","ImportState"),o.set("State",r),o.set("HashKey",this.context.csvInfo.hashKey),e.next=9,S()({method:"post",url:ajaxurl,data:o,config:{headers:{"Content-Type":"multipart/form-data"}}});case 9:200==(a=e.sent).status&&a.data.import_state&&(a.data.import_state?this.setState({loading:!1}):this.setState({loading:!0}),this.refreshIntervalId=setInterval(function(){this.getProgress.bind(this)(),this.state.loading&&this.state.controlImportProcess&&this.stopWatch()}.bind(this),1e3));case 11:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"startRollBackMode",value:(t=y()(v.a.mark((function e(){var t,n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({rollBackProgress:!0}),(t=new FormData).set("action","rollback_now"),t.set("HashKey",this.context.csvInfo.hashKey),e.next=6,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 6:n=e.sent,this.setState({rollBackProgress:!1}),(r=n.data).success?(this.context.setRollBackMode(!1),D.toast.success(r.message)):D.toast.error(r.message);case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this,t={width:this.state.progWidth+"%"};!this.state.loading&&this.context.showImportLog;return o.a.createElement("div",{className:"wp-ultimate-csv-importer"},o.a.createElement("div",{className:"container"},o.a.createElement("div",{className:"importer-log"},o.a.createElement("div",{className:"card csv-importer-panel mt40 col-md-12"},o.a.createElement("div",{className:"card-body"},o.a.createElement("h4",{className:"text-center"},"Import ",this.state.importStatus),o.a.createElement("div",{className:"row justify-content-center"},o.a.createElement("div",{className:"mt30 "},"Completed"===this.state.importStatus?o.a.createElement(o.a.Fragment,null,o.a.createElement("input",{type:"button",className:"smack-btn btn-default",value:"Close",onClick:function(t){e.context.setShowComponent("upload-dashboard"),window.location.reload()}}),this.context.rollBackMode?o.a.createElement(o.a.Fragment,null,o.a.createElement("input",{type:"button",className:"ml20 smack-btn smack-btn-danger",value:"RoleBack Now",onClick:function(t){e.startRollBackMode()}})," ",this.state.rollBackProgress?o.a.createElement("div",{className:"btn ajax-loader loading",style:{marginLeft:"25px",marginRight:"0",bottom:"5px",padding:"0"}}):""," "):void 0):this.state.controlImportProcess?o.a.createElement("input",{type:"button",className:"smack-btn smack-btn-warning",value:"Pause",onClick:this.accessImportProcess.bind(this)}):o.a.createElement("input",{type:"button",className:"smack-btn smack-btn-primary",value:"Resume",onClick:this.accessImportProcess.bind(this)}))),o.a.createElement("table",{className:"table mt40"},o.a.createElement("tbody",null,o.a.createElement("tr",null,o.a.createElement("td",{className:"text-left"},this.context.language.FileName,":"," ",o.a.createElement("span",null,this.state.fileName)),o.a.createElement("td",{className:"text-right"},this.context.language.FileSize,":"," ",o.a.createElement("span",null,this.state.fileSize))),o.a.createElement("tr",null,o.a.createElement("td",{className:"text-left"},this.context.language.Process,":"," ",o.a.createElement("span",null,this.context.csvInfo.replaceExistingItem)),o.a.createElement("td",{className:"text-right"},this.context.language.Totalnoofrecords,":"," ",o.a.createElement("span",null,this.state.totalRecords))),o.a.createElement("tr",null,o.a.createElement("td",{className:"text-left"},o.a.createElement("span",{className:"font-weight-normal text-success"}," ",this.context.language.CurrentProcessingRecord,":"," ",o.a.createElement("span",null,this.state.processingRecords))),o.a.createElement("td",{className:"text-right"},o.a.createElement("span",{className:"font-weight-normal text-danger"},this.context.language.RemainingRecord,":"," ",o.a.createElement("span",null,this.state.remainingRecords)))))),o.a.createElement("div",{className:"card-body px-3"},o.a.createElement("div",{className:"importing-details"},o.a.createElement("div",{className:"progress-status"},"Processing"===this.state.importStatus?"In Progress":""),o.a.createElement("div",{className:"import-progress"},o.a.createElement("div",{className:"progress-loading"},this.state.progWidth+"%"," ",this.context.language.Completed),o.a.createElement("div",{className:"progress-timing"},o.a.createElement("i",{className:"csv-icon-schedule"})," ",this.context.language.TimeElapsed,":"," ",o.a.createElement("span",null," ",this.state.stopWatch,"/ "),this.state.remainingTime,"(",this.context.language.approximate,")"))),o.a.createElement("div",{className:"progress mt5 mb40"},o.a.createElement("div",{className:"progress-bar",style:t,role:"progressbar","aria-valuenow":"10","aria-valuemin":"0","aria-valuemax":"100"})),o.a.createElement("div",{className:"d-flex justify-content-center"},o.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",className:"smack-btn smack-btn-primary",href:this.context.importLogDataLink},o.a.createElement("i",{className:"csv-icon-download-cloud mr10"})," ",this.context.language.DownloadLog))))))),o.a.createElement("button",{type:"button",className:"d-none","data-toggle":"modal","data-target":"#displayLogText",id:"triggerLog"}),o.a.createElement("div",{id:"displayLogText",className:"modal fade",role:"dialog"},o.a.createElement("div",{className:"modal-dialog modal-lg modal-dialog-centered"},o.a.createElement("div",{className:"modal-content"},o.a.createElement("div",{className:"modal-header"},o.a.createElement("h1",{class:"main-heading"},"Import Log for ",this.state.fileName),o.a.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},"×")),o.a.createElement("div",{className:"modal-body my-2"},o.a.createElement("div",{id:"showLogText"}))))))}}]),s}(r.Component);M()(Gt,"contextType",E);var Jt=Gt;function Kt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var Qt=function(e){h()(a,e);var t,n,r=Kt(a);function a(e){var t;return l()(this,a),t=r.call(this,e),M()(k()(t),"pauseBulkImport",y()(v.a.mark((function e(){var n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new FormData).set("action","PauseImport"),n.set("HashKey",t.context.csvInfo.hashKey),e.next=5,S()({method:"post",url:ajaxurl,data:n,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:r=e.sent,t.setState({controlImportProcess:!1}),r.data.pause_state&&t.timer&&clearInterval(t.timer);case 8:case"end":return e.stop()}}),e)})))),M()(k()(t),"resumeBulkImport",y()(v.a.mark((function e(){var n,r,o;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.setState({controlImportProcess:!0}),(n=new FormData).set("action","ResumeImport"),n.set("HashKey",t.context.csvInfo.hashKey),e.next=6,S()({method:"post",url:ajaxurl,data:n,config:{headers:{"Content-Type":"multipart/form-data"}}});case 6:(r=e.sent).data.resume_state&&(o="",o=t.context.rollBackMode?"true":"false",t.alternateWorker.bind(k()(t))(t.context.csvInfo.hashKey,o,r.data.page_number,t.context.bulkImportData.totalPages,t.context.bulkImportData.Check),t.timer=setInterval(t.stopWatch.bind(k()(t)),1e3));case 8:case"end":return e.stop()}}),e)})))),M()(k()(t),"bulkImportProcess",(function(){var e="";e=t.context.rollBackMode?"true":"false";var n=t.context.bulkImportData.totalRows;"csv"===t.context.bulkImportData.fileExtension||"txt"===t.context.bulkImportData.fileExtension?t.bulkImportCount=t.context.bulkImportData.fileIteration:t.bulkImportCount=5;var r=0*t.bulkImportCount+t.bulkImportCount;r>n&&(r=n);var o="1 - "+r;t.setState({processingRecords:o,remainingRecords:n}),t.alternateWorker.bind(k()(t))(t.context.csvInfo.hashKey,e,1,t.context.bulkImportData.totalPages,t.context.bulkImportData.Check),t.timer=setInterval(t.stopWatch.bind(k()(t)),1e3)})),t.state={loading:!0,check:"",fileName:"",processingRecords:"",remainingRecords:"",totalRecords:"",fileSize:"",process:"",remainingTime:"00:00:00",stopWatch:"00:00:00",progWidth:"0",importStatus:"Processing",enableDownload:!1,controlImportProcess:!0,rollBackProgress:!1},t.bulkImportCount=0,t.loopCount=0,t.remainingTime=0,t.stopSeconds=0,t.stopMinutes=0,t.stopHours=0,t.progressWidth,t.url,t}return u()(a,[{key:"componentDidMount",value:function(){this.checkAjaxURL(),this.bulkImportProcess(),this.state.loading&&this.stopWatch(),"csv"===this.context.bulkImportData.fileExtension||this.context.bulkImportData.fileExtension,this.bulkImportCount=this.context.bulkImportData.fileIteration}},{key:"checkAjaxURL",value:function(){ajaxurl.includes("http")?this.url=ajaxurl:this.url=window.location.origin+ajaxurl}},{key:"loadProgress",value:function(e){e.processing_records!==e.total_records?this.progressWidth=e.processing_records/e.total_records*100:e.progress||(this.progressWidth=e.processing_records/e.total_records*100),this.progressWidth=Math.round(this.progressWidth),this.progressWidth>.9&&(this.progressWidth>100?this.setState({progWidth:100},(function(){})):this.setState({progWidth:this.progressWidth},(function(){})))}},{key:"componentWillUnmount",value:function(){}},{key:"alternateWorker",value:(n=y()(v.a.mark((function e(t,n,r,o,a){var i,s,l,c,u,d,h;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=r;case 1:if(!(i<=o)){e.next=35;break}return s=performance.now(),(l=new FormData).append("action","bulk_import"),l.append("HashKey",t),l.append("PageNumber",i),l.append("RollBack",n),l.append("Check",a),e.prev=9,e.next=12,S()({method:"post",url:ajaxurl,data:l,config:{headers:{"Content-Type":"multipart/form-data"}}});case 12:if(200!=(c=e.sent).status){e.next=21;break}if(u=performance.now(),d=c.data,h=((u-s)%6e4/1e3).toFixed(0),0!=d.success){e.next=20;break}return this.updateProgressBar({result:d,completedPage:i,secondsToComplete:h}),e.abrupt("break",35);case 20:this.updateProgressBar({result:d,completedPage:i,secondsToComplete:h});case 21:e.next=30;break;case 23:if(e.prev=23,e.t0=e.catch(9),504!=e.t0.response.status||502!=e.t0.response.status){e.next=29;break}this.alternateWorker.bind(this)(t,n,r+1,o,a),e.next=30;break;case 29:return e.abrupt("return");case 30:if(this.state.controlImportProcess){e.next=32;break}return e.abrupt("return");case 32:i++,e.next=1;break;case 35:case"end":return e.stop()}}),e,this,[[9,23]])}))),function(e,t,r,o,a){return n.apply(this,arguments)})},{key:"updateProgressBar",value:function(e){this.loopCount=this.loopCount+1;var t=e.result,n=e.completedPage,r=e.secondsToComplete;0==t.success&&this.timer&&clearInterval(this.timer);var o=this.context.bulkImportData.totalRows,a=Math.ceil(o/this.bulkImportCount),i=a-n,s=n*this.bulkImportCount+1,l=n*this.bulkImportCount+this.bulkImportCount;l>o&&(l=o);var c=s+" - "+l;s>o&&(c="",this.timer&&clearInterval(this.timer));var u=o-n*this.bulkImportCount;u<0&&(u=0),n!=a?this.setState({loading:!0}):this.setState({loading:!1,importStatus:"Completed"}),this.setState({remainingRecords:u,processingRecords:c});var d={total_records:o,processing_records:s,remaining_records:u};this.remainingTime=r*i,this.secondsToHms(this.remainingTime),this.loadProgress(d)}},{key:"secondsToHms",value:function(e){e=Number(e);var t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);t.toString().length<2&&(t="0"+t),n.toString().length<2&&(n="0"+n),r.toString().length<2&&(r="0"+r);var o=t+":"+n+":"+r;this.setState({remainingTime:o})}},{key:"stopWatch",value:function(){this.stopSeconds++,this.stopSeconds>=60&&(this.stopSeconds=0,this.stopMinutes++,this.stopMinutes>=60&&(this.stopMinutes=0,this.stopHours++)),this.stopHours.toString().length<2&&(this.stopHours="0"+this.stopHours),this.stopMinutes.toString().length<2&&(this.stopMinutes="0"+this.stopMinutes),this.stopSeconds.toString().length<2&&(this.stopSeconds="0"+this.stopSeconds);var e=this.stopHours+":"+this.stopMinutes+":"+this.stopSeconds;this.setState({stopWatch:e})}},{key:"startRollBackMode",value:(t=y()(v.a.mark((function e(){var t,n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({rollBackProgress:!0}),(t=new FormData).set("action","rollback_now"),t.set("HashKey",this.context.csvInfo.hashKey),e.next=6,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 6:n=e.sent,this.setState({rollBackProgress:!1}),(r=n.data).success?(this.context.setRollBackMode(!1),D.toast.success(r.message)):D.toast.error(r.message);case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this,t={width:this.state.progWidth+"%"},n=(!this.state.loading&&this.context.showImportLog,this.context.bulkImportData),r=n.fileSize,a=n.fileName,i=n.totalRows;return o.a.createElement("div",{className:"wp-ultimate-csv-importer"},o.a.createElement("div",{className:" container"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"importer-log col-md-9"},o.a.createElement("div",{className:"card csv-importer-panel mt40 col-md-12"},o.a.createElement("div",{className:"card-body mb10"},o.a.createElement("h4",{className:"text-center"},"Import ",this.state.importStatus),o.a.createElement("div",{className:"row justify-content-center"},o.a.createElement("div",{className:"mt30 "},"Completed"===this.state.importStatus?o.a.createElement(o.a.Fragment,null,o.a.createElement("input",{type:"button",className:"smack-btn btn-default",value:"Close",onClick:function(t){e.context.setShowComponent("upload-dashboard"),window.location.reload()}}),this.context.rollBackMode?o.a.createElement(o.a.Fragment,null,o.a.createElement("input",{type:"button",className:"ml20 smack-btn smack-btn-danger",value:"RoleBack Now",onClick:function(t){e.startRollBackMode()}})," ",this.state.rollBackProgress?o.a.createElement("div",{className:"btn ajax-loader loading",style:{marginLeft:"25px",marginRight:"0",bottom:"5px",padding:"0"}}):""," "):void 0):this.state.controlImportProcess?o.a.createElement("input",{type:"button",className:"smack-btn smack-btn-warning",value:"Pause",onClick:this.pauseBulkImport}):o.a.createElement("input",{type:"button",className:"smack-btn smack-btn-primary",value:"Resume",onClick:this.resumeBulkImport}))),o.a.createElement("table",{className:"table mt40"},o.a.createElement("tbody",null,o.a.createElement("tr",null,o.a.createElement("td",{className:"text-left"},this.context.language.FileName,":"," ",o.a.createElement("span",null,a)),o.a.createElement("td",{className:"text-right"},this.context.language.FileSize,":"," ",o.a.createElement("span",null,r))),o.a.createElement("tr",null,o.a.createElement("td",{className:"text-left"},this.context.language.Process,":"," ",o.a.createElement("span",null,this.context.csvInfo.replaceExistingItem)),o.a.createElement("td",{className:"text-right"},this.context.language.Totalnoofrecords,":"," ",o.a.createElement("span",null,i))),o.a.createElement("tr",null,o.a.createElement("td",{className:"text-left"},o.a.createElement("span",{className:"font-weight-normal text-success"}," ",this.context.language.CurrentProcessingRecord,": ",o.a.createElement("span",null,this.state.processingRecords))),o.a.createElement("td",{className:"text-right"},o.a.createElement("span",{className:"font-weight-normal text-danger"},this.context.language.RemainingRecord,":"," ",o.a.createElement("span",null,this.state.remainingRecords)))))),o.a.createElement("div",{className:"card-body px-3"},o.a.createElement("div",{className:"importing-details"},o.a.createElement("div",{className:"progress-status"},"Processing"===this.state.importStatus?"In Progress":""),o.a.createElement("div",{className:"import-progress"},o.a.createElement("div",{className:"progress-loading"},this.state.progWidth+"%"," ",this.context.language.Completed),o.a.createElement("div",{className:"progress-timing"},o.a.createElement("i",{className:"csv-icon-schedule"})," ",this.context.language.TimeElapsed,":"," ",o.a.createElement("span",null," ",this.state.stopWatch,"/ "),this.state.remainingTime,"(",this.context.language.approximate,")"))),o.a.createElement("div",{className:"progress mt5 mb40"},o.a.createElement("div",{className:"progress-bar",style:t,role:"progressbar","aria-valuenow":"10","aria-valuemin":"0","aria-valuemax":"100"})),o.a.createElement("div",{className:"d-flex justify-content-center"},o.a.createElement("a",{target:"_blank",rel:"noopener noreferrer",className:"smack-btn smack-btn-primary",href:this.context.importLogDataLink},o.a.createElement("i",{className:"csv-icon-download-cloud mr10"})," ",this.context.language.DownloadLog)))))),o.a.createElement("div",{className:"cardprogress col-md-3 mt40 mb5 border-rad"},o.a.createElement("div",{className:"mt0 mr10 tit"},o.a.createElement("h2",{className:"title"},"Ultimate CSV Importer Pro"),o.a.createElement("hr",{className:"divider"}),o.a.createElement("ul",null,o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," ","Update older posts from single import"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," ","Auto Schedule with reusable templates"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," ","Advanced Custom Field/Post Plugins Importer"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," ","Import/Update any Toolset Types, ACF pro / Free and Pods fields"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," ","AIO WooCommerce Importer"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," ","WPML Importer"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," ","SEO Plugins Data Importer"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," ","Exporter with advanced filters")),o.a.createElement("a",{className:"basic-button border-rad mt25",href:"https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=plugin&utm_campaign=promo_widget&utm_medium=pro_edition",target:"blank"},"BUY NOW!"))))),o.a.createElement("button",{type:"button",className:"d-none","data-toggle":"modal","data-target":"#displayLogText",id:"triggerLog"}),o.a.createElement("div",{id:"displayLogText",className:"modal fade",role:"dialog"},o.a.createElement("div",{className:"modal-dialog modal-lg modal-dialog-centered"},o.a.createElement("div",{className:"modal-content"},o.a.createElement("div",{className:"modal-header"},o.a.createElement("h1",{class:"main-heading"},"Import Log for ",this.state.fileName),o.a.createElement("button",{type:"button",className:"close","data-dismiss":"modal"},"×")),o.a.createElement("div",{className:"modal-body my-2"},o.a.createElement("div",{id:"showLogText"}))))))}}]),a}(r.Component);function Xt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}M()(Qt,"contextType",E);var $t=function(e){h()(n,e);var t=Xt(n);function n(){return l()(this,n),t.apply(this,arguments)}return u()(n,[{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("import-update")}},{key:"render",value:function(){return"upload-dashboard"===this.context.showComponent?o.a.createElement(Zt,null):"csv-info"===this.context.showComponent?o.a.createElement(Ht,null):"mapping-section"===this.context.showComponent?o.a.createElement(St,{fromEditTemplate:!1}):"dragdrop-section"===this.context.showComponent?o.a.createElement(Rt,{fromEditTemplate:!1}):"media-handling"===this.context.showComponent?o.a.createElement(Ut,null):"import-config"===this.context.showComponent?o.a.createElement(Wt,null):"import-process"===this.context.showComponent?o.a.createElement(Jt,null):"bulk-import"===this.context.showComponent?o.a.createElement(Qt,null):void 0}}]),n}(r.Component);M()($t,"contextType",E);var Zt=function(e){h()(n,e);var t=Xt(n);function n(){var e;l()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),M()(k()(e),"state",{selectedId:"v-pills-home-tab"}),e}return u()(n,[{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"container"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"csv-importer-panel row mt20 col-md-9"},o.a.createElement("div",{className:"col-md-3 px-0"},o.a.createElement("div",{className:"nav flex-column nav-pills file-choosen-tab",id:"v-pills-tab",role:"tablist","aria-orientation":"vertical"},o.a.createElement("a",{className:"nav-link active mt20",id:"v-pills-home-tab",onClick:function(t){e.setState({selectedId:t.target.id})},"data-toggle":"pill",href:"#v-pills-home",role:"tab","aria-controls":"v-pills-home","aria-selected":"false"},o.a.createElement("i",{className:"csv-icon-upload-cloud"}),this.context.language.UploadfromDesktop),o.a.createElement("a",{className:"nav-link pro-tag tp80",id:"v-pills-profile-tab",onClick:function(t){e.setState({selectedId:t.target.id})},"data-toggle":"pill",href:"#v-pills-profile",role:"tab","aria-controls":"v-pills-profile","aria-selected":"true"},o.a.createElement("i",{className:"csv-icon-upload3"}),this.context.language.UploadfromFTPSFTP),o.a.createElement("a",{className:"nav-link pro-tag tp80",id:"v-pills-messages-tab",onClick:function(t){e.setState({selectedId:t.target.id})},"data-toggle":"pill",href:"#v-pills-messages",role:"tab","aria-controls":"v-pills-messages","aria-selected":"false"},o.a.createElement("i",{className:"csv-icon-link"}),this.context.language.UploadfromURL),o.a.createElement("a",{className:"nav-link pro-tag tp80",id:"v-pills-settings-tab",onClick:function(t){e.setState({selectedId:t.target.id})},"data-toggle":"pill",href:"#v-pills-settings",role:"tab","aria-controls":"v-pills-settings","aria-selected":"false"},o.a.createElement("i",{className:"csv-icon-server"}),this.context.language.ChoosFileintheServer))),"v-pills-home-tab"==this.state.selectedId?o.a.createElement(Et,{uploadoptions:this}):"v-pills-profile-tab"==this.state.selectedId||"v-pills-messages-tab"==this.state.selectedId||"v-pills-settings-tab"==this.state.selectedId?o.a.createElement(_e,null):void 0),o.a.createElement("div",{className:"cardbanner col-md-3 mt20 ml25 border-rad"},o.a.createElement("div",{className:"mt0 mb10 mr10 ml10"},o.a.createElement("h2",{className:"title"},"Ultimate CSV Importer Pro"),o.a.createElement("hr",{className:"divider"}),o.a.createElement("ul",null,o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," Update older posts from single import"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," Auto Schedule with reusable templates"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," Advanced Custom Field/Post Plugins Importer"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," AIO WooCommerce Import Suit"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," WPML Importer"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," SEO Plugins Data Importer"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," Exporter with advanced filters")),o.a.createElement("a",{className:"basic-button mt5 border-rad",href:"https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=plugin&utm_campaign=promo_widget&utm_medium=pro_edition",target:"blank"},"Buy NOW!")))))}}]),n}(r.Component);function en(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 tn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?en(Object(n),!0).forEach((function(t){M()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):en(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}M()(Zt,"contextType",E);var rn=function(e){h()(i,e);var t,n,r,a=nn(i);function i(e){var t;return l()(this,i),(t=a.call(this,e)).state={loading:!1,initialRowSize:1,totalCsvRows:"",csvInformation:[],currentMode:"draganddrop",customFields:[],xmlData:[]},t.csvInformation=[],t.handleScroll=t.handleScroll.bind(k()(t)),t}return u()(i,[{key:"componentDidMount",value:function(){this.checkRTLSupport(),this.getCsvFields(this.state.initialRowSize),window.addEventListener("scroll",this.handleScroll)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("scroll",this.handleScroll)}},{key:"checkRTLSupport",value:function(){document.querySelector("html").getAttribute("dir")&&document.getElementById("mapping-sidebar").classList.add("rltsupport")}},{key:"handleScroll",value:function(e){var t=document.getElementById("mapping-sidebar"),n=document.getElementById("mapping-accordion").offsetHeight-300;window.scrollY>200?(t.classList.add("mapping-sidebar-fixed"),window.scrollY>n?t.classList.add("fixed-bottom-position"):t.classList.remove("fixed-bottom-position")):t.classList.remove("mapping-sidebar-fixed")}},{key:"getCsvFields",value:(r=y()(v.a.mark((function e(t){var n,r,o,a,i;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new FormData,this.context.isXML?n.set("action","get_parse_xml"):n.set("action","displayCSV"),n.set("row",t),this.props.fromEditTemplate?n.set("templatename",this.context.csvInfo.templateName):n.set("HashKey",this.context.csvInfo.hashKey),this.setState({loading:!0}),e.prev=5,e.next=8,S()({method:"post",url:ajaxurl,data:n,config:{headers:{"Content-Type":"multipart/form-data"}}});case 8:if((r=e.sent)&&r.data&&200==r.status&&r.data.success){if(this.context.isXML)this.setState({xmlData:r.data.xml_array});else{for(o=[],a=[],this.csvInformation=[],i=0;i<r.data.Headers.length;i++)o.push(r.data.Headers[i]),a.push(r.data.Values[i]);for(i=0;i<r.data.Headers.length;i++)this.csvInformation.push({csvHeaders:r.data.Headers[i],csvValues:r.data.Values[i]})}this.setState({totalCsvRows:r.data.total_rows,loading:!1})}e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),console.log(e.t0);case 15:case"end":return e.stop()}}),e,this,[[5,12]])}))),function(e){return r.apply(this,arguments)})},{key:"onMappingSelect",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=ht(e).resultKey,a=this.context.dragAndDropMappingResult[o];a?r?this.context.dragAndDropMappingResult[o][t]=n:this.context.dragAndDropMappingResult[o][t]?this.context.dragAndDropMappingResult[o][t]+=n:this.context.dragAndDropMappingResult[o][t]=n:(this.context.dragAndDropMappingResult[o]={},this.context.dragAndDropMappingResult[o][t]=n),this.forceUpdate()}},{key:"addCustomField",value:function(){this.state.customFields.push({name:"",label:"",value:""}),this.setState({customFields:this.state.customFields})}},{key:"onCustomFieldLabelChange",value:function(e,t){this.state.customFields[t].label=e,this.state.customFields[t].name=e.trim().replace(/\s+/g,"-").toLowerCase(),this.setState({customFields:this.state.customFields})}},{key:"onCustomFieldValueChange",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];n?this.state.customFields[t].value=e:this.state.customFields[t].value+=e,this.setState({customFields:this.state.customFields})}},{key:"deleteCustomField",value:function(e){this.state.customFields.splice(e,1),this.setState({customFields:this.state.customFields})}},{key:"checkMandatory",value:function(){for(var e=["language_code","translated_post_title","translated_taxonomy_title","user_login","user_email"],t=0;t<this.context.allPluginFields.length;t++){var n=this.context.allPluginFields[t];for(var r in n){var o=n[r];if(o)for(var a=0;a<o.length;a++)if(e.includes(o[a].name)&&!this.checkKeyExistInMapping(o[a].name))return!1}}return!0}},{key:"checkKeyExistInMapping",value:function(e){var t=!1;for(var n in this.context.dragAndDropMappingResult){if(this.context.dragAndDropMappingResult[n])Object.keys(this.context.dragAndDropMappingResult[n]).includes(e)&&this.context.dragAndDropMappingResult[n][e]&&(t=!0)}return!!t||(D.toast.error(e+" is mandatory field"),!1)}},{key:"sendMappedFields",value:(n=y()(v.a.mark((function e(){var t,n,r,o,a;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.state.customFields)for(t=0;t<this.state.customFields.length;t++)n=this.state.customFields[t],r=n.name.trim(),n.value&&r&&(this.context.dragAndDropMappingResult.CORECUSTFIELDS||(this.context.dragAndDropMappingResult.CORECUSTFIELDS={}),this.context.dragAndDropMappingResult.CORECUSTFIELDS[n.name]=n.value);if(this.checkMandatory()){e.next=3;break}return e.abrupt("return");case 3:return this.context.setMappingType("dragdrop-section"),o=new FormData,this.props.fromEditTemplate?o.set("action","saveTemplate"):(o.set("action","saveMappedFields"),o.set("HashKey",this.context.csvInfo.hashKey)),o.set("Types",this.context.csvInfo.selectedtype),o.set("MappedFields",JSON.stringify(this.context.dragAndDropMappingResult)),o.set("MappingType","dragdrop-section"),this.context.isTemplate&&o.set("UseTemplateState","true"),this.context.isTemplate||this.props.fromEditTemplate?(o.set("TemplateName",this.context.existingTemplateName),o.set("NewTemplate",this.context.csvInfo.templateName)):(o.set("TemplateName",this.context.csvInfo.templateName),o.set("UseTemplateState","false")),e.prev=11,e.next=14,S()({method:"post",url:ajaxurl,data:o,config:{headers:{"Content-Type":"multipart/form-data"}}});case 14:a=e.sent,this.setState({loading:!0}),a&&a.data&&(200==a.status&&a.data.success?(this.setState({loading:!1}),this.props.fromEditTemplate?this.props.onEditTemplate(!1):("WooCommerce Orders"===this.context.csvInfo.selectedtype||"WooCommerce Coupons"===this.context.csvInfo.selectedtype||"WooCommerce Product Variations"===this.context.csvInfo.selectedtype||"WooCommerce Refunds"===this.context.csvInfo.selectedtype||"WooCommerce Attributes"===this.context.csvInfo.selectedtype||"Users"===this.context.csvInfo.selectedtype||"Comments"===this.context.csvInfo.selectedtype||"nav_menu_item"===this.context.csvInfo.selectedtype||this.context.csvInfo.selectedtype,this.startSimpleImport())):(this.setState({loading:!1}),D.toast.error(a.data.message+" Please Choose Another Name"))),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(11),this.setState({loading:!1});case 22:case"end":return e.stop()}}),e,this,[[11,19]])}))),function(){return n.apply(this,arguments)})},{key:"startSimpleImport",value:(t=y()(v.a.mark((function e(){var t,n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","bulk_file_import"),t.set("HashKey",this.context.csvInfo.hashKey),this.context.setShowImportLog(!0),this.context.setImportLogDataLink("".concat(window.wpr_object.logfielpath,"/").concat(this.context.csvInfo.hashKey,"/").concat(this.context.csvInfo.hashKey,".html")),this.setState({loading:!0}),e.prev=6,e.next=9,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 9:return n=e.sent,this.setState({loading:!1}),r="csv"===n.data.file_extension||"txt"===n.data.file_extension?Math.ceil(n.data.total_rows/5):Math.ceil(n.data.total_rows/3),console.log("Simple Import Response",n.data),this.context.bulkImportData.totalPages=r,this.context.bulkImportData.totalRows=n.data.total_rows,this.context.bulkImportData.fileName=n.data.file_name,this.context.bulkImportData.fileSize=n.data.filesize,this.context.bulkImportData.fileExtension=n.data.file_extension,this.context.bulkImportData.fileIteration=5,this.context.bulkImportData.Check=!0,this.context.setBulkImportData({totalPages:r,totalRows:n.data.total_rows,fileName:n.data.file_name,fileSize:n.data.filesize,fileExtension:n.data.file_extension,fileIteration:n.data.file_iteration,Check:!0}),this.context.setShowComponent("simple-import"),e.abrupt("return");case 25:e.prev=25,e.t0=e.catch(6);case 27:case"end":return e.stop()}}),e,this,[[6,25]])}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.state,n=(t.initialRowSize,t.totalCsvRows);t.xmlData;return o.a.createElement(o.a.Fragment,null,this.context.isXML?o.a.createElement(o.a.Fragment,null):o.a.createElement("div",{className:"container"},o.a.createElement("div",{className:"d-flex justify-content-center"},o.a.createElement("div",{className:"col-md-6"},o.a.createElement("ul",{className:"mapping-switcher"},o.a.createElement("li",{onClick:function(){e.context.setShowComponent("mapping-section")}},this.context.language.ADVANCEDMODE),o.a.createElement("li",{className:"active",onClick:function(){e.context.setShowComponent("dragdrop-section")}},this.context.language.DRAGDROPMODE))))),o.a.createElement("div",{className:"clearfix"}),o.a.createElement("div",{className:"row container-fluid ",style:{maxWidth:"1400px",margin:"auto"}},o.a.createElement("div",{id:"mapping-accordion",className:"col-md-8"},o.a.createElement("div",{className:"mt50"}),this.context.allPluginFields.map((function(t,n){var r=Object.keys(t)[0];if(!ht(r))return o.a.createElement("div",null," ","This ",r," support not implemented"," ");var a=!1;return r||(a=!0),t[r]||Array.isArray(t[r])||(a=!0,"wordpress_custom_fields"===r)?a?void 0:o.a.createElement("div",{className:"card csv-importer-panel"},o.a.createElement("h1",{className:"card-header main-heading ".concat(0==n?"active":""),id:r,onClick:function(){toggle_func(r)}},e.context.language[ht(r).languageName]," ",o.a.createElement("span",{className:"csv-icon-angle-down float-right"})),o.a.createElement("div",{className:"card-body",id:"".concat(r,"-body"),style:{display:0==n?"block":"none"},"data-display":e.state.display},t[r].map((function(t,n){return o.a.createElement("div",{className:"form-group"},o.a.createElement("label",null,t.label),o.a.createElement(Dt.Droppable,{types:["csvheader"],onDrop:function(n){e.onMappingSelect.bind(e)(r,t.name,"{".concat(n.csvheader,"}"),!1)}},"post_content"===t.name?o.a.createElement(Ct.a,{editor:Ot.a,data:function(){var n=ht(r).resultKey;if(e.context.dragAndDropMappingResult[n])return e.context.dragAndDropMappingResult[n][t.name]}(),onInit:function(e){},onChange:function(n,o){var a=o.getData();e.onMappingSelect.bind(e)(r,t.name,a)}}):o.a.createElement("input",{value:function(){var n=ht(r).resultKey;if(e.context.dragAndDropMappingResult[n])return e.context.dragAndDropMappingResult[n][t.name]}(),type:"text",name:"",id:t.name+"_text",className:"form-control",onChange:function(n){e.onMappingSelect.bind(e)(r,t.name,n.target.value)}})))})))):o.a.createElement("div",{className:"card csv-importer-panel "},o.a.createElement("h1",{className:"card-header main-heading bg-white pro-tag"},e.context.language[ht(r).languageName]," "))})),"WooCommerce Coupons"!==this.context.csvInfo.selectedtype&&"WooCommerce Product Variations"!==this.context.csvInfo.selectedtype&&"WooCommerce Refunds"!==this.context.csvInfo.selectedtype&&"WPeCommerce Coupons"!==this.context.csvInfo.selectedtype&&"WooCommerce Product"!==this.context.csvInfo.selectedtype&&"Customer Reviews"!==this.context.csvInfo.selectedtype&&"Images"!==this.context.csvInfo.selectedtype&&"eShop Products"!==this.context.csvInfo.selectedtype&&"MarketPress Product"!==this.context.csvInfo.selectedtype&&"WPeCommerce Coupons"!==this.context.csvInfo.selectedtype&&"Comments"!==this.context.csvInfo.selectedtype&&"nav_menu_item"!==this.context.csvInfo.selectedtype&&"widgets"!==this.context.csvInfo.selectedtype?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"card csv-importer-panel"},o.a.createElement("h1",{className:"card-header main-heading",id:"custom-field-creator",onClick:function(){return toggle_func("custom-field-creator")}},"Create WP Custom Fields"," ",o.a.createElement("span",{className:"csv-icon-angle-down float-right"})),o.a.createElement("div",{className:"card-body",id:"custom-field-creator-body"},o.a.createElement("table",{className:"table table-mapping"},o.a.createElement("thead",null,o.a.createElement("tr",null,o.a.createElement("th",null,this.context.language.WPFIELDS),o.a.createElement("th",null,this.context.language.CSVHEADER),o.a.createElement("th",{className:"text-center"},this.context.language.Action))),o.a.createElement("tbody",null,0!=this.state.customFields.length?this.state.customFields.map((function(t,n){return o.a.createElement("tr",null,o.a.createElement("td",{style:{width:"40%"}},o.a.createElement("label",{className:"wpfields"},o.a.createElement("input",{type:"text",value:t.label,className:"form-control",onChange:function(t){e.onCustomFieldLabelChange(t.target.value,n)}})),o.a.createElement("label",{className:"sub-text"},"[Name: ".concat(t.name,"]")," ")),o.a.createElement("td",{style:{width:"40%",verticalAlign:"top"}},o.a.createElement(Dt.Droppable,{types:["csvheader"],onDrop:function(t){e.onCustomFieldValueChange.bind(e)("{".concat(t.csvheader,"}"),n,!1)}},o.a.createElement("input",{value:e.state.customFields[n].value,type:"text",name:"",id:"text_"+n,className:"form-control",onChange:function(t){e.onCustomFieldValueChange.bind(e)(t.target.value,n)}}))),o.a.createElement("td",{className:"action text-center"},o.a.createElement("a",{className:"action-icon","data-tip":"Delete",onClick:function(t){e.deleteCustomField(n)}},o.a.createElement("i",{className:"csv-icon-trash-2"})),o.a.createElement(he,{effect:"solid"})))})):o.a.createElement("tr",null,o.a.createElement("td",{colSpan:"3",className:"text-center border-bottom text-danger"},"No WP Custom Fields")))),o.a.createElement("div",{className:"float-right mb20 mt20"},o.a.createElement("a",{className:"smack-btn smack-btn-secondary",onClick:function(t){e.addCustomField()}},"Add Custom Field"))))):void 0,o.a.createElement("div",{className:"mt40"},o.a.createElement("div",{className:"col-md-12 text-center mt30"},this.context.isTemplate?o.a.createElement("div",null,o.a.createElement("label",null,"Update this mapping as"),o.a.createElement("input",{type:"text",className:"form-control ml10 d-inline w-25",onChange:function(t){e.context.setCSVInfo(tn(tn({},e.context.csvInfo),{},{templateName:t.target.value}))},value:this.context.csvInfo.templateName})):o.a.createElement("div",null,o.a.createElement("label",null,"Save this mapping as"),o.a.createElement("input",{type:"text",onChange:function(t){e.context.setCSVInfo(tn(tn({},e.context.csvInfo),{},{templateName:t.target.value}))},className:"form-control ml10 d-inline w-25",value:this.context.csvInfo.templateName}))),o.a.createElement("div",{className:"col-md-12 mt40 p0"},o.a.createElement("div",{className:"float-left"},o.a.createElement("button",{className:"smack-btn btn-default",onClick:function(){e.context.setShowComponent("upload-dashboard")}},"Back")),this.props.fromEditTemplate?o.a.createElement("div",{className:"float-right mb20"},o.a.createElement("button",{className:"smack-btn smack-btn-primary",onClick:this.sendMappedFields.bind(this)},"Save")):o.a.createElement("div",{className:"float-right mb20"},o.a.createElement("button",{className:"smack-btn smack-btn-primary",onClick:this.sendMappedFields.bind(this)},this.context.language.Continue)),o.a.createElement("div",{className:"clearfix"})))),o.a.createElement("div",{className:"col-md-4 "},o.a.createElement("div",{className:"mapping-sidebar",id:"mapping-sidebar"},o.a.createElement("table",{className:"mapping-sidebar-title"},o.a.createElement("tbody",null,o.a.createElement("tr",null,o.a.createElement("td",{className:"mapping-sidebar-arrow"},o.a.createElement("span",{className:"csv-icon-chevron-with-circle-left",onClick:function(t){e.state.initialRowSize--,e.state.initialRowSize>=1?e.getCsvFields(e.state.initialRowSize):e.state.initialRowSize++}})),o.a.createElement("td",{className:"mapping-sidebar-textbox-section"},o.a.createElement("strong",null,o.a.createElement("input",{id:"current_row",value:this.state.initialRowSize,type:"text",pattern:"[0-9]*",onChange:function(t){parseInt(t.target.value)>e.state.totalCsvRows?e.setState({initialRowSize:e.state.totalCsvRows},(function(){e.getCsvFields(e.state.initialRowSize)})):(e.setState({initialRowSize:t.target.value}),e.getCsvFields(e.state.initialRowSize))}}))," ",o.a.createElement("span",{className:"mapping-textbox-out-of"},"of",o.a.createElement("strong",null," ",n))),o.a.createElement("td",{className:"mapping-sidebar-arrow"},o.a.createElement("span",{className:"csv-icon-chevron-with-circle-right",onClick:function(t){e.state.initialRowSize++,e.state.initialRowSize<=e.state.totalCsvRows?e.getCsvFields(e.state.initialRowSize):e.state.initialRowSize--}}))))),o.a.createElement("div",{className:"uci_mapping"},o.a.createElement("table",{className:"table table-bordered",cellspacing:"10"},this.context.isXML?this.state.loading||0==this.state.xmlData.length?o.a.createElement("div",{className:"loader loader-1 mt15 text-center"}):this.state.xmlData.map((function(e,t){return o.a.createElement("tr",null,o.a.createElement("td",{style:{width:"40%"},title:e.node_path,className:"text-primary font-weight-bold"},o.a.createElement(Dt.Draggable,{type:"csvheader",data:e.node_path},e.name)),o.a.createElement("td",null,e.value))})):this.state.loading||0==this.csvInformation.length?o.a.createElement("div",{className:"loader loader-1 mt15 text-center"}):this.csvInformation.map((function(e,t){return o.a.createElement("tr",null,o.a.createElement("td",{style:{width:"40%"},className:"text-primary font-weight-bold"},o.a.createElement(Dt.Draggable,{type:"csvheader",data:e.csvHeaders},e.csvHeaders)),o.a.createElement("td",null,e.csvValues))}))))))))}}]),i}(r.Component);function on(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 an(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?on(Object(n),!0).forEach((function(t){M()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}M()(rn,"contextType",E);var ln=function(e){h()(r,e);var t,n=sn(r);function r(e){var t;return l()(this,r),(t=n.call(this,e)).state={loading:!1,zipCsvFileName:[],zipCsvUrls:[],zipSelectedFileUrl:""},t}return u()(r,[{key:"onFilePondProcess",value:function(e,t,n,o,a,i,s){var l=new FormData;l.append("csvFile",t,t.name),l.append("action","get_desktop");var c=new XMLHttpRequest;return c.open("POST",ajaxurl),c.upload.onprogress=function(e){i(e.lengthComputable,e.loaded,e.total)},c.onload=function(){if(c.status>=200&&c.status<300){o(JSON.parse(c.responseText));var e=JSON.parse(c.responseText);r.filePondResponse=e,r.filePondResponse.success?r.showRecord=!0:(r.showRecord=!1,D.toast.error(r.filePondResponse.message))}else a("oh no")},c.send(l),{abort:function(){c.abort(),s()}}}},{key:"onProcessFile",value:function(){if("csv"===r.filePondResponse.file_type||"xml"===r.filePondResponse.file_type||"txt"===r.filePondResponse.file_type)return this.context.setCSVInfo(an(an({},this.context.csvInfo),{},{hashKey:r.filePondResponse.hashkey,templateName:r.filePondResponse.filename.slice(0,-4),selectedtype:r.filePondResponse.selectedtype,fileName:r.filePondResponse.filename,connectionType:"desktop",postTypes:r.filePondResponse.posttype,fileSize:r.filePondResponse.file_size,fileType:r.filePondResponse.file_type})),"xml"===r.filePondResponse.file_type?this.context.setIsXML(!0):this.context.setIsXML(!1),void this.context.setShowComponent("csv-info");if("zip"===r.filePondResponse.file_type){for(var e=0;e<r.filePondResponse.info.length;e++)this.state.zipCsvFileName.push(r.filePondResponse.info[e].name),this.state.zipCsvUrls.push(r.filePondResponse.info[e].path);return this.context.setCSVInfo(an(an({},this.context.csvInfo),{},{connectionType:"desktop"})),void this.setState({zipCsvFileName:this.state.zipCsvFileName,zipCsvUrls:this.state.zipCsvUrls},(function(){document.getElementById("desk-csv-open").click()}))}}},{key:"onRemoveFile",value:function(){}},{key:"sendFileUrl",value:(t=y()(v.a.mark((function e(){var t,n,o;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","get_csv_url"),t.set("url",this.context.selectedFileUrl),this.setState({loading:!0}),e.prev=4,e.next=7,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 7:if(!(n=e.sent)||!n.data){e.next=14;break}if(200!=n.status||!n.data.success){e.next=14;break}return this.context.setCSVInfo(an(an({},this.context.csvInfo),{},(o={hashKey:n.data.hashkey,templateName:r.filePondResponse.filename.slice(0,-4),selectedtype:n.data.selectedtype},M()(o,"templateName","From-url"),M()(o,"postTypes",n.data.posttype),M()(o,"fileName",n.data.filename),M()(o,"fileType",n.data.file_type),M()(o,"fileSize",n.data.file_size),o))),document.getElementById("desk-csv-close").click(),this.context.setShowComponent("csv-info"),e.abrupt("return");case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),console.log(e.t0);case 19:case"end":return e.stop()}}),e,this,[[4,16]])}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this;return"csv-info"===this.context.showComponent?o.a.createElement(bt,null):"mapping-section"===this.context.showComponent?o.a.createElement(mt,null):"dragdrop-section"===this.context.showComponent?o.a.createElement(rn,null):"simple-import"===this.context.showComponent?o.a.createElement(wt,null):o.a.createElement("div",{className:"container"},o.a.createElement("div",{className:"row "},o.a.createElement("div",{className:"cardbanner col-md-8 mt25 ml25 border-rad"},o.a.createElement("div",{class:"col-md-9 ".concat(r.showRecord&&this.state.showImportRecord?"min":"")},o.a.createElement("div",{className:"tab-content",id:"v-pills-tabContent"},o.a.createElement("div",{className:"tab-pane fade show active",id:"v-pills-home",role:"tabpanel","aria-labelledby":"v-pills-home-tab",style:{height:"50%",width:"640px"}},o.a.createElement(ct.FilePond,{acceptedFileTypes:["text/csv/xml"].zip,allowMultiple:!1,maxFiles:1,server:{process:this.onFilePondProcess.bind(this)},onprocessfile:this.onProcessFile.bind(this),onremovefile:this.onRemoveFile.bind(this)}))),o.a.createElement("a",{href:"#",className:"smack-btn smack-btn-primary d-none",id:"desk-csv-open","data-toggle":"modal","data-target":"#upload_csv"},this.context.language.UploadedCSVFileLists),o.a.createElement("div",{id:"upload_csv",className:"modal fade payment_modal",role:"dialog"},o.a.createElement("div",{className:"modal-dialog modal-lg modal-dialog-centered"},o.a.createElement("div",{className:"modal-content"},o.a.createElement("div",{className:"modal-header"},o.a.createElement("button",{type:"button",id:"desk-csv-close",className:"close","data-dismiss":"modal"},"×")),o.a.createElement("div",{className:"modal-body my-2"},o.a.createElement("ul",null,this.state.zipCsvFileName.map((function(t,n){return o.a.createElement("li",null,o.a.createElement("div",{className:"form-check form-check-inline"},o.a.createElement("label",{class:"form-check-label"},o.a.createElement("input",{className:"form-check-input",onClick:function(t){t.target.checked&&e.context.setSelectedFileUrl(e.state.zipCsvUrls[n])},type:"radio",name:"post-item",id:""})," ",t)))}))),o.a.createElement("div",{className:"float-right"},o.a.createElement("input",{type:"button",className:"smack-btn smack-btn-primary mb20",onClick:this.sendFileUrl.bind(this),value:"Choose CSV File"})))))))),o.a.createElement("div",{className:"cardbanner col-md-3 mt20 ml25 border-rad"},o.a.createElement("div",{className:"mt0 mb10 mr10 ml10"},o.a.createElement("h2",{className:"title"},"Ultimate CSV Importer Pro"),o.a.createElement("hr",{className:"divider"}),o.a.createElement("ul",null,o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," Update older posts from single import"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," Auto Schedule with reusable templates"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," Advanced Custom Field/Post Plugins Importer"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," AIO WooCommerce Import Suit"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," WPML Importer"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," SEO Plugins Data Importer"),o.a.createElement("li",{className:"ml15",style:{listStyle:"disc"}}," Exporter with advanced filters")),o.a.createElement("a",{className:"basic-button mt5 border-rad",href:"https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=plugin&utm_campaign=promo_widget&utm_medium=pro_edition",target:"blank"},"Buy NOW!")))))}}]),r}(r.Component);M()(ln,"contextType",E);var cn=n(60),un=n.n(cn),dn=function(){var e=Object(r.useState)(!1),t=un()(e,2),n=t[0],a=t[1],i=Object(r.useState)(!1),s=un()(i,2),l=s[0],c=s[1],u=Object(r.useState)(!1),d=un()(u,2),h=d[0],p=d[1];function f(){return(f=y()(v.a.mark((function e(){var t,n,r;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","active_addons"),e.prev=2,e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:n=e.sent,r=n.data,a(r.exporter),p(r.woocommerce),c(r.users),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),console.log(e.t0);case 15:case"end":return e.stop()}}),e,null,[[2,12]])})))).apply(this,arguments)}return Object(r.useEffect)((function(){!function(){f.apply(this,arguments)}()}),[]),o.a.createElement("div",{className:"container"},o.a.createElement("div",{className:"card csv-importer-panel mt20"},o.a.createElement("div",{className:"col-md-12 pt50 pb50"},o.a.createElement("div",{class:"row justify-content-center"},o.a.createElement("div",{class:"csv-addon-box import-woocommerce"},o.a.createElement("div",{className:"addon-header"},o.a.createElement("h2",null,"import woocommerce"),o.a.createElement("p",null,"Import any bulk WooCommerce Products data in CSV")),o.a.createElement("div",{class:"sub_fields"},o.a.createElement("div",{class:"sub_field"},o.a.createElement("h3",null,"Highlights"),o.a.createElement("ul",null,o.a.createElement("li",null,"Product Types simple, grouped, variable, external type import."),o.a.createElement("li",null,"Featured Product Import from URL"),o.a.createElement("li",null,"Gallery image import"),o.a.createElement("li",null,"Duplicate detection"))),o.a.createElement("div",{class:"sub_field"},o.a.createElement("h3",null,"File Type"),o.a.createElement("ul",null,o.a.createElement("li",null,"Supports UTF-8 CSV file")))),h?o.a.createElement("h5",null,"Already Installed"):o.a.createElement("a",{href:"https://wordpress.org/plugins/import-woocommerce/",target:"_blank",class:"smack-btn btn-install btn-block"},"Install")),o.a.createElement("div",{class:"csv-addon-box import-users"},o.a.createElement("div",{className:"addon-header"},o.a.createElement("h2",null,"Import Users"),o.a.createElement("p",null,"Import User info into WordPress in bulk.")),o.a.createElement("div",{class:"sub_fields"},o.a.createElement("div",{class:"sub_field"},o.a.createElement("h3",null,"Highlights"),o.a.createElement("ul",null,o.a.createElement("li",null,"WP-Members add-on support"),o.a.createElement("li",null,"Default custom fields import"),o.a.createElement("li",null,"Sends automated password notification email(optional)"))),o.a.createElement("div",{class:"sub_field"},o.a.createElement("h3",null,"File Type"),o.a.createElement("ul",null,o.a.createElement("li",null,"Supports UTF-8 CSV file")))),l?o.a.createElement("h5",null,"Already Installed"):o.a.createElement("a",{href:"https://wordpress.org/plugins/import-users/",target:"_blank",class:"smack-btn btn-install btn-block"},"Install")),o.a.createElement("div",{class:"csv-addon-box ultimate-exporter"},o.a.createElement("div",{className:"addon-header"},o.a.createElement("h2",null,"Wp Ultimate Exporter"),o.a.createElement("p",null,"Export all your WordPress data as CSV file for backup.")),o.a.createElement("div",{class:"sub_fields"},o.a.createElement("div",{class:"sub_field"},o.a.createElement("h3",null,"Highlights"),o.a.createElement("ul",null,o.a.createElement("li",null,"Support Post, Page & Custom Post"),o.a.createElement("li",null,"Supports default custom fields"),o.a.createElement("li",null,"Filtered export based on period of time & authors"))),o.a.createElement("div",{class:"sub_field"},o.a.createElement("h3",null,"File Type"),o.a.createElement("ul",null,o.a.createElement("li",null,"UTF-8 encoded CSV file")))),n?o.a.createElement("h5",null,"Already Installed"):o.a.createElement("a",{href:"https://wordpress.org/plugins/wp-ultimate-exporter/",target:"_blank",class:"smack-btn btn-install btn-block"},"Install"))))))},hn=n(33);function pn(e,t){void 0===t&&(t={});var n=function(e){if(e&&"j"===e[0]&&":"===e[1])return e.substr(2);return e}(e);if(function(e,t){return void 0===t&&(t=!e||"{"!==e[0]&&"["!==e[0]&&'"'!==e[0]),!t}(n,t.doNotParse))try{return JSON.parse(n)}catch(e){}return e}var fn=n(61),mn=function(){function e(e){this.changeListeners=[],this.TESTING_ONETWO=2,this.cookies=function(e){return"string"==typeof e?hn.parse(e):"object"==typeof e&&null!==e?e:{}}(e),this.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie}return e.prototype._updateBrowserValues=function(){this.HAS_DOCUMENT_COOKIE&&(this.cookies=hn.parse(document.cookie))},e.prototype._emitChange=function(e){for(var t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)},e.prototype.get=function(e,t){return void 0===t&&(t={}),this._updateBrowserValues(),pn(this.cookies[e],t)},e.prototype.getAll=function(e){void 0===e&&(e={}),this._updateBrowserValues();var t={};for(var n in this.cookies)t[n]=pn(this.cookies[n],e);return t},e.prototype.set=function(e,t,n){var r;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=fn({},this.cookies,((r={})[e]=t,r)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=hn.serialize(e,t,n)),this._emitChange({name:e,value:t,options:n})},e.prototype.remove=function(e,t){var n=t=fn({},t,{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=fn({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=hn.serialize(e,"",n)),this._emitChange({name:e,value:void 0,options:t})},e.prototype.addChangeListener=function(e){this.changeListeners.push(e)},e.prototype.removeChangeListener=function(e){var t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)},e}();function gn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var _n=function(e){h()(i,e);var t,n,r,a=gn(i);function i(){var e;l()(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=a.call.apply(a,[this].concat(n)),M()(k()(e),"state",{showMaintenanceMode:!1,selectedTab:"import-update",activateExporter:!1}),e}return u()(i,[{key:"componentDidMount",value:function(){console.log("Simple Mode Active",this.context.simpleModeSelection),console.log("Advanced Mode Active",this.context.advancedModeSelection),console.log("Context in which component",this.context.showComponent),this.context.setSelectedTabOnCookies("import-update"),this.checkRTLSupport(),this.checkExporterEnable(),this.checkMaintenanceMode();var e=new mn;if(e.get("selectedTab")||e.set("selectedTab","import-update",{path:"/"}),this.setState({selectedTab:e.get("selectedTab")}),!window.wpr_object.file)return window.wpr_object?(window.wpr_object.file=vn,this.context.setLanguage(window.wpr_object.file),void this.forceUpdate()):void(window.wpr_object={file:vn});this.context.setLanguage(JSON.parse(window.wpr_object.file)),this.forceUpdate()}},{key:"checkRTLSupport",value:function(){document.querySelector("html").getAttribute("dir")&&document.querySelector(".wp-ultimate-csv-importer").classList.add("rtl")}},{key:"checkExporterEnable",value:(r=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","check_export"),e.next=4,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 4:n=e.sent,this.context.setActivateExporter(n.data.success);case 6:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"checkMaintenanceMode",value:(n=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","checkmain_mode"),e.next=4,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 4:if(!(n=e.sent)||!n.data){e.next=10;break}if(200!=n.status||!n.data.success){e.next=10;break}return this.setState({showMaintenanceMode:!0}),this.context.setMaintenanceMode(!0),e.abrupt("return");case 10:this.setState({showMaintenanceMode:!1}),this.context.setMaintenanceMode(!1);case 12:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"disableMaintenanceMode",value:(t=y()(v.a.mark((function e(){var t;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","settings_options"),t.set("option","enable_main_mode"),t.set("value",!1),e.next=6,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 6:e.sent.data.success&&(this.context.setMaintenanceMode(!1),location.reload());case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this;return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:" container"},o.a.createElement("div",{className:"row tab-section justify-content-center"},o.a.createElement("ul",{class:"tabs col-sm-12 col-md-12"},o.a.createElement("li",{className:"tab-list col col-xs-6 ".concat("dashboard"===this.state.selectedTab?"active":""),onClick:function(){return e.setState({selectedTab:"dashboard"})}},this.context.language.Dashboard),o.a.createElement("li",{className:"tab-list col col-xs-6 ".concat("import-update"===this.state.selectedTab?"active":""),onClick:function(){return e.setState({selectedTab:"import-update"})}},this.context.language.ImportUpdate),o.a.createElement("li",{className:"tab-list col col-xs-6 ".concat("manager"===this.state.selectedTab?"active":""),onClick:function(){return e.setState({selectedTab:"manager"})}},this.context.language.Manager),o.a.createElement("li",{className:"tab-list col col-xs-6 ".concat("export"===this.state.selectedTab?"active":""),onClick:function(){e.setState({selectedTab:"export"})}},this.context.language.Export),o.a.createElement("li",{className:"tab-list col col-xs-6 ".concat("settings"===this.state.selectedTab?"active":""),onClick:function(){return e.setState({selectedTab:"settings"})}},this.context.language.Settings),o.a.createElement("li",{className:"tab-list col col-xs-6 ".concat("addons"===this.state.selectedTab?"active":""),onClick:function(){return e.setState({selectedTab:"addons"})}},"Addons"),o.a.createElement("li",{className:"tab-list col col-xs-6 ".concat("support"===this.state.selectedTab?"active":""),onClick:function(){return e.setState({selectedTab:"support"})}},this.context.language.Support)))),o.a.createElement("div",{className:"container"},o.a.createElement("div",{className:"float-right"},o.a.createElement("ul",{className:"d-flex mb-0"},o.a.createElement("li",null,o.a.createElement("a",{className:"csv-link",href:"https://goo.gl/jdPMW8",target:"_blank"},"Documentation")),o.a.createElement("li",{className:"ml-4"},o.a.createElement("a",{className:"csv-link",href:"https://goo.gl/fKvDxH",target:"_blank"},"Sample CSV")))),"import-update"===this.state.selectedTab&&"upload-dashboard"===this.context.showComponent?o.a.createElement("div",{className:"col-md-8",style:{marginLeft:"179px"}},o.a.createElement("ul",{className:"mapping-switcher",style:{marginLeft:"-150px"}},o.a.createElement("li",{className:"".concat(this.context.simpleModeSelection?"active":""),onClick:function(t){e.context.setSimpleModeSelection(!0),e.context.setAdvancedModeSelection(!1)}},this.context.language.SIMPLEMODE),o.a.createElement("li",{className:"".concat(this.context.advancedModeSelection?"active":""),onClick:function(t){e.context.setAdvancedModeSelection(!0),e.context.setSimpleModeSelection(!1)}},this.context.language.ADVANCEDMODE))):"",o.a.createElement("div",{className:"clearfix"})),this.state.showMaintenanceMode?o.a.createElement("div",{className:"container"},o.a.createElement("div",{className:"maintenance-mode"},o.a.createElement("span",null,o.a.createElement("img",{src:"".concat(window.wpr_object.imagePath,"alert.png")})),"maintenance mode is enabled"," ",o.a.createElement("button",{type:"button",class:"csv-link",onClick:function(){return e.disableMaintenanceMode()}},"Disable"))):"",this.context.simpleModeSelection&&"import-update"===this.state.selectedTab?o.a.createElement(ln,null):this.context.advancedModeSelection&&"import-update"===this.state.selectedTab?o.a.createElement($t,null):"manager"===this.state.selectedTab?o.a.createElement(ye,null):"export"===this.state.selectedTab?o.a.createElement(Ne,null):"addons"===this.state.selectedTab?o.a.createElement(dn,null):"settings"===this.state.selectedTab?o.a.createElement(We,null):"support"===this.state.selectedTab?o.a.createElement(ot,null):"dashboard"===this.state.selectedTab?o.a.createElement(lt,null):"")}}]),i}(r.Component);M()(_n,"contextType",E);var vn={ImportUpdate:"Import / Update",Dashboard:"Dashboard",Manager:"Manager",Export:"Export",Settings:"Settings",Media:"Media",Support:"Support",UploadfromDesktop:"Upload from Desktop",UploadfromFTPSFTP:"Upload from FTP / SFTP",UploadfromURL:"Upload from URL",ChoosFileintheServer:"Choose File in the Server","Drag&Dropyourfilesor":"Drag & Drop your files or",Browse:"Browse",NewItem:"New Item",ExistingItems:"Existing Items",ImportEachRecordAs:"Importa each record as",Continue:"Continue",Search:"Search",FromDate:"From Date",ToDate:"To Date",SEARCH:"SEARCH",SavedTemplate:"Saved Template",TEMPLATES:"TEMPLATES NAME",MATCHEDCOLUMNSCOUNT:"MATCHED COLUMNS COUNT",MODULE:"MODULE",CREATEDTIME:"CREATED TIME",ACTION:"ACTION",USETEMPLATE:"USE TEMPLATE",CREATENEWMAPPING:"CREATE NEW MAPPING",BACK:"BACK",ADVANCEDMODE:"ADVANCED MODE",DRAGDROPMODE:"DRAG & DROP MODE",WordpressFields:"Wordpress Fields",WPFIELDS:"WP Fields",CSVHEADER:"CSV Header",Action:"Action",Name:"Name",HINT:"HINT",Example:"Example",WordPressCoreFields:"WordPress Core Fields",ACFFreeFields:"ACF Free Fields",ACFFields:"ACF Fields",ACFGroupFields:"ACF Group Fields",ACFProFields:"ACF Pro Fields",ACFRepeaterFields:"ACF Repeater Fields",TypesCustomFields:"Types Custom Fields",PodsFields:"Pods Fields",JetEngineFields:"Jet Engine Fields",JetEngineRFFields:"Jet Engine RF Fields",JetEngineCPTFields:"Jet Engine CPT Fields",JetEngineCPTRFFields:"Jet Engine CPT RF Fields",JetEngineTaxonomyFields:"Jet Engine Taxonomy Fields",JetEngineTaxonomyRFFields:"Jet Engine Taxonomy RF Fields",JetEngineRelationsFields:"Jet Engine Relations Fields",CustomFieldSuite:"Custom Field Suite",AllInOneSeoFields:"All In One Seo Fields",YoastSeoFields:"Yoast Seo Fields",BillingAndShippingInformation:"Billing and Shipping Information",CustomFieldsWPMemberFields:"Custom Fields WP Member Fields",CustomFieldsMemberFields:"Custom Fields Member Fields",ProductMetaFields:"Product Meta Fields",ProductBundleMetaFields:"Product Bundle Meta Fields",OrderMetaFields:"Order Meta Fields",CouponMetaFields:"Coupon Meta Fields",RefundMetaFields:"Refund Meta Fields",WPECommerceCustomFields:"WP ECommerce Custom Fields",EventsManagerFields:"Events Manager Fields",WPMLFields:"WPML Fields",CMB2CustomFields:"CMB2 Custom Fields",WordPressCustomFields:"WordPress Custom Fields",TermsandTaxonomies:"Terms and Taxonomies",IsSerialized:"Is Serialized",NoCustomFieldsFound:"No Custom Fields Found",MediaUploadFields:"Media Upload Fields",UploadMedia:"Upload Media",UploadedListofFiles:"Uploaded List of Files",UploadedMediaFileLists:"Uploaded Media File Lists",SavethismappingasTemplate:"Save this mapping as Template",Save:"Save",Doyouneedtoupdatethecurrentmapping:"Do you need to update the current mapping ?",Savethecurrentmappingasnewtemplate:"Save the current mapping as new template",Back:"Back",Size:"Size",MediaHandling:"Featured Image Media Handling",Downloadexternalimagestoyourmedia:"Download external images to your media",ImageHandling:"Image Handling",Usemediaimagesifalreadyavailable:"Use media images if already available",Doyouwanttooverwritetheexistingimages:"Do you want to overwrite the existing images",ImageSizes:"Image Sizes",Thumbnail:"Thumbnail",Medium:"Medium",MediumLarge:"Medium Large",Large:"Large",Custom:"Custom",Slug:"Slug",Width:"Width",Height:"Height",Addcustomsizes:"Add custom sizes",MediaSEOAdvancedOptions:"Media SEO & Advanced Options",SetimageTitle:"Set image Title",SetimageCaption:"Set image Caption",SetimageAltText:"Set image Alt Text",SetimageDescription:"Set image Description",Changeimagefilenameto:"Change image file name to",ImportconfigurationSection:"Import configuration Section",EnablesafeprestateRollback:"Enable safe prestate Rollback",Backupbeforeimport:"Backup before import",DoyouwanttoSWITCHONMaintenancemodewhileimport:"Do you want to SWITCH ON Maintenance mode while import",Doyouwanttohandletheduplicateonexistingrecords:"Do you want to handle the duplicate on existing records",Mentionthefieldswhichyouwanttohandleduplicates:"Mention the fields which you want to handle duplicates",DoyouwanttoUpdateanexistingrecords:"Do you want to Update an existing records",Updaterecordsbasedon:"Update records based on",DoyouwanttoSchedulethisImport:"Do you want to Schedule this Import",ScheduleDate:"Schedule Date",ScheduleFrequency:"Schedule Frequency",TimeZone:"Time Zone",ScheduleTime:"Schedule Time",Schedule:"Schedule",Import:"Import",Format:"Format",OneTime:"OneTime",Daily:"Daily",Weekly:"Weekly",Monthly:"Monthly",Hourly:"Hourly",Every30mins:"Every 30 mins",Every15mins:"Every 15 mins",Every10mins:"Every 10 mins",Every5mins:"Every 5 mins",FileName:"File Name",FileSize:"File Size",Process:"Process",Totalnoofrecords:"Total no of records",CurrentProcessingRecord:"Current Processing Record",RemainingRecord:"Remaining Record",Completed:"Completed",TimeElapsed:"Time Elapsed",approximate:"approximate",DownloadLog:"Download Log",NoRecord:"No Record",UploadedCSVFileLists:"Uploaded CSV File Lists",Hostname:"Host Name",HostPort:"Host Port",HostUsername:"Host Username",HostPassword:"HostPassword",HostPath:"HostPath",DefaultPort:"Default Port",FTPUsername:"FTP Username",FTPPassword:"FTP Password",ConnectionType:"Connection Type",ImportersActivity:"Importers Activity",ImportStatistics:"Import Statistics",FileManager:"File Manager",SmartSchedule:"Smart Schedule",ScheduledExport:"Scheduled Export",Templates:"Templates",LogManager:"Log Manager",NotSelectedAnyTab:"Not Selected Any Tab",EventInfo:"Event Info",EventDate:"Event Date",EventStatus:"Event Status",Actions:"Actions",Date:"Date",Purpose:"Purpose",Revision:"Revision",Select:"Select",Inserted:"Inserted",Updated:"Updated",Skipped:"Skipped",Noeventsfound:"No events found",ScheduleInfo:"Schedule Info",ScheduledDate:"Scheduled Date",ScheduledTime:"Scheduled Time",Youhavenotscheduledanyevent:"You haven’t scheduled any event",Frequency:"Frequency",Time:"Time",EditSchedule:"Edit Schedule",SaveChanges:"Save Changes",TemplateInfo:"Template Info",TemplateName:"Template Name",Module:"Module",CreatedTime:"Created Time",NoTemplateFound:"No Template Found",Download:"Download",NoLogRecordFound:"No Log Record Found",GeneralSettings:"General Settings",DatabaseOptimization:"Database Optimization",SecurityandPerformance:"Security and Performance",Documentation:"Documentation",MediaReport:"Media Report",DropTable:"Drop Table",Ifenabledplugindeactivationwillremoveplugindatathiscannotberestored:"If enabled plugin deactivation will remove plugin data, this cannot be restored.",Scheduledlogmails:"Scheduled log mails",Enabletogetscheduledlogmails:"Enable to get scheduled log mails.",Sendpasswordtouser:"Send password to user",Enabletosendpasswordinformationthroughemail:"Enable to send password information through email.",WoocommerceCustomattribute:"Woocommerce Custom attribute",Enablestoregisterwoocommercecustomattribute:"Enables to register woocommerce custom attribute.",PleasemakesurethatyoutakenecessarybackupbeforeproceedingwithdatabaseoptimizationThedatalostcantbereverted:"Please make sure that you take necessary backup before proceeding with database optimization. The data lost cannot be reverted.",DeleteallorphanedPostPageMeta:"Delete all orphaned Post/Page Meta",Deleteallunassignedtags:"Delete all unassigned tags",DeletedatafromWordPress:"Delete data from WordPress",EnabletodeletetheitemsnotpresentinCSVXMLfile:"Enable to delete the items not present in CSV/XML file",DeleteallPostPagerevisions:"Delete all Post/Page revisions",DeleteallautodraftedPostPage:"Delete all auto drafted Post/Page",DeleteallPostPageintrash:"Delete all Post/Page in trash",DeleteallCommentsintrash:"Delete all Comments in trash",DeleteallUnapprovedComments:"Delete all Unapproved Comments",DeleteallPingbackComments:"Delete all Pingback Comments",DeleteallTrackbackComments:"Delete all Trackback Comments",DeleteallSpamComments:"Delete all Spam Comments",RunDBOptimizer:"Run DB Optimizer",DatabaseOptimizationLog:"Database Optimization Log",noofOrphanedPostPagemetahasbeenremoved:"no of Orphaned Post/Page meta has been removed.",noofUnassignedtagshasbeenremoved:"no of Unassigned tags has been removed.",noofPostPagerevisionhasbeenremoved:"no of Post/Page revisions has been removed.",noofAutodraftedPostPagehasbeenremoved:"no of Auto drafted Post/Page has been removed.",noofPostPageintrashhasbeenremoved:"no of Post/Page in trash has been removed.",noofSpamcommentshasbeenremoved:"no of Spam comments has been removed.",noofCommentsintrashhasbeenremoved:"no of Comments in trash has been removed.",noofUnapprovedcommentshasbeenremoved:"no of Unapproved comments has been removed.",noofPingbackcommentshasbeenremoved:"no of Pingback comments has been removed.",noofTrackbackcommentshasbeenremoved:"no of Trackback comments has been removed.",Allowauthorseditorstoimport:"Allow authors/editors to import",Thisenablesauthorseditorstoimport:"This enables authors/editors to import.",MinimumrequiredphpinivaluesIniconfiguredvalues:"Minimum required php.ini values (Ini configured values)",Variables:"Variables",SystemValues:"System Values",MinimumRequirements:"Minimum Requirements",RequiredtoenabledisableLoadersExtentionsandmodules:"Required to enable/disable Loaders, Extentions and modules:",DebugInformation:"Debug Information:",SmackcodersGuidelines:"Smackcoders Guidelines",DevelopmentNews:"Development News",WhatsNew:"Whats New?",YoutubeChannel:"Youtube Channel",OtherWordPressPlugins:"Other WordPress Plugins",Count:"Count",ImageType:"Image Type",Status:"Status",Loading:"Loading",LoveWPUltimateCSVImporterGivea5starreviewon:"Love WP Ultimate CSV Importer, Give a 5 star review on",ContactSupport:"Contact Support",Email:"Email",Supporttype:"Support type",BugReporting:"Bug Reporting",FeatureEnhancement:"Feature Enhancement",Message:"Message",Send:"Send",NewsletterSubscription:"Newsletter Subscription",Subscribe:"Subscribe",Note:"Note",SubscribetoSmackcodersMailinglistafewmessagesayear:"Subscribe to Smackcoders Mailing list (a few messages a year)",Pleasedraftamailto:"Please draft a mail to",Ifyoudoesnotgetanyacknowledgementwithinanhour:"If you does not get any acknowledgement within an hour!",Selectyourmoduletoexportthedata:"Select your Module to Export Data",Toexportdatabasedonthefilters:"To export data based on the filters",ExportFileName:"Export File Name",AdvancedSettings:"Advanced Settings",ExportType:"Export Type",SplittheRecord:"Split the Record",AdvancedFilters:"Advanced Filters",Exportdatawithautodelimiters:"Export data with auto delimiters",Delimiters:"Delimiters",OtherDelimiters:"Other Delimiters",Exportdataforthespecificperiod:"Export data for the specific period",StartFrom:"Start From",EndTo:"End To",Exportdatawiththespecificstatus:"Export data with the specific status",All:"All",Publish:"Publish",Sticky:"Sticky",Private:"Private",Protected:"Protected",Draft:"Draft",Pending:"Pending",Exportdatabyspecificauthors:"Export data by specific authors",Authors:"Authors",ExportdatabasedonspecificInclusions:"Export data based on specific Inclusions",DoyouwanttoSchedulethisExport:"Do you want to Schedule this Export",SelectTimeZone:"Select TimeZone",ScheduleExport:"Schedule Export",DataExported:"Data Exported"};function bn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var yn=function(e){h()(n,e);var t=bn(n);function n(){return l()(this,n),t.apply(this,arguments)}return u()(n,[{key:"render",value:function(){return o.a.createElement(_n,null)}}]),n}(r.Component);function wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var kn=function(e){h()(n,e);var t=wn(n);function n(e){return l()(this,n),t.call(this,e)}return u()(n,[{key:"render",value:function(){return o.a.createElement(yn,null)}}]),n}(r.Component);function xn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var Mn=function(e){h()(n,e);var t=xn(n);function n(){var e,r;l()(this,n);for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),M()(k()(r),"state",(e={fileUrl:"",hostName:"",hostPort:"",hostUserName:"",hostPassword:"",hostPath:"",connectionType:"",selectedTab:"",mediaHandleCheckboxState:!1,activateMappingSection:!1,activateDragAndDropSection:!1,activateXmlFileMappingSection:!1,wordPressCoreFields:[],showWordPressDefaultCoreFieldsState:!1,acfGroupFields:[],showAcfGroupFieldsState:!1,acfProFields:[],showAcfProFieldsState:!1,acfRepeaterFields:[],showAcfRepeaterFieldsState:!1,termsAndTaxonomiesFields:[],showTermsAndTaxonomiesState:!1,typesFields:[],showTypesFieldsState:!1,podsFields:[],showPodsFieldsState:!1,jetEngineFields:[],showJetEngineFieldsState:!1,jetEngineRFFields:[],showJetEngineRFFieldsState:!1,jetEngineCPTFields:[],showJetEngineCPTFieldsState:!1,jetEngineCPTRFFields:[],showJetEngineCPTRFFieldsState:!1,jetEngineTaxonomyFields:[],showJetEngineTaxonomyFieldsState:!1,jetEngineTaxonomyRFFields:[],showJetEngineTaxonomyRFFieldsState:!1,jetEngineRelationsFields:[],showJetEngineRelationsFieldsState:!1},M()(e,"showJetEngineFieldsState",!1),M()(e,"customFieldSuiteFields",[]),M()(e,"showCustomFieldSuiteState",!1),M()(e,"allInOneSeoFields",[]),M()(e,"showAllInOneSeoFieldsState",!1),M()(e,"billingAndShippingInformation",[]),M()(e,"showBillingAndShippingInformationState",!1),M()(e,"wordPressCustomFields",[]),M()(e,"wordPressUserCustomFields",[]),M()(e,"wordPressUserCustomFieldsLabel",[]),M()(e,"showWordPressCustomFieldsState",!1),M()(e,"customFieldsWpMembersFields",[]),M()(e,"showCustomFieldsWpMembersState",!1),M()(e,"customFieldsMembersFields",[]),M()(e,"showCustomFieldsMembersState",!1),M()(e,"productMetaFields",[]),M()(e,"showProductMetaFieldsState",!1),M()(e,"productBundleMetaFields",[]),M()(e,"showProductBundleMetaFieldsState",!1),M()(e,"orderMetaFields",[]),M()(e,"showOrderMetaFieldsState",!1),M()(e,"wpEcomCustomFields",[]),M()(e,"showWpEcomCustomFieldsState",!1),M()(e,"eventsManagerFields",[]),M()(e,"showEventsManagerFieldsState",!1),M()(e,"acfFreeFields",[]),M()(e,"showAcfFreeFieldsState",!1),M()(e,"cmb2CustomFields",[]),M()(e,"showCmb2CustomFieldsState",!1),M()(e,"wpmlCustomFields",[]),M()(e,"showWPMLCustomFields",!1),M()(e,"termsAndTaxonomiesFields",[]),M()(e,"csvHeaderFields",[]),M()(e,"fileName",""),M()(e,"templateName",""),M()(e,"saveTemplateNames",""),M()(e,"editTemplateName",""),M()(e,"selectedTemplateNameInManagerSection",""),M()(e,"selectedModuleNameInManagerSection",""),M()(e,"editedTemplateNameInManagerSection",""),M()(e,"hashKey",""),M()(e,"selectedType",""),M()(e,"csvFileNames",[]),M()(e,"csvFileUrls",[]),M()(e,"csvFileServer",[]),M()(e,"selectedFileUrlsState",!1),M()(e,"selectedFileUrl",""),M()(e,"selectedFileServer",""),M()(e,"saveSelectedMappedFields",[]),M()(e,"activateMediaHandlingSection",!1),M()(e,"activateDashboard",!0),M()(e,"fromMediaHandlingState",!1),M()(e,"activateExportDataFilter",!1),M()(e,"activateExportDownloadOptionSection",!1),M()(e,"activateImportConfigurationSection",!1),M()(e,"activateSaveMappingTemplateSection",!1),M()(e,"activateProgressDisplaySection",!1),M()(e,"activateUseExistingMappingState",!1),M()(e,"activateCreateNewMappingState",!1),M()(e,"activateTemplateSectionState",!1),M()(e,"fromSaveMappingSection",!1),M()(e,"fromTemplateMappingSection",!1),M()(e,"fromDragAndDropSection",!1),M()(e,"activateLargeState",!1),M()(e,"mode","Insert"),M()(e,"exportModule",""),M()(e,"optionalType",""),M()(e,"templateNameArray",[]),M()(e,"modulesNameArray",[]),M()(e,"createdTimeArray",[]),M()(e,"matchedCountsArray",[]),M()(e,"activateUseAlreadyMediaImageState",!1),M()(e,"activateOverwriteExistingImageState",!1),M()(e,"activateThumbnailState",!1),M()(e,"activateMediumState",!1),M()(e,"activateMediumLargeState",!1),M()(e,"activateCustomState",!1),M()(e,"mediaImageTitle",""),M()(e,"mediaImageCaption",""),M()(e,"mediaImageAltText",""),M()(e,"mediaImageDescription",""),M()(e,"mediaImageFileName",""),M()(e,"updateFields",[]),M()(e,"duplicateHandleField",""),M()(e,"countryLists",[]),M()(e,"timeZones",[]),M()(e,"selectedCountryTime",""),M()(e,"receivedExportedFilePath",""),M()(e,"importLogDataLink",""),M()(e,"rollBackMode",!1),M()(e,"maintenanceMode",!1),M()(e,"loaderText",o.a.createElement("div",{className:"btn ajax-loader loading"},"Please Wait")),M()(e,"totalCustomFields",[]),M()(e,"totalRows",0),M()(e,"translateLanguage",{}),M()(e,"uploadedFileType",""),M()(e,"receivedExportedFileUrl",""),M()(e,"setFileUrl",(function(e){r.setState({fileUrl:e})})),M()(e,"setHostName",(function(e){r.setState({hostName:e})})),M()(e,"setHostPort",(function(e){r.setState({hostPort:e})})),M()(e,"setHostUserName",(function(e){r.setState({hostUserName:e})})),M()(e,"setHostPassword",(function(e){r.setState({hostPassword:e})})),M()(e,"setHostPath",(function(e){r.setState({hostPath:e})})),M()(e,"selectedConnectionType",(function(e){r.setState({connectionType:e})})),M()(e,"setSelectedTab",(function(e){r.setState({selectedTab:e})})),M()(e,"setSelectedTabCookies",(function(e){(new mn).set("selectedTab",e,{path:"/"})})),M()(e,"changeActivateMappingSectionState",(function(e){r.setState({activateMappingSection:e})})),M()(e,"changeMediaHandleCheckboxState",(function(e){r.setState({mediaHandleCheckboxState:e})})),M()(e,"changeActivateDragAndDropSectionState",(function(e){r.setState({activateDragAndDropSection:e})})),M()(e,"changeActivateXmlFileMappingSectionState",(function(e){r.setState({activateXmlFileMappingSection:e})})),M()(e,"setWordPressDefaultCoreFields",(function(e){r.setState({wordPressCoreFields:e})})),M()(e,"showWordPressDefaultCoreFields",(function(e){r.setState({showWordPressDefaultCoreFieldsState:e})})),M()(e,"setAcfFreeFields",(function(e){r.setState({acfFreeFields:e})})),M()(e,"showAcfFreeFields",(function(e){r.setState({showAcfFreeFieldsState:e})})),M()(e,"setAcfGroupFields",(function(e){r.setState({acfGroupFields:e})})),M()(e,"showAcfGroupFields",(function(e){r.setState({showAcfGroupFieldsState:e})})),M()(e,"setAcfProFields",(function(e){r.setState({acfProFields:e})})),M()(e,"showAcfProFields",(function(e){r.setState({showAcfProFieldsState:e})})),M()(e,"setAcfRepeaterFields",(function(e){r.setState({acfRepeaterFields:e})})),M()(e,"showAcfRepeaterFields",(function(e){r.setState({showAcfRepeaterFieldsState:e})})),M()(e,"setTermsAndTaxonomies",(function(e){r.setState({termsAndTaxonomiesFields:e})})),M()(e,"showTermsAndTaxonomies",(function(e){r.setState({showTermsAndTaxonomiesState:e})})),M()(e,"setTypesFields",(function(e){r.setState({typesFields:e})})),M()(e,"showTypesFields",(function(e){r.setState({showTypesFieldsState:e})})),M()(e,"setPodsFields",(function(e){r.setState({podsFields:e})})),M()(e,"showPodsFields",(function(e){r.setState({showPodsFieldsState:e})})),M()(e,"setJetEngineFields",(function(e){r.setState({jetEngineRFFields:e})})),M()(e,"showJetEngineRFFieldsState",(function(e){r.setState({showJetEngineRFFieldsState:e})})),M()(e,"setJetEngineCPTFields",(function(e){r.setState({jetEngineCPTFields:e})})),M()(e,"showJetEngineCPTFieldsState",(function(e){r.setState({showJetEngineCPTFieldsState:e})})),M()(e,"setJetEngineCPTFields",(function(e){r.setState({jetEngineCPTRFFields:e})})),M()(e,"showJetEngineCPTRFFieldsState",(function(e){r.setState({showJetEngineCPTRFFieldsState:e})})),M()(e,"setJetEngineTaxonomyFields",(function(e){r.setState({jetEngineTaxonomyFields:e})})),M()(e,"showJetEngineTaxonomyFieldsState",(function(e){r.setState({showJetEngineTaxonomyFieldsState:e})})),M()(e,"setJetEngineCPTFields",(function(e){r.setState({jetEngineTaxonomyRFFields:e})})),M()(e,"showJetEngineTaxonomyRFFieldsState",(function(e){r.setState({showJetEngineTaxonomyRFFieldsState:e})})),M()(e,"setJetEngineRelationsFields",(function(e){r.setState({jetEngineRelationsFields:e})})),M()(e,"showJetEngineRelationsFieldsState",(function(e){r.setState({showJetEngineTaxonomyFieldsState:e})})),M()(e,"setCustomFieldSuite",(function(e){r.setState({customFieldSuiteFields:e})})),M()(e,"showCustomFieldSuite",(function(e){r.setState({showCustomFieldSuiteState:e})})),M()(e,"setAllInOneSeoFields",(function(e){r.setState({allInOneSeoFields:e})})),M()(e,"showAllInOneSeoFields",(function(e){r.setState({showAllInOneSeoFieldsState:e})})),M()(e,"setYoastSeoFields",(function(e){r.setState({yoastSeoFields:e})})),M()(e,"showYoastSeoFields",(function(e){r.setState({showYoastSeoFieldsState:e})})),M()(e,"setBillingAndShippingInformation",(function(e){r.setState({billingAndShippingInformation:e})})),M()(e,"showBillingAndShippingInformation",(function(e){r.setState({showBillingAndShippingInformationState:e})})),M()(e,"setWordPressCustomFields",(function(e){r.setState({wordPressCustomFields:e})})),M()(e,"setWordPressUserCustomFields",(function(e){r.setState({wordPressUserCustomFields:e})})),M()(e,"setWordPressUserCustomFieldsLabel",(function(e){r.setState({wordPressUserCustomFieldsLabel:receivedWordPressUserCustomFieldsLabel})})),M()(e,"showWordPressCustomFields",(function(e){r.setState({showWordPressCustomFieldsState:e})})),M()(e,"setCustomFieldsWpMembers",(function(e){r.setState({customFieldsWpMembersFields:e})})),M()(e,"showCustomFieldsWpMembers",(function(e){r.setState({showCustomFieldsWpMembersState:e})})),M()(e,"setCustomFieldsMembers",(function(e){r.setState({customFieldsMembersFields:e})})),M()(e,"showCustomFieldsMembers",(function(e){r.setState({showCustomFieldsMembersState:e})})),M()(e,"setProductMetaFields",(function(e){r.setState({productMetaFields:e})})),M()(e,"showProductMetaFields",(function(e){r.setState({showProductMetaFieldsState:e})})),M()(e,"setProductBundleMetaFields",(function(e){r.setState({productBundleMetaFields:e})})),M()(e,"showProductBundleMetaFields",(function(e){r.setState({showProductBundleMetaFieldsState:e})})),M()(e,"setOrderMetaFields",(function(e){r.setState({orderMetaFields:e})})),M()(e,"showOrderMetaFields",(function(e){r.setState({showOrderMetaFieldsState:e})})),M()(e,"setCouponMetaFields",(function(e){r.setState({couponMetaFields:e})})),M()(e,"showCouponMetaFields",(function(e){r.setState({showCouponMetaFieldsState:e})})),M()(e,"setRefundMetaFields",(function(e){r.setState({refundMetaFields:e})})),M()(e,"showRefundMetaFields",(function(e){r.setState({showRefundMetaFieldsState:e})})),M()(e,"setWpEcomCustomFields",(function(e){r.setState({wpEcomCustomFields:e})})),M()(e,"showWpEcomCustomFields",(function(e){r.setState({showWpEcomCustomFieldsState:e})})),M()(e,"setEventsManagerFields",(function(e){r.setState({eventsManagerFields:e})})),M()(e,"showEventsManagerFields",(function(e){r.setState({showEventsManagerFieldsState:e})})),M()(e,"setCmb2CustomFields",(function(e){r.setState({cmb2CustomFields:e})})),M()(e,"showCmb2CustomFields",(function(e){r.setState({showCmb2CustomFieldsState:e})})),M()(e,"setWPMLCustomFields",(function(e){r.setState({wpmlCustomFields:e})})),M()(e,"showWPMLCustomFields",(function(e){r.setState({showWPMLCustomFieldsState:e})})),M()(e,"setCsvHeaderFields",(function(e){r.setState({csvHeaderFields:e})})),M()(e,"getFileName",(function(e){r.setState({fileName:e})})),M()(e,"getTemplateName",(function(e){r.setState({templateName:e})})),M()(e,"saveTemplateName",(function(e){r.setState({saveTemplateNames:e})})),M()(e,"editedTemplateName",(function(e){r.setState({editTemplateName:e})})),M()(e,"selectedTemplateInManager",(function(e){r.setState({selectedTemplateNameInManagerSection:e})})),M()(e,"selectedEditedTemplateInManager",(function(e){r.setState({editedTemplateNameInManagerSection:e})})),M()(e,"selectedModuleInManager",(function(e){r.setState({selectedModuleNameInManagerSection:e})})),M()(e,"setHashKey",(function(e){r.setState({hashKey:e})})),M()(e,"setSelectedType",(function(e){r.setState({selectedType:e})})),M()(e,"setMode",(function(e){r.setState({mode:e})})),M()(e,"getCsvFileNames",(function(e){r.setState({csvFileNames:e})})),M()(e,"getCsvFilesUrl",(function(e){r.setState({csvFileUrls:e})})),M()(e,"getCsvFilesServer",(function(e){r.setState({csvFileServer:e})})),M()(e,"setSelectedFileUrlsState",(function(e){r.setState({selectedFileUrlsState:e})})),M()(e,"setSelectedFileUrl",(function(e){r.setState({selectedFileUrl:e})})),M()(e,"setSelectedFileServer",(function(e){r.setState({selectedFileServer:e})})),M()(e,"saveMappedFields",(function(e){r.setState({saveSelectedMappedFields:e.slice()})})),M()(e,"changeActivateMediaHandlingSection",(function(e){r.setState({activateMediaHandlingSection:e})})),M()(e,"setActivateDashboard",(function(e){r.setState({activateDashboard:e})})),M()(e,"backFromMediaHandlingState",(function(e){r.setState({fromMediaHandlingState:e})})),M()(e,"setExportDataFilterSection",(function(e){r.setState({activateExportDataFilter:e})})),M()(e,"changeActivateExportDownloadOption",(function(e){r.setState({activateExportDownloadOptionSection:e})})),M()(e,"changeActivateImportConfiguration",(function(e){r.setState({activateImportConfigurationSection:e})})),M()(e,"changeActivateProgressDisplay",(function(e){r.setState({activateProgressDisplaySection:e})})),M()(e,"changeActivateSaveMappingTemplateSectionState",(function(e){r.setState({activateSaveMappingTemplateSection:e})})),M()(e,"changeUseExistingMappingState",(function(e){r.setState({activateUseExistingMappingState:e})})),M()(e,"changeCreateNewMappingState",(function(e){r.setState({activateCreateNewMappingState:e})})),M()(e,"changeActivateTemplateSectionState",(function(e){r.setState({activateTemplateSectionState:e})})),M()(e,"fromSaveMappingSectionState",(function(e){r.setState({fromSaveMappingSection:e})})),M()(e,"fromTemplateMappingSectionState",(function(e){r.setState({fromTemplateMappingSection:e})})),M()(e,"fromDragAndDropMappingSection",(function(e){r.setState({fromDragAndDropSection:e})})),M()(e,"setMode",(function(e){r.setState({mode:e})})),M()(e,"setExportModule",(function(e){r.setState({exportModule:e})})),M()(e,"setOptionalType",(function(e){r.setState({optionalType:e})})),M()(e,"setTemplateNameArray",(function(e){r.setState({templateNameArray:e})})),M()(e,"setModulesArray",(function(e){r.setState({modulesNameArray:e})})),M()(e,"setCreatedTimeArray",(function(e){r.setState({createdTimeArray:e})})),M()(e,"setMatchedCounts",(function(e){r.setState({matchedCountsArray:e})})),M()(e,"activateUseAlreadyMediaImage",(function(e){r.setState({activateUseAlreadyMediaImageState:e})})),M()(e,"activateOverwriteExistingImage",(function(e){r.setState({activateOverwriteExistingImageState:e})})),M()(e,"activateThumbnail",(function(e){r.setState({activateThumbnailState:e})})),M()(e,"activateMedium",(function(e){r.setState({activateMediumState:e})})),M()(e,"activateMediumLarge",(function(e){r.setState({activateMediumLargeState:e})})),M()(e,"activateLarge",(function(e){r.setState({activateLargeState:e})})),M()(e,"activateCustom",(function(e){r.setState({activateCustomState:e})})),M()(e,"setImageTitle",(function(e){r.setState({mediaImageTitle:e})})),M()(e,"setImageCaption",(function(e){r.setState({mediaImageCaption:e})})),M()(e,"setImageAltText",(function(e){r.setState({mediaImageAltText:e})})),M()(e,"setImageDescription",(function(e){r.setState({mediaImageDescription:e})})),M()(e,"changeImageFileName",(function(e){r.setState({mediaImageFileName:e})})),M()(e,"setUpdateFields",(function(e){r.setState({updateFields:e})})),M()(e,"fieldHandleDuplicate",(function(e){r.setState({duplicateHandleField:e})})),M()(e,"setCountryList",(function(e){r.setState({countryLists:e})})),M()(e,"setTimeZones",(function(e){r.setState({timeZones:e})})),M()(e,"selectedCountryTimeZone",(function(e){r.setState({selectedCountryTime:e})})),M()(e,"exportedFileUrl",(function(e){r.setState({receivedExportedFileUrl:e})})),M()(e,"importLogData",(function(e){r.setState({importLogDataLink:e})})),M()(e,"setRollBackMode",(function(e){r.setState({rollBackMode:e})})),M()(e,"setMaintenanceMode",(function(e){r.setState({maintenanceMode:e})})),M()(e,"setTotalCustomFields",(function(e){r.setState({totalCustomFields:e})})),M()(e,"setTotalRows",(function(e){r.setState({totalRows:e})})),M()(e,"languageTranslation",(function(e){r.setState({translateLanguage:e})})),M()(e,"uploadFileType",(function(e){r.setState({uploadedFileType:e})})),e)),r}return u()(n,[{key:"render",value:function(){return o.a.createElement(qe.Provider,{value:this.state},this.props.children)}}]),n}(r.Component);function En(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var Tn=function(e){h()(n,e);var t=En(n);function n(){var e;l()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return e=t.call.apply(t,[this].concat(a)),M()(k()(e),"state",{activateExporter:!1,showComponent:"upload-dashboard",chosenServiceProvider:"",bucketLists:[],endPoints:[],edgePoints:[],accessKey:"",secretKey:"",mediaPath:"",domainPath:"",statusPathSettings:!1,statusYearPath:!1,offloadMedia:!1,statusCopyFiles:!1,selectedRegion:"",selectedBucketsName:"",showExport:"export-module",csvInfo:{replaceExistingItem:!1},exportInfo:{moduleName:"",optionalType:""},showImportLog:!1,isXML:!1,language:{},selectedFileUrl:"",allPluginFields:[],csvFields:[],isTemplate:!1,existingTemplateName:"",saveTemplateData:[],importScheduleData:{},mappingResult:{},maintenanceMode:!1,rollBackMode:!1,isAcfField:!1,isToolsetField:!1,mappingType:"",importLogDataLink:"",bulkImportData:{totalPages:"",totalRows:"",fileName:"",fileSize:"",fileExtension:"",Check:""},loaderText:o.a.createElement("div",{className:"btn ajax-loader loading"},"Please Wait"),loaderTextProgress:o.a.createElement("div",{className:"btn ajax-loader loading"},"Please Wait"),uploadFtpData:{HostName:"",HostPort:"",HostUserName:"",HostPassword:"",HostPath:"",action:""},exportType:"csv",showSplitRecord:!1,recordLimit:"",isDemiliters:!1,delimitersOption:",",otherDelimiters:"",dragAndDropMappingResult:{},isSpecificPeriod:!1,startDate:"",endDate:"",isSpecificStatus:!1,specificStatus:"",isSpecificAuthors:!1,specificAuthors:"",isSpecificCategory:!1,categoryName:"",fileName:"",eventExclusion:{is_check:!1,exclusion_headers:{header:{}}},enableSchedule:!1,scheduleDate:"",scheduleFrequency:"OneTime",selectedUTC:"",scheduleTime:"",hostName:"",hostPort:"",hostUserName:"",hostPassword:"",hostPath:"",connectionType:"ftp",simpleModeSelection:!1,advancedModeSelection:!0,progressPercentage:0,setActivateExporter:function(t){e.setState({activateExporter:t})},setIsTemplate:function(t){e.setState({isTemplate:t})},setExistingTemplateName:function(t){e.setState({existingTemplateName:t})},setMappingResult:function(t){e.setState({mappingResult:t})},setSelectedServiceProvider:function(t){e.setState({chosenServiceProvider:t})},setAccessKey:function(t){e.setState({accessKey:t})},setSecretKey:function(t){e.setState({secretKey:t})},setSeletedRegion:function(t){e.setState({selectedRegion:t})},setBucketLists:function(t){e.setState({bucketLists:t})},setEndPoint:function(t){e.setState({endPoints:t})},setStatusCopyFile:function(t){e.setState({statusCopyFiles:t})},setStatusYearPath:function(t){e.setState({statusYearPath:t})},setDragAndDropMappingResult:function(t){e.setState({dragAndDropMappingResult:t})},setOffloadMedia:function(t){e.setState({offloadMedia:t})},setRewriteUrl:function(t){e.setState({rewriteUrl:t})},setMediaPath:function(t){e.setState({mediaPath:t})},setStatusPathSettings:function(t){e.setState({statusPathSettings:t})},setDomainPath:function(t){e.setState({domainPath:t})},setCnamePathSettings:function(t){e.setState({cnamePathSettings:t})},setEdgePoint:function(t){e.setState({edgePoints:t})},setExistingBucket:function(t){e.setState({selectedBucketsName:t})},setMaintenanceMode:function(t){e.setState({maintenanceMode:t})},setRollBackMode:function(t){e.setState({rollBackMode:t})},setMappingType:function(t){e.setState({mappingType:t})},setImportLogDataLink:function(t){e.setState({importLogDataLink:t})},setImportScheduleData:function(t){e.setState({importScheduleData:t})},setSaveTemplateData:function(t){e.setState({saveTemplateData:t})},setCSVInfo:function(t){e.setState({csvInfo:t})},setExportInfo:function(t){e.setState({exportInfo:t})},setShowImportLog:function(t){e.setState({showImportLog:t})},setBulkImportData:function(t){e.setState({bulkImportData:t})},setIsXML:function(t){e.setState({isXML:t})},setShowComponent:function(t){e.setState({showComponent:t})},setShowExport:function(t){e.setState({showExport:t})},setLanguage:function(t){e.setState({language:t})},setSelectedTabOnCookies:function(e){(new mn).set("selectedTab",e,{path:"/"})},setSelectedFileUrl:function(t){e.setState({selectedFileUrl:t})},setCsvFields:function(t){e.setState({csvFields:t})},setAllPluginFields:function(t){e.setState({allPluginFields:t})},setIsAcfField:function(t){e.setState({isAcfField:t})},setIsToolsetField:function(t){e.setState({isToolsetField:t})},setUploadFtpData:function(t){e.setState({uploadFtpData:t})},setExportType:function(t){e.setState({exportType:t})},setShowSplitRecord:function(t){e.setState({showSplitRecord:t})},setRecordLimit:function(t){e.setState({recordLimit:t})},setIsDelimiters:function(t){e.setState({isDelimiters:t})},setDelimitersOption:function(t){e.setState({delimitersOption:t})},setOtherDelimiters:function(t){e.setState({otherDelimiters:t})},setIsSpecificPeriod:function(t){e.setState({isSpecificPeriod:t})},setStartDate:function(t){e.setState({startDate:t})},setEndDate:function(t){e.setState({endDate:t})},setIsSpecificStatus:function(t){e.setState({isSpecificStatus:t})},setSpecificStatus:function(t){e.setState({specificStatus:t})},setIsSpecificAuthors:function(t){e.setState({isSpecificAuthors:t})},setSpecificAuthors:function(t){e.setState({specificAuthors:t})},setIsSpecificCategory:function(t){e.setState({isSpecificCategory:t})},setCategoryName:function(t){e.setState({categoryName:t})},setFileName:function(t){e.setState({fileName:t})},setEventExclusion:function(t){e.setState({eventExclusion:t})},setEnableSchedule:function(t){e.setState({enableSchedule:t})},setScheduleDate:function(t){e.setState({scheduleDate:t})},setScheduleFrequency:function(t){e.setState({scheduleFrequency:t})},setSelectedUTC:function(t){e.setState({selectedUTC:t})},setScheduleTime:function(t){e.setState({scheduleTime:t})},setHostName:function(t){e.setState({hostName:t})},setHostPort:function(t){e.setState({hostPort:t})},setHostUserName:function(t){e.setState({hostUserName:t})},setHostPassword:function(t){e.setState({hostPassword:t})},setHostPath:function(t){e.setState({hostPath:t})},setConnectionType:function(t){e.setState({connectionType:t})},setSimpleModeSelection:function(t){e.setState({simpleModeSelection:t})},setAdvancedModeSelection:function(t){e.setState({advancedModeSelection:t})},setProgressPercentage:function(t){e.setState({progressPercentage:t})}}),e}return u()(n,[{key:"render",value:function(){return o.a.createElement(E.Provider,{value:this.state},this.props.children)}}]),n}(r.Component);document.addEventListener("DOMContentLoaded",(function(){i.a.render(o.a.createElement("div",{className:"wp-ultimate-csv-importer"},o.a.createElement(D.ToastContainer,{position:"top-right",autoClose:4e3,hideProgressBar:!0,newestOnTop:!0,closeOnClick:!0,rtl:!1,pauseOnVisibilityChange:!0,draggable:!0,pauseOnHover:!0}),o.a.createElement(Tn,null,o.a.createElement(Mn,null,o.a.createElement(kn,null))),o.a.createElement("p",{className:"text-center mt40 mb20"},"Powered by"," ",o.a.createElement("a",{className:"csv-link",href:"https://www.smackcoders.com?utm_source=wordpress&utm_medium=plugin&utm_campaign=pro_csv_importer",target:"blank"},"Smackcoders")," ","| Plugin Version 6.2.1")),document.getElementById("wp-csv-importer-admin"))}))},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return ae}));var r=n(57),o=n(51),a=n(5);function i(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var s=n(52),l=n(20),c=n(22),u=n(7),d=n(31),h=n(2);function p(e,t,n){Object(h.a)(2,arguments);var r=n||{},o=r.locale,i=o&&o.options&&o.options.weekStartsOn,s=null==i?0:Object(u.a)(i),l=null==r.weekStartsOn?s:Object(u.a)(r.weekStartsOn);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=Object(a.default)(e),d=Object(u.a)(t),p=c.getUTCDay(),f=d%7,m=(f+7)%7,g=(m<l?7:0)+d-p;return c.setUTCDate(c.getUTCDate()+g),c}var f=n(59);var m=n(58);var g=n(21),_=n(18),v=/^(1[0-2]|0?\d)/,b=/^(3[0-1]|[0-2]?\d)/,y=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,w=/^(5[0-3]|[0-4]?\d)/,k=/^(2[0-3]|[0-1]?\d)/,x=/^(2[0-4]|[0-1]?\d)/,M=/^(1[0-1]|0?\d)/,E=/^(1[0-2]|0?\d)/,T=/^[0-5]?\d/,S=/^[0-5]?\d/,D=/^\d/,L=/^\d{1,2}/,C=/^\d{1,3}/,P=/^\d{1,4}/,O=/^-?\d+/,N=/^-?\d/,A=/^-?\d{1,2}/,I=/^-?\d{1,3}/,R=/^-?\d{1,4}/,Y=/^([+-])(\d{2})(\d{2})?|Z/,j=/^([+-])(\d{2})(\d{2})|Z/,F=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,H=/^([+-])(\d{2}):(\d{2})|Z/,z=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function B(e,t,n){var r=t.match(e);if(!r)return null;var o=parseInt(r[0],10);return{value:n?n(o):o,rest:t.slice(r[0].length)}}function U(e,t){var n=t.match(e);return n?"Z"===n[0]?{value:0,rest:t.slice(1)}:{value:("+"===n[1]?1:-1)*(36e5*(n[2]?parseInt(n[2],10):0)+6e4*(n[3]?parseInt(n[3],10):0)+1e3*(n[5]?parseInt(n[5],10):0)),rest:t.slice(n[0].length)}:null}function V(e,t){return B(O,e,t)}function W(e,t,n){switch(e){case 1:return B(D,t,n);case 2:return B(L,t,n);case 3:return B(C,t,n);case 4:return B(P,t,n);default:return B(new RegExp("^\\d{1,"+e+"}"),t,n)}}function q(e,t,n){switch(e){case 1:return B(N,t,n);case 2:return B(A,t,n);case 3:return B(I,t,n);case 4:return B(R,t,n);default:return B(new RegExp("^-?\\d{1,"+e+"}"),t,n)}}function G(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function J(e,t){var n,r=t>0,o=r?t:1-t;if(o<=50)n=e||100;else{var a=o+50;n=e+100*Math.floor(a/100)-(e>=a%100?100:0)}return r?n:1-n}var K=[31,28,31,30,31,30,31,31,30,31,30,31],Q=[31,29,31,30,31,30,31,31,30,31,30,31];function X(e){return e%400==0||e%4==0&&e%100!=0}var $={G:{priority:140,parse:function(e,t,n,r){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});case"GGGG":default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}},set:function(e,t,n,r){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(e,t,n,r){var o=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return W(4,e,o);case"yo":return n.ordinalNumber(e,{unit:"year",valueCallback:o});default:return W(t.length,e,o)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,r){var o=e.getUTCFullYear();if(n.isTwoDigitYear){var a=J(n.year,o);return e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}var i="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(i,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(e,t,n,r){var o=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return W(4,e,o);case"Yo":return n.ordinalNumber(e,{unit:"year",valueCallback:o});default:return W(t.length,e,o)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,r){var o=Object(d.a)(e,r);if(n.isTwoDigitYear){var a=J(n.year,o);return e.setUTCFullYear(a,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),Object(_.a)(e,r)}var i="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),Object(_.a)(e,r)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(e,t,n,r){return q("R"===t?4:t.length,e)},set:function(e,t,n,r){var o=new Date(0);return o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0),Object(g.a)(o)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(e,t,n,r){return q("u"===t?4:t.length,e)},set:function(e,t,n,r){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(e,t,n,r){switch(t){case"Q":case"QQ":return W(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n,r){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(e,t,n,r){switch(t){case"q":case"qq":return W(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n,r){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(e,t,n,r){var o=function(e){return e-1};switch(t){case"M":return B(v,e,o);case"MM":return W(2,e,o);case"Mo":return n.ordinalNumber(e,{unit:"month",valueCallback:o});case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,r){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(e,t,n,r){var o=function(e){return e-1};switch(t){case"L":return B(v,e,o);case"LL":return W(2,e,o);case"Lo":return n.ordinalNumber(e,{unit:"month",valueCallback:o});case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,r){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(e,t,n,r){switch(t){case"w":return B(w,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,r){return Object(_.a)(function(e,t,n){Object(h.a)(2,arguments);var r=Object(a.default)(e),o=Object(u.a)(t),i=Object(m.a)(r,n)-o;return r.setUTCDate(r.getUTCDate()-7*i),r}(e,n,r),r)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(e,t,n,r){switch(t){case"I":return B(w,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,r){return Object(g.a)(function(e,t){Object(h.a)(2,arguments);var n=Object(a.default)(e),r=Object(u.a)(t),o=Object(f.a)(n)-r;return n.setUTCDate(n.getUTCDate()-7*o),n}(e,n,r),r)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,subPriority:1,parse:function(e,t,n,r){switch(t){case"d":return B(b,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return W(t.length,e)}},validate:function(e,t,n){var r=X(e.getUTCFullYear()),o=e.getUTCMonth();return r?t>=1&&t<=Q[o]:t>=1&&t<=K[o]},set:function(e,t,n,r){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,subPriority:1,parse:function(e,t,n,r){switch(t){case"D":case"DD":return B(y,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return W(t.length,e)}},validate:function(e,t,n){return X(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365},set:function(e,t,n,r){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(e,t,n,r){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,r){return(e=p(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(e,t,n,r){var o=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return W(t.length,e,o);case"eo":return n.ordinalNumber(e,{unit:"day",valueCallback:o});case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,r){return(e=p(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(e,t,n,r){var o=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return W(t.length,e,o);case"co":return n.ordinalNumber(e,{unit:"day",valueCallback:o});case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,r){return(e=p(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(e,t,n,r){var o=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return W(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return n.day(e,{width:"abbreviated",context:"formatting",valueCallback:o})||n.day(e,{width:"short",context:"formatting",valueCallback:o})||n.day(e,{width:"narrow",context:"formatting",valueCallback:o});case"iiiii":return n.day(e,{width:"narrow",context:"formatting",valueCallback:o});case"iiiiii":return n.day(e,{width:"short",context:"formatting",valueCallback:o})||n.day(e,{width:"narrow",context:"formatting",valueCallback:o});case"iiii":default:return n.day(e,{width:"wide",context:"formatting",valueCallback:o})||n.day(e,{width:"abbreviated",context:"formatting",valueCallback:o})||n.day(e,{width:"short",context:"formatting",valueCallback:o})||n.day(e,{width:"narrow",context:"formatting",valueCallback:o})}},validate:function(e,t,n){return t>=1&&t<=7},set:function(e,t,n,r){return(e=function(e,t){Object(h.a)(2,arguments);var n=Object(u.a)(t);n%7==0&&(n-=7);var r=1,o=Object(a.default)(e),i=o.getUTCDay(),s=n%7,l=(s+7)%7,c=(l<r?7:0)+n-i;return o.setUTCDate(o.getUTCDate()+c),o}(e,n,r)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:{priority:80,parse:function(e,t,n,r){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,r){return e.setUTCHours(G(n),0,0,0),e},incompatibleTokens:["b","B","H","K","k","t","T"]},b:{priority:80,parse:function(e,t,n,r){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,r){return e.setUTCHours(G(n),0,0,0),e},incompatibleTokens:["a","B","H","K","k","t","T"]},B:{priority:80,parse:function(e,t,n,r){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,r){return e.setUTCHours(G(n),0,0,0),e},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(e,t,n,r){switch(t){case"h":return B(E,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=12},set:function(e,t,n,r){var o=e.getUTCHours()>=12;return o&&n<12?e.setUTCHours(n+12,0,0,0):o||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(e,t,n,r){switch(t){case"H":return B(k,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=23},set:function(e,t,n,r){return e.setUTCHours(n,0,0,0),e},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(e,t,n,r){switch(t){case"K":return B(M,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,r){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e},incompatibleTokens:["a","b","h","H","k","t","T"]},k:{priority:70,parse:function(e,t,n,r){switch(t){case"k":return B(x,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=24},set:function(e,t,n,r){var o=n<=24?n%24:n;return e.setUTCHours(o,0,0,0),e},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(e,t,n,r){switch(t){case"m":return B(T,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n,r){return e.setUTCMinutes(n,0,0),e},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(e,t,n,r){switch(t){case"s":return B(S,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n,r){return e.setUTCSeconds(n,0),e},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(e,t,n,r){return W(t.length,e,(function(e){return Math.floor(e*Math.pow(10,3-t.length))}))},set:function(e,t,n,r){return e.setUTCMilliseconds(n),e},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(e,t,n,r){switch(t){case"X":return U(Y,e);case"XX":return U(j,e);case"XXXX":return U(F,e);case"XXXXX":return U(z,e);case"XXX":default:return U(H,e)}},set:function(e,t,n,r){return t.timestampIsSet?e:new Date(e.getTime()-n)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(e,t,n,r){switch(t){case"x":return U(Y,e);case"xx":return U(j,e);case"xxxx":return U(F,e);case"xxxxx":return U(z,e);case"xxx":default:return U(H,e)}},set:function(e,t,n,r){return t.timestampIsSet?e:new Date(e.getTime()-n)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(e,t,n,r){return V(e)},set:function(e,t,n,r){return[new Date(1e3*n),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(e,t,n,r){return V(e)},set:function(e,t,n,r){return[new Date(n),{timestampIsSet:!0}]},incompatibleTokens:"*"}},Z=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ee=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,te=/^'([^]*?)'?$/,ne=/''/g,re=/\S/,oe=/[a-zA-Z]/;function ae(e,t,n,d){Object(h.a)(3,arguments);var p=String(e),f=String(t),m=d||{},g=m.locale||r.a;if(!g.match)throw new RangeError("locale must contain match property");var _=g.options&&g.options.firstWeekContainsDate,v=null==_?1:Object(u.a)(_),b=null==m.firstWeekContainsDate?v:Object(u.a)(m.firstWeekContainsDate);if(!(b>=1&&b<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=g.options&&g.options.weekStartsOn,w=null==y?0:Object(u.a)(y),k=null==m.weekStartsOn?w:Object(u.a)(m.weekStartsOn);if(!(k>=0&&k<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===f)return""===p?Object(a.default)(n):new Date(NaN);var x,M={firstWeekContainsDate:b,weekStartsOn:k,locale:g},E=[{priority:10,subPriority:-1,set:ie,index:0}],T=f.match(ee).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,s.a[t])(e,g.formatLong,M):e})).join("").match(Z),S=[];for(x=0;x<T.length;x++){var D=T[x];!m.useAdditionalWeekYearTokens&&Object(c.b)(D)&&Object(c.c)(D,f,e),!m.useAdditionalDayOfYearTokens&&Object(c.a)(D)&&Object(c.c)(D,f,e);var L=D[0],C=$[L];if(C){var P=C.incompatibleTokens;if(Array.isArray(P)){for(var O=void 0,N=0;N<S.length;N++){var A=S[N].token;if(-1!==P.indexOf(A)||A===L){O=S[N];break}}if(O)throw new RangeError("The format string mustn't contain `".concat(O.fullToken,"` and `").concat(D,"` at the same time"))}else if("*"===C.incompatibleTokens&&S.length)throw new RangeError("The format string mustn't contain `".concat(D,"` and any other token at the same time"));S.push({token:L,fullToken:D});var I=C.parse(p,D,g.match,M);if(!I)return new Date(NaN);E.push({priority:C.priority,subPriority:C.subPriority||0,set:C.set,validate:C.validate,value:I.value,index:E.length}),p=I.rest}else{if(L.match(oe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+L+"`");if("''"===D?D="'":"'"===L&&(D=se(D)),0!==p.indexOf(D))return new Date(NaN);p=p.slice(D.length)}}if(p.length>0&&re.test(p))return new Date(NaN);var R=E.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return E.filter((function(t){return t.priority===e})).sort((function(e,t){return t.subPriority-e.subPriority}))})).map((function(e){return e[0]})),Y=Object(a.default)(n);if(isNaN(Y))return new Date(NaN);var j=Object(o.a)(Y,Object(l.a)(Y)),F={};for(x=0;x<R.length;x++){var H=R[x];if(H.validate&&!H.validate(j,H.value,M))return new Date(NaN);var z=H.set(j,F,H.value,M);z[0]?(j=z[0],i(F,z[1])):j=z}return j}function ie(e,t){if(t.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}function se(e){return e.match(te)[1].replace(ne,"'")}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return N}));var r=n(74),o=n(57),a=n(51),i=n(5);function s(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var l={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return s("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):s(n+1,2)},d:function(e,t){return s(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":case"aaa":return n.toUpperCase();case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return s(e.getUTCHours()%12||12,t.length)},H:function(e,t){return s(e.getUTCHours(),t.length)},m:function(e,t){return s(e.getUTCMinutes(),t.length)},s:function(e,t){return s(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return s(Math.floor(r*Math.pow(10,n-3)),t.length)}},c=n(2);var u=n(59),d=n(53),h=n(58),p=n(31),f="midnight",m="noon",g="morning",_="afternoon",v="evening",b="night";function y(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),a=r%60;if(0===a)return n+String(o);var i=t||"";return n+String(o)+i+s(a,2)}function w(e,t){return e%60==0?(e>0?"-":"+")+s(Math.abs(e)/60,2):k(e,t)}function k(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+s(Math.floor(o/60),2)+n+s(o%60,2)}var x={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return l.y(e,t)},Y:function(e,t,n,r){var o=Object(p.a)(e,r),a=o>0?o:1-o;return"YY"===t?s(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):s(a,t.length)},R:function(e,t){return s(Object(d.a)(e),t.length)},u:function(e,t){return s(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return s(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return s(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return l.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return s(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var o=Object(h.a)(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):s(o,t.length)},I:function(e,t,n){var r=Object(u.a)(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):s(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):l.d(e,t)},D:function(e,t,n){var r=function(e){Object(c.a)(1,arguments);var t=Object(i.default)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),o=n-r;return Math.floor(o/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):s(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var o=e.getUTCDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return s(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return s(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return s(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,o=e.getUTCHours();switch(r=12===o?m:0===o?f:o/12>=1?"pm":"am",t){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,o=e.getUTCHours();switch(r=o>=17?v:o>=12?_:o>=4?g:b,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return l.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):l.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):s(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):s(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):l.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):l.s(e,t)},S:function(e,t){return l.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return w(o);case"XXXX":case"XX":return k(o);case"XXXXX":case"XXX":default:return k(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return w(o);case"xxxx":case"xx":return k(o);case"xxxxx":case"xxx":default:return k(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+y(o,":");case"OOOO":default:return"GMT"+k(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+y(o,":");case"zzzz":default:return"GMT"+k(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return s(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return s((r._originalDate||e).getTime(),t.length)}},M=n(52),E=n(20),T=n(22),S=n(7),D=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,L=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,C=/^'([^]*?)'?$/,P=/''/g,O=/[a-zA-Z]/;function N(e,t,n){Object(c.a)(2,arguments);var s=String(t),l=n||{},u=l.locale||o.a,d=u.options&&u.options.firstWeekContainsDate,h=null==d?1:Object(S.a)(d),p=null==l.firstWeekContainsDate?h:Object(S.a)(l.firstWeekContainsDate);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=u.options&&u.options.weekStartsOn,m=null==f?0:Object(S.a)(f),g=null==l.weekStartsOn?m:Object(S.a)(l.weekStartsOn);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!u.localize)throw new RangeError("locale must contain localize property");if(!u.formatLong)throw new RangeError("locale must contain formatLong property");var _=Object(i.default)(e);if(!Object(r.default)(_))throw new RangeError("Invalid time value");var v=Object(E.a)(_),b=Object(a.a)(_,v),y={firstWeekContainsDate:p,weekStartsOn:g,locale:u,_originalDate:_},w=s.match(L).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,M.a[t])(e,u.formatLong,y):e})).join("").match(D).map((function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return A(n);var o=x[r];if(o)return!l.useAdditionalWeekYearTokens&&Object(T.b)(n)&&Object(T.c)(n,t,e),!l.useAdditionalDayOfYearTokens&&Object(T.a)(n)&&Object(T.c)(n,t,e),o(b,n,u.localize,y);if(r.match(O))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n})).join("");return w}function A(e){return e.match(C)[1].replace(P,"'")}},function(e,t,n){"use strict";n.r(t),n.d(t,"Popper",(function(){return L})),n.d(t,"placements",(function(){return D})),n.d(t,"Manager",(function(){return w})),n.d(t,"Reference",(function(){return N}));var r=n(253),o=n.n(r),a=n(29),i=n.n(a),s=n(11),l=n.n(s),c=n(32),u=n.n(c),d=n(1),h=n.n(d),p=n(254),f=n.n(p),m=n(0),g=n(81),_=n(82),v=n.n(_),b=v()(),y=v()(),w=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r))||this,h()(l()(t),"referenceNode",void 0),h()(l()(t),"setReferenceNode",(function(e){e&&t.referenceNode!==e&&(t.referenceNode=e,t.forceUpdate())})),t}u()(t,e);var n=t.prototype;return n.componentWillUnmount=function(){this.referenceNode=null},n.render=function(){return m.createElement(b.Provider,{value:this.referenceNode},m.createElement(y.Provider,{value:this.setReferenceNode},this.props.children))},t}(m.Component),k=function(e){return Array.isArray(e)?e[0]:e},x=function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}},M=function(e,t){if("function"==typeof e)return x(e,t);null!=e&&(e.current=t)},E={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},T={},S=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r))||this,h()(l()(t),"state",{data:void 0,placement:void 0}),h()(l()(t),"popperInstance",void 0),h()(l()(t),"popperNode",null),h()(l()(t),"arrowNode",null),h()(l()(t),"setPopperNode",(function(e){e&&t.popperNode!==e&&(M(t.props.innerRef,e),t.popperNode=e,t.updatePopperInstance())})),h()(l()(t),"setArrowNode",(function(e){t.arrowNode=e})),h()(l()(t),"updateStateModifier",{enabled:!0,order:900,fn:function(e){var n=e.placement;return t.setState({data:e,placement:n}),e}}),h()(l()(t),"getOptions",(function(){return{placement:t.props.placement,eventsEnabled:t.props.eventsEnabled,positionFixed:t.props.positionFixed,modifiers:i()({},t.props.modifiers,{arrow:i()({},t.props.modifiers&&t.props.modifiers.arrow,{enabled:!!t.arrowNode,element:t.arrowNode}),applyStyle:{enabled:!1},updateStateModifier:t.updateStateModifier})}})),h()(l()(t),"getPopperStyle",(function(){return t.popperNode&&t.state.data?i()({position:t.state.data.offsets.popper.position},t.state.data.styles):E})),h()(l()(t),"getPopperPlacement",(function(){return t.state.data?t.state.placement:void 0})),h()(l()(t),"getArrowStyle",(function(){return t.arrowNode&&t.state.data?t.state.data.arrowStyles:T})),h()(l()(t),"getOutOfBoundariesState",(function(){return t.state.data?t.state.data.hide:void 0})),h()(l()(t),"destroyPopperInstance",(function(){t.popperInstance&&(t.popperInstance.destroy(),t.popperInstance=null)})),h()(l()(t),"updatePopperInstance",(function(){t.destroyPopperInstance();var e=l()(t).popperNode,n=t.props.referenceElement;n&&e&&(t.popperInstance=new g.a(n,e,t.getOptions()))})),h()(l()(t),"scheduleUpdate",(function(){t.popperInstance&&t.popperInstance.scheduleUpdate()})),t}u()(t,e);var n=t.prototype;return n.componentDidUpdate=function(e,t){this.props.placement===e.placement&&this.props.referenceElement===e.referenceElement&&this.props.positionFixed===e.positionFixed&&f()(this.props.modifiers,e.modifiers,{strict:!0})?this.props.eventsEnabled!==e.eventsEnabled&&this.popperInstance&&(this.props.eventsEnabled?this.popperInstance.enableEventListeners():this.popperInstance.disableEventListeners()):this.updatePopperInstance(),t.placement!==this.state.placement&&this.scheduleUpdate()},n.componentWillUnmount=function(){M(this.props.innerRef,null),this.destroyPopperInstance()},n.render=function(){return k(this.props.children)({ref:this.setPopperNode,style:this.getPopperStyle(),placement:this.getPopperPlacement(),outOfBoundaries:this.getOutOfBoundariesState(),scheduleUpdate:this.scheduleUpdate,arrowProps:{ref:this.setArrowNode,style:this.getArrowStyle()}})},t}(m.Component);h()(S,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1});var D=g.a.placements;function L(e){var t=e.referenceElement,n=o()(e,["referenceElement"]);return m.createElement(b.Consumer,null,(function(e){return m.createElement(S,i()({referenceElement:void 0!==t?t:e},n))}))}var C=n(79),P=n.n(C),O=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r))||this,h()(l()(t),"refHandler",(function(e){M(t.props.innerRef,e),x(t.props.setReferenceNode,e)})),t}u()(t,e);var n=t.prototype;return n.componentWillUnmount=function(){M(this.props.innerRef,null)},n.render=function(){return P()(Boolean(this.props.setReferenceNode),"`Reference` should not be used outside of a `Manager` component."),k(this.props.children)({ref:this.refHandler})},t}(m.Component);function N(e){return m.createElement(y.Consumer,null,(function(t){return m.createElement(O,i()({setReferenceNode:t},e))}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return c}));var r=n(17),o=n(5),a=n(7),i=n(2);function s(e,t){Object(i.a)(1,arguments);var n=Object(o.default)(e),s=n.getFullYear(),l=t||{},c=l.locale,u=c&&c.options&&c.options.firstWeekContainsDate,d=null==u?1:Object(a.a)(u),h=null==l.firstWeekContainsDate?d:Object(a.a)(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setFullYear(s+1,0,h),p.setHours(0,0,0,0);var f=Object(r.default)(p,t),m=new Date(0);m.setFullYear(s,0,h),m.setHours(0,0,0,0);var g=Object(r.default)(m,t);return n.getTime()>=f.getTime()?s+1:n.getTime()>=g.getTime()?s:s-1}function l(e,t){Object(i.a)(1,arguments);var n=t||{},o=n.locale,l=o&&o.options&&o.options.firstWeekContainsDate,c=null==l?1:Object(a.a)(l),u=null==n.firstWeekContainsDate?c:Object(a.a)(n.firstWeekContainsDate),d=s(e,t),h=new Date(0);h.setFullYear(d,0,u),h.setHours(0,0,0,0);var p=Object(r.default)(h,t);return p}function c(e,t){Object(i.a)(1,arguments);var n=Object(o.default)(e),a=Object(r.default)(n,t).getTime()-l(n,t).getTime();return Math.round(a/6048e5)+1}}]);
|
1 |
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=455)}([function(e,t,n){"use strict";e.exports=n(255)},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";function r(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}n.d(t,"a",(function(){return r}))},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function o(){return t.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function p(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return Et(e,t,n,r,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function g(e){if(null==e._isValid){var t=m(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function _(e){var t=f(NaN);return null!=e?p(m(t),e):m(t).userInvalidated=!0,t}r=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=o.momentProperties=[],b=!1;function y(e,t){var n,r,o;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=m(t)),c(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)c(o=t[r=v[n]])||(e[r]=o);return e}function w(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,o.updateOffset(this),b=!1)}function k(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function x(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function M(e,t){var n=!0;return p((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){var r,a,i,l=[];for(a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(i in r+="\n["+a+"] ",arguments[0])s(arguments[0],i)&&(r+=i+": "+arguments[0][i]+", ");r=r.slice(0,-2)}else r=arguments[a];l.push(r)}x(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var E,T={};function S(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),T[e]||(x(t),T[e]=!0)}function D(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function L(e,t){var n,r=p({},e);for(n in t)s(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&i(e[n])&&(r[n]=p({},r[n]));return r}function C(e){null!=e&&this.set(e)}function P(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,E=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var O=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,A={},I={};function R(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(I[e]=o),t&&(I[t[0]]=function(){return P(o.apply(this,arguments),t[1],t[2])}),n&&(I[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function Y(e,t){return e.isValid()?(t=j(t,e.localeData()),A[t]=A[t]||function(e){var t,n,r,o=e.match(O);for(t=0,n=o.length;t<n;t++)I[o[t]]?o[t]=I[o[t]]:o[t]=(r=o[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,a="";for(r=0;r<n;r++)a+=D(o[r])?o[r].call(t,e):o[r];return a}}(t),A[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(N.lastIndex=0;n>=0&&N.test(e);)e=e.replace(N,r),N.lastIndex=0,n-=1;return e}var F={};function H(e,t){var n=e.toLowerCase();F[n]=F[n+"s"]=F[t]=e}function z(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function B(e){var t,n,r={};for(n in e)s(e,n)&&(t=z(n))&&(r[t]=e[n]);return r}var U={};function V(e,t){U[e]=t}function W(e){return e%4==0&&e%100!=0||e%400==0}function q(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function G(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=q(t)),n}function J(e,t){return function(n){return null!=n?(Q(this,e,n),o.updateOffset(this,t),this):K(this,e)}}function K(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Q(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&W(e.year())&&1===e.month()&&29===e.date()?(n=G(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),ke(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var X,$=/\d/,Z=/\d\d/,ee=/\d{3}/,te=/\d{4}/,ne=/[+-]?\d{6}/,re=/\d\d?/,oe=/\d\d\d\d?/,ae=/\d\d\d\d\d\d?/,ie=/\d{1,3}/,se=/\d{1,4}/,le=/[+-]?\d{1,6}/,ce=/\d+/,ue=/[+-]?\d+/,de=/Z|[+-]\d\d:?\d\d/gi,he=/Z|[+-]\d\d(?::?\d\d)?/gi,pe=/[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;function fe(e,t,n){X[e]=D(t)?t:function(e,r){return e&&n?n:t}}function me(e,t){return s(X,e)?X[e](t._strict,t._locale):new RegExp(ge(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function ge(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}X={};var _e,ve={};function be(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),u(t)&&(r=function(e,n){n[t]=G(e)}),n=0;n<e.length;n++)ve[e[n]]=r}function ye(e,t){be(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function we(e,t,n){null!=t&&s(ve,e)&&ve[e](t,n._a,n,e)}function ke(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?W(e)?29:28:31-r%7%2}_e=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},R("M",["MM",2],"Mo",(function(){return this.month()+1})),R("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),R("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),H("month","M"),V("month",8),fe("M",re),fe("MM",re,Z),fe("MMM",(function(e,t){return t.monthsShortRegex(e)})),fe("MMMM",(function(e,t){return t.monthsRegex(e)})),be(["M","MM"],(function(e,t){t[1]=G(e)-1})),be(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[1]=o:m(n).invalidMonth=e}));var xe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Me="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ee=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Te=pe,Se=pe;function De(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=_e.call(this._shortMonthsParse,i))?o:null:-1!==(o=_e.call(this._longMonthsParse,i))?o:null:"MMM"===t?-1!==(o=_e.call(this._shortMonthsParse,i))||-1!==(o=_e.call(this._longMonthsParse,i))?o:null:-1!==(o=_e.call(this._longMonthsParse,i))||-1!==(o=_e.call(this._shortMonthsParse,i))?o:null}function Le(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=G(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),ke(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Ce(e){return null!=e?(Le(this,e),o.updateOffset(this,!0),this):K(this,"Month")}function Pe(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],a=[];for(t=0;t<12;t++)n=f([2e3,t]),r.push(this.monthsShort(n,"")),o.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(e),o.sort(e),a.sort(e),t=0;t<12;t++)r[t]=ge(r[t]),o[t]=ge(o[t]);for(t=0;t<24;t++)a[t]=ge(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Oe(e){return W(e)?366:365}R("Y",0,0,(function(){var e=this.year();return e<=9999?P(e,4):"+"+e})),R(0,["YY",2],0,(function(){return this.year()%100})),R(0,["YYYY",4],0,"year"),R(0,["YYYYY",5],0,"year"),R(0,["YYYYYY",6,!0],0,"year"),H("year","y"),V("year",1),fe("Y",ue),fe("YY",re,Z),fe("YYYY",se,te),fe("YYYYY",le,ne),fe("YYYYYY",le,ne),be(["YYYYY","YYYYYY"],0),be("YYYY",(function(e,t){t[0]=2===e.length?o.parseTwoDigitYear(e):G(e)})),be("YY",(function(e,t){t[0]=o.parseTwoDigitYear(e)})),be("Y",(function(e,t){t[0]=parseInt(e,10)})),o.parseTwoDigitYear=function(e){return G(e)+(G(e)>68?1900:2e3)};var Ne=J("FullYear",!0);function Ae(e,t,n,r,o,a,i){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,a,i),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,a,i),s}function Ie(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Re(e,t,n){var r=7+t-n;return-(7+Ie(e,0,r).getUTCDay()-t)%7+r-1}function Ye(e,t,n,r,o){var a,i,s=1+7*(t-1)+(7+n-r)%7+Re(e,r,o);return s<=0?i=Oe(a=e-1)+s:s>Oe(e)?(a=e+1,i=s-Oe(e)):(a=e,i=s),{year:a,dayOfYear:i}}function je(e,t,n){var r,o,a=Re(e.year(),t,n),i=Math.floor((e.dayOfYear()-a-1)/7)+1;return i<1?r=i+Fe(o=e.year()-1,t,n):i>Fe(e.year(),t,n)?(r=i-Fe(e.year(),t,n),o=e.year()+1):(o=e.year(),r=i),{week:r,year:o}}function Fe(e,t,n){var r=Re(e,t,n),o=Re(e+1,t,n);return(Oe(e)-r+o)/7}function He(e,t){return e.slice(t,7).concat(e.slice(0,t))}R("w",["ww",2],"wo","week"),R("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),V("week",5),V("isoWeek",5),fe("w",re),fe("ww",re,Z),fe("W",re),fe("WW",re,Z),ye(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=G(e)})),R("d",0,"do","day"),R("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),R("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),R("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),R("e",0,0,"weekday"),R("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),V("day",11),V("weekday",11),V("isoWeekday",11),fe("d",re),fe("e",re),fe("E",re),fe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),fe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),fe("dddd",(function(e,t){return t.weekdaysRegex(e)})),ye(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:m(n).invalidWeekday=e})),ye(["d","e","E"],(function(e,t,n,r){t[r]=G(e)}));var ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Be="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ue="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ve=pe,We=pe,qe=pe;function Ge(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=_e.call(this._weekdaysParse,i))?o:null:"ddd"===t?-1!==(o=_e.call(this._shortWeekdaysParse,i))?o:null:-1!==(o=_e.call(this._minWeekdaysParse,i))?o:null:"dddd"===t?-1!==(o=_e.call(this._weekdaysParse,i))||-1!==(o=_e.call(this._shortWeekdaysParse,i))||-1!==(o=_e.call(this._minWeekdaysParse,i))?o:null:"ddd"===t?-1!==(o=_e.call(this._shortWeekdaysParse,i))||-1!==(o=_e.call(this._weekdaysParse,i))||-1!==(o=_e.call(this._minWeekdaysParse,i))?o:null:-1!==(o=_e.call(this._minWeekdaysParse,i))||-1!==(o=_e.call(this._weekdaysParse,i))||-1!==(o=_e.call(this._shortWeekdaysParse,i))?o:null}function Je(){function e(e,t){return t.length-e.length}var t,n,r,o,a,i=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=ge(this.weekdaysMin(n,"")),o=ge(this.weekdaysShort(n,"")),a=ge(this.weekdays(n,"")),i.push(r),s.push(o),l.push(a),c.push(r),c.push(o),c.push(a);i.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Ke(){return this.hours()%12||12}function Qe(e,t){R(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Xe(e,t){return t._meridiemParse}R("H",["HH",2],0,"hour"),R("h",["hh",2],0,Ke),R("k",["kk",2],0,(function(){return this.hours()||24})),R("hmm",0,0,(function(){return""+Ke.apply(this)+P(this.minutes(),2)})),R("hmmss",0,0,(function(){return""+Ke.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)})),R("Hmm",0,0,(function(){return""+this.hours()+P(this.minutes(),2)})),R("Hmmss",0,0,(function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)})),Qe("a",!0),Qe("A",!1),H("hour","h"),V("hour",13),fe("a",Xe),fe("A",Xe),fe("H",re),fe("h",re),fe("k",re),fe("HH",re,Z),fe("hh",re,Z),fe("kk",re,Z),fe("hmm",oe),fe("hmmss",ae),fe("Hmm",oe),fe("Hmmss",ae),be(["H","HH"],3),be(["k","kk"],(function(e,t,n){var r=G(e);t[3]=24===r?0:r})),be(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),be(["h","hh"],(function(e,t,n){t[3]=G(e),m(n).bigHour=!0})),be("hmm",(function(e,t,n){var r=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r)),m(n).bigHour=!0})),be("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r,2)),t[5]=G(e.substr(o)),m(n).bigHour=!0})),be("Hmm",(function(e,t,n){var r=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r))})),be("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=G(e.substr(0,r)),t[4]=G(e.substr(r,2)),t[5]=G(e.substr(o))}));var $e,Ze=J("Hours",!0),et={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",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:xe,monthsShort:Me,week:{dow:0,doy:6},weekdays:ze,weekdaysMin:Ue,weekdaysShort:Be,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function ot(e){return e?e.toLowerCase().replace("_","-"):e}function at(t){var r=null;if(void 0===tt[t]&&void 0!==e&&e&&e.exports)try{r=$e._abbr,n(290)("./"+t),it(r)}catch(e){tt[t]=null}return tt[t]}function it(e,t){var n;return e&&((n=c(t)?lt(e):st(e,t))?$e=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),$e._abbr}function st(e,t){if(null!==t){var n,r=et;if(t.abbr=e,null!=tt[e])S("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."),r=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])r=tt[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return tt[e]=new C(L(r,t)),nt[e]&&nt[e].forEach((function(e){st(e.name,e.config)})),it(e),tt[e]}return delete tt[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return $e;if(!a(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,r,o,a=0;a<e.length;){for(t=(o=ot(e[a]).split("-")).length,n=(n=ot(e[a+1]))?n.split("-"):null;t>0;){if(r=at(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&rt(o,n)>=t-1)break;t--}a++}return $e}(e)}function ct(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>ke(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,m(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),m(e)._overflowWeeks&&-1===t&&(t=7),m(e)._overflowWeekday&&-1===t&&(t=8),m(e).overflow=t),e}var ut=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["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}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ft=[["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/]],mt=/^\/?Date\((-?\d+)/i,gt=/^(?:(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}))$/,_t={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vt(e){var t,n,r,o,a,i,s=e._i,l=ut.exec(s)||dt.exec(s);if(l){for(m(e).iso=!0,t=0,n=pt.length;t<n;t++)if(pt[t][1].exec(l[1])){o=pt[t][0],r=!1!==pt[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=ft.length;t<n;t++)if(ft[t][1].exec(l[3])){a=(l[2]||" ")+ft[t][0];break}if(null==a)return void(e._isValid=!1)}if(!r&&null!=a)return void(e._isValid=!1);if(l[4]){if(!ht.exec(l[4]))return void(e._isValid=!1);i="Z"}e._f=o+(a||"")+(i||""),xt(e)}else e._isValid=!1}function bt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function yt(e){var t,n,r,o,a,i,s,l,c=gt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){if(n=c[4],r=c[3],o=c[2],a=c[5],i=c[6],s=c[7],l=[bt(n),Me.indexOf(r),parseInt(o,10),parseInt(a,10),parseInt(i,10)],s&&l.push(parseInt(s,10)),t=l,!function(e,t,n){return!e||Be.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}(c[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return _t[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}(c[8],c[9],c[10]),e._d=Ie.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function wt(e,t,n){return null!=e?e:null!=t?t:n}function kt(e){var t,n,r,a,i,s=[];if(!e._d){for(r=function(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,r,o,a,i,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,i=4,n=wt(t.GG,e._a[0],je(Tt(),1,4).year),r=wt(t.W,1),((o=wt(t.E,1))<1||o>7)&&(l=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,c=je(Tt(),a,i),n=wt(t.gg,e._a[0],c.year),r=wt(t.w,c.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+a,(t.e<0||t.e>6)&&(l=!0)):o=a),r<1||r>Fe(n,a,i)?m(e)._overflowWeeks=!0:null!=l?m(e)._overflowWeekday=!0:(s=Ye(n,r,o,a,i),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(i=wt(e._a[0],r[0]),(e._dayOfYear>Oe(i)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=Ie(i,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Ie:Ae).apply(null,s),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(m(e).weekdayMismatch=!0)}}function xt(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],m(e).empty=!0;var t,n,r,a,i,s,l=""+e._i,c=l.length,u=0;for(r=j(e._f,e._locale).match(O)||[],t=0;t<r.length;t++)a=r[t],(n=(l.match(me(a,e))||[])[0])&&((i=l.substr(0,l.indexOf(n))).length>0&&m(e).unusedInput.push(i),l=l.slice(l.indexOf(n)+n.length),u+=n.length),I[a]?(n?m(e).empty=!1:m(e).unusedTokens.push(a),we(a,n,e)):e._strict&&!n&&m(e).unusedTokens.push(a);m(e).charsLeftOver=c-u,l.length>0&&m(e).unusedInput.push(l),e._a[3]<=12&&!0===m(e).bigHour&&e._a[3]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(s=m(e).era)&&(e._a[0]=e._locale.erasConvertYear(s,e._a[0])),kt(e),ct(e)}else yt(e);else vt(e)}function Mt(e){var t=e._i,n=e._f;return e._locale=e._locale||lt(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new w(ct(t)):(d(t)?e._d=t:a(n)?function(e){var t,n,r,o,a,i,s=!1;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<e._f.length;o++)a=0,i=!1,t=y({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],xt(t),g(t)&&(i=!0),a+=m(t).charsLeftOver,a+=10*m(t).unusedTokens.length,m(t).score=a,s?a<r&&(r=a,n=t):(null==r||a<r||i)&&(r=a,n=t,i&&(s=!0));p(e,n||t)}(e):n?xt(e):function(e){var t=e._i;c(t)?e._d=new Date(o.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=mt.exec(e._i);null===t?(vt(e),!1===e._isValid&&(delete e._isValid,yt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:o.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):a(t)?(e._a=h(t.slice(0),(function(e){return parseInt(e,10)})),kt(e)):i(t)?function(e){if(!e._d){var t=B(e._i),n=void 0===t.day?t.date:t.day;e._a=h([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),kt(e)}}(e):u(t)?e._d=new Date(t):o.createFromInputFallback(e)}(e),g(e)||(e._d=null),e))}function Et(e,t,n,r,o){var s,c={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(i(e)&&l(e)||a(e)&&0===e.length)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=o,c._l=n,c._i=e,c._f=t,c._strict=r,(s=new w(ct(Mt(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Tt(e,t,n,r){return Et(e,t,n,r,!1)}o.createFromInputFallback=M("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. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var St=M("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),Dt=M("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));function Lt(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Ct=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Pt(e){var t=B(e),n=t.year||0,r=t.quarter||0,o=t.month||0,a=t.week||t.isoWeek||0,i=t.day||0,l=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,r=!1;for(t in e)if(s(e,t)&&(-1===_e.call(Ct,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<Ct.length;++n)if(e[Ct[n]]){if(r)return!1;parseFloat(e[Ct[n]])!==G(e[Ct[n]])&&(r=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*c+1e3*l*60*60,this._days=+i+7*a,this._months=+o+3*r+12*n,this._data={},this._locale=lt(),this._bubble()}function Ot(e){return e instanceof Pt}function Nt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function At(e,t){R(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+P(~~(e/60),2)+t+P(~~e%60,2)}))}At("Z",":"),At("ZZ",""),fe("Z",he),fe("ZZ",he),be(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Rt(he,e)}));var It=/([\+\-]|\d\d)/gi;function Rt(e,t){var n,r,o=(t||"").match(e);return null===o?null:0===(r=60*(n=((o[o.length-1]||[])+"").match(It)||["-",0,0])[1]+G(n[2]))?0:"+"===n[0]?r:-r}function Yt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(k(e)||d(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),o.updateOffset(n,!1),n):Tt(e).local()}function jt(e){return-Math.round(e._d.getTimezoneOffset())}function Ft(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Ht=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,zt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Bt(e,t){var n,r,o,a,i,l,c=e,d=null;return Ot(e)?c={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(c={},t?c[t]=+e:c.milliseconds=+e):(d=Ht.exec(e))?(n="-"===d[1]?-1:1,c={y:0,d:G(d[2])*n,h:G(d[3])*n,m:G(d[4])*n,s:G(d[5])*n,ms:G(Nt(1e3*d[6]))*n}):(d=zt.exec(e))?(n="-"===d[1]?-1:1,c={y:Ut(d[2],n),M:Ut(d[3],n),w:Ut(d[4],n),d:Ut(d[5],n),h:Ut(d[6],n),m:Ut(d[7],n),s:Ut(d[8],n)}):null==c?c={}:"object"==typeof c&&("from"in c||"to"in c)&&(a=Tt(c.from),i=Tt(c.to),o=a.isValid()&&i.isValid()?(i=Yt(i,a),a.isBefore(i)?l=Vt(a,i):((l=Vt(i,a)).milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0},(c={}).ms=o.milliseconds,c.M=o.months),r=new Pt(c),Ot(e)&&s(e,"_locale")&&(r._locale=e._locale),Ot(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Ut(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Vt(e,t){var n={};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 Wt(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(S(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."),o=n,n=r,r=o),qt(this,Bt(n,r),e),this}}function qt(e,t,n,r){var a=t._milliseconds,i=Nt(t._days),s=Nt(t._months);e.isValid()&&(r=null==r||r,s&&Le(e,K(e,"Month")+s*n),i&&Q(e,"Date",K(e,"Date")+i*n),a&&e._d.setTime(e._d.valueOf()+a*n),r&&o.updateOffset(e,i||s))}Bt.fn=Pt.prototype,Bt.invalid=function(){return Bt(NaN)};var Gt=Wt(1,"add"),Jt=Wt(-1,"subtract");function Kt(e){return"string"==typeof e||e instanceof String}function Qt(e){return k(e)||d(e)||Kt(e)||u(e)||function(e){var t=a(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&Kt(e)})).length),t&&n}(e)||function(e){var t,n,r=i(e)&&!l(e),o=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<a.length;t+=1)n=a[t],o=o||s(e,n);return r&&o}(e)||null==e}function Xt(e){var t,n=i(e)&&!l(e),r=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)r=r||s(e,o[t]);return n&&r}function $t(e,t){if(e.date()<t.date())return-$t(t,e);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 Zt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var en=M("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 tn(){return this._locale}function nn(e,t){return(e%t+t)%t}function rn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function on(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function an(e,t){return t.erasAbbrRegex(e)}function sn(){var e,t,n=[],r=[],o=[],a=[],i=this.eras();for(e=0,t=i.length;e<t;++e)r.push(ge(i[e].name)),n.push(ge(i[e].abbr)),o.push(ge(i[e].narrow)),a.push(ge(i[e].name)),a.push(ge(i[e].abbr)),a.push(ge(i[e].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function ln(e,t){R(0,[e,e.length],0,t)}function cn(e,t,n,r,o){var a;return null==e?je(this,r,o).year:(t>(a=Fe(e,r,o))&&(t=a),un.call(this,e,t,n,r,o))}function un(e,t,n,r,o){var a=Ye(e,t,n,r,o),i=Ie(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}R("N",0,0,"eraAbbr"),R("NN",0,0,"eraAbbr"),R("NNN",0,0,"eraAbbr"),R("NNNN",0,0,"eraName"),R("NNNNN",0,0,"eraNarrow"),R("y",["y",1],"yo","eraYear"),R("y",["yy",2],0,"eraYear"),R("y",["yyy",3],0,"eraYear"),R("y",["yyyy",4],0,"eraYear"),fe("N",an),fe("NN",an),fe("NNN",an),fe("NNNN",(function(e,t){return t.erasNameRegex(e)})),fe("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),be(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?m(n).era=o:m(n).invalidEra=e})),fe("y",ce),fe("yy",ce),fe("yyy",ce),fe("yyyy",ce),fe("yo",(function(e,t){return t._eraYearOrdinalRegex||ce})),be(["y","yy","yyy","yyyy"],0),be(["yo"],(function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,o):t[0]=parseInt(e,10)})),R(0,["gg",2],0,(function(){return this.weekYear()%100})),R(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ln("gggg","weekYear"),ln("ggggg","weekYear"),ln("GGGG","isoWeekYear"),ln("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),V("weekYear",1),V("isoWeekYear",1),fe("G",ue),fe("g",ue),fe("GG",re,Z),fe("gg",re,Z),fe("GGGG",se,te),fe("gggg",se,te),fe("GGGGG",le,ne),fe("ggggg",le,ne),ye(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=G(e)})),ye(["gg","GG"],(function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)})),R("Q",0,"Qo","quarter"),H("quarter","Q"),V("quarter",7),fe("Q",$),be("Q",(function(e,t){t[1]=3*(G(e)-1)})),R("D",["DD",2],"Do","date"),H("date","D"),V("date",9),fe("D",re),fe("DD",re,Z),fe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),be(["D","DD"],2),be("Do",(function(e,t){t[2]=G(e.match(re)[0])}));var dn=J("Date",!0);R("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),V("dayOfYear",4),fe("DDD",ie),fe("DDDD",ee),be(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=G(e)})),R("m",["mm",2],0,"minute"),H("minute","m"),V("minute",14),fe("m",re),fe("mm",re,Z),be(["m","mm"],4);var hn=J("Minutes",!1);R("s",["ss",2],0,"second"),H("second","s"),V("second",15),fe("s",re),fe("ss",re,Z),be(["s","ss"],5);var pn,fn,mn=J("Seconds",!1);for(R("S",0,0,(function(){return~~(this.millisecond()/100)})),R(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),R(0,["SSS",3],0,"millisecond"),R(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),R(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),R(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),R(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),R(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),R(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),H("millisecond","ms"),V("millisecond",16),fe("S",ie,$),fe("SS",ie,Z),fe("SSS",ie,ee),pn="SSSS";pn.length<=9;pn+="S")fe(pn,ce);function gn(e,t){t[6]=G(1e3*("0."+e))}for(pn="S";pn.length<=9;pn+="S")be(pn,gn);fn=J("Milliseconds",!1),R("z",0,0,"zoneAbbr"),R("zz",0,0,"zoneName");var _n=w.prototype;function vn(e){return e}_n.add=Gt,_n.calendar=function(e,t){1===arguments.length&&(arguments[0]?Qt(arguments[0])?(e=arguments[0],t=void 0):Xt(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Tt(),r=Yt(n,this).startOf("day"),a=o.calendarFormat(this,r)||"sameElse",i=t&&(D(t[a])?t[a].call(this,n):t[a]);return this.format(i||this.localeData().calendar(a,this,Tt(n)))},_n.clone=function(){return new w(this)},_n.diff=function(e,t,n){var r,o,a;if(!this.isValid())return NaN;if(!(r=Yt(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=z(t)){case"year":a=$t(this,r)/12;break;case"month":a=$t(this,r);break;case"quarter":a=$t(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-o)/864e5;break;case"week":a=(this-r-o)/6048e5;break;default:a=this-r}return n?a:q(a)},_n.endOf=function(e){var t,n;if(void 0===(e=z(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?on:rn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-nn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-nn(t,1e3)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},_n.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=Y(this,e);return this.localeData().postformat(t)},_n.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Tt(e).isValid())?Bt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},_n.fromNow=function(e){return this.from(Tt(),e)},_n.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Tt(e).isValid())?Bt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},_n.toNow=function(e){return this.to(Tt(),e)},_n.get=function(e){return D(this[e=z(e)])?this[e]():this},_n.invalidAt=function(){return m(this).overflow},_n.isAfter=function(e,t){var n=k(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=z(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},_n.isBefore=function(e,t){var n=k(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=z(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},_n.isBetween=function(e,t,n,r){var o=k(e)?e:Tt(e),a=k(t)?t:Tt(t);return!!(this.isValid()&&o.isValid()&&a.isValid())&&(("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n)))},_n.isSame=function(e,t){var n,r=k(e)?e:Tt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=z(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 g(this)},_n.lang=en,_n.locale=Zt,_n.localeData=tn,_n.max=Dt,_n.min=St,_n.parsingFlags=function(){return p({},m(this))},_n.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:U[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=B(e));for(n=0;n<r.length;n++)this[r[n].unit](e[r[n].unit])}else if(D(this[e=z(e)]))return this[e](t);return this},_n.startOf=function(e){var t,n;if(void 0===(e=z(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?on:rn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=nn(t,6e4);break;case"second":t=this._d.valueOf(),t-=nn(t,1e3)}return this._d.setTime(t),o.updateOffset(this,!0),this},_n.subtract=Jt,_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?Y(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Y(n,"Z")):Y(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,t,n,r="moment",o="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=o+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(_n[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),_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.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},_n.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},_n.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},_n.eraYear=function(){var e,t,n,r,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,r=this.clone().startOf("day").valueOf(),a[e].since<=r&&r<=a[e].until||a[e].until<=r&&r<=a[e].since)return(this.year()-o(a[e].since).year())*n+a[e].offset;return this.year()},_n.year=Ne,_n.isLeapYear=function(){return W(this.year())},_n.weekYear=function(e){return cn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},_n.isoWeekYear=function(e){return cn.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=Ce,_n.daysInMonth=function(){return ke(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=je(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},_n.weeksInYear=function(){var e=this.localeData()._week;return Fe(this.year(),e.dow,e.doy)},_n.weeksInWeekYear=function(){var e=this.localeData()._week;return Fe(this.weekYear(),e.dow,e.doy)},_n.isoWeeksInYear=function(){return Fe(this.year(),1,4)},_n.isoWeeksInISOWeekYear=function(){return Fe(this.isoWeekYear(),1,4)},_n.date=dn,_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=Ze,_n.minute=_n.minutes=hn,_n.second=_n.seconds=mn,_n.millisecond=_n.milliseconds=fn,_n.utcOffset=function(e,t,n){var r,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Rt(he,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=jt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==e&&(!t||this._changeInProgress?qt(this,Bt(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:jt(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(jt(this),"m")),this},_n.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Rt(de,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},_n.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(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=Ft,_n.isUTC=Ft,_n.zoneAbbr=function(){return this._isUTC?"UTC":""},_n.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},_n.dates=M("dates accessor is deprecated. Use date instead.",dn),_n.months=M("months accessor is deprecated. Use month instead",Ce),_n.years=M("years accessor is deprecated. Use year instead",Ne),_n.zone=M("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=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return y(t,this),(t=Mt(t))._a?(e=t._isUTC?f(t._a):Tt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,o=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),i=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&G(e[r])!==G(t[r]))&&i++;return i+a}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var bn=C.prototype;function yn(e,t,n,r){var o=lt(),a=f().set(r,t);return o[n](a,e)}function wn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return yn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=yn(e,r,n,"month");return o}function kn(e,t,n,r){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var o,a=lt(),i=e?a._week.dow:0,s=[];if(null!=n)return yn(t,(n+i)%7,r,"day");for(o=0;o<7;o++)s[o]=yn(t,(o+i)%7,r,"day");return s}bn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return D(r)?r.call(t,n):r},bn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(O).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},bn.invalidDate=function(){return this._invalidDate},bn.ordinal=function(e){return this._ordinal.replace("%d",e)},bn.preparse=vn,bn.postformat=vn,bn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return D(o)?o(e,t,n,r):o.replace(/%d/i,e)},bn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return D(n)?n(t):n.replace(/%s/i,t)},bn.set=function(e){var t,n;for(n in e)s(e,n)&&(D(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)},bn.eras=function(e,t){var n,r,a,i=this._eras||lt("en")._eras;for(n=0,r=i.length;n<r;++n){switch(typeof i[n].since){case"string":a=o(i[n].since).startOf("day"),i[n].since=a.valueOf()}switch(typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":a=o(i[n].until).startOf("day").valueOf(),i[n].until=a.valueOf()}}return i},bn.erasParse=function(e,t,n){var r,o,a,i,s,l=this.eras();for(e=e.toUpperCase(),r=0,o=l.length;r<o;++r)if(a=l[r].name.toUpperCase(),i=l[r].abbr.toUpperCase(),s=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(i===e)return l[r];break;case"NNNN":if(a===e)return l[r];break;case"NNNNN":if(s===e)return l[r]}else if([a,i,s].indexOf(e)>=0)return l[r]},bn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?o(e.since).year():o(e.since).year()+(t-e.offset)*n},bn.erasAbbrRegex=function(e){return s(this,"_erasAbbrRegex")||sn.call(this),e?this._erasAbbrRegex:this._erasRegex},bn.erasNameRegex=function(e){return s(this,"_erasNameRegex")||sn.call(this),e?this._erasNameRegex:this._erasRegex},bn.erasNarrowRegex=function(e){return s(this,"_erasNarrowRegex")||sn.call(this),e?this._erasNarrowRegex:this._erasRegex},bn.months=function(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ee).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone},bn.monthsShort=function(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ee.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},bn.monthsParse=function(e,t,n){var r,o,a;if(this._monthsParseExact)return De.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(a.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}},bn.monthsRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||Pe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=Se),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},bn.monthsShortRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||Pe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=Te),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},bn.week=function(e){return je(e,this._week.dow,this._week.doy).week},bn.firstDayOfYear=function(){return this._week.doy},bn.firstDayOfWeek=function(){return this._week.dow},bn.weekdays=function(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?He(n,this._week.dow):e?n[e.day()]:n},bn.weekdaysMin=function(e){return!0===e?He(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},bn.weekdaysShort=function(e){return!0===e?He(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},bn.weekdaysParse=function(e,t,n){var r,o,a;if(this._weekdaysParseExact)return Ge.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(a.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}},bn.weekdaysRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Ve),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},bn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=We),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},bn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Je.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=qe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},bn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},bn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},it("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===G(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=M("moment.lang is deprecated. Use moment.locale instead.",it),o.langData=M("moment.langData is deprecated. Use moment.localeData instead.",lt);var xn=Math.abs;function Mn(e,t,n,r){var o=Bt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function En(e){return e<0?Math.floor(e):Math.ceil(e)}function Tn(e){return 4800*e/146097}function Sn(e){return 146097*e/4800}function Dn(e){return function(){return this.as(e)}}var Ln=Dn("ms"),Cn=Dn("s"),Pn=Dn("m"),On=Dn("h"),Nn=Dn("d"),An=Dn("w"),In=Dn("M"),Rn=Dn("Q"),Yn=Dn("y");function jn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Fn=jn("milliseconds"),Hn=jn("seconds"),zn=jn("minutes"),Bn=jn("hours"),Un=jn("days"),Vn=jn("months"),Wn=jn("years"),qn=Math.round,Gn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Jn(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var Kn=Math.abs;function Qn(e){return(e>0)-(e<0)||+e}function Xn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,a,i,s,l=Kn(this._milliseconds)/1e3,c=Kn(this._days),u=Kn(this._months),d=this.asSeconds();return d?(e=q(l/60),t=q(e/60),l%=60,e%=60,n=q(u/12),u%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=d<0?"-":"",a=Qn(this._months)!==Qn(d)?"-":"",i=Qn(this._days)!==Qn(d)?"-":"",s=Qn(this._milliseconds)!==Qn(d)?"-":"",o+"P"+(n?a+n+"Y":"")+(u?a+u+"M":"")+(c?i+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var $n=Pt.prototype;return $n.isValid=function(){return this._isValid},$n.abs=function(){var e=this._data;return this._milliseconds=xn(this._milliseconds),this._days=xn(this._days),this._months=xn(this._months),e.milliseconds=xn(e.milliseconds),e.seconds=xn(e.seconds),e.minutes=xn(e.minutes),e.hours=xn(e.hours),e.months=xn(e.months),e.years=xn(e.years),this},$n.add=function(e,t){return Mn(this,e,t,1)},$n.subtract=function(e,t){return Mn(this,e,t,-1)},$n.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=z(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Tn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Sn(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)}},$n.asMilliseconds=Ln,$n.asSeconds=Cn,$n.asMinutes=Pn,$n.asHours=On,$n.asDays=Nn,$n.asWeeks=An,$n.asMonths=In,$n.asQuarters=Rn,$n.asYears=Yn,$n.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*G(this._months/12):NaN},$n._bubble=function(){var e,t,n,r,o,a=this._milliseconds,i=this._days,s=this._months,l=this._data;return a>=0&&i>=0&&s>=0||a<=0&&i<=0&&s<=0||(a+=864e5*En(Sn(s)+i),i=0,s=0),l.milliseconds=a%1e3,e=q(a/1e3),l.seconds=e%60,t=q(e/60),l.minutes=t%60,n=q(t/60),l.hours=n%24,i+=q(n/24),o=q(Tn(i)),s+=o,i-=En(Sn(o)),r=q(s/12),s%=12,l.days=i,l.months=s,l.years=r,this},$n.clone=function(){return Bt(this)},$n.get=function(e){return e=z(e),this.isValid()?this[e+"s"]():NaN},$n.milliseconds=Fn,$n.seconds=Hn,$n.minutes=zn,$n.hours=Bn,$n.days=Un,$n.weeks=function(){return q(this.days()/7)},$n.months=Vn,$n.years=Wn,$n.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,a=Gn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(a=Object.assign({},Gn,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),n=this.localeData(),r=function(e,t,n,r){var o=Bt(e).abs(),a=qn(o.as("s")),i=qn(o.as("m")),s=qn(o.as("h")),l=qn(o.as("d")),c=qn(o.as("M")),u=qn(o.as("w")),d=qn(o.as("y")),h=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||i<=1&&["m"]||i<n.m&&["mm",i]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(h=h||u<=1&&["w"]||u<n.w&&["ww",u]),(h=h||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=r,Jn.apply(null,h)}(this,!o,a,n),o&&(r=n.pastFuture(+this,r)),n.postformat(r)},$n.toISOString=Xn,$n.toString=Xn,$n.toJSON=Xn,$n.locale=Zt,$n.localeData=tn,$n.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Xn),$n.lang=en,R("X",0,0,"unix"),R("x",0,0,"valueOf"),fe("x",ue),fe("X",/[+-]?\d+(\.\d{1,3})?/),be("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),be("x",(function(e,t,n){n._d=new Date(G(e))})),
|
2 |
//! moment.js
|
3 |
+
o.version="2.29.1",t=Tt,o.fn=_n,o.min=function(){var e=[].slice.call(arguments,0);return Lt("isBefore",e)},o.max=function(){var e=[].slice.call(arguments,0);return Lt("isAfter",e)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=f,o.unix=function(e){return Tt(1e3*e)},o.months=function(e,t){return wn(e,t,"months")},o.isDate=d,o.locale=it,o.invalid=_,o.duration=Bt,o.isMoment=k,o.weekdays=function(e,t,n){return kn(e,t,n,"weekdays")},o.parseZone=function(){return Tt.apply(null,arguments).parseZone()},o.localeData=lt,o.isDuration=Ot,o.monthsShort=function(e,t){return wn(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return kn(e,t,n,"weekdaysMin")},o.defineLocale=st,o.updateLocale=function(e,t){if(null!=t){var n,r,o=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(L(tt[e]._config,t)):(null!=(r=at(e))&&(o=r._config),t=L(o,t),null==r&&(t.abbr=e),(n=new C(t)).parentLocale=tt[e],tt[e]=n),it(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===it()&&it(e)):null!=tt[e]&&delete tt[e]);return tt[e]},o.locales=function(){return E(tt)},o.weekdaysShort=function(e,t,n){return kn(e,t,n,"weekdaysShort")},o.normalizeUnits=z,o.relativeTimeRounding=function(e){return void 0===e?qn:"function"==typeof e&&(qn=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==Gn[e]&&(void 0===t?Gn[e]:(Gn[e]=t,"s"===e&&(Gn.ss=t-1),!0))},o.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"},o.prototype=_n,o.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:"GGGG-[W]WW",MONTH:"YYYY-MM"},o}()}).call(this,n(64)(e))},function(e,t,n){e.exports=n(261)},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(2);function o(e){Object(r.a)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){"use strict";function r(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}n.d(t,"a",(function(){return r}))},function(e,t){function n(e,t,n,r,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function s(e){n(i,o,a,s,l,"next",e)}function l(e){n(i,o,a,s,l,"throw",e)}s(void 0)}))}}},function(e,t,n){e.exports=n(262)},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";t.__esModule=!0;var r=l(n(279));t.ToastContainer=r.default;var o=n(91);t.Bounce=o.Bounce,t.Slide=o.Slide,t.Zoom=o.Zoom,t.Flip=o.Flip;var a=n(34);t.ToastPosition=a.POSITION,t.ToastType=a.TYPE;var i=l(n(289));t.toast=i.default;var s=l(n(92));function l(e){return e&&e.__esModule?e:{default:e}}t.cssTransition=s.default},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(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)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(259);e.exports=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&&r(e,t)}},function(e,t,n){var r=n(260),o=n(10);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){"use strict";var r=n(84),o=n(263),a=Object.prototype.toString;function i(e){return"[object Array]"===a.call(e)}function s(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===a.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===a.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===a.call(e)},isFile:function(e){return"[object File]"===a.call(e)},isBlob:function(e){return"[object Blob]"===a.call(e)},isFunction:l,isStream:function(e){return s(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function e(){var t={};function n(n,r){"object"==typeof t[r]&&"object"==typeof n?t[r]=e(t[r],n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return t},extend:function(e,t,n){return c(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n(5),o=n(7),a=n(2);function i(e,t){Object(a.a)(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,l=null==s?0:Object(o.a)(s),c=null==n.weekStartsOn?l:Object(o.a)(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Object(r.default)(e),d=u.getDay(),h=(d<c?7:0)+d-c;return u.setDate(u.getDate()-h),u.setHours(0,0,0,0),u}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(7),o=n(5),a=n(2);function i(e,t){Object(a.a)(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,l=null==s?0:Object(r.a)(s),c=null==n.weekStartsOn?l:Object(r.a)(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Object(o.default)(e),d=u.getUTCDay(),h=(d<c?7:0)+d-c;return u.setUTCDate(u.getUTCDate()-h),u.setUTCHours(0,0,0,0),u}},function(e,t,n){e.exports=n(280)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));function r(e){return e.getTime()%6e4}function o(e){var t=new Date(e.getTime()),n=Math.ceil(t.getTimezoneOffset());return t.setSeconds(0,0),6e4*n+(n>0?(6e4+r(t))%6e4:r(t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(5),o=n(2);function a(e){Object(o.a)(1,arguments);var t=1,n=Object(r.default)(e),a=n.getUTCDay(),i=(a<t?7:0)+a-t;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s}));var r=["D","DD"],o=["YY","YYYY"];function a(e){return-1!==r.indexOf(e)}function i(e){return-1!==o.indexOf(e)}function s(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Draggable",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"Droppable",{enumerable:!0,get:function(){return o.default}});var r=a(n(447)),o=a(n(448));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r=n(241),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";
|
4 |
/*!
|
5 |
* react-filepond v5.0.0
|
6 |
* A handy FilePond adapter component for React
|
320 |
//! moment.js locale configuration
|
321 |
e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(3))},function(e,t,n){!function(e){"use strict";
|
322 |
//! moment.js locale configuration
|
323 |
+
e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(3))},function(e,t,n){var r=n(291);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(293)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){"use strict";var r=Array.prototype.slice,o=n(231),a=Object.keys,i=a?function(e){return a(e)}:n(337),s=Object.keys;i.shim=function(){Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return o(e)?s(r.call(e)):s(e)}):Object.keys=i;return Object.keys||i},e.exports=i},function(e,t,n){"use strict";var r=Object.prototype.toString;e.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";var r=SyntaxError,o=Function,a=TypeError,i=function(e){try{return Function('"use strict"; return ('+e+").constructor;")()}catch(e){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(e){s=null}var l=function(){throw new a},c=s?function(){try{return l}catch(e){try{return s(arguments,"callee").get}catch(e){return l}}}():l,u=n(65)(),d=Object.getPrototypeOf||function(e){return e.__proto__},h=i("async function* () {}"),p=h?h.prototype:void 0,f=p?p.prototype:void 0,m="undefined"==typeof Uint8Array?void 0:d(Uint8Array),g={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":u?d([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":i("async function () {}"),"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":f?d(f):void 0,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":i("function* () {}"),"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u?d(d([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&u?d((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&u?d((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u?d(""[Symbol.iterator]()):void 0,"%Symbol%":u?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":c,"%TypedArray%":m,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},_={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=n(36),b=n(342),y=v.call(Function.call,Array.prototype.concat),w=v.call(Function.apply,Array.prototype.splice),k=v.call(Function.call,String.prototype.replace),x=v.call(Function.call,String.prototype.slice),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E=/\\(\\)?/g,T=function(e){var t=x(e,0,1),n=x(e,-1);if("%"===t&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new r("invalid intrinsic syntax, expected opening `%`");var o=[];return k(e,M,(function(e,t,n,r){o[o.length]=n?k(r,E,"$1"):t||e})),o},S=function(e,t){var n,o=e;if(b(_,o)&&(o="%"+(n=_[o])[0]+"%"),b(g,o)){var i=g[o];if(void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:o,value:i}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');var n=T(e),o=n.length>0?n[0]:"",i=S("%"+o+"%",t),l=i.name,c=i.value,u=!1,d=i.alias;d&&(o=d[0],w(n,y([0,1],d)));for(var h=1,p=!0;h<n.length;h+=1){var f=n[h],m=x(f,0,1),_=x(f,-1);if(('"'===m||"'"===m||"`"===m||'"'===_||"'"===_||"`"===_)&&m!==_)throw new r("property names with quotes must have matching quotes");if("constructor"!==f&&p||(u=!0),b(g,l="%"+(o+="."+f)+"%"))c=g[l];else if(null!=c){if(!(f in c)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(s&&h+1>=n.length){var v=s(c,f);c=(p=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[f]}else p=b(c,f),c=c[f];p&&!u&&(g[l]=c)}}return c}},function(e,t,n){"use strict";var r=n(36),o=n(232),a=o("%Function.prototype.apply%"),i=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||r.call(i,a),l=o("%Object.defineProperty%",!0);if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(){return s(r,i,arguments)};var c=function(){return s(r,a,arguments)};l?l(e.exports,"apply",{value:c}):e.exports.apply=c},function(e,t,n){"use strict";var r=function(e){return e!=e};e.exports=function(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!r(e)||!r(t))}},function(e,t,n){"use strict";var r=n(234);e.exports=function(){return"function"==typeof Object.is?Object.is:r}},function(e,t,n){"use strict";var r=Object,o=TypeError;e.exports=function(){if(null!=this&&this!==r(this))throw new o("RegExp.prototype.flags getter called on non-object");var e="";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e}},function(e,t,n){"use strict";var r=n(236),o=n(37).supportsDescriptors,a=Object.getOwnPropertyDescriptor,i=TypeError;e.exports=function(){if(!o)throw new i("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=a(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return r}},function(e,t,n){var r=n(45),o=n(361),a=n(362),i=n(363),s=n(364),l=n(365);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=s,c.prototype.set=l,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(38),o=n(68);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(35))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(384),o=n(387),a=n(388);e.exports=function(e,t,n,i,s,l){var c=1&n,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f<u;){var _=e[f],v=t[f];if(i)var b=c?i(v,_,f,t,e,l):i(_,v,f,e,t,l);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!o(t,(function(e,t){if(!a(g,t)&&(_===e||s(_,e,n,i,l)))return g.push(t)}))){m=!1;break}}else if(_!==v&&!s(_,v,n,i,l)){m=!1;break}}return l.delete(e),l.delete(t),m}},function(e,t,n){var r=n(402),o=n(39),a=Object.prototype,i=a.hasOwnProperty,s=a.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},function(e,t,n){(function(e){var r=n(24),o=n(403),a=t&&!t.nodeType&&t,i=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=i&&i.exports===a?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l}).call(this,n(64)(e))},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(404),o=n(405),a=n(406),i=a&&a.isTypedArray,s=i?o(i):r;e.exports=s},function(e,t,n){var r=n(240),o=n(71);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(68);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(252),o=n(50);e.exports=function(e,t){for(var n=0,a=(t=r(t,e)).length;null!=e&&n<a;)e=e[o(t[n++])];return n&&n==a?e:void 0}},function(e,t,n){var r=n(25),o=n(72),a=n(433),i=n(436);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:a(i(e))}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){var r=n(230),o=n(338),a=n(343),i=n(345),s=n(346),l=n(350),c=Date.prototype.getTime;function u(e,t,n){var p=n||{};return!!(p.strict?a(e,t):e===t)||(!e||!t||"object"!=typeof e&&"object"!=typeof t?p.strict?a(e,t):e==t:function(e,t,n){var a,p;if(typeof e!=typeof t)return!1;if(d(e)||d(t))return!1;if(e.prototype!==t.prototype)return!1;if(o(e)!==o(t))return!1;var f=i(e),m=i(t);if(f!==m)return!1;if(f||m)return e.source===t.source&&s(e)===s(t);if(l(e)&&l(t))return c.call(e)===c.call(t);var g=h(e),_=h(t);if(g!==_)return!1;if(g||_){if(e.length!==t.length)return!1;for(a=0;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}if(typeof e!=typeof t)return!1;try{var v=r(e),b=r(t)}catch(e){return!1}if(v.length!==b.length)return!1;for(v.sort(),b.sort(),a=v.length-1;a>=0;a--)if(v[a]!=b[a])return!1;for(a=v.length-1;a>=0;a--)if(p=v[a],!u(e[p],t[p],n))return!1;return!0}(e,t,p))}function d(e){return null==e}function h(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(e.length>0&&"number"!=typeof e[0]))}e.exports=u},function(e,t,n){"use strict";
|
324 |
/** @license React v16.14.0
|
325 |
* react.production.min.js
|
326 |
*
|
358 |
* (c) 2020 Chart.js Contributors
|
359 |
* Released under the MIT License
|
360 |
*/
|
361 |
+
e.exports=function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[t[r]]=r);var o=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var a in o)if(o.hasOwnProperty(a)){if(!("channels"in o[a]))throw new Error("missing channels property: "+a);if(!("labels"in o[a]))throw new Error("missing channel labels property: "+a);if(o[a].labels.length!==o[a].channels)throw new Error("channel and label counts mismatch: "+a);var i=o[a].channels,s=o[a].labels;delete o[a].channels,delete o[a].labels,Object.defineProperty(o[a],"channels",{value:i}),Object.defineProperty(o[a],"labels",{value:s})}o.rgb.hsl=function(e){var t,n,r=e[0]/255,o=e[1]/255,a=e[2]/255,i=Math.min(r,o,a),s=Math.max(r,o,a),l=s-i;return s===i?t=0:r===s?t=(o-a)/l:o===s?t=2+(a-r)/l:a===s&&(t=4+(r-o)/l),(t=Math.min(60*t,360))<0&&(t+=360),n=(i+s)/2,[t,100*(s===i?0:n<=.5?l/(s+i):l/(2-s-i)),100*n]},o.rgb.hsv=function(e){var t,n,r,o,a,i=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(i,s,l),u=c-Math.min(i,s,l),d=function(e){return(c-e)/6/u+.5};return 0===u?o=a=0:(a=u/c,t=d(i),n=d(s),r=d(l),i===c?o=r-n:s===c?o=1/3+t-r:l===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*a,100*c]},o.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[o.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(n,r))*100,100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},o.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-o)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-o-t)/(1-t)||0),100*t]},o.rgb.keyword=function(e){var r=n[e];if(r)return r;var o,a,i,s=1/0;for(var l in t)if(t.hasOwnProperty(l)){var c=t[l],u=(a=e,i=c,Math.pow(a[0]-i[0],2)+Math.pow(a[1]-i[1],2)+Math.pow(a[2]-i[2],2));u<s&&(s=u,o=l)}return o},o.keyword.rgb=function(e){return t[e]},o.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},o.rgb.lab=function(e){var t=o.rgb.xyz(e),n=t[0],r=t[1],a=t[2];return r/=100,a/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]},o.hsl.rgb=function(e){var t,n,r,o,a,i=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[a=255*l,a,a];t=2*l-(n=l<.5?l*(1+s):l+s-l*s),o=[0,0,0];for(var c=0;c<3;c++)(r=i+1/3*-(c-1))<0&&r++,r>1&&r--,a=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,o[c]=255*a;return o},o.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,o=n,a=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,o*=a<=1?a:2-a,[t,100*(0===r?2*o/(a+o):2*n/(r+n)),(r+n)/2*100]},o.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,o=Math.floor(t)%6,a=t-Math.floor(t),i=255*r*(1-n),s=255*r*(1-n*a),l=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,l,i];case 1:return[s,r,i];case 2:return[i,r,l];case 3:return[i,s,r];case 4:return[l,i,r];case 5:return[r,i,s]}},o.hsv.hsl=function(e){var t,n,r,o=e[0],a=e[1]/100,i=e[2]/100,s=Math.max(i,.01);return r=(2-a)*i,n=a*s,[o,100*(n=(n/=(t=(2-a)*s)<=1?t:2-t)||0),100*(r/=2)]},o.hwb.rgb=function(e){var t,n,r,o,a,i,s,l=e[0]/360,c=e[1]/100,u=e[2]/100,d=c+u;switch(d>1&&(c/=d,u/=d),r=6*l-(t=Math.floor(6*l)),0!=(1&t)&&(r=1-r),o=c+r*((n=1-u)-c),t){default:case 6:case 0:a=n,i=o,s=c;break;case 1:a=o,i=n,s=c;break;case 2:a=c,i=n,s=o;break;case 3:a=c,i=o,s=n;break;case 4:a=o,i=c,s=n;break;case 5:a=n,i=c,s=o}return[255*a,255*i,255*s]},o.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},o.xyz.rgb=function(e){var t,n,r,o=e[0]/100,a=e[1]/100,i=e[2]/100;return n=-.9689*o+1.8758*a+.0415*i,r=.0557*o+-.204*a+1.057*i,t=(t=3.2406*o+-1.5372*a+-.4986*i)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},o.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},o.lab.xyz=function(e){var t,n,r,o=e[0];t=e[1]/500+(n=(o+16)/116),r=n-e[2]/200;var a=Math.pow(n,3),i=Math.pow(t,3),s=Math.pow(r,3);return n=a>.008856?a:(n-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},o.lab.lch=function(e){var t,n=e[0],r=e[1],o=e[2];return(t=360*Math.atan2(o,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+o*o),t]},o.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},o.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],a=1 in arguments?arguments[1]:o.rgb.hsv(e)[2];if(0===(a=Math.round(a/50)))return 30;var i=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===a&&(i+=60),i},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},o.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},o.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},o.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},o.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255,a=Math.max(Math.max(n,r),o),i=Math.min(Math.min(n,r),o),s=a-i;return t=s<=0?0:a===n?(r-o)/s%6:a===r?2+(o-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?i/(1-s):0)]},o.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,o=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},o.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},o.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var o,a=[0,0,0],i=t%1*6,s=i%1,l=1-s;switch(Math.floor(i)){case 0:a[0]=1,a[1]=s,a[2]=0;break;case 1:a[0]=l,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=s;break;case 3:a[0]=0,a[1]=l,a[2]=1;break;case 4:a[0]=s,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=l}return o=(1-n)*r,[255*(n*a[0]+o),255*(n*a[1]+o),255*(n*a[2]+o)]},o.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},o.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},o.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},o.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=o.gray.hsv=function(e){return[0,0,e[0]]},o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}));function r(e){var t=function(){for(var e={},t=Object.keys(n),r=t.length,o=0;o<r;o++)e[t[o]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;)for(var o=r.pop(),a=Object.keys(n[o]),i=a.length,s=0;s<i;s++){var l=a[s],c=t[l];-1===c.distance&&(c.distance=t[o].distance+1,c.parent=o,r.unshift(l))}return t}function o(e,t){return function(n){return t(e(n))}}function a(e,t){for(var r=[t[e].parent,e],a=n[t[e].parent][e],i=t[e].parent;t[i].parent;)r.unshift(t[i].parent),a=o(n[t[i].parent][i],a),i=t[i].parent;return a.conversion=r,a}n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;var i={};Object.keys(n).forEach((function(e){i[e]={},Object.defineProperty(i[e],"channels",{value:n[e].channels}),Object.defineProperty(i[e],"labels",{value:n[e].labels});var t=function(e){for(var t=r(e),n={},o=Object.keys(t),i=o.length,s=0;s<i;s++){var l=o[s];null!==t[l].parent&&(n[l]=a(l,t))}return n}(e);Object.keys(t).forEach((function(n){var r=t[n];i[e][n]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,o=0;o<r;o++)n[o]=Math.round(n[o]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(r),i[e][n].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))}));var s=i,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},c={getRgba:u,getHsla:d,getRgb:function(e){var t=u(e);return t&&t.slice(0,3)},getHsl:function(e){var t=d(e);return t&&t.slice(0,3)},getHwb:h,getAlpha:function(e){var t=u(e);return t||(t=d(e))||(t=h(e))?t[3]:void 0},hexString:function(e,t){return t=void 0!==t&&3===e.length?t:e[3],"#"+_(e[0])+_(e[1])+_(e[2])+(t>=0&&t<1?_(Math.round(255*t)):"")},rgbString:function(e,t){return t<1||e[3]&&e[3]<1?p(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:p,percentString:function(e,t){if(t<1||e[3]&&e[3]<1)return f(e,t);var n=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),o=Math.round(e[2]/255*100);return"rgb("+n+"%, "+r+"%, "+o+"%)"},percentaString:f,hslString:function(e,t){return t<1||e[3]&&e[3]<1?m(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:m,hwbString:function(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function(e){return v[e.slice(0,3)]}};function u(e){if(e){var t=[0,0,0],n=1,r=e.match(/^#([a-fA-F0-9]{3,4})$/i),o="";if(r){o=(r=r[1])[3];for(var a=0;a<t.length;a++)t[a]=parseInt(r[a]+r[a],16);o&&(n=Math.round(parseInt(o+o,16)/255*100)/100)}else if(r=e.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(o=r[2],r=r[1],a=0;a<t.length;a++)t[a]=parseInt(r.slice(2*a,2*a+2),16);o&&(n=Math.round(parseInt(o,16)/255*100)/100)}else if(r=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<t.length;a++)t[a]=parseInt(r[a+1]);n=parseFloat(r[4])}else if(r=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<t.length;a++)t[a]=Math.round(2.55*parseFloat(r[a+1]));n=parseFloat(r[4])}else if(r=e.match(/(\w+)/)){if("transparent"==r[1])return[0,0,0,0];if(!(t=l[r[1]]))return}for(a=0;a<t.length;a++)t[a]=g(t[a],0,255);return n=n||0==n?g(n,0,1):1,t[3]=n,t}}function d(e){if(e){var t=e.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[g(parseInt(t[1]),0,360),g(parseFloat(t[2]),0,100),g(parseFloat(t[3]),0,100),g(isNaN(n)?1:n,0,1)]}}}function h(e){if(e){var t=e.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[g(parseInt(t[1]),0,360),g(parseFloat(t[2]),0,100),g(parseFloat(t[3]),0,100),g(isNaN(n)?1:n,0,1)]}}}function p(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function f(e,t){return"rgba("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%, "+(t||e[3]||1)+")"}function m(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function g(e,t,n){return Math.min(Math.max(t,e),n)}function _(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var v={};for(var b in l)v[l[b]]=b;var y=function(e){return e instanceof y?e:this instanceof y?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof e?(t=c.getRgba(e))?this.setValues("rgb",t):(t=c.getHsla(e))?this.setValues("hsl",t):(t=c.getHwb(e))&&this.setValues("hwb",t):"object"==typeof e&&(void 0!==(t=e).r||void 0!==t.red?this.setValues("rgb",t):void 0!==t.l||void 0!==t.lightness?this.setValues("hsl",t):void 0!==t.v||void 0!==t.value?this.setValues("hsv",t):void 0!==t.w||void 0!==t.whiteness?this.setValues("hwb",t):void 0===t.c&&void 0===t.cyan||this.setValues("cmyk",t)))):new y(e);var t};y.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var e=this.values;return 1!==e.alpha?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values;return e.hsl.concat([e.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return c.hexString(this.values.rgb)},rgbString:function(){return c.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return c.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return c.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return c.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return c.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return c.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return c.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],n=0;n<e.length;n++){var r=e[n]/255;t[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,n=(t[0]+e)%360;return t[0]=n<0?360+n:n,this.setValues("hsl",t),this},mix:function(e,t){var n=e,r=void 0===t?.5:t,o=2*r-1,a=this.alpha()-n.alpha(),i=((o*a==-1?o:(o+a)/(1+o*a))+1)/2,s=1-i;return this.rgb(i*this.red()+s*n.red(),i*this.green()+s*n.green(),i*this.blue()+s*n.blue()).alpha(this.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var e,t,n=new y,r=this.values,o=n.values;for(var a in r)r.hasOwnProperty(a)&&(e=r[a],"[object Array]"===(t={}.toString.call(e))?o[a]=e.slice(0):"[object Number]"===t?o[a]=e:console.error("unexpected color value:",e));return n}},y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},y.prototype.getValues=function(e){for(var t=this.values,n={},r=0;r<e.length;r++)n[e.charAt(r)]=t[e][r];return 1!==t.alpha&&(n.a=t.alpha),n},y.prototype.setValues=function(e,t){var n,r,o=this.values,a=this.spaces,i=this.maxes,l=1;if(this.valid=!0,"alpha"===e)l=t;else if(t.length)o[e]=t.slice(0,e.length),l=t[e.length];else if(void 0!==t[e.charAt(0)]){for(n=0;n<e.length;n++)o[e][n]=t[e.charAt(n)];l=t.a}else if(void 0!==t[a[e][0]]){var c=a[e];for(n=0;n<e.length;n++)o[e][n]=t[c[n]];l=t.alpha}if(o.alpha=Math.max(0,Math.min(1,void 0===l?o.alpha:l)),"alpha"===e)return!1;for(n=0;n<e.length;n++)r=Math.max(0,Math.min(i[e][n],o[e][n])),o[e][n]=Math.round(r);for(var u in a)u!==e&&(o[u]=s[e][u](o[e]));return!0},y.prototype.setSpace=function(e,t){var n=t[0];return void 0===n?this.getValues(e):("number"==typeof n&&(n=Array.prototype.slice.call(t)),this.setValues(e,n),this)},y.prototype.setChannel=function(e,t,n){var r=this.values[e];return void 0===n?r[t]:(n===r[t]||(r[t]=n,this.setValues(e,r)),this)},"undefined"!=typeof window&&(window.Color=y);var w=y;function k(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}var x,M={noop:function(){},uid:(x=0,function(){return x++}),isNullOrUndef:function(e){return null==e},isArray:function(e){if(Array.isArray&&Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)},isObject:function(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)},isFinite:function(e){return("number"==typeof e||e instanceof Number)&&isFinite(e)},valueOrDefault:function(e,t){return void 0===e?t:e},valueAtIndexOrDefault:function(e,t,n){return M.valueOrDefault(M.isArray(e)?e[t]:e,n)},callback:function(e,t,n){if(e&&"function"==typeof e.call)return e.apply(n,t)},each:function(e,t,n,r){var o,a,i;if(M.isArray(e))if(a=e.length,r)for(o=a-1;o>=0;o--)t.call(n,e[o],o);else for(o=0;o<a;o++)t.call(n,e[o],o);else if(M.isObject(e))for(a=(i=Object.keys(e)).length,o=0;o<a;o++)t.call(n,e[i[o]],i[o])},arrayEquals:function(e,t){var n,r,o,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(o=e[n],a=t[n],o instanceof Array&&a instanceof Array){if(!M.arrayEquals(o,a))return!1}else if(o!==a)return!1;return!0},clone:function(e){if(M.isArray(e))return e.map(M.clone);if(M.isObject(e)){for(var t=Object.create(e),n=Object.keys(e),r=n.length,o=0;o<r;++o)t[n[o]]=M.clone(e[n[o]]);return t}return e},_merger:function(e,t,n,r){if(k(e)){var o=t[e],a=n[e];M.isObject(o)&&M.isObject(a)?M.merge(o,a,r):t[e]=M.clone(a)}},_mergerIf:function(e,t,n){if(k(e)){var r=t[e],o=n[e];M.isObject(r)&&M.isObject(o)?M.mergeIf(r,o):t.hasOwnProperty(e)||(t[e]=M.clone(o))}},merge:function(e,t,n){var r,o,a,i,s,l=M.isArray(t)?t:[t],c=l.length;if(!M.isObject(e))return e;for(r=(n=n||{}).merger||M._merger,o=0;o<c;++o)if(t=l[o],M.isObject(t))for(s=0,i=(a=Object.keys(t)).length;s<i;++s)r(a[s],e,t,n);return e},mergeIf:function(e,t){return M.merge(e,t,{merger:M._mergerIf})},extend:Object.assign||function(e){return M.merge(e,[].slice.call(arguments,1),{merger:function(e,t,n){t[e]=n[e]}})},inherits:function(e){var t=this,n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},r=function(){this.constructor=n};return r.prototype=t.prototype,n.prototype=new r,n.extend=M.inherits,e&&M.extend(n.prototype,e),n.__super__=t.prototype,n},_deprecated:function(e,t,n,r){void 0!==t&&console.warn(e+': "'+n+'" is deprecated. Please use "'+r+'" instead')}},E=M;M.callCallback=M.callback,M.indexOf=function(e,t,n){return Array.prototype.indexOf.call(e,t,n)},M.getValueOrDefault=M.valueOrDefault,M.getValueAtIndexOrDefault=M.valueAtIndexOrDefault;var T={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return(e-=1)*e*e+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-((e-=1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return(e-=1)*e*e*e*e+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return 1-Math.cos(e*(Math.PI/2))},easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function(e){return 0===e?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return e>=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n))},easeOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:2==(e/=.5)?1:(n||(n=.45),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),e<1?r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-T.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*T.easeInBounce(2*e):.5*T.easeOutBounce(2*e-1)+.5}},S={effects:T};E.easingEffects=T;var D=Math.PI,L=D/180,C=2*D,P=D/2,O=D/4,N=2*D/3,A={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,n,r,o,a){if(a){var i=Math.min(a,o/2,r/2),s=t+i,l=n+i,c=t+r-i,u=n+o-i;e.moveTo(t,l),s<c&&l<u?(e.arc(s,l,i,-D,-P),e.arc(c,l,i,-P,0),e.arc(c,u,i,0,P),e.arc(s,u,i,P,D)):s<c?(e.moveTo(s,n),e.arc(c,l,i,-P,P),e.arc(s,l,i,P,D+P)):l<u?(e.arc(s,l,i,-D,0),e.arc(s,u,i,0,D)):e.arc(s,l,i,-D,D),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,r,o)},drawPoint:function(e,t,n,r,o,a){var i,s,l,c,u,d=(a||0)*L;if(t&&"object"==typeof t&&("[object HTMLImageElement]"===(i=t.toString())||"[object HTMLCanvasElement]"===i))return e.save(),e.translate(r,o),e.rotate(d),e.drawImage(t,-t.width/2,-t.height/2,t.width,t.height),void e.restore();if(!(isNaN(n)||n<=0)){switch(e.beginPath(),t){default:e.arc(r,o,n,0,C),e.closePath();break;case"triangle":e.moveTo(r+Math.sin(d)*n,o-Math.cos(d)*n),d+=N,e.lineTo(r+Math.sin(d)*n,o-Math.cos(d)*n),d+=N,e.lineTo(r+Math.sin(d)*n,o-Math.cos(d)*n),e.closePath();break;case"rectRounded":c=n-(u=.516*n),s=Math.cos(d+O)*c,l=Math.sin(d+O)*c,e.arc(r-s,o-l,u,d-D,d-P),e.arc(r+l,o-s,u,d-P,d),e.arc(r+s,o+l,u,d,d+P),e.arc(r-l,o+s,u,d+P,d+D),e.closePath();break;case"rect":if(!a){c=Math.SQRT1_2*n,e.rect(r-c,o-c,2*c,2*c);break}d+=O;case"rectRot":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,o-l),e.lineTo(r+l,o-s),e.lineTo(r+s,o+l),e.lineTo(r-l,o+s),e.closePath();break;case"crossRot":d+=O;case"cross":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,o-l),e.lineTo(r+s,o+l),e.moveTo(r+l,o-s),e.lineTo(r-l,o+s);break;case"star":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,o-l),e.lineTo(r+s,o+l),e.moveTo(r+l,o-s),e.lineTo(r-l,o+s),d+=O,s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,o-l),e.lineTo(r+s,o+l),e.moveTo(r+l,o-s),e.lineTo(r-l,o+s);break;case"line":s=Math.cos(d)*n,l=Math.sin(d)*n,e.moveTo(r-s,o-l),e.lineTo(r+s,o+l);break;case"dash":e.moveTo(r,o),e.lineTo(r+Math.cos(d)*n,o+Math.sin(d)*n)}e.fill(),e.stroke()}},_isPointInArea:function(e,t){return e.x>t.left-1e-6&&e.x<t.right+1e-6&&e.y>t.top-1e-6&&e.y<t.bottom+1e-6},clipArea:function(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()},unclipArea:function(e){e.restore()},lineTo:function(e,t,n,r){var o=n.steppedLine;if(o){if("middle"===o){var a=(t.x+n.x)/2;e.lineTo(a,r?n.y:t.y),e.lineTo(a,r?t.y:n.y)}else"after"===o&&!r||"after"!==o&&r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}else n.tension?e.bezierCurveTo(r?t.controlPointPreviousX:t.controlPointNextX,r?t.controlPointPreviousY:t.controlPointNextY,r?n.controlPointNextX:n.controlPointPreviousX,r?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):e.lineTo(n.x,n.y)}},I=A;E.clear=A.clear,E.drawRoundedRectangle=function(e){e.beginPath(),A.roundedRect.apply(A,arguments)};var R={_set:function(e,t){return E.merge(this[e]||(this[e]={}),t)}};R._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var Y=R,j=E.valueOrDefault,F={toLineHeight:function(e,t){var n=(""+e).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e},toPadding:function(e){var t,n,r,o;return E.isObject(e)?(t=+e.top||0,n=+e.right||0,r=+e.bottom||0,o=+e.left||0):t=n=r=o=+e||0,{top:t,right:n,bottom:r,left:o,height:t+r,width:o+n}},_parseFont:function(e){var t=Y.global,n=j(e.fontSize,t.defaultFontSize),r={family:j(e.fontFamily,t.defaultFontFamily),lineHeight:E.options.toLineHeight(j(e.lineHeight,t.defaultLineHeight),n),size:n,style:j(e.fontStyle,t.defaultFontStyle),weight:null,string:""};return r.string=function(e){return!e||E.isNullOrUndef(e.size)||E.isNullOrUndef(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(r),r},resolve:function(e,t,n,r){var o,a,i,s=!0;for(o=0,a=e.length;o<a;++o)if(void 0!==(i=e[o])&&(void 0!==t&&"function"==typeof i&&(i=i(t),s=!1),void 0!==n&&E.isArray(i)&&(i=i[n],s=!1),void 0!==i))return r&&!s&&(r.cacheable=!1),i}},H={_factorize:function(e){var t,n=[],r=Math.sqrt(e);for(t=1;t<r;t++)e%t==0&&(n.push(t),n.push(e/t));return r===(0|r)&&n.push(r),n.sort((function(e,t){return e-t})).pop(),n},log10:Math.log10||function(e){var t=Math.log(e)*Math.LOG10E,n=Math.round(t);return e===Math.pow(10,n)?n:t}},z=H;E.log10=H.log10;var B=E,U=S,V=I,W=F,q=z,G={getRtlAdapter:function(e,t,n){return e?function(e,t){return{x:function(n){return e+e+t-n},setWidth:function(e){t=e},textAlign:function(e){return"center"===e?e:"right"===e?"left":"right"},xPlus:function(e,t){return e-t},leftForLtr:function(e,t){return e-t}}}(t,n):{x:function(e){return e},setWidth:function(e){},textAlign:function(e){return e},xPlus:function(e,t){return e+t},leftForLtr:function(e,t){return e}}},overrideTextDirection:function(e,t){var n,r;"ltr"!==t&&"rtl"!==t||(r=[(n=e.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)},restoreTextDirection:function(e){var t=e.prevTextDirection;void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}};B.easing=U,B.canvas=V,B.options=W,B.math=q,B.rtl=G;var J=function(e){B.extend(this,e),this.initialize.apply(this,arguments)};B.extend(J.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var e=this;return e._view||(e._view=B.extend({},e._model)),e._start={},e},transition:function(e){var t=this,n=t._model,r=t._start,o=t._view;return n&&1!==e?(o||(o=t._view={}),r||(r=t._start={}),function(e,t,n,r){var o,a,i,s,l,c,u,d,h,p=Object.keys(n);for(o=0,a=p.length;o<a;++o)if(c=n[i=p[o]],t.hasOwnProperty(i)||(t[i]=c),(s=t[i])!==c&&"_"!==i[0]){if(e.hasOwnProperty(i)||(e[i]=s),(u=typeof c)==typeof(l=e[i]))if("string"===u){if((d=w(l)).valid&&(h=w(c)).valid){t[i]=h.mix(d,r).rgbString();continue}}else if(B.isFinite(l)&&B.isFinite(c)){t[i]=l+(c-l)*r;continue}t[i]=c}}(r,o,n,e),t):(t._view=B.extend({},n),t._start=null,t)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return B.isNumber(this._model.x)&&B.isNumber(this._model.y)}}),J.extend=B.inherits;var K=J,Q=K.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),X=Q;Object.defineProperty(Q.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(Q.prototype,"chartInstance",{get:function(){return this.chart},set:function(e){this.chart=e}}),Y._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:B.noop,onComplete:B.noop}});var $={animations:[],request:null,addAnimation:function(e,t,n,r){var o,a,i=this.animations;for(t.chart=e,t.startTime=Date.now(),t.duration=n,r||(e.animating=!0),o=0,a=i.length;o<a;++o)if(i[o].chart===e)return void(i[o]=t);i.push(t),1===i.length&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=B.findIndex(this.animations,(function(t){return t.chart===e}));-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var e=this;null===e.request&&(e.request=B.requestAnimFrame.call(window,(function(){e.request=null,e.startDigest()})))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var e,t,n,r,o=this.animations,a=0;a<o.length;)t=(e=o[a]).chart,n=e.numSteps,r=Math.floor((Date.now()-e.startTime)/e.duration*n)+1,e.currentStep=Math.min(r,n),B.callback(e.render,[t,e],t),B.callback(e.onAnimationProgress,[e],t),e.currentStep>=n?(B.callback(e.onAnimationComplete,[e],t),t.animating=!1,o.splice(a,1)):++a}},Z=B.options.resolve,ee=["push","pop","shift","splice","unshift"];function te(e,t){var n=e._chartjs;if(n){var r=n.listeners,o=r.indexOf(t);-1!==o&&r.splice(o,1),r.length>0||(ee.forEach((function(t){delete e[t]})),delete e._chartjs)}}var ne=function(e,t){this.initialize(e,t)};B.extend(ne.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var n=this;n.chart=e,n.index=t,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this.getMeta(),t=this.chart,n=t.scales,r=this.getDataset(),o=t.options.scales;null!==e.xAxisID&&e.xAxisID in n&&!r.xAxisID||(e.xAxisID=r.xAxisID||o.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in n&&!r.yAxisID||(e.yAxisID=r.yAxisID||o.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&te(this._data,this)},createMetaDataset:function(){var e=this.datasetElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(e){var t=this.dataElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index,_index:e})},addElements:function(){var e,t,n=this.getMeta(),r=this.getDataset().data||[],o=n.data;for(e=0,t=r.length;e<t;++e)o[e]=o[e]||this.createMetaData(e);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(e){var t=this.createMetaData(e);this.getMeta().data.splice(e,0,t),this.updateElement(t,e,!0)},buildOrUpdateElements:function(){var e,t,n=this,r=n.getDataset(),o=r.data||(r.data=[]);n._data!==o&&(n._data&&te(n._data,n),o&&Object.isExtensible(o)&&(t=n,(e=o)._chartjs?e._chartjs.listeners.push(t):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ee.forEach((function(t){var n="onData"+t.charAt(0).toUpperCase()+t.slice(1),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:function(){var t=Array.prototype.slice.call(arguments),o=r.apply(this,t);return B.each(e._chartjs.listeners,(function(e){"function"==typeof e[n]&&e[n].apply(e,t)})),o}})})))),n._data=o),n.resyncElements()},_configure:function(){this._config=B.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(e,t,n){"_meta"!==e&&"data"!==e&&B._merger(e,t,n)}})},_update:function(e){this._configure(),this._cachedDataOpts=null,this.update(e)},update:B.noop,transition:function(e){for(var t=this.getMeta(),n=t.data||[],r=n.length,o=0;o<r;++o)n[o].transition(e);t.dataset&&t.dataset.transition(e)},draw:function(){var e=this.getMeta(),t=e.data||[],n=t.length,r=0;for(e.dataset&&e.dataset.draw();r<n;++r)t[r].draw()},getStyle:function(e){var t,n=this.getMeta(),r=n.dataset;return this._configure(),r&&void 0===e?t=this._resolveDatasetElementOptions(r||{}):(e=e||0,t=this._resolveDataElementOptions(n.data[e]||{},e)),!1!==t.fill&&null!==t.fill||(t.backgroundColor=t.borderColor),t},_resolveDatasetElementOptions:function(e,t){var n,r,o,a,i=this,s=i.chart,l=i._config,c=e.custom||{},u=s.options.elements[i.datasetElementType.prototype._type]||{},d=i._datasetElementOptions,h={},p={chart:s,dataset:i.getDataset(),datasetIndex:i.index,hover:t};for(n=0,r=d.length;n<r;++n)o=d[n],a=t?"hover"+o.charAt(0).toUpperCase()+o.slice(1):o,h[o]=Z([c[a],l[a],u[a]],p);return h},_resolveDataElementOptions:function(e,t){var n=this,r=e&&e.custom,o=n._cachedDataOpts;if(o&&!r)return o;var a,i,s,l,c=n.chart,u=n._config,d=c.options.elements[n.dataElementType.prototype._type]||{},h=n._dataElementOptions,p={},f={chart:c,dataIndex:t,dataset:n.getDataset(),datasetIndex:n.index},m={cacheable:!r};if(r=r||{},B.isArray(h))for(i=0,s=h.length;i<s;++i)p[l=h[i]]=Z([r[l],u[l],d[l]],f,t,m);else for(i=0,s=(a=Object.keys(h)).length;i<s;++i)p[l=a[i]]=Z([r[l],u[h[l]],u[l],d[l]],f,t,m);return m.cacheable&&(n._cachedDataOpts=Object.freeze(p)),p},removeHoverStyle:function(e){B.merge(e._model,e.$previousStyle||{}),delete e.$previousStyle},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],n=e._index,r=e.custom||{},o=e._model,a=B.getHoverColor;e.$previousStyle={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderWidth:o.borderWidth},o.backgroundColor=Z([r.hoverBackgroundColor,t.hoverBackgroundColor,a(o.backgroundColor)],void 0,n),o.borderColor=Z([r.hoverBorderColor,t.hoverBorderColor,a(o.borderColor)],void 0,n),o.borderWidth=Z([r.hoverBorderWidth,t.hoverBorderWidth,o.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var e=this.getMeta().dataset;e&&this.removeHoverStyle(e)},_setDatasetHoverStyle:function(){var e,t,n,r,o,a,i=this.getMeta().dataset,s={};if(i){for(a=i._model,o=this._resolveDatasetElementOptions(i,!0),e=0,t=(r=Object.keys(o)).length;e<t;++e)s[n=r[e]]=a[n],a[n]=o[n];i.$previousStyle=s}},resyncElements:function(){var e=this.getMeta(),t=this.getDataset().data,n=e.data.length,r=t.length;r<n?e.data.splice(r,n-r):r>n&&this.insertElements(n,r-n)},insertElements:function(e,t){for(var n=0;n<t;++n)this.addElementAndReset(e+n)},onDataPush:function(){var e=arguments.length;this.insertElements(this.getDataset().data.length-e,e)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(e,t){this.getMeta().data.splice(e,t),this.insertElements(e,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),ne.extend=B.inherits;var re=ne,oe=2*Math.PI;function ae(e,t){var n=t.startAngle,r=t.endAngle,o=t.pixelMargin,a=o/t.outerRadius,i=t.x,s=t.y;e.beginPath(),e.arc(i,s,t.outerRadius,n-a,r+a),t.innerRadius>o?(a=o/t.innerRadius,e.arc(i,s,t.innerRadius-o,r+a,n-a,!0)):e.arc(i,s,o,r+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip()}function ie(e,t,n){var r="inner"===t.borderAlign;r?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),n.fullCircles&&function(e,t,n,r){var o,a=n.endAngle;for(r&&(n.endAngle=n.startAngle+oe,ae(e,n),n.endAngle=a,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=oe,n.fullCircles--)),e.beginPath(),e.arc(n.x,n.y,n.innerRadius,n.startAngle+oe,n.startAngle,!0),o=0;o<n.fullCircles;++o)e.stroke();for(e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.startAngle+oe),o=0;o<n.fullCircles;++o)e.stroke()}(e,t,n,r),r&&ae(e,n),e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.endAngle),e.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),e.closePath(),e.stroke()}Y._set("global",{elements:{arc:{backgroundColor:Y.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var se=K.extend({_type:"arc",inLabelRange:function(e){var t=this._view;return!!t&&Math.pow(e-t.x,2)<Math.pow(t.radius+t.hoverRadius,2)},inRange:function(e,t){var n=this._view;if(n){for(var r=B.getAngleFromPoint(n,{x:e,y:t}),o=r.angle,a=r.distance,i=n.startAngle,s=n.endAngle;s<i;)s+=oe;for(;o>s;)o-=oe;for(;o<i;)o+=oe;var l=o>=i&&o<=s,c=a>=n.innerRadius&&a<=n.outerRadius;return l&&c}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,n=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,n=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},draw:function(){var e,t=this._chart.ctx,n=this._view,r="inner"===n.borderAlign?.33:0,o={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-r,0),pixelMargin:r,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/oe)};if(t.save(),t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,o.fullCircles){for(o.endAngle=o.startAngle+oe,t.beginPath(),t.arc(o.x,o.y,o.outerRadius,o.startAngle,o.endAngle),t.arc(o.x,o.y,o.innerRadius,o.endAngle,o.startAngle,!0),t.closePath(),e=0;e<o.fullCircles;++e)t.fill();o.endAngle=o.startAngle+n.circumference%oe}t.beginPath(),t.arc(o.x,o.y,o.outerRadius,o.startAngle,o.endAngle),t.arc(o.x,o.y,o.innerRadius,o.endAngle,o.startAngle,!0),t.closePath(),t.fill(),n.borderWidth&&ie(t,n,o),t.restore()}}),le=B.valueOrDefault,ce=Y.global.defaultColor;Y._set("global",{elements:{line:{tension:.4,backgroundColor:ce,borderWidth:3,borderColor:ce,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var ue=K.extend({_type:"line",draw:function(){var e,t,n,r=this,o=r._view,a=r._chart.ctx,i=o.spanGaps,s=r._children.slice(),l=Y.global,c=l.elements.line,u=-1,d=r._loop;if(s.length){if(r._loop){for(e=0;e<s.length;++e)if(t=B.previousItem(s,e),!s[e]._view.skip&&t._view.skip){s=s.slice(e).concat(s.slice(0,e)),d=i;break}d&&s.push(s[0])}for(a.save(),a.lineCap=o.borderCapStyle||c.borderCapStyle,a.setLineDash&&a.setLineDash(o.borderDash||c.borderDash),a.lineDashOffset=le(o.borderDashOffset,c.borderDashOffset),a.lineJoin=o.borderJoinStyle||c.borderJoinStyle,a.lineWidth=le(o.borderWidth,c.borderWidth),a.strokeStyle=o.borderColor||l.defaultColor,a.beginPath(),(n=s[0]._view).skip||(a.moveTo(n.x,n.y),u=0),e=1;e<s.length;++e)n=s[e]._view,t=-1===u?B.previousItem(s,e):s[u],n.skip||(u!==e-1&&!i||-1===u?a.moveTo(n.x,n.y):B.canvas.lineTo(a,t._view,n),u=e);d&&a.closePath(),a.stroke(),a.restore()}}}),de=B.valueOrDefault,he=Y.global.defaultColor;function pe(e){var t=this._view;return!!t&&Math.abs(e-t.x)<t.radius+t.hitRadius}Y._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:he,borderColor:he,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var fe=K.extend({_type:"point",inRange:function(e,t){var n=this._view;return!!n&&Math.pow(e-n.x,2)+Math.pow(t-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:pe,inXRange:pe,inYRange:function(e){var t=this._view;return!!t&&Math.abs(e-t.y)<t.radius+t.hitRadius},getCenterPoint:function(){var e=this._view;return{x:e.x,y:e.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function(e){var t=this._view,n=this._chart.ctx,r=t.pointStyle,o=t.rotation,a=t.radius,i=t.x,s=t.y,l=Y.global,c=l.defaultColor;t.skip||(void 0===e||B.canvas._isPointInArea(t,e))&&(n.strokeStyle=t.borderColor||c,n.lineWidth=de(t.borderWidth,l.elements.point.borderWidth),n.fillStyle=t.backgroundColor||c,B.canvas.drawPoint(n,r,a,i,s,o))}}),me=Y.global.defaultColor;function ge(e){return e&&void 0!==e.width}function _e(e){var t,n,r,o,a;return ge(e)?(a=e.width/2,t=e.x-a,n=e.x+a,r=Math.min(e.y,e.base),o=Math.max(e.y,e.base)):(a=e.height/2,t=Math.min(e.x,e.base),n=Math.max(e.x,e.base),r=e.y-a,o=e.y+a),{left:t,top:r,right:n,bottom:o}}function ve(e,t,n){return e===t?n:e===n?t:e}function be(e,t,n){var r,o,a,i,s=e.borderWidth,l=function(e){var t=e.borderSkipped,n={};return t?(e.horizontal?e.base>e.x&&(t=ve(t,"left","right")):e.base<e.y&&(t=ve(t,"bottom","top")),n[t]=!0,n):n}(e);return B.isObject(s)?(r=+s.top||0,o=+s.right||0,a=+s.bottom||0,i=+s.left||0):r=o=a=i=+s||0,{t:l.top||r<0?0:r>n?n:r,r:l.right||o<0?0:o>t?t:o,b:l.bottom||a<0?0:a>n?n:a,l:l.left||i<0?0:i>t?t:i}}function ye(e,t,n){var r=null===t,o=null===n,a=!(!e||r&&o)&&_e(e);return a&&(r||t>=a.left&&t<=a.right)&&(o||n>=a.top&&n<=a.bottom)}Y._set("global",{elements:{rectangle:{backgroundColor:me,borderColor:me,borderSkipped:"bottom",borderWidth:0}}});var we=K.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,n=function(e){var t=_e(e),n=t.right-t.left,r=t.bottom-t.top,o=be(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r},inner:{x:t.left+o.l,y:t.top+o.t,w:n-o.l-o.r,h:r-o.t-o.b}}}(t),r=n.outer,o=n.inner;e.fillStyle=t.backgroundColor,e.fillRect(r.x,r.y,r.w,r.h),r.w===o.w&&r.h===o.h||(e.save(),e.beginPath(),e.rect(r.x,r.y,r.w,r.h),e.clip(),e.fillStyle=t.borderColor,e.rect(o.x,o.y,o.w,o.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return ye(this._view,e,t)},inLabelRange:function(e,t){var n=this._view;return ge(n)?ye(n,e,null):ye(n,null,t)},inXRange:function(e){return ye(this._view,e,null)},inYRange:function(e){return ye(this._view,null,e)},getCenterPoint:function(){var e,t,n=this._view;return ge(n)?(e=n.x,t=(n.y+n.base)/2):(e=(n.x+n.base)/2,t=n.y),{x:e,y:t}},getArea:function(){var e=this._view;return ge(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),ke={},xe=se,Me=ue,Ee=fe,Te=we;ke.Arc=xe,ke.Line=Me,ke.Point=Ee,ke.Rectangle=Te;var Se=B._deprecated,De=B.valueOrDefault;function Le(e,t,n){var r,o,a=n.barThickness,i=t.stackCount,s=t.pixels[e],l=B.isNullOrUndef(a)?function(e,t){var n,r,o,a,i=e._length;for(o=1,a=t.length;o<a;++o)i=Math.min(i,Math.abs(t[o]-t[o-1]));for(o=0,a=e.getTicks().length;o<a;++o)r=e.getPixelForTick(o),i=o>0?Math.min(i,Math.abs(r-n)):i,n=r;return i}(t.scale,t.pixels):-1;return B.isNullOrUndef(a)?(r=l*n.categoryPercentage,o=n.barPercentage):(r=a*i,o=1),{chunk:r/i,ratio:o,start:s-r/2}}Y._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),Y._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Ce=re.extend({dataElementType:ke.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var e,t,n=this;re.prototype.initialize.apply(n,arguments),(e=n.getMeta()).stack=n.getDataset().stack,e.bar=!0,t=n._getIndexScale().options,Se("bar chart",t.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Se("bar chart",t.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Se("bar chart",t.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Se("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Se("bar chart",t.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var t,n,r=this.getMeta().data;for(this._ruler=this.getRuler(),t=0,n=r.length;t<n;++t)this.updateElement(r[t],t,e)},updateElement:function(e,t,n){var r=this,o=r.getMeta(),a=r.getDataset(),i=r._resolveDataElementOptions(e,t);e._xScale=r.getScaleForId(o.xAxisID),e._yScale=r.getScaleForId(o.yAxisID),e._datasetIndex=r.index,e._index=t,e._model={backgroundColor:i.backgroundColor,borderColor:i.borderColor,borderSkipped:i.borderSkipped,borderWidth:i.borderWidth,datasetLabel:a.label,label:r.chart.data.labels[t]},B.isArray(a.data[t])&&(e._model.borderSkipped=null),r._updateElementGeometry(e,t,n,i),e.pivot()},_updateElementGeometry:function(e,t,n,r){var o=this,a=e._model,i=o._getValueScale(),s=i.getBasePixel(),l=i.isHorizontal(),c=o._ruler||o.getRuler(),u=o.calculateBarValuePixels(o.index,t,r),d=o.calculateBarIndexPixels(o.index,t,c,r);a.horizontal=l,a.base=n?s:u.base,a.x=l?n?s:u.head:d.center,a.y=l?d.center:n?s:u.head,a.height=l?d.size:void 0,a.width=l?void 0:d.size},_getStacks:function(e){var t,n,r=this._getIndexScale(),o=r._getMatchingVisibleMetas(this._type),a=r.options.stacked,i=o.length,s=[];for(t=0;t<i&&(n=o[t],(!1===a||-1===s.indexOf(n.stack)||void 0===a&&void 0===n.stack)&&s.push(n.stack),n.index!==e);++t);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(e,t){var n=this._getStacks(e),r=void 0!==t?n.indexOf(t):-1;return-1===r?n.length-1:r},getRuler:function(){var e,t,n=this._getIndexScale(),r=[];for(e=0,t=this.getMeta().data.length;e<t;++e)r.push(n.getPixelForValue(null,e,this.index));return{pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(e,t,n){var r,o,a,i,s,l,c,u=this.chart,d=this._getValueScale(),h=d.isHorizontal(),p=u.data.datasets,f=d._getMatchingVisibleMetas(this._type),m=d._parseValue(p[e].data[t]),g=n.minBarLength,_=d.options.stacked,v=this.getMeta().stack,b=void 0===m.start?0:m.max>=0&&m.min>=0?m.min:m.max,y=void 0===m.start?m.end:m.max>=0&&m.min>=0?m.max-m.min:m.min-m.max,w=f.length;if(_||void 0===_&&void 0!==v)for(r=0;r<w&&(o=f[r]).index!==e;++r)o.stack===v&&(a=void 0===(c=d._parseValue(p[o.index].data[t])).start?c.end:c.min>=0&&c.max>=0?c.max:c.min,(m.min<0&&a<0||m.max>=0&&a>0)&&(b+=a));return i=d.getPixelForValue(b),l=(s=d.getPixelForValue(b+y))-i,void 0!==g&&Math.abs(l)<g&&(l=g,s=y>=0&&!h||y<0&&h?i-g:i+g),{size:l,base:i,head:s,center:s+l/2}},calculateBarIndexPixels:function(e,t,n,r){var o="flex"===r.barThickness?function(e,t,n){var r,o=t.pixels,a=o[e],i=e>0?o[e-1]:null,s=e<o.length-1?o[e+1]:null,l=n.categoryPercentage;return null===i&&(i=a-(null===s?t.end-t.start:s-a)),null===s&&(s=a+a-i),r=a-(a-Math.min(i,s))/2*l,{chunk:Math.abs(s-i)/2*l/t.stackCount,ratio:n.barPercentage,start:r}}(t,n,r):Le(t,n,r),a=this.getStackIndex(e,this.getMeta().stack),i=o.start+o.chunk*a+o.chunk/2,s=Math.min(De(r.maxBarThickness,1/0),o.chunk*o.ratio);return{base:i-s/2,head:i+s/2,center:i,size:s}},draw:function(){var e=this.chart,t=this._getValueScale(),n=this.getMeta().data,r=this.getDataset(),o=n.length,a=0;for(B.canvas.clipArea(e.ctx,e.chartArea);a<o;++a){var i=t._parseValue(r.data[a]);isNaN(i.min)||isNaN(i.max)||n[a].draw()}B.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var e=this,t=B.extend({},re.prototype._resolveDataElementOptions.apply(e,arguments)),n=e._getIndexScale().options,r=e._getValueScale().options;return t.barPercentage=De(n.barPercentage,t.barPercentage),t.barThickness=De(n.barThickness,t.barThickness),t.categoryPercentage=De(n.categoryPercentage,t.categoryPercentage),t.maxBarThickness=De(n.maxBarThickness,t.maxBarThickness),t.minBarLength=De(r.minBarLength,t.minBarLength),t}}),Pe=B.valueOrDefault,Oe=B.options.resolve;Y._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.datasets[e.datasetIndex].label||"",r=t.datasets[e.datasetIndex].data[e.index];return n+": ("+e.xLabel+", "+e.yLabel+", "+r.r+")"}}}});var Ne=re.extend({dataElementType:ke.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(e){var t=this,n=t.getMeta().data;B.each(n,(function(n,r){t.updateElement(n,r,e)}))},updateElement:function(e,t,n){var r=this,o=r.getMeta(),a=e.custom||{},i=r.getScaleForId(o.xAxisID),s=r.getScaleForId(o.yAxisID),l=r._resolveDataElementOptions(e,t),c=r.getDataset().data[t],u=r.index,d=n?i.getPixelForDecimal(.5):i.getPixelForValue("object"==typeof c?c:NaN,t,u),h=n?s.getBasePixel():s.getPixelForValue(c,t,u);e._xScale=i,e._yScale=s,e._options=l,e._datasetIndex=u,e._index=t,e._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:a.skip||isNaN(d)||isNaN(h),x:d,y:h},e.pivot()},setHoverStyle:function(e){var t=e._model,n=e._options,r=B.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Pe(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Pe(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Pe(n.hoverBorderWidth,n.borderWidth),t.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(e,t){var n=this,r=n.chart,o=n.getDataset(),a=e.custom||{},i=o.data[t]||{},s=re.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:r,dataIndex:t,dataset:o,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=B.extend({},s)),s.radius=Oe([a.radius,i.r,n._config.radius,r.options.elements.point.radius],l,t),s}}),Ae=B.valueOrDefault,Ie=Math.PI,Re=2*Ie,Ye=Ie/2;Y._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(e){var t,n,r,o=document.createElement("ul"),a=e.data,i=a.datasets,s=a.labels;if(o.setAttribute("class",e.id+"-legend"),i.length)for(t=0,n=i[0].data.length;t<n;++t)(r=o.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=i[0].backgroundColor[t],s[t]&&r.appendChild(document.createTextNode(s[t]));return o.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map((function(n,r){var o=e.getDatasetMeta(0),a=o.controller.getStyle(r);return{text:n,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,hidden:isNaN(t.datasets[0].data[r])||o.data[r].hidden,index:r}})):[]}},onClick:function(e,t){var n,r,o,a=t.index,i=this.chart;for(n=0,r=(i.data.datasets||[]).length;n<r;++n)(o=i.getDatasetMeta(n)).data[a]&&(o.data[a].hidden=!o.data[a].hidden);i.update()}},cutoutPercentage:50,rotation:-Ye,circumference:Re,tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.labels[e.index],r=": "+t.datasets[e.datasetIndex].data[e.index];return B.isArray(n)?(n=n.slice())[0]+=r:n+=r,n}}}});var je=re.extend({dataElementType:ke.Arc,linkScales:B.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&++t;return t},update:function(e){var t,n,r,o,a=this,i=a.chart,s=i.chartArea,l=i.options,c=1,u=1,d=0,h=0,p=a.getMeta(),f=p.data,m=l.cutoutPercentage/100||0,g=l.circumference,_=a._getRingWeight(a.index);if(g<Re){var v=l.rotation%Re,b=(v+=v>=Ie?-Re:v<-Ie?Re:0)+g,y=Math.cos(v),w=Math.sin(v),k=Math.cos(b),x=Math.sin(b),M=v<=0&&b>=0||b>=Re,E=v<=Ye&&b>=Ye||b>=Re+Ye,T=v<=-Ye&&b>=-Ye||b>=Ie+Ye,S=v===-Ie||b>=Ie?-1:Math.min(y,y*m,k,k*m),D=T?-1:Math.min(w,w*m,x,x*m),L=M?1:Math.max(y,y*m,k,k*m),C=E?1:Math.max(w,w*m,x,x*m);c=(L-S)/2,u=(C-D)/2,d=-(L+S)/2,h=-(C+D)/2}for(r=0,o=f.length;r<o;++r)f[r]._options=a._resolveDataElementOptions(f[r],r);for(i.borderWidth=a.getMaxBorderWidth(),t=(s.right-s.left-i.borderWidth)/c,n=(s.bottom-s.top-i.borderWidth)/u,i.outerRadius=Math.max(Math.min(t,n)/2,0),i.innerRadius=Math.max(i.outerRadius*m,0),i.radiusLength=(i.outerRadius-i.innerRadius)/(a._getVisibleDatasetWeightTotal()||1),i.offsetX=d*i.outerRadius,i.offsetY=h*i.outerRadius,p.total=a.calculateTotal(),a.outerRadius=i.outerRadius-i.radiusLength*a._getRingWeightOffset(a.index),a.innerRadius=Math.max(a.outerRadius-i.radiusLength*_,0),r=0,o=f.length;r<o;++r)a.updateElement(f[r],r,e)},updateElement:function(e,t,n){var r=this,o=r.chart,a=o.chartArea,i=o.options,s=i.animation,l=(a.left+a.right)/2,c=(a.top+a.bottom)/2,u=i.rotation,d=i.rotation,h=r.getDataset(),p=n&&s.animateRotate||e.hidden?0:r.calculateCircumference(h.data[t])*(i.circumference/Re),f=n&&s.animateScale?0:r.innerRadius,m=n&&s.animateScale?0:r.outerRadius,g=e._options||{};B.extend(e,{_datasetIndex:r.index,_index:t,_model:{backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,borderAlign:g.borderAlign,x:l+o.offsetX,y:c+o.offsetY,startAngle:u,endAngle:d,circumference:p,outerRadius:m,innerRadius:f,label:B.valueAtIndexOrDefault(h.label,t,o.data.labels[t])}});var _=e._model;n&&s.animateRotate||(_.startAngle=0===t?i.rotation:r.getMeta().data[t-1]._model.endAngle,_.endAngle=_.startAngle+_.circumference),e.pivot()},calculateTotal:function(){var e,t=this.getDataset(),n=this.getMeta(),r=0;return B.each(n.data,(function(n,o){e=t.data[o],isNaN(e)||n.hidden||(r+=Math.abs(e))})),r},calculateCircumference:function(e){var t=this.getMeta().total;return t>0&&!isNaN(e)?Re*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,n,r,o,a,i,s,l,c=0,u=this.chart;if(!e)for(t=0,n=u.data.datasets.length;t<n;++t)if(u.isDatasetVisible(t)){e=(r=u.getDatasetMeta(t)).data,t!==this.index&&(a=r.controller);break}if(!e)return 0;for(t=0,n=e.length;t<n;++t)o=e[t],a?(a._configure(),i=a._resolveDataElementOptions(o,t)):i=o._options,"inner"!==i.borderAlign&&(s=i.borderWidth,c=(l=i.hoverBorderWidth)>(c=s>c?s:c)?l:c);return c},setHoverStyle:function(e){var t=e._model,n=e._options,r=B.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=Ae(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Ae(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Ae(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t},_getRingWeight:function(e){return Math.max(Ae(this.chart.data.datasets[e].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});Y._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),Y._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Fe=Ce.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),He=B.valueOrDefault,ze=B.options.resolve,Be=B.canvas._isPointInArea;function Ue(e,t){var n=e&&e.options.ticks||{},r=n.reverse,o=void 0===n.min?t:0,a=void 0===n.max?t:0;return{start:r?a:o,end:r?o:a}}function Ve(e,t,n){var r=n/2,o=Ue(e,r),a=Ue(t,r);return{top:a.end,right:o.end,bottom:a.start,left:o.start}}function We(e){var t,n,r,o;return B.isObject(e)?(t=e.top,n=e.right,r=e.bottom,o=e.left):t=n=r=o=e,{top:t,right:n,bottom:r,left:o}}Y._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var qe=re.extend({datasetElementType:ke.Line,dataElementType:ke.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(e){var t,n,r=this,o=r.getMeta(),a=o.dataset,i=o.data||[],s=r.chart.options,l=r._config,c=r._showLine=He(l.showLine,s.showLines);for(r._xScale=r.getScaleForId(o.xAxisID),r._yScale=r.getScaleForId(o.yAxisID),c&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),a._scale=r._yScale,a._datasetIndex=r.index,a._children=i,a._model=r._resolveDatasetElementOptions(a),a.pivot()),t=0,n=i.length;t<n;++t)r.updateElement(i[t],t,e);for(c&&0!==a._model.tension&&r.updateBezierControlPoints(),t=0,n=i.length;t<n;++t)i[t].pivot()},updateElement:function(e,t,n){var r,o,a=this,i=a.getMeta(),s=e.custom||{},l=a.getDataset(),c=a.index,u=l.data[t],d=a._xScale,h=a._yScale,p=i.dataset._model,f=a._resolveDataElementOptions(e,t);r=d.getPixelForValue("object"==typeof u?u:NaN,t,c),o=n?h.getBasePixel():a.calculatePointY(u,t,c),e._xScale=d,e._yScale=h,e._options=f,e._datasetIndex=c,e._index=t,e._model={x:r,y:o,skip:s.skip||isNaN(r)||isNaN(o),radius:f.radius,pointStyle:f.pointStyle,rotation:f.rotation,backgroundColor:f.backgroundColor,borderColor:f.borderColor,borderWidth:f.borderWidth,tension:He(s.tension,p?p.tension:0),steppedLine:!!p&&p.steppedLine,hitRadius:f.hitRadius}},_resolveDatasetElementOptions:function(e){var t=this,n=t._config,r=e.custom||{},o=t.chart.options,a=o.elements.line,i=re.prototype._resolveDatasetElementOptions.apply(t,arguments);return i.spanGaps=He(n.spanGaps,o.spanGaps),i.tension=He(n.lineTension,a.tension),i.steppedLine=ze([r.steppedLine,n.steppedLine,a.stepped]),i.clip=We(He(n.clip,Ve(t._xScale,t._yScale,i.borderWidth))),i},calculatePointY:function(e,t,n){var r,o,a,i,s,l,c,u=this.chart,d=this._yScale,h=0,p=0;if(d.options.stacked){for(s=+d.getRightValue(e),c=(l=u._getSortedVisibleDatasetMetas()).length,r=0;r<c&&(a=l[r]).index!==n;++r)o=u.data.datasets[a.index],"line"===a.type&&a.yAxisID===d.id&&((i=+d.getRightValue(o.data[t]))<0?p+=i||0:h+=i||0);return s<0?d.getPixelForValue(p+s):d.getPixelForValue(h+s)}return d.getPixelForValue(e)},updateBezierControlPoints:function(){var e,t,n,r,o=this.chart,a=this.getMeta(),i=a.dataset._model,s=o.chartArea,l=a.data||[];function c(e,t,n){return Math.max(Math.min(e,n),t)}if(i.spanGaps&&(l=l.filter((function(e){return!e._model.skip}))),"monotone"===i.cubicInterpolationMode)B.splineCurveMonotone(l);else for(e=0,t=l.length;e<t;++e)n=l[e]._model,r=B.splineCurve(B.previousItem(l,e)._model,n,B.nextItem(l,e)._model,i.tension),n.controlPointPreviousX=r.previous.x,n.controlPointPreviousY=r.previous.y,n.controlPointNextX=r.next.x,n.controlPointNextY=r.next.y;if(o.options.elements.line.capBezierPoints)for(e=0,t=l.length;e<t;++e)n=l[e]._model,Be(n,s)&&(e>0&&Be(l[e-1]._model,s)&&(n.controlPointPreviousX=c(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=c(n.controlPointPreviousY,s.top,s.bottom)),e<l.length-1&&Be(l[e+1]._model,s)&&(n.controlPointNextX=c(n.controlPointNextX,s.left,s.right),n.controlPointNextY=c(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var e,t=this.chart,n=this.getMeta(),r=n.data||[],o=t.chartArea,a=t.canvas,i=0,s=r.length;for(this._showLine&&(e=n.dataset._model.clip,B.canvas.clipArea(t.ctx,{left:!1===e.left?0:o.left-e.left,right:!1===e.right?a.width:o.right+e.right,top:!1===e.top?0:o.top-e.top,bottom:!1===e.bottom?a.height:o.bottom+e.bottom}),n.dataset.draw(),B.canvas.unclipArea(t.ctx));i<s;++i)r[i].draw(o)},setHoverStyle:function(e){var t=e._model,n=e._options,r=B.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=He(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=He(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=He(n.hoverBorderWidth,n.borderWidth),t.radius=He(n.hoverRadius,n.radius)}}),Ge=B.options.resolve;Y._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(e){var t,n,r,o=document.createElement("ul"),a=e.data,i=a.datasets,s=a.labels;if(o.setAttribute("class",e.id+"-legend"),i.length)for(t=0,n=i[0].data.length;t<n;++t)(r=o.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=i[0].backgroundColor[t],s[t]&&r.appendChild(document.createTextNode(s[t]));return o.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map((function(n,r){var o=e.getDatasetMeta(0),a=o.controller.getStyle(r);return{text:n,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,hidden:isNaN(t.datasets[0].data[r])||o.data[r].hidden,index:r}})):[]}},onClick:function(e,t){var n,r,o,a=t.index,i=this.chart;for(n=0,r=(i.data.datasets||[]).length;n<r;++n)(o=i.getDatasetMeta(n)).data[a].hidden=!o.data[a].hidden;i.update()}},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return t.labels[e.index]+": "+e.yLabel}}}});var Je=re.extend({dataElementType:ke.Arc,linkScales:B.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t,n,r,o=this,a=o.getDataset(),i=o.getMeta(),s=o.chart.options.startAngle||0,l=o._starts=[],c=o._angles=[],u=i.data;for(o._updateRadius(),i.count=o.countVisibleElements(),t=0,n=a.data.length;t<n;t++)l[t]=s,r=o._computeAngle(t),c[t]=r,s+=r;for(t=0,n=u.length;t<n;++t)u[t]._options=o._resolveDataElementOptions(u[t],t),o.updateElement(u[t],t,e)},_updateRadius:function(){var e=this,t=e.chart,n=t.chartArea,r=t.options,o=Math.min(n.right-n.left,n.bottom-n.top);t.outerRadius=Math.max(o/2,0),t.innerRadius=Math.max(r.cutoutPercentage?t.outerRadius/100*r.cutoutPercentage:1,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),e.outerRadius=t.outerRadius-t.radiusLength*e.index,e.innerRadius=e.outerRadius-t.radiusLength},updateElement:function(e,t,n){var r=this,o=r.chart,a=r.getDataset(),i=o.options,s=i.animation,l=o.scale,c=o.data.labels,u=l.xCenter,d=l.yCenter,h=i.startAngle,p=e.hidden?0:l.getDistanceFromCenterForValue(a.data[t]),f=r._starts[t],m=f+(e.hidden?0:r._angles[t]),g=s.animateScale?0:l.getDistanceFromCenterForValue(a.data[t]),_=e._options||{};B.extend(e,{_datasetIndex:r.index,_index:t,_scale:l,_model:{backgroundColor:_.backgroundColor,borderColor:_.borderColor,borderWidth:_.borderWidth,borderAlign:_.borderAlign,x:u,y:d,innerRadius:0,outerRadius:n?g:p,startAngle:n&&s.animateRotate?h:f,endAngle:n&&s.animateRotate?h:m,label:B.valueAtIndexOrDefault(c,t,c[t])}}),e.pivot()},countVisibleElements:function(){var e=this.getDataset(),t=this.getMeta(),n=0;return B.each(t.data,(function(t,r){isNaN(e.data[r])||t.hidden||n++})),n},setHoverStyle:function(e){var t=e._model,n=e._options,r=B.getHoverColor,o=B.valueOrDefault;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=o(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=o(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=o(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(e){var t=this,n=this.getMeta().count,r=t.getDataset(),o=t.getMeta();if(isNaN(r.data[e])||o.data[e].hidden)return 0;var a={chart:t.chart,dataIndex:e,dataset:r,datasetIndex:t.index};return Ge([t.chart.options.elements.arc.angle,2*Math.PI/n],a,e)}});Y._set("pie",B.clone(Y.doughnut)),Y._set("pie",{cutoutPercentage:0});var Ke=je,Qe=B.valueOrDefault;Y._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Xe=re.extend({datasetElementType:ke.Line,dataElementType:ke.Point,linkScales:B.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t,n,r=this,o=r.getMeta(),a=o.dataset,i=o.data||[],s=r.chart.scale,l=r._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),a._scale=s,a._datasetIndex=r.index,a._children=i,a._loop=!0,a._model=r._resolveDatasetElementOptions(a),a.pivot(),t=0,n=i.length;t<n;++t)r.updateElement(i[t],t,e);for(r.updateBezierControlPoints(),t=0,n=i.length;t<n;++t)i[t].pivot()},updateElement:function(e,t,n){var r=this,o=e.custom||{},a=r.getDataset(),i=r.chart.scale,s=i.getPointPositionForValue(t,a.data[t]),l=r._resolveDataElementOptions(e,t),c=r.getMeta().dataset._model,u=n?i.xCenter:s.x,d=n?i.yCenter:s.y;e._scale=i,e._options=l,e._datasetIndex=r.index,e._index=t,e._model={x:u,y:d,skip:o.skip||isNaN(u)||isNaN(d),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Qe(o.tension,c?c.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var e=this,t=e._config,n=e.chart.options,r=re.prototype._resolveDatasetElementOptions.apply(e,arguments);return r.spanGaps=Qe(t.spanGaps,n.spanGaps),r.tension=Qe(t.lineTension,n.elements.line.tension),r},updateBezierControlPoints:function(){var e,t,n,r,o=this.getMeta(),a=this.chart.chartArea,i=o.data||[];function s(e,t,n){return Math.max(Math.min(e,n),t)}for(o.dataset._model.spanGaps&&(i=i.filter((function(e){return!e._model.skip}))),e=0,t=i.length;e<t;++e)n=i[e]._model,r=B.splineCurve(B.previousItem(i,e,!0)._model,n,B.nextItem(i,e,!0)._model,n.tension),n.controlPointPreviousX=s(r.previous.x,a.left,a.right),n.controlPointPreviousY=s(r.previous.y,a.top,a.bottom),n.controlPointNextX=s(r.next.x,a.left,a.right),n.controlPointNextY=s(r.next.y,a.top,a.bottom)},setHoverStyle:function(e){var t=e._model,n=e._options,r=B.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Qe(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Qe(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Qe(n.hoverBorderWidth,n.borderWidth),t.radius=Qe(n.hoverRadius,n.radius)}});Y._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(e){return"("+e.xLabel+", "+e.yLabel+")"}}}}),Y._set("global",{datasets:{scatter:{showLine:!1}}});var $e={bar:Ce,bubble:Ne,doughnut:je,horizontalBar:Fe,line:qe,polarArea:Je,pie:Ke,radar:Xe,scatter:qe};function Ze(e,t){return e.native?{x:e.x,y:e.y}:B.getRelativePosition(e,t)}function et(e,t){var n,r,o,a,i,s,l=e._getSortedVisibleDatasetMetas();for(r=0,a=l.length;r<a;++r)for(o=0,i=(n=l[r].data).length;o<i;++o)(s=n[o])._view.skip||t(s)}function tt(e,t){var n=[];return et(e,(function(e){e.inRange(t.x,t.y)&&n.push(e)})),n}function nt(e,t,n,r){var o=Number.POSITIVE_INFINITY,a=[];return et(e,(function(e){if(!n||e.inRange(t.x,t.y)){var i=e.getCenterPoint(),s=r(t,i);s<o?(a=[e],o=s):s===o&&a.push(e)}})),a}function rt(e){var t=-1!==e.indexOf("x"),n=-1!==e.indexOf("y");return function(e,r){var o=t?Math.abs(e.x-r.x):0,a=n?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function ot(e,t,n){var r=Ze(t,e);n.axis=n.axis||"x";var o=rt(n.axis),a=n.intersect?tt(e,r):nt(e,r,!1,o),i=[];return a.length?(e._getSortedVisibleDatasetMetas().forEach((function(e){var t=e.data[a[0]._index];t&&!t._view.skip&&i.push(t)})),i):[]}var at={modes:{single:function(e,t){var n=Ze(t,e),r=[];return et(e,(function(e){if(e.inRange(n.x,n.y))return r.push(e),r})),r.slice(0,1)},label:ot,index:ot,dataset:function(e,t,n){var r=Ze(t,e);n.axis=n.axis||"xy";var o=rt(n.axis),a=n.intersect?tt(e,r):nt(e,r,!1,o);return a.length>0&&(a=e.getDatasetMeta(a[0]._datasetIndex).data),a},"x-axis":function(e,t){return ot(e,t,{intersect:!1})},point:function(e,t){return tt(e,Ze(t,e))},nearest:function(e,t,n){var r=Ze(t,e);n.axis=n.axis||"xy";var o=rt(n.axis);return nt(e,r,n.intersect,o)},x:function(e,t,n){var r=Ze(t,e),o=[],a=!1;return et(e,(function(e){e.inXRange(r.x)&&o.push(e),e.inRange(r.x,r.y)&&(a=!0)})),n.intersect&&!a&&(o=[]),o},y:function(e,t,n){var r=Ze(t,e),o=[],a=!1;return et(e,(function(e){e.inYRange(r.y)&&o.push(e),e.inRange(r.x,r.y)&&(a=!0)})),n.intersect&&!a&&(o=[]),o}}},it=B.extend;function st(e,t){return B.where(e,(function(e){return e.pos===t}))}function lt(e,t){return e.sort((function(e,n){var r=t?n:e,o=t?e:n;return r.weight===o.weight?r.index-o.index:r.weight-o.weight}))}function ct(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function ut(e,t,n){var r,o,a=n.box,i=e.maxPadding;if(n.size&&(e[n.pos]-=n.size),n.size=n.horizontal?a.height:a.width,e[n.pos]+=n.size,a.getPadding){var s=a.getPadding();i.top=Math.max(i.top,s.top),i.left=Math.max(i.left,s.left),i.bottom=Math.max(i.bottom,s.bottom),i.right=Math.max(i.right,s.right)}if(r=t.outerWidth-ct(i,e,"left","right"),o=t.outerHeight-ct(i,e,"top","bottom"),r!==e.w||o!==e.h){e.w=r,e.h=o;var l=n.horizontal?[r,e.w]:[o,e.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function dt(e,t){var n=t.maxPadding;function r(e){var r={left:0,top:0,right:0,bottom:0};return e.forEach((function(e){r[e]=Math.max(t[e],n[e])})),r}return r(e?["left","right"]:["top","bottom"])}function ht(e,t,n){var r,o,a,i,s,l,c=[];for(r=0,o=e.length;r<o;++r)(i=(a=e[r]).box).update(a.width||t.w,a.height||t.h,dt(a.horizontal,t)),ut(t,n,a)&&(l=!0,c.length&&(s=!0)),i.fullWidth||c.push(a);return s&&ht(c,t,n)||l}function pt(e,t,n){var r,o,a,i,s=n.padding,l=t.x,c=t.y;for(r=0,o=e.length;r<o;++r)i=(a=e[r]).box,a.horizontal?(i.left=i.fullWidth?s.left:t.left,i.right=i.fullWidth?n.outerWidth-s.right:t.left+t.w,i.top=c,i.bottom=c+i.height,i.width=i.right-i.left,c=i.bottom):(i.left=l,i.right=l+i.width,i.top=t.top,i.bottom=t.top+t.h,i.height=i.bottom-i.top,l=i.right);t.x=l,t.y=c}Y._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ft,mt={defaults:{},addBox:function(e,t){e.boxes||(e.boxes=[]),t.fullWidth=t.fullWidth||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw:function(){t.draw.apply(t,arguments)}}]},e.boxes.push(t)},removeBox:function(e,t){var n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure:function(e,t,n){for(var r,o=["fullWidth","position","weight"],a=o.length,i=0;i<a;++i)r=o[i],n.hasOwnProperty(r)&&(t[r]=n[r])},update:function(e,t,n){if(e){var r=e.options.layout||{},o=B.options.toPadding(r.padding),a=t-o.width,i=n-o.height,s=function(e){var t=function(e){var t,n,r,o=[];for(t=0,n=(e||[]).length;t<n;++t)r=e[t],o.push({index:t,box:r,pos:r.position,horizontal:r.isHorizontal(),weight:r.weight});return o}(e),n=lt(st(t,"left"),!0),r=lt(st(t,"right")),o=lt(st(t,"top"),!0),a=lt(st(t,"bottom"));return{leftAndTop:n.concat(o),rightAndBottom:r.concat(a),chartArea:st(t,"chartArea"),vertical:n.concat(r),horizontal:o.concat(a)}}(e.boxes),l=s.vertical,c=s.horizontal,u=Object.freeze({outerWidth:t,outerHeight:n,padding:o,availableWidth:a,vBoxMaxWidth:a/2/l.length,hBoxMaxHeight:i/2}),d=it({maxPadding:it({},o),w:a,h:i,x:o.left,y:o.top},o);!function(e,t){var n,r,o;for(n=0,r=e.length;n<r;++n)(o=e[n]).width=o.horizontal?o.box.fullWidth&&t.availableWidth:t.vBoxMaxWidth,o.height=o.horizontal&&t.hBoxMaxHeight}(l.concat(c),u),ht(l,d,u),ht(c,d,u)&&ht(l,d,u),function(e){var t=e.maxPadding;function n(n){var r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(d),pt(s.leftAndTop,d,u),d.x+=d.w,d.y+=d.h,pt(s.rightAndBottom,d,u),e.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h},B.each(s.chartArea,(function(t){var n=t.box;it(n,e.chartArea),n.update(d.w,d.h)}))}}},gt=(ft=Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"}))&&ft.default||ft,_t=["animationstart","webkitAnimationStart"],vt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function bt(e,t){var n=B.getStyle(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}var yt=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(e){}return e}()&&{passive:!0};function wt(e,t,n){e.addEventListener(t,n,yt)}function kt(e,t,n){e.removeEventListener(t,n,yt)}function xt(e,t,n,r,o){return{type:e,chart:t,native:o||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function Mt(e){var t=document.createElement("div");return t.className=e||"",t}function Et(e,t,n){var r,o,a,i,s=e.$chartjs||(e.$chartjs={}),l=s.resizer=function(e){var t=Mt("chartjs-size-monitor"),n=Mt("chartjs-size-monitor-expand"),r=Mt("chartjs-size-monitor-shrink");n.appendChild(Mt()),r.appendChild(Mt()),t.appendChild(n),t.appendChild(r),t._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var o=function(){t._reset(),e()};return wt(n,"scroll",o.bind(n,"expand")),wt(r,"scroll",o.bind(r,"shrink")),t}((r=function(){if(s.resizer){var r=n.options.maintainAspectRatio&&e.parentNode,o=r?r.clientWidth:0;t(xt("resize",n)),r&&r.clientWidth<o&&n.canvas&&t(xt("resize",n))}},a=!1,i=[],function(){i=Array.prototype.slice.call(arguments),o=o||this,a||(a=!0,B.requestAnimFrame.call(window,(function(){a=!1,r.apply(o,i)})))}));!function(e,t){var n=e.$chartjs||(e.$chartjs={}),r=n.renderProxy=function(e){"chartjs-render-animation"===e.animationName&&t()};B.each(_t,(function(t){wt(e,t,r)})),n.reflow=!!e.offsetParent,e.classList.add("chartjs-render-monitor")}(e,(function(){if(s.resizer){var t=e.parentNode;t&&t!==l.parentNode&&t.insertBefore(l,t.firstChild),l._reset()}}))}function Tt(e){var t=e.$chartjs||{},n=t.resizer;delete t.resizer,function(e){var t=e.$chartjs||{},n=t.renderProxy;n&&(B.each(_t,(function(t){kt(e,t,n)})),delete t.renderProxy),e.classList.remove("chartjs-render-monitor")}(e),n&&n.parentNode&&n.parentNode.removeChild(n)}var St={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(e){if(!this.disableCSSInjection){var t=e.getRootNode?e.getRootNode():document;!function(e,t){var n=e.$chartjs||(e.$chartjs={});if(!n.containsStyles){n.containsStyles=!0,t="/* Chart.js */\n"+t;var r=document.createElement("style");r.setAttribute("type","text/css"),r.appendChild(document.createTextNode(t)),e.appendChild(r)}}(t.host?t:document.head,gt)}},acquireContext:function(e,t){"string"==typeof e?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas);var n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(this._ensureLoaded(e),function(e,t){var n=e.style,r=e.getAttribute("height"),o=e.getAttribute("width");if(e.$chartjs={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===o||""===o){var a=bt(e,"width");void 0!==a&&(e.width=a)}if(null===r||""===r)if(""===e.style.height)e.height=e.width/(t.options.aspectRatio||2);else{var i=bt(e,"height");void 0!==a&&(e.height=i)}}(e,t),n):null},releaseContext:function(e){var t=e.canvas;if(t.$chartjs){var n=t.$chartjs.initial;["height","width"].forEach((function(e){var r=n[e];B.isNullOrUndef(r)?t.removeAttribute(e):t.setAttribute(e,r)})),B.each(n.style||{},(function(e,n){t.style[n]=e})),t.width=t.width,delete t.$chartjs}},addEventListener:function(e,t,n){var r=e.canvas;if("resize"!==t){var o=n.$chartjs||(n.$chartjs={});wt(r,t,(o.proxies||(o.proxies={}))[e.id+"_"+t]=function(t){n(function(e,t){var n=vt[e.type]||e.type,r=B.getRelativePosition(e,t);return xt(n,t,r.x,r.y,e)}(t,e))})}else Et(r,n,e)},removeEventListener:function(e,t,n){var r=e.canvas;if("resize"!==t){var o=((n.$chartjs||{}).proxies||{})[e.id+"_"+t];o&&kt(r,t,o)}else Tt(r)}};B.addEvent=wt,B.removeEvent=kt;var Dt=St._enabled?St:{acquireContext:function(e){return e&&e.canvas&&(e=e.canvas),e&&e.getContext("2d")||null}},Lt=B.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Dt);Y._set("global",{plugins:{}});var Ct={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach((function(e){-1===t.indexOf(e)&&t.push(e)})),this._cacheId++},unregister:function(e){var t=this._plugins;[].concat(e).forEach((function(e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,n){var r,o,a,i,s,l=this.descriptors(e),c=l.length;for(r=0;r<c;++r)if("function"==typeof(s=(a=(o=l[r]).plugin)[t])&&((i=[e].concat(n||[])).push(o.options),!1===s.apply(a,i)))return!1;return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={});if(t.id===this._cacheId)return t.descriptors;var n=[],r=[],o=e&&e.config||{},a=o.options&&o.options.plugins||{};return this._plugins.concat(o.plugins||[]).forEach((function(e){if(-1===n.indexOf(e)){var t=e.id,o=a[t];!1!==o&&(!0===o&&(o=B.clone(Y.global.plugins[t])),n.push(e),r.push({plugin:e,options:o||{}}))}})),t.descriptors=r,t.id=this._cacheId,r},_invalidate:function(e){delete e.$plugins}},Pt={constructors:{},defaults:{},registerScaleType:function(e,t,n){this.constructors[e]=t,this.defaults[e]=B.clone(n)},getScaleConstructor:function(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function(e){return this.defaults.hasOwnProperty(e)?B.merge(Object.create(null),[Y.scale,this.defaults[e]]):{}},updateScaleDefaults:function(e,t){this.defaults.hasOwnProperty(e)&&(this.defaults[e]=B.extend(this.defaults[e],t))},addScalesToLayout:function(e){B.each(e.scales,(function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,mt.addBox(e,t)}))}},Ot=B.valueOrDefault,Nt=B.rtl.getRtlAdapter;Y._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:B.noop,title:function(e,t){var n="",r=t.labels,o=r?r.length:0;if(e.length>0){var a=e[0];a.label?n=a.label:a.xLabel?n=a.xLabel:o>0&&a.index<o&&(n=r[a.index])}return n},afterTitle:B.noop,beforeBody:B.noop,beforeLabel:B.noop,label:function(e,t){var n=t.datasets[e.datasetIndex].label||"";return n&&(n+=": "),B.isNullOrUndef(e.value)?n+=e.yLabel:n+=e.value,n},labelColor:function(e,t){var n=t.getDatasetMeta(e.datasetIndex).data[e.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:B.noop,afterBody:B.noop,beforeFooter:B.noop,footer:B.noop,afterFooter:B.noop}}});var At={average:function(e){if(!e.length)return!1;var t,n,r=0,o=0,a=0;for(t=0,n=e.length;t<n;++t){var i=e[t];if(i&&i.hasValue()){var s=i.tooltipPosition();r+=s.x,o+=s.y,++a}}return{x:r/a,y:o/a}},nearest:function(e,t){var n,r,o,a=t.x,i=t.y,s=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n<r;++n){var l=e[n];if(l&&l.hasValue()){var c=l.getCenterPoint(),u=B.distanceBetweenPoints(t,c);u<s&&(s=u,o=l)}}if(o){var d=o.tooltipPosition();a=d.x,i=d.y}return{x:a,y:i}}};function It(e,t){return t&&(B.isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Rt(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function Yt(e){var t=Y.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:Ot(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:Ot(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:Ot(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:Ot(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:Ot(e.titleFontStyle,t.defaultFontStyle),titleFontSize:Ot(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:Ot(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:Ot(e.footerFontStyle,t.defaultFontStyle),footerFontSize:Ot(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function jt(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function Ft(e){return It([],Rt(e))}var Ht=K.extend({initialize:function(){this._model=Yt(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options,n=t.callbacks,r=n.beforeTitle.apply(e,arguments),o=n.title.apply(e,arguments),a=n.afterTitle.apply(e,arguments),i=[];return i=It(i,Rt(r)),i=It(i,Rt(o)),i=It(i,Rt(a))},getBeforeBody:function(){return Ft(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var n=this,r=n._options.callbacks,o=[];return B.each(e,(function(e){var a={before:[],lines:[],after:[]};It(a.before,Rt(r.beforeLabel.call(n,e,t))),It(a.lines,r.label.call(n,e,t)),It(a.after,Rt(r.afterLabel.call(n,e,t))),o.push(a)})),o},getAfterBody:function(){return Ft(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,n=t.beforeFooter.apply(e,arguments),r=t.footer.apply(e,arguments),o=t.afterFooter.apply(e,arguments),a=[];return a=It(a,Rt(n)),a=It(a,Rt(r)),a=It(a,Rt(o))},update:function(e){var t,n,r,o,a,i,s,l,c,u,d=this,h=d._options,p=d._model,f=d._model=Yt(h),m=d._active,g=d._data,_={xAlign:p.xAlign,yAlign:p.yAlign},v={x:p.x,y:p.y},b={width:p.width,height:p.height},y={x:p.caretX,y:p.caretY};if(m.length){f.opacity=1;var w=[],k=[];y=At[h.position].call(d,m,d._eventPosition);var x=[];for(t=0,n=m.length;t<n;++t)x.push((r=m[t],o=void 0,a=void 0,i=void 0,s=void 0,l=void 0,c=void 0,u=void 0,o=r._xScale,a=r._yScale||r._scale,i=r._index,s=r._datasetIndex,l=r._chart.getDatasetMeta(s).controller,c=l._getIndexScale(),u=l._getValueScale(),{xLabel:o?o.getLabelForIndex(i,s):"",yLabel:a?a.getLabelForIndex(i,s):"",label:c?""+c.getLabelForIndex(i,s):"",value:u?""+u.getLabelForIndex(i,s):"",index:i,datasetIndex:s,x:r._model.x,y:r._model.y}));h.filter&&(x=x.filter((function(e){return h.filter(e,g)}))),h.itemSort&&(x=x.sort((function(e,t){return h.itemSort(e,t,g)}))),B.each(x,(function(e){w.push(h.callbacks.labelColor.call(d,e,d._chart)),k.push(h.callbacks.labelTextColor.call(d,e,d._chart))})),f.title=d.getTitle(x,g),f.beforeBody=d.getBeforeBody(x,g),f.body=d.getBody(x,g),f.afterBody=d.getAfterBody(x,g),f.footer=d.getFooter(x,g),f.x=y.x,f.y=y.y,f.caretPadding=h.caretPadding,f.labelColors=w,f.labelTextColors=k,f.dataPoints=x,b=function(e,t){var n=e._chart.ctx,r=2*t.yPadding,o=0,a=t.body,i=a.reduce((function(e,t){return e+t.before.length+t.lines.length+t.after.length}),0);i+=t.beforeBody.length+t.afterBody.length;var s=t.title.length,l=t.footer.length,c=t.titleFontSize,u=t.bodyFontSize,d=t.footerFontSize;r+=s*c,r+=s?(s-1)*t.titleSpacing:0,r+=s?t.titleMarginBottom:0,r+=i*u,r+=i?(i-1)*t.bodySpacing:0,r+=l?t.footerMarginTop:0,r+=l*d,r+=l?(l-1)*t.footerSpacing:0;var h=0,p=function(e){o=Math.max(o,n.measureText(e).width+h)};return n.font=B.fontString(c,t._titleFontStyle,t._titleFontFamily),B.each(t.title,p),n.font=B.fontString(u,t._bodyFontStyle,t._bodyFontFamily),B.each(t.beforeBody.concat(t.afterBody),p),h=t.displayColors?u+2:0,B.each(a,(function(e){B.each(e.before,p),B.each(e.lines,p),B.each(e.after,p)})),h=0,n.font=B.fontString(d,t._footerFontStyle,t._footerFontFamily),B.each(t.footer,p),{width:o+=2*t.xPadding,height:r}}(this,f),v=function(e,t,n,r){var o=e.x,a=e.y,i=e.caretSize,s=e.caretPadding,l=e.cornerRadius,c=n.xAlign,u=n.yAlign,d=i+s,h=l+s;return"right"===c?o-=t.width:"center"===c&&((o-=t.width/2)+t.width>r.width&&(o=r.width-t.width),o<0&&(o=0)),"top"===u?a+=d:a-="bottom"===u?t.height+d:t.height/2,"center"===u?"left"===c?o+=d:"right"===c&&(o-=d):"left"===c?o-=h:"right"===c&&(o+=h),{x:o,y:a}}(f,b,_=function(e,t){var n,r,o,a,i,s=e._model,l=e._chart,c=e._chart.chartArea,u="center",d="center";s.y<t.height?d="top":s.y>l.height-t.height&&(d="bottom");var h=(c.left+c.right)/2,p=(c.top+c.bottom)/2;"center"===d?(n=function(e){return e<=h},r=function(e){return e>h}):(n=function(e){return e<=t.width/2},r=function(e){return e>=l.width-t.width/2}),o=function(e){return e+t.width+s.caretSize+s.caretPadding>l.width},a=function(e){return e-t.width-s.caretSize-s.caretPadding<0},i=function(e){return e<=p?"top":"bottom"},n(s.x)?(u="left",o(s.x)&&(u="center",d=i(s.y))):r(s.x)&&(u="right",a(s.x)&&(u="center",d=i(s.y)));var f=e._options;return{xAlign:f.xAlign?f.xAlign:u,yAlign:f.yAlign?f.yAlign:d}}(this,b),d._chart)}else f.opacity=0;return f.xAlign=_.xAlign,f.yAlign=_.yAlign,f.x=v.x,f.y=v.y,f.width=b.width,f.height=b.height,f.caretX=y.x,f.caretY=y.y,d._model=f,e&&h.custom&&h.custom.call(d,f),d},drawCaret:function(e,t){var n=this._chart.ctx,r=this._view,o=this.getCaretPosition(e,t,r);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(e,t,n){var r,o,a,i,s,l,c=n.caretSize,u=n.cornerRadius,d=n.xAlign,h=n.yAlign,p=e.x,f=e.y,m=t.width,g=t.height;if("center"===h)s=f+g/2,"left"===d?(o=(r=p)-c,a=r,i=s+c,l=s-c):(o=(r=p+m)+c,a=r,i=s-c,l=s+c);else if("left"===d?(r=(o=p+u+c)-c,a=o+c):"right"===d?(r=(o=p+m-u-c)-c,a=o+c):(r=(o=n.caretX)-c,a=o+c),"top"===h)s=(i=f)-c,l=i;else{s=(i=f+g)+c,l=i;var _=a;a=r,r=_}return{x1:r,x2:o,x3:a,y1:i,y2:s,y3:l}},drawTitle:function(e,t,n){var r,o,a,i=t.title,s=i.length;if(s){var l=Nt(t.rtl,t.x,t.width);for(e.x=jt(t,t._titleAlign),n.textAlign=l.textAlign(t._titleAlign),n.textBaseline="middle",r=t.titleFontSize,o=t.titleSpacing,n.fillStyle=t.titleFontColor,n.font=B.fontString(r,t._titleFontStyle,t._titleFontFamily),a=0;a<s;++a)n.fillText(i[a],l.x(e.x),e.y+r/2),e.y+=r+o,a+1===s&&(e.y+=t.titleMarginBottom-o)}},drawBody:function(e,t,n){var r,o,a,i,s,l,c,u,d=t.bodyFontSize,h=t.bodySpacing,p=t._bodyAlign,f=t.body,m=t.displayColors,g=0,_=m?jt(t,"left"):0,v=Nt(t.rtl,t.x,t.width),b=function(t){n.fillText(t,v.x(e.x+g),e.y+d/2),e.y+=d+h},y=v.textAlign(p);for(n.textAlign=p,n.textBaseline="middle",n.font=B.fontString(d,t._bodyFontStyle,t._bodyFontFamily),e.x=jt(t,y),n.fillStyle=t.bodyFontColor,B.each(t.beforeBody,b),g=m&&"right"!==y?"center"===p?d/2+1:d+2:0,s=0,c=f.length;s<c;++s){for(r=f[s],o=t.labelTextColors[s],a=t.labelColors[s],n.fillStyle=o,B.each(r.before,b),l=0,u=(i=r.lines).length;l<u;++l){if(m){var w=v.x(_);n.fillStyle=t.legendColorBackground,n.fillRect(v.leftForLtr(w,d),e.y,d,d),n.lineWidth=1,n.strokeStyle=a.borderColor,n.strokeRect(v.leftForLtr(w,d),e.y,d,d),n.fillStyle=a.backgroundColor,n.fillRect(v.leftForLtr(v.xPlus(w,1),d-2),e.y+1,d-2,d-2),n.fillStyle=o}b(i[l])}B.each(r.after,b)}g=0,B.each(t.afterBody,b),e.y-=h},drawFooter:function(e,t,n){var r,o,a=t.footer,i=a.length;if(i){var s=Nt(t.rtl,t.x,t.width);for(e.x=jt(t,t._footerAlign),e.y+=t.footerMarginTop,n.textAlign=s.textAlign(t._footerAlign),n.textBaseline="middle",r=t.footerFontSize,n.fillStyle=t.footerFontColor,n.font=B.fontString(r,t._footerFontStyle,t._footerFontFamily),o=0;o<i;++o)n.fillText(a[o],s.x(e.x),e.y+r/2),e.y+=r+t.footerSpacing}},drawBackground:function(e,t,n,r){n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,n.lineWidth=t.borderWidth;var o=t.xAlign,a=t.yAlign,i=e.x,s=e.y,l=r.width,c=r.height,u=t.cornerRadius;n.beginPath(),n.moveTo(i+u,s),"top"===a&&this.drawCaret(e,r),n.lineTo(i+l-u,s),n.quadraticCurveTo(i+l,s,i+l,s+u),"center"===a&&"right"===o&&this.drawCaret(e,r),n.lineTo(i+l,s+c-u),n.quadraticCurveTo(i+l,s+c,i+l-u,s+c),"bottom"===a&&this.drawCaret(e,r),n.lineTo(i+u,s+c),n.quadraticCurveTo(i,s+c,i,s+c-u),"center"===a&&"left"===o&&this.drawCaret(e,r),n.lineTo(i,s+u),n.quadraticCurveTo(i,s,i+u,s),n.closePath(),n.fill(),t.borderWidth>0&&n.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var n={width:t.width,height:t.height},r={x:t.x,y:t.y},o=Math.abs(t.opacity<.001)?0:t.opacity,a=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;this._options.enabled&&a&&(e.save(),e.globalAlpha=o,this.drawBackground(r,t,e,n),r.y+=t.yPadding,B.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),B.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t,n=this,r=n._options;return n._lastActive=n._lastActive||[],"mouseout"===e.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(e,r.mode,r),r.reverse&&n._active.reverse()),(t=!B.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(r.enabled||r.custom)&&(n._eventPosition={x:e.x,y:e.y},n.update(!0),n.pivot())),t}}),zt=At,Bt=Ht;Bt.positioners=zt;var Ut=B.valueOrDefault;function Vt(){return B.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,r){if("xAxes"===e||"yAxes"===e){var o,a,i,s=n[e].length;for(t[e]||(t[e]=[]),o=0;o<s;++o)i=n[e][o],a=Ut(i.type,"xAxes"===e?"category":"linear"),o>=t[e].length&&t[e].push({}),!t[e][o].type||i.type&&i.type!==t[e][o].type?B.merge(t[e][o],[Pt.getScaleDefaults(a),i]):B.merge(t[e][o],i)}else B._merger(e,t,n,r)}})}function Wt(){return B.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,r){var o=t[e]||Object.create(null),a=n[e];"scales"===e?t[e]=Vt(o,a):"scale"===e?t[e]=B.merge(o,[Pt.getScaleDefaults(a.type),a]):B._merger(e,t,n,r)}})}function qt(e){var t=e.options;B.each(e.scales,(function(t){mt.removeBox(e,t)})),t=Wt(Y.global,Y[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function Gt(e,t,n){var r,o=function(e){return e.id===r};do{r=t+n++}while(B.findIndex(e,o)>=0);return r}function Jt(e){return"top"===e||"bottom"===e}function Kt(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}Y._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Qt=function(e,t){return this.construct(e,t),this};B.extend(Qt.prototype,{construct:function(e,t){var n=this;t=function(e){var t=(e=e||Object.create(null)).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=Wt(Y.global,Y[e.type],e.options||{}),e}(t);var r=Lt.acquireContext(e,t),o=r&&r.canvas,a=o&&o.height,i=o&&o.width;n.id=B.uid(),n.ctx=r,n.canvas=o,n.config=t,n.width=i,n.height=a,n.aspectRatio=a?i/a:null,n.options=t.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Qt.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(e){n.config.data=e}}),r&&o?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return Ct.notify(e,"beforeInit"),B.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),Ct.notify(e,"afterInit"),e},clear:function(){return B.canvas.clear(this),this},stop:function(){return $.cancelAnimation(this),this},resize:function(e){var t=this,n=t.options,r=t.canvas,o=n.maintainAspectRatio&&t.aspectRatio||null,a=Math.max(0,Math.floor(B.getMaximumWidth(r))),i=Math.max(0,Math.floor(o?a/o:B.getMaximumHeight(r)));if((t.width!==a||t.height!==i)&&(r.width=t.width=a,r.height=t.height=i,r.style.width=a+"px",r.style.height=i+"px",B.retinaScale(t,n.devicePixelRatio),!e)){var s={width:a,height:i};Ct.notify(t,"resize",[s]),n.onResize&&n.onResize(t,s),t.stop(),t.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},n=e.scale;B.each(t.xAxes,(function(e,n){e.id||(e.id=Gt(t.xAxes,"x-axis-",n))})),B.each(t.yAxes,(function(e,n){e.id||(e.id=Gt(t.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,n=e.scales||{},r=[],o=Object.keys(n).reduce((function(e,t){return e[t]=!1,e}),{});t.scales&&(r=r.concat((t.scales.xAxes||[]).map((function(e){return{options:e,dtype:"category",dposition:"bottom"}})),(t.scales.yAxes||[]).map((function(e){return{options:e,dtype:"linear",dposition:"left"}})))),t.scale&&r.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),B.each(r,(function(t){var r=t.options,a=r.id,i=Ut(r.type,t.dtype);Jt(r.position)!==Jt(t.dposition)&&(r.position=t.dposition),o[a]=!0;var s=null;if(a in n&&n[a].type===i)(s=n[a]).options=r,s.ctx=e.ctx,s.chart=e;else{var l=Pt.getScaleConstructor(i);if(!l)return;s=new l({id:a,type:i,options:r,ctx:e.ctx,chart:e}),n[s.id]=s}s.mergeTicksOptions(),t.isDefault&&(e.scale=s)})),B.each(o,(function(e,t){e||delete n[t]})),e.scales=n,Pt.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,n=this,r=[],o=n.data.datasets;for(e=0,t=o.length;e<t;e++){var a=o[e],i=n.getDatasetMeta(e),s=a.type||n.config.type;if(i.type&&i.type!==s&&(n.destroyDatasetMeta(e),i=n.getDatasetMeta(e)),i.type=s,i.order=a.order||0,i.index=e,i.controller)i.controller.updateIndex(e),i.controller.linkScales();else{var l=$e[i.type];if(void 0===l)throw new Error('"'+i.type+'" is not a chart type.');i.controller=new l(n,e),r.push(i.controller)}}return r},resetElements:function(){var e=this;B.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.reset()}),e)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var t,n,r=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),qt(r),Ct._invalidate(r),!1!==Ct.notify(r,"beforeUpdate")){r.tooltip._data=r.data;var o=r.buildOrUpdateControllers();for(t=0,n=r.data.datasets.length;t<n;t++)r.getDatasetMeta(t).controller.buildOrUpdateElements();r.updateLayout(),r.options.animation&&r.options.animation.duration&&B.each(o,(function(e){e.reset()})),r.updateDatasets(),r.tooltip.initialize(),r.lastActive=[],Ct.notify(r,"afterUpdate"),r._layers.sort(Kt("z","_idx")),r._bufferedRender?r._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:r.render(e)}},updateLayout:function(){var e=this;!1!==Ct.notify(e,"beforeLayout")&&(mt.update(this,this.width,this.height),e._layers=[],B.each(e.boxes,(function(t){t._configure&&t._configure(),e._layers.push.apply(e._layers,t._layers())}),e),e._layers.forEach((function(e,t){e._idx=t})),Ct.notify(e,"afterScaleUpdate"),Ct.notify(e,"afterLayout"))},updateDatasets:function(){if(!1!==Ct.notify(this,"beforeDatasetsUpdate")){for(var e=0,t=this.data.datasets.length;e<t;++e)this.updateDataset(e);Ct.notify(this,"afterDatasetsUpdate")}},updateDataset:function(e){var t=this.getDatasetMeta(e),n={meta:t,index:e};!1!==Ct.notify(this,"beforeDatasetUpdate",[n])&&(t.controller._update(),Ct.notify(this,"afterDatasetUpdate",[n]))},render:function(e){var t=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var n=t.options.animation,r=Ut(e.duration,n&&n.duration),o=e.lazy;if(!1!==Ct.notify(t,"beforeRender")){var a=function(e){Ct.notify(t,"afterRender"),B.callback(n&&n.onComplete,[e],t)};if(n&&r){var i=new X({numSteps:r/16.66,easing:e.easing||n.easing,render:function(e,t){var n=B.easing.effects[t.easing],r=t.currentStep,o=r/t.numSteps;e.draw(n(o),o,r)},onAnimationProgress:n.onProgress,onAnimationComplete:a});$.addAnimation(t,i,r,o)}else t.draw(),a(new X({numSteps:0,chart:t}));return t}},draw:function(e){var t,n,r=this;if(r.clear(),B.isNullOrUndef(e)&&(e=1),r.transition(e),!(r.width<=0||r.height<=0)&&!1!==Ct.notify(r,"beforeDraw",[e])){for(n=r._layers,t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(r.chartArea);for(r.drawDatasets(e);t<n.length;++t)n[t].draw(r.chartArea);r._drawTooltip(e),Ct.notify(r,"afterDraw",[e])}},transition:function(e){for(var t=0,n=(this.data.datasets||[]).length;t<n;++t)this.isDatasetVisible(t)&&this.getDatasetMeta(t).controller.transition(e);this.tooltip.transition(e)},_getSortedDatasetMetas:function(e){var t,n,r=[];for(t=0,n=(this.data.datasets||[]).length;t<n;++t)e&&!this.isDatasetVisible(t)||r.push(this.getDatasetMeta(t));return r.sort(Kt("order","index")),r},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(e){var t,n;if(!1!==Ct.notify(this,"beforeDatasetsDraw",[e])){for(n=(t=this._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)this.drawDataset(t[n],e);Ct.notify(this,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var n={meta:e,index:e.index,easingValue:t};!1!==Ct.notify(this,"beforeDatasetDraw",[n])&&(e.controller.draw(t),Ct.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(e){var t=this.tooltip,n={tooltip:t,easingValue:e};!1!==Ct.notify(this,"beforeTooltipDraw",[n])&&(t.draw(),Ct.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(e){return at.modes.single(this,e)},getElementsAtEvent:function(e){return at.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return at.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,n){var r=at.modes[t];return"function"==typeof r?r(this,e,n):[]},getDatasetAtEvent:function(e){return at.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this.data.datasets[e];t._meta||(t._meta={});var n=t._meta[this.id];return n||(n=t._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t.order||0,index:e}),n},getVisibleDatasetCount:function(){for(var e=0,t=0,n=this.data.datasets.length;t<n;++t)this.isDatasetVisible(t)&&e++;return e},isDatasetVisible:function(e){var t=this.getDatasetMeta(e);return"boolean"==typeof t.hidden?!t.hidden:!this.data.datasets[e].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(e){var t=this.id,n=this.data.datasets[e],r=n._meta&&n._meta[t];r&&(r.controller.destroy(),delete n._meta[t])},destroy:function(){var e,t,n=this,r=n.canvas;for(n.stop(),e=0,t=n.data.datasets.length;e<t;++e)n.destroyDatasetMeta(e);r&&(n.unbindEvents(),B.canvas.clear(n),Lt.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Ct.notify(n,"destroy"),delete Qt.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new Bt({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var e=this,t=e._listeners={},n=function(){e.eventHandler.apply(e,arguments)};B.each(e.options.events,(function(r){Lt.addEventListener(e,r,n),t[r]=n})),e.options.responsive&&(n=function(){e.resize()},Lt.addEventListener(e,"resize",n),t.resize=n)},unbindEvents:function(){var e=this,t=e._listeners;t&&(delete e._listeners,B.each(t,(function(t,n){Lt.removeEventListener(e,n,t)})))},updateHoverStyle:function(e,t,n){var r,o,a,i=n?"set":"remove";for(o=0,a=e.length;o<a;++o)(r=e[o])&&this.getDatasetMeta(r._datasetIndex).controller[i+"HoverStyle"](r);"dataset"===t&&this.getDatasetMeta(e[0]._datasetIndex).controller["_"+i+"DatasetHoverStyle"]()},eventHandler:function(e){var t=this,n=t.tooltip;if(!1!==Ct.notify(t,"beforeEvent",[e])){t._bufferedRender=!0,t._bufferedRequest=null;var r=t.handleEvent(e);n&&(r=n._start?n.handleEvent(e):r|n.handleEvent(e)),Ct.notify(t,"afterEvent",[e]);var o=t._bufferedRequest;return o?t.render(o):r&&!t.animating&&(t.stop(),t.render({duration:t.options.hover.animationDuration,lazy:!0})),t._bufferedRender=!1,t._bufferedRequest=null,t}},handleEvent:function(e){var t,n=this,r=n.options||{},o=r.hover;return n.lastActive=n.lastActive||[],"mouseout"===e.type?n.active=[]:n.active=n.getElementsAtEventForMode(e,o.mode,o),B.callback(r.onHover||r.hover.onHover,[e.native,n.active],n),"mouseup"!==e.type&&"click"!==e.type||r.onClick&&r.onClick.call(n,e.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,o.mode,!1),n.active.length&&o.mode&&n.updateHoverStyle(n.active,o.mode,!0),t=!B.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,t}}),Qt.instances={};var Xt=Qt;function $t(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Zt(e){this.options=e||{}}Qt.Controller=Qt,Qt.types={},B.configMerge=Wt,B.scaleMerge=Vt,B.extend(Zt.prototype,{formats:$t,parse:$t,format:$t,add:$t,diff:$t,startOf:$t,endOf:$t,_create:function(e){return e}}),Zt.override=function(e){B.extend(Zt.prototype,e)};var en={_date:Zt},tn={formatters:{values:function(e){return B.isArray(e)?e:""+e},linear:function(e,t,n){var r=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&e!==Math.floor(e)&&(r=e-Math.floor(e));var o=B.log10(Math.abs(r)),a="";if(0!==e)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var i=B.log10(Math.abs(e)),s=Math.floor(i)-Math.floor(o);s=Math.max(Math.min(s,20),0),a=e.toExponential(s)}else{var l=-1*Math.floor(o);l=Math.max(Math.min(l,20),0),a=e.toFixed(l)}else a="0";return a},logarithmic:function(e,t,n){var r=e/Math.pow(10,Math.floor(B.log10(e)));return 0===e?"0":1===r||2===r||5===r||0===t||t===n.length-1?e.toExponential():""}}},nn=B.isArray,rn=B.isNullOrUndef,on=B.valueOrDefault,an=B.valueAtIndexOrDefault;function sn(e,t,n){var r,o=e.getTicks().length,a=Math.min(t,o-1),i=e.getPixelForTick(a),s=e._startPixel,l=e._endPixel;if(!(n&&(r=1===o?Math.max(i-s,l-i):0===t?(e.getPixelForTick(1)-i)/2:(i-e.getPixelForTick(a-1))/2,(i+=a<t?r:-r)<s-1e-6||i>l+1e-6)))return i}function ln(e,t,n,r){var o,a,i,s,l,c,u,d,h,p,f,m,g,_=n.length,v=[],b=[],y=[],w=0,k=0;for(o=0;o<_;++o){if(s=n[o].label,l=n[o].major?t.major:t.minor,e.font=c=l.string,u=r[c]=r[c]||{data:{},gc:[]},d=l.lineHeight,h=p=0,rn(s)||nn(s)){if(nn(s))for(a=0,i=s.length;a<i;++a)f=s[a],rn(f)||nn(f)||(h=B.measureText(e,u.data,u.gc,h,f),p+=d)}else h=B.measureText(e,u.data,u.gc,h,s),p=d;v.push(h),b.push(p),y.push(d/2),w=Math.max(h,w),k=Math.max(p,k)}function x(e){return{width:v[e]||0,height:b[e]||0,offset:y[e]||0}}return function(e,t){B.each(e,(function(e){var n,r=e.gc,o=r.length/2;if(o>t){for(n=0;n<o;++n)delete e.data[r[n]];r.splice(0,o)}}))}(r,_),m=v.indexOf(w),g=b.indexOf(k),{first:x(0),last:x(_-1),widest:x(m),highest:x(g)}}function cn(e){return e.drawTicks?e.tickMarkLength:0}function un(e){var t,n;return e.display?(t=B.options._parseFont(e),n=B.options.toPadding(e.padding),t.lineHeight+n.height):0}function dn(e,t){return B.extend(B.options._parseFont({fontFamily:on(t.fontFamily,e.fontFamily),fontSize:on(t.fontSize,e.fontSize),fontStyle:on(t.fontStyle,e.fontStyle),lineHeight:on(t.lineHeight,e.lineHeight)}),{color:B.options.resolve([t.fontColor,e.fontColor,Y.global.defaultFontColor])})}function hn(e){var t=dn(e,e.minor);return{minor:t,major:e.major.enabled?dn(e,e.major):t}}function pn(e){var t,n,r,o=[];for(n=0,r=e.length;n<r;++n)void 0!==(t=e[n])._index&&o.push(t);return o}function fn(e,t,n,r){var o,a,i,s,l=on(n,0),c=Math.min(on(r,e.length),e.length),u=0;for(t=Math.ceil(t),r&&(t=(o=r-n)/Math.floor(o/t)),s=l;s<0;)u++,s=Math.round(l+u*t);for(a=Math.max(l,0);a<c;a++)i=e[a],a===s?(i._index=a,u++,s=Math.round(l+u*t)):delete i.label}Y._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:tn.formatters.values,minor:{},major:{}}});var mn=K.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){B.callback(this.options.beforeUpdate,[this])},update:function(e,t,n){var r,o,a,i,s,l=this,c=l.options.ticks,u=c.sampleSize;if(l.beforeUpdate(),l.maxWidth=e,l.maxHeight=t,l.margins=B.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),i=l.buildTicks()||[],(!(i=l.afterBuildTicks(i)||i)||!i.length)&&l.ticks)for(i=[],r=0,o=l.ticks.length;r<o;++r)i.push({value:l.ticks[r],major:!1});return l._ticks=i,s=u<i.length,a=l._convertTicksToLabels(s?function(e,t){for(var n=[],r=e.length/t,o=0,a=e.length;o<a;o+=r)n.push(e[Math.floor(o)]);return n}(i,u):i),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=c.display&&(c.autoSkip||"auto"===c.source)?l._autoSkip(i):i,s&&(a=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=a,l.afterUpdate(),l.minSize},_configure:function(){var e,t,n=this,r=n.options.ticks.reverse;n.isHorizontal()?(e=n.left,t=n.right):(e=n.top,t=n.bottom,r=!r),n._startPixel=e,n._endPixel=t,n._reversePixels=r,n._length=t-e},afterUpdate:function(){B.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){B.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0},afterSetDimensions:function(){B.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){B.callback(this.options.beforeDataLimits,[this])},determineDataLimits:B.noop,afterDataLimits:function(){B.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){B.callback(this.options.beforeBuildTicks,[this])},buildTicks:B.noop,afterBuildTicks:function(e){var t=this;return nn(e)&&e.length?B.callback(t.options.afterBuildTicks,[t,e]):(t.ticks=B.callback(t.options.afterBuildTicks,[t,t.ticks])||t.ticks,e)},beforeTickToLabelConversion:function(){B.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var e=this.options.ticks;this.ticks=this.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){B.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){B.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var e,t,n,r,o,a,i,s=this,l=s.options,c=l.ticks,u=s.getTicks().length,d=c.minRotation||0,h=c.maxRotation,p=d;!s._isVisible()||!c.display||d>=h||u<=1||!s.isHorizontal()?s.labelRotation=d:(t=(e=s._getLabelSizes()).widest.width,n=e.highest.height-e.highest.offset,r=Math.min(s.maxWidth,s.chart.width-t),t+6>(o=l.offset?s.maxWidth/u:r/(u-1))&&(o=r/(u-(l.offset?.5:1)),a=s.maxHeight-cn(l.gridLines)-c.padding-un(l.scaleLabel),i=Math.sqrt(t*t+n*n),p=B.toDegrees(Math.min(Math.asin(Math.min((e.highest.height+6)/o,1)),Math.asin(Math.min(a/i,1))-Math.asin(n/i))),p=Math.max(d,Math.min(h,p))),s.labelRotation=p)},afterCalculateTickRotation:function(){B.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){B.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},n=e.chart,r=e.options,o=r.ticks,a=r.scaleLabel,i=r.gridLines,s=e._isVisible(),l="bottom"===r.position,c=e.isHorizontal();if(c?t.width=e.maxWidth:s&&(t.width=cn(i)+un(a)),c?s&&(t.height=cn(i)+un(a)):t.height=e.maxHeight,o.display&&s){var u=hn(o),d=e._getLabelSizes(),h=d.first,p=d.last,f=d.widest,m=d.highest,g=.4*u.minor.lineHeight,_=o.padding;if(c){var v=0!==e.labelRotation,b=B.toRadians(e.labelRotation),y=Math.cos(b),w=Math.sin(b),k=w*f.width+y*(m.height-(v?m.offset:0))+(v?0:g);t.height=Math.min(e.maxHeight,t.height+k+_);var x,M,E=e.getPixelForTick(0)-e.left,T=e.right-e.getPixelForTick(e.getTicks().length-1);v?(x=l?y*h.width+w*h.offset:w*(h.height-h.offset),M=l?w*(p.height-p.offset):y*p.width+w*p.offset):(x=h.width/2,M=p.width/2),e.paddingLeft=Math.max((x-E)*e.width/(e.width-E),0)+3,e.paddingRight=Math.max((M-T)*e.width/(e.width-T),0)+3}else{var S=o.mirror?0:f.width+_+g;t.width=Math.min(e.maxWidth,t.width+S),e.paddingTop=h.height/2,e.paddingBottom=p.height/2}}e.handleMargins(),c?(e.width=e._length=n.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=n.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){B.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(rn(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var t,n,r,o=this;for(o.ticks=e.map((function(e){return e.value})),o.beforeTickToLabelConversion(),t=o.convertTicksToLabels(e)||o.ticks,o.afterTickToLabelConversion(),n=0,r=e.length;n<r;++n)e[n].label=t[n];return t},_getLabelSizes:function(){var e=this,t=e._labelSizes;return t||(e._labelSizes=t=ln(e.ctx,hn(e.options.ticks),e.getTicks(),e.longestTextCache),e.longestLabelWidth=t.widest.width),t},_parseValue:function(e){var t,n,r,o;return nn(e)?(t=+this.getRightValue(e[0]),n=+this.getRightValue(e[1]),r=Math.min(t,n),o=Math.max(t,n)):(t=void 0,n=e=+this.getRightValue(e),r=e,o=e),{min:r,max:o,start:t,end:n}},_getScaleLabel:function(e){var t=this._parseValue(e);return void 0!==t.start?"["+t.start+", "+t.end+"]":+this.getRightValue(e)},getLabelForIndex:B.noop,getPixelForValue:B.noop,getValueForPixel:B.noop,getPixelForTick:function(e){var t=this.options.offset,n=this._ticks.length,r=1/Math.max(n-(t?0:1),1);return e<0||e>n-1?null:this.getPixelForDecimal(e*r+(t?r/2:0))},getPixelForDecimal:function(e){return this._reversePixels&&(e=1-e),this._startPixel+e*this._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this.min,t=this.max;return this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0},_autoSkip:function(e){var t,n,r,o,a=this.options.ticks,i=this._length,s=a.maxTicksLimit||i/this._tickSize()+1,l=a.major.enabled?function(e){var t,n,r=[];for(t=0,n=e.length;t<n;t++)e[t].major&&r.push(t);return r}(e):[],c=l.length,u=l[0],d=l[c-1];if(c>s)return function(e,t,n){var r,o,a=0,i=t[0];for(n=Math.ceil(n),r=0;r<e.length;r++)o=e[r],r===i?(o._index=r,i=t[++a*n]):delete o.label}(e,l,c/s),pn(e);if(r=function(e,t,n,r){var o,a,i,s,l=function(e){var t,n,r=e.length;if(r<2)return!1;for(n=e[0],t=1;t<r;++t)if(e[t]-e[t-1]!==n)return!1;return n}(e),c=(t.length-1)/r;if(!l)return Math.max(c,1);for(i=0,s=(o=B.math._factorize(l)).length-1;i<s;i++)if((a=o[i])>c)return a;return Math.max(c,1)}(l,e,0,s),c>0){for(t=0,n=c-1;t<n;t++)fn(e,r,l[t],l[t+1]);return o=c>1?(d-u)/(c-1):null,fn(e,r,B.isNullOrUndef(o)?0:u-o,u),fn(e,r,d,B.isNullOrUndef(o)?e.length:d+o),pn(e)}return fn(e,r),pn(e)},_tickSize:function(){var e=this.options.ticks,t=B.toRadians(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),o=this._getLabelSizes(),a=e.autoSkipPadding||0,i=o?o.widest.width+a:0,s=o?o.highest.height+a:0;return this.isHorizontal()?s*n>i*r?i/n:s/r:s*r<i*n?s/n:i/r},_isVisible:function(){var e,t,n,r=this.chart,o=this.options.display;if("auto"!==o)return!!o;for(e=0,t=r.data.datasets.length;e<t;++e)if(r.isDatasetVisible(e)&&((n=r.getDatasetMeta(e)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(e){var t,n,r,o,a,i,s,l,c,u,d,h,p,f,m,g,_,v=this,b=v.chart,y=v.options,w=y.gridLines,k=y.position,x=w.offsetGridLines,M=v.isHorizontal(),E=v._ticksToDraw,T=E.length+(x?1:0),S=cn(w),D=[],L=w.drawBorder?an(w.lineWidth,0,0):0,C=L/2,P=B._alignPixel,O=function(e){return P(b,e,L)};for("top"===k?(t=O(v.bottom),s=v.bottom-S,c=t-C,d=O(e.top)+C,p=e.bottom):"bottom"===k?(t=O(v.top),d=e.top,p=O(e.bottom)-C,s=t+C,c=v.top+S):"left"===k?(t=O(v.right),i=v.right-S,l=t-C,u=O(e.left)+C,h=e.right):(t=O(v.left),u=e.left,h=O(e.right)-C,i=t+C,l=v.left+S),n=0;n<T;++n)r=E[n]||{},rn(r.label)&&n<E.length||(n===v.zeroLineIndex&&y.offset===x?(f=w.zeroLineWidth,m=w.zeroLineColor,g=w.zeroLineBorderDash||[],_=w.zeroLineBorderDashOffset||0):(f=an(w.lineWidth,n,1),m=an(w.color,n,"rgba(0,0,0,0.1)"),g=w.borderDash||[],_=w.borderDashOffset||0),void 0!==(o=sn(v,r._index||n,x))&&(a=P(b,o,f),M?i=l=u=h=a:s=c=d=p=a,D.push({tx1:i,ty1:s,tx2:l,ty2:c,x1:u,y1:d,x2:h,y2:p,width:f,color:m,borderDash:g,borderDashOffset:_})));return D.ticksLength=T,D.borderValue=t,D},_computeLabelItems:function(){var e,t,n,r,o,a,i,s,l,c,u,d,h=this,p=h.options,f=p.ticks,m=p.position,g=f.mirror,_=h.isHorizontal(),v=h._ticksToDraw,b=hn(f),y=f.padding,w=cn(p.gridLines),k=-B.toRadians(h.labelRotation),x=[];for("top"===m?(a=h.bottom-w-y,i=k?"left":"center"):"bottom"===m?(a=h.top+w+y,i=k?"right":"center"):"left"===m?(o=h.right-(g?0:w)-y,i=g?"left":"right"):(o=h.left+(g?0:w)+y,i=g?"right":"left"),e=0,t=v.length;e<t;++e)r=(n=v[e]).label,rn(r)||(s=h.getPixelForTick(n._index||e)+f.labelOffset,c=(l=n.major?b.major:b.minor).lineHeight,u=nn(r)?r.length:1,_?(o=s,d="top"===m?((k?1:.5)-u)*c:(k?0:.5)*c):(a=s,d=(1-u)*c/2),x.push({x:o,y:a,rotation:k,label:r,font:l,textOffset:d,textAlign:i}));return x},_drawGrid:function(e){var t=this,n=t.options.gridLines;if(n.display){var r,o,a,i,s,l=t.ctx,c=t.chart,u=B._alignPixel,d=n.drawBorder?an(n.lineWidth,0,0):0,h=t._gridLineItems||(t._gridLineItems=t._computeGridLineItems(e));for(a=0,i=h.length;a<i;++a)r=(s=h[a]).width,o=s.color,r&&o&&(l.save(),l.lineWidth=r,l.strokeStyle=o,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(d){var p,f,m,g,_=d,v=an(n.lineWidth,h.ticksLength-1,1),b=h.borderValue;t.isHorizontal()?(p=u(c,t.left,_)-_/2,f=u(c,t.right,v)+v/2,m=g=b):(m=u(c,t.top,_)-_/2,g=u(c,t.bottom,v)+v/2,p=f=b),l.lineWidth=d,l.strokeStyle=an(n.color,0),l.beginPath(),l.moveTo(p,m),l.lineTo(f,g),l.stroke()}}},_drawLabels:function(){var e=this;if(e.options.ticks.display){var t,n,r,o,a,i,s,l,c=e.ctx,u=e._labelItems||(e._labelItems=e._computeLabelItems());for(t=0,r=u.length;t<r;++t){if(i=(a=u[t]).font,c.save(),c.translate(a.x,a.y),c.rotate(a.rotation),c.font=i.string,c.fillStyle=i.color,c.textBaseline="middle",c.textAlign=a.textAlign,s=a.label,l=a.textOffset,nn(s))for(n=0,o=s.length;n<o;++n)c.fillText(""+s[n],0,l),l+=i.lineHeight;else c.fillText(s,0,l);c.restore()}}},_drawTitle:function(){var e=this,t=e.ctx,n=e.options,r=n.scaleLabel;if(r.display){var o,a,i=on(r.fontColor,Y.global.defaultFontColor),s=B.options._parseFont(r),l=B.options.toPadding(r.padding),c=s.lineHeight/2,u=n.position,d=0;if(e.isHorizontal())o=e.left+e.width/2,a="bottom"===u?e.bottom-c-l.bottom:e.top+c+l.top;else{var h="left"===u;o=h?e.left+c+l.top:e.right-c-l.top,a=e.top+e.height/2,d=h?-.5*Math.PI:.5*Math.PI}t.save(),t.translate(o,a),t.rotate(d),t.textAlign="center",t.textBaseline="middle",t.fillStyle=i,t.font=s.string,t.fillText(r.labelString,0,0),t.restore()}},draw:function(e){this._isVisible()&&(this._drawGrid(e),this._drawTitle(),this._drawLabels())},_layers:function(){var e=this,t=e.options,n=t.ticks&&t.ticks.z||0,r=t.gridLines&&t.gridLines.z||0;return e._isVisible()&&n!==r&&e.draw===e._draw?[{z:r,draw:function(){e._drawGrid.apply(e,arguments),e._drawTitle.apply(e,arguments)}},{z:n,draw:function(){e._drawLabels.apply(e,arguments)}}]:[{z:n,draw:function(){e.draw.apply(e,arguments)}}]},_getMatchingVisibleMetas:function(e){var t=this,n=t.isHorizontal();return t.chart._getSortedVisibleDatasetMetas().filter((function(r){return(!e||r.type===e)&&(n?r.xAxisID===t.id:r.yAxisID===t.id)}))}});mn.prototype._draw=mn.prototype.draw;var gn=mn,_n=B.isNullOrUndef,vn=gn.extend({determineDataLimits:function(){var e,t=this,n=t._getLabels(),r=t.options.ticks,o=r.min,a=r.max,i=0,s=n.length-1;void 0!==o&&(e=n.indexOf(o))>=0&&(i=e),void 0!==a&&(e=n.indexOf(a))>=0&&(s=e),t.minIndex=i,t.maxIndex=s,t.min=n[i],t.max=n[s]},buildTicks:function(){var e=this._getLabels(),t=this.minIndex,n=this.maxIndex;this.ticks=0===t&&n===e.length-1?e:e.slice(t,n+1)},getLabelForIndex:function(e,t){var n=this.chart;return n.getDatasetMeta(t).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[t].data[e]):this._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,n=e.ticks;gn.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),n&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(n.length-(t?0:1),1))},getPixelForValue:function(e,t,n){var r,o,a,i=this;return _n(t)||_n(n)||(e=i.chart.data.datasets[n].data[t]),_n(e)||(r=i.isHorizontal()?e.x:e.y),(void 0!==r||void 0!==e&&isNaN(t))&&(o=i._getLabels(),e=B.valueOrDefault(r,e),t=-1!==(a=o.indexOf(e))?a:t,isNaN(t)&&(t=e)),i.getPixelForDecimal((t-i._startValue)/i._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange);return Math.min(Math.max(t,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),bn={position:"bottom"};vn._defaults=bn;var yn=B.noop,wn=B.isNullOrUndef,kn=gn.extend({getRightValue:function(e){return"string"==typeof e?+e:gn.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;if(t.beginAtZero){var n=B.sign(e.min),r=B.sign(e.max);n<0&&r<0?e.max=0:n>0&&r>0&&(e.min=0)}var o=void 0!==t.min||void 0!==t.suggestedMin,a=void 0!==t.max||void 0!==t.suggestedMax;void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(null===e.min?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(null===e.max?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),o!==a&&e.min>=e.max&&(o?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this.options.ticks,n=t.stepSize,r=t.maxTicksLimit;return n?e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(e=this._computeTickLimit(),r=r||11),r&&(e=Math.min(r,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:yn,buildTicks:function(){var e=this,t=e.options.ticks,n=e.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:t.min,max:t.max,precision:t.precision,stepSize:B.valueOrDefault(t.fixedStepSize,t.stepSize)},o=e.ticks=function(e,t){var n,r,o,a,i=[],s=e.stepSize,l=s||1,c=e.maxTicks-1,u=e.min,d=e.max,h=e.precision,p=t.min,f=t.max,m=B.niceNum((f-p)/c/l)*l;if(m<1e-14&&wn(u)&&wn(d))return[p,f];(a=Math.ceil(f/m)-Math.floor(p/m))>c&&(m=B.niceNum(a*m/c/l)*l),s||wn(h)?n=Math.pow(10,B._decimalPlaces(m)):(n=Math.pow(10,h),m=Math.ceil(m*n)/n),r=Math.floor(p/m)*m,o=Math.ceil(f/m)*m,s&&(!wn(u)&&B.almostWhole(u/m,m/1e3)&&(r=u),!wn(d)&&B.almostWhole(d/m,m/1e3)&&(o=d)),a=(o-r)/m,a=B.almostEquals(a,Math.round(a),m/1e3)?Math.round(a):Math.ceil(a),r=Math.round(r*n)/n,o=Math.round(o*n)/n,i.push(wn(u)?r:u);for(var g=1;g<a;++g)i.push(Math.round((r+g*m)*n)/n);return i.push(wn(d)?o:d),i}(r,e);e.handleDirectionalChanges(),e.max=B.max(o),e.min=B.min(o),t.reverse?(o.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),gn.prototype.convertTicksToLabels.call(e)},_configure:function(){var e,t=this,n=t.getTicks(),r=t.min,o=t.max;gn.prototype._configure.call(t),t.options.offset&&n.length&&(r-=e=(o-r)/Math.max(n.length-1,1)/2,o+=e),t._startValue=r,t._endValue=o,t._valueRange=o-r}}),xn={position:"left",ticks:{callback:tn.formatters.linear}};function Mn(e,t,n,r){var o,a,i=e.options,s=function(e,t,n){var r=[n.type,void 0===t&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===e[r]&&(e[r]={pos:[],neg:[]}),e[r]}(t,i.stacked,n),l=s.pos,c=s.neg,u=r.length;for(o=0;o<u;++o)a=e._parseValue(r[o]),isNaN(a.min)||isNaN(a.max)||n.data[o].hidden||(l[o]=l[o]||0,c[o]=c[o]||0,i.relativePoints?l[o]=100:a.min<0||a.max<0?c[o]+=a.min:l[o]+=a.max)}function En(e,t,n){var r,o,a=n.length;for(r=0;r<a;++r)o=e._parseValue(n[r]),isNaN(o.min)||isNaN(o.max)||t.data[r].hidden||(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max))}var Tn=kn.extend({determineDataLimits:function(){var e,t,n,r,o=this,a=o.options,i=o.chart.data.datasets,s=o._getMatchingVisibleMetas(),l=a.stacked,c={},u=s.length;if(o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,void 0===l)for(e=0;!l&&e<u;++e)l=void 0!==(t=s[e]).stack;for(e=0;e<u;++e)n=i[(t=s[e]).index].data,l?Mn(o,c,t,n):En(o,t,n);B.each(c,(function(e){r=e.pos.concat(e.neg),o.min=Math.min(o.min,B.min(r)),o.max=Math.max(o.max,B.max(r))})),o.min=B.isFinite(o.min)&&!isNaN(o.min)?o.min:0,o.max=B.isFinite(o.max)&&!isNaN(o.max)?o.max:1,o.handleTickRangeOptions()},_computeTickLimit:function(){var e;return this.isHorizontal()?Math.ceil(this.width/40):(e=B.options._parseFont(this.options.ticks),Math.ceil(this.height/e.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForValue:function(e){return this.getPixelForDecimal((+this.getRightValue(e)-this._startValue)/this._valueRange)},getValueForPixel:function(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange},getPixelForTick:function(e){var t=this.ticksAsNumbers;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])}}),Sn=xn;Tn._defaults=Sn;var Dn=B.valueOrDefault,Ln=B.math.log10,Cn={position:"left",ticks:{callback:tn.formatters.logarithmic}};function Pn(e,t){return B.isFinite(e)&&e>=0?e:t}var On=gn.extend({determineDataLimits:function(){var e,t,n,r,o,a,i=this,s=i.options,l=i.chart,c=l.data.datasets,u=i.isHorizontal();function d(e){return u?e.xAxisID===i.id:e.yAxisID===i.id}i.min=Number.POSITIVE_INFINITY,i.max=Number.NEGATIVE_INFINITY,i.minNotZero=Number.POSITIVE_INFINITY;var h=s.stacked;if(void 0===h)for(e=0;e<c.length;e++)if(t=l.getDatasetMeta(e),l.isDatasetVisible(e)&&d(t)&&void 0!==t.stack){h=!0;break}if(s.stacked||h){var p={};for(e=0;e<c.length;e++){var f=[(t=l.getDatasetMeta(e)).type,void 0===s.stacked&&void 0===t.stack?e:"",t.stack].join(".");if(l.isDatasetVisible(e)&&d(t))for(void 0===p[f]&&(p[f]=[]),o=0,a=(r=c[e].data).length;o<a;o++){var m=p[f];n=i._parseValue(r[o]),isNaN(n.min)||isNaN(n.max)||t.data[o].hidden||n.min<0||n.max<0||(m[o]=m[o]||0,m[o]+=n.max)}}B.each(p,(function(e){if(e.length>0){var t=B.min(e),n=B.max(e);i.min=Math.min(i.min,t),i.max=Math.max(i.max,n)}}))}else for(e=0;e<c.length;e++)if(t=l.getDatasetMeta(e),l.isDatasetVisible(e)&&d(t))for(o=0,a=(r=c[e].data).length;o<a;o++)n=i._parseValue(r[o]),isNaN(n.min)||isNaN(n.max)||t.data[o].hidden||n.min<0||n.max<0||(i.min=Math.min(n.min,i.min),i.max=Math.max(n.max,i.max),0!==n.min&&(i.minNotZero=Math.min(n.min,i.minNotZero)));i.min=B.isFinite(i.min)?i.min:null,i.max=B.isFinite(i.max)?i.max:null,i.minNotZero=B.isFinite(i.minNotZero)?i.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;e.min=Pn(t.min,e.min),e.max=Pn(t.max,e.max),e.min===e.max&&(0!==e.min&&null!==e.min?(e.min=Math.pow(10,Math.floor(Ln(e.min))-1),e.max=Math.pow(10,Math.floor(Ln(e.max))+1)):(e.min=1,e.max=10)),null===e.min&&(e.min=Math.pow(10,Math.floor(Ln(e.max))-1)),null===e.max&&(e.max=0!==e.min?Math.pow(10,Math.floor(Ln(e.min))+1):10),null===e.minNotZero&&(e.min>0?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(Ln(e.max))):e.minNotZero=1)},buildTicks:function(){var e=this,t=e.options.ticks,n=!e.isHorizontal(),r={min:Pn(t.min),max:Pn(t.max)},o=e.ticks=function(e,t){var n,r,o=[],a=Dn(e.min,Math.pow(10,Math.floor(Ln(t.min)))),i=Math.floor(Ln(t.max)),s=Math.ceil(t.max/Math.pow(10,i));0===a?(n=Math.floor(Ln(t.minNotZero)),r=Math.floor(t.minNotZero/Math.pow(10,n)),o.push(a),a=r*Math.pow(10,n)):(n=Math.floor(Ln(a)),r=Math.floor(a/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{o.push(a),10==++r&&(r=1,l=++n>=0?1:l),a=Math.round(r*Math.pow(10,n)*l)/l}while(n<i||n===i&&r<s);var c=Dn(e.max,a);return o.push(c),o}(r,e);e.max=B.max(o),e.min=B.min(o),t.reverse?(n=!n,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),n&&o.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),gn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){var t=this.tickValues;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(Ln(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,n=0;gn.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),n=Dn(e.options.ticks.fontSize,Y.global.defaultFontSize)/e._length),e._startValue=Ln(t),e._valueOffset=n,e._valueRange=(Ln(e.max)-Ln(t))/(1-n)},getPixelForValue:function(e){var t=this,n=0;return(e=+t.getRightValue(e))>t.min&&e>0&&(n=(Ln(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(n)},getValueForPixel:function(e){var t=this,n=t.getDecimalForPixel(e);return 0===n&&0===t.min?0:Math.pow(10,t._startValue+(n-t._valueOffset)*t._valueRange)}}),Nn=Cn;On._defaults=Nn;var An=B.valueOrDefault,In=B.valueAtIndexOrDefault,Rn=B.options.resolve,Yn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:tn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function jn(e){var t=e.ticks;return t.display&&e.display?An(t.fontSize,Y.global.defaultFontSize)+2*t.backdropPaddingY:0}function Fn(e,t,n,r,o){return e===r||e===o?{start:t-n/2,end:t+n/2}:e<r||e>o?{start:t-n,end:t}:{start:t,end:t+n}}function Hn(e){return 0===e||180===e?"center":e<180?"left":"right"}function zn(e,t,n,r){var o,a,i=n.y+r/2;if(B.isArray(t))for(o=0,a=t.length;o<a;++o)e.fillText(t[o],n.x,i),i+=r;else e.fillText(t,n.x,i)}function Bn(e,t,n){90===e||270===e?n.y-=t.h/2:(e>270||e<90)&&(n.y-=t.h)}function Un(e){return B.isNumber(e)?e:0}var Vn=kn.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=jn(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;B.each(t.data.datasets,(function(o,a){if(t.isDatasetVisible(a)){var i=t.getDatasetMeta(a);B.each(o.data,(function(t,o){var a=+e.getRightValue(t);isNaN(a)||i.data[o].hidden||(n=Math.min(a,n),r=Math.max(a,r))}))}})),e.min=n===Number.POSITIVE_INFINITY?0:n,e.max=r===Number.NEGATIVE_INFINITY?0:r,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/jn(this.options))},convertTicksToLabels:function(){var e=this;kn.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map((function(){var t=B.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""}))},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this.options;e.display&&e.pointLabels.display?function(e){var t,n,r,o=B.options._parseFont(e.options.pointLabels),a={l:0,r:e.width,t:0,b:e.height-e.paddingTop},i={};e.ctx.font=o.string,e._pointLabelSizes=[];var s,l,c,u=e.chart.data.labels.length;for(t=0;t<u;t++){r=e.getPointPosition(t,e.drawingArea+5),s=e.ctx,l=o.lineHeight,c=e.pointLabels[t],n=B.isArray(c)?{w:B.longestText(s,s.font,c),h:c.length*l}:{w:s.measureText(c).width,h:l},e._pointLabelSizes[t]=n;var d=e.getIndexAngle(t),h=B.toDegrees(d)%360,p=Fn(h,r.x,n.w,0,180),f=Fn(h,r.y,n.h,90,270);p.start<a.l&&(a.l=p.start,i.l=d),p.end>a.r&&(a.r=p.end,i.r=d),f.start<a.t&&(a.t=f.start,i.t=d),f.end>a.b&&(a.b=f.end,i.b=d)}e.setReductions(e.drawingArea,a,i)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(e,t,n){var r=this,o=t.l/Math.sin(n.l),a=Math.max(t.r-r.width,0)/Math.sin(n.r),i=-t.t/Math.cos(n.t),s=-Math.max(t.b-(r.height-r.paddingTop),0)/Math.cos(n.b);o=Un(o),a=Un(a),i=Un(i),s=Un(s),r.drawingArea=Math.min(Math.floor(e-(o+a)/2),Math.floor(e-(i+s)/2)),r.setCenterPoint(o,a,i,s)},setCenterPoint:function(e,t,n,r){var o=this,a=o.width-t-o.drawingArea,i=e+o.drawingArea,s=n+o.drawingArea,l=o.height-o.paddingTop-r-o.drawingArea;o.xCenter=Math.floor((i+a)/2+o.left),o.yCenter=Math.floor((s+l)/2+o.top+o.paddingTop)},getIndexAngle:function(e){var t=this.chart,n=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(B.isNullOrUndef(e))return NaN;var n=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*n:(e-t.min)*n},getPointPosition:function(e,t){var n=this.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this.min,n=this.max;return this.getPointPositionForValue(e||0,this.beginAtZero?0:t<0&&n<0?n:t>0&&n>0?t:0)},_drawGrid:function(){var e,t,n,r=this,o=r.ctx,a=r.options,i=a.gridLines,s=a.angleLines,l=An(s.lineWidth,i.lineWidth),c=An(s.color,i.color);if(a.pointLabels.display&&function(e){var t=e.ctx,n=e.options,r=n.pointLabels,o=jn(n),a=e.getDistanceFromCenterForValue(n.ticks.reverse?e.min:e.max),i=B.options._parseFont(r);t.save(),t.font=i.string,t.textBaseline="middle";for(var s=e.chart.data.labels.length-1;s>=0;s--){var l=0===s?o/2:0,c=e.getPointPosition(s,a+l+5),u=In(r.fontColor,s,Y.global.defaultFontColor);t.fillStyle=u;var d=e.getIndexAngle(s),h=B.toDegrees(d);t.textAlign=Hn(h),Bn(h,e._pointLabelSizes[s],c),zn(t,e.pointLabels[s],c,i.lineHeight)}t.restore()}(r),i.display&&B.each(r.ticks,(function(e,n){0!==n&&(t=r.getDistanceFromCenterForValue(r.ticksAsNumbers[n]),function(e,t,n,r){var o,a=e.ctx,i=t.circular,s=e.chart.data.labels.length,l=In(t.color,r-1),c=In(t.lineWidth,r-1);if((i||s)&&l&&c){if(a.save(),a.strokeStyle=l,a.lineWidth=c,a.setLineDash&&(a.setLineDash(t.borderDash||[]),a.lineDashOffset=t.borderDashOffset||0),a.beginPath(),i)a.arc(e.xCenter,e.yCenter,n,0,2*Math.PI);else{o=e.getPointPosition(0,n),a.moveTo(o.x,o.y);for(var u=1;u<s;u++)o=e.getPointPosition(u,n),a.lineTo(o.x,o.y)}a.closePath(),a.stroke(),a.restore()}}(r,i,t,n))})),s.display&&l&&c){for(o.save(),o.lineWidth=l,o.strokeStyle=c,o.setLineDash&&(o.setLineDash(Rn([s.borderDash,i.borderDash,[]])),o.lineDashOffset=Rn([s.borderDashOffset,i.borderDashOffset,0])),e=r.chart.data.labels.length-1;e>=0;e--)t=r.getDistanceFromCenterForValue(a.ticks.reverse?r.min:r.max),n=r.getPointPosition(e,t),o.beginPath(),o.moveTo(r.xCenter,r.yCenter),o.lineTo(n.x,n.y),o.stroke();o.restore()}},_drawLabels:function(){var e=this,t=e.ctx,n=e.options.ticks;if(n.display){var r,o,a=e.getIndexAngle(0),i=B.options._parseFont(n),s=An(n.fontColor,Y.global.defaultFontColor);t.save(),t.font=i.string,t.translate(e.xCenter,e.yCenter),t.rotate(a),t.textAlign="center",t.textBaseline="middle",B.each(e.ticks,(function(a,l){(0!==l||n.reverse)&&(r=e.getDistanceFromCenterForValue(e.ticksAsNumbers[l]),n.showLabelBackdrop&&(o=t.measureText(a).width,t.fillStyle=n.backdropColor,t.fillRect(-o/2-n.backdropPaddingX,-r-i.size/2-n.backdropPaddingY,o+2*n.backdropPaddingX,i.size+2*n.backdropPaddingY)),t.fillStyle=s,t.fillText(a,0,-r))})),t.restore()}},_drawTitle:B.noop}),Wn=Yn;Vn._defaults=Wn;var qn=B._deprecated,Gn=B.options.resolve,Jn=B.valueOrDefault,Kn=Number.MIN_SAFE_INTEGER||-9007199254740991,Qn=Number.MAX_SAFE_INTEGER||9007199254740991,Xn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},$n=Object.keys(Xn);function Zn(e,t){return e-t}function er(e){return B.valueOrDefault(e.time.min,e.ticks.min)}function tr(e){return B.valueOrDefault(e.time.max,e.ticks.max)}function nr(e,t,n,r){var o=function(e,t,n){for(var r,o,a,i=0,s=e.length-1;i>=0&&i<=s;){if(o=e[(r=i+s>>1)-1]||null,a=e[r],!o)return{lo:null,hi:a};if(a[t]<n)i=r+1;else{if(!(o[t]>n))return{lo:o,hi:a};s=r-1}}return{lo:a,hi:null}}(e,t,n),a=o.lo?o.hi?o.lo:e[e.length-2]:e[0],i=o.lo?o.hi?o.hi:e[e.length-1]:e[1],s=i[t]-a[t],l=s?(n-a[t])/s:0,c=(i[r]-a[r])*l;return a[r]+c}function rr(e,t){var n=e._adapter,r=e.options.time,o=r.parser,a=o||r.format,i=t;return"function"==typeof o&&(i=o(i)),B.isFinite(i)||(i="string"==typeof a?n.parse(i,a):n.parse(i)),null!==i?+i:(o||"function"!=typeof a||(i=a(t),B.isFinite(i)||(i=n.parse(i))),i)}function or(e,t){if(B.isNullOrUndef(t))return null;var n=e.options.time,r=rr(e,e.getRightValue(t));return null===r||n.round&&(r=+e._adapter.startOf(r,n.round)),r}function ar(e,t,n,r){var o,a,i,s=$n.length;for(o=$n.indexOf(e);o<s-1;++o)if(i=(a=Xn[$n[o]]).steps?a.steps:Qn,a.common&&Math.ceil((n-t)/(i*a.size))<=r)return $n[o];return $n[s-1]}function ir(e,t,n){var r,o,a=[],i={},s=t.length;for(r=0;r<s;++r)i[o=t[r]]=r,a.push({value:o,major:!1});return 0!==s&&n?function(e,t,n,r){var o,a,i=e._adapter,s=+i.startOf(t[0].value,r),l=t[t.length-1].value;for(o=s;o<=l;o=+i.add(o,1,r))(a=n[o])>=0&&(t[a].major=!0);return t}(e,a,i,n):a}var sr=gn.extend({initialize:function(){this.mergeTicksOptions(),gn.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,n=t.time||(t.time={}),r=e._adapter=new en._date(t.adapters.date);return qn("time scale",n.format,"time.format","time.parser"),qn("time scale",n.min,"time.min","ticks.min"),qn("time scale",n.max,"time.max","ticks.max"),B.mergeIf(n.displayFormats,r.formats()),gn.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),gn.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e,t,n,r,o,a,i,s=this,l=s.chart,c=s._adapter,u=s.options,d=u.time.unit||"day",h=Qn,p=Kn,f=[],m=[],g=[],_=s._getLabels();for(e=0,n=_.length;e<n;++e)g.push(or(s,_[e]));for(e=0,n=(l.data.datasets||[]).length;e<n;++e)if(l.isDatasetVisible(e))if(o=l.data.datasets[e].data,B.isObject(o[0]))for(m[e]=[],t=0,r=o.length;t<r;++t)a=or(s,o[t]),f.push(a),m[e][t]=a;else m[e]=g.slice(0),i||(f=f.concat(g),i=!0);else m[e]=[];g.length&&(h=Math.min(h,g[0]),p=Math.max(p,g[g.length-1])),f.length&&(f=n>1?function(e){var t,n,r,o={},a=[];for(t=0,n=e.length;t<n;++t)o[r=e[t]]||(o[r]=!0,a.push(r));return a}(f).sort(Zn):f.sort(Zn),h=Math.min(h,f[0]),p=Math.max(p,f[f.length-1])),h=or(s,er(u))||h,p=or(s,tr(u))||p,h=h===Qn?+c.startOf(Date.now(),d):h,p=p===Kn?+c.endOf(Date.now(),d)+1:p,s.min=Math.min(h,p),s.max=Math.max(h+1,p),s._table=[],s._timestamps={data:f,datasets:m,labels:g}},buildTicks:function(){var e,t,n,r=this,o=r.min,a=r.max,i=r.options,s=i.ticks,l=i.time,c=r._timestamps,u=[],d=r.getLabelCapacity(o),h=s.source,p=i.distribution;for(c="data"===h||"auto"===h&&"series"===p?c.data:"labels"===h?c.labels:function(e,t,n,r){var o,a=e._adapter,i=e.options,s=i.time,l=s.unit||ar(s.minUnit,t,n,r),c=Gn([s.stepSize,s.unitStepSize,1]),u="week"===l&&s.isoWeekday,d=t,h=[];if(u&&(d=+a.startOf(d,"isoWeek",u)),d=+a.startOf(d,u?"day":l),a.diff(n,t,l)>1e5*c)throw t+" and "+n+" are too far apart with stepSize of "+c+" "+l;for(o=d;o<n;o=+a.add(o,c,l))h.push(o);return o!==n&&"ticks"!==i.bounds||h.push(o),h}(r,o,a,d),"ticks"===i.bounds&&c.length&&(o=c[0],a=c[c.length-1]),o=or(r,er(i))||o,a=or(r,tr(i))||a,e=0,t=c.length;e<t;++e)(n=c[e])>=o&&n<=a&&u.push(n);return r.min=o,r.max=a,r._unit=l.unit||(s.autoSkip?ar(l.minUnit,r.min,r.max,d):function(e,t,n,r,o){var a,i;for(a=$n.length-1;a>=$n.indexOf(n);a--)if(i=$n[a],Xn[i].common&&e._adapter.diff(o,r,i)>=t-1)return i;return $n[n?$n.indexOf(n):0]}(r,u.length,l.minUnit,r.min,r.max)),r._majorUnit=s.major.enabled&&"year"!==r._unit?function(e){for(var t=$n.indexOf(e)+1,n=$n.length;t<n;++t)if(Xn[$n[t]].common)return $n[t]}(r._unit):void 0,r._table=function(e,t,n,r){if("linear"===r||!e.length)return[{time:t,pos:0},{time:n,pos:1}];var o,a,i,s,l,c=[],u=[t];for(o=0,a=e.length;o<a;++o)(s=e[o])>t&&s<n&&u.push(s);for(u.push(n),o=0,a=u.length;o<a;++o)l=u[o+1],i=u[o-1],s=u[o],void 0!==i&&void 0!==l&&Math.round((l+i)/2)===s||c.push({time:s,pos:o/(a-1)});return c}(r._timestamps.data,o,a,p),r._offsets=function(e,t,n,r,o){var a,i,s=0,l=0;return o.offset&&t.length&&(a=nr(e,"time",t[0],"pos"),s=1===t.length?1-a:(nr(e,"time",t[1],"pos")-a)/2,i=nr(e,"time",t[t.length-1],"pos"),l=1===t.length?i:(i-nr(e,"time",t[t.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(r._table,u,0,0,i),s.reverse&&u.reverse(),ir(r,u,r._majorUnit)},getLabelForIndex:function(e,t){var n=this,r=n._adapter,o=n.chart.data,a=n.options.time,i=o.labels&&e<o.labels.length?o.labels[e]:"",s=o.datasets[t].data[e];return B.isObject(s)&&(i=n.getRightValue(s)),a.tooltipFormat?r.format(rr(n,i),a.tooltipFormat):"string"==typeof i?i:r.format(rr(n,i),a.displayFormats.datetime)},tickFormatFunction:function(e,t,n,r){var o=this._adapter,a=this.options,i=a.time.displayFormats,s=i[this._unit],l=this._majorUnit,c=i[l],u=n[t],d=a.ticks,h=l&&c&&u&&u.major,p=o.format(e,r||(h?c:s)),f=h?d.major:d.minor,m=Gn([f.callback,f.userCallback,d.callback,d.userCallback]);return m?m(p,t,n):p},convertTicksToLabels:function(e){var t,n,r=[];for(t=0,n=e.length;t<n;++t)r.push(this.tickFormatFunction(e[t].value,t,e));return r},getPixelForOffset:function(e){var t=this._offsets,n=nr(this._table,"time",e,"pos");return this.getPixelForDecimal((t.start+n)*t.factor)},getPixelForValue:function(e,t,n){var r=null;if(void 0!==t&&void 0!==n&&(r=this._timestamps.datasets[n][t]),null===r&&(r=or(this,e)),null!==r)return this.getPixelForOffset(r)},getPixelForTick:function(e){var t=this.getTicks();return e>=0&&e<t.length?this.getPixelForOffset(t[e].value):null},getValueForPixel:function(e){var t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end,r=nr(this._table,"pos",n,"time");return this._adapter._create(r)},_getLabelSize:function(e){var t=this.options.ticks,n=this.ctx.measureText(e).width,r=B.toRadians(this.isHorizontal()?t.maxRotation:t.minRotation),o=Math.cos(r),a=Math.sin(r),i=Jn(t.fontSize,Y.global.defaultFontSize);return{w:n*o+i*a,h:n*a+i*o}},getLabelWidth:function(e){return this._getLabelSize(e).w},getLabelCapacity:function(e){var t=this,n=t.options.time,r=n.displayFormats,o=r[n.unit]||r.millisecond,a=t.tickFormatFunction(e,0,ir(t,[e],t._majorUnit),o),i=t._getLabelSize(a),s=Math.floor(t.isHorizontal()?t.width/i.w:t.height/i.h);return t.options.offset&&s--,s>0?s:1}}),lr={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};sr._defaults=lr;var cr={category:vn,linear:Tn,logarithmic:On,radialLinear:Vn,time:sr},ur={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};en._date.override("function"==typeof e?{_id:"moment",formats:function(){return ur},parse:function(t,n){return"string"==typeof t&&"string"==typeof n?t=e(t,n):t instanceof e||(t=e(t)),t.isValid()?t.valueOf():null},format:function(t,n){return e(t).format(n)},add:function(t,n,r){return e(t).add(n,r).valueOf()},diff:function(t,n,r){return e(t).diff(e(n),r)},startOf:function(t,n,r){return t=e(t),"isoWeek"===n?t.isoWeekday(r).valueOf():t.startOf(n).valueOf()},endOf:function(t,n){return e(t).endOf(n).valueOf()},_create:function(t){return e(t)}}:{}),Y._set("global",{plugins:{filler:{propagate:!0}}});var dr={dataset:function(e){var t=e.fill,n=e.chart,r=n.getDatasetMeta(t),o=r&&n.isDatasetVisible(t)&&r.dataset._children||[],a=o.length||0;return a?function(e,t){return t<a&&o[t]._view||null}:null},boundary:function(e){var t=e.boundary,n=t?t.x:null,r=t?t.y:null;return B.isArray(t)?function(e,n){return t[n]}:function(e){return{x:null===n?e.x:n,y:null===r?e.y:r}}}};function hr(e,t,n){var r,o=e._model||{},a=o.fill;if(void 0===a&&(a=!!o.backgroundColor),!1===a||null===a)return!1;if(!0===a)return"origin";if(r=parseFloat(a,10),isFinite(r)&&Math.floor(r)===r)return"-"!==a[0]&&"+"!==a[0]||(r=t+r),!(r===t||r<0||r>=n)&&r;switch(a){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return a;default:return!1}}function pr(e){return(e.el._scale||{}).getPointPositionForValue?function(e){var t,n,r,o,a,i=e.el._scale,s=i.options,l=i.chart.data.labels.length,c=e.fill,u=[];if(!l)return null;for(t=s.ticks.reverse?i.max:i.min,n=s.ticks.reverse?i.min:i.max,r=i.getPointPositionForValue(0,t),o=0;o<l;++o)a="start"===c||"end"===c?i.getPointPositionForValue(o,"start"===c?t:n):i.getBasePosition(o),s.gridLines.circular&&(a.cx=r.x,a.cy=r.y,a.angle=i.getIndexAngle(o)-Math.PI/2),u.push(a);return u}(e):function(e){var t,n=e.el._model||{},r=e.el._scale||{},o=e.fill,a=null;if(isFinite(o))return null;if("start"===o?a=void 0===n.scaleBottom?r.bottom:n.scaleBottom:"end"===o?a=void 0===n.scaleTop?r.top:n.scaleTop:void 0!==n.scaleZero?a=n.scaleZero:r.getBasePixel&&(a=r.getBasePixel()),null!=a){if(void 0!==a.x&&void 0!==a.y)return a;if(B.isFinite(a))return{x:(t=r.isHorizontal())?a:null,y:t?null:a}}return null}(e)}function fr(e,t,n){var r,o=e[t].fill,a=[t];if(!n)return o;for(;!1!==o&&-1===a.indexOf(o);){if(!isFinite(o))return o;if(!(r=e[o]))return!1;if(r.visible)return o;a.push(o),o=r.fill}return!1}function mr(e){var t=e.fill,n="dataset";return!1===t?null:(isFinite(t)||(n="boundary"),dr[n](e))}function gr(e){return e&&!e.skip}function _r(e,t,n,r,o){var a,i,s,l;if(r&&o){for(e.moveTo(t[0].x,t[0].y),a=1;a<r;++a)B.canvas.lineTo(e,t[a-1],t[a]);if(void 0===n[0].angle)for(e.lineTo(n[o-1].x,n[o-1].y),a=o-1;a>0;--a)B.canvas.lineTo(e,n[a],n[a-1],!0);else for(i=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-i,2)+Math.pow(n[0].y-s,2)),a=o-1;a>0;--a)e.arc(i,s,l,n[a].angle,n[a-1].angle,!0)}}function vr(e,t,n,r,o,a){var i,s,l,c,u,d,h,p,f=t.length,m=r.spanGaps,g=[],_=[],v=0,b=0;for(e.beginPath(),i=0,s=f;i<s;++i)u=n(c=t[l=i%f]._view,l,r),d=gr(c),h=gr(u),a&&void 0===p&&d&&(s=f+(p=i+1)),d&&h?(v=g.push(c),b=_.push(u)):v&&b&&(m?(d&&g.push(c),h&&_.push(u)):(_r(e,g,_,v,b),v=b=0,g=[],_=[]));_r(e,g,_,v,b),e.closePath(),e.fillStyle=o,e.fill()}var br={id:"filler",afterDatasetsUpdate:function(e,t){var n,r,o,a,i=(e.data.datasets||[]).length,s=t.propagate,l=[];for(r=0;r<i;++r)a=null,(o=(n=e.getDatasetMeta(r)).dataset)&&o._model&&o instanceof ke.Line&&(a={visible:e.isDatasetVisible(r),fill:hr(o,r,i),chart:e,el:o}),n.$filler=a,l.push(a);for(r=0;r<i;++r)(a=l[r])&&(a.fill=fr(l,r,s),a.boundary=pr(a),a.mapper=mr(a))},beforeDatasetsDraw:function(e){var t,n,r,o,a,i,s,l=e._getSortedVisibleDatasetMetas(),c=e.ctx;for(n=l.length-1;n>=0;--n)(t=l[n].$filler)&&t.visible&&(o=(r=t.el)._view,a=r._children||[],i=t.mapper,s=o.backgroundColor||Y.global.defaultColor,i&&s&&a.length&&(B.canvas.clipArea(c,e.chartArea),vr(c,a,i,o,s,r._loop),B.canvas.unclipArea(c)))}},yr=B.rtl.getRtlAdapter,wr=B.noop,kr=B.valueOrDefault;function xr(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}Y._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var n=t.datasetIndex,r=this.chart,o=r.getDatasetMeta(n);o.hidden=null===o.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,n=e.options.legend||{},r=n.labels&&n.labels.usePointStyle;return e._getSortedDatasetMetas().map((function(n){var o=n.controller.getStyle(r?0:void 0);return{text:t[n.index].label,fillStyle:o.backgroundColor,hidden:!e.isDatasetVisible(n.index),lineCap:o.borderCapStyle,lineDash:o.borderDash,lineDashOffset:o.borderDashOffset,lineJoin:o.borderJoinStyle,lineWidth:o.borderWidth,strokeStyle:o.borderColor,pointStyle:o.pointStyle,rotation:o.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(e){var t,n,r,o=document.createElement("ul"),a=e.data.datasets;for(o.setAttribute("class",e.id+"-legend"),t=0,n=a.length;t<n;t++)(r=o.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[t].backgroundColor,a[t].label&&r.appendChild(document.createTextNode(a[t].label));return o.outerHTML}});var Mr=K.extend({initialize:function(e){B.extend(this,e),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:wr,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:wr,beforeSetDimensions:wr,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:wr,beforeBuildLabels:wr,buildLabels:function(){var e=this,t=e.options.labels||{},n=B.callback(t.generateLabels,[e.chart],e)||[];t.filter&&(n=n.filter((function(n){return t.filter(n,e.chart.data)}))),e.options.reverse&&n.reverse(),e.legendItems=n},afterBuildLabels:wr,beforeFit:wr,fit:function(){var e=this,t=e.options,n=t.labels,r=t.display,o=e.ctx,a=B.options._parseFont(n),i=a.size,s=e.legendHitBoxes=[],l=e.minSize,c=e.isHorizontal();if(c?(l.width=e.maxWidth,l.height=r?10:0):(l.width=r?10:0,l.height=e.maxHeight),r){if(o.font=a.string,c){var u=e.lineWidths=[0],d=0;o.textAlign="left",o.textBaseline="middle",B.each(e.legendItems,(function(e,t){var r=xr(n,i)+i/2+o.measureText(e.text).width;(0===t||u[u.length-1]+r+2*n.padding>l.width)&&(d+=i+n.padding,u[u.length-(t>0?0:1)]=0),s[t]={left:0,top:0,width:r,height:i},u[u.length-1]+=r+n.padding})),l.height+=d}else{var h=n.padding,p=e.columnWidths=[],f=e.columnHeights=[],m=n.padding,g=0,_=0;B.each(e.legendItems,(function(e,t){var r=xr(n,i)+i/2+o.measureText(e.text).width;t>0&&_+i+2*h>l.height&&(m+=g+n.padding,p.push(g),f.push(_),g=0,_=0),g=Math.max(g,r),_+=i+h,s[t]={left:0,top:0,width:r,height:i}})),m+=g,p.push(g),f.push(_),l.width+=m}e.width=l.width,e.height=l.height}else e.width=l.width=e.height=l.height=0},afterFit:wr,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,n=t.labels,r=Y.global,o=r.defaultColor,a=r.elements.line,i=e.height,s=e.columnHeights,l=e.width,c=e.lineWidths;if(t.display){var u,d=yr(t.rtl,e.left,e.minSize.width),h=e.ctx,p=kr(n.fontColor,r.defaultFontColor),f=B.options._parseFont(n),m=f.size;h.textAlign=d.textAlign("left"),h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=p,h.fillStyle=p,h.font=f.string;var g=xr(n,m),_=e.legendHitBoxes,v=function(e,r){switch(t.align){case"start":return n.padding;case"end":return e-r;default:return(e-r+n.padding)/2}},b=e.isHorizontal();u=b?{x:e.left+v(l,c[0]),y:e.top+n.padding,line:0}:{x:e.left+n.padding,y:e.top+v(i,s[0]),line:0},B.rtl.overrideTextDirection(e.ctx,t.textDirection);var y=m+n.padding;B.each(e.legendItems,(function(t,r){var p=h.measureText(t.text).width,f=g+m/2+p,w=u.x,k=u.y;d.setWidth(e.minSize.width),b?r>0&&w+f+n.padding>e.left+e.minSize.width&&(k=u.y+=y,u.line++,w=u.x=e.left+v(l,c[u.line])):r>0&&k+y>e.top+e.minSize.height&&(w=u.x=w+e.columnWidths[u.line]+n.padding,u.line++,k=u.y=e.top+v(i,s[u.line]));var x=d.x(w);!function(e,t,r){if(!(isNaN(g)||g<=0)){h.save();var i=kr(r.lineWidth,a.borderWidth);if(h.fillStyle=kr(r.fillStyle,o),h.lineCap=kr(r.lineCap,a.borderCapStyle),h.lineDashOffset=kr(r.lineDashOffset,a.borderDashOffset),h.lineJoin=kr(r.lineJoin,a.borderJoinStyle),h.lineWidth=i,h.strokeStyle=kr(r.strokeStyle,o),h.setLineDash&&h.setLineDash(kr(r.lineDash,a.borderDash)),n&&n.usePointStyle){var s=g*Math.SQRT2/2,l=d.xPlus(e,g/2),c=t+m/2;B.canvas.drawPoint(h,r.pointStyle,s,l,c,r.rotation)}else h.fillRect(d.leftForLtr(e,g),t,g,m),0!==i&&h.strokeRect(d.leftForLtr(e,g),t,g,m);h.restore()}}(x,k,t),_[r].left=d.leftForLtr(x,_[r].width),_[r].top=k,function(e,t,n,r){var o=m/2,a=d.xPlus(e,g+o),i=t+o;h.fillText(n.text,a,i),n.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(a,i),h.lineTo(d.xPlus(a,r),i),h.stroke())}(x,k,t,p),b?u.x+=f+n.padding:u.y+=y})),B.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var n,r,o,a=this;if(e>=a.left&&e<=a.right&&t>=a.top&&t<=a.bottom)for(o=a.legendHitBoxes,n=0;n<o.length;++n)if(e>=(r=o[n]).left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height)return a.legendItems[n];return null},handleEvent:function(e){var t,n=this,r=n.options,o="mouseup"===e.type?"click":e.type;if("mousemove"===o){if(!r.onHover&&!r.onLeave)return}else{if("click"!==o)return;if(!r.onClick)return}t=n._getLegendItemAt(e.x,e.y),"click"===o?t&&r.onClick&&r.onClick.call(n,e.native,t):(r.onLeave&&t!==n._hoveredItem&&(n._hoveredItem&&r.onLeave.call(n,e.native,n._hoveredItem),n._hoveredItem=t),r.onHover&&t&&r.onHover.call(n,e.native,t))}});function Er(e,t){var n=new Mr({ctx:e.ctx,options:t,chart:e});mt.configure(e,n,t),mt.addBox(e,n),e.legend=n}var Tr={id:"legend",_element:Mr,beforeInit:function(e){var t=e.options.legend;t&&Er(e,t)},beforeUpdate:function(e){var t=e.options.legend,n=e.legend;t?(B.mergeIf(t,Y.global.legend),n?(mt.configure(e,n,t),n.options=t):Er(e,t)):n&&(mt.removeBox(e,n),delete e.legend)},afterEvent:function(e,t){var n=e.legend;n&&n.handleEvent(t)}},Sr=B.noop;Y._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Dr=K.extend({initialize:function(e){B.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:Sr,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:Sr,beforeSetDimensions:Sr,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:Sr,beforeBuildLabels:Sr,buildLabels:Sr,afterBuildLabels:Sr,beforeFit:Sr,fit:function(){var e,t=this,n=t.options,r=t.minSize={},o=t.isHorizontal();n.display?(e=(B.isArray(n.text)?n.text.length:1)*B.options._parseFont(n).lineHeight+2*n.padding,t.width=r.width=o?t.maxWidth:e,t.height=r.height=o?e:t.maxHeight):t.width=r.width=t.height=r.height=0},afterFit:Sr,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,n=e.options;if(n.display){var r,o,a,i=B.options._parseFont(n),s=i.lineHeight,l=s/2+n.padding,c=0,u=e.top,d=e.left,h=e.bottom,p=e.right;t.fillStyle=B.valueOrDefault(n.fontColor,Y.global.defaultFontColor),t.font=i.string,e.isHorizontal()?(o=d+(p-d)/2,a=u+l,r=p-d):(o="left"===n.position?d+l:p-l,a=u+(h-u)/2,r=h-u,c=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(o,a),t.rotate(c),t.textAlign="center",t.textBaseline="middle";var f=n.text;if(B.isArray(f))for(var m=0,g=0;g<f.length;++g)t.fillText(f[g],0,m,r),m+=s;else t.fillText(f,0,0,r);t.restore()}}});function Lr(e,t){var n=new Dr({ctx:e.ctx,options:t,chart:e});mt.configure(e,n,t),mt.addBox(e,n),e.titleBlock=n}var Cr={},Pr=br,Or=Tr,Nr={id:"title",_element:Dr,beforeInit:function(e){var t=e.options.title;t&&Lr(e,t)},beforeUpdate:function(e){var t=e.options.title,n=e.titleBlock;t?(B.mergeIf(t,Y.global.title),n?(mt.configure(e,n,t),n.options=t):Lr(e,t)):n&&(mt.removeBox(e,n),delete e.titleBlock)}};for(var Ar in Cr.filler=Pr,Cr.legend=Or,Cr.title=Nr,Xt.helpers=B,function(){function e(e,t,n){var r;return"string"==typeof e?(r=parseInt(e,10),-1!==e.indexOf("%")&&(r=r/100*t.parentNode[n])):r=e,r}function t(e){return null!=e&&"none"!==e}function n(n,r,o){var a=document.defaultView,i=B._getParentNode(n),s=a.getComputedStyle(n)[r],l=a.getComputedStyle(i)[r],c=t(s),u=t(l),d=Number.POSITIVE_INFINITY;return c||u?Math.min(c?e(s,n,o):d,u?e(l,i,o):d):"none"}B.where=function(e,t){if(B.isArray(e)&&Array.prototype.filter)return e.filter(t);var n=[];return B.each(e,(function(e){t(e)&&n.push(e)})),n},B.findIndex=Array.prototype.findIndex?function(e,t,n){return e.findIndex(t,n)}:function(e,t,n){n=void 0===n?e:n;for(var r=0,o=e.length;r<o;++r)if(t.call(n,e[r],r,e))return r;return-1},B.findNextWhere=function(e,t,n){B.isNullOrUndef(n)&&(n=-1);for(var r=n+1;r<e.length;r++){var o=e[r];if(t(o))return o}},B.findPreviousWhere=function(e,t,n){B.isNullOrUndef(n)&&(n=e.length);for(var r=n-1;r>=0;r--){var o=e[r];if(t(o))return o}},B.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},B.almostEquals=function(e,t,n){return Math.abs(e-t)<n},B.almostWhole=function(e,t){var n=Math.round(e);return n-t<=e&&n+t>=e},B.max=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.max(e,t)}),Number.NEGATIVE_INFINITY)},B.min=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.min(e,t)}),Number.POSITIVE_INFINITY)},B.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0==(e=+e)||isNaN(e)?e:e>0?1:-1},B.toRadians=function(e){return e*(Math.PI/180)},B.toDegrees=function(e){return e*(180/Math.PI)},B._decimalPlaces=function(e){if(B.isFinite(e)){for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}},B.getAngleFromPoint=function(e,t){var n=t.x-e.x,r=t.y-e.y,o=Math.sqrt(n*n+r*r),a=Math.atan2(r,n);return a<-.5*Math.PI&&(a+=2*Math.PI),{angle:a,distance:o}},B.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},B.aliasPixel=function(e){return e%2==0?0:.5},B._alignPixel=function(e,t,n){var r=e.currentDevicePixelRatio,o=n/2;return Math.round((t-o)*r)/r+o},B.splineCurve=function(e,t,n,r){var o=e.skip?t:e,a=t,i=n.skip?t:n,s=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),l=Math.sqrt(Math.pow(i.x-a.x,2)+Math.pow(i.y-a.y,2)),c=s/(s+l),u=l/(s+l),d=r*(c=isNaN(c)?0:c),h=r*(u=isNaN(u)?0:u);return{previous:{x:a.x-d*(i.x-o.x),y:a.y-d*(i.y-o.y)},next:{x:a.x+h*(i.x-o.x),y:a.y+h*(i.y-o.y)}}},B.EPSILON=Number.EPSILON||1e-14,B.splineCurveMonotone=function(e){var t,n,r,o,a,i,s,l,c,u=(e||[]).map((function(e){return{model:e._model,deltaK:0,mK:0}})),d=u.length;for(t=0;t<d;++t)if(!(r=u[t]).model.skip){if(n=t>0?u[t-1]:null,(o=t<d-1?u[t+1]:null)&&!o.model.skip){var h=o.model.x-r.model.x;r.deltaK=0!==h?(o.model.y-r.model.y)/h:0}!n||n.model.skip?r.mK=r.deltaK:!o||o.model.skip?r.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(r.deltaK)?r.mK=0:r.mK=(n.deltaK+r.deltaK)/2}for(t=0;t<d-1;++t)r=u[t],o=u[t+1],r.model.skip||o.model.skip||(B.almostEquals(r.deltaK,0,this.EPSILON)?r.mK=o.mK=0:(a=r.mK/r.deltaK,i=o.mK/r.deltaK,(l=Math.pow(a,2)+Math.pow(i,2))<=9||(s=3/Math.sqrt(l),r.mK=a*s*r.deltaK,o.mK=i*s*r.deltaK)));for(t=0;t<d;++t)(r=u[t]).model.skip||(n=t>0?u[t-1]:null,o=t<d-1?u[t+1]:null,n&&!n.model.skip&&(c=(r.model.x-n.model.x)/3,r.model.controlPointPreviousX=r.model.x-c,r.model.controlPointPreviousY=r.model.y-c*r.mK),o&&!o.model.skip&&(c=(o.model.x-r.model.x)/3,r.model.controlPointNextX=r.model.x+c,r.model.controlPointNextY=r.model.y+c*r.mK))},B.nextItem=function(e,t,n){return n?t>=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},B.previousItem=function(e,t,n){return n?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},B.niceNum=function(e,t){var n=Math.floor(B.log10(e)),r=e/Math.pow(10,n);return(t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,n)},B.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},B.getRelativePosition=function(e,t){var n,r,o=e.originalEvent||e,a=e.target||e.srcElement,i=a.getBoundingClientRect(),s=o.touches;s&&s.length>0?(n=s[0].clientX,r=s[0].clientY):(n=o.clientX,r=o.clientY);var l=parseFloat(B.getStyle(a,"padding-left")),c=parseFloat(B.getStyle(a,"padding-top")),u=parseFloat(B.getStyle(a,"padding-right")),d=parseFloat(B.getStyle(a,"padding-bottom")),h=i.right-i.left-l-u,p=i.bottom-i.top-c-d;return{x:n=Math.round((n-i.left-l)/h*a.width/t.currentDevicePixelRatio),y:r=Math.round((r-i.top-c)/p*a.height/t.currentDevicePixelRatio)}},B.getConstraintWidth=function(e){return n(e,"max-width","clientWidth")},B.getConstraintHeight=function(e){return n(e,"max-height","clientHeight")},B._calculatePadding=function(e,t,n){return(t=B.getStyle(e,t)).indexOf("%")>-1?n*parseInt(t,10)/100:parseInt(t,10)},B._getParentNode=function(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},B.getMaximumWidth=function(e){var t=B._getParentNode(e);if(!t)return e.clientWidth;var n=t.clientWidth,r=n-B._calculatePadding(t,"padding-left",n)-B._calculatePadding(t,"padding-right",n),o=B.getConstraintWidth(e);return isNaN(o)?r:Math.min(r,o)},B.getMaximumHeight=function(e){var t=B._getParentNode(e);if(!t)return e.clientHeight;var n=t.clientHeight,r=n-B._calculatePadding(t,"padding-top",n)-B._calculatePadding(t,"padding-bottom",n),o=B.getConstraintHeight(e);return isNaN(o)?r:Math.min(r,o)},B.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},B.retinaScale=function(e,t){var n=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var r=e.canvas,o=e.height,a=e.width;r.height=o*n,r.width=a*n,e.ctx.scale(n,n),r.style.height||r.style.width||(r.style.height=o+"px",r.style.width=a+"px")}},B.fontString=function(e,t,n){return t+" "+e+"px "+n},B.longestText=function(e,t,n,r){var o=(r=r||{}).data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(o=r.data={},a=r.garbageCollect=[],r.font=t),e.font=t;var i,s,l,c,u,d=0,h=n.length;for(i=0;i<h;i++)if(null!=(c=n[i])&&!0!==B.isArray(c))d=B.measureText(e,o,a,d,c);else if(B.isArray(c))for(s=0,l=c.length;s<l;s++)null==(u=c[s])||B.isArray(u)||(d=B.measureText(e,o,a,d,u));var p=a.length/2;if(p>n.length){for(i=0;i<p;i++)delete o[a[i]];a.splice(0,p)}return d},B.measureText=function(e,t,n,r,o){var a=t[o];return a||(a=t[o]=e.measureText(o).width,n.push(o)),a>r&&(r=a),r},B.numberOfLabelLines=function(e){var t=1;return B.each(e,(function(e){B.isArray(e)&&e.length>t&&(t=e.length)})),t},B.color=w?function(e){return e instanceof CanvasGradient&&(e=Y.global.defaultColor),w(e)}:function(e){return console.error("Color.js not found!"),e},B.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:B.color(e).saturate(.5).darken(.1).rgbString()}}(),Xt._adapters=en,Xt.Animation=X,Xt.animationService=$,Xt.controllers=$e,Xt.DatasetController=re,Xt.defaults=Y,Xt.Element=K,Xt.elements=ke,Xt.Interaction=at,Xt.layouts=mt,Xt.platform=Lt,Xt.plugins=Ct,Xt.Scale=gn,Xt.scaleService=Pt,Xt.Ticks=tn,Xt.Tooltip=Bt,Xt.helpers.each(cr,(function(e,t){Xt.scaleService.registerScaleType(t,e,e._defaults)})),Cr)Cr.hasOwnProperty(Ar)&&Xt.plugins.register(Cr[Ar]);Xt.platform.initialize();var Ir=Xt;return"undefined"!=typeof window&&(window.Chart=Xt),Xt.Chart=Xt,Xt.Legend=Cr.legend._element,Xt.Title=Cr.title._element,Xt.pluginService=Xt.plugins,Xt.PluginBase=Xt.Element.extend({}),Xt.canvasHelpers=Xt.helpers.canvas,Xt.layoutService=Xt.layouts,Xt.LinearScaleBase=kn,Xt.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(e){Xt[e]=function(t,n){return new Xt(t,Xt.helpers.merge(n||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}})),Ir}(function(){try{return n(3)}catch(e){}}())},function(e,t,n){var r=n(66);e.exports=function(e,t){return r(e,t)}},function(e,t,n){var r=n(238),o=n(243),a=n(389),i=n(393),s=n(411),l=n(25),c=n(245),u=n(247),d="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,p,f,m){var g=l(e),_=l(t),v=g?"[object Array]":s(e),b=_?"[object Array]":s(t),y=(v="[object Arguments]"==v?d:v)==d,w=(b="[object Arguments]"==b?d:b)==d,k=v==b;if(k&&c(e)){if(!c(t))return!1;g=!0,y=!1}if(k&&!y)return m||(m=new r),g||u(e)?o(e,t,n,p,f,m):a(e,t,v,n,p,f,m);if(!(1&n)){var x=y&&h.call(e,"__wrapped__"),M=w&&h.call(t,"__wrapped__");if(x||M){var E=x?e.value():e,T=M?t.value():t;return m||(m=new r),f(E,T,n,p,m)}}return!!k&&(m||(m=new r),i(e,t,n,p,f,m))}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(46),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(46);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(46);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(46);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(45);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(45),o=n(67),a=n(69);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(240),o=n(369),a=n(68),i=n(242),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?h:s).test(i(e))}},function(e,t,n){var r=n(47),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[s]=n:delete e[s]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(370),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(373),o=n(45),a=n(67);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(374),o=n(375),a=n(376),i=n(377),s=n(378);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},function(e,t,n){var r=n(48);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(48),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(48),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(48);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(49);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(49);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(49);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(49);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(69),o=n(385),a=n(386);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=o,i.prototype.has=a,e.exports=i},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(47),o=n(390),a=n(239),i=n(243),s=n(391),l=n(392),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var f=1&r;if(p||(p=l),e.size!=t.size&&!f)return!1;var m=h.get(e);if(m)return m==t;r|=2,h.set(e,t);var g=i(p(e),p(t),r,c,d,h);return h.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},function(e,t,n){var r=n(24).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(394),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,i,s){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var d=u;d--;){var h=c[d];if(!(l?h in t:o.call(t,h)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var m=!0;s.set(e,t),s.set(t,e);for(var g=l;++d<u;){var _=e[h=c[d]],v=t[h];if(a)var b=l?a(v,_,h,t,e,s):a(_,v,h,e,t,s);if(!(void 0===b?_===v||i(_,v,n,a,s):b)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var y=e.constructor,w=t.constructor;y==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof w&&w instanceof w||(m=!1)}return s.delete(e),s.delete(t),m}},function(e,t,n){var r=n(395),o=n(397),a=n(70);e.exports=function(e){return r(e,a,o)}},function(e,t,n){var r=n(396),o=n(25);e.exports=function(e,t,n){var a=t(e);return o(e)?a:r(a,n(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t,n){var r=n(398),o=n(399),a=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(e){return null==e?[]:(e=Object(e),r(i(e),(function(t){return a.call(e,t)})))}:o;e.exports=s},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(401),o=n(244),a=n(25),i=n(245),s=n(246),l=n(247),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),u=!n&&o(e),d=!n&&!u&&i(e),h=!n&&!u&&!d&&l(e),p=n||u||d||h,f=p?r(e.length,String):[],m=f.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||f.push(g);return f}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(38),o=n(39);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(38),o=n(71),a=n(39),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&o(e.length)&&!!i[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(241),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=s}).call(this,n(64)(e))},function(e,t,n){var r=n(408),o=n(409),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(410)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(412),o=n(67),a=n(413),i=n(414),s=n(415),l=n(38),c=n(242),u=c(r),d=c(o),h=c(a),p=c(i),f=c(s),m=l;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=m(new o)||a&&"[object Promise]"!=m(a.resolve())||i&&"[object Set]"!=m(new i)||s&&"[object WeakMap]"!=m(new s))&&(m=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case u:return"[object DataView]";case d:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case f:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){var r=n(27)(n(24),"DataView");e.exports=r},function(e,t,n){var r=n(27)(n(24),"Promise");e.exports=r},function(e,t,n){var r=n(27)(n(24),"Set");e.exports=r},function(e,t,n){var r=n(27)(n(24),"WeakMap");e.exports=r},function(e,t,n){var r=n(417),o=n(419)((function(e,t,n){r(e,n,t)}));e.exports=o},function(e,t,n){var r=n(418);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(27),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(420),o=n(421),a=n(427),i=n(25);e.exports=function(e,t){return function(n,s){var l=i(n)?r:o,c=t?t():{};return l(n,e,a(s,2),c)}}},function(e,t){e.exports=function(e,t,n,r){for(var o=-1,a=null==e?0:e.length;++o<a;){var i=e[o];t(r,i,n(i),e)}return r}},function(e,t,n){var r=n(422);e.exports=function(e,t,n,o){return r(e,(function(e,r,a){t(o,e,n(e),a)})),o}},function(e,t,n){var r=n(423),o=n(426)(r);e.exports=o},function(e,t,n){var r=n(424),o=n(70);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(425)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(!1===n(a[l],l,a))break}return t}}},function(e,t,n){var r=n(248);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var a=n.length,i=t?a:-1,s=Object(n);(t?i--:++i<a)&&!1!==o(s[i],i,s););return n}}},function(e,t,n){var r=n(428),o=n(431),a=n(442),i=n(25),s=n(443);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?i(e)?o(e[0],e[1]):r(e):s(e)}},function(e,t,n){var r=n(429),o=n(430),a=n(250);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(238),o=n(66);e.exports=function(e,t,n,a){var i=n.length,s=i,l=!a;if(null==e)return!s;for(e=Object(e);i--;){var c=n[i];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<s;){var u=(c=n[i])[0],d=e[u],h=c[1];if(l&&c[2]){if(void 0===d&&!(u in e))return!1}else{var p=new r;if(a)var f=a(d,h,u,e,t,p);if(!(void 0===f?o(h,d,3,a,p):f))return!1}}return!0}},function(e,t,n){var r=n(249),o=n(70);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var a=t[n],i=e[a];t[n]=[a,i,r(i)]}return t}},function(e,t,n){var r=n(66),o=n(432),a=n(439),i=n(72),s=n(249),l=n(250),c=n(50);e.exports=function(e,t){return i(e)&&s(t)?l(c(e),t):function(n){var i=o(n,e);return void 0===i&&i===t?a(n,e):r(t,i,3)}}},function(e,t,n){var r=n(251);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=n(434),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,i=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(a,"$1"):n||e)})),t}));e.exports=i},function(e,t,n){var r=n(435);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(69);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},function(e,t,n){var r=n(437);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(47),o=n(438),a=n(25),i=n(73),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return o(t,e)+"";if(i(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t,n){var r=n(440),o=n(441);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(252),o=n(244),a=n(25),i=n(246),s=n(71),l=n(50);e.exports=function(e,t,n){for(var c=-1,u=(t=r(t,e)).length,d=!1;++c<u;){var h=l(t[c]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++c!=u?d:!!(u=null==e?0:e.length)&&s(u)&&i(h,u)&&(a(e)||o(e))}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(444),o=n(445),a=n(72),i=n(50);e.exports=function(e){return a(e)?r(i(e)):o(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(251);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){!function(e){"use strict";var t,n,r=function(e){return e instanceof HTMLElement},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Object.assign({},e),o=[],a=[],i=function(){return Object.assign({},r)},s=function(){var e=[].concat(o);return o.length=0,e},l=function(){var e=[].concat(a);a.length=0,e.forEach((function(e){var t=e.type,n=e.data;c(t,n)}))},c=function(e,t,n){n?a.push({type:e,data:t}):(p[e]&&p[e](t),o.push({type:e,data:t}))},u=function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return h[e]?(t=h)[e].apply(t,r):null},d={getState:i,processActionQueue:s,processDispatchQueue:l,dispatch:c,query:u},h={};t.forEach((function(e){h=Object.assign({},e(r),h)}));var p={};return n.forEach((function(e){p=Object.assign({},e(c,u,r),p)})),d},a=function(e,t){for(var n in e)e.hasOwnProperty(n)&&t(n,e[n])},i=function(e){var t={};return a(e,(function(n){!function(e,t,n){"function"!=typeof n?Object.defineProperty(e,t,Object.assign({},n)):e[t]=n}(t,n,e[n])})),t},s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null===n)return e.getAttribute(t)||e.hasAttribute(t);e.setAttribute(t,n)},l="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},c=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},d="http://www.w3.org/2000/svg",h=["svg","path"],p=function(e){return h.includes(e)},f=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"===(void 0===t?"undefined":l(t))&&(n=t,t=null);var r=p(e)?document.createElementNS(d,e):document.createElement(e);return t&&(p(e)?s(r,"class",t):r.className=t),a(n,(function(e,t){s(r,e,t)})),r},m=function(e){return function(t,n){void 0!==n&&e.children[n]?e.insertBefore(t,e.children[n]):e.appendChild(t)}},g=function(e,t){return function(e,n){return void 0!==n?t.splice(n,0,e):t.push(e),e}},_=function(e,t){return function(n){return t.splice(t.indexOf(n),1),n.element.parentNode&&e.removeChild(n.element),n}},v=function(e,t,n,r){var o=n[0]||e.left,a=n[1]||e.top,i=o+e.width,s=a+e.height*(r[1]||1),l={element:Object.assign({},e),inner:{left:e.left,top:e.top,right:e.right,bottom:e.bottom},outer:{left:o,top:a,right:i,bottom:s}};return t.filter((function(e){return!e.isRectIgnored()})).map((function(e){return e.rect})).forEach((function(e){b(l.inner,Object.assign({},e.inner)),b(l.outer,Object.assign({},e.outer))})),y(l.inner),l.outer.bottom+=l.element.marginBottom,l.outer.right+=l.element.marginRight,y(l.outer),l},b=function(e,t){t.top+=e.top,t.right+=e.left,t.bottom+=e.top,t.left+=e.left,t.bottom>e.bottom&&(e.bottom=t.bottom),t.right>e.right&&(e.right=t.right)},y=function(e){e.width=e.right-e.left,e.height=e.bottom-e.top},w=function(e){return"number"==typeof e},k=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.001;return Math.abs(e-t)<r&&Math.abs(n)<r},x=function(e){return e<.5?2*e*e:(4-2*e)*e-1},M={spring:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiffness,n=void 0===t?.5:t,r=e.damping,o=void 0===r?.75:r,a=e.mass,s=void 0===a?10:a,l=null,c=null,u=0,d=!1,h=function(){if(!d){if(!w(l)||!w(c))return d=!0,void(u=0);k(c+=u+=-(c-l)*n/s,l,u*=o)?(c=l,u=0,d=!0,f.onupdate(c),f.oncomplete(c)):f.onupdate(c)}},p=function(e){if(w(e)&&!w(c)&&(c=e),null===l&&(l=e,c=e),c===(l=e)||void 0===l)return d=!0,u=0,f.onupdate(c),void f.oncomplete(c);d=!1},f=i({interpolate:h,target:{set:p,get:function(){return l}},resting:{get:function(){return d}},onupdate:function(e){},oncomplete:function(e){}});return f},tween:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.duration,n=void 0===t?500:t,r=e.easing,o=void 0===r?x:r,a=e.delay,s=void 0===a?0:a,l=null,c=void 0,u=void 0,d=!0,h=!1,p=null,f=function(e){d||null===p||(null===l&&(l=e),e-l<s||((c=e-l-s)<n?(u=c/n,m.onupdate((c>=0?o(h?1-u:u):0)*p)):(c=1,u=h?0:1,m.onupdate(u*p),m.oncomplete(u*p),d=!0)))},m=i({interpolate:f,target:{get:function(){return h?0:p},set:function(e){if(null===p)return p=e,m.onupdate(e),void m.oncomplete(e);e<p?(p=1,h=!0):(h=!1,p=e),d=!1,l=null}},resting:{get:function(){return d}},onupdate:function(e){},oncomplete:function(e){}});return m}},E=function(e,t,n){var r=e[t]&&"object"===l(e[t][n])?e[t][n]:e[t]||e,o="string"==typeof r?r:r.type,a="object"===(void 0===r?"undefined":l(r))?Object.assign({},r):{};return M[o]?M[o](a):null},T=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];(t=Array.isArray(t)?t:[t]).forEach((function(t){e.forEach((function(e){var o=e,a=function(){return n[e]},i=function(t){return n[e]=t};"object"===(void 0===e?"undefined":l(e))&&(o=e.key,a=e.getter||a,i=e.setter||i),t[o]&&!r||(t[o]={get:a,set:i})}))}))},S=function(e){return null!=e},D={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},L=function(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!0;for(var n in t)if(t[n]!==e[n])return!0;return!1},C=function(e,t){var n=t.opacity,r=t.perspective,o=t.translateX,a=t.translateY,i=t.scaleX,s=t.scaleY,l=t.rotateX,c=t.rotateY,u=t.rotateZ,d=t.originX,h=t.originY,p=t.width,f=t.height,m="",g="";(S(d)||S(h))&&(g+="transform-origin: "+(d||0)+"px "+(h||0)+"px;"),S(r)&&(m+="perspective("+r+"px) "),(S(o)||S(a))&&(m+="translate3d("+(o||0)+"px, "+(a||0)+"px, 0) "),(S(i)||S(s))&&(m+="scale3d("+(S(i)?i:1)+", "+(S(s)?s:1)+", 1) "),S(u)&&(m+="rotateZ("+u+"rad) "),S(l)&&(m+="rotateX("+l+"rad) "),S(c)&&(m+="rotateY("+c+"rad) "),m.length&&(g+="transform:"+m+";"),S(n)&&(g+="opacity:"+n+";",0===n&&(g+="visibility:hidden;"),n<1&&(g+="pointer-events:none;")),S(f)&&(g+="height:"+f+"px;"),S(p)&&(g+="width:"+p+"px;");var _=e.elementCurrentStyle||"";g.length===_.length&&g===_||(e.setAttribute("style",g),e.elementCurrentStyle=g)},P={styles:function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewInternalAPI,o=e.viewExternalAPI,a=e.view,i=Object.assign({},n),s={};T(t,[r,o],n);var l=function(){return a.rect?v(a.rect,a.childViews,[n.translateX||0,n.translateY||0],[n.scaleX||0,n.scaleY||0]):null};return r.rect={get:l},o.rect={get:l},t.forEach((function(e){n[e]=void 0===i[e]?D[e]:i[e]})),{write:function(){if(L(s,n))return C(a.element,n),Object.assign(s,Object.assign({},n)),!0},destroy:function(){}}},listeners:function(e){e.mixinConfig,e.viewProps,e.viewInternalAPI;var t,n=e.viewExternalAPI,r=(e.viewState,e.view),o=[],a=(t=r.element,function(e,n){t.addEventListener(e,n)}),i=function(e){return function(t,n){e.removeEventListener(t,n)}}(r.element);return n.on=function(e,t){o.push({type:e,fn:t}),a(e,t)},n.off=function(e,t){o.splice(o.findIndex((function(n){return n.type===e&&n.fn===t})),1),i(e,t)},{write:function(){return!0},destroy:function(){o.forEach((function(e){i(e.type,e.fn)}))}}},animations:function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewInternalAPI,o=e.viewExternalAPI,i=Object.assign({},n),s=[];return a(t,(function(e,t){var a=E(t);a&&(a.onupdate=function(t){n[e]=t},a.target=i[e],T([{key:e,setter:function(e){a.target!==e&&(a.target=e)},getter:function(){return n[e]}}],[r,o],n,!0),s.push(a))})),{write:function(e){var t=!0;return s.forEach((function(n){n.resting||(t=!1),n.interpolate(e)})),t},destroy:function(){}}},apis:function(e){var t=e.mixinConfig,n=e.viewProps,r=e.viewExternalAPI;T(t,r,n)}},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.layoutCalculated||(e.paddingTop=parseInt(n.paddingTop,10)||0,e.marginTop=parseInt(n.marginTop,10)||0,e.marginRight=parseInt(n.marginRight,10)||0,e.marginBottom=parseInt(n.marginBottom,10)||0,e.marginLeft=parseInt(n.marginLeft,10)||0,t.layoutCalculated=!0),e.left=t.offsetLeft||0,e.top=t.offsetTop||0,e.width=t.offsetWidth||0,e.height=t.offsetHeight||0,e.right=e.left+e.width,e.bottom=e.top+e.height,e.scrollTop=t.scrollTop,e.hidden=null===t.offsetParent,e},N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tag,n=void 0===t?"div":t,r=e.name,o=void 0===r?null:r,a=e.attributes,s=void 0===a?{}:a,l=e.read,c=void 0===l?function(){}:l,u=e.write,d=void 0===u?function(){}:u,h=e.create,p=void 0===h?function(){}:h,b=e.destroy,y=void 0===b?function(){}:b,w=e.filterFrameActionsForChild,k=void 0===w?function(e,t){return t}:w,x=e.didCreateView,M=void 0===x?function(){}:x,E=e.didWriteView,T=void 0===E?function(){}:E,S=e.ignoreRect,D=void 0!==S&&S,L=e.ignoreRectUpdate,C=void 0!==L&&L,N=e.mixins,A=void 0===N?[]:N;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=f(n,"filepond--"+o,s),a=window.getComputedStyle(r,null),l=O(),u=null,h=!1,b=[],w=[],x={},E={},S=[d],L=[c],N=[y],I=function(){return r},R=function(){return[].concat(b)},Y=function(){return x},j=function(e){return function(t,n){return t(e,n)}},F=function(){return u||(u=v(l,b,[0,0],[1,1]))},H=function(){return a},z=function(){u=null,b.forEach((function(e){return e._read()})),!(C&&l.width&&l.height)&&O(l,r,a);var e={root:J,props:t,rect:l};L.forEach((function(t){return t(e)}))},B=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=0===n.length;return S.forEach((function(o){!1===o({props:t,root:J,actions:n,timestamp:e})&&(r=!1)})),w.forEach((function(t){!1===t.write(e)&&(r=!1)})),b.filter((function(e){return!!e.element.parentNode})).forEach((function(t){t._write(e,k(t,n))||(r=!1)})),b.forEach((function(t,o){t.element.parentNode||(J.appendChild(t.element,o),t._read(),t._write(e,k(t,n)),r=!1)})),h=r,T({props:t,root:J,actions:n,timestamp:e}),r},U=function(){w.forEach((function(e){return e.destroy()})),N.forEach((function(e){e({root:J,props:t})})),b.forEach((function(e){return e._destroy()}))},V={element:{get:I},style:{get:H},childViews:{get:R}},W=Object.assign({},V,{rect:{get:F},ref:{get:Y},is:function(e){return o===e},appendChild:m(r),createChildView:j(e),linkView:function(e){return b.push(e),e},unlinkView:function(e){b.splice(b.indexOf(e),1)},appendChildView:g(0,b),removeChildView:_(r,b),registerWriter:function(e){return S.push(e)},registerReader:function(e){return L.push(e)},registerDestroyer:function(e){return N.push(e)},invalidateLayout:function(){return r.layoutCalculated=!1},dispatch:e.dispatch,query:e.query}),q={element:{get:I},childViews:{get:R},rect:{get:F},resting:{get:function(){return h}},isRectIgnored:function(){return D},_read:z,_write:B,_destroy:U},G=Object.assign({},V,{rect:{get:function(){return l}}});Object.keys(A).sort((function(e,t){return"styles"===e?1:"styles"===t?-1:0})).forEach((function(e){var n=P[e]({mixinConfig:A[e],viewProps:t,viewState:E,viewInternalAPI:W,viewExternalAPI:q,view:i(G)});n&&w.push(n)}));var J=i(W);p({root:J,props:t});var K=r.children.length;return b.forEach((function(e,t){J.appendChild(e.element,K+t)})),M(J),i(q)}},A=function(e,t){return function(n){var r=n.root,o=n.props,a=n.actions,i=void 0===a?[]:a,s=n.timestamp;i.filter((function(t){return e[t.type]})).forEach((function(t){return e[t.type]({root:r,props:o,action:t.data,timestamp:s})})),t&&t({root:r,props:o,actions:i,timestamp:s})}},I=function(e,t){return t.parentNode.insertBefore(e,t)},R=function(e,t){return t.parentNode.insertBefore(e,t.nextSibling)},Y=function(e){return Array.isArray(e)},j=function(e){return null==e},F=function(e){return e.trim()},H=function(e){return""+e},z=function(e){return"boolean"==typeof e},B=function(e){return z(e)?e:"true"===e},U=function(e){return"string"==typeof e},V=function(e){return w(e)?e:U(e)?H(e).replace(/[a-z]+/gi,""):0},W=function(e){return parseInt(V(e),10)},q=function(e){return w(e)&&isFinite(e)&&Math.floor(e)===e},G=function(e){if(q(e))return e;var t=H(e).trim();return/MB$/i.test(t)?(t=t.replace(/MB$i/,"").trim(),1e3*W(t)*1e3):/KB/i.test(t)?(t=t.replace(/KB$i/,"").trim(),1e3*W(t)):W(t)},J=function(e){return"function"==typeof e},K={process:"POST",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},Q=function(e,t,n,r){if(null===t)return null;if("function"==typeof t)return t;var o={url:"GET"===n?"?"+e+"=":"",method:n,headers:{},withCredentials:!1,timeout:r,onload:null,ondata:null,onerror:null};if(U(t))return o.url=t,o;if(Object.assign(o,t),U(o.headers)){var a=o.headers.split(/:(.+)/);o.headers={header:a[0],value:a[1]}}return o.withCredentials=B(o.withCredentials),o},X=function(e){return"object"===(void 0===e?"undefined":l(e))&&null!==e},$=function(e){return Y(e)?"array":function(e){return null===e}(e)?"null":q(e)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(e)?"bytes":function(e){return X(e)&&U(e.url)&&X(e.process)&&X(e.revert)&&X(e.restore)&&X(e.fetch)}(e)?"api":void 0===e?"undefined":l(e)},Z={array:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return j(e)?[]:Y(e)?e:H(e).split(t).map(F).filter((function(e){return e.length}))},boolean:B,int:function(e){return"bytes"===$(e)?G(e):W(e)},float:function(e){return parseFloat(V(e))},bytes:G,string:function(e){return J(e)?e:H(e)},serverapi:function(e){return(n={}).url=U(t=e)?t:t.url||"",n.timeout=t.timeout?parseInt(t.timeout,10):0,a(K,(function(e){n[e]=Q(e,t[e],K[e],n.timeout)})),n.remove=t.remove||null,n;var t,n},object:function(e){try{return JSON.parse(e.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",'))}catch(e){return null}},function:function(e){return function(e){for(var t=self,n=e.split("."),r=null;r=n.shift();)if(!(t=t[r]))return null;return t}(e)}},ee=function(e,t,n){if(e===t)return e;var r,o=$(e);if(o!==n){var a=(r=e,Z[n](r));if(o=$(a),null===a)throw'Trying to assign value with incorrect type to "'+option+'", allowed type: "'+n+'"';e=a}return e},te=function(e){var t={};return a(e,(function(n){var r,o,a,i=e[n];t[n]=(r=i[0],o=i[1],a=r,{enumerable:!0,get:function(){return a},set:function(e){a=ee(e,r,o)}})})),i(t)},ne=function(e){return{items:[],listUpdateTimeout:null,processingQueue:[],options:te(e)}},re=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.split(/(?=[A-Z])/).map((function(e){return e.toLowerCase()})).join(t)},oe=function(e,t){var n={};return a(t,(function(t){n[t]={get:function(){return e.getState().options[t]},set:function(n){e.dispatch("SET_"+re(t,"_").toUpperCase(),{value:n})}}})),n},ae=function(e){return function(t,n,r){var o={};return a(e,(function(e){var n=re(e,"_").toUpperCase();o["SET_"+n]=function(o){try{r.options[e]=o.value}catch(e){}t("DID_SET_"+n,{value:r.options[e]})}})),o}},ie=function(e){return function(t){var n={};return a(e,(function(e){n["GET_"+re(e,"_").toUpperCase()]=function(n){return t.options[e]}})),n}},se=1,le=2,ce=3,ue=4,de=5,he=function(){return Math.random().toString(36).substr(2,9)},pe=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:75;return e.map((function(e,r){return new Promise((function(o,a){setTimeout((function(){t(e),o()}),n*r)}))}))},fe=function(e,t){return e.splice(t,1)},me=function(){var e=[],t=function(t,n){fe(e,e.findIndex((function(e){return e.event===t&&(e.cb===n||!n)})))};return{fire:function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.filter((function(e){return e.event===t})).map((function(e){return e.cb})).forEach((function(e){setTimeout((function(){e.apply(void 0,r)}),0)}))},on:function(t,n){e.push({event:t,cb:n})},onOnce:function(n,r){e.push({event:n,cb:function(){t(n,r),r.apply(void 0,arguments)}})},off:t}},ge=function(e,t,n){Object.getOwnPropertyNames(e).filter((function(e){return!n.includes(e)})).forEach((function(n){return Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))},_e=["fire","process","revert","load","on","off","onOnce","retryLoad","extend","archive","archived","release","released","requestProcessing"],ve=function(e){var t={};return ge(e,t,_e),t},be=function(e){e.forEach((function(t,n){t.released&&fe(e,n)}))},ye=function(e){return/[^0-9]+/.exec(e)},we=function(){return ye(1.1.toLocaleString())[0]},ke={BOOLEAN:"boolean",INT:"int",STRING:"string",ARRAY:"array",OBJECT:"object",FUNCTION:"function",ACTION:"action",SERVER_API:"serverapi",REGEX:"regex"},xe=[],Me=function(e,t,n){return new Promise((function(r,o){var a=xe.filter((function(t){return t.key===e})).map((function(e){return e.cb}));if(0!==a.length){var i=a.shift();a.reduce((function(e,t){return e.then((function(e){return t(e,n)}))}),i(t,n)).then((function(e){return r(e)})).catch((function(e){return o(e)}))}else r(t)}))},Ee=function(e,t,n){return xe.filter((function(t){return t.key===e})).map((function(e){return e.cb(t,n)}))},Te=function(e,t){return xe.push({key:e,cb:t})},Se=function(){return Object.assign({},De)},De={id:[null,ke.STRING],name:["filepond",ke.STRING],className:[null,ke.STRING],required:[!1,ke.BOOLEAN],captureMethod:[null,ke.STRING],allowDrop:[!0,ke.BOOLEAN],allowBrowse:[!0,ke.BOOLEAN],allowPaste:[!0,ke.BOOLEAN],allowMultiple:[!1,ke.BOOLEAN],allowReplace:[!0,ke.BOOLEAN],allowRevert:[!0,ke.BOOLEAN],forceRevert:[!1,ke.BOOLEAN],maxFiles:[null,ke.INT],checkValidity:[!1,ke.BOOLEAN],dropOnPage:[!1,ke.BOOLEAN],dropOnElement:[!0,ke.BOOLEAN],dropValidation:[!1,ke.BOOLEAN],ignoredFiles:[[".ds_store","thumbs.db","desktop.ini"],ke.ARRAY],instantUpload:[!0,ke.BOOLEAN],maxParallelUploads:[2,ke.INT],server:[null,ke.SERVER_API],labelDecimalSeparator:[we(),ke.STRING],labelThousandsSeparator:[(t=we(),n=1e3.toLocaleString(),n!==1e3.toString()?ye(n)[0]:"."===t?",":"."),ke.STRING],labelIdle:['Drag & Drop your files or <span class="filepond--label-action">Browse</span>',ke.STRING],labelInvalidField:["Field contains invalid files",ke.STRING],labelFileWaitingForSize:["Waiting for size",ke.STRING],labelFileSizeNotAvailable:["Size not available",ke.STRING],labelFileCountSingular:["file in list",ke.STRING],labelFileCountPlural:["files in list",ke.STRING],labelFileLoading:["Loading",ke.STRING],labelFileAdded:["Added",ke.STRING],labelFileLoadError:["Error during load",ke.STRING],labelFileRemoved:["Removed",ke.STRING],labelFileRemoveError:["Error during remove",ke.STRING],labelFileProcessing:["Uploading",ke.STRING],labelFileProcessingComplete:["Upload complete",ke.STRING],labelFileProcessingAborted:["Upload cancelled",ke.STRING],labelFileProcessingError:["Error during upload",ke.STRING],labelFileProcessingRevertError:["Error during revert",ke.STRING],labelTapToCancel:["tap to cancel",ke.STRING],labelTapToRetry:["tap to retry",ke.STRING],labelTapToUndo:["tap to undo",ke.STRING],labelButtonRemoveItem:["Remove",ke.STRING],labelButtonAbortItemLoad:["Abort",ke.STRING],labelButtonRetryItemLoad:["Retry",ke.STRING],labelButtonAbortItemProcessing:["Cancel",ke.STRING],labelButtonUndoItemProcessing:["Undo",ke.STRING],labelButtonRetryItemProcessing:["Retry",ke.STRING],labelButtonProcessItem:["Upload",ke.STRING],iconRemove:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M11.586 13l-2.293 2.293a1 1 0 0 0 1.414 1.414L13 14.414l2.293 2.293a1 1 0 0 0 1.414-1.414L14.414 13l2.293-2.293a1 1 0 0 0-1.414-1.414L13 11.586l-2.293-2.293a1 1 0 0 0-1.414 1.414L11.586 13z" fill="currentColor" fill-rule="nonzero"/></svg>',ke.STRING],iconProcess:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M14 10.414v3.585a1 1 0 0 1-2 0v-3.585l-1.293 1.293a1 1 0 0 1-1.414-1.415l3-3a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1-1.414 1.415L14 10.414zM9 18a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2H9z" fill="currentColor" fill-rule="evenodd"/></svg>',ke.STRING],iconRetry:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M10.81 9.185l-.038.02A4.997 4.997 0 0 0 8 13.683a5 5 0 0 0 5 5 5 5 0 0 0 5-5 1 1 0 0 1 2 0A7 7 0 1 1 9.722 7.496l-.842-.21a.999.999 0 1 1 .484-1.94l3.23.806c.535.133.86.675.73 1.21l-.804 3.233a.997.997 0 0 1-1.21.73.997.997 0 0 1-.73-1.21l.23-.928v-.002z" fill="currentColor" fill-rule="nonzero"/></svg>',ke.STRING],iconUndo:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M9.185 10.81l.02-.038A4.997 4.997 0 0 1 13.683 8a5 5 0 0 1 5 5 5 5 0 0 1-5 5 1 1 0 0 0 0 2A7 7 0 1 0 7.496 9.722l-.21-.842a.999.999 0 1 0-1.94.484l.806 3.23c.133.535.675.86 1.21.73l3.233-.803a.997.997 0 0 0 .73-1.21.997.997 0 0 0-1.21-.73l-.928.23-.002-.001z" fill="currentColor" fill-rule="nonzero"/></svg>',ke.STRING],iconDone:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M18.293 9.293a1 1 0 0 1 1.414 1.414l-7.002 7a1 1 0 0 1-1.414 0l-3.998-4a1 1 0 1 1 1.414-1.414L12 15.586l6.294-6.293z" fill="currentColor" fill-rule="nonzero"/></svg>',ke.STRING],oninit:[null,ke.FUNCTION],onwarning:[null,ke.FUNCTION],onerror:[null,ke.FUNCTION],onaddfilestart:[null,ke.FUNCTION],onaddfileprogress:[null,ke.FUNCTION],onaddfile:[null,ke.FUNCTION],onprocessfilestart:[null,ke.FUNCTION],onprocessfileprogress:[null,ke.FUNCTION],onprocessfileabort:[null,ke.FUNCTION],onprocessfilerevert:[null,ke.FUNCTION],onprocessfile:[null,ke.FUNCTION],onremovefile:[null,ke.FUNCTION],onpreparefile:[null,ke.FUNCTION],onupdatefiles:[null,ke.FUNCTION],beforeAddFile:[null,ke.FUNCTION],beforeRemoveFile:[null,ke.FUNCTION],stylePanelLayout:[null,ke.STRING],stylePanelAspectRatio:[null,ke.STRING],styleButtonRemoveItemPosition:["left",ke.STRING],styleButtonProcessItemPosition:["right",ke.STRING],styleLoadIndicatorPosition:["right",ke.STRING],styleProgressIndicatorPosition:["right",ke.STRING],files:[[],ke.ARRAY]},Le=function(e,t){return j(t)?e[0]||null:q(t)?e[t]||null:("object"===(void 0===t?"undefined":l(t))&&(t=t.id),e.find((function(e){return e.id===t}))||null)},Ce=function(e){if(j(e))return e;if(/:/.test(e)){var t=e.split(":"),n=c(t,2),r=n[0];return n[1]/r}return parseFloat(e)},Pe=function(e){return e.filter((function(e){return!e.archived}))},Oe=function(e){return{GET_ITEM:function(t){return Le(e.items,t)},GET_ACTIVE_ITEM:function(t){return Le(Pe(e.items),t)},GET_ACTIVE_ITEMS:function(t){return Pe(e.items)},GET_ITEMS:function(t){return e.items},GET_ITEM_NAME:function(t){var n=Le(e.items,t);return n?n.filename:null},GET_ITEM_SIZE:function(t){var n=Le(e.items,t);return n?n.fileSize:null},GET_STYLES:function(){return Object.keys(e.options).filter((function(e){return/^style/.test(e)})).map((function(t){return{name:t,value:e.options[t]}}))},GET_PANEL_ASPECT_RATIO:function(){return/circle/.test(e.options.stylePanelLayout)?1:Ce(e.options.stylePanelAspectRatio)},GET_ITEMS_BY_STATUS:function(t){return Pe(e.items).filter((function(e){return e.status===t}))},GET_TOTAL_ITEMS:function(){return Pe(e.items).length},IS_ASYNC:function(){return X(e.options.server)&&(X(e.options.server.process)||J(e.options.server.process))}}},Ne=function(e,t,n){return j(t)?null:void 0===n?(e.push(t),t):(r=n,o=0,a=e.length,function(e,t,n){e.splice(t,0,n)}(e,n=Math.max(Math.min(a,r),o),t),t);var r,o,a},Ae=function(e){return/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(e)},Ie=function(e){return e.split("/").pop().split("?").shift()},Re=function(e){return e.split(".").pop()},Ye=function(e){if("string"!=typeof e)return"";var t=e.split("/").pop();return/svg/.test(t)?"svg":/zip|compressed/.test(t)?"zip":/plain/.test(t)?"txt":/msword/.test(t)?"doc":/[a-z]+/.test(t)?"jpeg"===t?"jpg":t:""},je=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(t+e).slice(-t.length)},Fe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return e.getFullYear()+"-"+je(e.getMonth()+1,"00")+"-"+je(e.getDate(),"00")+"_"+je(e.getHours(),"00")+"-"+je(e.getMinutes(),"00")+"-"+je(e.getSeconds(),"00")},He=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o="string"==typeof n?e.slice(0,e.size,n):e.slice(0,e.size,e.type);return o.lastModifiedDate=new Date,U(t)||(t=Fe()),t&&null===r&&Re(t)?o.name=t:(r=r||Ye(o.type),o.name=t+(r?"."+r:"")),o},ze=function(e,t){var n=window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;if(n){var r=new n;return r.append(e),r.getBlob(t)}return new Blob([e],{type:t})},Be=function(e){return(/^data:(.+);/.exec(e)||[])[1]||null},Ue=function(e){var t=Be(e);return function(e,t){for(var n=new ArrayBuffer(e.length),r=new Uint8Array(n),o=0;o<e.length;o++)r[o]=e.charCodeAt(o);return ze(n,t)}(function(e){return atob(function(e){return e.split(",")[1].replace(/\s/g,"")}(e))}(e),t)},Ve=function(e){var t=e.match(/(?:filename="(.+)")|(?:filename=(.+))/)||[];return t[1]||t[2]},We=function(e){if(/content-length:/i.test(e)){var t=e.match(/[0-9]+/)[0];return t?parseInt(t,10):null}return null},qe=function(e){return/x-content-transfer-id:/i.test(e)&&(e.split(":")[1]||"").trim()||null},Ge=function(e){var t={source:null,name:null,size:null},n=e.split("\n"),r=!0,o=!1,a=void 0;try{for(var i,s=n[Symbol.iterator]();!(r=(i=s.next()).done);r=!0){var l=i.value,c=Ve(l);if(c)t.name=c;else{var u=We(l);if(u)t.size=u;else{var d=qe(l);d&&(t.source=d)}}}}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return t},Je=function(e){var t={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},n=function(n){e?(t.timestamp=Date.now(),t.request=e(n,(function(e){t.duration=Date.now()-t.timestamp,t.complete=!0,e instanceof Blob&&(e=He(e,Ie(n))),r.fire("load",e instanceof Blob?e:e.body)}),(function(e){r.fire("error","string"==typeof e?{type:"error",code:0,body:e}:e)}),(function(e,n,o){o&&(t.size=o),t.duration=Date.now()-t.timestamp,e?(t.progress=n/o,r.fire("progress",t.progress)):t.progress=null}),(function(){r.fire("abort")}),(function(e){var n=Ge("string"==typeof e?e:e.headers);r.fire("meta",{size:t.size||n.size,filename:n.name,source:n.source})}))):r.fire("error",{type:"error",body:"Can't load URL",code:400})},r=Object.assign({},me(),{setSource:function(e){return t.source=e},getProgress:function(){return t.progress},abort:function(){t.request&&t.request.abort()},load:function(){var e,o,a=t.source;r.fire("init",a),a instanceof File?r.fire("load",a):a instanceof Blob?r.fire("load",He(a,a.name)):Ae(a)?r.fire("load",He(Ue(a),e,null,o)):n(a)}});return r},Ke=function(e){return/GET|HEAD/.test(e)},Qe=function(e,t,n){var r={onheaders:function(){},onprogress:function(){},onload:function(){},ontimeout:function(){},onerror:function(){},onabort:function(){},abort:function(){o=!0,i.abort()}},o=!1,a=!1;n=Object.assign({method:"POST",headers:{},withCredentials:!1},n),t=encodeURI(t),Ke(n.method)&&e&&(t=""+t+encodeURIComponent("string"==typeof e?e:JSON.stringify(e)));var i=new XMLHttpRequest;return(Ke(n.method)?i:i.upload).onprogress=function(e){o||r.onprogress(e.lengthComputable,e.loaded,e.total)},i.onreadystatechange=function(){i.readyState<2||4===i.readyState&&0===i.status||a||(a=!0,r.onheaders(i))},i.onload=function(){i.status>=200&&i.status<300?r.onload(i):r.onerror(i)},i.onerror=function(){return r.onerror(i)},i.onabort=function(){o=!0,r.onabort()},i.ontimeout=function(){return r.ontimeout(i)},i.open(n.method,t,!0),q(n.timeout)&&(i.timeout=n.timeout),Object.keys(n.headers).forEach((function(e){i.setRequestHeader(e,n.headers[e])})),n.responseType&&(i.responseType=n.responseType),n.withCredentials&&(i.withCredentials=!0),i.send(e),r},Xe=function(e,t,n,r){return{type:e,code:t,body:n,headers:r}},$e=function(e){return function(t){e(Xe("error",0,"Timeout",t.getAllResponseHeaders()))}},Ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments[1];if("function"==typeof t)return t;if(!t||!U(t.url))return null;var n=t.onload||function(e){return e},r=t.onerror||function(e){return null};return function(o,a,i,s,l,c){var u=Qe(o,e+t.url,Object.assign({},t,{responseType:"blob"}));return u.onload=function(e){var t=e.getAllResponseHeaders(),r=Ge(t).name||Ie(o);a(Xe("load",e.status,He(n(e.response),r),t))},u.onerror=function(e){i(Xe("error",e.status,r(e.response)||e.statusText,e.getAllResponseHeaders()))},u.onheaders=function(e){c(Xe("headers",e.status,null,e.getAllResponseHeaders()))},u.ontimeout=$e(i),u.onprogress=s,u.onabort=l,u}},et=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments[1];if("function"==typeof t)return t;if(!t||!U(t.url))return function(e,t){return t()};var n=t.onload||function(e){return e},r=t.onerror||function(e){return null};return function(o,a,i){var s=Qe(o,e+t.url,t);return s.onload=function(e){a(Xe("load",e.status,n(e.response),e.getAllResponseHeaders()))},s.onerror=function(e){i(Xe("error",e.status,r(e.response)||e.statusText,e.getAllResponseHeaders()))},s.ontimeout=$e(i),s}},tt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e+Math.random()*(t-e)},nt=function(e){var t={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},n=function(){t.request&&(t.perceivedPerformanceUpdater.clear(),t.request.abort(),t.complete=!0)},r=Object.assign({},me(),{process:function(n,o){var a=function(){0!==t.duration&&null!==t.progress&&r.fire("progress",r.getProgress())},i=function(){t.complete=!0,r.fire("load-perceived",t.response.body)};r.fire("start"),t.timestamp=Date.now(),t.perceivedPerformanceUpdater=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:25,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,o=null,a=Date.now(),i=function i(){var s=Date.now()-a,l=tt(n,r);s+l>t&&(l=s+l-t);var c=s/t;c>=1?e(1):(e(c),o=setTimeout(i,l))};return i(),{clear:function(){clearTimeout(o)}}}((function(e){t.perceivedProgress=e,t.perceivedDuration=Date.now()-t.timestamp,a(),t.response&&1===t.perceivedProgress&&!t.complete&&i()}),tt(750,1500)),t.request=e(n,o,(function(e){t.response=X(e)?e:{type:"load",code:200,body:""+e,headers:{}},t.duration=Date.now()-t.timestamp,t.progress=1,r.fire("load",t.response.body),1===t.perceivedProgress&&i()}),(function(e){t.perceivedPerformanceUpdater.clear(),r.fire("error",X(e)?e:{type:"error",code:0,body:""+e})}),(function(e,n,r){t.duration=Date.now()-t.timestamp,t.progress=e?n/r:null,a()}),(function(){t.perceivedPerformanceUpdater.clear(),r.fire("abort",t.response?t.response.body:null)}))},abort:n,getProgress:function(){return t.progress?Math.min(t.progress,t.perceivedProgress):null},getDuration:function(){return Math.min(t.duration,t.perceivedDuration)},reset:function(){n(),t.complete=!1,t.perceivedProgress=0,t.progress=0,t.timestamp=null,t.perceivedDuration=0,t.duration=0,t.request=null,t.response=null}});return r},rt=function(e){return e.substr(0,e.lastIndexOf("."))||e},ot={INIT:1,IDLE:2,PROCESSING_QUEUED:9,PROCESSING:3,PROCESSING_COMPLETE:5,PROCESSING_ERROR:6,PROCESSING_REVERT_ERROR:10,LOADING:7,LOAD_ERROR:8},at=function(e){var t=[e.name,e.size,e.type];return e instanceof Blob||Ae(e)?t[0]=e.name||Fe():Ae(e)?(t[1]=e.length,t[2]=Be(e)):U(e)&&(t[0]=Ie(e),t[1]=0,t[2]="application/octet-stream"),{name:t[0],size:t[1],type:t[2]}},it={INPUT:1,LIMBO:2,LOCAL:3},st=function e(t){if(!X(t))return t;var n=Y(t)?[]:{};for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];n[r]=o&&X(o)?e(o):o}return n},lt=function(e,t){var n=function(e,t){return j(t)?0:U(t)?e.findIndex((function(e){return e.id===t})):-1}(e,t);if(!(n<0))return e[n]||null},ct=function(e,t,n,r,o,a){var i=Qe(null,e,{method:"GET",responseType:"blob"});return i.onload=function(n){var r=n.getAllResponseHeaders(),o=Ge(r).name||Ie(e);t(Xe("load",n.status,He(n.response,o),r))},i.onerror=function(e){n(Xe("error",e.status,e.statusText,e.getAllResponseHeaders()))},i.onheaders=function(e){a(Xe("headers",e.status,null,e.getAllResponseHeaders()))},i.ontimeout=$e(n),i.onprogress=r,i.onabort=o,i},ut=function(e){return 0===e.indexOf("//")&&(e=location.protocol+e),e.toLowerCase().replace("blob:","").replace(/([a-z])?:\/\//,"$1").split("/")[0]},dt=function(e){return e instanceof File||e instanceof Blob&&e.name},ht=function(e){return function(){return J(e)?e.apply(void 0,arguments):e}},pt=function(e,t){clearTimeout(t.listUpdateTimeout),t.listUpdateTimeout=setTimeout((function(){e("DID_UPDATE_ITEMS",{items:Pe(t.items)})}),0)},ft=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new Promise((function(t){if(!e)return t(!0);var r=e.apply(void 0,n);return null==r?t(!0):"boolean"==typeof r?t(r):void("function"==typeof r.then&&r.then(t))}))},mt=function(e,t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.query,o=n.success,a=void 0===o?function(){}:o,i=n.failure,s=void 0===i?function(){}:i,l=Le(e.items,r);l?t(l,a,s):s({error:Xe("error",0,"Item not found"),file:null})}},gt=function(e,t,n){return{ABORT_ALL:function(){Pe(n.items).forEach((function(e){e.abortLoad(),e.abortProcessing()}))},DID_SET_FILES:function(t){var r=t.value,o=(void 0===r?[]:r).map((function(e){return{source:e.source?e.source:e,options:e.options}})),a=Pe(n.items);a.forEach((function(t){o.find((function(e){return e.source===t.source||e.source===t.file}))||e("REMOVE_ITEM",{query:t})})),a=Pe(n.items),o.forEach((function(t,n){a.find((function(e){return e.source===t.source||e.file===t.source}))||e("ADD_ITEM",Object.assign({},t,{interactionMethod:de,index:n}))}))},DID_UPDATE_ITEM_METADATA:function(r){var o=r.id,a=lt(n.items,o);if(t("IS_ASYNC")){var i,s=function(){setTimeout((function(){e("REQUEST_ITEM_PROCESSING",{query:o})}),32)};return a.status===ot.PROCESSING_COMPLETE?(i=n.options.instantUpload,void a.revert(et(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then(i?s:function(){}).catch((function(){}))):a.status===ot.PROCESSING?function(e){a.abortProcessing().then(e?s:function(){})}(n.options.instantUpload):void(n.options.instantUpload&&s())}Me("SHOULD_PREPARE_OUTPUT",!1,{item:a,query:t}).then((function(t){t&&e("REQUEST_PREPARE_OUTPUT",{query:o,item:a,ready:function(t){e("DID_PREPARE_OUTPUT",{id:o,file:t})}},!0)}))},ADD_ITEM:function(r){var o=r.source,a=r.index,s=r.interactionMethod,l=r.success,c=void 0===l?function(){}:l,u=r.failure,d=void 0===u?function(){}:u,h=r.options,p=void 0===h?{}:h;if(j(o))d({error:Xe("error",0,"No source"),file:null});else if(!dt(o)||!n.options.ignoredFiles.includes(o.name.toLowerCase())){if(!function(e){var t=Pe(e.items).length;if(!e.options.allowMultiple)return 0===t;var n=e.options.maxFiles;return null===n||t<n}(n)){if(n.options.allowMultiple||!n.options.allowMultiple&&!n.options.allowReplace){var f=Xe("warning",0,"Max files");return e("DID_THROW_MAX_FILES",{source:o,error:f}),void d({error:f,file:null})}var m=Pe(n.items)[0];if(m.status===ot.PROCESSING_COMPLETE||m.status===ot.PROCESSING_REVERT_ERROR){var g=t("GET_FORCE_REVERT");if(m.revert(et(n.options.server.url,n.options.server.revert),g).then((function(){g&&e("ADD_ITEM",{source:o,index:a,interactionMethod:s,success:c,failure:d,options:p})})).catch((function(){})),g)return}e("REMOVE_ITEM",{query:m.id})}var _="local"===p.type?it.LOCAL:"limbo"===p.type?it.LIMBO:it.INPUT,v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=he(),o={archived:!1,released:!1,source:null,file:n,serverFileReference:t,status:t?ot.PROCESSING_COMPLETE:ot.INIT,activeLoader:null,activeProcessor:null},a=null,s={},l=function(e){return o.status=e},c=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.released||x.fire.apply(x,[e].concat(n))},u=function(){return Re(o.file.name)},d=function(){return o.file.type},h=function(){return o.file.size},p=function(){return o.file},f=function(t,n,r){o.source=t,o.file?c("load-skip"):(o.file=at(t),n.on("init",(function(){c("load-init")})),n.on("meta",(function(t){o.file.size=t.size,o.file.filename=t.filename,t.source&&(e=it.LIMBO,o.serverFileReference=t.source,o.status=ot.PROCESSING_COMPLETE),c("load-meta")})),n.on("progress",(function(e){l(ot.LOADING),c("load-progress",e)})),n.on("error",(function(e){l(ot.LOAD_ERROR),c("load-request-error",e)})),n.on("abort",(function(){l(ot.INIT),c("load-abort")})),n.on("load",(function(t){o.activeLoader=null;var n=function(t){o.file=t.size>0?t:o.file,e===it.LIMBO&&o.serverFileReference?l(ot.PROCESSING_COMPLETE):l(ot.IDLE),c("load")};o.serverFileReference?n(t):r(t,n,(function(e){o.file=t,c("load-meta"),l(ot.LOAD_ERROR),c("load-file-error",e)}))})),n.setSource(t),o.activeLoader=n,n.load())},m=function(){o.activeLoader&&o.activeLoader.load()},g=function(){o.activeLoader&&o.activeLoader.abort()},_=function e(t,n){l(ot.PROCESSING),a=null,o.file instanceof Blob?(t.on("load",(function(e){o.serverFileReference=e})),t.on("load-perceived",(function(e){o.activeProcessor=null,o.serverFileReference=e,l(ot.PROCESSING_COMPLETE),c("process-complete",e)})),t.on("start",(function(){c("process-start")})),t.on("error",(function(e){o.activeProcessor=null,l(ot.PROCESSING_ERROR),c("process-error",e)})),t.on("abort",(function(e){o.activeProcessor=null,o.serverFileReference=e,l(ot.IDLE),c("process-abort"),a&&a()})),t.on("progress",(function(e){c("process-progress",e)})),n(o.file,(function(e){o.archived||t.process(e,Object.assign({},s))}),(function(e){})),o.activeProcessor=t):x.on("load",(function(){e(t,n)}))},v=function(){l(ot.PROCESSING_QUEUED)},b=function(){return new Promise((function(e){if(!o.activeProcessor)return l(ot.IDLE),c("process-abort"),void e();a=function(){e()},o.activeProcessor.abort()}))},y=function(e,t){return new Promise((function(n,r){null!==o.serverFileReference?(e(o.serverFileReference,(function(){o.serverFileReference=null,n()}),(function(e){t?(l(ot.PROCESSING_REVERT_ERROR),c("process-revert-error"),r(e)):n()})),l(ot.IDLE),c("process-revert")):n()}))},w=function(e,t,n){var r=e.split("."),o=r[0],a=r.pop(),i=s;r.forEach((function(e){return i=i[e]})),JSON.stringify(i[a])!==JSON.stringify(t)&&(i[a]=t,n||c("metadata-update",{key:o,value:s[o]}))},k=function(e){return st(e?s[e]:s)},x=Object.assign({id:{get:function(){return r}},origin:{get:function(){return e}},serverId:{get:function(){return o.serverFileReference}},status:{get:function(){return o.status}},filename:{get:function(){return o.file.name}},filenameWithoutExtension:{get:function(){return rt(o.file.name)}},fileExtension:{get:u},fileType:{get:d},fileSize:{get:h},file:{get:p},source:{get:function(){return o.source}},getMetadata:k,setMetadata:function(e,t,n){if(X(e)){var r=e;return Object.keys(r).forEach((function(e){w(e,r[e],t)})),e}return w(e,t,n),t},extend:function(e,t){return M[e]=t},abortLoad:g,retryLoad:m,requestProcessing:v,abortProcessing:b,load:f,process:_,revert:y},me(),{release:function(){return o.released=!0},released:{get:function(){return o.released}},archive:function(){return o.archived=!0},archived:{get:function(){return o.archived}}}),M=i(x);return M}(_,_===it.INPUT?null:o,p.file);Object.keys(p.metadata||{}).forEach((function(e){v.setMetadata(e,p.metadata[e])})),Ee("DID_CREATE_ITEM",v,{query:t,dispatch:e}),Ne(n.items,v,a);var b=v.id;v.on("load-init",(function(){e("DID_START_ITEM_LOAD",{id:b})})),v.on("load-meta",(function(){e("DID_UPDATE_ITEM_META",{id:b})})),v.on("load-progress",(function(t){e("DID_UPDATE_ITEM_LOAD_PROGRESS",{id:b,progress:t})})),v.on("load-request-error",(function(t){var r=ht(n.options.labelFileLoadError)(t);if(t.code>=400&&t.code<500)return e("DID_THROW_ITEM_INVALID",{id:b,error:t,status:{main:r,sub:t.code+" ("+t.body+")"}}),void d({error:t,file:ve(v)});e("DID_THROW_ITEM_LOAD_ERROR",{id:b,error:t,status:{main:r,sub:n.options.labelTapToRetry}})})),v.on("load-file-error",(function(t){e("DID_THROW_ITEM_INVALID",Object.assign({},t,{id:b}))})),v.on("load-abort",(function(){e("REMOVE_ITEM",{query:b})})),v.on("load-skip",(function(){e("COMPLETE_LOAD_ITEM",{query:b,item:v,data:{source:o,success:c}})})),v.on("load",(function(){var r=function(r){r?(v.on("metadata-update",(function(t){e("DID_UPDATE_ITEM_METADATA",{id:b,change:t})})),Me("SHOULD_PREPARE_OUTPUT",!1,{item:v,query:t}).then((function(t){var r=function(){e("COMPLETE_LOAD_ITEM",{query:b,item:v,data:{source:o,success:c}}),pt(e,n)};t?e("REQUEST_PREPARE_OUTPUT",{query:b,item:v,ready:function(t){e("DID_PREPARE_OUTPUT",{id:b,file:t}),r()}},!0):r()}))):e("REMOVE_ITEM",{query:b})};Me("DID_LOAD_ITEM",v,{query:t,dispatch:e}).then((function(){ft(t("GET_BEFORE_ADD_FILE"),ve(v)).then(r)})).catch((function(){r(!1)}))})),v.on("process-start",(function(){e("DID_START_ITEM_PROCESSING",{id:b})})),v.on("process-progress",(function(t){e("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id:b,progress:t})})),v.on("process-error",(function(t){e("DID_THROW_ITEM_PROCESSING_ERROR",{id:b,error:t,status:{main:ht(n.options.labelFileProcessingError)(t),sub:n.options.labelTapToRetry}})})),v.on("process-revert-error",(function(t){e("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id:b,error:t,status:{main:ht(n.options.labelFileProcessingRevertError)(t),sub:n.options.labelTapToRetry}})})),v.on("process-complete",(function(t){e("DID_COMPLETE_ITEM_PROCESSING",{id:b,error:null,serverFileReference:t})})),v.on("process-abort",(function(){e("DID_ABORT_ITEM_PROCESSING",{id:b})})),v.on("process-revert",(function(){e("DID_REVERT_ITEM_PROCESSING",{id:b})})),e("DID_ADD_ITEM",{id:b,index:a,interactionMethod:s}),pt(e,n);var y=n.options.server||{},w=y.url,k=y.load,x=y.restore,M=y.fetch;v.load(o,Je(_===it.INPUT?U(o)&&function(e){return(e.indexOf(":")>-1||e.indexOf("//")>-1)&&ut(location.href)!==ut(e)}(o)?Ze(w,M):ct:Ze(w,_===it.LIMBO?x:k)),(function(e,n,r){Me("LOAD_FILE",e,{query:t}).then(n).catch(r)}))}},REQUEST_PREPARE_OUTPUT:function(e){var n=e.item,r=e.ready;Me("PREPARE_OUTPUT",n.file,{query:t,item:n}).then((function(e){Me("COMPLETE_PREPARE_OUTPUT",e,{query:t,item:n}).then((function(e){r(e)}))}))},COMPLETE_LOAD_ITEM:function(r){var o=r.item,a=r.data,i=a.success,s=a.source;e("DID_LOAD_ITEM",{id:o.id,error:null,serverFileReference:o.origin===it.INPUT?null:s}),i(ve(o)),o.origin!==it.LOCAL?o.origin!==it.LIMBO?t("IS_ASYNC")&&n.options.instantUpload&&e("REQUEST_ITEM_PROCESSING",{query:o.id}):e("DID_COMPLETE_ITEM_PROCESSING",{id:o.id,error:null,serverFileReference:s}):e("DID_LOAD_LOCAL_ITEM",{id:o.id})},RETRY_ITEM_LOAD:mt(n,(function(e){e.retryLoad()})),REQUEST_ITEM_PROCESSING:mt(n,(function(r,o,a){if(r.status===ot.IDLE||r.status===ot.PROCESSING_ERROR)r.status!==ot.PROCESSING_QUEUED&&(r.requestProcessing(),e("DID_REQUEST_ITEM_PROCESSING",{id:r.id}),e("PROCESS_ITEM",{query:r,success:o,failure:a},!0));else{var i=function(){setTimeout((function(){e("REQUEST_ITEM_PROCESSING",{query:r,success:o,failure:a})}),32)};r.status===ot.PROCESSING_COMPLETE||r.status===ot.PROCESSING_REVERT_ERROR?r.revert(et(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then(i).catch((function(){})):r.status===ot.PROCESSING&&r.abortProcessing().then(i)}})),PROCESS_ITEM:mt(n,(function(r,o,a){var i=t("GET_MAX_PARALLEL_UPLOADS");t("GET_ITEMS_BY_STATUS",ot.PROCESSING).length!==i?r.status!==ot.PROCESSING&&(r.onOnce("process-complete",(function(){o(ve(r));var t=n.processingQueue.shift();t&&e("PROCESS_ITEM",{query:t.item,success:t.success,failure:t.failure},!0)})),r.onOnce("process-error",(function(e){a({error:e,file:ve(r)})})),r.process(nt(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments[1],n=arguments[2];return"function"==typeof t?function(){for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.apply(void 0,[n].concat(r))}:t&&U(t.url)?function(r,o,a,i,s,l){var c=t.ondata||function(e){return e},u=t.onload||function(e){return e},d=t.onerror||function(e){return null};if(r){var h=new FormData;X(o)&&h.append(n,JSON.stringify(o)),(r instanceof Blob?[{name:null,file:r}]:r).forEach((function(e){h.append(n,e.file,null===e.name?e.file.name:""+e.name+e.file.name)}));var p=Qe(c(h),e+t.url,t);return p.onload=function(e){a(Xe("load",e.status,u(e.response),e.getAllResponseHeaders()))},p.onerror=function(e){i(Xe("error",e.status,d(e.response)||e.statusText,e.getAllResponseHeaders()))},p.ontimeout=$e(i),p.onprogress=s,p.onabort=l,p}}:null}(n.options.server.url,n.options.server.process,n.options.name)),(function(n,o,a){Me("PREPARE_OUTPUT",n,{query:t,item:r}).then((function(t){e("DID_PREPARE_OUTPUT",{id:r.id,file:t}),o(t)})).catch(a)}))):n.processingQueue.push({item:r,success:o,failure:a})})),RETRY_ITEM_PROCESSING:mt(n,(function(t){e("REQUEST_ITEM_PROCESSING",{query:t})})),REQUEST_REMOVE_ITEM:mt(n,(function(n){ft(t("GET_BEFORE_REMOVE_FILE"),ve(n)).then((function(t){t&&e("REMOVE_ITEM",{query:n})}))})),RELEASE_ITEM:mt(n,(function(e){e.release()})),REMOVE_ITEM:mt(n,(function(t,r){var o=function(){var o=t.id;lt(n.items,o).archive(),e("DID_REMOVE_ITEM",{id:o,item:t}),pt(e,n),r(ve(t))},a=n.options.server;t.origin===it.LOCAL&&a&&J(a.remove)?(e("DID_START_ITEM_REMOVE",{id:t.id}),a.remove(t.source,(function(){return o()}),(function(r){e("DID_THROW_ITEM_REMOVE_ERROR",{id:t.id,error:Xe("error",0,r,null),status:{main:ht(n.options.labelFileRemoveError)(r),sub:n.options.labelTapToRetry}})}))):o()})),ABORT_ITEM_LOAD:mt(n,(function(e){e.abortLoad()})),ABORT_ITEM_PROCESSING:mt(n,(function(t){t.serverId?e("REVERT_ITEM_PROCESSING",{id:t.id}):t.abortProcessing().then((function(){n.options.instantUpload&&e("REMOVE_ITEM",{query:t.id})}))})),REQUEST_REVERT_ITEM_PROCESSING:mt(n,(function(r){if(n.options.instantUpload){var o=function(t){t&&e("REVERT_ITEM_PROCESSING",{query:r})},a=t("GET_BEFORE_REMOVE_FILE");if(!a)return o(!0);var i=a(ve(r));return null==i?o(!0):"boolean"==typeof i?o(i):void("function"==typeof i.then&&i.then(o))}e("REVERT_ITEM_PROCESSING",{query:r})})),REVERT_ITEM_PROCESSING:mt(n,(function(r){r.revert(et(n.options.server.url,n.options.server.revert),t("GET_FORCE_REVERT")).then((function(){(n.options.instantUpload||function(e){return!dt(e.file)}(r))&&e("REMOVE_ITEM",{query:r.id})})).catch((function(){}))})),SET_OPTIONS:function(t){var n=t.options;a(n,(function(t,n){e("SET_"+re(t,"_").toUpperCase(),{value:n})}))}}},_t=function(e){return document.createElement(e)},vt=function(e,t){var n=e.childNodes[0];n?t!==n.nodeValue&&(n.nodeValue=t):(n=document.createTextNode(t),e.appendChild(n))},bt=function(e,t,n,r){var o=(r%360-90)*Math.PI/180;return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}},yt=function(e,t,n,r,o){var a=1;return o>r&&o-r<=.5&&(a=0),r>o&&r-o>=.5&&(a=0),function(e,t,n,r,o,a){var i=bt(e,t,n,o),s=bt(e,t,n,r);return["M",i.x,i.y,"A",n,n,0,a,0,s.x,s.y].join(" ")}(e,t,n,360*Math.min(.9999,r),360*Math.min(.9999,o),a)},wt=N({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create:function(e){var t=e.root,n=e.props;n.spin=!1,n.progress=0,n.opacity=0;var r=f("svg");t.ref.path=f("path",{"stroke-width":2,"stroke-linecap":"round"}),r.appendChild(t.ref.path),t.ref.svg=r,t.appendChild(r)},write:function(e){var t=e.root,n=e.props;if(0!==n.opacity){n.align&&(t.element.dataset.align=n.align);var r=parseInt(s(t.ref.path,"stroke-width"),10),o=.5*t.rect.element.width,a=0,i=0;n.spin?(a=0,i=.5):(a=0,i=n.progress);var l=yt(o,o,o-r,a,i);s(t.ref.path,"d",l),s(t.ref.path,"stroke-opacity",n.spin||n.progress>0?1:0)}},mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),kt=N({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:function(e){var t=e.root,n=e.props;t.element.title=n.label,t.element.innerHTML=n.icon||"",n.disabled=!1},write:function(e){var t=e.root,n=e.props;0!==n.opacity||n.disabled?n.opacity>0&&n.disabled&&(n.disabled=!1,t.element.removeAttribute("disabled")):(n.disabled=!0,s(t.element,"disabled","disabled"))}}),xt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".";return(e=Math.round(Math.abs(e)))<1e3?e+" bytes":e<Et?Math.floor(e/Mt)+" KB":e<Tt?St(e/Et,1,t)+" MB":St(e/Tt,2,t)+" GB"},Mt=1e3,Et=1e6,Tt=1e9,St=function(e,t,n){return e.toFixed(t).split(".").filter((function(e){return"0"!==e})).join(n)},Dt=function(e){var t=e.root,n=e.props;vt(t.ref.fileSize,xt(t.query("GET_ITEM_SIZE",n.id))),vt(t.ref.fileName,t.query("GET_ITEM_NAME",n.id))},Lt=function(e){var t=e.root,n=e.props;q(t.query("GET_ITEM_SIZE",n.id))||vt(t.ref.fileSize,t.query("GET_LABEL_FILE_SIZE_NOT_AVAILABLE"))},Ct=N({name:"file-info",ignoreRect:!0,ignoreRectUpdate:!0,write:A({DID_LOAD_ITEM:Dt,DID_UPDATE_ITEM_META:Dt,DID_THROW_ITEM_LOAD_ERROR:Lt,DID_THROW_ITEM_INVALID:Lt}),didCreateView:function(e){Ee("CREATE_VIEW",Object.assign({},e,{view:e}))},create:function(e){var t=e.root,n=e.props,r=_t("span");r.className="filepond--file-info-main",s(r,"aria-hidden","true"),t.appendChild(r),t.ref.fileName=r;var o=_t("span");o.className="filepond--file-info-sub",t.appendChild(o),t.ref.fileSize=o,vt(o,t.query("GET_LABEL_FILE_WAITING_FOR_SIZE")),vt(r,t.query("GET_ITEM_NAME",n.id))},mixins:{styles:["translateX","translateY"],animations:{translateX:"spring",translateY:"spring"}}}),Pt=function(e){return Math.round(100*e)},Ot=function(e){var t=e.root,n=e.action,r=null===n.progress?t.query("GET_LABEL_FILE_LOADING"):t.query("GET_LABEL_FILE_LOADING")+" "+Pt(n.progress)+"%";vt(t.ref.main,r),vt(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},Nt=function(e){var t=e.root;vt(t.ref.main,""),vt(t.ref.sub,"")},At=function(e){var t=e.root,n=e.action;vt(t.ref.main,n.status.main),vt(t.ref.sub,n.status.sub)},It=N({name:"file-status",ignoreRect:!0,ignoreRectUpdate:!0,write:A({DID_LOAD_ITEM:Nt,DID_REVERT_ITEM_PROCESSING:Nt,DID_REQUEST_ITEM_PROCESSING:function(e){var t=e.root;vt(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING")),vt(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},DID_ABORT_ITEM_PROCESSING:function(e){var t=e.root;vt(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING_ABORTED")),vt(t.ref.sub,t.query("GET_LABEL_TAP_TO_RETRY"))},DID_COMPLETE_ITEM_PROCESSING:function(e){var t=e.root;vt(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING_COMPLETE")),vt(t.ref.sub,t.query("GET_LABEL_TAP_TO_UNDO"))},DID_UPDATE_ITEM_PROCESS_PROGRESS:function(e){var t=e.root,n=e.action,r=null===n.progress?t.query("GET_LABEL_FILE_PROCESSING"):t.query("GET_LABEL_FILE_PROCESSING")+" "+Pt(n.progress)+"%";vt(t.ref.main,r),vt(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},DID_UPDATE_ITEM_LOAD_PROGRESS:Ot,DID_THROW_ITEM_LOAD_ERROR:At,DID_THROW_ITEM_INVALID:At,DID_THROW_ITEM_PROCESSING_ERROR:At,DID_THROW_ITEM_PROCESSING_REVERT_ERROR:At,DID_THROW_ITEM_REMOVE_ERROR:At}),didCreateView:function(e){Ee("CREATE_VIEW",Object.assign({},e,{view:e}))},create:function(e){var t=e.root,n=_t("span");n.className="filepond--file-status-main",t.appendChild(n),t.ref.main=n;var r=_t("span");r.className="filepond--file-status-sub",t.appendChild(r),t.ref.sub=r,Ot({root:t,action:{progress:null}})},mixins:{styles:["translateX","translateY","opacity"],animations:{opacity:{type:"tween",duration:250},translateX:"spring",translateY:"spring"}}}),Rt={AbortItemLoad:{label:"GET_LABEL_BUTTON_ABORT_ITEM_LOAD",action:"ABORT_ITEM_LOAD",className:"filepond--action-abort-item-load",align:"LOAD_INDICATOR_POSITION"},RetryItemLoad:{label:"GET_LABEL_BUTTON_RETRY_ITEM_LOAD",action:"RETRY_ITEM_LOAD",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-load",align:"BUTTON_PROCESS_ITEM_POSITION"},RemoveItem:{label:"GET_LABEL_BUTTON_REMOVE_ITEM",action:"REQUEST_REMOVE_ITEM",icon:"GET_ICON_REMOVE",className:"filepond--action-remove-item",align:"BUTTON_REMOVE_ITEM_POSITION"},ProcessItem:{label:"GET_LABEL_BUTTON_PROCESS_ITEM",action:"REQUEST_ITEM_PROCESSING",icon:"GET_ICON_PROCESS",className:"filepond--action-process-item",align:"BUTTON_PROCESS_ITEM_POSITION"},AbortItemProcessing:{label:"GET_LABEL_BUTTON_ABORT_ITEM_PROCESSING",action:"ABORT_ITEM_PROCESSING",className:"filepond--action-abort-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RetryItemProcessing:{label:"GET_LABEL_BUTTON_RETRY_ITEM_PROCESSING",action:"RETRY_ITEM_PROCESSING",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RevertItemProcessing:{label:"GET_LABEL_BUTTON_UNDO_ITEM_PROCESSING",action:"REQUEST_REVERT_ITEM_PROCESSING",icon:"GET_ICON_UNDO",className:"filepond--action-revert-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"}},Yt=[];a(Rt,(function(e){Yt.push(e)}));var jt,Ft=function(e){return e.ref.buttonRemoveItem.rect.element.width+e.ref.buttonRemoveItem.rect.element.left},Ht=function(e){return Math.floor(e.ref.buttonRemoveItem.rect.element.height/4)},zt=function(e){return Math.floor(e.ref.buttonRemoveItem.rect.element.left/2)},Bt=function(e){return e.query("GET_STYLE_BUTTON_REMOVE_ITEM_POSITION")},Ut={buttonAbortItemLoad:{opacity:0},buttonRetryItemLoad:{opacity:0},buttonRemoveItem:{opacity:0},buttonProcessItem:{opacity:0},buttonAbortItemProcessing:{opacity:0},buttonRetryItemProcessing:{opacity:0},buttonRevertItemProcessing:{opacity:0},loadProgressIndicator:{opacity:0,align:function(e){return e.query("GET_STYLE_LOAD_INDICATOR_POSITION")}},processProgressIndicator:{opacity:0,align:function(e){return e.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}},processingCompleteIndicator:{opacity:0,scaleX:.75,scaleY:.75},info:{translateX:0,translateY:0,opacity:0},status:{translateX:0,translateY:0,opacity:0}},Vt={buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:Ft},status:{translateX:Ft}},Wt={buttonAbortItemProcessing:{opacity:1},processProgressIndicator:{opacity:1},status:{opacity:1}},qt={DID_THROW_ITEM_INVALID:{buttonRemoveItem:{opacity:1},info:{translateX:Ft},status:{translateX:Ft,opacity:1}},DID_START_ITEM_LOAD:{buttonAbortItemLoad:{opacity:1},loadProgressIndicator:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_LOAD_ERROR:{buttonRetryItemLoad:{opacity:1},buttonRemoveItem:{opacity:1},info:{translateX:Ft},status:{opacity:1}},DID_START_ITEM_REMOVE:{processProgressIndicator:{opacity:1,align:Bt},info:{translateX:Ft},status:{opacity:0}},DID_THROW_ITEM_REMOVE_ERROR:{processProgressIndicator:{opacity:0,align:Bt},buttonRemoveItem:{opacity:1},info:{translateX:Ft},status:{opacity:1,translateX:Ft}},DID_LOAD_ITEM:Vt,DID_LOAD_LOCAL_ITEM:{buttonRemoveItem:{opacity:1},info:{translateX:Ft},status:{translateX:Ft}},DID_START_ITEM_PROCESSING:Wt,DID_REQUEST_ITEM_PROCESSING:Wt,DID_UPDATE_ITEM_PROCESS_PROGRESS:Wt,DID_COMPLETE_ITEM_PROCESSING:{buttonRevertItemProcessing:{opacity:1},info:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_PROCESSING_ERROR:{buttonRemoveItem:{opacity:1},buttonRetryItemProcessing:{opacity:1},status:{opacity:1},info:{translateX:Ft}},DID_THROW_ITEM_PROCESSING_REVERT_ERROR:{buttonRevertItemProcessing:{opacity:1},status:{opacity:1},info:{opacity:1}},DID_ABORT_ITEM_PROCESSING:{buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:Ft},status:{opacity:1}},DID_REVERT_ITEM_PROCESSING:Vt},Gt=N({create:function(e){var t=e.root;t.element.innerHTML=t.query("GET_ICON_DONE")},name:"processing-complete-indicator",ignoreRect:!0,mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",opacity:{type:"tween",duration:250}}}}),Jt=A({DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING:function(e){var t=e.root,n=e.action;t.ref.buttonAbortItemProcessing.label=n.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD:function(e){var t=e.root,n=e.action;t.ref.buttonAbortItemLoad.label=n.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL:function(e){var t=e.root,n=e.action;t.ref.buttonAbortItemRemoval.label=n.value},DID_REQUEST_ITEM_PROCESSING:function(e){var t=e.root;t.ref.processProgressIndicator.spin=!0,t.ref.processProgressIndicator.progress=0},DID_START_ITEM_LOAD:function(e){var t=e.root;t.ref.loadProgressIndicator.spin=!0,t.ref.loadProgressIndicator.progress=0},DID_START_ITEM_REMOVE:function(e){var t=e.root;t.ref.processProgressIndicator.spin=!0,t.ref.processProgressIndicator.progress=0},DID_UPDATE_ITEM_LOAD_PROGRESS:function(e){var t=e.root,n=e.action;t.ref.loadProgressIndicator.spin=!1,t.ref.loadProgressIndicator.progress=n.progress},DID_UPDATE_ITEM_PROCESS_PROGRESS:function(e){var t=e.root,n=e.action;t.ref.processProgressIndicator.spin=!1,t.ref.processProgressIndicator.progress=n.progress}}),Kt=N({create:function(e){var t=e.root,n=e.props.id,r=t.query("GET_ALLOW_REVERT"),o=t.query("GET_INSTANT_UPLOAD"),i=t.query("IS_ASYNC"),s=i?Yt.concat():Yt.filter((function(e){return!/Process/.test(e)}));if(i&&!r){s.splice(-1,1);var l=qt.DID_COMPLETE_ITEM_PROCESSING;l.info.translateX=zt,l.info.translateY=Ht,l.status.translateY=Ht,l.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}o&&r&&(Rt.RevertItemProcessing.label="GET_LABEL_BUTTON_REMOVE_ITEM",Rt.RevertItemProcessing.icon="GET_ICON_REMOVE"),a(Rt,(function(e,r){var o=t.createChildView(kt,{label:t.query(r.label),icon:t.query(r.icon),opacity:0});s.includes(e)&&t.appendChildView(o),o.element.dataset.align=t.query("GET_STYLE_"+r.align),o.element.classList.add(r.className),o.on("click",(function(){t.dispatch(r.action,{query:n})})),t.ref["button"+e]=o})),t.ref.info=t.appendChildView(t.createChildView(Ct,{id:n})),t.ref.status=t.appendChildView(t.createChildView(It,{id:n})),t.ref.processingCompleteIndicator=t.appendChildView(t.createChildView(Gt)),t.ref.processingCompleteIndicator.element.dataset.align=t.query("GET_STYLE_BUTTON_PROCESS_ITEM_POSITION");var c=t.appendChildView(t.createChildView(wt,{opacity:0,align:t.query("GET_STYLE_LOAD_INDICATOR_POSITION")}));c.element.classList.add("filepond--load-indicator"),t.ref.loadProgressIndicator=c;var u=t.appendChildView(t.createChildView(wt,{opacity:0,align:t.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}));u.element.classList.add("filepond--process-indicator"),t.ref.processProgressIndicator=u},write:function(e){var t=e.root,n=e.actions,r=e.props;Jt({root:t,actions:n,props:r});var o=[].concat(u(n)).filter((function(e){return/^DID_/.test(e.type)})).reverse().find((function(e){return qt[e.type]}));if(o&&(!o||o.type!==t.ref.currentAction)){t.ref.currentAction=o.type;var i=qt[t.ref.currentAction];a(Ut,(function(e,n){var r=t.ref[e];a(n,(function(n,o){var a=i[e]&&void 0!==i[e][n]?i[e][n]:o;r[n]="function"==typeof a?a(t):a}))}))}},didCreateView:function(e){Ee("CREATE_VIEW",Object.assign({},e,{view:e}))},name:"file"}),Qt=N({create:function(e){var t=e.root,n=e.props;t.ref.fileName=_t("legend"),t.appendChild(t.ref.fileName),t.ref.file=t.appendChildView(t.createChildView(Kt,{id:n.id}));var r=_t("input");r.type="hidden",r.name=t.query("GET_NAME"),t.ref.data=r,t.appendChild(r)},ignoreRect:!0,write:A({DID_LOAD_ITEM:function(e){var t=e.root,n=e.action,r=e.props;t.ref.data.value=n.serverFileReference,vt(t.ref.fileName,t.query("GET_ITEM_NAME",r.id))},DID_REMOVE_ITEM:function(e){e.root.ref.data.removeAttribute("value")},DID_COMPLETE_ITEM_PROCESSING:function(e){var t=e.root,n=e.action;t.ref.data.value=n.serverFileReference},DID_REVERT_ITEM_PROCESSING:function(e){e.root.ref.data.removeAttribute("value")}}),didCreateView:function(e){Ee("CREATE_VIEW",Object.assign({},e,{view:e}))},tag:"fieldset",name:"file-wrapper"}),Xt={type:"spring",damping:.6,mass:7},$t=function(e,t,n){var r=N({name:"panel-"+t.name+" filepond--"+n,mixins:t.mixins,ignoreRectUpdate:!0}),o=e.createChildView(r,t.props);e.ref[t.name]=e.appendChildView(o)},Zt=N({name:"panel",write:function(e){var t=e.root,n=e.props;if(null!==t.ref.scalable&&n.scalable===t.ref.scalable||(t.ref.scalable=!z(n.scalable)||n.scalable,t.element.dataset.scalable=t.ref.scalable),n.height){var r=t.ref.top.rect.element,o=t.ref.bottom.rect.element,a=Math.max(r.height+o.height,n.height);t.ref.center.translateY=r.height,t.ref.center.scaleY=(a-r.height-o.height)/100,t.ref.bottom.translateY=a-o.height}},create:function(e){var t=e.root,n=e.props;[{name:"top"},{name:"center",props:{translateY:null,scaleY:null},mixins:{animations:{scaleY:Xt},styles:["translateY","scaleY"]}},{name:"bottom",props:{translateY:null},mixins:{animations:{translateY:Xt},styles:["translateY"]}}].forEach((function(e){$t(t,e,n.name)})),t.element.classList.add("filepond--"+n.name),t.ref.scalable=null},ignoreRect:!0,mixins:{apis:["height","scalable"]}}),en={DID_START_ITEM_LOAD:"busy",DID_UPDATE_ITEM_LOAD_PROGRESS:"loading",DID_THROW_ITEM_INVALID:"load-invalid",DID_THROW_ITEM_LOAD_ERROR:"load-error",DID_LOAD_ITEM:"idle",DID_THROW_ITEM_REMOVE_ERROR:"remove-error",DID_START_ITEM_REMOVE:"busy",DID_START_ITEM_PROCESSING:"busy",DID_REQUEST_ITEM_PROCESSING:"busy",DID_UPDATE_ITEM_PROCESS_PROGRESS:"processing",DID_COMPLETE_ITEM_PROCESSING:"processing-complete",DID_THROW_ITEM_PROCESSING_ERROR:"processing-error",DID_THROW_ITEM_PROCESSING_REVERT_ERROR:"processing-revert-error",DID_ABORT_ITEM_PROCESSING:"cancelled",DID_REVERT_ITEM_PROCESSING:"idle"},tn=N({create:function(e){var t=e.root,n=e.props;t.ref.controls=t.appendChildView(t.createChildView(Qt,{id:n.id})),t.ref.panel=t.appendChildView(t.createChildView(Zt,{name:"item-panel"})),t.ref.panel.height=0,n.markedForRemoval=!1},write:function(e){var t=e.root,n=e.actions,r=e.props;t.ref.panel.height=t.ref.controls.rect.inner.height;var o=t.query("GET_PANEL_ASPECT_RATIO"),a=t.query("GET_ALLOW_MULTIPLE");t.height=o&&!a?t.rect.element.width*o:t.ref.controls.rect.inner.height;var i=[].concat(u(n)).filter((function(e){return/^DID_/.test(e.type)})).reverse().find((function(e){return en[e.type]}));!i||i&&i.type===r.currentState||(r.currentState=i.type,t.element.dataset.filepondItemState=en[r.currentState]||"")},destroy:function(e){var t=e.root,n=e.props;t.dispatch("RELEASE_ITEM",{query:n.id})},tag:"li",name:"item",mixins:{apis:["id","markedForRemoval"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:150}}}}),nn=A({DID_ADD_ITEM:function(e){var t=e.root,n=e.action,r=n.id,o=n.index,a=n.interactionMethod,i={opacity:0};a===de&&(i.translateY=null),a===le&&(i.scaleX=.8,i.scaleY=.8,i.translateY=null),a===ce&&(i.translateY=-30),a===se&&(i.translateX=-100,i.translateY=null),t.appendChildView(t.createChildView(tn,Object.assign({id:r},i)),o)},DID_REMOVE_ITEM:function(e){var t=e.root,n=e.action.id,r=t.childViews.find((function(e){return e.id===n}));r&&(r.scaleX=.9,r.scaleY=.9,r.opacity=0,r.markedForRemoval=!0)}}),rn=N({create:function(e){var t=e.root;s(t.element,"role","list")},write:function(e){var t=e.root,n=e.props,r=e.actions;nn({root:t,props:n,actions:r});var o=0;return t.childViews.filter((function(e){return e.rect.outer.height})).forEach((function(e,t){var r=e.rect;e.translateX=0,e.translateY=o+(n.dragIndex>-1?function(e,t,n){return e-1===t?n/6:e===t?n/2:e+1===t?-n/2:e+2===t?-n/6:0}(t,n.dragIndex,10):0),e.markedForRemoval||(e.scaleX=1,e.scaleY=1,e.opacity=1);var a=r.element.height+r.element.marginTop+r.element.marginBottom,i=e.markedForRemoval?a*e.opacity:a;o+=i})),!0},read:function(e){var t=e.root,n=0;t.childViews.filter((function(e){return e.rect.outer.height})).forEach((function(e){var t,r,o=e.rect.element.height+e.rect.element.marginBottom;n+=e.markedForRemoval?o*(t=e.opacity,r=t-1,Math.sqrt(1-r*r)):o})),t.rect.outer.height=n,t.rect.outer.bottom=t.rect.outer.height},tag:"ul",name:"list",didWriteView:function(e){var t=e.root;t.childViews.filter((function(e){return e.markedForRemoval&&0===e.opacity&&e.resting})).forEach((function(e){e._destroy(),t.removeChildView(e)}))},filterFrameActionsForChild:function(e,t){return t.filter((function(t){return!t.data||!t.data.id||e.id===t.data.id}))},mixins:{apis:["dragIndex"]}}),on=function(e,t){for(var n=0,r=e.childViews,o=r.length;n<o;n++){var a=r[n].rect.outer,i=a.top+.5*a.height;if(t.top<i)return n}return o},an=A({DID_DRAG:function(e){var t=e.root,n=e.props,r=e.action;n.dragCoordinates={left:r.position.scopeLeft,top:r.position.scopeTop-t.rect.outer.top+t.rect.element.scrollTop}},DID_END_DRAG:function(e){e.props.dragCoordinates=null}}),sn=N({create:function(e){var t=e.root,n=e.props;t.ref.list=t.appendChildView(t.createChildView(rn)),n.dragCoordinates=null,n.overflowing=!1},write:function(e){var t=e.root,n=e.props,r=e.actions;if(an({root:t,props:n,actions:r}),t.ref.list.dragIndex=n.dragCoordinates?on(t.ref.list,n.dragCoordinates):-1,n.overflowing&&!n.overflow&&(n.overflowing=!1,t.element.dataset.state="",t.height=null),n.overflow){var o=Math.round(n.overflow);o!==t.height&&(n.overflowing=!0,t.element.dataset.state="overflow",t.height=o)}},name:"list-scroller",mixins:{apis:["overflow"],styles:["height","translateY"],animations:{translateY:"spring"}}}),ln=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";n?s(e,t,r):e.removeAttribute(t)},cn=function(e){var t=e.root;t.query("GET_TOTAL_ITEMS")>0?ln(t.element,"required",!1):(t.query("GET_CHECK_VALIDITY")&&t.element.setCustomValidity(""),t.query("GET_REQUIRED")&&ln(t.element,"required",!0))},un=N({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:function(e){var t=e.root,n=e.props;t.element.id="filepond--browser-"+n.id,s(t.element,"aria-controls","filepond--assistant-"+n.id),s(t.element,"aria-labelledby","filepond--drop-label-"+n.id),t.ref.handleChange=function(e){if(t.element.value){var r=[].concat(u(t.element.files));setTimeout((function(){n.onload(r),function(e){if(e&&""!==e.value){try{e.value=""}catch(e){}if(e.value){var t=_t("form"),n=e.parentNode,r=e.nextSibling;t.appendChild(e),t.reset(),r?n.insertBefore(e,r):n.appendChild(e)}}}(t.element)}),250)}},t.element.addEventListener("change",t.ref.handleChange)},destroy:function(e){var t=e.root;t.element.removeEventListener("change",t.ref.handleChange)},write:A({DID_LOAD_ITEM:cn,DID_THROW_ITEM_INVALID:function(e){var t=e.root;t.query("GET_CHECK_VALIDITY")&&t.element.setCustomValidity(t.query("GET_LABEL_INVALID_FIELD"))},DID_REMOVE_ITEM:cn,DID_SET_ALLOW_BROWSE:function(e){var t=e.root,n=e.action;ln(t.element,"disabled",!n.value)},DID_SET_ALLOW_MULTIPLE:function(e){var t=e.root,n=e.action;ln(t.element,"multiple",n.value)},DID_SET_ACCEPTED_FILE_TYPES:function(e){var t=e.root,n=e.action;ln(t.element,"accept",!!n.value,n.value?n.value.join(","):"")},DID_SET_CAPTURE_METHOD:function(e){var t=e.root,n=e.action;ln(t.element,"capture",!!n.value,!0===n.value?"":n.value)},DID_SET_REQUIRED:function(e){var t=e.root;e.action.value?0===t.query("GET_TOTAL_ITEMS")&&ln(t.element,"required",!0):ln(t.element,"required",!1)}})}),dn=13,hn=32,pn=function(e,t){e.innerHTML=t;var n=e.querySelector(".filepond--label-action");return n&&s(n,"tabindex","0"),t},fn=N({name:"drop-label",ignoreRect:!0,create:function(e){var t=e.root,n=e.props,r=_t("label");s(r,"for","filepond--browser-"+n.id),s(r,"id","filepond--drop-label-"+n.id),s(r,"aria-hidden","true"),r.addEventListener("keydown",(function(e){e.keyCode!==dn&&e.keyCode!==hn||(e.preventDefault(),t.ref.label.click())})),pn(r,n.caption),t.appendChild(r),t.ref.label=r},write:A({DID_SET_LABEL_IDLE:function(e){var t=e.root,n=e.action;pn(t.ref.label,n.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),mn=N({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),gn=A({DID_DRAG:function(e){var t=e.root,n=e.action;t.ref.blob?(t.ref.blob.translateX=n.position.scopeLeft,t.ref.blob.translateY=n.position.scopeTop,t.ref.blob.scaleX=1,t.ref.blob.scaleY=1,t.ref.blob.opacity=1):function(e){var t=e.root,n=.5*t.rect.element.width,r=.5*t.rect.element.height;t.ref.blob=t.appendChildView(t.createChildView(mn,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:n,translateY:r}))}({root:t})},DID_DROP:function(e){var t=e.root;t.ref.blob&&(t.ref.blob.scaleX=2.5,t.ref.blob.scaleY=2.5,t.ref.blob.opacity=0)},DID_END_DRAG:function(e){var t=e.root;t.ref.blob&&(t.ref.blob.opacity=0)}}),_n=N({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:function(e){var t=e.root,n=e.props,r=e.actions;gn({root:t,props:n,actions:r});var o=t.ref.blob;0===r.length&&o&&0===o.opacity&&(t.removeChildView(o),t.ref.blob=null)}}),vn=function(e){return new Promise((function(t,n){var r=Tn(e);r.length?t(r):bn(e).then(t)}))},bn=function(e){return new Promise((function(t,n){var r=(e.items?[].concat(u(e.items)):[]).filter((function(e){return yn(e)})).map((function(e){return wn(e)}));r.length?Promise.all(r).then((function(e){var n=[];e.forEach((function(e){n.push.apply(n,u(e))})),t(n.filter((function(e){return e})))})):t(e.files?[].concat(u(e.files)):[])}))},yn=function(e){if(Mn(e)){var t=En(e);if(t)return t.isFile||t.isDirectory}return"file"===e.kind},wn=function(e){return new Promise((function(t,n){xn(e)?kn(En(e)).then(t):t([e.getAsFile()])}))},kn=function(e){return new Promise((function(t,n){var r=[],o=0;!function e(n){n.createReader().readEntries((function(n){n.forEach((function(n){n.isDirectory?e(n):(o++,n.file((function(e){r.push(e),o===r.length&&t(r)})))}))}))}(e)}))},xn=function(e){return Mn(e)&&(En(e)||{}).isDirectory},Mn=function(e){return"webkitGetAsEntry"in e},En=function(e){return e.webkitGetAsEntry()},Tn=function(e){var t=[];try{if((t=Dn(e)).length)return t;t=Sn(e)}catch(e){}return t},Sn=function(e){var t=e.getData("url");return"string"==typeof t&&t.length?[t]:[]},Dn=function(e){var t=e.getData("text/html");if("string"==typeof t&&t.length){var n=t.match(/src\s*=\s*"(.+?)"/);if(n)return[n[1]]}return[]},Ln=[],Cn=function(e){return{pageLeft:e.pageX,pageTop:e.pageY,scopeLeft:e.offsetX||e.layerX,scopeTop:e.offsetY||e.layerY}},Pn=function(e){var t=Ln.find((function(t){return t.element===e}));if(t)return t;var n=On(e);return Ln.push(n),n},On=function(e){var t=[],n={dragenter:Rn,dragover:Yn,dragleave:Fn,drop:jn},r={};a(n,(function(n,o){r[n]=o(e,t),e.addEventListener(n,r[n],!1)}));var o={element:e,addListener:function(i){return t.push(i),function(){t.splice(t.indexOf(i),1),0===t.length&&(Ln.splice(Ln.indexOf(o),1),a(n,(function(t){e.removeEventListener(t,r[t],!1)})))}}};return o},Nn=function(e,t){var n,r=function(e,t){return"elementFromPoint"in e||(e=document),e.elementFromPoint(t.x,t.y)}("getRootNode"in(n=t)?n.getRootNode():document,{x:e.pageX-window.pageXOffset,y:e.pageY-window.pageYOffset});return r===t||t.contains(r)},An=null,In=function(e,t){try{e.dropEffect=t}catch(e){}},Rn=function(e,t){return function(e){e.preventDefault(),An=e.target,t.forEach((function(t){var n=t.element,r=t.onenter;Nn(e,n)&&(t.state="enter",r(Cn(e)))}))}},Yn=function(e,t){return function(e){e.preventDefault();var n=e.dataTransfer;vn(n).then((function(r){var o=!1;t.some((function(t){var a=t.filterElement,i=t.element,s=t.onenter,l=t.onexit,c=t.ondrag,u=t.allowdrop;In(n,"copy");var d=u(r);if(d)if(Nn(e,i)){if(o=!0,null===t.state)return t.state="enter",void s(Cn(e));if(t.state="over",a&&!d)return void In(n,"none");c(Cn(e))}else a&&!o&&In(n,"none"),t.state&&(t.state=null,l(Cn(e)));else In(n,"none")}))}))}},jn=function(e,t){return function(e){e.preventDefault();var n=e.dataTransfer;vn(n).then((function(n){t.forEach((function(t){var r=t.filterElement,o=t.element,a=t.ondrop,i=t.onexit,s=t.allowdrop;t.state=null,s(n)?r&&!Nn(e,o)||a(Cn(e),n):i(Cn(e))}))}))}},Fn=function(e,t){return function(e){An===e.target&&t.forEach((function(t){var n=t.onexit;t.state=null,n(Cn(e))}))}},Hn=function(e,t,n){e.classList.add("filepond--hopper");var r=n.catchesDropsOnPage,o=n.requiresDropOnElement,a=function(e,t,n){var r=Pn(t),o={element:e,filterElement:n,state:null,ondrop:function(){},onenter:function(){},ondrag:function(){},onexit:function(){},onload:function(){},allowdrop:function(){}};return o.destroy=r.addListener(o),o}(e,r?document.documentElement:e,o),i="",s="";a.allowdrop=function(e){return t(e)},a.ondrop=function(e,n){t(n)?(s="drag-drop",l.onload(n,e)):l.ondragend(e)},a.ondrag=function(e){l.ondrag(e)},a.onenter=function(e){s="drag-over",l.ondragstart(e)},a.onexit=function(e){s="drag-exit",l.ondragend(e)};var l={updateHopperState:function(){i!==s&&(e.dataset.hopperState=s,i=s)},onload:function(){},ondragstart:function(){},ondrag:function(){},ondragend:function(){},destroy:function(){a.destroy()}};return l},zn=!1,Bn=[],Un=function(e){vn(e.clipboardData).then((function(e){e.length&&Bn.forEach((function(t){return t(e)}))}))},Vn=function(){var e=function(e){t.onload(e)},t={destroy:function(){var t;t=e,fe(Bn,Bn.indexOf(t)),0===Bn.length&&(document.removeEventListener("paste",Un),zn=!1)},onload:function(){}};return function(e){Bn.includes(e)||(Bn.push(e),zn||(zn=!0,document.addEventListener("paste",Un)))}(e),t},Wn=null,qn=null,Gn=[],Jn=function(e,t){e.element.textContent=t},Kn=function(e,t,n){var r=e.query("GET_TOTAL_ITEMS");Jn(e,n+" "+t+", "+r+" "+(1===r?e.query("GET_LABEL_FILE_COUNT_SINGULAR"):e.query("GET_LABEL_FILE_COUNT_PLURAL"))),clearTimeout(qn),qn=setTimeout((function(){!function(e){e.element.textContent=""}(e)}),1500)},Qn=function(e){return e.element.parentNode.contains(document.activeElement)},Xn=function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename,o=t.query("GET_LABEL_FILE_PROCESSING_ABORTED");Jn(t,r+" "+o)},$n=function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename;Jn(t,n.status.main+" "+r+" "+n.status.sub)},Zn=N({create:function(e){var t=e.root,n=e.props;t.element.id="filepond--assistant-"+n.id,s(t.element,"role","status"),s(t.element,"aria-live","polite"),s(t.element,"aria-relevant","additions")},ignoreRect:!0,ignoreRectUpdate:!0,write:A({DID_LOAD_ITEM:function(e){var t=e.root,n=e.action;if(Qn(t)){t.element.textContent="";var r=t.query("GET_ITEM",n.id);Gn.push(r.filename),clearTimeout(Wn),Wn=setTimeout((function(){Kn(t,Gn.join(", "),t.query("GET_LABEL_FILE_ADDED")),Gn.length=0}),750)}},DID_REMOVE_ITEM:function(e){var t=e.root,n=e.action;if(Qn(t)){var r=n.item;Kn(t,r.filename,t.query("GET_LABEL_FILE_REMOVED"))}},DID_COMPLETE_ITEM_PROCESSING:function(e){var t=e.root,n=e.action,r=t.query("GET_ITEM",n.id).filename,o=t.query("GET_LABEL_FILE_PROCESSING_COMPLETE");Jn(t,r+" "+o)},DID_ABORT_ITEM_PROCESSING:Xn,DID_REVERT_ITEM_PROCESSING:Xn,DID_THROW_ITEM_REMOVE_ERROR:$n,DID_THROW_ITEM_LOAD_ERROR:$n,DID_THROW_ITEM_INVALID:$n,DID_THROW_ITEM_PROCESSING_ERROR:$n}),tag:"span",name:"assistant"}),er=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";return e.replace(new RegExp(t+".","g"),(function(e){return e.charAt(1).toUpperCase()}))},tr=function(e){var t=e.ref.list.childViews[0].childViews[0];return t?{top:t.rect.element.marginTop,bottom:t.rect.element.marginBottom}:{top:0,bottom:0}},nr=function(e,t){var n=0,r=0;return e.ref.list.childViews[0].childViews.forEach((function(e,o){if(!(o>=t)){var a=e.rect.element,i=a.height+a.marginTop+a.marginBottom;r+=i,n+=e.markedForRemoval?e.opacity*i:i}})),{visual:n,bounds:r}},rr=function(e){var t=e.ref.measureHeight||null;return{cappedHeight:parseInt(e.style.maxHeight,10)||null,fixedHeight:0===t?null:t}},or=function(e,t){var n=e.query("GET_ALLOW_REPLACE"),r=e.query("GET_ALLOW_MULTIPLE"),o=e.query("GET_TOTAL_ITEMS"),a=e.query("GET_MAX_FILES"),i=t.length;return!r&&i>1||!!(q(a=r||n?a:1)&&o+i>a)&&(e.dispatch("DID_THROW_MAX_FILES",{source:t,error:Xe("warning",0,"Max files")}),!0)},ar=A({DID_SET_ALLOW_BROWSE:function(e){var t=e.root,n=e.props;e.action.value?t.ref.browser=t.appendChildView(t.createChildView(un,Object.assign({},n,{onload:function(e){if(or(t,e))return!1;pe(e,(function(e){t.dispatch("ADD_ITEM",{interactionMethod:ce,source:e,index:0})}))}})),0):t.ref.browser&&t.removeChildView(t.ref.browser)},DID_SET_ALLOW_DROP:function(e){var t=e.root,n=(e.props,e.action);if(n.value&&!t.ref.hopper){var r=Hn(t.element,(function(e){return!or(t,e)&&(!t.query("GET_DROP_VALIDATION")||e.every((function(e){return Ee("ALLOW_HOPPER_ITEM",e,{query:t.query}).every((function(e){return!0===e}))})))}),{catchesDropsOnPage:t.query("GET_DROP_ON_PAGE"),requiresDropOnElement:t.query("GET_DROP_ON_ELEMENT")});r.onload=function(e,n){var r=t.ref.list.childViews[0],o=on(r,{left:n.scopeLeft,top:n.scopeTop-t.ref.list.rect.outer.top+t.ref.list.element.scrollTop});pe(e,(function(e){t.dispatch("ADD_ITEM",{interactionMethod:le,source:e,index:o})})),t.dispatch("DID_DROP",{position:n}),t.dispatch("DID_END_DRAG",{position:n})},r.ondragstart=function(e){t.dispatch("DID_START_DRAG",{position:e})},r.ondrag=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=Date.now(),o=null;return function(){for(var a=arguments.length,i=Array(a),s=0;s<a;s++)i[s]=arguments[s];clearTimeout(o);var l=Date.now()-r,c=function(){r=Date.now(),e.apply(void 0,i)};l<t?n||(o=setTimeout(c,t-l)):c()}}((function(e){t.dispatch("DID_DRAG",{position:e})})),r.ondragend=function(e){t.dispatch("DID_END_DRAG",{position:e})},t.ref.hopper=r,t.ref.drip=t.appendChildView(t.createChildView(_n))}else!n.value&&t.ref.hopper&&(t.ref.hopper.destroy(),t.ref.hopper=null,t.removeChildView(t.ref.drip))},DID_SET_ALLOW_PASTE:function(e){var t=e.root;e.action.value?(t.ref.paster=Vn(),t.ref.paster.onload=function(e){pe(e,(function(e){t.dispatch("ADD_ITEM",{interactionMethod:ue,source:e,index:0})}))}):t.ref.paster&&(t.ref.paster.destroy(),t.ref.paster=null)}}),ir=N({name:"root",read:function(e){var t=e.root;t.ref.measure&&(t.ref.measureHeight=t.ref.measure.offsetHeight)},create:function(e){var t=e.root,n=e.props,r=t.query("GET_ID");r&&(t.element.id=r);var o=t.query("GET_CLASS_NAME");o&&o.split(" ").forEach((function(e){t.element.classList.add(e)})),t.ref.label=t.appendChildView(t.createChildView(fn,Object.assign({},n,{translateY:null,caption:t.query("GET_LABEL_IDLE")}))),t.ref.list=t.appendChildView(t.createChildView(sn,{translateY:null})),t.ref.panel=t.appendChildView(t.createChildView(Zt,{name:"panel-root"})),t.ref.assistant=t.appendChildView(t.createChildView(Zn,Object.assign({},n))),t.ref.measure=_t("div"),t.ref.measure.style.height="100%",t.element.appendChild(t.ref.measure),t.ref.bounds=null,t.query("GET_STYLES").filter((function(e){return!j(e.value)})).map((function(e){var n=e.name,r=e.value;t.element.dataset[n]=r}))},write:function(e){var t=e.root,n=e.props,r=e.actions,o=t.ref.bounds;o||(o=t.ref.bounds=rr(t),t.element.removeChild(t.ref.measure),t.ref.measure=null),ar({root:t,props:n,actions:r}),r.filter((function(e){return/^DID_SET_STYLE_/.test(e.type)})).filter((function(e){return!j(e.data.value)})).map((function(e){var n=e.type,r=e.data,o=er(n.substr(8).toLowerCase(),"_");t.element.dataset[o]=r.value,t.invalidateLayout()}));var a=t.ref,i=a.hopper,s=a.label,l=a.list,c=a.panel;i&&i.updateHopperState();var u=t.query("GET_PANEL_ASPECT_RATIO"),d=t.query("GET_ALLOW_MULTIPLE"),h=t.query("GET_TOTAL_ITEMS"),p=d?t.query("GET_MAX_FILES")||1e6:1,f=h===p,m=r.find((function(e){return"DID_ADD_ITEM"===e.type}));if(f&&m){var g=m.data.interactionMethod;s.opacity=0,d?s.translateY=-40:g===se?s.translateX=40:s.translateY=g===ce?40:30}else f||(s.opacity=1,s.translateX=0,s.translateY=0);var _=tr(t),v=nr(t,p),b=s.rect.element.height,y=!d||f?0:b,w=f?l.rect.element.marginTop:0,k=0===h?0:l.rect.element.marginBottom,x=y+w+v.visual+k,M=y+w+v.bounds+k;if(l.translateY=Math.max(0,y-l.rect.element.marginTop)-_.top,u){var E=t.rect.element.width*u;c.scalable=!1,c.height=E;var T=E-y-(k-_.bottom)-(f?w:0);v.visual>T?l.overflow=T:l.overflow=null,t.height=E}else if(o.fixedHeight){c.scalable=!1;var S=o.fixedHeight-y-(k-_.bottom)-(f?w:0);v.visual>S?l.overflow=S:l.overflow=null}else if(o.cappedHeight){var D=x>=o.cappedHeight,L=Math.min(o.cappedHeight,x);c.scalable=!0,c.height=D?L:L-_.top-_.bottom;var C=L-y-(k-_.bottom)-(f?w:0);x>o.cappedHeight&&v.visual>C?l.overflow=C:l.overflow=null,t.height=Math.min(o.cappedHeight,M-_.top-_.bottom)}else{var P=h>0?_.top+_.bottom:0;c.scalable=!0,c.height=Math.max(b,x-P),t.height=Math.max(b,M-P)}},destroy:function(e){var t=e.root;t.ref.paster&&t.ref.paster.destroy(),t.ref.hopper&&t.ref.hopper.destroy()},mixins:{styles:["height"]}}),sr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null,n=Se(),r=o(ne(n),[Oe,ie(n)],[gt,ae(n)]);r.dispatch("SET_OPTIONS",{options:e});var a=ir(r,{id:he()}),s=!1,c=!1,d={_read:function(){s||(a._read(),c=a.rect.element.hidden)},_write:function(e){if(!c){var t=r.processActionQueue().filter((function(e){return!/^SET_/.test(e.type)}));s&&!t.length||(m(t),s=a._write(e,t),be(r.query("GET_ITEMS")),s&&r.processDispatchQueue())}}},h=function(e){return function(t){var n={type:e};if(!t)return n;if(t.hasOwnProperty("error")&&(n.error=t.error?Object.assign({},t.error):null),t.status&&(n.status=Object.assign({},t.status)),t.file&&(n.output=t.file),t.source)n.file=t.source;else if(t.item||t.id){var o=t.item?t.item:r.query("GET_ITEM",t.id);n.file=o?ve(o):null}return t.items&&(n.items=t.items.map(ve)),/progress/.test(e)&&(n.progress=t.progress),n}},p={DID_DESTROY:h("destroy"),DID_INIT:h("init"),DID_THROW_MAX_FILES:h("warning"),DID_START_ITEM_LOAD:h("addfilestart"),DID_UPDATE_ITEM_LOAD_PROGRESS:h("addfileprogress"),DID_LOAD_ITEM:h("addfile"),DID_THROW_ITEM_INVALID:[h("error"),h("addfile")],DID_THROW_ITEM_LOAD_ERROR:[h("error"),h("addfile")],DID_PREPARE_OUTPUT:h("preparefile"),DID_START_ITEM_PROCESSING:h("processfilestart"),DID_UPDATE_ITEM_PROCESS_PROGRESS:h("processfileprogress"),DID_ABORT_ITEM_PROCESSING:h("processfileabort"),DID_COMPLETE_ITEM_PROCESSING:h("processfile"),DID_REVERT_ITEM_PROCESSING:h("processfilerevert"),DID_THROW_ITEM_PROCESSING_ERROR:[h("error"),h("processfile")],DID_REMOVE_ITEM:h("removefile"),DID_UPDATE_ITEMS:h("updatefiles")},f=function(e){var t=Object.assign({pond:T},e);delete t.type,a.element.dispatchEvent(new CustomEvent("FilePond:"+e.type,{detail:t,bubbles:!0,cancelable:!0,composed:!0}));var n=[];e.hasOwnProperty("error")&&n.push(e.error),e.hasOwnProperty("file")&&n.push(e.file);var o=["type","error","file"];Object.keys(e).filter((function(e){return!o.includes(e)})).forEach((function(t){return n.push(e[t])})),T.fire.apply(T,[e.type].concat(n));var i=r.query("GET_ON"+e.type.toUpperCase());i&&i.apply(void 0,n)},m=function(e){e.length&&e.forEach((function(e){if(p[e.type]){var t=p[e.type];(Array.isArray(t)?t:[t]).forEach((function(t){setTimeout((function(){f(t(e.data))}),0)}))}}))},g=function(e){return r.dispatch("SET_OPTIONS",{options:e})},_=function(e){return r.query("GET_ACTIVE_ITEM",e)},v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,o){r.dispatch("ADD_ITEM",{interactionMethod:se,source:e,index:t.index,success:n,failure:o,options:t})}))},b=function(e){return r.dispatch("REMOVE_ITEM",{query:e}),null===r.query("GET_ACTIVE_ITEM",e)},y=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Promise((function(e,n){var r=[],o={};if(Y(t[0]))r.push.apply(r,u(t[0])),Object.assign(o,t[1]||{});else{var a=t[t.length-1];"object"!==(void 0===a?"undefined":l(a))||a instanceof Blob||Object.assign(o,t.pop()),r.push.apply(r,t)}var i=[],s=pe(r,(function(e){i.push(v(e,o))}));Promise.all(s).then((function(){Promise.all(i).then((function(t){e(t)}))}))}))},k=function(){return r.query("GET_ACTIVE_ITEMS")},x=function(e){return new Promise((function(t,n){r.dispatch("REQUEST_ITEM_PROCESSING",{query:e,success:function(e){t(e)},failure:function(e){n(e)}})}))},M=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Array.isArray(t[0])?t[0]:t;if(!r.length){var o=k().filter((function(e){return e.status!==ot.PROCESSING&&e.status!==ot.PROCESSING_COMPLETE&&e.status!==ot.PROCESSING_REVERT_ERROR}));return Promise.all(o.map(x))}return Promise.all(r.map(x))},E=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Array.isArray(t[0])?t[0]:t,o=k();if(!r.length)return Promise.all(o.map(b));var a=r.map((function(e){return w(e)?o[e]?o[e].id:null:e})).filter((function(e){return e}));return a.map(b)},T=Object.assign({},me(),d,oe(r,n),{setOptions:g,addFile:v,addFiles:y,getFile:_,processFile:x,removeFile:b,getFiles:k,processFiles:M,removeFiles:E,browse:function(){var e=a.element.querySelector("input[type=file]");e&&e.click()},destroy:function(){T.fire("destroy",a.element),r.dispatch("ABORT_ALL"),a._destroy(),r.dispatch("DID_DESTROY")},insertBefore:function(e){return I(a.element,e)},insertAfter:function(e){return R(a.element,e)},appendTo:function(e){return e.appendChild(a.element)},replaceElement:function(e){I(a.element,e),e.parentNode.removeChild(e),t=e},restoreElement:function(){t&&(R(t,a.element),a.element.parentNode.removeChild(a.element),t=null)},isAttachedTo:function(e){return a.element===e||t===e},element:{get:function(){return a.element}}});return r.dispatch("DID_INIT"),i(T)},lr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};a(Se(),(function(e,n){t[e]=n[0]}));var n=sr(Object.assign({},t,e));return n},cr=function(e){return er(e.replace(/^data-/,""))},ur=function e(t,n){a(n,(function(n,r){a(t,(function(e,o){var a=new RegExp(n);if(a.test(e)&&(delete t[e],!1!==r))if(U(r))t[r]=o;else{var i,s=r.group;X(r)&&!t[s]&&(t[s]={}),t[s][(i=e.replace(a,""),i.charAt(0).toLowerCase()+i.slice(1))]=o}})),r.mapping&&e(t[r.group],r.mapping)}))},dr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];a(e.attributes,(function(t){n.push(e.attributes[t])}));var r=n.filter((function(e){return e.name})).reduce((function(t,n){var r=s(e,n.name);return t[cr(n.name)]=r===n.name||r,t}),{});return ur(r,t),r},hr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};Ee("SET_ATTRIBUTE_TO_OPTION_MAP",n);var r=Object.assign({},t),o=dr("FIELDSET"===e.nodeName?e.querySelector("input[type=file]"):e,n);Object.keys(o).forEach((function(e){X(o[e])?(X(r[e])||(r[e]={}),Object.assign(r[e],o[e])):r[e]=o[e]})),r.files=(t.files||[]).concat([].concat(u(e.querySelectorAll("input:not([type=file])"))).map((function(e){return{source:e.value,options:{type:e.dataset.type}}})));var a=lr(r);return e.files&&[].concat(u(e.files)).forEach((function(e){a.addFile(e)})),a.replaceElement(e),a},pr=function(){return r(arguments.length<=0?void 0:arguments[0])?hr.apply(void 0,arguments):lr.apply(void 0,arguments)},fr=["fire","_read","_write"],mr=function(e){var t={};return ge(e,t,fr),t},gr=function(e,t){return e.replace(/(?:{([a-zA-Z]+)})/g,(function(e,n){return t[n]}))},_r=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],vr=["css","csv","html","txt"],br={zip:"zip|compressed",epub:"application/epub+zip"},yr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=e.toLowerCase(),_r.includes(e)?"image/"+("jpg"===e?"jpeg":"svg"===e?"svg+xml":e):vr.includes(e)?"text/"+e:br[e]||null},wr=function(e){var t=new Blob(["(",e.toString(),")()"],{type:"application/javascript"}),n=URL.createObjectURL(t),r=new Worker(n);return{transfer:function(e,t){},post:function(e,t,n){var o=he();r.onmessage=function(e){e.data.id===o&&t(e.data.message)},r.postMessage({id:o,message:e},n)},terminate:function(){r.terminate(),URL.revokeObjectURL(n)}}},kr=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e}))},xr=function(e,t){var n=e.slice(0,e.size,e.type);return n.lastModifiedDate=e.lastModifiedDate,n.name=t,n},Mr=function(e){return xr(e,e.name)},Er=[],Tr=function(e){if(!Er.includes(e)){Er.push(e);var t,n=e({addFilter:Te,utils:{Type:ke,forin:a,isString:U,isFile:dt,toNaturalFileSize:xt,replaceInString:gr,getExtensionFromFilename:Re,getFilenameWithoutExtension:rt,guesstimateMimeType:yr,getFileFromBlob:He,getFilenameFromURL:Ie,createRoute:A,createWorker:wr,createView:N,createItemAPI:ve,loadImage:kr,copyFile:Mr,renameFile:xr,createBlob:ze,applyFilterChain:Me,text:vt,getNumericAspectRatioFromString:Ce},views:{fileActionButton:kt}});t=n.options,Object.assign(De,t)}},Sr=(jt="undefined"!=typeof window&&void 0!==window.document&&!("[object OperaMini]"===Object.prototype.toString.call(window.operamini))&&"visibilityState"in document&&"Promise"in window&&"slice"in Blob.prototype&&"URL"in window&&"createObjectURL"in window.URL&&"performance"in window,function(){return jt}),Dr={apps:[]},Lr=function(){};if(e.FileStatus={},e.OptionTypes={},e.create=Lr,e.destroy=Lr,e.parse=Lr,e.find=Lr,e.registerPlugin=Lr,e.getOptions=Lr,e.setOptions=Lr,e.FileOrigin={},Sr()){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:60,r="__framePainter";if(window[r])return window[r].readers.push(e),void window[r].writers.push(t);window[r]={readers:[e],writers:[t]};var o=window[r],a=1e3/n,i=null,s=function e(t){window.requestAnimationFrame(e),i||(i=t);var n=t-i;n<=a||(i=t-n%a,o.readers.forEach((function(e){return e()})),o.writers.forEach((function(e){return e(t)})))};s(performance.now())}((function(){Dr.apps.forEach((function(e){return e._read()}))}),(function(e){Dr.apps.forEach((function(t){return t._write(e)}))}));var Cr=function t(){document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported:Sr,create:e.create,destroy:e.destroy,parse:e.parse,find:e.find,registerPlugin:e.registerPlugin,setOptions:e.setOptions}})),document.removeEventListener("DOMContentLoaded",t)};"loading"!==document.readyState?setTimeout((function(){return Cr()}),0):document.addEventListener("DOMContentLoaded",Cr);var Pr=function(){return a(Se(),(function(t,n){e.OptionTypes[t]=n[1]}))};e.FileOrigin=Object.assign({},it),e.FileStatus=Object.assign({},ot),e.OptionTypes={},Pr(),e.create=function(){var t=pr.apply(void 0,arguments);return t.on("destroy",e.destroy),Dr.apps.push(t),mr(t)},e.destroy=function(e){var t=Dr.apps.findIndex((function(t){return t.isAttachedTo(e)}));return t>=0&&(Dr.apps.splice(t,1)[0].restoreElement(),!0)},e.parse=function(t){return[].concat(u(t.querySelectorAll(".filepond"))).filter((function(e){return!Dr.apps.find((function(t){return t.isAttachedTo(e)}))})).map((function(t){return e.create(t)}))},e.find=function(e){var t=Dr.apps.find((function(t){return t.isAttachedTo(e)}));return t?mr(t):null},e.registerPlugin=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach(Tr),Pr()},e.getOptions=function(){var e={};return a(Se(),(function(t,n){e[t]=n[0]})),e},e.setOptions=function(t){return X(t)&&(Dr.apps.forEach((function(e){e.setOptions(t)})),function(e){a(e,(function(e,t){De[e]&&(De[e][0]=ee(t,De[e][0],De[e][1]))}))}(t)),e.getOptions()}}e.supported=Sr,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(0))&&r.__esModule?r:{default:r};function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 l(e,t){return!t||"object"!==a(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 c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var d=function(e){function t(){return i(this,t),l(this,c(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&&u(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e="div",t=Object.assign({},this.props);return this.props.wrapperComponent&&(e=this.props.wrapperComponent.type,delete(t=Object.assign(t,this.props.wrapperComponent.props)).wrapperComponent),this.props.enabled&&(t.draggable="true",t.onDragEnd=this.onDragEnd.bind(this),t.onDragStart=this.onDragStart.bind(this)),delete t.enabled,o.default.createElement(e,t,t.children)}},{key:"onDragStart",value:function(e){"function"==typeof this.props.onDragStart&&this.props.onDragStart(e);var t=Object.assign({},this.props);this.props.wrapperComponent&&(t=Object.assign(t,this.props.wrapperComponent.props)),e.dataTransfer.setData(t.type,t.data)}},{key:"onDragEnd",value:function(e){"function"==typeof this.props.onDragEnd&&this.props.onDragEnd(e)}}])&&s(n.prototype,r),a&&s(n,a),t}(o.default.Component);t.default=d,d.defaultProps={enabled:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(0)),o=a(n(449));function a(e){return e&&e.__esModule?e:{default:e}}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return!t||"object"!==i(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 u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){return e.dataTransfer?e.dataTransfer.types:[]}var p=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=c(this,u(t).call(this,e))).state={over:!1},n.droppable=r.default.createRef(),n}var n,a,i;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&&d(e,t)}(t,e),n=t,(a=[{key:"render",value:function(){var e="div",t=Object.assign({},this.props);this.props.wrapperComponent&&(e=this.props.wrapperComponent.type,t=Object.assign(t,this.props.wrapperComponent.props));var n="Droppable";return t.className&&(n+=" ".concat(t.className)),this.state.over&&(n+=" over"),r.default.createElement(e,s({ref:this.droppable,className:n},function(e){var t=["types","className","enabled","wrapperComponent"];return Object.keys(e).reduce((function(n,r){return t.includes(r)||(n[r]=e[r]),n}),{})}(t),{onDrop:this.onDrop.bind(this),onDragOver:this.onDragOver.bind(this),onDragEnter:this.onDragEnter.bind(this),onDragLeave:this.onDragLeave.bind(this),onDragExit:this.onDragLeave.bind(this)}),t.children)}},{key:"onDragOver",value:function(e){e.preventDefault(),this.allowed(h(e))&&"function"==typeof this.props.onDragOver&&this.props.onDragOver(e)}},{key:"onDragEnter",value:function(e){e.preventDefault(),this.state.over||this.allowed(h(e))&&("function"==typeof this.props.onDragEnter&&this.props.onDragEnter(e),this.setState({over:!0}))}},{key:"onDragLeave",value:function(e){if(e.preventDefault(),this.allowed(h(e))){var t=!0;(e.clientX<=this.position.left||e.clientX>=this.position.right)&&(t=!1),(e.clientY<=this.position.top||e.clientY>=this.position.bottom)&&(t=!1),t||(this.setState({over:!1}),"function"==typeof this.props.onDragLeave&&this.props.onDragLeave(e))}}},{key:"onDrop",value:function(e){if(e.preventDefault(),this.allowed(h(e))){this.setState({over:!1});var t=Object.assign({},this.props);this.props.wrapperComponent&&(t=Object.assign(t,this.props.wrapperComponent.props));var n=t.types?[].concat(t.types).reduce((function(t,n){return t[n]=e.dataTransfer.getData(n),t}),{}):null;"function"==typeof this.props.onDrop&&this.props.onDrop(n,e)}}},{key:"allowed",value:function(e){var t=Object.assign({},this.props);if(this.props.wrapperComponent&&(t=Object.assign(t,this.props.wrapperComponent.props)),!t.enabled)return!1;var n=o.default.toArray(e);return!t.types||[].concat(t.types).reduce((function(e,t){return n.indexOf(t)>=0||e}),!1)}},{key:"componentDidMount",value:function(){var e=this.droppable.current;this.position={top:e.offsetTop+5,left:e.offsetLeft+5,right:e.offsetLeft+e.offsetWidth-5,bottom:e.offsetTop+e.offsetHeight-5}}}])&&l(n.prototype,a),i&&l(n,i),t}(r.default.Component);t.default=p,p.defaultProps={enabled:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={toArray:function(e){for(var t=[],n=e.length>>>0;n--;)t[n]=e[n];return t}};t.default=r},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw a}}return n}}},function(e,t,n){var r=n(453);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(40),i=n.n(a),s=n(12),l=n.n(s),c=n(13),u=n.n(c),d=n(14),h=n.n(d),p=n(15),f=n.n(p),m=n(6),g=n.n(m),_=n(4),v=n.n(_),b=n(8),y=n.n(b),w=n(10),k=n.n(w),x=n(1),M=n.n(x),E=o.a.createContext(),T=n(9),S=n.n(T),D=n(11);function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(){return(P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function O(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 N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t){return!t||"object"!=typeof 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 R(e){return function(){return e}}var Y=function(){};Y.thatReturns=R,Y.thatReturnsFalse=R(!1),Y.thatReturnsTrue=R(!0),Y.thatReturnsNull=R(null),Y.thatReturnsThis=function(){return this},Y.thatReturnsArgument=function(e){return e};var j=Y;var F=function(e,t,n,r,o,a,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}},H=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;function U(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(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;var V="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";var W=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){e.exports=function(){function e(e,t,n,r,o,a){a!==V&&F(!1,"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")}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,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=j,n.PropTypes=n,n}()})),q={HIDE:"__react_tooltip_hide_event",REBUILD:"__react_tooltip_rebuild_event",SHOW:"__react_tooltip_show_event"},G=function(e,t){var n;"function"==typeof window.CustomEvent?n=new window.CustomEvent(e,{detail:t}):((n=document.createEvent("Event")).initEvent(e,!1,!0),n.detail=t),window.dispatchEvent(n)};var J=function(e,t){var n=this.state.show,r=this.props.id,o=this.isCapture(t.currentTarget),a=t.currentTarget.getAttribute("currentItem");o||t.stopPropagation(),n&&"true"===a?e||this.hideTooltip(t):(t.currentTarget.setAttribute("currentItem","true"),K(t.currentTarget,this.getTargetArray(r)),this.showTooltip(t))},K=function(e,t){for(var n=0;n<t.length;n++)e!==t[n]?t[n].setAttribute("currentItem","false"):t[n].setAttribute("currentItem","true")},Q={id:"9b69f92e-d3fe-498b-b1b4-c5e63a51b0cf",set:function(e,t,n){this.id in e?e[this.id][t]=n:Object.defineProperty(e,this.id,{configurable:!0,value:C({},t,n)})},get:function(e,t){var n=e[this.id];if(void 0!==n)return n[t]}};var X=function(e,t,n){var r=t.respectEffect,o=void 0!==r&&r,a=t.customEvent,i=void 0!==a&&a,s=this.props.id,l=n.target.getAttribute("data-tip")||null,c=n.target.getAttribute("data-for")||null,u=n.target;if(!this.isCustomEvent(u)||i){var d=null==s&&null==c||c===s;if(null!=l&&(!o||"float"===this.getEffect(u))&&d){var h=function(e){var t={};for(var n in e)"function"==typeof e[n]?t[n]=e[n].bind(e):t[n]=e[n];return t}(n);h.currentTarget=u,e(h)}}},$=function(e,t){var n={};return e.forEach((function(e){var r=e.getAttribute(t);r&&r.split(" ").forEach((function(e){return n[e]=!0}))})),n},Z=function(){return document.getElementsByTagName("body")[0]};function ee(e,t,n,r,o,a,i){for(var s=oe(n),l=s.width,c=s.height,u=oe(t),d=u.width,h=u.height,p=ae(e,t,a),f=p.mouseX,m=p.mouseY,g=ie(a,d,h,l,c),_=se(i),v=_.extraOffset_X,b=_.extraOffset_Y,y=window.innerWidth,w=window.innerHeight,k=le(n),x=k.parentTop,M=k.parentLeft,E=function(e){var t=g[e].l;return f+t+v},T=function(e){var t=g[e].t;return m+t+b},S=function(e){return function(e){var t=g[e].r;return f+t+v}(e)>y},D=function(e){return function(e){var t=g[e].b;return m+t+b}(e)>w},L=function(e){return function(e){return E(e)<0}(e)||S(e)||function(e){return T(e)<0}(e)||D(e)},C=function(e){return!L(e)},P=["top","bottom","left","right"],O=[],N=0;N<4;N++){var A=P[N];C(A)&&O.push(A)}var I,R=!1,Y=o!==r;return C(o)&&Y?(R=!0,I=o):O.length>0&&Y&&L(o)&&L(r)&&(R=!0,I=O[0]),R?{isNewState:!0,newState:{place:I}}:{isNewState:!1,position:{left:parseInt(E(r)-M,10),top:parseInt(T(r)-x,10)}}}var te,ne,re,oe=function(e){var t=e.getBoundingClientRect(),n=t.height,r=t.width;return{height:parseInt(n,10),width:parseInt(r,10)}},ae=function(e,t,n){var r=t.getBoundingClientRect(),o=r.top,a=r.left,i=oe(t),s=i.width,l=i.height;return"float"===n?{mouseX:e.clientX,mouseY:e.clientY}:{mouseX:a+s/2,mouseY:o+l/2}},ie=function(e,t,n,r,o){var a,i,s,l;return"float"===e?(a={l:-r/2,r:r/2,t:-(o+3+2),b:-3},s={l:-r/2,r:r/2,t:15,b:o+3+2+12},l={l:-(r+3+2),r:-3,t:-o/2,b:o/2},i={l:3,r:r+3+2,t:-o/2,b:o/2}):"solid"===e&&(a={l:-r/2,r:r/2,t:-(n/2+o+2),b:-n/2},s={l:-r/2,r:r/2,t:n/2,b:n/2+o+2},l={l:-(r+t/2+2),r:-t/2,t:-o/2,b:o/2},i={l:t/2,r:r+t/2+2,t:-o/2,b:o/2}),{top:a,bottom:s,left:l,right:i}},se=function(e){var t=0,n=0;for(var r in"[object String]"===Object.prototype.toString.apply(e)&&(e=JSON.parse(e.toString().replace(/\'/g,'"'))),e)"top"===r?n-=parseInt(e[r],10):"bottom"===r?n+=parseInt(e[r],10):"left"===r?t-=parseInt(e[r],10):"right"===r&&(t+=parseInt(e[r],10));return{extraOffset_X:t,extraOffset_Y:n}},le=function(e){for(var t=e;t&&"none"===window.getComputedStyle(t).getPropertyValue("transform");)t=t.parentElement;return{parentTop:t&&t.getBoundingClientRect().top||0,parentLeft:t&&t.getBoundingClientRect().left||0}};function ce(e,t,n,r){if(t)return t;if(null!=n)return n;if(null===n)return null;var a=/<br\s*\/?>/;return r&&"false"!==r&&a.test(e)?e.split(a).map((function(e,t){return o.a.createElement("span",{key:t,className:"multi-line"},e)})):e}function ue(e){var t={};return Object.keys(e).filter((function(e){return/(^aria-\w+$|^role$)/.test(e)})).forEach((function(n){t[n]=e[n]})),t}!function(e){if(e&&"undefined"!=typeof window){var t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t)}}('.__react_component_tooltip {\n border-radius: 3px;\n display: inline-block;\n font-size: 13px;\n left: -999em;\n opacity: 0;\n padding: 8px 21px;\n position: fixed;\n pointer-events: none;\n transition: opacity 0.3s ease-out;\n top: -999em;\n visibility: hidden;\n z-index: 999;\n}\n.__react_component_tooltip.allow_hover, .__react_component_tooltip.allow_click {\n pointer-events: auto;\n}\n.__react_component_tooltip:before, .__react_component_tooltip:after {\n content: "";\n width: 0;\n height: 0;\n position: absolute;\n}\n.__react_component_tooltip.show {\n opacity: 0.9;\n margin-top: 0px;\n margin-left: 0px;\n visibility: visible;\n}\n.__react_component_tooltip.type-dark {\n color: #fff;\n background-color: #222;\n}\n.__react_component_tooltip.type-dark.place-top:after {\n border-top-color: #222;\n border-top-style: solid;\n border-top-width: 6px;\n}\n.__react_component_tooltip.type-dark.place-bottom:after {\n border-bottom-color: #222;\n border-bottom-style: solid;\n border-bottom-width: 6px;\n}\n.__react_component_tooltip.type-dark.place-left:after {\n border-left-color: #222;\n border-left-style: solid;\n border-left-width: 6px;\n}\n.__react_component_tooltip.type-dark.place-right:after {\n border-right-color: #222;\n border-right-style: solid;\n border-right-width: 6px;\n}\n.__react_component_tooltip.type-dark.border {\n border: 1px solid #fff;\n}\n.__react_component_tooltip.type-dark.border.place-top:before {\n border-top: 8px solid #fff;\n}\n.__react_component_tooltip.type-dark.border.place-bottom:before {\n border-bottom: 8px solid #fff;\n}\n.__react_component_tooltip.type-dark.border.place-left:before {\n border-left: 8px solid #fff;\n}\n.__react_component_tooltip.type-dark.border.place-right:before {\n border-right: 8px solid #fff;\n}\n.__react_component_tooltip.type-success {\n color: #fff;\n background-color: #8DC572;\n}\n.__react_component_tooltip.type-success.place-top:after {\n border-top-color: #8DC572;\n border-top-style: solid;\n border-top-width: 6px;\n}\n.__react_component_tooltip.type-success.place-bottom:after {\n border-bottom-color: #8DC572;\n border-bottom-style: solid;\n border-bottom-width: 6px;\n}\n.__react_component_tooltip.type-success.place-left:after {\n border-left-color: #8DC572;\n border-left-style: solid;\n border-left-width: 6px;\n}\n.__react_component_tooltip.type-success.place-right:after {\n border-right-color: #8DC572;\n border-right-style: solid;\n border-right-width: 6px;\n}\n.__react_component_tooltip.type-success.border {\n border: 1px solid #fff;\n}\n.__react_component_tooltip.type-success.border.place-top:before {\n border-top: 8px solid #fff;\n}\n.__react_component_tooltip.type-success.border.place-bottom:before {\n border-bottom: 8px solid #fff;\n}\n.__react_component_tooltip.type-success.border.place-left:before {\n border-left: 8px solid #fff;\n}\n.__react_component_tooltip.type-success.border.place-right:before {\n border-right: 8px solid #fff;\n}\n.__react_component_tooltip.type-warning {\n color: #fff;\n background-color: #F0AD4E;\n}\n.__react_component_tooltip.type-warning.place-top:after {\n border-top-color: #F0AD4E;\n border-top-style: solid;\n border-top-width: 6px;\n}\n.__react_component_tooltip.type-warning.place-bottom:after {\n border-bottom-color: #F0AD4E;\n border-bottom-style: solid;\n border-bottom-width: 6px;\n}\n.__react_component_tooltip.type-warning.place-left:after {\n border-left-color: #F0AD4E;\n border-left-style: solid;\n border-left-width: 6px;\n}\n.__react_component_tooltip.type-warning.place-right:after {\n border-right-color: #F0AD4E;\n border-right-style: solid;\n border-right-width: 6px;\n}\n.__react_component_tooltip.type-warning.border {\n border: 1px solid #fff;\n}\n.__react_component_tooltip.type-warning.border.place-top:before {\n border-top: 8px solid #fff;\n}\n.__react_component_tooltip.type-warning.border.place-bottom:before {\n border-bottom: 8px solid #fff;\n}\n.__react_component_tooltip.type-warning.border.place-left:before {\n border-left: 8px solid #fff;\n}\n.__react_component_tooltip.type-warning.border.place-right:before {\n border-right: 8px solid #fff;\n}\n.__react_component_tooltip.type-error {\n color: #fff;\n background-color: #BE6464;\n}\n.__react_component_tooltip.type-error.place-top:after {\n border-top-color: #BE6464;\n border-top-style: solid;\n border-top-width: 6px;\n}\n.__react_component_tooltip.type-error.place-bottom:after {\n border-bottom-color: #BE6464;\n border-bottom-style: solid;\n border-bottom-width: 6px;\n}\n.__react_component_tooltip.type-error.place-left:after {\n border-left-color: #BE6464;\n border-left-style: solid;\n border-left-width: 6px;\n}\n.__react_component_tooltip.type-error.place-right:after {\n border-right-color: #BE6464;\n border-right-style: solid;\n border-right-width: 6px;\n}\n.__react_component_tooltip.type-error.border {\n border: 1px solid #fff;\n}\n.__react_component_tooltip.type-error.border.place-top:before {\n border-top: 8px solid #fff;\n}\n.__react_component_tooltip.type-error.border.place-bottom:before {\n border-bottom: 8px solid #fff;\n}\n.__react_component_tooltip.type-error.border.place-left:before {\n border-left: 8px solid #fff;\n}\n.__react_component_tooltip.type-error.border.place-right:before {\n border-right: 8px solid #fff;\n}\n.__react_component_tooltip.type-info {\n color: #fff;\n background-color: #337AB7;\n}\n.__react_component_tooltip.type-info.place-top:after {\n border-top-color: #337AB7;\n border-top-style: solid;\n border-top-width: 6px;\n}\n.__react_component_tooltip.type-info.place-bottom:after {\n border-bottom-color: #337AB7;\n border-bottom-style: solid;\n border-bottom-width: 6px;\n}\n.__react_component_tooltip.type-info.place-left:after {\n border-left-color: #337AB7;\n border-left-style: solid;\n border-left-width: 6px;\n}\n.__react_component_tooltip.type-info.place-right:after {\n border-right-color: #337AB7;\n border-right-style: solid;\n border-right-width: 6px;\n}\n.__react_component_tooltip.type-info.border {\n border: 1px solid #fff;\n}\n.__react_component_tooltip.type-info.border.place-top:before {\n border-top: 8px solid #fff;\n}\n.__react_component_tooltip.type-info.border.place-bottom:before {\n border-bottom: 8px solid #fff;\n}\n.__react_component_tooltip.type-info.border.place-left:before {\n border-left: 8px solid #fff;\n}\n.__react_component_tooltip.type-info.border.place-right:before {\n border-right: 8px solid #fff;\n}\n.__react_component_tooltip.type-light {\n color: #222;\n background-color: #fff;\n}\n.__react_component_tooltip.type-light.place-top:after {\n border-top-color: #fff;\n border-top-style: solid;\n border-top-width: 6px;\n}\n.__react_component_tooltip.type-light.place-bottom:after {\n border-bottom-color: #fff;\n border-bottom-style: solid;\n border-bottom-width: 6px;\n}\n.__react_component_tooltip.type-light.place-left:after {\n border-left-color: #fff;\n border-left-style: solid;\n border-left-width: 6px;\n}\n.__react_component_tooltip.type-light.place-right:after {\n border-right-color: #fff;\n border-right-style: solid;\n border-right-width: 6px;\n}\n.__react_component_tooltip.type-light.border {\n border: 1px solid #222;\n}\n.__react_component_tooltip.type-light.border.place-top:before {\n border-top: 8px solid #222;\n}\n.__react_component_tooltip.type-light.border.place-bottom:before {\n border-bottom: 8px solid #222;\n}\n.__react_component_tooltip.type-light.border.place-left:before {\n border-left: 8px solid #222;\n}\n.__react_component_tooltip.type-light.border.place-right:before {\n border-right: 8px solid #222;\n}\n.__react_component_tooltip.place-top {\n margin-top: -10px;\n}\n.__react_component_tooltip.place-top:before {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n bottom: -8px;\n left: 50%;\n margin-left: -10px;\n}\n.__react_component_tooltip.place-top:after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n bottom: -6px;\n left: 50%;\n margin-left: -8px;\n}\n.__react_component_tooltip.place-bottom {\n margin-top: 10px;\n}\n.__react_component_tooltip.place-bottom:before {\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n top: -8px;\n left: 50%;\n margin-left: -10px;\n}\n.__react_component_tooltip.place-bottom:after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n top: -6px;\n left: 50%;\n margin-left: -8px;\n}\n.__react_component_tooltip.place-left {\n margin-left: -10px;\n}\n.__react_component_tooltip.place-left:before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n right: -8px;\n top: 50%;\n margin-top: -5px;\n}\n.__react_component_tooltip.place-left:after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n right: -6px;\n top: 50%;\n margin-top: -4px;\n}\n.__react_component_tooltip.place-right {\n margin-left: 10px;\n}\n.__react_component_tooltip.place-right:before {\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n left: -8px;\n top: 50%;\n margin-top: -5px;\n}\n.__react_component_tooltip.place-right:after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n left: -6px;\n top: 50%;\n margin-top: -4px;\n}\n.__react_component_tooltip .multi-line {\n display: block;\n padding: 2px 0px;\n text-align: center;\n}');var de,he=function(e){e.hide=function(e){G(q.HIDE,{target:e})},e.rebuild=function(){G(q.REBUILD)},e.show=function(e){G(q.SHOW,{target:e})},e.prototype.globalRebuild=function(){this.mount&&(this.unbindListener(),this.bindListener())},e.prototype.globalShow=function(e){if(this.mount){var t={currentTarget:e.detail.target};this.showTooltip(t,!0)}},e.prototype.globalHide=function(e){if(this.mount){var t=!!(e&&e.detail&&e.detail.target);this.hideTooltip({currentTarget:t&&e.detail.target},t)}}}(te=function(e){e.prototype.bindWindowEvents=function(e){window.removeEventListener(q.HIDE,this.globalHide),window.addEventListener(q.HIDE,this.globalHide,!1),window.removeEventListener(q.REBUILD,this.globalRebuild),window.addEventListener(q.REBUILD,this.globalRebuild,!1),window.removeEventListener(q.SHOW,this.globalShow),window.addEventListener(q.SHOW,this.globalShow,!1),e&&(window.removeEventListener("resize",this.onWindowResize),window.addEventListener("resize",this.onWindowResize,!1))},e.prototype.unbindWindowEvents=function(){window.removeEventListener(q.HIDE,this.globalHide),window.removeEventListener(q.REBUILD,this.globalRebuild),window.removeEventListener(q.SHOW,this.globalShow),window.removeEventListener("resize",this.onWindowResize)},e.prototype.onWindowResize=function(){this.mount&&this.hideTooltip()}}(te=function(e){e.prototype.isCustomEvent=function(e){return this.state.event||!!e.getAttribute("data-event")},e.prototype.customBindListener=function(e){var t=this,n=this.state,r=n.event,o=n.eventOff,a=e.getAttribute("data-event")||r,i=e.getAttribute("data-event-off")||o;a.split(" ").forEach((function(n){e.removeEventListener(n,Q.get(e,n));var r=J.bind(t,i);Q.set(e,n,r),e.addEventListener(n,r,!1)})),i&&i.split(" ").forEach((function(n){e.removeEventListener(n,t.hideTooltip),e.addEventListener(n,t.hideTooltip,!1)}))},e.prototype.customUnbindListener=function(e){var t=this.state,n=t.event,r=t.eventOff,o=n||e.getAttribute("data-event"),a=r||e.getAttribute("data-event-off");e.removeEventListener(o,Q.get(e,n)),a&&e.removeEventListener(a,this.hideTooltip)}}(te=function(e){e.prototype.isCapture=function(e){return e&&"true"===e.getAttribute("data-iscapture")||this.props.isCapture||!1}}(te=function(e){e.prototype.getEffect=function(e){return e.getAttribute("data-effect")||this.props.effect||"float"}}(te=function(e){e.prototype.isBodyMode=function(){return!!this.props.bodyMode},e.prototype.bindBodyListener=function(e){var t=this,n=this.state,r=n.event,o=n.eventOff,a=n.possibleCustomEvents,i=n.possibleCustomEventsOff,s=Z(),l=$(e,"data-event"),c=$(e,"data-event-off");null!=r&&(l[r]=!0),null!=o&&(c[o]=!0),a.split(" ").forEach((function(e){return l[e]=!0})),i.split(" ").forEach((function(e){return c[e]=!0})),this.unbindBodyListener(s);var u=this.bodyModeListeners={};for(var d in null==r&&(u.mouseover=X.bind(this,this.showTooltip,{}),u.mousemove=X.bind(this,this.updateTooltip,{respectEffect:!0}),u.mouseout=X.bind(this,this.hideTooltip,{})),l)u[d]=X.bind(this,(function(e){var n=e.currentTarget.getAttribute("data-event-off")||o;J.call(t,n,e)}),{customEvent:!0});for(var h in c)u[h]=X.bind(this,this.hideTooltip,{customEvent:!0});for(var p in u)s.addEventListener(p,u[p])},e.prototype.unbindBodyListener=function(e){e=e||Z();var t=this.bodyModeListeners;for(var n in t)e.removeEventListener(n,t[n])}}((re=ne=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=I(this,N(t).call(this,e))).state={place:e.place||"top",desiredPlace:e.place||"top",type:"dark",effect:"float",show:!1,border:!1,offset:{},extraClass:"",html:!1,delayHide:0,delayShow:0,event:e.event||null,eventOff:e.eventOff||null,currentEvent:null,currentTarget:null,ariaProps:ue(e),isEmptyTip:!1,disable:!1,possibleCustomEvents:e.possibleCustomEvents||"",possibleCustomEventsOff:e.possibleCustomEventsOff||"",originTooltip:null,isMultiline:!1},n.bind(["showTooltip","updateTooltip","hideTooltip","hideTooltipOnScroll","getTooltipContent","globalRebuild","globalShow","globalHide","onWindowResize","mouseOnToolTip"]),n.mount=!0,n.delayShowLoop=null,n.delayHideLoop=null,n.delayReshow=null,n.intervalUpdateContent=null,n}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&&A(e,t)}(t,e),n=t,a=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.ariaProps,r=ue(e);return Object.keys(r).some((function(e){return r[e]!==n[e]}))?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{ariaProps:r}):null}}],(r=[{key:"bind",value:function(e){var t=this;e.forEach((function(e){t[e]=t[e].bind(t)}))}},{key:"componentDidMount",value:function(){var e=this.props,t=(e.insecure,e.resizeHide);this.bindListener(),this.bindWindowEvents(t)}},{key:"componentWillUnmount",value:function(){this.mount=!1,this.clearTimer(),this.unbindListener(),this.removeScrollListener(),this.unbindWindowEvents()}},{key:"mouseOnToolTip",value:function(){return!(!this.state.show||!this.tooltipRef)&&(this.tooltipRef.matches||(this.tooltipRef.msMatchesSelector?this.tooltipRef.matches=this.tooltipRef.msMatchesSelector:this.tooltipRef.matches=this.tooltipRef.mozMatchesSelector),this.tooltipRef.matches(":hover"))}},{key:"getTargetArray",value:function(e){var t,n,r;if(e){var o=e.replace(/\\/g,"\\\\").replace(/"/g,'\\"');t=document.querySelectorAll('[data-tip][data-for="'.concat(o,'"]'))}else t=document.querySelectorAll("[data-tip]:not([data-for])");return r=(n=t).length,n.hasOwnProperty?Array.prototype.slice.call(n):new Array(r).fill().map((function(e){return n[e]}))}},{key:"bindListener",value:function(){var e=this,t=this.props,n=t.id,r=t.globalEventOff,o=t.isCapture,a=this.getTargetArray(n);a.forEach((function(t){null===t.getAttribute("currentItem")&&t.setAttribute("currentItem","false"),e.unbindBasicListener(t),e.isCustomEvent(t)&&e.customUnbindListener(t)})),this.isBodyMode()?this.bindBodyListener(a):a.forEach((function(t){var n=e.isCapture(t),r=e.getEffect(t);e.isCustomEvent(t)?e.customBindListener(t):(t.addEventListener("mouseenter",e.showTooltip,n),"float"===r&&t.addEventListener("mousemove",e.updateTooltip,n),t.addEventListener("mouseleave",e.hideTooltip,n))})),r&&(window.removeEventListener(r,this.hideTooltip),window.addEventListener(r,this.hideTooltip,o)),this.bindRemovalTracker()}},{key:"unbindListener",value:function(){var e=this,t=this.props,n=t.id,r=t.globalEventOff;this.isBodyMode()?this.unbindBodyListener():this.getTargetArray(n).forEach((function(t){e.unbindBasicListener(t),e.isCustomEvent(t)&&e.customUnbindListener(t)})),r&&window.removeEventListener(r,this.hideTooltip),this.unbindRemovalTracker()}},{key:"unbindBasicListener",value:function(e){var t=this.isCapture(e);e.removeEventListener("mouseenter",this.showTooltip,t),e.removeEventListener("mousemove",this.updateTooltip,t),e.removeEventListener("mouseleave",this.hideTooltip,t)}},{key:"getTooltipContent",value:function(){var e,t=this.props,n=t.getContent,r=t.children;return n&&(e=Array.isArray(n)?n[0]&&n[0](this.state.originTooltip):n(this.state.originTooltip)),ce(this.state.originTooltip,r,e,this.state.isMultiline)}},{key:"isEmptyTip",value:function(e){return"string"==typeof e&&""===e||null===e}},{key:"showTooltip",value:function(e,t){if(!t||this.getTargetArray(this.props.id).some((function(t){return t===e.currentTarget}))){var n=this.props,r=n.multiline,o=n.getContent,a=e.currentTarget.getAttribute("data-tip"),i=e.currentTarget.getAttribute("data-multiline")||r||!1,s=e instanceof window.FocusEvent||t,l=!0;e.currentTarget.getAttribute("data-scroll-hide")?l="true"===e.currentTarget.getAttribute("data-scroll-hide"):null!=this.props.scrollHide&&(l=this.props.scrollHide);var c=e.currentTarget.getAttribute("data-place")||this.props.place||"top",u=s?"solid":this.getEffect(e.currentTarget),d=e.currentTarget.getAttribute("data-offset")||this.props.offset||{},h=ee(e,e.currentTarget,this.tooltipRef,c,c,u,d);h.position&&this.props.overridePosition&&(h.position=this.props.overridePosition(h.position,e.currentTarget,this.tooltipRef,c,c,u,d));var p=h.isNewState?h.newState.place:c;this.clearTimer();var f=e.currentTarget,m=this.state.show?f.getAttribute("data-delay-update")||this.props.delayUpdate:0,g=this,_=function(){g.setState({originTooltip:a,isMultiline:i,desiredPlace:c,place:p,type:f.getAttribute("data-type")||g.props.type||"dark",effect:u,offset:d,html:f.getAttribute("data-html")?"true"===f.getAttribute("data-html"):g.props.html||!1,delayShow:f.getAttribute("data-delay-show")||g.props.delayShow||0,delayHide:f.getAttribute("data-delay-hide")||g.props.delayHide||0,delayUpdate:f.getAttribute("data-delay-update")||g.props.delayUpdate||0,border:f.getAttribute("data-border")?"true"===f.getAttribute("data-border"):g.props.border||!1,extraClass:f.getAttribute("data-class")||g.props.class||g.props.className||"",disable:f.getAttribute("data-tip-disable")?"true"===f.getAttribute("data-tip-disable"):g.props.disable||!1,currentTarget:f},(function(){l&&g.addScrollListener(g.state.currentTarget),g.updateTooltip(e),o&&Array.isArray(o)&&(g.intervalUpdateContent=setInterval((function(){if(g.mount){var e=g.props.getContent,t=ce(a,"",e[0](),i),n=g.isEmptyTip(t);g.setState({isEmptyTip:n}),g.updatePosition()}}),o[1]))}))};m?this.delayReshow=setTimeout(_,m):_()}}},{key:"updateTooltip",value:function(e){var t=this,n=this.state,r=n.delayShow,o=n.disable,a=this.props.afterShow,i=this.getTooltipContent(),s=parseInt(r,10),l=e.currentTarget||e.target;if(!this.mouseOnToolTip()&&!this.isEmptyTip(i)&&!o){var c=function(){if(Array.isArray(i)&&i.length>0||i){var n=!t.state.show;t.setState({currentEvent:e,currentTarget:l,show:!0},(function(){t.updatePosition(),n&&a&&a(e)}))}};clearTimeout(this.delayShowLoop),r?this.delayShowLoop=setTimeout(c,s):c()}}},{key:"listenForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.addEventListener("mouseleave",this.hideTooltip)}},{key:"removeListenerForTooltipExit",value:function(){this.state.show&&this.tooltipRef&&this.tooltipRef.removeEventListener("mouseleave",this.hideTooltip)}},{key:"hideTooltip",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{isScroll:!1},o=this.state.disable,a=r.isScroll,i=a?0:this.state.delayHide,s=this.props.afterHide,l=this.getTooltipContent();if(this.mount&&!this.isEmptyTip(l)&&!o){if(t){var c=this.getTargetArray(this.props.id),u=c.some((function(t){return t===e.currentTarget}));if(!u||!this.state.show)return}var d=function(){var t=n.state.show;n.mouseOnToolTip()?n.listenForTooltipExit():(n.removeListenerForTooltipExit(),n.setState({show:!1},(function(){n.removeScrollListener(),t&&s&&s(e)})))};this.clearTimer(),i?this.delayHideLoop=setTimeout(d,parseInt(i,10)):d()}}},{key:"hideTooltipOnScroll",value:function(e,t){this.hideTooltip(e,t,{isScroll:!0})}},{key:"addScrollListener",value:function(e){var t=this.isCapture(e);window.addEventListener("scroll",this.hideTooltipOnScroll,t)}},{key:"removeScrollListener",value:function(){window.removeEventListener("scroll",this.hideTooltipOnScroll)}},{key:"updatePosition",value:function(){var e=this,t=this.state,n=t.currentEvent,r=t.currentTarget,o=t.place,a=t.desiredPlace,i=t.effect,s=t.offset,l=this.tooltipRef,c=ee(n,r,l,o,a,i,s);if(c.position&&this.props.overridePosition&&(c.position=this.props.overridePosition(c.position,n,r,l,o,a,i,s)),c.isNewState)return this.setState(c.newState,(function(){e.updatePosition()}));l.style.left=c.position.left+"px",l.style.top=c.position.top+"px"}},{key:"clearTimer",value:function(){clearTimeout(this.delayShowLoop),clearTimeout(this.delayHideLoop),clearTimeout(this.delayReshow),clearInterval(this.intervalUpdateContent)}},{key:"render",value:function(){var e=this,n=this.state,r=n.extraClass,a=n.html,i=n.ariaProps,s=n.disable,l=this.getTooltipContent(),c=this.isEmptyTip(l),u="__react_component_tooltip"+(!this.state.show||s||c?"":" show")+(this.state.border?" border":"")+" place-".concat(this.state.place)+" type-".concat(this.state.type)+(this.props.delayUpdate?" allow_hover":"")+(this.props.clickable?" allow_click":""),d=this.props.wrapper;t.supportedWrappers.indexOf(d)<0&&(d=t.defaultProps.wrapper);var h=[u,r].filter(Boolean).join(" ");return a?o.a.createElement(d,P({className:h,id:this.props.id,ref:function(t){return e.tooltipRef=t}},i,{"data-id":"tooltip",dangerouslySetInnerHTML:{__html:l}})):o.a.createElement(d,P({className:h,id:this.props.id},i,{ref:function(t){return e.tooltipRef=t},"data-id":"tooltip"}),l)}}])&&L(n.prototype,r),a&&L(n,a),t}(o.a.Component),C(ne,"propTypes",{children:W.any,place:W.string,type:W.string,effect:W.string,offset:W.object,multiline:W.bool,border:W.bool,insecure:W.bool,class:W.string,className:W.string,id:W.string,html:W.bool,delayHide:W.number,delayUpdate:W.number,delayShow:W.number,event:W.string,eventOff:W.string,watchWindow:W.bool,isCapture:W.bool,globalEventOff:W.string,getContent:W.any,afterShow:W.func,afterHide:W.func,overridePosition:W.func,disable:W.bool,scrollHide:W.bool,resizeHide:W.bool,wrapper:W.string,bodyMode:W.bool,possibleCustomEvents:W.string,possibleCustomEventsOff:W.string,clickable:W.bool}),C(ne,"defaultProps",{insecure:!0,resizeHide:!0,wrapper:"div",clickable:!1}),C(ne,"supportedWrappers",["div","span"]),C(ne,"displayName","ReactTooltip"),(de=te=re).prototype.bindRemovalTracker=function(){var e=this,t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(null!=t){var n=new t((function(t){for(var n=0;n<t.length;n++)for(var r=t[n],o=0;o<r.removedNodes.length;o++)if(r.removedNodes[o]===e.state.currentTarget)return void e.hideTooltip()}));n.observe(window.document,{childList:!0,subtree:!0}),this.removalTracker=n}},te=void(de.prototype.unbindRemovalTracker=function(){this.removalTracker&&(this.removalTracker.disconnect(),this.removalTracker=null)})||te))||te)||te)||te)||te)||te)||te;function pe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var fe=function(e){h()(a,e);var t,n,r=pe(a);function a(e){var t;return l()(this,a),(t=r.call(this,e)).state={loading:!1,logs:[],downloadLogLink:""},t}return u()(a,[{key:"componentDidMount",value:function(){this.displayLogs(),this.context.setSelectedTabOnCookies("manager")}},{key:"displayLogs",value:(n=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","display_log"),this.setState({loading:!0}),e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:200==(n=e.sent).status&&(this.setState({loading:!1}),n.data.success&&this.setState({logs:n.data.info}));case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"downloadLog",value:(t=y()(v.a.mark((function e(t,n){var r,o;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new FormData).set("action","download_log"),r.set("filename",t),r.set("revision",n),e.next=6,S()({method:"post",url:ajaxurl,data:r,config:{headers:{"Content-Type":"multipart/form-data"}}});case 6:(o=e.sent).data.success?(this.setState({downloadLogLink:o.data.log_link}),document.getElementById("downloadFile").click()):D.toast.error("Log Doesn't Exists");case 8:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this,t={padding:"20px 0 10px 0"};return o.a.createElement("div",{className:"col-sm-8 col-md-9"},o.a.createElement("div",{className:"setting-tab-pane setting-tabpane5 active"},o.a.createElement("div",{className:"row justify-content-center"},o.a.createElement("div",{className:"col-md-12 mt20"},o.a.createElement("h1",{className:"main-heading"},"Log Info"),o.a.createElement("table",{className:"table log-manager"},o.a.createElement("thead",null,o.a.createElement("tr",null,o.a.createElement("th",null,this.context.language.FileName),o.a.createElement("th",null,this.context.language.Module),o.a.createElement("th",null,this.context.language.Inserted),o.a.createElement("th",null,this.context.language.Updated),o.a.createElement("th",null,this.context.language.Skipped),o.a.createElement("th",{className:"text-center"},this.context.language.Download))),o.a.createElement("tbody",null,this.state.loading?o.a.createElement("tr",null,o.a.createElement("td",{colspan:"6"},o.a.createElement("div",{className:"loader loader-1 mt15"}))):0!==this.state.logs.length?this.state.logs.map((function(n,r){return o.a.createElement("tr",{style:t},o.a.createElement("td",null,n.filename," ",o.a.createElement("br",null),o.a.createElement("b",null,e.context.language.Revision,": ")," ",n.revision),o.a.createElement("td",null,n.module),o.a.createElement("td",null,n.inserted),o.a.createElement("td",null,n.updated),o.a.createElement("td",null,n.skipped),o.a.createElement("td",{className:"text-center"},o.a.createElement("div",{className:"download-icon"},o.a.createElement("a",{className:"action-icon text-success text-bold",onClick:function(){e.downloadLog(n.filename,n.revision)},"data-tip":"Download"},o.a.createElement("i",{className:"csv-icon-download-cloud"}))),o.a.createElement(he,{effect:"solid"})))})):o.a.createElement("tr",null,o.a.createElement("td",{colspan:"6"},o.a.createElement("span",{className:"text-danger"},this.context.language.NoLogRecordFound))))),o.a.createElement("a",{id:"downloadFile",className:"hidden",href:this.state.downloadLogLink,download:!0},this.context.language.Download)))))}}]),a}(r.Component);M()(fe,"contextType",E);var me=fe;function ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var _e=function(e){h()(n,e);var t=ge(n);function n(e){var r;return l()(this,n),(r=t.call(this,e)).state={loading:!1},r}return u()(n,[{key:"render",value:function(){return o.a.createElement("div",{className:"col-md-9",style:{height:"300px"}},o.a.createElement("div",{className:"row justify-content-center h-100"},o.a.createElement("div",{className:"align-self-center upgrade-to-pro text-center"},o.a.createElement("img",{src:"".concat(window.wpr_object.imagePath,"upgrade-to-pro.png")}),o.a.createElement("p",null,"This feature is available in"," ",o.a.createElement("a",{target:"_blank",className:"csv-link",href:"https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=plugin&utm_campaign=csv_importer_free&utm_medium=wordpress"},"WP Ultimate CSV Importer"," ")," ","Premium Version"),o.a.createElement("a",{target:"_blank",href:"https://www.smackcoders.com/contact-us.html?utm_source=plugin&utm_campaign=csv_importer_free&utm_medium=wordpress",className:"smack-btn btn-default "},"Contact us for Presale Enquiry"))))}}]),n}(r.Component);function ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var be=function(e){h()(n,e);var t=ve(n);function n(e){var r;return l()(this,n),(r=t.call(this,e)).state={fileManagerTabActive:"",templatesTabActive:"",logManagerTabActive:"active",showTemplateEditMapping:!1},r}return u()(n,[{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("manager")}},{key:"showManagerOptions",value:function(){var e=this;return o.a.createElement("div",{className:"setting-tab-section col-sm-4 col-md-3"},o.a.createElement("ul",{className:"setting-tab"},o.a.createElement("li",{"data-setting":"setting-tabpane5",className:"setting-tab-list ".concat(this.state.logManagerTabActive),onClick:function(t){e.setState({logManagerTabActive:"active",fileManagerTabActive:"",smartScheduleTabActive:"",scheduledExportTabActive:"",templatesTabActive:"",mediaReportTabActive:""})}},o.a.createElement("i",{className:"csv-icon-layers","aria-hidden":"true"}),this.context.language.LogManager),o.a.createElement("li",{"data-setting":"setting-tabpane1",className:"setting-tab-list pro-tag ".concat(this.state.fileManagerTabActive),onClick:function(t){e.setState({fileManagerTabActive:"active",smartScheduleTabActive:"",scheduledExportTabActive:"",templatesTabActive:"",logManagerTabActive:"",mediaReportTabActive:""})}},o.a.createElement("i",{className:"csv-icon-hard-drive1","aria-hidden":"true"}),this.context.language.FileManager),o.a.createElement("li",{"data-setting":"setting-tabpane4",className:"setting-tab-list pro-tag ".concat(this.state.templatesTabActive),onClick:function(t){e.setState({templatesTabActive:"active",fileManagerTabActive:"",smartScheduleTabActive:"",scheduledExportTabActive:"",logManagerTabActive:"",mediaReportTabActive:""})}},o.a.createElement("i",{className:"csv-icon-layout","aria-hidden":"true"}),this.context.language.Templates)))}},{key:"render",value:function(){return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{id:"mapping-accordion",className:"container"},o.a.createElement("div",{className:"card csv-importer-panel mt20"},o.a.createElement("div",{className:"row"},this.showManagerOptions(),"active"===this.state.fileManagerTabActive||"active"===this.state.templatesTabActive?o.a.createElement(_e,null):"active"===this.state.logManagerTabActive?o.a.createElement(me,null):o.a.createElement("div",null,this.context.language.NotSelectedAnyTab)))))}}]),n}(r.Component);M()(be,"contextType",E);var ye=be;function we(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 ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){M()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var Me=function(e){h()(i,e);var t,n,r,a=xe(i);function i(e){var t;return l()(this,i),(t=a.call(this,e)).state={customPostType:[],taxonomies:[],moduleRecordCount:"0 Data",customPostOption:"",taxonomiesOption:""},t.moduleName="",t.getModuleData=t.getModuleData.bind(k()(t)),t}return u()(i,[{key:"componentDidMount",value:function(){this.context.activateExporter&&(this.getPostTypes(),this.getTaxonomies())}},{key:"getPostTypes",value:(r=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","get_post_types"),this.setState({loading:!0}),e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:200==(n=e.sent).status&&(this.setState({loading:!1}),this.setState({customPostType:n.data.custom_post_type}));case 7:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getTaxonomies",value:(n=y()(v.a.mark((function e(){var t,n;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","get_taxonomies"),this.setState({loading:!0}),e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:200==(n=e.sent).status&&(this.setState({loading:!1}),this.setState({taxonomies:n.data.taxonomies}));case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getModuleData",value:(t=y()(v.a.mark((function e(t){var n,r,o,a,i=arguments;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>1&&void 0!==i[1]&&i[1],r=t.target.id,n&&(r=t.target.name,t.target.id),"Taxonomies"!==r&&"CustomPosts"!==r||!n?this.context.setExportInfo(ke(ke({},this.context.exportInfo),{},{moduleName:r})):this.context.setExportInfo(ke(ke({},this.context.exportInfo),{},{optionalType:t.target.value,moduleName:r})),(o=new FormData).set("action","total_records"),o.set("module",r),"Taxonomies"!==r&&"CustomPosts"!==r||!n||o.set("optionalType",t.target.value),this.setState({loading:!0}),e.prev=9,e.next=12,S()({method:"post",url:ajaxurl,data:o,config:{headers:{"Content-Type":"multipart/form-data"}}});case 12:200===(a=e.sent).status&&(this.setState({loading:!1}),""!=r?this.setState({moduleRecordCount:a.data+" "+r}):this.setState({moduleRecordCount:a.data+" Data"}),a.data>0?document.getElementById("exportbtn").disabled=!1:document.getElementById("exportbtn").disabled=!0),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(9),console.log(e.t0);case 19:case"end":return e.stop()}}),e,this,[[9,16]])}))),function(e){return t.apply(this,arguments)})},{key:"getExportOption",value:function(){""!=this.context.exportInfo.exportModule?this.context.setShowExport("export-filter"):D.toast.error("Select any module to export")}},{key:"render",value:function(){var e=this;return o.a.createElement("div",{id:"mapping-accordion",className:"container"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col-md-9"},o.a.createElement("div",{className:"card csv-importer-panel mt20"},this.context.activateExporter?o.a.createElement("div",{className:"row export"},o.a.createElement("h1",{class:"main-heading pr15 pl15 col-md-12 mt20 mb30"},this.context.language.Selectyourmoduletoexportthedata," ",o.a.createElement("div",{className:"float-right"},this.state.loading?o.a.createElement("div",{className:"btn ajax-loader loading",style:{marginTop:"-5px",marginRight:"-25px"}}):""," ",o.a.createElement("span",{className:"exportData"},this.state.moduleRecordCount," Found"))),o.a.createElement("div",{className:"export-section col-md-6"},o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"Posts",onClick:this.getModuleData}),o.a.createElement("label",{for:"Posts"},"Posts")),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"Pages",onClick:this.getModuleData}),o.a.createElement("label",{for:"Pages"},"Pages")),o.a.createElement("div",{className:"form-group row ml0"},o.a.createElement("div",{className:"col-md-4 pl0"},o.a.createElement("input",{type:"radio",name:"export",id:"CustomPosts",onClick:this.getModuleData}),o.a.createElement("label",{for:"CustomPosts"},"Custom Posts")),o.a.createElement("div",{className:"col-md-8",style:{display:"CustomPosts"===this.context.exportInfo.moduleName?"block":"none"}},o.a.createElement("select",M()({className:"select form-control",id:"customPostOption",name:"CustomPosts",onChange:function(t){e.setState({customPostOption:t.target.value}),e.getModuleData(t,!0)}},"id",""),o.a.createElement("option",{value:""},"-select-"),this.state.customPostType.map((function(e,t){return o.a.createElement("option",{value:e},e)}))))),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"Tags",onClick:this.getModuleData}),o.a.createElement("label",{for:"Tags"},"Post Tags")),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"Categories",onClick:this.getModuleData}),o.a.createElement("label",{for:"Categories"},"Post Categories")),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"Users",onClick:this.getModuleData}),o.a.createElement("label",{for:"Users"},"Users")),o.a.createElement("div",{className:"form-group row ml0"},o.a.createElement("div",{className:"col-md-4 pl0",style:{opacity:.6}},o.a.createElement("input",{class:"form-check-input",type:"radio",name:"export",id:"Taxonomies",checked:"",onClick:function(){D.toast.info("Please Upgrade to PRO for this Feature")}}),o.a.createElement("label",{class:"form-check-label",for:"Taxonomies"},"Taxonomies")),o.a.createElement("div",{className:"col-md-8",style:{display:"Taxonomies"===this.context.exportInfo.moduleName?"block":"none"}},o.a.createElement("select",M()({className:"select form-control",id:"taxonomiesOption",name:"Taxonomies",checked:"",onChange:function(t){e.setState({taxonomiesOption:t.target.value}),e.getModuleData(t,!0)}},"id",""),o.a.createElement("option",{value:""},"-select-"),this.state.taxonomies.map((function(e,t){return o.a.createElement("option",{value:e},e)})))))),o.a.createElement("div",{className:"export-section offset-md-1 col-md-5"},o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"Comments",onClick:this.getModuleData}),o.a.createElement("label",{for:"Comments"},"Comments")),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"CustomerReviews",onClick:this.getModuleData}),o.a.createElement("label",{for:"CustomerReviews"},"Customer Reviews")),o.a.createElement("div",{className:"form-group"},o.a.createElement("input",{type:"radio",name:"export",id:"WooCommerce",onClick:this.getModuleData}),o.a.createElement("label",{for:"WooCommerce"},"WooCommerce Products")),o.a.createElement("div",{className:"form-group",style:{opacity:.6}},o.a.createElement("input",{class:"form-check-input",type:"radio",name:"export",id:"WooCommerceCoupons",checked:"",onClick:function(){D.toast.info("Please Upgrade to PRO for this Feature")}}),o.a.createElement("label",{class:"form-check-label",for:"WooCommerceCoupons"},"WooCommerce Coupons")),o.a.createElement("div",{className:"form-group",style:{opacity:.6}},o.a.createElement("input",{class:"form-check-input",type:"radio",name:"export",id:"WooCommerceRefunds",checked:"",onClick:function(){D.toast.info("Please Upgrade to PRO for this Feature")}}),o.a.createElement("label",{class:"form-check-label",for:"WooCommerceRefunds"},"WooCommerce Refunds")),o.a.createElement("div",{className:"form-group",style:{opacity:.6}},o.a.createElement("input",{class:"form-check-input",type:"radio",name:"export",id:"WooCommerceVariations",checked:"",onClick:function(){D.toast.info("Please Upgrade to PRO for this Feature")}}),o.a.createElement("label",{class:"form-check-label",for:"WooCommerceVariations"},"WooCommerce Variations"))),o.a.createElement("div",{className:"col-md-12 mt45"},o.a.createElement("div",{className:"float-right"},o.a.createElement("input",{type:"button",className:"smack-btn smack-btn-primary mb20",id:"exportbtn",onClick:function(t){e.getExportOption()},value:this.context.language.Continue})))):o.a.createElement("div",{className:"d-flex justify-content-center align-items-center",style:{minHeight:"300px"}},o.a.createElement("div",{className:"text-center"},o.a.createElement("h5",{style:{color:"#2D3748"},className:"col-md-8 offset-md-2 mb30"},"Please install the Ultimate Exporter to export all your WordPress data as CSV."),o.a.createElement("a",{href:"https://wordpress.org/plugins/wp-ultimate-exporter/",className:"smack-btn smack-btn-secondary",target:"_blank"},"Click here to install"))))),o.a.createElement("div",{className:"col-md-3"},o.a.createElement("div",{className:"cardbanner m110 border-rad mt20"},o.a.createElement("div",{className:"mt0 mb10 mr10 ml10"},o.a.createElement("h2",{className:"title"},"Ultimate Exporter Pro"),o.a.createElement("hr",{className:"divider"}),o.a.createElement("b",{className:"title"}," Export filtered data "),o.a.createElement("ul",null,o.a.createElement("li",{className:"ml30"},"Lets you get only required data with the different advanced filters")),o.a.createElement("b",{className:"title"},"Backup in editable format"),o.a.createElement("div",null,o.a.createElement("ul",null,o.a.createElement("li",{className:"ml30"},"Backup in 4 different file formats like CSV, XML, JSON, XLS."))),o.a.createElement("b",{className:"title"},"Auto Scheduled Backups"),o.a.createElement("div",null,o.a.createElement("ul",null,o.a.createElement("li",{className:"ml30"},"Scheduled export helps backup as editable text file format in regular interval."))),o.a.createElement("a",{className:"basic-button border-rad",href:"https://www.smackcoders.com/ultimate-exporter.html?utm_source=plugin&utm_campaign=promo_widget&utm_medium=exporter",target:"blank"},"BUY NOW!"))))))}}]),i}(r.Component);M()(Me,"contextType",E);var Ee=n(41),Te=n.n(Ee);n(229);function Se(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 De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){M()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g()(e);if(t){var o=g()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var Ce=n(3),Pe=function(e){h()(a,e);var t,n,r=Le(a);function a(e){var t;return l()(this,a),(t=r.call(this,e)).state={loading:!1,exportName:"",exportType:"csv",authorList:[],startDate:new Date,endDate:new Date,conditions:{specific_period:{is_check:!1},specific_authors:{is_check:!1,author:""}},enableSchedule:!1,offset:0,exportProgress:"0",totalExportRecord:0,stopWatch:"00:00:00",activeDowloadTab:!1,exportSuccess:!1,showDownloadBtn:!1,exportedFileUrl:""},t.stopSeconds=0,t.stopMinutes=0,t.stopHours=0,t.handleChangeStart=t.handleChangeStart.bind(k()(t)),t.handleChangeEnd=t.handleChangeEnd.bind(k()(t)),t.onInputChange=t.onInputChange.bind(k()(t)),t}return u()(a,[{key:"onInputChange",value:function(e){this.setState(M()({},e.target.name,e.target.value),(function(){}))}},{key:"handleChangeStart",value:function(e){this.setState({startDate:e})}},{key:"handleChangeEnd",value:function(e){this.setState({endDate:e})}},{key:"componentDidMount",value:function(){this.getAuthors(),setInterval(function(){!this.state.exportSuccess&&this.state.activeDowloadTab&&this.stopWatch()}.bind(this),1e3)}},{key:"getAuthors",value:(n=y()(v.a.mark((function e(){var t,n,r,o,a;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","get_authors"),this.setState({loading:!0}),e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:if(n=e.sent,this.setState({loading:!1}),200==n.status){for(r=n.data.user_id.length,o=[],a=0;a<r;a++)o.push({user_id:n.data.user_id[a],user_name:n.data.user_name[a]});this.setState({authorList:o})}case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"handleCheck",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";t&&(this.state.conditions[e.target.name].is_check=e.target.checked,this.setState({conditions:this.state.conditions},(function(){}))),t||n||this.setState(M()({},e.target.name,e.target.checked)),n&&(e.target.checked?this.state.eventExclusion.exclusion_headers.header[r]=!0:delete this.state.eventExclusion.exclusion_headers.header[r],this.setState(De(De({},this.state.eventExclusion),{},{eventExclusion:this.state.eventExclusion}),(function(){})))}},{key:"handleChange",value:function(e){var t=e.target.id;"specific_authors"===t&&(this.state.conditions.specific_authors.author=e.target.value),"specific_status"===t&&(this.state.conditions.specific_status.status=e.target.value),"delimiter"===t&&(this.state.conditions.delimiter.delimiter=e.target.value),"other_delimiter"===t&&(this.state.conditions.delimiter.optional_delimiter=e.target.value),this.setState(De(De({},this.state.conditions),{},{conditions:this.state.conditions}),(function(){}))}},{key:"stopWatch",value:function(){this.stopSeconds++,this.stopSeconds>=60&&(this.stopSeconds=0,this.stopMinutes++,this.stopMinutes>=60&&(this.stopMinutes=0,this.stopHours++)),this.stopHours.toString().length<2&&(this.stopHours="0"+this.stopHours),this.stopMinutes.toString().length<2&&(this.stopMinutes="0"+this.stopMinutes),this.stopSeconds.toString().length<2&&(this.stopSeconds="0"+this.stopSeconds);var e=this.stopHours+":"+this.stopMinutes+":"+this.stopSeconds;this.setState({stopWatch:e})}},{key:"exportConfiguration",value:(t=y()(v.a.mark((function e(){var t,n,r,o,a,i,s,l;return v.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((t=this.state.conditions).specific_period.from=Ce(this.state.startDate).format("YYYY-MM-DD"),t.specific_period.to=Ce(this.state.endDate).format("YYYY-MM-DD"),""!=document.getElementById("export-file-name").value){e.next=7;break}return D.toast.error("Please Type Export File Name"),document.getElementById("export-file-name").focus(),e.abrupt("return");case 7:return this.setState({activeDowloadTab:!0}),(n=new FormData).set("action","parse_data"),n.set("module",this.context.exportInfo.moduleName),"Taxonomies"!==(r=this.context.exportInfo.moduleName)&&"CustomPosts"!==r||n.set("optionalType",this.context.exportInfo.optionalType),n.set("fileName",this.state.exportName),n.set("exp_type",this.state.exportType),n.set("conditions",JSON.stringify(t)),n.set("export_mode","normal"),n.set("offset",this.state.offset),this.setState({loading:!0}),e.next=21,S()({method:"post",url:ajaxurl,data:n,config:{headers:{"Content-Type":"multipart/form-data"}}});case 21:o=e.sent,a=o.data,200==o.status&&(i=o.data.new_offset,(s=o.data.total_row_count)<i?this.setState({offset:s}):this.setState({offset:o.data.new_offset}),this.setState({exportSuccess:o.data.success,totalExportRecord:a.total_row_count}),l=a.new_offset/a.total_row_count*100,(l=Math.round(l))>.9&&this.setState({exportProgress:l}),l>=100&&this.setState({exportProgress:"100"}),o.data.success?this.setState({exportedFileUrl:o.data.exported_file,showDownloadBtn:!0}):this.exportConfiguration());case 24:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this,t=this.state,n=(t.showSplitRecord,t.conditions),r=t.exportName,a=(t.exportType,t.authorList),i={width:this.state.exportProgress+"%"},s={display:this.state.showDownloadBtn?"block":"none"},l={opacity:.6};return o.a.createElement("div",{id:"mapping-accordion",className:"container"},o.a.createElement("div",{className:"card csv-importer-panel mt20 pt30 pb30 ".concat(this.state.activeDowloadTab?"d-none":"d-block")},o.a.createElement("div",{className:"row export"},o.a.createElement("h1",{className:"main-heading pr15 pl15 mb20 mt20 col-md-12"},this.context.language.Toexportdatabasedonthefilters),o.a.createElement("div",{className:"col-md-12"},o.a.createElement("div",{className:"form-group col-md-5 row export_file_name"},o.a.createElement("label",null,this.context.language.ExportFileName),o.a.createElement("input",{type:"text",className:"form-control",id:"export-file-name",value:r,onChange:function(t){e.setState({exportName:t.target.value})}}),o.a.createElement("span",{className:"export_file_type"},".",this.state.exportType)),o.a.createElement("hr",null),o.a.createElement("h3",{className:"main-heading"},this.context.language.AdvancedFilters),o.a.createElement("div",{className:"advanced-filter"},o.a.createElement("div",{className:"checkbox"},o.a.createElement("input",{type:"checkbox",className:"",name:"specific_period",id:"export_specific_period",onClick:function(t){e.handleCheck(t,!0)}}),o.a.createElement("label",{for:"export_specific_period"},this.context.language.Exportdataforthespecificperiod)),o.a.createElement("div",{className:"row bg-gray-section pl15 pr15 mt15",style:{display:n.specific_period.is_check?"block":"none"}},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"form-group col-md-5"},o.a.createElement("label",{for:""},this.context.language.StartFrom),o.a.createElement(Te.a,{className:"form-control",selected:this.state.startDate,onChange:this.handleChangeStart}),o.a.createElement("i",{className:"csv-icon-calendar2 input-icon"})),o.a.createElement("div",{className:"form-group col-md-5"},o.a.createElement("label",{for:""},this.context.language.EndTo," "),o.a.createElement(Te.a,{className:"form-control",selected:this.state.endDate,onChange:this.handleChangeEnd}),o.a.createElement("i",{className:"csv-icon-calendar2 input-icon"}))))),o.a.createElement("div",{className:"advanced-filter"},o.a.createElement("div",{className:"checkbox"},o.a.createElement("input",{type:"checkbox",className:"",name:"specific_authors",id:"export_specific_author",onClick:function(t){e.handleCheck(t,!0)}}),o.a.createElement("label",{for:"export_specific
|