Version Description
Download this release
Release Info
Developer | smackcoders |
Plugin | Ultimate CSV Importer |
Version | 6.4 |
Comparing to | |
See all releases |
Code changes from version 6.3 to 6.4
- Readme.txt +8 -2
- assets/js/admin-v6.1.js +1 -1
Readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: smackcoders, smacksupport
|
3 |
Requires at least: 5.0
|
4 |
Tested up to: 5.8.2
|
5 |
-
Stable tag: 6.
|
6 |
-
Version: 6.
|
7 |
Requires PHP: 5.2.4
|
8 |
Author: smackcoders
|
9 |
Author URI: https://profiles.wordpress.org/smackcoders/
|
@@ -172,6 +172,10 @@ WordPress Ultimate CSV Importer can be installed by normal way, FTP users can in
|
|
172 |
For more details about plugin documentation, [check out here](https://www.smackcoders.com/documentation/ultimate-csv-importer-pro/how-to-import-csv).
|
173 |
|
174 |
== Changelog ==
|
|
|
|
|
|
|
|
|
175 |
= 6.3 =
|
176 |
* Checked: Compatibility for WordPress 5.8.2
|
177 |
* Updated: Thirdparty CSS and JS libraries
|
@@ -689,6 +693,8 @@ For more details about plugin documentation, [check out here](https://www.smackc
|
|
689 |
* Initial release version. Tested and found works well without any issues.
|
690 |
|
691 |
== Upgrade Notice ==
|
|
|
|
|
692 |
= 6.3 =
|
693 |
* Added: Upgrade now for latest updates.
|
694 |
= 6.2.9 =
|
2 |
Contributors: smackcoders, smacksupport
|
3 |
Requires at least: 5.0
|
4 |
Tested up to: 5.8.2
|
5 |
+
Stable tag: 6.4
|
6 |
+
Version: 6.4
|
7 |
Requires PHP: 5.2.4
|
8 |
Author: smackcoders
|
9 |
Author URI: https://profiles.wordpress.org/smackcoders/
|
172 |
For more details about plugin documentation, [check out here](https://www.smackcoders.com/documentation/ultimate-csv-importer-pro/how-to-import-csv).
|
173 |
|
174 |
== Changelog ==
|
175 |
+
|
176 |
+
= 6.4 =
|
177 |
+
* Added: Import support for latest LearnPress-LMS plugin-V4.1.4.1:Courses,Lessons,Quizzes,Orders and Questions.
|
178 |
+
|
179 |
= 6.3 =
|
180 |
* Checked: Compatibility for WordPress 5.8.2
|
181 |
* Updated: Thirdparty CSS and JS libraries
|
693 |
* Initial release version. Tested and found works well without any issues.
|
694 |
|
695 |
== Upgrade Notice ==
|
696 |
+
= 6.4 =
|
697 |
+
* Added: Upgrade now for latest updates.
|
698 |
= 6.3 =
|
699 |
* Added: Upgrade now for latest updates.
|
700 |
= 6.2.9 =
|
assets/js/admin-v6.1.js
CHANGED
@@ -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,V=S,U=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=V,B.canvas=U,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 Ve(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 Ue(e,t,n){var r=n/2,o=Ve(e,r),a=Ve(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,Ue(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 Vt=B.valueOrDefault;function Ut(){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=Vt(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]=Ut(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=Vt(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=Vt(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=Ut,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 Vn(e){return B.isNumber(e)?e:0}var Un=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=Vn(o),a=Vn(a),i=Vn(i),s=Vn(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;Un._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:Un,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(4)}catch(e){}}())},function(e,t,n){var r=n(67);e.exports=function(e,t){return r(e,t)}},function(e,t,n){var r=n(242),o=n(247),a=n(388),i=n(392),s=n(410),l=n(25),c=n(249),u=n(251),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(45),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(45);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(45);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(45);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(44);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(44),o=n(68),a=n(70);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(244),o=n(368),a=n(69),i=n(246),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(46),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(369),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(372),o=n(44),a=n(68);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(373),o=n(374),a=n(375),i=n(376),s=n(377);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(47);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(47),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(47),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(47);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(48);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(48);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(48);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(48);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(70),o=n(384),a=n(385);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(46),o=n(389),a=n(243),i=n(247),s=n(390),l=n(391),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(393),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(394),o=n(396),a=n(71);e.exports=function(e){return r(e,a,o)}},function(e,t,n){var r=n(395),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(397),o=n(398),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(400),o=n(248),a=n(25),i=n(249),s=n(250),l=n(251),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(36),o=n(37);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(36),o=n(72),a=n(37),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(245),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(63)(e))},function(e,t,n){var r=n(407),o=n(408),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(409)(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(411),o=n(68),a=n(412),i=n(413),s=n(414),l=n(36),c=n(246),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(416),o=n(418)((function(e,t,n){r(e,n,t)}));e.exports=o},function(e,t,n){var r=n(417);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(419),o=n(420),a=n(426),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(421);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(422),o=n(425)(r);e.exports=o},function(e,t,n){var r=n(423),o=n(71);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(424)();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(252);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(427),o=n(430),a=n(441),i=n(25),s=n(442);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(428),o=n(429),a=n(254);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(242),o=n(67);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(253),o=n(71);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(67),o=n(431),a=n(438),i=n(73),s=n(253),l=n(254),c=n(49);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(255);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(433),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(434);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(70);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(436);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(46),o=n(437),a=n(25),i=n(74),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(439),o=n(440);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(256),o=n(248),a=n(25),i=n(250),s=n(72),l=n(49);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(443),o=n(444),a=n(73),i=n(49);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(255);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},V=function(){w.forEach((function(e){return e.destroy()})),N.forEach((function(e){e({root:J,props:t})})),b.forEach((function(e){return e._destroy()}))},U={element:{get:I},style:{get:H},childViews:{get:R}},W=Object.assign({},U,{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:V},G=Object.assign({},U,{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},V=function(e){return"string"==typeof e},U=function(e){return w(e)?e:V(e)?H(e).replace(/[a-z]+/gi,""):0},W=function(e){return parseInt(U(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(V(t))return o.url=t,o;if(Object.assign(o,t),V(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)&&V(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(U(e))},bytes:G,string:function(e){return J(e)?e:H(e)},serverapi:function(e){return(n={}).url=V(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,V(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},Ve=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)},Ue=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=Ue(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(Ve(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||!V(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||!V(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)):V(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:V(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?V(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&&V(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")},Vt={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}},Ut={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:Ut,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:Ut},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(Vt,(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=[],Vn=function(e){vn(e.clipboardData).then((function(e){e.length&&Bn.forEach((function(t){return t(e)}))}))},Un=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",Vn),zn=!1)},onload:function(){}};return function(e){Bn.includes(e)||(Bn.push(e),zn||(zn=!0,document.addEventListener("paste",Vn)))}(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=Un(),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(V(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:V,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(448));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},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(s)throw o}}return a}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(452);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}},e.exports.default=e.exports,e.exports.__esModule=!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},e.exports.default=e.exports,e.exports.__esModule=!0},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.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(38),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(9),v=n.n(_),b=n(7),y=n.n(b),w=n(1),k=n.n(w),x=n(3),M=n.n(x),E=o.a.createContext(),T=n(10),S=n.n(T),D=n(8);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 V(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 U="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!==U&&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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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=v()(M.a.mark((function e(){var t,n;return M.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=v()(M.a.mark((function e(t,n){var r,o;return M.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",style:{borderBottomColor:"white"}},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);k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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);k()(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){k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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(y()(t)),t}return u()(i,[{key:"componentDidMount",value:function(){this.context.activateExporter&&(this.getPostTypes(),this.getTaxonomies())}},{key:"getPostTypes",value:(r=v()(M.a.mark((function e(){var t,n;return M.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=v()(M.a.mark((function e(){var t,n;return M.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=v()(M.a.mark((function e(t){var n,r,o,a,i=arguments;return M.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-6 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-6",style:{display:"CustomPosts"===this.context.exportInfo.moduleName?"block":"none"}},o.a.createElement("select",k()({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",k()({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",null,"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",null,"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",null,"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);k()(Me,"contextType",E);var Ee=n(39),Te=n.n(Ee);n(232);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){k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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(4),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(y()(t)),t.handleChangeEnd=t.handleChangeEnd.bind(y()(t)),t.onInputChange=t.onInputChange.bind(y()(t)),t}return u()(a,[{key:"onInputChange",value:function(e){this.setState(k()({},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=v()(M.a.mark((function e(){var t,n,r,o,a;return M.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(k()({},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=v()(M.a.mark((function e(){var t,n,r,o,a,i,s,l;return M.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",style:{marginLeft:"10px"},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 d-flex col-md-12 mt30 clearfix"},o.a.createElement("div",{className:"float-left col-md-6"},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 col-md-6"},o.a.createElement("button",{type:"button",style:{marginLeft:"79%"},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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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)}}k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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)}}k()(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=v()(M.a.mark((function e(){var t,n;return M.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=v()(M.a.mark((function e(t,n){var r,o;return M.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);k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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=v()(M.a.mark((function e(){var t,n;return M.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=v()(M.a.mark((function e(t){var n,r;return M.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=v()(M.a.mark((function e(){var t,n;return M.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("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);k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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",style:{width:"100%",height:"325px"},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://www.smackcoders.com/?utm_source=plugin&utm_campaign=csv_importer_pro&utm_medium=wordpress",target:"_blank"},this.context.language.DevelopmentNews," ")),o.a.createElement("li",null,o.a.createElement("a",{href:"https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=plugin&utm_campaign=csv_importer_pro&utm_medium=wordpress",target:"_blank"},this.context.language.WhatsNew," ")),o.a.createElement("li",null,o.a.createElement("a",{href:"https://www.smackcoders.com/documentation/ultimate-csv-importer-pro/how-to-import-csv?utm_source=plugin&utm_campaign=csv_importer_pro&utm_medium=wordpress",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://www.smackcoders.com/products.html?utm_source=plugin&utm_campaign=csv_importer_pro&utm_medium=wordpress",target:"_blank"},this.context.language.OtherWordPressPlugins," ")))))))}}]),n}(r.Component);k()(ze,"contextType",E);var Be=ze;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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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 Ue=function(e){h()(n,e);var t=Ve(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);k()(Ue,"contextType",E);var We=Ue,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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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")}},{key:"updateStorageSetting",value:(t=v()(M.a.mark((function e(){var t;return M.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}),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 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)}}),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){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){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){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)}}),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){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){e.context.setExistingBucket(t)}},o.a.createElement("i",{className:"list-icon"})," ",t," ")}))))))))))}}]),r}(r.Component);k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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=v()(M.a.mark((function e(){var t,n;return M.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:200==(n=e.sent).status&&(this.context.setEndPoint(n.data.origin),this.context.setEdgePoint(n.data.edge),this.setState({createBucketsection:!0}),D.toast.success("Bucket selected"));case 8: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){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})}}),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){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){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);k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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=v()(M.a.mark((function e(){var t,n;return M.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:200==(n=e.sent).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=12;break;case 9:e.prev=9,e.t0=e.catch(2),console.log(e.t0);case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return n.apply(this,arguments)})},{key:"getServiceProvider",value:(t=v()(M.a.mark((function e(){var t,n;return M.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:200==(n=e.sent).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=17;break;case 14:e.prev=14,e.t0=e.catch(7),e.t0&&(this.setState({loading:!1}),D.toast.error("Please check your credentials"));case 17:case"end":return e.stop()}}),e,this,[[7,14]])}))),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)}}),"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){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){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);k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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:"bug_reporting",message:"",newsletterEmail:"",errors:""},t.supportEmail="",t}return u()(a,[{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("support")}},{key:"submitContactForm",value:(n=v()(M.a.mark((function e(t){var n;return M.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=v()(M.a.mark((function e(){var t,n;return M.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}),e.handleValidation(e.state.supportEmail)?e.setState({errors:""}):e.setState({errors:"Email is not Valid"})}}),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.state.supportEmail?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"),""===e.state.supportEmail&&D.toast.info("Please provide Email"))},className:"smack-btn smack-btn-primary",value:this.context.language.Send,style:{marginTop:"4%"}}))))),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);k()(rt,"contextType",E);var ot=rt,at=n(85);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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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=v()(M.a.mark((function e(){var t,n,r,o,a,i,s,l,c,u,d,h,p;return M.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=v()(M.a.mark((function e(){var t,n,r,o,a,i,s,l,c;return M.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);k()(st,"contextType",E);var lt=st,ct=n(26),ut=function(e,t){var n=new FormData;for(var r in e)n.append(r,e[r]);return t&&n.set("action",t),n},dt=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},ht={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"},rank_math_fields:{languageName:"RankMathFields",name:"Rank Math Fields",resultKey:"RANKMATH"},rank_math_pro_fields:{languageName:"RankMathProFields",name:"Rank Math Pro Fields",resultKey:"RANKMATH"},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_attr_fields:{languageName:"ProductAttrFields",name:"WooCommerce Product Attribute Fields",resultKey:"ATTRMETA"},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"},Polylang_settings_fields:{languageName:"polylangfields",name:"Polylang Settings Fields",resultKey:"POLYLANG"}},pt=function(e){return ht[e]},ft=function(e,t){if(e&&t)for(var n=0;n<e.length;n++)if(e[n]===t)return!0;return!1};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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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 gt=function(e){h()(i,e);var t,n,r,a=mt(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)),k()(y()(e),"state",{loading:!1,checkSimilarity:!0,customFields:[],mediaZipFileNames:[],mediaUploadData:{zipFileName:"",data:[]},updateFieldsList:[],enableSchedule:!1,showOnSchedule:"none",hiddenOnSchedule:"block",displayDuplicate:!1,updateField:""}),k()(y()(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")})),k()(y()(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=pt(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=pt(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=pt(e).resultKey;return!(!this.context.mappingResult[r]||!this.context.mappingResult[r][t]||ft(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=pt(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,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=v()(M.a.mark((function e(t,n){var r,o;return M.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=v()(M.a.mark((function e(){var t,n,r,o,a;return M.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=v()(M.a.mark((function e(){var t,n,r;return M.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),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 24:e.prev=24,e.t0=e.catch(6);case 26:case"end":return e.stop()}}),e,this,[[6,24]])}))),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(!pt(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[pt(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:pt(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[pt(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&&"Customer Reviews"!==this.context.csvInfo.selectedtype&&"Images"!==this.context.csvInfo.selectedtype&&"eShop Products"!==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("div",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",null,this.context.language.Action))),o.a.createElement("tbody",null,this.state.customFields.map((function(t,n){return o.a.createElement("tr",null,o.a.createElement("td",null,o.a.createElement("label",{class:"wpfields"},o.a.createElement("input",{type:"text",value:t.label,class:"form-control",onChange:function(t){e.onCustomFieldLabelChange(t.target.value,n)}})),o.a.createElement("label",{class:"sub-text"},"[Name: ".concat(t.name,"]")," ")),o.a.createElement("td",{style:{verticalAlign:"top"}},o.a.createElement("select",{className:"select form-control w-75",onChange:function(t){e.onCustomFieldValueSelect(t.target.value,n)}},o.a.createElement("optgroup",{label:"CSV Fields"},o.a.createElement("option",null,"--select--"),e.context.csvFields.map((function(e){return o.a.createElement("option",null,e)})),o.a.createElement("option",null,"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:"custom-field-creator-".concat(n,"-csv-icon-plus"),className:"csv-icon-plus-square",onClick:function(){e.sumIconOnClick("custom-field-creator",n)}}),o.a.createElement("div",{id:"custom-field-creator-".concat(n,"-static-manipulative-screen"),className:"manipulation-screen"},o.a.createElement("span",{className:"close",onClick:function(){e.sumIconOnClick("custom-field-creator",n)}},"×"),o.a.createElement("div",{className:"clearfix"}),o.a.createElement("div",{className:"form-group"},o.a.createElement("textarea",{onChange:function(t){e.onCustomFieldValueChange(t.target.value,n)},value:e.getFieldValueFromCustomFields(n),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:"custom-field-creator-".concat(n,"-csv-icon-sum"),className:"csv-icon-sum",onClick:function(){e.formulaIconOnClick("custom-field-creator",n)}}),o.a.createElement("div",{id:"custom-field-creator-".concat(n,"-manipulative-screen"),className:"manipulation-screen"},o.a.createElement("span",{className:"close",onClick:function(){e.formulaIconOnClick("custom-field-creator",n)}},"×"),o.a.createElement("div",{className:"clearfix"}),o.a.createElement("div",{className:"form-group"},o.a.createElement("textarea",{onChange:function(t){e.onCustomFieldValueChange(t.target.value,n)},value:e.getFieldValueFromCustomFields(n),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("a",{class:"action-icon","data-toggle":"tooltip",onClick:function(t){e.deleteCustomField(n)},title:"Delete"},o.a.createElement("i",{class:"csv-icon-trash-2"}))))})))),o.a.createElement("div",{class:"float-right mb20"},o.a.createElement("a",{class:"smack-btn smack-btn-secondary",onClick:function(t){e.addCustomField()}},"Add Custom Field"))))):void 0,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",style:{marginTop:"-5%"}},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 _t(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 vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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)}}k()(gt,"contextType",E);var yt=function(e){h()(r,e);var t,n=bt(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)),k()(y()(e),"state",{loading:!1,onChangeSelectStatus:!1}),e}return u()(r,[{key:"componentDidMount",value:function(){this.context.setCSVInfo(vt(vt({},this.context.csvInfo),{},{replaceExistingItem:"Insert"}))}},{key:"sendConfiguration",value:(t=v()(M.a.mark((function e(){var t,n,r;return M.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=dt(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(vt(vt({},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 wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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)}}k()(yt,"contextType",E);var kt=function(e){h()(a,e);var t,n,r=wt(a);function a(e){var t;return l()(this,a),t=r.call(this,e),k()(y()(t),"pauseBulkImport",v()(M.a.mark((function e(){var n,r;return M.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)})))),k()(y()(t),"resumeBulkImport",v()(M.a.mark((function e(){var n,r,o;return M.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(y()(t))(t.context.csvInfo.hashKey,o,r.data.page_number,t.context.bulkImportData.totalPages,t.context.bulkImportData.Check),t.timer=setInterval(t.stopWatch.bind(y()(t)),1e3));case 8:case"end":return e.stop()}}),e)})))),k()(y()(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(y()(t))(t.context.csvInfo.hashKey,e,1,t.context.bulkImportData.totalPages,t.context.bulkImportData.Check),t.timer=setInterval(t.stopWatch.bind(y()(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=v()(M.a.mark((function e(t,n,r,o,a){var i,s,l,c,u,d,h;return M.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=v()(M.a.mark((function e(){var t,n,r;return M.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",style:{marginLeft:"43%"},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",style:{marginLeft:"40%"},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",style:{marginLeft:"43%"},onClick:this.pauseBulkImport}):o.a.createElement("input",{type:"button",className:"smack-btn smack-btn-primary",value:"Resume",style:{marginLeft:"43%"},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-end"},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-end"},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-end"},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",style:{width:"25%"}},o.a.createElement("div",{className:"mt0 mr0 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",{style:{listStyle:"disc"}}," Update older posts from single import"),o.a.createElement("li",{style:{listStyle:"disc"}}," Auto Schedule with reusable templates"),o.a.createElement("li",{style:{listStyle:"disc"}}," Advanced Custom Field/Post Plugins Importer"),o.a.createElement("li",{style:{listStyle:"disc"}}," Import/Update any Toolset Types, ACF pro / Free and Pods fields"),o.a.createElement("li",{style:{listStyle:"disc"}}," AIO WooCommerce Importer"),o.a.createElement("li",{style:{listStyle:"disc"}}," WPML Importer"),o.a.createElement("li",{style:{listStyle:"disc"}}," SEO Plugins Data Importer"),o.a.createElement("li",{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,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 Mt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Et(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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)}}k()(kt,"contextType",E);var Tt=function(e){h()(r,e);var t,n=Et(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)),k()(y()(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(Mt(Mt({},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(Mt(Mt({},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=v()(M.a.mark((function e(){var t,n,o;return M.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(Mt(Mt({},this.context.csvInfo),{},(o={hashKey:n.data.hashkey,templateName:r.filePondResponse.filename.slice(0,-4),selectedtype:n.data.selectedtype},k()(o,"templateName","From-url"),k()(o,"postTypes",n.data.posttype),k()(o,"fileName",n.data.filename),k()(o,"fileType",n.data.file_type),k()(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 St(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 Dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?St(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):St(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Lt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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)}}k()(Tt,"contextType",E);var Ct=function(e){h()(r,e);var t,n=Lt(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)),k()(y()(e),"state",{loading:!1,zipCsvFileName:[],zipCsvUrls:[],zipSelectedFileUrl:""}),e}return u()(r,[{key:"sendFileUrl",value:(t=v()(M.a.mark((function e(){var t,n,r;return M.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!=this.context.selectedFileUrl){e.next=3;break}return D.toast.error("Please update URL to process"),e.abrupt("return");case 3:return(t=new FormData).set("action","get_csv_url"),t.set("url",this.context.selectedFileUrl),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:if(n=e.sent,this.setState({loading:!1}),!n||!n.data){e.next=28;break}if(200!=n.status||!n.data.success){e.next=27;break}if(document.getElementById("desk-csv-close").click(),"csv"!==n.data.file_type&&"xml"!==n.data.file_type){e.next=20;break}return this.context.setCSVInfo(Dt(Dt({},this.context.csvInfo),{},{hashKey:n.data.hashkey,selectedtype:n.data.selectedtype,connectionType:"url",postTypes:n.data.posttype,taxonomys:n.data.taxonomy,templateName:n.data.filename.slice(0,-4),fileName:n.data.filename,fileType:n.data.file_type})),"xml"===n.data.file_type?this.context.setIsXML(!0):this.context.setIsXML(!1),this.context.setShowComponent("csv-info"),e.abrupt("return");case 20:if("zip"!==n.data.file_type){e.next=25;break}for(r=0;r<n.data.info.length;r++)this.state.zipCsvFileName.push(n.data.info[r].name),this.state.zipCsvUrls.push(n.data.info[r].path);return this.context.setCSVInfo(Dt(Dt({},this.context.csvInfo),{},{connectionType:"url"})),this.setState({zipCsvFileName:this.state.zipCsvFileName,zipCsvUrls:this.state.zipCsvUrls},(function(){document.getElementById("desk-csv-open").click()})),e.abrupt("return");case 25:e.next=28;break;case 27:D.toast.error(n.data.message);case 28:e.next=33;break;case 30:e.prev=30,e.t0=e.catch(7),console.log(e.t0);case 33:case"end":return e.stop()}}),e,this,[[7,30]])}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){var e=this;return o.a.createElement("div",{className:"col-md-9"},o.a.createElement("div",{className:"tab-content",id:"v-pills-tabContent"},o.a.createElement("div",{className:"tab-pane fade show active",id:"v-pills-messages",role:"tabpanel","aria-labelledby":"v-pills-messages-tab"},o.a.createElement("div",{className:"row mt30"},o.a.createElement("div",{className:"form-group col-md-12",style:{marginTop:"65px"}},o.a.createElement("label",{for:"file-path"},this.context.language.FilePath),o.a.createElement("input",{type:"text",className:"form-control",onChange:function(t){e.context.setSelectedFileUrl(t.target.value)},id:"file-path",placeholder:""}),o.a.createElement("small",{className:"form-text text-muted"},"http://example.com/sample.csv (or) https://goo.gl/SX2tNf (or) http://bit.ly/2hXvlAQ"))),o.a.createElement("div",{class:"float-right mt50"},this.state.loading?this.context.loaderText:o.a.createElement("input",{type:"button",className:"smack-btn smack-btn-primary mb20",onClick:this.sendFileUrl.bind(this),value:"Continue"})))),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-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 Pt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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)}}k()(Ct,"contextType",E);var Ot=function(e){h()(a,e);var t,n,r=Pt(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)),k()(y()(e),"state",{loading:!1,data:{},check:!0}),e}return u()(a,[{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("import-update"),this.getFtpDetails(),this.context.setUploadFtpData(JSON.parse(localStorage.getItem("SavedData"))||{HostName:"",HostPort:"",HostUserName:"",HostPassword:"",HostPath:"",action:""})}},{key:"onInputChange",value:function(e,t){this.context.uploadFtpData[e]=t,this.context.setUploadFtpData(this.context.uploadFtpData),localStorage.setItem("SavedData",JSON.stringify(this.context.uploadFtpData))}},{key:"getFtpDetails",value:(n=v()(M.a.mark((function e(){var t;return M.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).set("action","get_ftp_details"),e.prev=2,e.next=5,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 5:e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),console.log(e.t0);case 11:case"end":return e.stop()}}),e,null,[[2,8]])}))),function(){return n.apply(this,arguments)})},{key:"onContinue",value:(t=v()(M.a.mark((function e(){var t,n,r;return M.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="","get_ftp_url"===this.context.uploadFtpData.action?t="ftp":"get_sftp_url"===this.context.uploadFtpData.action?t="sftp":"get_ftps_url"===this.context.uploadFtpData.action&&(t="ftps"),n={method:t,data:this.context.uploadFtpData},this.context.setImportScheduleData(n),this.setState({loading:!0}),e.prev=5,e.next=8,S()({method:"post",url:ajaxurl,data:ut(this.context.uploadFtpData),config:{headers:{"Content-Type":"multipart/form-data"}}});case 8:if(r=e.sent,this.setState({loading:!1}),!r||!r.data){e.next=20;break}if(200!=r.status||!r.data.success){e.next=19;break}if("csv"!==r.data.file_type&&"xml"!==r.data.file_type){e.next=17;break}return this.context.setCSVInfo(k()({hashKey:r.data.hashkey,templateName:r.data.filename.slice(0,-4),selectedtype:r.data.selectedtype,connectionType:"ftp",fileType:r.data.file_type,postTypes:r.data.posttype,taxonomys:r.data.taxonomy,fileName:r.data.filename,fileSize:r.data.file_size},"fileType",r.data.file_type)),"xml"===r.data.file_type?this.context.setIsXML(!0):this.context.setIsXML(!1),this.context.setShowComponent("csv-info"),e.abrupt("return");case 17:e.next=20;break;case 19:r.data.message?D.toast.error(r.data.message):D.toast.error("Please Check Credentials");case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(5),console.log("request failed",e.t0);case 25:case"end":return e.stop()}}),e,this,[[5,22]])}))),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:"col-md-9"},o.a.createElement("div",{className:"tab-content",id:"v-pills-tabContent"},o.a.createElement("div",{className:"tab-pane fade show active",id:"v-pills-profile",role:"tabpanel","aria-labelledby":"v-pills-profile-tab"},o.a.createElement("div",{className:"row mt30"},o.a.createElement("div",{className:"form-group col-md-6"},o.a.createElement("label",{for:"hostname"},this.context.language.Hostname),o.a.createElement("input",{type:"text",className:"form-control",onChange:function(t){e.onInputChange("HostName",t.target.value)},id:"hostname",placeholder:"",value:this.context.uploadFtpData.HostName}),o.a.createElement("small",{className:"form-text text-muted"},"smackcoders.com or 54.213.74.129")),o.a.createElement("div",{className:"form-group col-md-6"},o.a.createElement("label",{for:"host-port"},this.context.language.HostPort),o.a.createElement("input",{type:"text",className:"form-control",onChange:function(t){e.onInputChange("HostPort",t.target.value)},id:"host-port",placeholder:"",value:this.context.uploadFtpData.HostPort}),o.a.createElement("small",{className:"form-text text-muted"},this.context.language.DefaultPort," : 21")),o.a.createElement("div",{className:"form-group col-md-6"},o.a.createElement("label",{for:"host-username"},this.context.language.HostUsername),o.a.createElement("input",{type:"text",className:"form-control",onChange:function(t){e.onInputChange("HostUserName",t.target.value)},id:"host-username",placeholder:"",value:this.context.uploadFtpData.HostUserName}),o.a.createElement("small",{className:"form-text text-muted"},this.context.language.FTPUsername)),o.a.createElement("div",{className:"form-group col-md-6"},o.a.createElement("label",{for:"host-password"},this.context.language.HostPassword),o.a.createElement("input",{type:"text",className:"form-control",onChange:function(t){e.onInputChange("HostPassword",t.target.value)},id:"host-password",placeholder:"",value:this.context.uploadFtpData.HostPassword}),o.a.createElement("small",{className:"form-text text-muted"},this.context.language.FTPPassword)),o.a.createElement("div",{className:"form-group col-md-12"},o.a.createElement("label",{for:"host-path"},this.context.language.HostPath),o.a.createElement("input",{type:"text",className:"form-control",onChange:function(t){e.onInputChange("HostPath",t.target.value)},id:"host-path",placeholder:"",value:this.context.uploadFtpData.HostPath}),o.a.createElement("small",{className:"form-text text-muted"},"/home/guest/sample.csv")),o.a.createElement("div",{className:"col-md-12"},o.a.createElement("label",{className:"d-block"},this.context.language.ConnectionType),o.a.createElement("div",{className:"form-check form-check-inline"},o.a.createElement("input",{className:"connection-input",onClick:function(){e.onInputChange("action","get_ftp_url")},type:"radio",name:"connection-type",id:"ftp",value:"checkedValue",checked:"get_ftp_url"===this.context.uploadFtpData.action})," ",o.a.createElement("label",{for:"ftp",className:"form-check-label"},"FTP")),o.a.createElement("div",{className:"form-check form-check-inline",style:{opacity:.6}},o.a.createElement("input",{className:"connection-input",type:"radio",onClick:function(){D.toast.info("Please Upgrade to PRO for this Feature")},name:"connection-type",id:"ftps",value:"checkedValue",checked:"get_ftps_url"===this.context.uploadFtpData.action})," ",o.a.createElement("label",{for:"ftps",className:"form-check-label"},"FTPS (SSL)")),o.a.createElement("div",{className:"form-check form-check-inline",style:{opacity:.6}},o.a.createElement("input",{className:"connection-input",type:"radio",onClick:function(){D.toast.info("Please Upgrade to PRO for this Feature")},name:"connection-type",id:"sftp",value:"checkedValue",checked:"get_sftp_url"===this.context.uploadFtpData.action})," ",o.a.createElement("label",{for:"sftp",className:"form-check-label"},"SSH2 / SFTP")),o.a.createElement(Nt,null),o.a.createElement(he,{effect:"solid"}))),o.a.createElement("div",{className:"float-right"},this.state.loading?this.context.loaderText:o.a.createElement("input",{type:"button",class:"smack-btn smack-btn-primary mb20",onClick:this.onContinue.bind(this),value:this.context.language.Continue}))))))}}]),a}(r.Component);k()(Ot,"contextType",E);var Nt=function(e){var t=e.size,n=void 0===t?16:t,r=e.color,a=void 0===r?"#000000":r;return o.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml10","data-tip":"we can't provide support for sftp server issues",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:a,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},o.a.createElement("circle",{cx:"12",cy:"12",r:"10"}),o.a.createElement("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),o.a.createElement("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"}))};function At(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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 It=function(e){h()(a,e);var t,n,r=At(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)),k()(y()(e),"state",{loading:!1,checkSimilarity:!0,customFields:[],mediaZipFileNames:[],mediaUploadData:{zipFileName:"",data:[]}}),k()(y()(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")})),k()(y()(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=pt(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=pt(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=pt(e).resultKey;return!(!this.context.mappingResult[r]||!this.context.mappingResult[r][t]||ft(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=pt(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,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=v()(M.a.mark((function e(t,n){var r,o;return M.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=v()(M.a.mark((function e(){var t,n,r,o,a;return M.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(!pt(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[pt(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:pt(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[pt(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&&"Customer Reviews"!==this.context.csvInfo.selectedtype&&"Images"!==this.context.csvInfo.selectedtype&&"eShop Products"!==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("div",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",null,this.context.language.Action))),o.a.createElement("tbody",null,this.state.customFields.map((function(t,n){return o.a.createElement("tr",null,o.a.createElement("td",null,o.a.createElement("label",{class:"wpfields"},o.a.createElement("input",{type:"text",value:t.label,class:"form-control",onChange:function(t){e.onCustomFieldLabelChange(t.target.value,n)}})),o.a.createElement("label",{class:"sub-text"},"[Name: ".concat(t.name,"]")," ")),o.a.createElement("td",{style:{verticalAlign:"top"}},o.a.createElement("select",{className:"select form-control w-75",onChange:function(t){e.onCustomFieldValueSelect(t.target.value,n)}},o.a.createElement("optgroup",{label:"CSV Fields"},o.a.createElement("option",null,"--select--"),e.context.csvFields.map((function(e){return o.a.createElement("option",null,e)})),o.a.createElement("option",null,"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:"custom-field-creator-".concat(n,"-csv-icon-plus"),className:"csv-icon-plus-square",onClick:function(){e.sumIconOnClick("custom-field-creator",n)}}),o.a.createElement("div",{id:"custom-field-creator-".concat(n,"-static-manipulative-screen"),className:"manipulation-screen"},o.a.createElement("span",{className:"close",onClick:function(){e.sumIconOnClick("custom-field-creator",n)}},"×"),o.a.createElement("div",{className:"clearfix"}),o.a.createElement("div",{className:"form-group"},o.a.createElement("textarea",{onChange:function(t){e.onCustomFieldValueChange(t.target.value,n)},value:e.getFieldValueFromCustomFields(n),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:"custom-field-creator-".concat(n,"-csv-icon-sum"),className:"csv-icon-sum",onClick:function(){e.formulaIconOnClick("custom-field-creator",n)}}),o.a.createElement("div",{id:"custom-field-creator-".concat(n,"-manipulative-screen"),className:"manipulation-screen"},o.a.createElement("span",{className:"close",onClick:function(){e.formulaIconOnClick("custom-field-creator",n)}},"×"),o.a.createElement("div",{className:"clearfix"}),o.a.createElement("div",{className:"form-group"},o.a.createElement("textarea",{onChange:function(t){e.onCustomFieldValueChange(t.target.value,n)},value:e.getFieldValueFromCustomFields(n),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("a",{class:"action-icon","data-toggle":"tooltip",onClick:function(t){e.deleteCustomField(n)},title:"Delete"},o.a.createElement("i",{class:"csv-icon-trash-2"}))))})))),o.a.createElement("div",{class:"float-right mb20"},o.a.createElement("a",{class:"smack-btn smack-btn-secondary",onClick:function(t){e.addCustomField()}},"Add Custom Field"))))):void 0,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",style:{marginTop:"-5%"}},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);k()(It,"contextType",E);var Rt=n(23),Yt=n(54),jt=n.n(Yt),Ft=n(55),Ht=n.n(Ft);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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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 Bt=function(e){h()(a,e);var t,n,r=zt(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(y()(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=v()(M.a.mark((function e(t){var n,r,o,a,i;return M.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=pt(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,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=v()(M.a.mark((function e(){var t,n,r,o,a;return M.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(!pt(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[pt(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(Rt.Droppable,{types:["csvheader"],onDrop:function(n){e.onMappingSelect.bind(e)(r,t.name,"{".concat(n.csvheader,"}"),!1)}},"post_content"===t.name?o.a.createElement(jt.a,{editor:Ht.a,data:function(){var n=pt(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=pt(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[pt(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&&"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(Rt.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 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",style:{marginTop:"-10%"}},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%",border:"1px solid #dee2e6"},title:e.node_path,className:"text-primary fw-bold"},o.a.createElement(Rt.Draggable,{type:"csvheader",data:e.node_path},e.name)),o.a.createElement("td",{style:{border:"1px solid #dee2e6"}},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%",border:"1px solid #dee2e6"},className:"text-primary fw-bold"},o.a.createElement(Rt.Draggable,{style:{border:"0",padding:"0"},type:"csvheader",data:e.csvHeaders},e.csvHeaders)),o.a.createElement("td",{style:{border:"1px solid #dee2e6"}},e.csvValues))}))))))))}}]),a}(r.Component);function Vt(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 Ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vt(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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)}}k()(Bt,"contextType",E);var qt=function(e){h()(r,e);var t,n=Wt(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)),k()(y()(e),"state",{loading:!1}),e}return u()(r,[{key:"componentDidMount",value:function(){this.context.setCSVInfo(Ut(Ut({},this.context.csvInfo),{},{replaceExistingItem:"Insert"}))}},{key:"sendConfiguration",value:(t=v()(M.a.mark((function e(){var t,n,r;return M.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=dt(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(Ut(Ut({},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){"WooCommerce Product Variations"===t.target.value?(D.toast.info("Please Upgrade to Pro"),e.context.setCSVInfo(Ut(Ut({},e.context.csvInfo),{},{selectedtype:"Posts"}))):e.context.setCSVInfo(Ut(Ut({},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",style:{marginTop:"-5%"}},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 Gt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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)}}k()(qt,"contextType",E);var Jt=function(e){h()(r,e);var t,n=Gt(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=v()(M.a.mark((function e(){var t,n;return M.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(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=8,S()({method:"post",url:ajaxurl,data:t,config:{headers:{"Content-Type":"multipart/form-data"}}});case 8:200==(n=e.sent).status&&n.data.success&&(this.setState({loading:!1}),this.context.setShowComponent("import-config"));case 10: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",style:{marginLeft:"1%"}},o.a.createElement("h5",null,this.context.language.MediaHandling),o.a.createElement("div",{style:{display:"flex",marginLeft:"32%",marginTop:"4%"}},o.a.createElement("div",null,o.a.createElement("label",{className:"align-self-center"},this.context.language.Downloadexternalimagestoyourmedia)),o.a.createElement("div",{className:"form-group fieldset ml30",style:{marginTop:"-2%"}},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",style:{lineHeight:"2"}},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",style:{lineHeight:"2"}},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",style:{marginTop:"-5%"}},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);k()(Jt,"contextType",E);var Kt=Jt;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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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(4);var Xt=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:!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(y()(t)),t.handleChange=t.handleChange.bind(y()(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=v()(M.a.mark((function e(){var t,n,r;return M.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=v()(M.a.mark((function e(){var t,n,r;return M.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=v()(M.a.mark((function e(){var t,n;return M.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=v()(M.a.mark((function e(t){var n;return M.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(k()({},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 ml5 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:"",style:{marginLeft:"3rem"}},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:"",style:{marginLeft:"3rem"}},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:"d-flex col-md-12 mt30 mb20"},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",style:{marginBottom:"1%"},onClick:function(){e.context.setShowComponent(e.context.mappingType)}},this.context.language.Back):o.a.createElement("button",{type:"button",className:"smack-btn btn-default",style:{marginBottom:"1%"},onClick:function(){e.context.setShowComponent("media-handling")}},this.context.language.Back)),o.a.createElement("div",{className:"float-right",style:{marginLeft:"74%",padding:0}},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 $t(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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)}}k()(Xt,"contextType",E);var Zt=function(e){h()(s,e);var t,n,r,a,i=$t(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(y()(t)),t.progressWidth,t}return u()(s,[{key:"onUnload",value:(a=v()(M.a.mark((function e(t){var n;return M.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=v()(M.a.mark((function e(){var t,n,r;return M.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=v()(M.a.mark((function e(t){var n,r,o,a;return M.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=v()(M.a.mark((function e(){var t,n,r;return M.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-end"},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-end"},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-end"},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);k()(Zt,"contextType",E);var en=Zt;function tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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 nn=function(e){h()(a,e);var t,n,r=tn(a);function a(e){var t;return l()(this,a),t=r.call(this,e),k()(y()(t),"pauseBulkImport",v()(M.a.mark((function e(){var n,r;return M.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)})))),k()(y()(t),"resumeBulkImport",v()(M.a.mark((function e(){var n,r,o;return M.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(y()(t))(t.context.csvInfo.hashKey,o,r.data.page_number,t.context.bulkImportData.totalPages,t.context.bulkImportData.Check),t.timer=setInterval(t.stopWatch.bind(y()(t)),1e3));case 8:case"end":return e.stop()}}),e)})))),k()(y()(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(y()(t))(t.context.csvInfo.hashKey,e,1,t.context.bulkImportData.totalPages,t.context.bulkImportData.Check),t.timer=setInterval(t.stopWatch.bind(y()(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=v()(M.a.mark((function e(t,n,r,o,a){var i,s,l,c,u,d,h;return M.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=v()(M.a.mark((function e(){var t,n,r;return M.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",style:{marginLeft:"43%"},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",style:{marginLeft:"40%"},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",style:{marginLeft:"43%"},value:"Pause",onClick:this.pauseBulkImport}):o.a.createElement("input",{type:"button",className:"smack-btn smack-btn-primary",style:{marginLeft:"43%"},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-end"},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-end"},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-end"},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",style:{width:"25%"}},o.a.createElement("div",{className:"mt0 mr0 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",{style:{listStyle:"disc"}}," ","Update older posts from single import"),o.a.createElement("li",{style:{listStyle:"disc"}}," ","Auto Schedule with reusable templates"),o.a.createElement("li",{style:{listStyle:"disc"}}," ","Advanced Custom Field/Post Plugins Importer"),o.a.createElement("li",{style:{listStyle:"disc"}}," ","Import/Update any Toolset Types, ACF pro / Free and Pods fields"),o.a.createElement("li",{style:{listStyle:"disc"}}," ","AIO WooCommerce Importer"),o.a.createElement("li",{style:{listStyle:"disc"}}," ","WPML Importer"),o.a.createElement("li",{style:{listStyle:"disc"}}," ","SEO Plugins Data Importer"),o.a.createElement("li",{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 rn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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)}}k()(nn,"contextType",E);var on=function(e){h()(n,e);var t=rn(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(an,null):"csv-info"===this.context.showComponent?o.a.createElement(qt,null):"mapping-section"===this.context.showComponent?o.a.createElement(It,{fromEditTemplate:!1}):"dragdrop-section"===this.context.showComponent?o.a.createElement(Bt,{fromEditTemplate:!1}):"media-handling"===this.context.showComponent?o.a.createElement(Kt,null):"import-config"===this.context.showComponent?o.a.createElement(Xt,null):"import-process"===this.context.showComponent?o.a.createElement(en,null):"bulk-import"===this.context.showComponent?o.a.createElement(nn,null):void 0}}]),n}(r.Component);k()(on,"contextType",E);var an=function(e){h()(n,e);var t=rn(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)),k()(y()(e),"state",{selectedId:"v-pills-home-tab",selectedTab:"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 col-md-12",style:{marginLeft:"1%"}},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:"".concat("home-tab"==this.state.selectedTab?"nav-link active mt20":"nav-link mt20"),id:"v-pills-home-tab",onClick:function(t){e.setState({selectedId:t.target.id,selectedTab:"home-tab"})},"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:"".concat("profile-tab"==this.state.selectedTab?"nav-link active tp80":"nav-link tp80"),id:"v-pills-profile-tab",onClick:function(t){e.setState({selectedId:t.target.id,selectedTab:"profile-tab"})},"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.UploadfromFTP),o.a.createElement("a",{className:"".concat("messages-tab"==this.state.selectedTab?"nav-link active tp80":"nav-link tp80"),id:"v-pills-messages-tab",onClick:function(t){e.setState({selectedId:t.target.id,selectedTab:"messages-tab"})},"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:"".concat("settings-tab"==this.state.selectedTab?"nav-link active pro-tag tp80":"nav-link pro-tag tp80"),id:"v-pills-settings-tab",onClick:function(t){e.setState({selectedId:t.target.id,selectedTab:"settings-tab"})},"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(Tt,{uploadoptions:this}):"v-pills-messages-tab"==this.state.selectedId?o.a.createElement(Ct,{uploadoptions:this}):"v-pills-profile-tab"==this.state.selectedId?o.a.createElement(Ot,{uploadoptions:this}):"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",style:{width:"24%"}},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",{style:{listStyle:"disc"}}," Update older posts from single import"),o.a.createElement("li",{style:{listStyle:"disc"}}," Auto Schedule with reusable templates"),o.a.createElement("li",{style:{listStyle:"disc"}}," Advanced Custom Field/Post Plugins Importer"),o.a.createElement("li",{style:{listStyle:"disc"}}," AIO WooCommerce Import Suit"),o.a.createElement("li",{style:{listStyle:"disc"}}," WPML Importer"),o.a.createElement("li",{style:{listStyle:"disc"}}," SEO Plugins Data Importer"),o.a.createElement("li",{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 sn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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)}}k()(an,"contextType",E);var ln=function(e){h()(i,e);var t,n,r,a=sn(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(y()(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=v()(M.a.mark((function e(t){var n,r,o,a,i;return M.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=pt(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,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=v()(M.a.mark((function e(){var t,n,r,o,a;return M.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=v()(M.a.mark((function e(){var t,n,r;return M.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),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 24:e.prev=24,e.t0=e.catch(6);case 26:case"end":return e.stop()}}),e,this,[[6,24]])}))),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(!pt(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[pt(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(Rt.Droppable,{types:["csvheader"],onDrop:function(n){e.onMappingSelect.bind(e)(r,t.name,"{".concat(n.csvheader,"}"),!1)}},"post_content"===t.name?o.a.createElement(jt.a,{editor:Ht.a,data:function(){var n=pt(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=pt(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[pt(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&&"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(Rt.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 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",style:{marginTop:"-5%"}},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(Rt.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(Rt.Draggable,{type:"csvheader",data:e.csvHeaders},e.csvHeaders)),o.a.createElement("td",null,e.csvValues))}))))))))}}]),i}(r.Component);function cn(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 un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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)}}k()(ln,"contextType",E);var hn=function(e){h()(r,e);var t,n=dn(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(un(un({},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(un(un({},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=v()(M.a.mark((function e(){var t,n,o;return M.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(un(un({},this.context.csvInfo),{},(o={hashKey:n.data.hashkey,templateName:r.filePondResponse.filename.slice(0,-4),selectedtype:n.data.selectedtype},k()(o,"templateName","From-url"),k()(o,"postTypes",n.data.posttype),k()(o,"fileName",n.data.filename),k()(o,"fileType",n.data.file_type),k()(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(yt,null):"mapping-section"===this.context.showComponent?o.a.createElement(gt,null):"dragdrop-section"===this.context.showComponent?o.a.createElement(ln,null):"simple-import"===this.context.showComponent?o.a.createElement(kt,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",style:{width:"65%"}},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",marginLeft:"5%"}},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",style:{width:"26%"}},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",{style:{listStyle:"disc"}}," Update older posts from single import"),o.a.createElement("li",{style:{listStyle:"disc"}}," Auto Schedule with reusable templates"),o.a.createElement("li",{style:{listStyle:"disc"}}," Advanced Custom Field/Post Plugins Importer"),o.a.createElement("li",{style:{listStyle:"disc"}}," AIO WooCommerce Import Suit"),o.a.createElement("li",{style:{listStyle:"disc"}}," WPML Importer"),o.a.createElement("li",{style:{listStyle:"disc"}}," SEO Plugins Data Importer"),o.a.createElement("li",{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);k()(hn,"contextType",E);var pn=n(59),fn=n.n(pn),mn=function(){var e=Object(r.useState)(!1),t=fn()(e,2),n=t[0],a=t[1],i=Object(r.useState)(!1),s=fn()(i,2),l=s[0],c=s[1],u=Object(r.useState)(!1),d=fn()(u,2),h=d[0],p=d[1];function f(){return(f=v()(M.a.mark((function e(){var t,n,r;return M.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"))))))},gn=n(33);function _n(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 vn,bn=n(60),yn=function(){function e(e){this.changeListeners=[],this.TESTING_ONETWO=2,this.cookies=function(e){return"string"==typeof e?gn.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=gn.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(),_n(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]=_n(this.cookies[n],e);return t},e.prototype.set=function(e,t,n){var r;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=bn({},this.cookies,((r={})[e]=t,r)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=gn.serialize(e,t,n)),this._emitChange({name:e,value:t,options:n})},e.prototype.remove=function(e,t){var n=t=bn({},t,{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=bn({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=gn.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 wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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()(i,e);var t,n,r,a=wn(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)),k()(y()(e),"state",{showMaintenanceMode:!1,selectedTab:"import-update",activateExporter:!1}),e}return u()(i,[{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("import-update"),this.checkRTLSupport(),this.checkExporterEnable(),this.checkMaintenanceMode();var e=new yn;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=xn,this.context.setLanguage(window.wpr_object.file),void this.forceUpdate()):void(window.wpr_object={file:xn});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=v()(M.a.mark((function e(){var t,n;return M.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=v()(M.a.mark((function e(){var t,n;return M.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=v()(M.a.mark((function e(){var t;return M.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://www.smackcoders.com/documentation/ultimate-csv-importer-pro/how-to-import-csv?utm_source=plugin&utm_campaign=csv_importer_free&utm_medium=wordpress",target:"_blank",style:{marginLeft:"-30%"}},"Documentation")),o.a.createElement("li",{className:"ml-4"},o.a.createElement("a",{className:"csv-link",href:"https://www.smackcoders.com/blog/wordpress-ultimate-csv-importer-csv-sample-files-and-updates.html?utm_source=plugin&utm_campaign=csv_importer_free&utm_medium=wordpress",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(hn,null):this.context.advancedModeSelection&&"import-update"===this.state.selectedTab?o.a.createElement(on,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(mn,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);k()(kn,"contextType",E);var xn=(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",UploadfromFTP:"Upload from FTP",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",RankMathFields:"Rank Math Fields",RankMathProFields:"Rank Math Pro Fields",BillingAndShippingInformation:"Billing and Shipping Information",CustomFieldsWPMemberFields:"Custom Fields WP Member Fields",CustomFieldsMemberFields:"Custom Fields Member Fields",ProductMetaFields:"Product Meta Fields",ProductAttrFields:"Product Attribute 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",DeletedatafromWordPress:"Delete data from WordPress",EnabletodeletetheitemsnotpresentinCSVXMLfile:"Enable to delete the items not present in CSV/XML file",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"},k()(vn,"DeletedatafromWordPress","Delete data from WordPress"),k()(vn,"EnabletodeletetheitemsnotpresentinCSVXMLfile","Enable to delete the items not present in CSV/XML file"),k()(vn,"DeleteallPostPagerevisions","Delete all Post/Page revisions"),k()(vn,"DeleteallautodraftedPostPage","Delete all auto drafted Post/Page"),k()(vn,"DeleteallPostPageintrash","Delete all Post/Page in trash"),k()(vn,"DeleteallCommentsintrash","Delete all Comments in trash"),k()(vn,"DeleteallUnapprovedComments","Delete all Unapproved Comments"),k()(vn,"DeleteallPingbackComments","Delete all Pingback Comments"),k()(vn,"DeleteallTrackbackComments","Delete all Trackback Comments"),k()(vn,"DeleteallSpamComments","Delete all Spam Comments"),k()(vn,"RunDBOptimizer","Run DB Optimizer"),k()(vn,"DatabaseOptimizationLog","Database Optimization Log"),k()(vn,"noofOrphanedPostPagemetahasbeenremoved","no of Orphaned Post/Page meta has been removed."),k()(vn,"noofUnassignedtagshasbeenremoved","no of Unassigned tags has been removed."),k()(vn,"noofPostPagerevisionhasbeenremoved","no of Post/Page revisions has been removed."),k()(vn,"noofAutodraftedPostPagehasbeenremoved","no of Auto drafted Post/Page has been removed."),k()(vn,"noofPostPageintrashhasbeenremoved","no of Post/Page in trash has been removed."),k()(vn,"noofSpamcommentshasbeenremoved","no of Spam comments has been removed."),k()(vn,"noofCommentsintrashhasbeenremoved","no of Comments in trash has been removed."),k()(vn,"noofUnapprovedcommentshasbeenremoved","no of Unapproved comments has been removed."),k()(vn,"noofPingbackcommentshasbeenremoved","no of Pingback comments has been removed."),k()(vn,"noofTrackbackcommentshasbeenremoved","no of Trackback comments has been removed."),k()(vn,"Allowauthorseditorstoimport","Allow authors/editors to import"),k()(vn,"Thisenablesauthorseditorstoimport","This enables authors/editors to import."),k()(vn,"MinimumrequiredphpinivaluesIniconfiguredvalues","Minimum required php.ini values (Ini configured values)"),k()(vn,"Variables","Variables"),k()(vn,"SystemValues","System Values"),k()(vn,"MinimumRequirements","Minimum Requirements"),k()(vn,"RequiredtoenabledisableLoadersExtentionsandmodules","Required to enable/disable Loaders, Extentions and modules:"),k()(vn,"DebugInformation","Debug Information:"),k()(vn,"SmackcodersGuidelines","Smackcoders Guidelines"),k()(vn,"DevelopmentNews","Development News"),k()(vn,"WhatsNew","Whats New?"),k()(vn,"YoutubeChannel","Youtube Channel"),k()(vn,"OtherWordPressPlugins","Other WordPress Plugins"),k()(vn,"Count","Count"),k()(vn,"ImageType","Image Type"),k()(vn,"Status","Status"),k()(vn,"Loading","Loading"),k()(vn,"LoveWPUltimateCSVImporterGivea5starreviewon","Love WP Ultimate CSV Importer, Give a 5 star review on"),k()(vn,"ContactSupport","Contact Support"),k()(vn,"Email","Email"),k()(vn,"Supporttype","Support type"),k()(vn,"BugReporting","Bug Reporting"),k()(vn,"FeatureEnhancement","Feature Enhancement"),k()(vn,"Message","Message"),k()(vn,"Send","Send"),k()(vn,"NewsletterSubscription","Newsletter Subscription"),k()(vn,"Subscribe","Subscribe"),k()(vn,"Note","Note"),k()(vn,"SubscribetoSmackcodersMailinglistafewmessagesayear","Subscribe to Smackcoders Mailing list (a few messages a year)"),k()(vn,"Pleasedraftamailto","Please draft a mail to"),k()(vn,"Ifyoudoesnotgetanyacknowledgementwithinanhour","If you does not get any acknowledgement within an hour!"),k()(vn,"Selectyourmoduletoexportthedata","Select your Module to Export Data"),k()(vn,"Toexportdatabasedonthefilters","To export data based on the filters"),k()(vn,"ExportFileName","Export File Name"),k()(vn,"AdvancedSettings","Advanced Settings"),k()(vn,"ExportType","Export Type"),k()(vn,"SplittheRecord","Split the Record"),k()(vn,"AdvancedFilters","Advanced Filters"),k()(vn,"Exportdatawithautodelimiters","Export data with auto delimiters"),k()(vn,"Delimiters","Delimiters"),k()(vn,"OtherDelimiters","Other Delimiters"),k()(vn,"Exportdataforthespecificperiod","Export data for the specific period"),k()(vn,"StartFrom","Start From"),k()(vn,"EndTo","End To"),k()(vn,"Exportdatawiththespecificstatus","Export data with the specific status"),k()(vn,"All","All"),k()(vn,"Publish","Publish"),k()(vn,"Sticky","Sticky"),k()(vn,"Private","Private"),k()(vn,"Protected","Protected"),k()(vn,"Draft","Draft"),k()(vn,"Pending","Pending"),k()(vn,"Exportdatabyspecificauthors","Export data by specific authors"),k()(vn,"Authors","Authors"),k()(vn,"ExportdatabasedonspecificInclusions","Export data based on specific Inclusions"),k()(vn,"DoyouwanttoSchedulethisExport","Do you want to Schedule this Export"),k()(vn,"SelectTimeZone","Select TimeZone"),k()(vn,"ScheduleExport","Schedule Export"),k()(vn,"DataExported","Data Exported"),vn);function Mn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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 En=function(e){h()(n,e);var t=Mn(n);function n(){return l()(this,n),t.apply(this,arguments)}return u()(n,[{key:"render",value:function(){return o.a.createElement(kn,null)}}]),n}(r.Component);function Tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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 Sn=function(e){h()(n,e);var t=Tn(n);function n(e){return l()(this,n),t.call(this,e)}return u()(n,[{key:"render",value:function(){return o.a.createElement(En,null)}}]),n}(r.Component);function Dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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 Ln=function(e){h()(n,e);var t=Dn(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)),k()(y()(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},k()(e,"showJetEngineFieldsState",!1),k()(e,"rankMathFields",[]),k()(e,"showRankMathFieldsState",!1),k()(e,"rankMathProFields",[]),k()(e,"showRankMathProFieldsState",!1),k()(e,"customFieldSuiteFields",[]),k()(e,"showCustomFieldSuiteState",!1),k()(e,"allInOneSeoFields",[]),k()(e,"showAllInOneSeoFieldsState",!1),k()(e,"billingAndShippingInformation",[]),k()(e,"showBillingAndShippingInformationState",!1),k()(e,"wordPressCustomFields",[]),k()(e,"wordPressUserCustomFields",[]),k()(e,"wordPressUserCustomFieldsLabel",[]),k()(e,"showWordPressCustomFieldsState",!1),k()(e,"customFieldsWpMembersFields",[]),k()(e,"showCustomFieldsWpMembersState",!1),k()(e,"customFieldsMembersFields",[]),k()(e,"showCustomFieldsMembersState",!1),k()(e,"productMetaFields",[]),k()(e,"showProductMetaFieldsState",!1),k()(e,"ProductAttrFields",[]),k()(e,"showProductAttrFieldsState",!1),k()(e,"productBundleMetaFields",[]),k()(e,"showProductBundleMetaFieldsState",!1),k()(e,"orderMetaFields",[]),k()(e,"showOrderMetaFieldsState",!1),k()(e,"wpEcomCustomFields",[]),k()(e,"showWpEcomCustomFieldsState",!1),k()(e,"eventsManagerFields",[]),k()(e,"showEventsManagerFieldsState",!1),k()(e,"acfFreeFields",[]),k()(e,"showAcfFreeFieldsState",!1),k()(e,"cmb2CustomFields",[]),k()(e,"showCmb2CustomFieldsState",!1),k()(e,"wpmlCustomFields",[]),k()(e,"showWPMLCustomFields",!1),k()(e,"termsAndTaxonomiesFields",[]),k()(e,"csvHeaderFields",[]),k()(e,"fileName",""),k()(e,"templateName",""),k()(e,"saveTemplateNames",""),k()(e,"editTemplateName",""),k()(e,"selectedTemplateNameInManagerSection",""),k()(e,"selectedModuleNameInManagerSection",""),k()(e,"editedTemplateNameInManagerSection",""),k()(e,"hashKey",""),k()(e,"selectedType",""),k()(e,"csvFileNames",[]),k()(e,"csvFileUrls",[]),k()(e,"csvFileServer",[]),k()(e,"selectedFileUrlsState",!1),k()(e,"selectedFileUrl",""),k()(e,"selectedFileServer",""),k()(e,"saveSelectedMappedFields",[]),k()(e,"activateMediaHandlingSection",!1),k()(e,"activateDashboard",!0),k()(e,"fromMediaHandlingState",!1),k()(e,"activateExportDataFilter",!1),k()(e,"activateExportDownloadOptionSection",!1),k()(e,"activateImportConfigurationSection",!1),k()(e,"activateSaveMappingTemplateSection",!1),k()(e,"activateProgressDisplaySection",!1),k()(e,"activateUseExistingMappingState",!1),k()(e,"activateCreateNewMappingState",!1),k()(e,"activateTemplateSectionState",!1),k()(e,"fromSaveMappingSection",!1),k()(e,"fromTemplateMappingSection",!1),k()(e,"fromDragAndDropSection",!1),k()(e,"activateLargeState",!1),k()(e,"mode","Insert"),k()(e,"exportModule",""),k()(e,"optionalType",""),k()(e,"templateNameArray",[]),k()(e,"modulesNameArray",[]),k()(e,"createdTimeArray",[]),k()(e,"matchedCountsArray",[]),k()(e,"activateUseAlreadyMediaImageState",!1),k()(e,"activateOverwriteExistingImageState",!1),k()(e,"activateThumbnailState",!1),k()(e,"activateMediumState",!1),k()(e,"activateMediumLargeState",!1),k()(e,"activateCustomState",!1),k()(e,"mediaImageTitle",""),k()(e,"mediaImageCaption",""),k()(e,"mediaImageAltText",""),k()(e,"mediaImageDescription",""),k()(e,"mediaImageFileName",""),k()(e,"updateFields",[]),k()(e,"duplicateHandleField",""),k()(e,"countryLists",[]),k()(e,"timeZones",[]),k()(e,"selectedCountryTime",""),k()(e,"receivedExportedFilePath",""),k()(e,"importLogDataLink",""),k()(e,"rollBackMode",!1),k()(e,"maintenanceMode",!1),k()(e,"loaderText",o.a.createElement("div",{className:"btn ajax-loader loading",style:{position:"initial"}},"Please Wait")),k()(e,"totalCustomFields",[]),k()(e,"totalRows",0),k()(e,"translateLanguage",{}),k()(e,"uploadedFileType",""),k()(e,"receivedExportedFileUrl",""),k()(e,"setFileUrl",(function(e){r.setState({fileUrl:e})})),k()(e,"setHostName",(function(e){r.setState({hostName:e})})),k()(e,"setHostPort",(function(e){r.setState({hostPort:e})})),k()(e,"setHostUserName",(function(e){r.setState({hostUserName:e})})),k()(e,"setHostPassword",(function(e){r.setState({hostPassword:e})})),k()(e,"setHostPath",(function(e){r.setState({hostPath:e})})),k()(e,"selectedConnectionType",(function(e){r.setState({connectionType:e})})),k()(e,"setSelectedTab",(function(e){r.setState({selectedTab:e})})),k()(e,"setSelectedTabCookies",(function(e){(new yn).set("selectedTab",e,{path:"/"})})),k()(e,"changeActivateMappingSectionState",(function(e){r.setState({activateMappingSection:e})})),k()(e,"changeMediaHandleCheckboxState",(function(e){r.setState({mediaHandleCheckboxState:e})})),k()(e,"changeActivateDragAndDropSectionState",(function(e){r.setState({activateDragAndDropSection:e})})),k()(e,"changeActivateXmlFileMappingSectionState",(function(e){r.setState({activateXmlFileMappingSection:e})})),k()(e,"setWordPressDefaultCoreFields",(function(e){r.setState({wordPressCoreFields:e})})),k()(e,"showWordPressDefaultCoreFields",(function(e){r.setState({showWordPressDefaultCoreFieldsState:e})})),k()(e,"setAcfFreeFields",(function(e){r.setState({acfFreeFields:e})})),k()(e,"showAcfFreeFields",(function(e){r.setState({showAcfFreeFieldsState:e})})),k()(e,"setAcfGroupFields",(function(e){r.setState({acfGroupFields:e})})),k()(e,"showAcfGroupFields",(function(e){r.setState({showAcfGroupFieldsState:e})})),k()(e,"setAcfProFields",(function(e){r.setState({acfProFields:e})})),k()(e,"showAcfProFields",(function(e){r.setState({showAcfProFieldsState:e})})),k()(e,"setAcfRepeaterFields",(function(e){r.setState({acfRepeaterFields:e})})),k()(e,"showAcfRepeaterFields",(function(e){r.setState({showAcfRepeaterFieldsState:e})})),k()(e,"setTermsAndTaxonomies",(function(e){r.setState({termsAndTaxonomiesFields:e})})),k()(e,"showTermsAndTaxonomies",(function(e){r.setState({showTermsAndTaxonomiesState:e})})),k()(e,"setTypesFields",(function(e){r.setState({typesFields:e})})),k()(e,"showTypesFields",(function(e){r.setState({showTypesFieldsState:e})})),k()(e,"setPodsFields",(function(e){r.setState({podsFields:e})})),k()(e,"showPodsFields",(function(e){r.setState({showPodsFieldsState:e})})),k()(e,"setJetEngineFields",(function(e){r.setState({jetEngineRFFields:e})})),k()(e,"showJetEngineRFFieldsState",(function(e){r.setState({showJetEngineRFFieldsState:e})})),k()(e,"setJetEngineCPTFields",(function(e){r.setState({jetEngineCPTFields:e})})),k()(e,"showJetEngineCPTFieldsState",(function(e){r.setState({showJetEngineCPTFieldsState:e})})),k()(e,"setJetEngineCPTFields",(function(e){r.setState({jetEngineCPTRFFields:e})})),k()(e,"showJetEngineCPTRFFieldsState",(function(e){r.setState({showJetEngineCPTRFFieldsState:e})})),k()(e,"setJetEngineTaxonomyFields",(function(e){r.setState({jetEngineTaxonomyFields:e})})),k()(e,"showJetEngineTaxonomyFieldsState",(function(e){r.setState({showJetEngineTaxonomyFieldsState:e})})),k()(e,"setJetEngineCPTFields",(function(e){r.setState({jetEngineTaxonomyRFFields:e})})),k()(e,"showJetEngineTaxonomyRFFieldsState",(function(e){r.setState({showJetEngineTaxonomyRFFieldsState:e})})),k()(e,"setJetEngineRelationsFields",(function(e){r.setState({jetEngineRelationsFields:e})})),k()(e,"showJetEngineRelationsFieldsState",(function(e){r.setState({showJetEngineTaxonomyFieldsState:e})})),k()(e,"setCustomFieldSuite",(function(e){r.setState({customFieldSuiteFields:e})})),k()(e,"showCustomFieldSuite",(function(e){r.setState({showCustomFieldSuiteState:e})})),k()(e,"setAllInOneSeoFields",(function(e){r.setState({allInOneSeoFields:e})})),k()(e,"showAllInOneSeoFields",(function(e){r.setState({showAllInOneSeoFieldsState:e})})),k()(e,"setYoastSeoFields",(function(e){r.setState({yoastSeoFields:e})})),k()(e,"showYoastSeoFields",(function(e){r.setState({showYoastSeoFieldsState:e})})),k()(e,"setRankMathFields",(function(e){r.setState({rankMathFields:e})})),k()(e,"showRankMathFields",(function(e){r.setState({showRankMathFieldsState:e})})),k()(e,"setRankMathProFields",(function(e){r.setState({rankMathProFields:e})})),k()(e,"showRankMathProFields",(function(e){r.setState({showRankMathProFieldsState:e})})),k()(e,"setBillingAndShippingInformation",(function(e){r.setState({billingAndShippingInformation:e})})),k()(e,"showBillingAndShippingInformation",(function(e){r.setState({showBillingAndShippingInformationState:e})})),k()(e,"setWordPressCustomFields",(function(e){r.setState({wordPressCustomFields:e})})),k()(e,"setWordPressUserCustomFields",(function(e){r.setState({wordPressUserCustomFields:e})})),k()(e,"setWordPressUserCustomFieldsLabel",(function(e){r.setState({wordPressUserCustomFieldsLabel:receivedWordPressUserCustomFieldsLabel})})),k()(e,"showWordPressCustomFields",(function(e){r.setState({showWordPressCustomFieldsState:e})})),k()(e,"setCustomFieldsWpMembers",(function(e){r.setState({customFieldsWpMembersFields:e})})),k()(e,"showCustomFieldsWpMembers",(function(e){r.setState({showCustomFieldsWpMembersState:e})})),k()(e,"setCustomFieldsMembers",(function(e){r.setState({customFieldsMembersFields:e})})),k()(e,"showCustomFieldsMembers",(function(e){r.setState({showCustomFieldsMembersState:e})})),k()(e,"setProductMetaFields",(function(e){r.setState({productMetaFields:e})})),k()(e,"showProductMetaFields",(function(e){r.setState({showProductMetaFieldsState:e})})),k()(e,"setProductAttrFields",(function(e){r.setState({productAttreFields:e})})),k()(e,"showProductAttrFields",(function(e){r.setState({showProductAttrFieldsState:e})})),k()(e,"setProductBundleMetaFields",(function(e){r.setState({productBundleMetaFields:e})})),k()(e,"showProductBundleMetaFields",(function(e){r.setState({showProductBundleMetaFieldsState:e})})),k()(e,"setOrderMetaFields",(function(e){r.setState({orderMetaFields:e})})),k()(e,"showOrderMetaFields",(function(e){r.setState({showOrderMetaFieldsState:e})})),k()(e,"setCouponMetaFields",(function(e){r.setState({couponMetaFields:e})})),k()(e,"showCouponMetaFields",(function(e){r.setState({showCouponMetaFieldsState:e})})),k()(e,"setRefundMetaFields",(function(e){r.setState({refundMetaFields:e})})),k()(e,"showRefundMetaFields",(function(e){r.setState({showRefundMetaFieldsState:e})})),k()(e,"setWpEcomCustomFields",(function(e){r.setState({wpEcomCustomFields:e})})),k()(e,"showWpEcomCustomFields",(function(e){r.setState({showWpEcomCustomFieldsState:e})})),k()(e,"setEventsManagerFields",(function(e){r.setState({eventsManagerFields:e})})),k()(e,"showEventsManagerFields",(function(e){r.setState({showEventsManagerFieldsState:e})})),k()(e,"setCmb2CustomFields",(function(e){r.setState({cmb2CustomFields:e})})),k()(e,"showCmb2CustomFields",(function(e){r.setState({showCmb2CustomFieldsState:e})})),k()(e,"setWPMLCustomFields",(function(e){r.setState({wpmlCustomFields:e})})),k()(e,"showWPMLCustomFields",(function(e){r.setState({showWPMLCustomFieldsState:e})})),k()(e,"setCsvHeaderFields",(function(e){r.setState({csvHeaderFields:e})})),k()(e,"getFileName",(function(e){r.setState({fileName:e})})),k()(e,"getTemplateName",(function(e){r.setState({templateName:e})})),k()(e,"saveTemplateName",(function(e){r.setState({saveTemplateNames:e})})),k()(e,"editedTemplateName",(function(e){r.setState({editTemplateName:e})})),k()(e,"selectedTemplateInManager",(function(e){r.setState({selectedTemplateNameInManagerSection:e})})),k()(e,"selectedEditedTemplateInManager",(function(e){r.setState({editedTemplateNameInManagerSection:e})})),k()(e,"selectedModuleInManager",(function(e){r.setState({selectedModuleNameInManagerSection:e})})),k()(e,"setHashKey",(function(e){r.setState({hashKey:e})})),k()(e,"setSelectedType",(function(e){r.setState({selectedType:e})})),k()(e,"setMode",(function(e){r.setState({mode:e})})),k()(e,"getCsvFileNames",(function(e){r.setState({csvFileNames:e})})),k()(e,"getCsvFilesUrl",(function(e){r.setState({csvFileUrls:e})})),k()(e,"getCsvFilesServer",(function(e){r.setState({csvFileServer:e})})),k()(e,"setSelectedFileUrlsState",(function(e){r.setState({selectedFileUrlsState:e})})),k()(e,"setSelectedFileUrl",(function(e){r.setState({selectedFileUrl:e})})),k()(e,"setSelectedFileServer",(function(e){r.setState({selectedFileServer:e})})),k()(e,"saveMappedFields",(function(e){r.setState({saveSelectedMappedFields:e.slice()})})),k()(e,"changeActivateMediaHandlingSection",(function(e){r.setState({activateMediaHandlingSection:e})})),k()(e,"setActivateDashboard",(function(e){r.setState({activateDashboard:e})})),k()(e,"backFromMediaHandlingState",(function(e){r.setState({fromMediaHandlingState:e})})),k()(e,"setExportDataFilterSection",(function(e){r.setState({activateExportDataFilter:e})})),k()(e,"changeActivateExportDownloadOption",(function(e){r.setState({activateExportDownloadOptionSection:e})})),k()(e,"changeActivateImportConfiguration",(function(e){r.setState({activateImportConfigurationSection:e})})),k()(e,"changeActivateProgressDisplay",(function(e){r.setState({activateProgressDisplaySection:e})})),k()(e,"changeActivateSaveMappingTemplateSectionState",(function(e){r.setState({activateSaveMappingTemplateSection:e})})),k()(e,"changeUseExistingMappingState",(function(e){r.setState({activateUseExistingMappingState:e})})),k()(e,"changeCreateNewMappingState",(function(e){r.setState({activateCreateNewMappingState:e})})),k()(e,"changeActivateTemplateSectionState",(function(e){r.setState({activateTemplateSectionState:e})})),k()(e,"fromSaveMappingSectionState",(function(e){r.setState({fromSaveMappingSection:e})})),k()(e,"fromTemplateMappingSectionState",(function(e){r.setState({fromTemplateMappingSection:e})})),k()(e,"fromDragAndDropMappingSection",(function(e){r.setState({fromDragAndDropSection:e})})),k()(e,"setMode",(function(e){r.setState({mode:e})})),k()(e,"setExportModule",(function(e){r.setState({exportModule:e})})),k()(e,"setOptionalType",(function(e){r.setState({optionalType:e})})),k()(e,"setTemplateNameArray",(function(e){r.setState({templateNameArray:e})})),k()(e,"setModulesArray",(function(e){r.setState({modulesNameArray:e})})),k()(e,"setCreatedTimeArray",(function(e){r.setState({createdTimeArray:e})})),k()(e,"setMatchedCounts",(function(e){r.setState({matchedCountsArray:e})})),k()(e,"activateUseAlreadyMediaImage",(function(e){r.setState({activateUseAlreadyMediaImageState:e})})),k()(e,"activateOverwriteExistingImage",(function(e){r.setState({activateOverwriteExistingImageState:e})})),k()(e,"activateThumbnail",(function(e){r.setState({activateThumbnailState:e})})),k()(e,"activateMedium",(function(e){r.setState({activateMediumState:e})})),k()(e,"activateMediumLarge",(function(e){r.setState({activateMediumLargeState:e})})),k()(e,"activateLarge",(function(e){r.setState({activateLargeState:e})})),k()(e,"activateCustom",(function(e){r.setState({activateCustomState:e})})),k()(e,"setImageTitle",(function(e){r.setState({mediaImageTitle:e})})),k()(e,"setImageCaption",(function(e){r.setState({mediaImageCaption:e})})),k()(e,"setImageAltText",(function(e){r.setState({mediaImageAltText:e})})),k()(e,"setImageDescription",(function(e){r.setState({mediaImageDescription:e})})),k()(e,"changeImageFileName",(function(e){r.setState({mediaImageFileName:e})})),k()(e,"setUpdateFields",(function(e){r.setState({updateFields:e})})),k()(e,"fieldHandleDuplicate",(function(e){r.setState({duplicateHandleField:e})})),k()(e,"setCountryList",(function(e){r.setState({countryLists:e})})),k()(e,"setTimeZones",(function(e){r.setState({timeZones:e})})),k()(e,"selectedCountryTimeZone",(function(e){r.setState({selectedCountryTime:e})})),k()(e,"exportedFileUrl",(function(e){r.setState({receivedExportedFileUrl:e})})),k()(e,"importLogData",(function(e){r.setState({importLogDataLink:e})})),k()(e,"setRollBackMode",(function(e){r.setState({rollBackMode:e})})),k()(e,"setMaintenanceMode",(function(e){r.setState({maintenanceMode:e})})),k()(e,"setTotalCustomFields",(function(e){r.setState({totalCustomFields:e})})),k()(e,"setTotalRows",(function(e){r.setState({totalRows:e})})),k()(e,"languageTranslation",(function(e){r.setState({translateLanguage:e})})),k()(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 Cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=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 Pn=function(e){h()(n,e);var t=Cn(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)),k()(y()(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 yn).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(Pn,null,o.a.createElement(Ln,null,o.a.createElement(Sn,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.3")),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(56),o=n(50),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||{})Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}var s=n(51),l=n(20),c=n(22),u=n(11),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(58);var m=n(57);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 V(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 U(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 V(Y,e);case"XX":return V(j,e);case"XXXX":return V(F,e);case"XXXXX":return V(z,e);case"XXX":default:return V(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 V(Y,e);case"xx":return V(j,e);case"xxxx":return V(F,e);case"xxxxx":return V(z,e);case"xxx":default:return V(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 U(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 U(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,"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(257),o=n.n(r),a=n(29),i=n.n(a),s=n(32),l=n.n(s),c=n(7),u=n.n(c),d=n(1),h=n.n(d),p=n(258),f=n.n(p),m=n(0),g=n(83),_=n(84),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()(u()(u()(t)),"referenceNode",void 0),h()(u()(u()(t)),"setReferenceNode",(function(e){e&&t.referenceNode!==e&&(t.referenceNode=e,t.forceUpdate())})),t}l()(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()(u()(u()(t)),"state",{data:void 0,placement:void 0}),h()(u()(u()(t)),"popperInstance",void 0),h()(u()(u()(t)),"popperNode",null),h()(u()(u()(t)),"arrowNode",null),h()(u()(u()(t)),"setPopperNode",(function(e){e&&t.popperNode!==e&&(M(t.props.innerRef,e),t.popperNode=e,t.updatePopperInstance())})),h()(u()(u()(t)),"setArrowNode",(function(e){t.arrowNode=e})),h()(u()(u()(t)),"updateStateModifier",{enabled:!0,order:900,fn:function(e){var n=e.placement;return t.setState({data:e,placement:n}),e}}),h()(u()(u()(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()(u()(u()(t)),"getPopperStyle",(function(){return t.popperNode&&t.state.data?i()({position:t.state.data.offsets.popper.position},t.state.data.styles):E})),h()(u()(u()(t)),"getPopperPlacement",(function(){return t.state.data?t.state.placement:void 0})),h()(u()(u()(t)),"getArrowStyle",(function(){return t.arrowNode&&t.state.data?t.state.data.arrowStyles:T})),h()(u()(u()(t)),"getOutOfBoundariesState",(function(){return t.state.data?t.state.data.hide:void 0})),h()(u()(u()(t)),"destroyPopperInstance",(function(){t.popperInstance&&(t.popperInstance.destroy(),t.popperInstance=null)})),h()(u()(u()(t)),"updatePopperInstance",(function(){t.destroyPopperInstance();var e=u()(u()(t)).popperNode,n=t.props.referenceElement;n&&e&&(t.popperInstance=new g.a(n,e,t.getOptions()))})),h()(u()(u()(t)),"scheduleUpdate",(function(){t.popperInstance&&t.popperInstance.scheduleUpdate()})),t}l()(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(81),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()(u()(u()(t)),"refHandler",(function(e){M(t.props.innerRef,e),x(t.props.setReferenceNode,e)})),t}l()(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 N}));var r=n(76),o=n(56),a=n(50),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":return n.toUpperCase();case"aaa":return n;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(58),d=n(52),h=n(57),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;return 0===a?n+String(o):n+String(o)+t+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":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();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":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();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(51),E=n(20),T=n(22),S=n(11),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,"default",(function(){return c}));var r=n(17),o=n(5),a=n(11),i=n(2);function s(e,t){var n,s;Object(i.a)(1,arguments);var l=Object(o.default)(e),c=l.getFullYear(),u=null==t||null===(n=t.locale)||void 0===n||null===(s=n.options)||void 0===s?void 0:s.firstWeekContainsDate,d=null==u?1:Object(a.a)(u),h=null==(null==t?void 0:t.firstWeekContainsDate)?d:Object(a.a)(t.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setFullYear(c+1,0,h),p.setHours(0,0,0,0);var f=Object(r.default)(p,t),m=new Date(0);m.setFullYear(c,0,h),m.setHours(0,0,0,0);var g=Object(r.default)(m,t);return l.getTime()>=f.getTime()?c+1:l.getTime()>=g.getTime()?c:c-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}}]);
|
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,V=S,U=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=V,B.canvas=U,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 Ve(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 Ue(e,t,n){var r=n/2,o=Ve(e,r),a=Ve(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,Ue(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 Vt=B.valueOrDefault;function Ut(){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=Vt(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]=Ut(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=Vt(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=Vt(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=Ut,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 Vn(e){return B.isNumber(e)?e:0}var Un=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=Vn(o),a=Vn(a),i=Vn(i),s=Vn(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;Un._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:Un,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(4)}catch(e){}}())},function(e,t,n){var r=n(67);e.exports=function(e,t){return r(e,t)}},function(e,t,n){var r=n(242),o=n(247),a=n(388),i=n(392),s=n(410),l=n(25),c=n(249),u=n(251),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(45),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(45);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(45);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(45);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(44);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(44),o=n(68),a=n(70);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(244),o=n(368),a=n(69),i=n(246),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(46),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(369),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(372),o=n(44),a=n(68);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(373),o=n(374),a=n(375),i=n(376),s=n(377);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(47);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(47),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(47),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(47);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(48);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(48);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(48);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(48);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(70),o=n(384),a=n(385);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(46),o=n(389),a=n(243),i=n(247),s=n(390),l=n(391),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(393),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(394),o=n(396),a=n(71);e.exports=function(e){return r(e,a,o)}},function(e,t,n){var r=n(395),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(397),o=n(398),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(400),o=n(248),a=n(25),i=n(249),s=n(250),l=n(251),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(36),o=n(37);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(36),o=n(72),a=n(37),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(245),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(63)(e))},function(e,t,n){var r=n(407),o=n(408),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(409)(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(411),o=n(68),a=n(412),i=n(413),s=n(414),l=n(36),c=n(246),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(416),o=n(418)((function(e,t,n){r(e,n,t)}));e.exports=o},function(e,t,n){var r=n(417);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(419),o=n(420),a=n(426),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(421);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(422),o=n(425)(r);e.exports=o},function(e,t,n){var r=n(423),o=n(71);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(424)();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(252);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(427),o=n(430),a=n(441),i=n(25),s=n(442);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(428),o=n(429),a=n(254);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(242),o=n(67);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(253),o=n(71);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(67),o=n(431),a=n(438),i=n(73),s=n(253),l=n(254),c=n(49);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(255);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(433),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(434);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(70);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(436);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(46),o=n(437),a=n(25),i=n(74),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(439),o=n(440);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(256),o=n(248),a=n(25),i=n(250),s=n(72),l=n(49);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(443),o=n(444),a=n(73),i=n(49);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(255);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},V=function(){w.forEach((function(e){return e.destroy()})),N.forEach((function(e){e({root:J,props:t})})),b.forEach((function(e){return e._destroy()}))},U={element:{get:I},style:{get:H},childViews:{get:R}},W=Object.assign({},U,{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:V},G=Object.assign({},U,{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},V=function(e){return"string"==typeof e},U=function(e){return w(e)?e:V(e)?H(e).replace(/[a-z]+/gi,""):0},W=function(e){return parseInt(U(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(V(t))return o.url=t,o;if(Object.assign(o,t),V(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)&&V(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(U(e))},bytes:G,string:function(e){return J(e)?e:H(e)},serverapi:function(e){return(n={}).url=V(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,V(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},Ve=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)},Ue=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=Ue(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(Ve(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||!V(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||!V(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)):V(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:V(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?V(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&&V(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")},Vt={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}},Ut={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:Ut,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:Ut},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(Vt,(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=[],Vn=function(e){vn(e.clipboardData).then((function(e){e.length&&Bn.forEach((function(t){return t(e)}))}))},Un=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",Vn),zn=!1)},onload:function(){}};return function(e){Bn.includes(e)||(Bn.push(e),zn||(zn=!0,document.addEventListener("paste",Vn)))}(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=Un(),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(V(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:V,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(448));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},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(s)throw o}}return a}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(452);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}},e.exports.default=e.exports,e.exports.__esModule=!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},e.exports.default=e.exports,e.exports.__esModule=!0},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.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),a=n(38),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(9),v=n.n(_),b=n(7),y=n.n(b),w=n(1),k=n.n(w),x=n(3),M=n.n(x),E=o.a.createContext(),T=n(10),S=n.n(T),D=n(8);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 V(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 U="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!==U&&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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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=v()(M.a.mark((function e(){var t,n;return M.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=v()(M.a.mark((function e(t,n){var r,o;return M.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",style:{borderBottomColor:"white"}},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);k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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);k()(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){k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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(y()(t)),t}return u()(i,[{key:"componentDidMount",value:function(){this.context.activateExporter&&(this.getPostTypes(),this.getTaxonomies())}},{key:"getPostTypes",value:(r=v()(M.a.mark((function e(){var t,n;return M.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=v()(M.a.mark((function e(){var t,n;return M.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=v()(M.a.mark((function e(t){var n,r,o,a,i=arguments;return M.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-6 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-6",style:{display:"CustomPosts"===this.context.exportInfo.moduleName?"block":"none"}},o.a.createElement("select",k()({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",k()({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",null,"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",null,"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",null,"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);k()(Me,"contextType",E);var Ee=n(39),Te=n.n(Ee);n(232);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){k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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(4),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(y()(t)),t.handleChangeEnd=t.handleChangeEnd.bind(y()(t)),t.onInputChange=t.onInputChange.bind(y()(t)),t}return u()(a,[{key:"onInputChange",value:function(e){this.setState(k()({},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=v()(M.a.mark((function e(){var t,n,r,o,a;return M.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(k()({},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=v()(M.a.mark((function e(){var t,n,r,o,a,i,s,l;return M.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",style:{marginLeft:"10px"},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 d-flex col-md-12 mt30 clearfix"},o.a.createElement("div",{className:"float-left col-md-6"},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 col-md-6"},o.a.createElement("button",{type:"button",style:{marginLeft:"79%"},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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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)}}k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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)}}k()(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=v()(M.a.mark((function e(){var t,n;return M.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=v()(M.a.mark((function e(t,n){var r,o;return M.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);k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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=v()(M.a.mark((function e(){var t,n;return M.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=v()(M.a.mark((function e(t){var n,r;return M.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=v()(M.a.mark((function e(){var t,n;return M.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("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);k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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",style:{width:"100%",height:"325px"},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://www.smackcoders.com/?utm_source=plugin&utm_campaign=csv_importer_pro&utm_medium=wordpress",target:"_blank"},this.context.language.DevelopmentNews," ")),o.a.createElement("li",null,o.a.createElement("a",{href:"https://www.smackcoders.com/wp-ultimate-csv-importer-pro.html?utm_source=plugin&utm_campaign=csv_importer_pro&utm_medium=wordpress",target:"_blank"},this.context.language.WhatsNew," ")),o.a.createElement("li",null,o.a.createElement("a",{href:"https://www.smackcoders.com/documentation/ultimate-csv-importer-pro/how-to-import-csv?utm_source=plugin&utm_campaign=csv_importer_pro&utm_medium=wordpress",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://www.smackcoders.com/products.html?utm_source=plugin&utm_campaign=csv_importer_pro&utm_medium=wordpress",target:"_blank"},this.context.language.OtherWordPressPlugins," ")))))))}}]),n}(r.Component);k()(ze,"contextType",E);var Be=ze;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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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 Ue=function(e){h()(n,e);var t=Ve(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);k()(Ue,"contextType",E);var We=Ue,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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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")}},{key:"updateStorageSetting",value:(t=v()(M.a.mark((function e(){var t;return M.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}),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 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)}}),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){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){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){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)}}),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){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){e.context.setExistingBucket(t)}},o.a.createElement("i",{className:"list-icon"})," ",t," ")}))))))))))}}]),r}(r.Component);k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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=v()(M.a.mark((function e(){var t,n;return M.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:200==(n=e.sent).status&&(this.context.setEndPoint(n.data.origin),this.context.setEdgePoint(n.data.edge),this.setState({createBucketsection:!0}),D.toast.success("Bucket selected"));case 8: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){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})}}),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){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){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);k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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=v()(M.a.mark((function e(){var t,n;return M.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:200==(n=e.sent).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=12;break;case 9:e.prev=9,e.t0=e.catch(2),console.log(e.t0);case 12:case"end":return e.stop()}}),e,this,[[2,9]])}))),function(){return n.apply(this,arguments)})},{key:"getServiceProvider",value:(t=v()(M.a.mark((function e(){var t,n;return M.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:200==(n=e.sent).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=17;break;case 14:e.prev=14,e.t0=e.catch(7),e.t0&&(this.setState({loading:!1}),D.toast.error("Please check your credentials"));case 17:case"end":return e.stop()}}),e,this,[[7,14]])}))),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)}}),"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){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){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);k()(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(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:"bug_reporting",message:"",newsletterEmail:"",errors:""},t.supportEmail="",t}return u()(a,[{key:"componentDidMount",value:function(){this.context.setSelectedTabOnCookies("support")}},{key:"submitContactForm",value:(n=v()(M.a.mark((function e(t){var n;return M.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=v()(M.a.mark((function e(){var t,n;return M.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}),e.handleValidation(e.state.supportEmail)?e.setState({errors:""}):e.setState({errors:"Email is not Valid"})}}),o.a.createElement("p",{style:{color:"red"}},this.state.
|